Processing math: 100%
Ask Your Question
2

Polynomial Substitution for only higher terms

asked 3 years ago

RKnebel gravatar image

updated 3 years ago

FrédéricC gravatar image

I'm dealing with elliptic curves in SAGE. Say the elliptic curve I have is y2=x3+x working over GF(43) and I have a polynomial expression in x and y: y2+xy+1. I want to be able to substitute y2=x3+x to get (x3+x)+xy+1. How do I do this?

Preview: (hide)

Comments

n is missing in polyomial

ortollj gravatar imageortollj ( 3 years ago )

2 Answers

Sort by » oldest newest most voted
3

answered 3 years ago

rburing gravatar image

What you can do is choose a monomial ordering on the polynomial ring such that y is the largest variable, so that in the multivariate division algorithm computing the remainder after division by y2(x3+x) will amount to substituting y2=x3+x:

sage: R.<x,y> = PolynomialRing(GF(43), order='invlex')
sage: (y^2 + x*y + 1).reduce([y^2 - (x^3 + x)])
x*y + x^3 + x + 1

Here you could also choose e.g. R.<y,x> = PolynomialRing(GF(43), order='lex').

Preview: (hide)
link

Comments

This works in this example, however I am also dealing with expressions of the form p(x)y2+q(x) where p,q are polynomials of large degree. Implementing the above does the opposite; it takes the large powers of x and replaces them with y

RKnebel gravatar imageRKnebel ( 3 years ago )
1

answered 3 years ago

Max Alekseyev gravatar image

updated 3 years ago

If your polynomial is assumed to be zero, then it is also possible to entirely eliminate y by computing resultant of your polynomial and y2(x3+x) with respect to y:

sage: R.<x,y> = PolynomialRing(GF(43))                                                                                                                                                                                 
sage: (y^2+x*y+1).resultant(y^2-(x^3+x),y)                                                                                                                                                                         
x^6 - x^5 + 2*x^4 + x^3 + x^2 + 2*x + 1
Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 3 years ago

Seen: 376 times

Last updated: Sep 25 '21