[GAP Forum] How do I study fields like ZN[X}/<poly> in GAP

Sven Reichard Sven.Reichard at tu-dresden.de
Fri Jun 28 13:59:41 BST 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 27.06.2013 23:52, schrieb Sopsku:
> Dear Forum,
> 
> I am new to GAP and trying hard to come up to speed with all the
> GAP documentation.
> 
> In particular I can't figure out which functions are available to
> set up and solve the following (rather simple) problem:
> 
> Consider the a finite field over n elements over a polynomial, for
> example, the field Z_2[X]/<x^2+x+1>. Find the elements and give the
> addition and multiplication tables.
> 
> (I have no problem solving this "by hand" (or using Mathematica),
> but I can't seem  to figure how to get the job done in GAP)
> 
> Thank you for any specific solution or even pointers to the GAP
> functions that I should be using. Sopsku
> 


Dear Sopsku,

here's one possibility. Probably there are more elegant ways.

gap> x := Indeterminate(GF(2), "x");
x
gap> r := PolynomialRing(GF(2));
GF(2)[x]
gap> p := x^2+x+1;
x^2+x+Z(2)^0
gap> i := Ideal(r, [p]);
<two-sided ideal in GF(2)[x], (1 generators)>
gap> quotient := r/i;
<ring GF(2),(1),(x)>
gap> Size(last);
4
gap> # addition table
gap> PrintArray(List(quotient, x -> List(quotient, y -> x+y)));
[ [    0*(1),      (x),      (1),  (1)+(x) ],
  [      (x),    0*(1),  (1)+(x),      (1) ],
  [      (1),  (1)+(x),    0*(1),      (x) ],
  [  (1)+(x),      (1),      (x),    0*(1) ] ]
gap> # multiplication table
gap> PrintArray(List(quotient, x -> List(quotient, y -> x*y)));
[ [    0*(1),    0*(1),    0*(1),    0*(1) ],
  [    0*(1),  (1)+(x),      (x),      (1) ],
  [    0*(1),      (x),      (1),  (1)+(x) ],
  [    0*(1),      (1),  (1)+(x),      (x) ] ]

Cheers,

Sven Reichard.
- --
Institut für Algebra
TU Dresden

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEVAwUBUc2IvWFjB3Gki4XVAQKvVAf+MHPvsJ8Emavx2AObOlUiEFW7icsjU+gw
UwNGF8W6dU9P8emlRTn4EKweeuvZngET19Q4JhDw+AeAXfaRtG67ZMTBB7grvtlL
Fsx6pmT/QJ+iG2AjYD4wzJlxic+HqQOenrRyQmePXPFLpq6UXI8eKNaaD4cz5Fx3
ixl8H61iTzceD0PiUg1renFEQOO4TWS83WC22MRfU837Pb240V2dMXluIC8r8v++
iVcOLAQY+r+mowQHh4RaeOmzyzVT7UB1lPt1lPhFPtAkyIcbfr66LnD8Bs/7nxnt
EF80eA2G2uemNdx/RFEhwXbdMGHd4omac3kQjBbXm02REDZyCOLfpQ==
=UTEw
-----END PGP SIGNATURE-----



More information about the Forum mailing list