# Extension field arithmetic This post is a wiki. Anyone with karma >750 is welcome to improve it.

code:

p=(2^3)  ; extension field over(2^3)
F.<a>=GF(2^3);F.modulus();#F third degree irreducible polynomial (x^3+x+1)
R.<x>=F[];#R generate extension field (2^3)^2
K.<b>=F.extension(x^2+(a^2+a+1)*x+a^2); second degree irreducible polynomial over (2^3)^2
R.<z>=PolynomialRing(K) ;

f3=  z + (a^2 + 1)*b + a + 1; polynomial obtained after execution of program
from the above polynomial i want to separate out terms (a^2+1) which is attached with b and (a+1)
as i want my result in following manner ***(a+1 , a^2+1)***.


Thanks

edit retag close merge delete

Sort by » oldest newest most voted

You can recover the coefficients as follows:

sage: f3.coefficients(sparse=False)
[(a^2 + 1)*b + a + 1, 1]
sage: c = f3.coefficients(sparse=False)
sage: c.parent()
Univariate Quotient Polynomial Ring in b over Finite Field in a of size 2^3 with modulus b^2 + (a^2 + a + 1)*b + a^2
sage: c.lift().parent()
Univariate Polynomial Ring in b over Finite Field in a of size 2^3
sage: c.lift()
(a^2 + 1)*b + a + 1
sage: c.lift().coefficients(sparse=False)
[a + 1, a^2 + 1]

more