Ask Your Question
0

Polynomial evaluation over finite fields

asked 2020-01-27 09:54:23 +0100

Stockfish3709 gravatar image

updated 2020-01-27 09:57:09 +0100

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 10:42:42 +0100

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 12:13:58 +0100 )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 09:54:23 +0100

Seen: 722 times

Last updated: Jan 27 '20