"Source: Text/Group/GrpASim.text";
"Line: 1280";
"Date: Thu Sep 25 14:47:45 2025";
"Main: Fri Sep 26 14:29:19 2025";
// original file: Text/Group/GrpASim.text, line: 1280
// Example: H72E3 ()
print "Example: H72E3";
ei := GetEchoInput();
SetEchoInput(true);
A:= AlternatingGroup (13);
H:= Stabiliser(A, {1,2});
G := CosetImage (A, H);
Degree (G);
assert $1 eq 78;
success, bb_to_perm, perm_to_bb, bb_to_wg, wg_to_bb, is_sym := 
RecogniseAlternatingOrSymmetric (G);

success;
assert $1;
is_sym;
assert not $1;

 x:= Sym(78)!(1, 35, 16, 28, 14, 26, 69, 5, 74)(2, 54,
 67, 18, 51, 63, 6, 50, 77)(3, 33, 78, 12, 34, 29, 19, 15, 73)
 (4, 52, 61, 24, 49, 60, 68, 38, 64)(7, 20, 71, 17,
 32, 11, 72, 8, 36)(9, 76, 47, 31, 56, 62, 13, 53, 59)
 (10, 70, 57, 23, 37, 22, 21, 27, 25)(30, 45, 46, 43, 42,
 44, 40, 41, 75)(39, 55, 65)(48, 66, 58);

flag, w := AlternatingOrSymmetricElementToWord (G, x);
"Is x in G?", flag;
Evaluate (w, [G.i: i in [1..Ngens (G)]]) eq x;
assert $1;

perm_image:= bb_to_perm(x);
perm_image;

y := Random (G);
w := bb_to_wg (y);
Evaluate (w, [G.i: i in [1..Ngens (G)]]) eq y;
assert $1;
SetEchoInput(ei);
