IsCyclic( G )
IsCyclic
returns true
if G is cyclic and false
otherwise.
A group G is cyclic if and only if there exists an element g in <G> such that G is generated by g.
Note that IsCyclic
sets and tests the record component G.isCyclic
.
gap> z6 := Group( (1,2,3), (4,5) );; gap> IsCyclic( z6 ); true gap> z36 := AbelianGroup( AgWords, [ 9, 4 ] );; gap> IsCyclic( z36 ); true
The default function GroupOps.IsCyclic
returns false
if G is not an
abelian group. Otherwise it computes the abelian invariants (see
AbelianInvariants) if G is infinite. If G is finite of order
p_1^{e_1} ... p_n^{e_n}, where p_i are distinct primes, then G is
cyclic if and only if each <G>^{p_i} has index p_i in G.
GAP 3.4.4