Question: Polynomials over Galois Fields

Hi!

I want to work with polynomials over galois fields (finite fields). Useing the standard operations for galois fields from the GF package gets really unreadable for lenghly polynomials, so i am looking for something more legible. I think the nicest way would be to define polynomials in a standard way, e.g. y:= x_1+x_2^2 and than later on decide that x_1 and x_2 are elements from a finite field. However i found no way to do this.

But there should be at least two ways to make the polynomials more legible:

(1) The maple 11 help on "GF" has an example with the uses statement:

G16 := GF(2,4,alpha^4+alpha+1):
a := G16:-ConvertIn(alpha);
x := G16:-`^`(a,8);
use G16 in
y := a * ( a + x );
z := a - y;
z^3 + y^2
end use;

However, the use statement returns the error "Error, invalid terms in sum".

(2) From a blog entry here i got the idea it could be done like that:

GFM := proc (G)
global `&+`, `&*`, `&^`, `&-`;
`&+` := proc (a, b) -> G[`+`](a, b) end proc;
`&*` := proc (a, b) -> G[`*`](a, b) end proc;
`&^` := proc (a, b) -> G[`^`](a, b) end proc;
`&-` := proc (a, b) -> G[`-`](a, b) end proc;
NULL end proc

K := GF(2, 8, T^8+T^7+T^6+T^3+T^2+T+1)
GFM(K);
x_1 := K:-input(42);
x_2 := K:-input(13);
y := x_1&- x_2;

That works but i would still have to use '&+' instead of '+' and have to define the x_i before useing them.

Any suggestions or hints?

Thanks, Christian

Please Wait...