Using WeierstrassForm_P2_112 and WeierstrassMap_P2_112
Here is my code to transform elliptic curve in quartic form to Weierstrass form using WeierstrassForm_P2_112 and WeierstrassMap_P2_112.
We get Weierstrass form along with the substitutions used for transformation back to quartic.
How to compute inverse transformation?
I can not find anything in the documentation of WeierstrassForm_P2_112 or WeierstrassMap_P2_112.
Is the inverse transformation for this case implemented in Sage? - If not, why?
Isn't only one way transformation useless if I can not transform points found on Weierstrass form to points on original quartic form?
Input:
from sage.schemes.toric.weierstrass import WeierstrassForm_P2_112
from sage.schemes.toric.weierstrass_covering import WeierstrassMap_P2_112
R.<x,y> = QQ[]
f="y^2-(2*x^4+3*x^3+5*x^2+7*x+6)"
print "Elliptic curve in quartic form:",f,"\n"
f=R(f)
a,b=WeierstrassForm_P2_112(f, [x,y])
print "Coefficients of Weierstrass form:",(a,b),"\n"
print "Elliptic curve in Weierstrass form:","Y^2-(X^3 + %s*X*Z^4 + %s*Z^6)" % (a,b),"\n"
X,Y,Z=WeierstrassMap_P2_112(f, [x,y])
print "Transformation: (X,Y,Z) =",(X,Y,Z),"\n"
print "Verifying transformation:"
print "Does the quartic form divide the Weierstrass form after transformation? Answer:",f.divides(-Y^2 + X^3 + a*X*Z^4 + b*Z^6)
Output:
Elliptic curve in quartic form: y^2-(2*x^4+3*x^3+5*x^2+7*x+6)
Coefficients of Weierstrass form: (-106/3, -911/27)
Elliptic curve in Weierstrass form: Y^2-(X^3 + -106/3*X*Z^4 + -911/27*Z^6)
Transformation: (X,Y,Z) = (-53/12*x^4 - 23*x^3 - 301/6*x^2 - 73/3*x - 31/4, 131/8*x^6 + 313/4*x^5 + 355/8*x^4 - 110*x^3 - 2295/8*x^2 - 1049/4*x - 367/8, y)
Verifying transformation:
Does the quartic form divide the Weierstrass form after transformation? Answer: True