ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 22 Apr 2020 07:50:39 -0500I have the hyperelliptic curve y^2=x^4+81473/1024*x^2-1. How do I convert this curve to an elliptic curve in a short weierstrass form?https://ask.sagemath.org/question/50319/i-have-the-hyperelliptic-curve-y2x4814731024x2-1-how-do-i-convert-this-curve-to-an-elliptic-curve-in-a-short-weierstrass-form/I have the hyperelliptic curve $y^2=x^4+81473/1024x^2-1$. How do I convert this curve to an elliptic curve in a short Weierstrass form?
Also, how can I convert the point $(x,y,z)=(1,i,0)$ on the $y^2=x^4+81473/1024x^2z^2- z^4$ curve to the point on the elliptic curve?
Thanks.Sat, 21 Mar 2020 07:52:10 -0500https://ask.sagemath.org/question/50319/i-have-the-hyperelliptic-curve-y2x4814731024x2-1-how-do-i-convert-this-curve-to-an-elliptic-curve-in-a-short-weierstrass-form/Comment by rburing for <p>I have the hyperelliptic curve $y^2=x^4+81473/1024x^2-1$. How do I convert this curve to an elliptic curve in a short Weierstrass form?
Also, how can I convert the point $(x,y,z)=(1,i,0)$ on the $y^2=x^4+81473/1024x^2z^2- z^4$ curve to the point on the elliptic curve?
Thanks.</p>
https://ask.sagemath.org/question/50319/i-have-the-hyperelliptic-curve-y2x4814731024x2-1-how-do-i-convert-this-curve-to-an-elliptic-curve-in-a-short-weierstrass-form/?comment=50322#post-id-50322The point $(1,i,0)$ does not lie on the curve, though $(i,1,0)$ does; but the equation in $x,y,z$ is not homogeneous, and if you homogenize w.r.t. $z$ then the point is no longer on the curve. So are you sure about this data?Sun, 22 Mar 2020 14:27:41 -0500https://ask.sagemath.org/question/50319/i-have-the-hyperelliptic-curve-y2x4814731024x2-1-how-do-i-convert-this-curve-to-an-elliptic-curve-in-a-short-weierstrass-form/?comment=50322#post-id-50322Answer by dan_fulea for <p>I have the hyperelliptic curve $y^2=x^4+81473/1024x^2-1$. How do I convert this curve to an elliptic curve in a short Weierstrass form?
Also, how can I convert the point $(x,y,z)=(1,i,0)$ on the $y^2=x^4+81473/1024x^2z^2- z^4$ curve to the point on the elliptic curve?
Thanks.</p>
https://ask.sagemath.org/question/50319/i-have-the-hyperelliptic-curve-y2x4814731024x2-1-how-do-i-convert-this-curve-to-an-elliptic-curve-in-a-short-weierstrass-form/?answer=50916#post-id-50916In general, to bring an equation of the form:
$$
y^2 = Ax^4+Bx^3+Cx^2+Dx+q^2
$$
into the Weierstraß form, the used substitution is given by using:
$$
\begin{aligned}
Q &= 2q\ ,\\\\
X &= ( Q(y+q)+Dx )\cdot\frac 1{x^2}\ ,\\\\
Y &= ( Q^2(y+q) + Q(Cx^2+Dx) - D^2x^2/Q)\cdot\frac 1{x^3}\ .\\\\
&\text{ Backwards:}\\\\
x &= (Q(X+c)-D^2/Q)\cdot\frac 1Y\ ,\\\\
y &= -q + x(xX-D)/Q\ .
\end{aligned}
$$
Note that it is needed to have a square as the free coefficient in the quartic $Ax^4+Bx^3+Cx^2+Dx+q^2$ on the RHS of the equation we start with.
Reference: [Ian Conell, Elliptic Curves Hanbook, page 105, Quartic to Weierstrass] .
In our case, the free coefficient is $-1$, so we really need to pass to the Gaussian field $\Bbb Q(i)$. The following code gives the transformation:
sage: F.<j> = QuadraticField(-1)
sage: R.<X,Y> = PolynomialRing(F)
sage: A, B, C, D, q = 1, 0, 81473/1024, 0, j
sage: Q = 2*q
sage: x = (Q*(X+C) - D^2/Q) / Y
sage: y = -q + x*(x*X - D) / Q
sage: factor( y^2 - (A*x^4 + B*x^3 + C*x^2 + D*x + q^2) )
(-4) * Y^-4 * (X + 81473/1024)^3 * (X^3 + 81473/1024*X^2 - Y^2 + 4*X + 81473/256)
So the given quartic is birationally (there are some other factors...) equivalent to
$$
Y^2 = X^3 + 81473/1024 X^2 + 4X + 81473/256\ .
$$
So we obtain an elliptic curve with the following minimal model:
sage: E = EllipticCurve( QQ, [ 0, 81473/1024, 0, 4, 81473/256 ] )
sage: EM = E.minimal_model()
sage: EM
Elliptic Curve defined by y^2 + x*y + y = x^3 + x^2 - 138026392*x + 629434426201 over Rational Field
sage: EM.discriminant().factor()
-1 * 2^16 * 46229^2 * 143677^2
Alternative blind code to obtain the above curve is as follows:
sage: R.<x,y> = QQ[]
sage: C = Curve( -y^2 + x^4 + 81473/1024*x^2 - 1 )
sage: JC = Jacobian(C)
sage: JCM = JC.minimal_model()
sage: JC
Elliptic Curve defined by y^2 = x^3 - 6625266817/3145728*x + 543881033738945/14495514624 over Rational Field
sage: JCM
Elliptic Curve defined by y^2 + x*y + y = x^3 + x^2 - 138026392*x + 629434426201 over Rational Field
sage: JCM.discriminant().factor()
-1 * 2^16 * 46229^2 * 143677^2
(But doing this blindly does not provide a way to see which points correspond to which points.)
Wed, 22 Apr 2020 07:50:39 -0500https://ask.sagemath.org/question/50319/i-have-the-hyperelliptic-curve-y2x4814731024x2-1-how-do-i-convert-this-curve-to-an-elliptic-curve-in-a-short-weierstrass-form/?answer=50916#post-id-50916