Subgroups of $\mathbb{Z}_{13}^*$ using "GAP language" How can I know the nontrivial subgroups of $\mathbb{Z}_{13}^*$ (with multiplication without zero) using GAP language
 A: First, create the field:
gap> F:=GF(13);
GF(13)

Next, calculate its unit group:
gap> U:=Units(F);
<group of size 12 with 1 generators>

One could be interested in some of its properties:
gap> Size(U);
12
gap> IsCyclic(U);
true

Now, for such a small example one could just use AllSubgroups:
gap> s:=AllSubgroups(U);
[ <trivial group>, <group of size 2 with 1 generators>, 
  <group of size 3 with 1 generators>, <group of size 4 with 1 generators>, 
  <group of size 6 with 2 generators>, <group of size 12 with 1 generators> ]

Then filter only non-trivial subgroups:
gap> s1 := Filtered(s, g -> not Size(g) in [1,Size(U)]);
[ <group of size 2 with 1 generators>, <group of size 3 with 1 generators>, 
  <group of size 4 with 1 generators>, <group of size 6 with 2 generators> ]

For example, the second group from this list consists of these elements:
gap> AsList(s2[3]);
[ Z(13)^0, Z(13)^8, Z(13)^4 ]

Note that the subgroups are not necessarily given by generating sets of minimal possible order.
A: You don't really need GAP for this task.
Since $13$ is prime, $\mathbb{Z}_{13}^*$ is a cyclic group of order $12$. Thus all subgroups are cyclic and the lattice of subgroups corresponds to the lattice of divisors of $12$.
To be explicit, $2$ is a generator of $\mathbb{Z}_{13}^*$. Thus all subgroups are generated by $2^d$ where $d$ is a divisor of $12$.
