PREP - Professional Enhancement Programs of the MAA



 

Exploring Abstract Algebra with Computer Software

A PREP Workshop

GAP log - Wednesday June 30, 2:30 pm - 4:00 pm

Section 10, continued
gap> R1:= Integers mod 7;
GF(7)
gap> x:= X(R1, "x");
x
gap> x^8-2*x;
x^8+Z(7)^5*x
Exercise 10.1
gap> R1:= Integers mod 3;
GF(3)
gap> R2:= Integers mod 5;
GF(5)
gap> R3:= Integers mod 7;
GF(7)
gap> R4:= Integers mod 11;
GF(11)
gap> x:= X(R1, "x");
x
gap> y:= X(R2, "y");
y
gap> z:= X(R3, "z");
z
gap> w:= X(R4, "w");
w
gap> Factors(x^2-1);
[ x+Z(3)^0, x-Z(3)^0 ]
gap> Factors(y^4-1);
[ y+Z(5)^0, y+Z(5), y-Z(5)^0, y+Z(5)^3 ]
gap> Factors(z^6-1);
[ z+Z(7)^0, z+Z(7), z+Z(7)^2, z-Z(7)^0, z+Z(7)^4, z+Z(7)^5 ]
gap> Factors(w^10-1);
[ w+Z(11)^0, w+Z(11), w+Z(11)^2, w+Z(11)^3, w+Z(11)^4, w-Z(11)^0, w+Z(11)^6, w+Z(11)^7, w+Z(11)^8, w+Z(11)^9 ]
Exercise 10.2
gap> IsIrreducible(x^3+2*x^2+1);
true
Exercise 10.4
gap> R:= Rationals;
Rationals
gap> t:= X(R, "t");
t
gap> IsIrreducible(t^3+2*t^2+1);
true
gap> IsIrreducible(x^4+x^3+x^2+1);
true
gap> IsIrreducible(t^4+t^3+t^2+1);
true
gap> IsIrreducible(y^4+y^2+2);
true
gap> IsIrreducible(t^4+t^2+2);
true
Exercise 10.7
gap> Factors(t^6-1);
[ t-1, t+1, t^2-t+1, t^2+t+1 ]
gap> Factors(t^8-1);
[ t-1, t+1, t^2+1, t^4+1 ]
gap> Factors(t^12-1);
[ t-1, t+1, t^2-t+1, t^2+1, t^2+t+1, t^4-t^2+1 ]
gap> Factors(t^20-1);
[ t-1, t+1, t^2+1, t^4-t^3+t^2-t+1, t^4+t^3+t^2+t+1, t^8-t^6+t^4-t^2+1 ]
gap> Factors(t^30-1);
[ t-1, t+1, t^2-t+1, t^2+t+1, t^4-t^3+t^2-t+1, t^4+t^3+t^2+t+1, t^8-t^7+t^5-t^4+t^3-t+1, t^8+t^7-t^5-t^4-t^3+t+1 ]
gap> Factors(t^40-1);
[ t-1, t+1, t^2+1, t^4-t^3+t^2-t+1, t^4+1, t^4+t^3+t^2+t+1, t^8-t^6+t^4-t^2+1, t^16-t^12+t^8-t^4+1 ]
gap> Factors(t^50-1);
[ t-1, t+1, t^4-t^3+t^2-t+1, t^4+t^3+t^2+t+1, t^20-t^15+t^10-t^5+1, t^20+t^15+t^10+t^5+1 ]
gap> Factors(t^75-1);
[ t-1, t^2+t+1, t^4+t^3+t^2+t+1, t^8-t^7+t^5-t^4+t^3-t+1, t^20+t^15+t^10+t^5+1, t^40-t^35+t^25-t^20+t^15-t^5+1 ]
gap> Factors(t^105-1);
[ t-1, t^2+t+1, t^4+t^3+t^2+t+1, t^6+t^5+t^4+t^3+t^2+t+1, t^8-t^7+t^5-t^4+t^3-t+1, t^12-t^11+t^9-t^8+t^6-t^4+t^3-t+1, 
  t^24-t^23+t^19-t^18+t^17-t^16+t^14-t^13+t^12-t^11+t^10-t^8+t^7-t^6+t^5-t+1, 
  t^48+t^47+t^46-t^43-t^42-2*t^41-t^40-t^39+t^36+t^35+t^34+t^33+t^32+t^31-t^28-t^26-t^24-t^22-t^20+t^17+t^16+t^15+t^14+t^13+t^12-t^\
9-t^8-2*t^7-t^6-t^5+t^2+t+1 ]
gap> Factors(t^106-1);
[ t-1, t+1, 
  t^52-t^51+t^50-t^49+t^48-t^47+t^46-t^45+t^44-t^43+t^42-t^41+t^40-t^39+t^38-t^37+t^36-t^35+t^34-t^33+t^32-t^31+t^30-t^29+t^28-t^27\
+t^26-t^25+t^24-t^23+t^22-t^21+t^20-t^19+t^18-t^17+t^16-t^15+t^14-t^13+t^12-t^11+t^10-t^9+t^8-t^7+t^6-t^5+t^4-t^3+t^2-t+1, 
  t^52+t^51+t^50+t^49+t^48+t^47+t^46+t^45+t^44+t^43+t^42+t^41+t^40+t^39+t^38+t^37+t^36+t^35+t^34+t^33+t^32+t^31+t^30+t^29+t^28+t^27\
+t^26+t^25+t^24+t^23+t^22+t^21+t^20+t^19+t^18+t^17+t^16+t^15+t^14+t^13+t^12+t^11+t^10+t^9+t^8+t^7+t^6+t^5+t^4+t^3+t^2+t+1 ]
Section 11: Vector Spaces
gap> V := GF(3)^2;
( GF(3)^2 )
gap> Elements(V);
[ [ 0*Z(3), 0*Z(3) ], [ 0*Z(3), Z(3)^0 ], [ 0*Z(3), Z(3) ], [ Z(3)^0, 0*Z(3) ], [ Z(3)^0, Z(3)^0 ], [ Z(3)^0, Z(3) ], 
  [ Z(3), 0*Z(3) ], [ Z(3), Z(3)^0 ], [ Z(3), Z(3) ] ]
gap> Display(Elements(V));
 . .
 . 1
 . 2
 1 .
 1 1
 1 2
 2 .
 2 1
 2 2
gap> D := Subspaces(V,1);
Subspaces( ( GF(3)^2 ), 1 )
gap> e := Elements(D);
[ <vector space of dimension 1 over GF(3)>, <vector space of dimension 1 over GF(3)>, <vector space of dimension 1 over GF(3)>, 
  <vector space of dimension 1 over GF(3)> ]
gap> Display(Elements(e[1]));
 . .
 . 1
 . 2
gap> Display(Elements(e[2]));
 . .
 1 .
 2 .
gap> Display(Elements(e[3]));
 . .
 1 1
 2 2
gap> Display(Elements(e[4]));
 . .
 1 2
 2 1
gap> Size(Subspaces(V,1));
4
gap> HELP("Display");
gap> HELP("1");
Exercise 11.2
gap> V := GF(3)^3;
( GF(3)^3 )
gap> Elements(V);
[ [ 0*Z(3), 0*Z(3), 0*Z(3) ], [ 0*Z(3), 0*Z(3), Z(3)^0 ], [ 0*Z(3), 0*Z(3), Z(3) ], [ 0*Z(3), Z(3)^0, 0*Z(3) ], 
  [ 0*Z(3), Z(3)^0, Z(3)^0 ], [ 0*Z(3), Z(3)^0, Z(3) ], [ 0*Z(3), Z(3), 0*Z(3) ], [ 0*Z(3), Z(3), Z(3)^0 ], [ 0*Z(3), Z(3), Z(3) ],
  [ Z(3)^0, 0*Z(3), 0*Z(3) ], [ Z(3)^0, 0*Z(3), Z(3)^0 ], [ Z(3)^0, 0*Z(3), Z(3) ], [ Z(3)^0, Z(3)^0, 0*Z(3) ], 
  [ Z(3)^0, Z(3)^0, Z(3)^0 ], [ Z(3)^0, Z(3)^0, Z(3) ], [ Z(3)^0, Z(3), 0*Z(3) ], [ Z(3)^0, Z(3), Z(3)^0 ], [ Z(3)^0, Z(3), Z(3) ],
  [ Z(3), 0*Z(3), 0*Z(3) ], [ Z(3), 0*Z(3), Z(3)^0 ], [ Z(3), 0*Z(3), Z(3) ], [ Z(3), Z(3)^0, 0*Z(3) ], [ Z(3), Z(3)^0, Z(3)^0 ], 
  [ Z(3), Z(3)^0, Z(3) ], [ Z(3), Z(3), 0*Z(3) ], [ Z(3), Z(3), Z(3)^0 ], [ Z(3), Z(3), Z(3) ] ]
gap> Display(Elements(V));
 . . .
 . . 1
 . . 2
 . 1 .
 . 1 1
 . 1 2
 . 2 .
 . 2 1
 . 2 2
 1 . .
 1 . 1
 1 . 2
 1 1 .
 1 1 1
 1 1 2
 1 2 .
 1 2 1
 1 2 2
 2 . .
 2 . 1
 2 . 2
 2 1 .
 2 1 1
 2 1 2
 2 2 .
 2 2 1
 2 2 2
gap> D := Subspaces(V,1);
Subspaces( ( GF(3)^3 ), 1 )
gap> e := Elements(D);
[ <vector space of dimension 1 over GF(3)>, <vector space of dimension 1 over GF(3)>, <vector space of dimension 1 over GF(3)>, 
  <vector space of dimension 1 over GF(3)>, <vector space of dimension 1 over GF(3)>, <vector space of dimension 1 over GF(3)>, 
  <vector space of dimension 1 over GF(3)>, <vector space of dimension 1 over GF(3)>, <vector space of dimension 1 over GF(3)>, 
  <vector space of dimension 1 over GF(3)>, <vector space of dimension 1 over GF(3)>, <vector space of dimension 1 over GF(3)>, 
  <vector space of dimension 1 over GF(3)> ]
gap> Display(Elements(e[1]));
 . . .
 . . 1
 . . 2
gap> Display(Elements(e[2]));
 . . .
 . 1 .
 . 2 .
gap> Display(Elements(e[3]));
 . . .
 . 1 1
 . 2 2
gap> Display(Elements(e[4]));
 . . .
 . 1 2
 . 2 1
gap> Display(Elements(e[5]));
 . . .
 1 . .
 2 . .
gap> Display(Elements(e[6]));
 . . .
 1 . 1
 2 . 2
gap> Display(Elements(e[7]));
 . . .
 1 . 2
 2 . 1
gap> Display(Elements(e[8]));
 . . .
 1 1 .
 2 2 .
gap> Display(Elements(e[9]));
 . . .
 1 1 1
 2 2 2
gap> Display(Elements(e[10]));
 . . .
 1 1 2
 2 2 1
gap> Display(Elements(e[11]));
 . . .
 1 2 .
 2 1 .
gap> Display(Elements(e[12]));
 . . .
 1 2 1
 2 1 2
gap> Display(Elements(e[13]));
 . . .
 1 2 2
 2 1 1
gap> Size(Subspaces(V,1));
13
Exercise 11.3
gap> V := GF(2)^3;
( GF(2)^3 )
gap> Size(Subspaces(V,1));
7
gap> V := GF(5)^3;
( GF(5)^3 )
gap> Size(Subspaces(V,1));
31
gap> V := GF(7)^3;
( GF(7)^3 )
gap> Size(Subspaces(V,1));
57
gap> V := GF(11)^3;
( GF(11)^3 )
gap> Size(Subspaces(V,1));
133
gap> 2^2+2+1;
7
gap> 3^2+3+1;
13
gap> 5^2+5+1;
31
gap> 7^2+7+1;
57
gap> 11^2+11+1;
133
Exercise 11.6
gap> V := GF(3)^3;
( GF(3)^3 )
gap> D := Subspaces(V,2);
Subspaces( ( GF(3)^3 ), 2 )
gap> e := Elements(D);
[ <vector space of dimension 2 over GF(3)>, <vector space of dimension 2 over GF(3)>, <vector space of dimension 2 over GF(3)>, 
  <vector space of dimension 2 over GF(3)>, <vector space of dimension 2 over GF(3)>, <vector space of dimension 2 over GF(3)>, 
  <vector space of dimension 2 over GF(3)>, <vector space of dimension 2 over GF(3)>, <vector space of dimension 2 over GF(3)>, 
  <vector space of dimension 2 over GF(3)>, <vector space of dimension 2 over GF(3)>, <vector space of dimension 2 over GF(3)>, 
  <vector space of dimension 2 over GF(3)> ]
gap> Display(Elements(e));
[ VectorSpace( GF(3), [ [ 0*Z(3), Z(3)^0, 0*Z(3) ], [ 0*Z(3), 0*Z(3), Z(3)^0 ] ] ), 
  VectorSpace( GF(3), [ [ Z(3)^0, 0*Z(3), 0*Z(3) ], [ 0*Z(3), 0*Z(3), Z(3)^0 ] ] ), 
  VectorSpace( GF(3), [ [ Z(3)^0, Z(3)^0, 0*Z(3) ], [ 0*Z(3), 0*Z(3), Z(3)^0 ] ] ), 
  VectorSpace( GF(3), [ [ Z(3)^0, Z(3), 0*Z(3) ], [ 0*Z(3), 0*Z(3), Z(3)^0 ] ] ), 
  VectorSpace( GF(3), [ [ Z(3)^0, 0*Z(3), 0*Z(3) ], [ 0*Z(3), Z(3)^0, 0*Z(3) ] ] ), 
  VectorSpace( GF(3), [ [ Z(3)^0, 0*Z(3), Z(3)^0 ], [ 0*Z(3), Z(3)^0, 0*Z(3) ] ] ), 
  VectorSpace( GF(3), [ [ Z(3)^0, 0*Z(3), Z(3) ], [ 0*Z(3), Z(3)^0, 0*Z(3) ] ] ), 
  VectorSpace( GF(3), [ [ Z(3)^0, 0*Z(3), 0*Z(3) ], [ 0*Z(3), Z(3)^0, Z(3)^0 ] ] ), 
  VectorSpace( GF(3), [ [ Z(3)^0, 0*Z(3), Z(3)^0 ], [ 0*Z(3), Z(3)^0, Z(3)^0 ] ] ), 
  VectorSpace( GF(3), [ [ Z(3)^0, 0*Z(3), Z(3) ], [ 0*Z(3), Z(3)^0, Z(3)^0 ] ] ), 
  VectorSpace( GF(3), [ [ Z(3)^0, 0*Z(3), 0*Z(3) ], [ 0*Z(3), Z(3)^0, Z(3) ] ] ), 
  VectorSpace( GF(3), [ [ Z(3)^0, 0*Z(3), Z(3)^0 ], [ 0*Z(3), Z(3)^0, Z(3) ] ] ), 
  VectorSpace( GF(3), [ [ Z(3)^0, 0*Z(3), Z(3) ], [ 0*Z(3), Z(3)^0, Z(3) ] ] ) ]
gap> Display(Elements(e[1]));
 . . .
 . . 1
 . . 2
 . 1 .
 . 1 1
 . 1 2
 . 2 .
 . 2 1
 . 2 2
gap> Display(Elements(e[2]));
 . . .
 . . 1
 . . 2
 1 . .
 1 . 1
 1 . 2
 2 . .
 2 . 1
 2 . 2
gap> Display(Elements(e[3]));
 . . .
 . . 1
 . . 2
 1 1 .
 1 1 1
 1 1 2
 2 2 .
 2 2 1
 2 2 2
gap> Display(Elements(e[7]));
 . . .
 . 1 .
 . 2 .
 1 . 2
 1 1 2
 1 2 2
 2 . 1
 2 1 1
 2 2 1
gap> Display(Elements(e[11]));
 . . .
 . 1 2
 . 2 1
 1 . .
 1 1 2
 1 2 1
 2 . .
 2 1 2
 2 2 1
gap> Display(Elements(e[13]));
 . . .
 . 1 2
 . 2 1
 1 . 2
 1 1 1
 1 2 .
 2 . 1
 2 1 .
 2 2 2
Exercise 11.7
gap> V := GF(2)^3;
( GF(2)^3 )
gap> Size(Subspaces(V,2));
7
gap> V := GF(5)^3;
( GF(5)^3 )
gap> Size(Subspaces(V,2));
31
gap> V := GF(7)^3;
( GF(7)^3 )
gap> Size(Subspaces(V,2));
57
gap> V := GF(11)^3;
( GF(11)^3 )
gap> Size(Subspaces(V,2));
133
Section 12: Finite Fields
gap> Integers mod 11;
GF(11)
gap> F:= GF(2^4);
GF(2^4)
gap> Elements(F);
[ 0*Z(2), Z(2)^0, Z(2^2), Z(2^2)^2, Z(2^4), Z(2^4)^2, Z(2^4)^3, Z(2^4)^4, Z(2^4)^6, Z(2^4)^7, Z(2^4)^8, Z(2^4)^9, Z(2^4)^11, 
  Z(2^4)^12, Z(2^4)^13, Z(2^4)^14 ]
gap> F:= GF(3^4);
GF(3^4)
gap> Elements(F);
[ 0*Z(3), Z(3)^0, Z(3), Z(3^2), Z(3^2)^2, Z(3^2)^3, Z(3^2)^5, Z(3^2)^6, Z(3^2)^7, Z(3^4), Z(3^4)^2, Z(3^4)^3, Z(3^4)^4, Z(3^4)^5, 
  Z(3^4)^6, Z(3^4)^7, Z(3^4)^8, Z(3^4)^9, Z(3^4)^11, Z(3^4)^12, Z(3^4)^13, Z(3^4)^14, Z(3^4)^15, Z(3^4)^16, Z(3^4)^17, Z(3^4)^18, 
  Z(3^4)^19, Z(3^4)^21, Z(3^4)^22, Z(3^4)^23, Z(3^4)^24, Z(3^4)^25, Z(3^4)^26, Z(3^4)^27, Z(3^4)^28, Z(3^4)^29, Z(3^4)^31, 
  Z(3^4)^32, Z(3^4)^33, Z(3^4)^34, Z(3^4)^35, Z(3^4)^36, Z(3^4)^37, Z(3^4)^38, Z(3^4)^39, Z(3^4)^41, Z(3^4)^42, Z(3^4)^43, 
  Z(3^4)^44, Z(3^4)^45, Z(3^4)^46, Z(3^4)^47, Z(3^4)^48, Z(3^4)^49, Z(3^4)^51, Z(3^4)^52, Z(3^4)^53, Z(3^4)^54, Z(3^4)^55, 
  Z(3^4)^56, Z(3^4)^57, Z(3^4)^58, Z(3^4)^59, Z(3^4)^61, Z(3^4)^62, Z(3^4)^63, Z(3^4)^64, Z(3^4)^65, Z(3^4)^66, Z(3^4)^67, 
  Z(3^4)^68, Z(3^4)^69, Z(3^4)^71, Z(3^4)^72, Z(3^4)^73, Z(3^4)^74, Z(3^4)^75, Z(3^4)^76, Z(3^4)^77, Z(3^4)^78, Z(3^4)^79 ]
gap> DegreeFFE(Z(2^4))
> ;
4
gap> DegreeFFE(Z(2^4)^3);
4
gap> DegreeFFE(Z(2^4)^5);
2
gap> x:= X(GF(2), "x");
x
gap> f:= x^4+x+1;
x^4+x+Z(2)^0
gap> IsIrreducible(f);
true
gap> F:= AlgebraicExtension(GF(2), f);
<field of size 16>
gap> Factors(F,f);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 2nd choice method found for `Factors' on 2 arguments called from
<function>( <arguments> ) 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> Factors(f,F);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 1st choice method found for `Factors' on 2 arguments called from
<function>( <arguments> ) 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> P:= PolynomialRing(F);
PolynomialRing(..., [ x_1 ])
gap> Factors(P,f);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 2nd choice method found for `Factors' on 2 arguments called from
<function>( <arguments> ) 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> Factors(f,P);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 1st choice method found for `Factors' on 2 arguments called from
<function>( <arguments> ) 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> x:= X(F, "x");
x
gap> f:= x^4+x+1;
x^4+x+!Z(2)^0
gap> Factors(P,f);
[ x+(a^2), x+(a), x+(Z(2)^0+a^2), x+(Z(2)^0+a) ]
gap> quit;



Back to Home Page
 
 

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