PREP - Professional Enhancement Programs of the MAA



 

Incorporating the Software GAP into Teaching Abstract Algebra

A PREP Workshop

GAP log - Wednesday July 12, 10:00 am - 11:30 am

Section 8, continued
gap> G:= AllSmallGroups(16)[1];

gap> G.5;
Error, illegal access to record component `obj.5'
of the object . (Objects by default do not have record components.
The error might be a relic from translated GAP3 code.)       called from
(  ) called from read-eval-loop
Entering break read-eval-print loop ...
you can 'quit;' to quit to outer loop, or
you can 'return;' to continue
brk> quit;
gap> G[5];
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 1st choice method found for `ELM_LIST' on 2 arguments called from
(  ) called from read-eval-loop
Entering break read-eval-print loop ...
you can 'quit;' to quit to outer loop, or
you can 'return;' to continue
brk> quit;
gap> eg:= Elements(AllSmallGroups(16)[1]);
[  of ..., f1, f2, f3, f4, f1*f2, f1*f3, f1*f4, f2*f3, f2*f4, f3*f4, 
  f1*f2*f3, f1*f2*f4, f1*f3*f4, f2*f3*f4, f1*f2*f3*f4 ]
gap> eg[5];
f4
gap> G;

gap> Read("autoDn");
gap> Read("homoDn");
gap> d6:=DihedralGroup(IsPermGroup,12);
Group([ (1,2,3,4,5,6), (2,6)(3,5) ])
gap> autoDn(d6);
[ [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,2,3,4,5,6), (2,6)(3,5) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,2,3,4,5,6), (1,2)(3,6)(4,5) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,2,3,4,5,6), (1,3)(4,6) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,2,3,4,5,6), (1,4)(2,3)(5,6) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,2,3,4,5,6), (1,5)(2,4) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,2,3,4,5,6), (1,6)(2,5)(3,4) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,6,5,4,3,2), (2,6)(3,5) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,6,5,4,3,2), (1,2)(3,6)(4,5) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,6,5,4,3,2), (1,3)(4,6) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,6,5,4,3,2), (1,4)(2,3)(5,6) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,6,5,4,3,2), (1,5)(2,4) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,6,5,4,3,2), (1,6)(2,5)(3,4) ] ]
gap> homoDn(d6);
[ [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (), () ], [ (1,2,3,4,5,6), (2,6)(3,5) ] -> 
    [ (), (2,6)(3,5) ], [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (), (1,2)(3,6)(4,5) ],
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (), (1,3)(4,6) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (), (1,4)(2,3)(5,6) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (), (1,4)(2,5)(3,6) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (), (1,5)(2,4) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (), (1,6)(2,5)(3,4) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (2,6)(3,5), () ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (2,6)(3,5), (2,6)(3,5) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (2,6)(3,5), (1,4)(2,3)(5,6) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (2,6)(3,5), (1,4)(2,5)(3,6) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,2)(3,6)(4,5), () ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,2)(3,6)(4,5), (1,2)(3,6)(4,5) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,2)(3,6)(4,5), (1,4)(2,5)(3,6) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,2)(3,6)(4,5), (1,5)(2,4) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,2,3,4,5,6), (2,6)(3,5) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,2,3,4,5,6), (1,2)(3,6)(4,5) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,2,3,4,5,6), (1,3)(4,6) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,2,3,4,5,6), (1,4)(2,3)(5,6) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,2,3,4,5,6), (1,5)(2,4) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,2,3,4,5,6), (1,6)(2,5)(3,4) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,3)(4,6), () ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,3)(4,6), (1,3)(4,6) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,3)(4,6), (1,4)(2,5)(3,6) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,3)(4,6), (1,6)(2,5)(3,4) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,3,5)(2,4,6), (2,6)(3,5) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,3,5)(2,4,6), (1,2)(3,6)(4,5) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,3,5)(2,4,6), (1,3)(4,6) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,3,5)(2,4,6), (1,4)(2,3)(5,6) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,3,5)(2,4,6), (1,5)(2,4) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,3,5)(2,4,6), (1,6)(2,5)(3,4) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,4)(2,3)(5,6), () ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,4)(2,3)(5,6), (2,6)(3,5) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,4)(2,3)(5,6), (1,4)(2,3)(5,6) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,4)(2,3)(5,6), (1,4)(2,5)(3,6) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,4)(2,5)(3,6), () ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,4)(2,5)(3,6), (2,6)(3,5) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,4)(2,5)(3,6), (1,2)(3,6)(4,5) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,4)(2,5)(3,6), (1,3)(4,6) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,4)(2,5)(3,6), (1,4)(2,3)(5,6) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,4)(2,5)(3,6), (1,4)(2,5)(3,6) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,4)(2,5)(3,6), (1,5)(2,4) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,4)(2,5)(3,6), (1,6)(2,5)(3,4) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,5)(2,4), () ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,5)(2,4), (1,2)(3,6)(4,5) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,5)(2,4), (1,4)(2,5)(3,6) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,5)(2,4), (1,5)(2,4) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,5,3)(2,6,4), (2,6)(3,5) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,5,3)(2,6,4), (1,2)(3,6)(4,5) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,5,3)(2,6,4), (1,3)(4,6) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,5,3)(2,6,4), (1,4)(2,3)(5,6) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,5,3)(2,6,4), (1,5)(2,4) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,5,3)(2,6,4), (1,6)(2,5)(3,4) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,6,5,4,3,2), (2,6)(3,5) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,6,5,4,3,2), (1,2)(3,6)(4,5) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,6,5,4,3,2), (1,3)(4,6) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,6,5,4,3,2), (1,4)(2,3)(5,6) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,6,5,4,3,2), (1,5)(2,4) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,6,5,4,3,2), (1,6)(2,5)(3,4) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,6)(2,5)(3,4), () ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,6)(2,5)(3,4), (1,3)(4,6) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,6)(2,5)(3,4), (1,4)(2,5)(3,6) ], 
  [ (1,2,3,4,5,6), (2,6)(3,5) ] -> [ (1,6)(2,5)(3,4), (1,6)(2,5)(3,4) ] ]
gap> Size(autoDn);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 1st choice method found for `Size' on 1 arguments called from
(  ) called from read-eval-loop
Entering break read-eval-print loop ...
you can 'quit;' to quit to outer loop, or
you can 'return;' to continue
brk> quit;
gap> Size(autoDn(d6));
12
gap> Size(homoDn(d6));
64
gap> d4:=DihedralGroup(IsPermGroup,8);
Group([ (1,2,3,4), (2,4) ])
gap> autoDn(d4);
[ [ (1,2,3,4), (2,4) ] -> [ (1,2,3,4), (2,4) ], 
  [ (1,2,3,4), (2,4) ] -> [ (1,2,3,4), (1,2)(3,4) ], 
  [ (1,2,3,4), (2,4) ] -> [ (1,2,3,4), (1,3) ], 
  [ (1,2,3,4), (2,4) ] -> [ (1,2,3,4), (1,4)(2,3) ], 
  [ (1,2,3,4), (2,4) ] -> [ (1,4,3,2), (2,4) ], 
  [ (1,2,3,4), (2,4) ] -> [ (1,4,3,2), (1,2)(3,4) ], 
  [ (1,2,3,4), (2,4) ] -> [ (1,4,3,2), (1,3) ], 
  [ (1,2,3,4), (2,4) ] -> [ (1,4,3,2), (1,4)(2,3) ] ]
gap> Size(autoDn(d4));
8
gap> Size(homoDn(d4));
36
gap> d5:=DihedralGroup(IsPermGroup,10);
Group([ (1,2,3,4,5), (2,5)(3,4) ])
gap> Size(autoDn(d5));
20
gap> Size(homoDn(d5));
26
gap> d19:=DihedralGroup(IsPermGroup,38);
Group([ (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19), 
  (2,19)(3,18)(4,17)(5,16)(6,15)(7,14)(8,13)(9,12)(10,11) ])
gap> Size(autoDn(d19));
342
gap> Size(homoDn(d19));
362
gap> d21:=DihedralGroup(IsPermGroup,42);
Group([ (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21), 
  (2,21)(3,20)(4,19)(5,18)(6,17)(7,16)(8,15)(9,14)(10,13)(11,12) ])
gap> Size(autoDn(d21));
252
gap> Size(homoDn(d42));
Variable: 'd42' must have a value

gap> Size(homoDn(d21));
442
gap> d45:=DihedralGroup(IsPermGroup,90);
Group([ (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), 
  (2,45)(3,44)(4,43)(5,42)(6,41)(7,40)(8,39)(9,38)(10,37)(11,36)(12,35)(13,
    34)(14,33)(15,32)(16,31)(17,30)(18,29)(19,28)(20,27)(21,26)(22,25)(23,24) ])
gap> Size(autoDn(d45));
1080
gap> Size(homoDn(d45));
2026
gap> d20:=DihedralGroup(IsPermGroup,90);
Group([ (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), 
  (2,45)(3,44)(4,43)(5,42)(6,41)(7,40)(8,39)(9,38)(10,37)(11,36)(12,35)(13,
    34)(14,33)(15,32)(16,31)(17,30)(18,29)(19,28)(20,27)(21,26)(22,25)(23,24) ])
gap> d20:=DihedralGroup(IsPermGroup,40);
Group([ (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20), 
  (2,20)(3,19)(4,18)(5,17)(6,16)(7,15)(8,14)(9,13)(10,12) ])
gap> Size(autoDn(d20));
160
gap> Size(homoDn(d20));
484
gap> d24:=DihedralGroup(IsPermGroup,48);
Group([ (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24), 
  (2,24)(3,23)(4,22)(5,21)(6,20)(7,19)(8,18)(9,17)(10,16)(11,15)(12,14) ])
gap> Size(autoDn(d24));
192
gap> Size(homoDn(d24));
676
gap> d48:=DihedralGroup(IsPermGroup,96);

gap> Size(autoDn(d48));
768
gap> Size(homoDn(d48));
2500

Section 10
gap> Integers mod 7;
GF(7)
gap> Elements(Integers mod 7);
[ 0*Z(7), Z(7)^0, Z(7), Z(7)^2, Z(7)^3, Z(7)^4, Z(7)^5 ]
gap> Int(Z(7));
3
gap> Integers mod 8;
(Integers mod 8)
gap> Elements(Integers mod 8);
[ ZmodnZObj( 0, 8 ), ZmodnZObj( 1, 8 ), ZmodnZObj( 2, 8 ), ZmodnZObj( 3, 8 ), 
  ZmodnZObj( 4, 8 ), ZmodnZObj( 5, 8 ), ZmodnZObj( 6, 8 ), ZmodnZObj( 7, 8 ) ]
gap> R:= Integers mod 7;
GF(7)
gap> Int(Z(7));
3
gap> a:= 5*One(R)
> ;
Z(7)^5
gap> 3^5 mod 7;
5
gap> z:= Z(3); 
Z(3)
gap> Elements(Integers mod 3);
[ 0*Z(3), Z(3)^0, Z(3) ]
gap> z^2+z^2;
Z(3)
gap> z^2 + (z^0)^2;
Z(3)
gap> 4 mod 5;
4
gap> 4 mod 8;
4
gap> 7 mod 5;
2
gap> 7 mod 8;
7
gap> 2 mod 5 + 3 mod 5;
5
gap> (2 mod 5 + 3 mod 5) mod 5;
0
gap> (2+3) mod 5;
0
gap> Read("intror");
gap> intror(3);
The statement 'There are nontrivial solutions to a^2 + b^2 = 0 in Z_3' is false
gap> intror(11);
The statement 'There are nontrivial solutions to a^2 + b^2 = 0 in Z_11' is false
gap> gl22:= GL(2, Integers mod 2);
SL(2,2)
gap> gl35:= GL(3, Integers mod 5);
GL(3,5)
gap> sl35:= SL(3, Integers mod 5);
SL(3,5)
gap> Order(GL(2, 5)); Order(SL(2,5));
480
120
gap> Order(GL(3, 5)); Order(SL(3,5));
1488000
372000
gap> Order(GL(2, 7)); Order(SL(2,7));
2016
336
gap> Read("intror2");
gap> intror2(6);
The solutions to x^2 = -1 in Z_6 are [  ]
gap> intror2(4);
The solutions to x^2 = -1 in Z_4 are [  ]
gap> intror2(10);
The solutions to x^2 = -1 in Z_10 are [ ZmodnZObj( 3, 10 ), ZmodnZObj( 7, 10 ) ]
gap> intror2(15);
The solutions to x^2 = -1 in Z_15 are [  ]
gap> intror2(9);
The solutions to x^2 = -1 in Z_9 are [  ]
gap> intror2(7);
The solutions to x^2 = -1 in Z_7 are [  ]
gap> intror2(5);
The solutions to x^2 = -1 in Z_5 are [ Z(5), Z(5)^3 ]
gap> intror2(13);
The solutions to x^2 = -1 in Z_13 are [ Z(13)^3, Z(13)^9 ]
gap> intror2(17);
The solutions to x^2 = -1 in Z_17 are [ Z(17)^4, Z(17)^12 ]
gap> intror2(19);
The solutions to x^2 = -1 in Z_19 are [  ]
gap> intror2(23);
The solutions to x^2 = -1 in Z_23 are [  ]
gap> intror2(25);
The solutions to x^2 = -1 in Z_25 are [ ZmodnZObj( 7, 25 ), ZmodnZObj( 18, 25 ) 
 ]
gap> intror2(31);
The solutions to x^2 = -1 in Z_31 are [  ]
gap> intror2(29);
The solutions to x^2 = -1 in Z_29 are [ Z(29)^7, Z(29)^21 ]

Section 11
gap> R := Integers mod 10;
(Integers mod 10)
gap> e:=Elements(R);
[ ZmodnZObj( 0, 10 ), ZmodnZObj( 1, 10 ), ZmodnZObj( 2, 10 ), ZmodnZObj( 3, 10 ),
  ZmodnZObj( 4, 10 ), ZmodnZObj( 5, 10 ), ZmodnZObj( 6, 10 ), ZmodnZObj( 7, 10 ),
  ZmodnZObj( 8, 10 ), ZmodnZObj( 9, 10 ) ]
gap> h:=x -> e[6]*x;
function( x ) ... end
gap> f := MappingByFunction(R,R,h);
MappingByFunction( (Integers mod 10), (Integers mod 10), function( x ) ... end )
gap> IsRingHomomorphism(f);
true
gap> h:=x -> e[1]*x;
function( x ) ... end
gap> f := MappingByFunction(R,R,h);
MappingByFunction( (Integers mod 10), (Integers mod 10), function( x ) ... end )
gap> IsRingHomomorphism(f);
true
gap> h:=x -> e[2]*x;
function( x ) ... end
gap> f := MappingByFunction(R,R,h);
MappingByFunction( (Integers mod 10), (Integers mod 10), function( x ) ... end )
gap> IsRingHomomorphism(f);
true
gap> h:=x -> e[3]*x;
function( x ) ... end
gap> f := MappingByFunction(R,R,h);
MappingByFunction( (Integers mod 10), (Integers mod 10), function( x ) ... end )
gap> IsRingHomomorphism(f);
false
gap> Read("ringHoms");
gap> ringHoms(10);
The map f: Z_10 -> Z_10 given by f(x)=mx is a homomorphism for m=[ 0, 1, 5, 6 ]
gap> h:=x ->(5 mod 10)*x;
function( x ) ... end
gap> f := MappingByFunction(R,R,h);
MappingByFunction( (Integers mod 10), (Integers mod 10), function( x ) ... end )
gap> IsRingHomomorphism(f);
true
gap> ringHoms(15);
The map f: Z_15 -> Z_15 given by f(x)=mx is a homomorphism for m=[ 0, 1, 6, 10 ]
gap> ringHoms(25);
The map f: Z_25 -> Z_25 given by f(x)=mx is a homomorphism for m=[ 0, 1 ]
gap> ringHoms(20);
The map f: Z_20 -> Z_20 given by f(x)=mx is a homomorphism for m=[ 0, 1, 5, 16 ]
gap> ringHoms(30);
The map f: Z_30 -> Z_30 given by f(x)=mx is a homomorphism for m=
[ 0, 1, 6, 10, 15, 16, 21, 25 ]
gap> ringHoms(40);
The map f: Z_40 -> Z_40 given by f(x)=mx is a homomorphism for m=[ 0, 1, 16, 25 ]
gap> 16^2 mod 40;
16
gap> 25^2 mod 40;
25
gap> Read("ringHoms2");
gap> ringHoms2(15);
[ 1, 5, 9, 13 ]
gap> ringHoms2(25);
[ 1 ]
gap> ringHoms2(20);
[ 1 ]
gap> ringHoms2(30);
[ 1, 5, 9, 13, 17, 21, 25, 29 ]
gap> ringHoms2(40);
[ 1 ]

Back to Home Page
 
 

This PREP workshop is made possible by the NSF grant DUE: 0341481

<\body>