Ask Your Question
0

Changing from PolynomialRing to LaurentPolynomialRing and maybe back

asked 2022-05-19 14:11:17 +0200

schwabis gravatar image

Hej,

I am doing some calculations in a Polynomial Ring R<x,y,z> over a finite field GF(p). With the results from that calculation, I would like to do calculations for which I need a Laurent polynomials over the same finite field, how do I do that in SageMath?

R=PolynomialRing(GF(field),x,num_var, order='degrevlex')
d=f(x,y,z)
Change to LaurentPolynomialRing
 Do so more calculations with results d

Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2022-05-19 15:40:55 +0200

FrédéricC gravatar image

Like this

sage: L = LaurentPolynomialRing(GF(3),x,2, order='degrevlex')
sage: R = L.polynomial_ring()
sage: x = R.gens()
sage: x[0] + 1
x0 + 1
sage: L(_)
x0 + 1
sage: parent(_)
Multivariate Laurent Polynomial Ring in x0, x1 over Finite Field of size 3
edit flag offensive delete link more

Comments

L = LaurentPolynomialRing(GF(11),x,2, order='degrevlex') R = L.polynomial_ring() x = R.gens() f=x[0]**2+1 L(f) print(f.parent())

returns: Multivariate Polynomial Ring in x0, x1 over Finite Field of size 11

In the console, the thing you suggest works

schwabis gravatar imageschwabis ( 2022-05-19 16:27:23 +0200 )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: 2022-05-19 14:11:17 +0200

Seen: 124 times

Last updated: May 19 '22