up previous next
NewZZmod --
create a new finite ring (integers mod N)
|
Create a new finite ring/field being the integers modulo
n;
with
use
or
::= you can alternatively write
the convenient notation
ZZ/(n).
NOTE: calling twice
NewZZmod will produce
two different rings, even with identical input: equality test is
performed on the pointers: see
RingID
.
/**/ p := NextProbPrime(1000000);
/**/ Fp := NewZZmod(p);
/**/ use Fp[x]; -- same as "use ZZ/(p)[x];"
/**/ Characteristic(Fp);
1000003
/**/ n := 6;
/**/ R := NewZZmod(n);
/**/ use R[x]; -- same as "use ZZ/(6)[x];"
/**/ product([x-i | i in 1..6]);
x^6 +3*x^5 +x^4 +3*x^3 -2*x^2
/**/ (x-3)*(x-2);
x^2 +x
|