I am using magma and want to consider a group $H$ as a subgroup of the direct product $H \times G$, written in magma as DirectProduct(H,G).
Right now I am having to use the subgroup generator construction, as in the following example.
It feels like there must be a much simpler way that I am missing!
A further question is how do I simply select an element of $G \setminus H$? An element of $G$ can be chosen by Rep(G), but I am not sure how to ensure this is not in $H$...
Example:
H := CyclicGroup(8);
G := DirectProduct(H,CyclicGroup(2))
H := sub<G | (1,2,3,4,5,6,7,8)>;