Bill Allombert on Tue, 22 Jan 2019 23:38:25 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

new GP function ffmaprel


Dear PARI developers,

I have added a new gp function for expressing a finite field elements as
an algebraic element over an a subfield.

This is useful to compute the relative trace, norm and and minimal polynomial.

ffmaprel is normally used with a partial map obtained by ffinvmap:

? a=ffgen(3^3,'a);
? b=ffgen(3^12,'b);
? m=ffembed(a,b);
? mi=ffinvmap(m);
? c=random(b); \\ absolute expression of c over F_3
%5 = b^9+2*b^8+2*b^7+2*b^6+2*b^5+2*b^4+2*b^3+b^2+b+2
? d=ffmaprel(mi,c) \\ relative expression of c over F_3^3
%6 =
Mod((a^2+a+2)*b^3+(2*a^2+1)*b^2+2*b+(a^2+a+2),b^4+(2*a+1)*b^3+b^2+(a^2+2*a)*b+(2*a^2+2*a+2))
? trace(d)) \\  trace of c over F_3^3
%9 = a+1
? ffmap(mi,c+c^27+c^(27^2)+c^(27^3))
%10 = a+1
? norm(d) \\ norm of c over F_3^3
%11 = a+1
? ffmap(mi,c*c^27*c^(27^2)*c^(27^3))
%12 = a+1
? minpoly(d) \\ minomial polynomial of c over F_3^3
%13 = x^4+(2*a+2)*x^3+2*a^2*x^2+(a^2+a+1)*x+(a+1)
? ffmap(mi,(x-c)*(x-c^27)*(x-c^(27^2))*(x-c^(27^3)))
%14 = x^4+(2*a+2)*x^3+2*a^2*x^2+(a^2+a+1)*x+(a+1)

Cheers,
Bill