1

Simple question.

in order to declare a regular $\mathbb F_p^2$ finite field, one can do something GF(7^2) but how to declare a finite field like $\mathbb F_p^2=\mathbb F_p[x]$ ÷ ($x^2$ + 1) relative to the characteristic $p$ in SageMath ?

user2284570
  • 324
  • 4
  • 19

1 Answers1

3

If I understand you want to be able to specify the irreducible polynomial of degree 2 over $\mathbb{F}_p$, you can do this:

K = GF(7)
R.<x> = K[]
K2.<a> = K.extension(x^2+1)

where the trick is $x$ has to be in the 'ring' of the base field.