Ask Your Question
0

How do I declare a static finite field Element when modulus is a prime power ?

asked 2025-07-05 02:15:43 +0200

user2284570 gravatar image

updated 2025-07-05 02:18:24 +0200

Simple question :

if I declare FF=GF(q) where q is a prime power of degree 12. And any of it’s element will be writen as a series of Integer*z12^degree+…

So now how to set a variable X belonging to FF to 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 ?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2025-07-05 09:05:33 +0200

rburing gravatar image

Simple answer:

Once you have z12 assigned to a variable you can use it directly:

sage: X = 16260673061341949275257563295988632869519996389676903622179081103440260644990*z12^9 + 11559732032986387107991004021392285783925812861821192530917403151452391805634*z12^3

To obtain the generator z12 of the finite field GF(q) you have basically two options.

The first option is to define the field and its generator at the same time instead: FF.<z12> = GF(q).

The second option is to retrieve z12 = FF.gen() after defining FF = GF(q).

These options are equivalent; the first is a SageMath-specific shorthand syntax, the second is standard Python.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2025-07-05 02:15:43 +0200

Seen: 26 times

Last updated: Jul 05