Black-box group algorithm for abelianness testing given a generating set

Idea and outline
The idea is to check, for every pair of elements from $$S$$, whether they commute. If every pair of elements from $$S$$ commute, the group is abelian. If any pair does not commute, the group is non-abelian.

Black-box group operations used
The algorithm outlined here uses only the black-box multiplication. It does not use the other black-box group operations, such as the identity element, the inverse map, or the membership test.

Thus, this algorithm applies to situations where we have encodings without explicit algorithms for the membership test, identity element, or inverse map.

Applicability to multi-encodings
A multi-encoding of a group is like an encoding, but a single group element may have more than one associated codeword in the encoding. For a multi-encoding, we usually need to additionally specify an equality test to determine whether two codewords represent the same group element.

The black-box group algorithm given here adapts to multi-encodings, and requires both the multiplication and the equality test.