All Tutorials Tutorial

Cosets & Presentations

Permutation groups, continued

Beyond basic group membership, Magma provides tools for working with cosets of a subgroup, enumerating transversals, and translating a permutation group into an abstract presentation (generators and relations). These are essential for structural computations that go beyond simple element manipulation.

Cosets and Double Cosets

For a subgroup H of a group G and an element g of G, the right coset H*g is formed with the * operator. Coset membership is tested with in and notin, cosets are compared with eq/ne, and #C gives the cardinality of a coset C.

> G := Sym(5);
> H := sub< G | (1,2,3), (1,2) >;
> g := G!(4,5);
> C := H * g;
> #C;
6
> g in C;
true

A double coset H*g*K of two subgroups H and K of G is constructed with DoubleCoset(G, H, g, K). Rather than build one double coset at a time, DoubleCosetRepresentatives(G, H, K) returns a sequence of representatives for all the H-K-double cosets in G (the identity is always the first representative), together with a parallel sequence giving the size of each double coset.

> G := Sym(6);
> H := sub< G | (1,2,3), (4,5,6) >;
> K := sub< G | (1,4)(2,5)(3,6) >;
> reps, sizes := DoubleCosetRepresentatives(G, H, K);
> #reps;
6

For very large groups, enumerating every double coset representative directly can be too expensive. ProcessLadder(L, G, U) sets up a ladder of subgroups (from a chain L with L[1] = G down to U) for computing with L[n]-U-double cosets more efficiently than the direct method; GetRep(p, R) then extracts the canonical representative for a given permutation from the ladder data, and DeleteData(R) frees it when done. YoungSubgroupLadder and StabilizerLadder build ladders suited to Young subgroups and to monomial stabilizers respectively.

Transversals

A right transversal for a subgroup H in G is obtained with Transversal(G, H) or RightTransversal(G, H). Both return an indexed set T of coset representatives together with the transversal map phi sending each g in G to the representative t of the coset H*t containing it.

> G := Sym(4);
> H := sub< G | (1,2) >;
> T, phi := Transversal(G, H);
> #T;
12
> (G!(1,3,2)) @ phi;
(1, 3, 2)

When the index of H in G is too large to materialize a full transversal, TransversalProcess(G, H) builds a process object instead, using a backtrack search for canonical coset representatives. TransversalProcessRemaining(P) reports how many representatives are still to come (initially the index (G:H)), and TransversalProcessNext(P) advances the process, returning the next representative — the very first call always returns the identity. For a narrower question — which coset representatives contain a specific point — ShortCosets(p, H, G) computes just those representatives without doing a full transversal, so it remains usable even when (G:H) is enormous.

Presentations

A permutation group can be converted into a finitely presented group (an GrpFP) isomorphic to it. FPGroup(G) computes a presentation on the defining generators of G, using the regular representation together with the Todd-Coxeter Schreier algorithm, and returns both the presented group F and a homomorphism phi: F -> G.

> G := Sym(4);
> F, phi := FPGroup(G);
> F;
Finitely presented group F on 2 generators
...
> phi;
Mapping from: GrpFP: F to GrpPerm: G

If instead you want a presentation for a quotient G/N by a normal subgroup N, use FPGroup(G, N) or the equivalent FPQuotient(G, N), which return the fp-group F for the quotient together with the natural homomorphism phi: G -> F.

For larger groups it is usually far more efficient to present G on a set of strong generators (from a base and strong generating set) rather than on the defining generators. FPGroupStrong(G) does this, using a combination of the Schreier-Todd-Coxeter-Sims algorithm and the Brownie-Cannon-Sims verification procedure; if G does not already have strong generators, they are computed first, controlled by the Random and Run parameters. The resulting presentation additionally encodes a presentation for every group in the stabilizer chain.

Permutations as Words

Every permutation group G on d generators has an associated word group: a free group W of rank d, together with a homomorphism phi: W -> G sending the i-th generator of W to G.i. WordGroup(G) constructs W (represented as an SLP group) and returns phi. Given phi, InverseWordMap(G) builds the reverse map rho, so that for any g in G, g @ rho is a word in W mapping back to g.

Two further intrinsics compute specific words. ActingWord(G, x, y) finds a word w such that x^phi(w) = y, for points x and y in the same orbit. WordInGenerators(G, g) computes a word evaluating to a given element g: for groups of order at most the RegLimit parameter this uses the regular permutation representation and guarantees a shortest word, while for larger groups it falls back to Minkwitz's algorithm, which finds a reasonably short (but not necessarily shortest) word.

> G := Sym(4);
> W, phi := WordGroup(G);
> rho := InverseWordMap(G);
> g := G!(1,2,3,4);
> w := g @ rho;
> w @ phi eq g;
true
Quiz