Outer automorphisms of extraspecial groups in GAP Let $G_n$ be the extraspecial group of order $2^{1+2n}$. Its outer automorphism group is known to be isomorphic to the general orthogonal group $GO(2n)$. I'd like to get an explicit map of this isomorphism in gap. Here's what I tried so far:
n:=4;
grp:=ExtraspecialGroup(2^(2*n+1),"+");
aut:=AutomorphismGroup(grp);
inn:=InnerAutomorphismsAutomorphismGroup(aut);
ort:=GeneralOrthogonalGroup(+1,2*n,2);
Print("|out| = ",Size(aut)/Size(inn),"\n");
Print("|ort| = ",Size(ort),"\n");
gen_aut:=GeneratorsOfGroup(aut);
gen_ort:=GeneratorsOfGroup(ort);
Print("generators of aut = ",Length(gen_aut),"\n");
Print("generators of ort = ",Length(gen_ort),"\n");

|out| = 348364800
|ort| = 348364800
generators of aut = 10
generators of ort = 3

The size of the two groups (out and ort) matches as expected, but I'm not sure how to proceed from here. How would you define the outer automorphism group in GAP and how would you align its generators to those of the orthogonal group and find the isomorphism.
 A: The isomorphism comes from the induced action of the automorphism group on the centre factor. Lets build this, by writing down matrices that describe the action of the automorphisms on a basis of $G/Z$:
gap> z:=Centre(grp);
Group([ f9 ])
gap> pcgs:=ModuloPcgs(grp,z); # like a basis for G/Z
[ f1, f2, f3, f4, f5, f6, f7, f8 ]
gap> mats:=List(GeneratorsOfGroup(aut),x->List(pcgs,
> y->ExponentsOfPcElement(pcgs,Image(x,y))*One(GF(2))));;
gap> mg:=Group(mats);
<matrix group with 10 generators>
gap> Size(mg);
348364800

So now mats are the matrix generators. Of course it is possible that we have chosen a basis that does not fit with the correct form, but we're lucky:
gap> mg=ort;
true

Note that this luck is not promised by the manual. It is possible that if you chose another prime/dimension you get a discrepancy and need to conjugate to get the right form.
You can build the homomorphism as:
gap> hom:=GroupHomomorphismByImages(aut,mg,GeneratorsOfGroup(aut),mats);;
gap> Kernel(hom)=inn;
true

Note that this takes a momentm, as GAP verifies that it is a homomorphism. Use GroupHomomorphismByImagesNC to skip the test.
