Re: How to declare a finite fiel d element resulting from a Prime Power in Pari/ɢ ᴘ ?

Bill Allombert <[email protected]>
Newsgroups gmane.comp.mathematics.pari.user
Message-ID <aGfGpOuNQ9tOsn8p@seventeen>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.