7.62 IsSubgroup

IsSubgroup( G, U )

IsSubgroup returns true if U is a subgroup of G and false otherwise.

Note that G and U must have a common parent group. This function returns true if and only if the set of elements of U is a subset of the set of elements of G, it is not the inverse of IsParent (see IsParent).

    gap> s6  := Group( (1,2,3,4,5,6), (1,2) );;
    gap> s4 := Subgroup( s6, [ (1,2,3,4), (1,2) ] );;
    gap> z2 := Subgroup( s6, [ (5,6) ] );;
    gap> IsSubgroup( s4, z2 );
    false
    gap> v4 := Subgroup( s6, [ (1,2)(3,4), (1,3)(2,4) ] );;
    gap> IsSubgroup( s4, v4 );
    true 

If the elements of G are known, then the default function GroupOps.IsSubgroup checks whether the set of generators of U is a subset of the set of elements of G. Otherwise the function checks whether each generator of U is an element of G using in.

Previous Up Top Next
Index

GAP 3.4.4
April 1997