To save space and avoid clutter the examples are shown without the gap>
and > prompts,  as they might appear in  an input file. For examples of
Example  of Double Coset Enumeration Strategies.
The Symmetric group of degree 5
It is well known that
G = S_5 = leftlangle,a,b,c,d right.&mid& a^2 = b^2 = c^2 = d^2 =
(ab)^3 = (bc)^3 = (cd)^3 = 
&&left.(ac)^2 = (ad)^2 = (bd)^2 = 1rightrangle.
For brevity we denote this presentation by a Coxeter diagram:
setlengthunitlength1cm put(0.5,0.5)line(1,0)3 multiput(0.5,0.5)(1,0)4circle0.1 put(0.5,0.6)makebox(0,0)[b]a put(1.5,0.6)makebox(0,0)[b]b put(2.5,0.6)makebox(0,0)[b]c put(3.5,0.6)makebox(0,0)[b]d
We let K=gen(a,b)iso S_3 and identify a with (1,2) and b with (2,3). Then G is generated by K and X = {c,d}. We can see from the presentation that L_c = gen(a) = Stab_K(3), while L_d = K. We set H=gen(a,b,c)iso S_4 and obtain the following presentation:
    gap> k := SymmetricGroup(3);
    Group( (1,3), (2,3) )
    gap> c := AbstractGenerator("c");;
    gap> d := AbstractGenerator("d");;
    gap> S5Pres := rec(
    >    groupK := k,
    >    gainGroups := [rec(),           # default to L=K
    >                   rec(dom := 3)],  # default to action on points
    >    gens := [rec(name := c, invol := true, wgg := 2),
    >             rec(name := d, invol := true, wgg := 1)],
    >    relators := [DCEWord(k,c*d)^3,DCEWord(k,[(2,3),c])^3],
    >    subgens := [DCEWord(k,(1,2,3)), DCEWord(k,(1,2)), DCEWord(k,c)]);;
The Weyl Group of Type E_6
We consider another group given by a Coxeter presentation
put(0.5,0.5)line(1,0)4 multiput(0.5,0.5)(1,0)5circle0.1 put(0.5,0.6)makebox(0,0)[b]a put(1.5,0.6)makebox(0,0)[b]b put(2.5,0.6)makebox(0,0)[b]c put(3.5,0.6)makebox(0,0)[b]d put(4.5,0.6)makebox(0,0)[b]e put(2.5,-0.5)circle0.1 put(2.5,-0.5)line(0,1)1 put(2.6,-0.5)makebox(0,0)[l]f
This time we take K=H=gen(a,b,c,d,e)iso S_6 and obtain the presentation:
    gap> k := SymmetricGroup(6);
    Group( (1,6), (2,6), (3,6), (4,6), (5,6) )
    gap> f := AbstractGenerator("f");;
    gap> WE6Pres := rec (
    >    groupK := k,
    >    gainGroups := [rec(dom := [1,2,3])],  # action defaults to OnSets
    >    gens := [rec(name := f,wgg := 1, invol := true)],
    >    relators := [DCEWord(k,[(3,4),f])^3],
    >    subgens := [DCEWord(k,(1,2,3,4,5,6)),DCEWord(k,(1,2))] );;
S_5 revisited
To illustrate other features of the program, we consider the presentation
of  S_5  again, but  this  time  we  choose  K=gen(b,c)iso  S_3 and
identify b with  (1,2) and c with   (2,3).  Now L_a = gen(c)  =
Stab_K(1), while L_d = gen(b)  = Stab_K(3). These are two conjugate
subgroups of K, so we can use the ggconj feature  to combine the data
structures for them.
We can present this as:
    gap> k := SymmetricGroup(3);
    Group( (1,3), (2,3) )
    gap> a := AbstractGenerator("a");;
    gap> d := AbstractGenerator("d");;
    gap> b := (1,2);;
    gap> c := (2,3);;
    gap> S5PresA := rec (
    >    groupK := k,
    >    gainGroups := [rec(dom := 1)],
    >    gens := [rec(name := a, invol := true, wgg := 1),
    >             rec(name := d, invol := true, wgg := 1, ggconj := (1,3))],
    >    relators := [DCEWord(k,[c,d])^3,DCEWord(k,[a,b])^3,
    >                 DCEWord(k,[a,d])^2],
    >    subgens := [DCEWord(k,(1,2,3)),DCEWord(k,(1,2)), DCEWord(k,a)] );;
The Harada-Norton Group
The almost-simple group HN: 2 can be constructed as follows. Take the symmetric group S_{12} acting naturally on {1,ldots,12} and let L be the stabiliser of {1,2,3,4,5,6}. Then L iso S_6times S_6. Extend S_{12} by adjoining an element a which normalizes L and acts on each factor S_6 by its outer automorphism. Impose the additional relations a^2 = 1 and (a(6,7))^5=1.
With H=K, this construction translates directly into DCE input:
    gap> a := AbstractGenerator("a");;
    gap> K := Group((1,2,3,4,5,6,7,8,9,10,11,12),(1,2));;
    gap> L := Stabilizer(K,[1,2,3,4,5,6],OnSets);;
    gap> f := GroupHomomorphismByImages( L,L,
    >    [(1,5,4,3,2),(5,6),(12,8,9,10,11),(7,8)],
    >    [(1,5,4,3,2),(1,4)(2,3)(5,6),(12,8,9,10,11),(12,9)(10,11)(7,8)] );;
    gap> HNPres := rec(
    >    groupK := K,
    >    gainGroups := [ rec(dom := [1,2,3,4,5,6], op := OnSets)],
    >    gens := [ rec( name := a, invol := true, wgg := 1, action := f)],
    >    relators := [DCEWord(K,[a,(6,7)])^5],
    >    strategy := rec(whichStrategy := "HLT", EC := [1140000]),
    >    subgens := [(1,2,3,4,5,6,7,8,9,10,11,12),(1,2)]);;
A Non-permutation Example
The programs were written with the case of K a permutation group uppermost in the author's mind, however other representations are possible.
In this example, we represent the symmetric group S_4 as an AG-group in the Coxeter presentation of S_6. This example also demonstrates the explicit use of the action of K on left cosets of L_x, when no suitable action on points, sets or similar is available.
    gap> k := AgGroup(SymmetricGroup(4));
    Group( g1, g2, g3, g4 )
    gap> a := PreImage(k.bijection,(1,2));
    g1
    gap> b := PreImage(k.bijection,(2,3));
    g1*g2
    gap> c := PreImage(k.bijection,(3,4));
    g1*g4
    gap> d := AbstractGenerator("d");;
    gap> e := AbstractGenerator("e");;
    gap> l := Subgroup(k,[a,b]);
    Subgroup( Group( g1, g2, g3, g4 ), [ g1, g1*g2 ] )
    gap> OurOp := function(cos,g)
    >     return g^-1*cos;                   # note the inversion
    > end;;
    gap> Pres := rec (
    >    groupK := k,
    >    gainGroups := [rec(dom := k.identity*l, op := OurOp),rec()],
    >    gens := [rec(name := d, invol := true, wgg := 1),
    >             rec(name := e, invol := true, wgg := 2)],
    >    relators := [DCEWord(k,d*e)^3,DCEWord(k,[c,d])^3],
    >    subgens := [DCEWord(k,a),DCEWord(k,b), DCEWord(k,c),DCEWord(k,d)]);;
GAP 3.4.4