A5 in S5

Definition
We define $$G$$ as symmetric group:S5 -- for concreteness, the symmetric group on the set $$\{ 1,2,3,4,5 \}$$.

$$H$$ is alternating group:A5 -- the subgroup of $$G$$ comprising even permutations. A criterion for a permutation to be even, based on cycle decomposition, is that the number of cycles of even length should be even.

The quotient group is cyclic group:Z2.

Finding this subgroup inside the group as a black box
Here, a group $$G$$ that we know to be isomorphic to the symmetric group of degree five is given, and we need to locate in that the alternating group of degree four. Different ways of constructing/locating this subgroup are given below.

To assign $$H$$ to any of these, do H := followed by that. For instance:

H := DerivedSubgroup(G);

Constructing the group and the subgroup
Because of GAP's native implementation of symmetric groups, this can be easily achieved using SymmetricGroup and AlternatingGroup:

gap> G := SymmetricGroup(5);; gap> H := AlternatingGroup(5);;

Note that double semicolons have been used to suppress confirmatory output, but you may prefer to use single semicolons.