PREP - Professional Enhancement Programs of the MAA



 

Incorporating the Software GAP into Teaching Abstract Algebra

A PREP Workshop

GAP log - Thursday July 13, 2:00 pm - 4:00 pm

Section 14, continued
gap> DegreeFFE(Z(2^4)^1); DegreeFFE(Z(2^4)^2); DegreeFFE(Z(2^4)^3);
4
4
4
gap> DegreeFFE(Z(2^4)^4); DegreeFFE(Z(2^4)^5); DegreeFFE(Z(2^4)^6);
4
2
4
gap> DegreeFFE(Z(2^4)^7); DegreeFFE(Z(2^4)^8); DegreeFFE(Z(2^4)^9);
4
4
4
gap> DegreeFFE(Z(2^4)^10);
2
gap> Order(Z(2^4)^1); Order(Z(2^4)^2); Order(Z(2^4)^3);
15
15
5
gap> Order(Z(2^4)^4); Order(Z(2^4)^5); Order(Z(2^4)^6);
15
3
5
gap> Order(Z(2^4)^7); Order(Z(2^4)^8); Order(Z(2^4)^9);
15
15
5
gap> Order(Z(2^4)^10);
3
gap> x:= X(GF(3),"x");
x
gap> Factors(x^(3^2)-x);
[ x, x+Z(3)^0, x-Z(3)^0, x^2+Z(3)^0, x^2+x-Z(3)^0, x^2-x-Z(3)^0 ]
gap> Factors(x^(3^3)-x);
[ x, x+Z(3)^0, x-Z(3)^0, x^3-x+Z(3)^0, x^3-x-Z(3)^0, x^3+x^2-Z(3)^0, 
  x^3+x^2+x-Z(3)^0, x^3+x^2-x+Z(3)^0, x^3-x^2+Z(3)^0, x^3-x^2+x+Z(3)^0, 
  x^3-x^2-x-Z(3)^0 ]
gap> Factors(x^(3^4)-x);
[ x, x+Z(3)^0, x-Z(3)^0, x^2+Z(3)^0, x^2+x-Z(3)^0, x^2-x-Z(3)^0, x^4+x-Z(3)^0, 
  x^4-x-Z(3)^0, x^4+x^2-Z(3)^0, x^4+x^2+x+Z(3)^0, x^4+x^2-x+Z(3)^0, x^4-x^2-Z(3)^0, 
  x^4+x^3-Z(3)^0, x^4+x^3-x+Z(3)^0, x^4+x^3+x^2+Z(3)^0, x^4+x^3+x^2+x+Z(3)^0, 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^0, x^3-x^2+x+Z(5), x^3-x^2-x+Z(5), 
  x^3-x^2-x-Z(5)^0, x^3-x^2+Z(5)^3*x+Z(5)^0, x^3-x^2+Z(5)^3*x-Z(5)^0, 
  x^3+Z(5)^3*x^2+Z(5), x^3+Z(5)^3*x^2-Z(5)^0, x^3+Z(5)^3*x^2+x+Z(5)^0, 
  x^3+Z(5)^3*x^2+x+Z(5), x^3+Z(5)^3*x^2+Z(5)*x+Z(5), x^3+Z(5)^3*x^2+Z(5)*x+Z(5)^3, 
  x^3+Z(5)^3*x^2-x+Z(5)^0, x^3+Z(5)^3*x^2-x+Z(5)^3 ]
gap> x:= X(GF(2),"x");
x
gap> IsIrreducible(x^5+x^4+x+1);
false
gap> IsIrreducible(x^5+x+1);
false
gap> IsIrreducible(x^5+x^2+1);
true
gap> F:= AlgebraicExtension(GF(2), x^5+x^2+1);

Project by Bill and Edward
gap> g:= GL(3, GF(2));
SL(3,2)
gap> g:= GL(3, GF(2));
SL(3,2)
gap> Order(g);
168
gap> SylowSubgroup(g, 2);

gap> h:=SylowSubgroup(g, 2);

gap> ConjugateSubgroups(g,h);
[ , , 
  , , 
  , , 
  , , 
  , , 
  , , 
  , , 
  , , 
  , , 
  , , 
   ]
gap> Size(ConjugateSubgroups(g,h));
21
gap> Read("AMSylow.txt");
gap> Sylow(168,2);
[ 1, 3, 7, 21 ]
gap> Factors(168);
[ 2, 2, 2, 3, 7 ]
gap> Sylow(168,3);
[ 1, 4, 7, 28 ]
gap> Sylow(168,7);
[ 1, 8 ]
gap> Factors(84);
[ 2, 2, 3, 7 ]
gap> Sylow(84,2); Sylow(84,3); Sylow(84,7);
[ 1, 3, 7, 21 ]
[ 1, 4, 7, 28 ]
[ 1 ]
gap> m:= MagmaByMultiplication([[1,2], [2,1]]);
Variable: 'MagmaByMultiplication' must have a value

gap> m:= MagmaByMultiplicationTable([[1,2], [2,1]]);

gap> Read("Assoc");
Error, file "Assoc" must exist and be readable 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> Read("Assoc.txt");
gap> Print("Assoc.txt");
Assoc.txtgap> Print(Assoc);
function ( m )
    local  x, y, z;
    for x  in Elements( m )  do
        for y  in Elements( m )  do
            for z  in Elements( m )  do
                Print( x, "* (", y, "*", z, ") = (", x, "*", y, ") *", z, "\n" );
                Print( x * (y * z) = x * y * z, "\n" );
            od;
        od;
    od;
    return;
endgap> Assoc(g);
[ [ 0*Z(2), 0*Z(2), Z(2)^0 ], [ 0*Z(2), Z(2)^0, 0*Z(2) ], [ Z(2)^0, 0*Z(2), 0*Z(2) ] ]* (
[ [ 0*Z(2), 0*Z(2), Z(2)^0 ], [ 0*Z(2), Z(2)^0, 0*Z(2) ], [ Z(2)^0, 0*Z(2), 0*Z(2) ] ]*
[ [ 0*Z(2), 0*Z(2), Z(2)^0 ], [ 0*Z(2), Z(2)^0, 0*Z(2) ], [ Z(2)^0, 0*Z(2), 0*Z(2) ] ]) = (
[ [ 0*Z(2), 0*Z(2), Z(2)^0 ], [ 0*Z(2), Z(2)^0, 0*Z(2) ], [ Z(2)^0, 0*Z(2), 0*Z(2) ] ]*
[ [ 0*Z(2), 0*Z(2), Z(2)^0 ], [ 0*Z(2), Z(2)^0, 0*Z(2) ], [ Z(2)^0, 0*Z(2), 0*Z(2) ] ]) *
[ [ 0*Z(2), 0*Z(2), Z(2)^0 ], [ 0*Z(2), Z(2)^0, 0*Z(2) ], [ Z(2)^0, 0*Z(2), 0*Z(2) ] ]
true
...
(
[ [ 0*Z(2), 0*Z(2), Z(2)^0 ], [ 0*Z(2), Z(2)^0, 0*Z(2) ], [ Z(2)^0, 0*Z(2), 0*Z(2) ] ]*
[ [ 0*Z(2), 0*Z(2), Z(2)^0 ], [ 0*Z(2), Z(2)^0, 0*Z(2) ], [ Z(2)^0, Z(2)^0, 0*Z(2) ] ]) *
[ [ 0*Z(2), 0*Z(2), Z(2)^0 ], [ Z(2)^0, Z(2)^0, Z(2)^0 ], [ 0*Z(2), Z(2)^0, 0*Z(2) ] ]
true
[ [ 0*Z(2), 0*Z(2), Z(2)^0 ], [ 0*Z(2), Z(2)^0, 0*Z(2) ], [ Z(2)^0, 0*Z(2), 0*Z(2) ] ]* (
user interrupt at
Print( "\<,\< \>\>" );
 called from
Print( x, "* (", y, "*", z, ") = (", x, "*", y, ") *", z, "\n" ); 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;
[ [ 0*Z(2), 0*Z(2), Z(2)^0 ], [ 0*Z(2)gap> Assoc(m);
m1* (m1*m1) = (m1*m1) *m1
        true
        m1* (m1*m2) = (m1*m1) *m2
        true
        m1* (m2*m1) = (m1*m2) *m1
        true
        m1* (m2*m2) = (m1*m2) *m2
        true
        m2* (m1*m1) = (m2*m1) *m1
        true
        m2* (m1*m2) = (m2*m1) *m2
        true
        m2* (m2*m1) = (m2*m2) *m1
        true
        m2* (m2*m2) = (m2*m2) *m2
        true
        gap> Read("Ident.txt");
gap> Print(Ident);
function ( n )
            local  x, y, l;
            l := [  ];
            for x  in Elements( n )  do
                for y  in Elements( n )  do
                    if x * y = y  then
                        Add( l, y );
                    fi;
                    Print( x, "*", y, "=", x * y, "\n" );
                od;
                if Elements( l ) = Elements( n )  then
                    Print( x, " is an identity", "\n" );
                else
                    Print( x, " is not an identity", "\n" );
                fi;
                l := [  ];
            od;
            return;
        endgap> Ident(m);
m1*m1=m1
        m1*m2=m2
        m1 is an identity
        m2*m1=m2
        m2*m2=m1
        m2 is not an identity
        gap> Read("Inver.txt");
gap> Print(Inver);
function ( m, e )
            local  x, y, k;
            k := MagmaElement( m, e );
            for x  in Elements( m )  do
                for y  in Elements( m )  do
                    if x * y = k  then
                        Print( "The inverse to ", x, " is ", y, " since ", x, " * ", y, " = ", k, "\n" );
                    fi;
                od;
            od;
            return;
        endgap> Inver(m,1);
The inverse to m1 is m1 since m1 * m1 = m1
        The inverse to m2 is m2 since m2 * m2 = m1
        gap> IsGroup(m);
false
        gap> AsGroup(m);

        gap> j:=AsGroup(m);

        gap> IsGroup(j);
true
        gap> Read("Movement.txt");
gap> Movement((1,2,3), 2);
(1,2,3) sends 1 to 2
        (1,2,3) sends 2 to 3
        gap> Movement((1,3)(4,6,8), 3);
(1,3)(4,6,8) sends 1 to 3
        (1,3)(4,6,8) sends 2 to 2
        (1,3)(4,6,8) sends 3 to 1
        gap> Movement((1,3)(4,6,8), 9);
(1,3)(4,6,8) sends 1 to 3
        (1,3)(4,6,8) sends 2 to 2
        (1,3)(4,6,8) sends 3 to 1
        (1,3)(4,6,8) sends 4 to 6
        (1,3)(4,6,8) sends 5 to 5
        (1,3)(4,6,8) sends 6 to 8
        (1,3)(4,6,8) sends 7 to 7
        (1,3)(4,6,8) sends 8 to 4
        (1,3)(4,6,8) sends 9 to 9
        gap> Movement((1,3,4), 5);
(1,3,4) sends 1 to 3
        (1,3,4) sends 2 to 2
        (1,3,4) sends 3 to 4
        (1,3,4) sends 4 to 1
        (1,3,4) sends 5 to 5
        gap> Movement((1,2,4), 5);
(1,2,4) sends 1 to 2
        (1,2,4) sends 2 to 4
        (1,2,4) sends 3 to 3
        (1,2,4) sends 4 to 1
        (1,2,4) sends 5 to 5
        gap> Movement((3,2,4), 5);
(2,4,3) sends 1 to 1
        (2,4,3) sends 2 to 4
        (2,4,3) sends 3 to 2
        (2,4,3) sends 4 to 3
        (2,4,3) sends 5 to 5
        gap> Read("CountMovement");
Error, file "CountMovement" must exist and be readable 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> Read("CountMovement.txt");
gap> Print(CountMovement);
function ( s, n )
            local  x, y, x1, y1, i;
            i := 0;
            for x  in Elements( [ 1 .. n ] )  do
                for y  in Elements( [ x + 1 .. n ] )  do
                    x1 := x ^ s;
                    y1 := y ^ s;
                    Print( x, y, x ^ s, y ^ s, "\n" );
                    if y1 < x1  then
                        i := i + 1;
                    fi;
                od;
            od;
            Print( s, " switches ", i, " pairs ", "\n" );
            return;
        endgap> CountMovement((1,3,4),5);
1232
        1334
        1431
        1535
        2324
        2421
        2525
        3441
        3545
        4515
        (1,3,4) switches 4 pairs 
        gap> CountMovement((1,2,4),5);
1224
        1323
        1421
        1525
        2343
        2441
        2545
        3431
        3535
        4515
        (1,2,4) switches 4 pairs 
        gap> CountMovement((1,2,3),5);
1223
        1321
        1424
        1525
        2331
        2434
        2535
        3414
        3515
        4545
        (1,2,3) switches 2 pairs 
        gap> CountMovement((4,2,3),5);
1213
        1314
        1412
        1515
        2334
        2432
        2535
        3442
        3545
        4525
        (2,3,4) switches 2 pairs 
        gap> CountMovement;
function( s, n ) ... end
        
Project by Chiru and Jen
gap> List(AllSmallGroups(16), StructureDescription); 
[ "C16", "C4 x C4", "(C4 x C2) : C2", "C4 : C4", "C8 x C2", "C8 : C2", "D16", "QD16", "Q16", "C4 x C2 x C2", "C2 x D8", 
          "C2 x Q8", "(C4 x C2) : C2", "C2 x C2 x C2 x C2" ]
        gap> G:=AllSmallGroups(16)[1]; 

        gap> elts:=Elements(G);
[  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> G;

        gap> MinimalGeneratingSet(G); 
[ f1 ]
        gap> H:=Subgroup(G,[elts[2]]);
Group([ f1 ])
        gap> H=G;
true
        gap> c16:=[]; 
[  ]
        gap> for i in [1..16] do
> x:=Factorization(H,elts[i]);
> Append(c16,[x]);
> od;
gap> c16;
[ , x1, x1^2, x1^4, x1^8, x1^3, x1^5, x1^-7, x1^6, x1^-6, x1^-4, x1^7, x1^-5, x1^-3, x1^-2, x1^-1 ]
        gap> list1:=[1,2,3,4,5,6];
[ 1, 2, 3, 4, 5, 6 ]
        gap> D:=[];DInv:=[]; 
[  ]
        [  ]
        gap> for i in [1..6] do
> x:=c16[list1[i]];
> Append(D,[x]);
> do;
Syntax error: od expected
do;
 ^
gap> for i in [1..6] do
> x:=c16[list1[i]];
> Append(D,[x]);
> od;
gap> D;
[ , x1, x1^2, x1^4, x1^8, x1^3 ]
        gap> for i in [1..6] do
> y:=Inverse(D[i]);
> Append(DInv,[y]);
> od;
gap> DInv;
[ , x1^-1, x1^-2, x1^-4, x1^-8, x1^-3 ]
        gap> S:=[];
[  ]
        gap> for i in [1..6] do
> for j in [1..6] do
> z:=D[i]*DInv[j];
> Append(S,[z]);
> od;
> od;
gap> Size(S);
36
        gap> Elements(S);
[ , x1^-1, x1, x1^-2, x1^2, x1^-3, x1^3, x1^-4, x1^4, x1^-5, x1^5, x1^-6, x1^6, x1^-7, x1^7, x1^-8, x1^8 ]
        gap> S;
[ , x1^-1, x1^-2, x1^-4, x1^-8, x1^-3, x1, , x1^-1, x1^-3, x1^-7, x1^-2, x1^2, x1, 
          , x1^-2, x1^-6, x1^-1, x1^4, x1^3, x1^2, , x1^-4, x1, x1^8, x1^7, x1^6, x1^4, 
          , x1^5, x1^3, x1^2, x1, x1^-1, x1^-5,  ]
        gap>
Back to Home Page
 
 

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

<\body>