Bill Allombert on Fri, 04 Jul 2025 14:18:47 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: How to declare a finite field element resulting from a Prime Power in Pari/ɢᴘ ? |
On Fri, Jul 04, 2025 at 12:38:49PM +0200, Laël Cellier wrote: > Let’s talk first about the equivalent SageMath code : I’ve a finite field > declared as ff= GF(q) where q is the prime power of degree 12. > > Given a finite field element that SageMath printf as |0*z12^11 + 0*z12^10 + > 16260673061341949275257563295988632869519996389676903622179081103440260644990*z12^9 > + 0*z12^8 + 0*z12^7 + 0*z12^6 + 0*z12^5 + 0*z12^4 + > 11559732032986387107991004021392285783925812861821192530917403151452391805634*z12^3 > + 0*z12^2 + 0*z12 + 0, how to set a variable belonging to ff to such static > value in Pari/ɢᴘ ? You need to find the minimal polynomial P of z12 in SageMath and the characteristic p. Then do in GP z12 = ffgen(P*Mod(1,p),'z12); Then you can do a = 0*z12^11 + 0*z12^10 + 16260673061341949275257563295988632869519996389676903622179081103440260644990*z12^9 + 0*z12^8 + 0*z12^7 + 0*z12^6 + 0*z12^5 + 0*z12^4 + 11559732032986387107991004021392285783925812861821192530917403151452391805634*z12^3 + 0*z12^2 + 0*z12 + 0; to define a. > Since finite field elements in such cases are polynomes…| No they are not, they are only displayed as a polynomial expression in the generator. Cheers, Bill