
gap> z:= Z(7);
Z(7)
gap> R:= Ring([z] );
GF(7)
gap> Elements(R);
[ 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> 5*Z(7);
Z(7)^0
gap> 5*One(R);
Z(7)^5
gap> Int(Z(7)^5);
5
gap> y:= 6;
6
gap> y;
6
gap> T:= Integers mod 7;
GF(7)
gap> Elements(T);
[ 0*Z(7), Z(7)^0, Z(7), Z(7)^2, Z(7)^3, Z(7)^4, Z(7)^5 ]
gap> T:= Integers mod 8;
(Integers mod 8)
gap> Elements(T);
[ 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> z:= Z(3);
Z(3)
gap> Elements(Z(3));
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 1st choice method found for `AsSSortedList' on 1 arguments called from
AsSSortedList( coll ) 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> gap> R:= Ring([z] );
GF(3)
gap> Elements(R);
[ 0*Z(3), Z(3)^0, Z(3) ]
gap> z^2 + z^2;
Z(3)
gap> z^2 + (z^0)^2;
Z(3)
gap> (z^0)^2 + (z^0)^2;
Z(3)
gap> Read("intror");
gap> intror(3);
false
gap> intror(5);
true
gap> intror(7);
false
gap> intror(11);
false
gap> intror(17);
true
gap> intror(23);
false
gap> intror(29);
true
gap> intror(31);
false
gap> M:= Integers mod 6;
(Integers mod 6)
gap> Idempotents(M);
[ ZmodnZObj( 0, 6 ), ZmodnZObj( 1, 6 ), ZmodnZObj( 3, 6 ), ZmodnZObj( 4, 6 ) ]
gap> Read("nilpotentCount");
gap> nilpotentCount(M);
1
gap> Size(Idempotents(Integers mod 3));
2
gap> Size(Idempotents(Integers mod 9));
2
gap> Size(Idempotents(Integers mod 27));
2
gap> Size(Idempotents(Integers mod 2));
2
gap> Size(Idempotents(Integers mod 4));
2
gap> Size(Idempotents(Integers mod 8));
2
gap> Size(Idempotents(Integers mod 6));
4
gap> Size(Idempotents(Integers mod 15));
4
gap> Size(Idempotents(Integers mod (2*3*5)));
8
gap> Size(Idempotents(Integers mod (2^3*3*5)));
8
gap>
gap> nilpotentCount(Integers mod 3);
1
gap> nilpotentCount(Integers mod 3^2);
3
gap> Size(Elements(Units(Integers mod 6)));
2
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> h(2);
ZmodnZObj( 4, 10 )
gap> f(2);
<func> must be a function (not a object (component))
gap> h := x -> e[4]*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> h := x -> e[5]*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> h := x -> e[7]*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[8]*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> h := x -> e[9]*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> h := x -> e[10]*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> S := Integers mod 15;
(Integers mod 15)
gap> e2 := Elements(S);
[ ZmodnZObj( 0, 15 ), ZmodnZObj( 1, 15 ), ZmodnZObj( 2, 15 ), ZmodnZObj( 3, 15 ), ZmodnZObj( 4, 15 ), ZmodnZObj( 5, 15 ),
ZmodnZObj( 6, 15 ), ZmodnZObj( 7, 15 ), ZmodnZObj( 8, 15 ), ZmodnZObj( 9, 15 ), ZmodnZObj( 10, 15 ), ZmodnZObj( 11, 15 ),
ZmodnZObj( 12, 15 ), ZmodnZObj( 13, 15 ), ZmodnZObj( 14, 15 ) ]
gap> h2 := x -> e[6]*x;
function( x ) ... end
gap> f2 := MappingByFunction(R,S,h2);
MappingByFunction( (Integers mod 10), (Integers mod 15), function( x ) ... end )
gap> IsRingHomomorphism(f);
false
gap> h2 := x -> e[6]*x;
function( x ) ... end
gap> h2 := x -> e2[6]*x;
function( x ) ... end
gap> f2 := MappingByFunction(R,S,h2);
MappingByFunction( (Integers mod 10), (Integers mod 15), function( x ) ... end )
gap> IsRingHomomorphism(f);
false
gap> IsRingHomomorphism(f2);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 1st choice method found for `PROD' on 2 arguments called from
<compiled or corrupted call value> called from
map!.fun( elm ) called from
ImagesElm( map, elm ) called from
Enumerator( map ) 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> gap> h2 := x -> e[6]*x;
function( x ) ... end
gap> f2 := MappingByFunction(R,S,h2);
MappingByFunction( (Integers mod 10), (Integers mod 15), function( x ) ... end )
gap> IsRingHomomorphism(f2);
false
gap> LogTo();
Back to Home Page
This PREP workshop is made possible by the NSF grant DUE: 0089005