composition of two polynomials for sage program

asked 2023-01-24 10:36:28 +0100

I need to find composition of two polynomials under extension of Galois finite field.

edit retag flag offensive close merge delete

Comments

A specific example could be helpful...

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2023-01-24 10:52:46 +0100 )edit

Did you mean

P.<x>=QQ[]
p=x^3+1
q=x^2+3
p(x=q)

x^6 + 9*x^4 + 27*x^2 + 28
achrzesz gravatar imageachrzesz ( 2023-01-24 12:25:54 +0100 )edit

Composition of two polynomials in finite field using sage program

srgopalmath gravatar imagesrgopalmath ( 2023-02-03 12:44:20 +0100 )edit

Sorry, my misinterpretation

achrzesz gravatar imageachrzesz ( 2023-02-04 23:34:39 +0100 )edit

Some ugly workaround (subs works in GF(2)[])

P.<x>=GF(2)[]
p=x^3+1
q=x^2+1
p1=p(x=q); p1

x^6 + x^4 + x^2

Now the result in GF(2^4)

k.<y>=GF(2^4)
k(p1.change_variable_name(y))

y^3 + y + 1

Check:

(y^2+1)^3+1

y^3 + y + 1
achrzesz gravatar imageachrzesz ( 2023-02-05 00:13:47 +0100 )edit