In GAP, how can I generate a specific diagonal subgroup of the direct product two groups

gapgroup-theory

Let $P$ and $Q$ be isomorphic subgroups of a finite group $G$, let $\phi$ be an isomorphism from $P$ to $Q$. How can I find the subgroup of DirectProduct(G, G) that corresponds this set $\{(a,b)\in G\times G : b = \phi(a), a\in P\}$ in GAP?

Best Answer

This is not particularly efficient, but it should work. In the following, P and Q are groups, and iso is an isomorphism from P to Q.

G := DirectProduct(P, Q);
embP := Embedding(G, 1);
embQ := Embedding(G, 2);
gensImageP := List(GeneratorsOfGroup(P), x -> Image(embP, x));
gensImageQ := List(GeneratorsOfGroup(P), x -> Image(embQ,x^iso));
gensDiag := List([1..Length(gensImageP)], 
                 y -> gensImageP[y] * gensImageQ[y]);
diag := Group(gensDiag);
Related Question