1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
|
#@local a4, k4, rc, lc, a, b, d, f, g, h, H1, H2, H3, K1, K2, K3, lc1, lc4, M, matcyc, rc5, s
#############################################################################
## adapted from gapdev/tst/tstinstall/cset.tst for left cosets
##
## test of group intersection and LeftCoset
##
gap> START_TEST("lcset.tst");
# section 5.2.1: basic coset tests
gap> a4 := Group( (1,2,3), (2,3,4) );; SetName( a4, "a4" );
gap> k4 := Group( (1,2)(3,4), (1,3)(2,4) );; SetName( k4, "k4" );
gap> rc := RightCosets( a4, k4 );
[ RightCoset(k4,()), RightCoset(k4,(2,3,4)), RightCoset(k4,(2,4,3)) ]
gap> lc := LeftCosets( a4, k4 );
[ LeftCoset((),k4), LeftCoset((2,4,3),k4), LeftCoset((2,3,4),k4) ]
gap> AsSet( lc[2] );
[ (2,4,3), (1,2,3), (1,3,4), (1,4,2) ]
gap> LeftCoset( (1,4,2), k4 ) = lc[2];
true
gap> Representative( lc[2] );
(2,4,3)
gap> ActingDomain( lc[2] );
k4
gap> (1,4,3) in lc[3];
true
gap> (1,2,3)*lc[2] = lc[3];
true
gap> lc[2]^(1,3,2) = lc[3];
true
# section 5.2.2
gap> Inverse( rc[3] ) = lc[3];
true
gap> Inverse( lc[2] ) = rc[2];
true
# many further tests
gap> LeftCoset( (1,2), a4 ) = LeftCoset( (2,3), a4 );
true
gap> () in LeftCoset( (1,2), Group([(1,2,3,4)]) );
false
gap> (1,2) in LeftCoset( (5,6), SymmetricGroup(12) );
true
gap> Length( LeftCosets( SymmetricGroup(5), AlternatingGroup(4) ) );
10
gap> (1,2,3) * LeftCoset( (), AlternatingGroup(4) )
> = LeftCoset( (), AlternatingGroup(4) );
true
gap> IsBiCoset( LeftCoset( (1,2), AlternatingGroup(6) ) );
true
gap> IsBiCoset( LeftCoset( (1,7), AlternatingGroup(6) ) );
false
gap> IsLeftCoset( LeftCoset( (1,2,3), MathieuGroup(12) ) );
true
gap> g:=SymmetricGroup(3);;
gap> h:=Group((1,2));;
gap> List(LeftCosets(g,h), SSortedList);
[ [ (), (1,2) ], [ (1,3,2), (1,3) ], [ (2,3), (1,2,3) ] ]
# test intersecting permutation cosets
gap> H1 := Group( [ (), (2,7,6)(3,4,5), (1,2,7,5,6,4,3) ] );;
gap> H2 := Group( [ (1,2,3,4,5,6,7), (5,6,7) ] );;
gap> H3 := Group( [ (1,2,3,4,5,6,8), (1,3,2,6,4,5), (1,6)(2,3)(4,5)(7,8) ] );;
gap> AsSet( LeftCoset( (1,5,7,3)(4,6), H1 ) ) =
> Intersection( LeftCoset( (3,6)(4,7), H2 ),
> LeftCoset( (1,5,3,8,6,7), H3 ) );
true
gap> AsSet( LeftCoset( (1,2,5,6,7,4,3,8), Group(()) ) ) =
> Intersection( LeftCoset( (1,5,6,7)(3,8,4),
> Group( [ (1,4)(2,5), (1,3,5)(2,4,6), (1,5)(2,4)(3,6) ] ) ),
> LeftCoset( (1,2,6,8)(3,7),
> Group( [ (3,4), (5,6,7,8), (5,6) ] ) ) );
true
gap> [] = Intersection( LeftCoset( (), SymmetricGroup(4) ),
> LeftCoset( (4,7), SymmetricGroup([3..6]) ) );
true
gap> [] = Intersection( LeftCoset( (4,5), Group( [ (1,2,3,4,5) ] ) ),
> LeftCoset( (), AlternatingGroup(4) ) );
true
gap> AsSet( LeftCoset( (7,9), SymmetricGroup([3..5]) ) ) =
> Intersection( LeftCoset( (1,2)(7,9), SymmetricGroup(5) ),
> LeftCoset( (7,9), SymmetricGroup([3..7]) ) );
true
gap> [] = Intersection( LeftCoset( (1,4)(3,5), Group([(1,2,3,4,5)]) ),
> LeftCoset( (), SymmetricGroup(3) ) );
true
gap> AsSet( LeftCoset( (4,5), Group( [(5,6)] ) ) ) =
> Intersection( LeftCoset( (), SymmetricGroup(6) ),
> LeftCoset( (4,5), SymmetricGroup([5..8]) ) );
true
gap> AsSet( LeftCoset( (1,4,5), SymmetricGroup(5) ) ) =
> Intersection( LeftCoset( (), SymmetricGroup(5) ),
> LeftCoset( (1,2), SymmetricGroup(5) ) );
true
gap> [] =
> Intersection( LeftCoset( (1,2), Group( (1,2,3,4,5) ) ),
> LeftCoset( (), Group( (1,2,3,5,4) ) ) );
true
gap> [] =
> Intersection( LeftCoset( (1,2,3), Group( (1,2,3,4,5) ) ),
> LeftCoset( (), Group( (1,2,3,5,4) ) ) );
true
gap> AsSet( LeftCoset( (1,2), Group( [ (1,2,3,5,4) ] ) ) ) =
> Intersection( LeftCoset( (), SymmetricGroup(7) ),
> LeftCoset( (1,2), Group( (1,2,3,5,4) ) ) );
true
gap> [] =
> Intersection( LeftCoset( (), SymmetricGroup([3..7]) ),
> LeftCoset( (1,2), Group( (1,2,3,5,4) ) ) );
true
# test trivial cases
gap> Intersection( LeftCoset( (), Group([],()) ),
> LeftCoset( (1,2), Group([],()) ) ) = [];
true
gap> Intersection( LeftCoset( (), Group( (1,2,3) ) ),
> LeftCoset( (1,2), Group( (1,2,3) ) ) ) = [];
true
gap> Intersection( LeftCoset( (), AlternatingGroup(6) ),
> LeftCoset( (1,2), AlternatingGroup(6) ) ) = [];
true
gap> Intersection( LeftCoset( (1,2), AlternatingGroup([1..5]) ),
> LeftCoset( (1,2), AlternatingGroup([6..10]) ) )
> = AsSet( LeftCoset( (1,2), Group(()) ) );
true
#coset of pc-group
gap> d := DihedralGroup( 24 );
<pc group of size 24 with 4 generators>
gap> List( GeneratorsOfGroup(d), x -> Order(x) );
[ 2, 12, 6, 3 ]
gap> s := Subgroup( d, [ d.1, d.4 ] );;
gap> SetName( s, "s" );
gap> lc4 := LeftCoset( d.2, s );
LeftCoset(<object>,s)
gap> AsSet( lc4 );
[ f2, f2*f4, f1*f2*f3, f2*f4^2, f1*f2*f3*f4, f1*f2*f3*f4^2 ]
gap> d.2 * d.4 in lc4;
true
# coset of fp-group
gap> f := FreeGroup(2);; a := f.1;; b := f.2;;
gap> g := f / [ a^5, b^4, a*b*a^2*b^3 ];
<fp group on the generators [ f1, f2 ]>
gap> Size(g);
20
gap> h := Subgroup( g, [g.1] );;
gap> SetName( h, "C5" );
gap> rc5 := LeftCoset( g.2, h );
LeftCoset(<object>,C5)
gap> AsSet( rc5 );
[ f2, f2*f1, f2*f1^2, f2*f1^3, f2*f1^4 ]
# test intersection non-permutation cosets
gap> K1 := Group( [ [[-1,0],[0,-1]] ] );;
gap> K2 := Group( [ [[-1,0],[0,1]], [[0,1],[1,0]] ] );;
gap> K3 := Group( [ - IdentityMat(2) ] );;
gap> AsSet( LeftCoset( [ [0,1],[1,0] ], K1 ) ) =
> Intersection( LeftCoset( IdentityMat(2), K2 ),
> LeftCoset( [[0,1],[1,0]], K1 ) );
true
gap> AsSet( LeftCoset( [[0,1],[1,0]], K3 ) ) =
> Intersection( LeftCoset( [[0,-1],[-1,0]], K3 ),
> LeftCoset( [[0,1],[1,0]], K3 ) );
true
gap> matcyc := CyclicGroup( IsMatrixGroup, GF(3), 4 );;
gap> M := GeneratorsOfGroup( matcyc )[1];;
gap> lc1 := LeftCoset( M^2, matcyc );;
gap> Representative(lc1);
[ [ 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3) ], [ 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0 ],
[ Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3) ], [ 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3) ] ]
#
gap> STOP_TEST("lcset.tst", 1);
|