Ask Your Question
0

Polynomial evaluation over finite fields

asked 2020-01-27 02:54:23 -0500

Stockfish3709 gravatar image

updated 2020-01-27 02:57:09 -0500

Hello, how do I make Sagemath understand that it should evaluate polynomials in a finite field?

Currently, this is how I'm declaring my polynomial ring.

R.<x>=GF(5)[]
f=x^2
f(5)
>>> 25

Am I not declaring my polynomial ring properly?

I want to make Sagemath understand that whenever it sees a variable $x$, it should treat the polynomial as one being declared over $GF(5)$. How do I make Sagamath output $f(5)=0$ instead?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2020-01-27 03:42:42 -0500

rburing gravatar image

This should work (since forever?). On 9.0:

sage: R.<x>=GF(5)[]
sage: f=x^2
sage: f(5)
0
sage: f(5).parent() is GF(5)
True

What version of SageMath are you using?

edit flag offensive delete link more

Comments

I'm using Sagemath 8.5. Perhaps that is the problem?

Stockfish3709 gravatar imageStockfish3709 ( 2020-01-27 05:13:58 -0500 )edit

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: 2020-01-27 02:54:23 -0500

Seen: 51 times

Last updated: Jan 27