Method to invert the birational map from degree 3 curve to its Weierstrass form?

75 views
Skip to first unread message

diophan

unread,
May 24, 2014, 11:45:11 AM5/24/14
to sage-s...@googlegroups.com
I was happy to see that Sage gives you the explicit map between your cubic to its Weierstrass form. However, rather than having to do so by hand, I was wondering if Sage is capable of giving the map from the Weierstrass form to the original cubic, since I'd like a quick way of finding rational points on the original cubic (the Weierstrass form has positive rank so it's very quick to generate as many rational points as I want there). If it's important, [0,0,1] is not a flex point on the original cubic.

R.<x,y,z> = QQ[]
f = 3*y^2*x-y^2*z-2*x*y*z+y*z^2+2*x^3-2*x^2*z
EllipticCurve_from_cubic(f,[0,0,1])

Scheme morphism:
  From: Closed subscheme of Projective Space of dimension 2 over
Rational Field defined by:
  2*x^3 + 3*x*y^2 - 2*x^2*z - 2*x*y*z - y^2*z + y*z^2
  To:   Elliptic Curve defined by y^2 + 6*x*y + 256*y = x^3 - 73*x^2
over Rational Field
  Defn: Defined on coordinates by sending (x : y : z) to
        (1/8*x*y - 1/16*y^2 - 1/8*y*z : -x^2 + 1/8*x*y + 3/16*y^2 + x*z
+ 3/8*y*z : -1/256*y^2)

Thanks

Volker Braun

unread,
May 24, 2014, 12:18:29 PM5/24/14
to sage-s...@googlegroups.com
Its a 4:1 map so you can't invert it...
Message has been deleted

John

unread,
May 24, 2014, 1:20:50 PM5/24/14
to sage-s...@googlegroups.com
Sorry early morning brain wasn't working. The documentation says "If morphism=True is passed, then a birational equivalence between F and the Weierstrass curve is returned. If the point happens to be a flex, then this is an isomorphism." but I wasn't thinking.

Nils Bruin

unread,
May 24, 2014, 4:38:48 PM5/24/14
to sage-s...@googlegroups.com
On Saturday, May 24, 2014 9:18:29 AM UTC-7, Volker Braun wrote:
Its a 4:1 map so you can't invert it...

I would find that surprising. For a general plane cubic, there are good recipes for getting a 9:1 map to a Weierstrass model in general and a 1:1 map when a rational point is specified. A 4:1 map is rather unnatural to get in that situation. You'd expect that from a y^2=quartic in x model.

Indeed, the map returned is invertible, the inverse being:

[   -12*x*z - 4*y*z,  32*x*z,  x^2 - 28*x*z - 4*y*z]


diophan

unread,
May 24, 2014, 4:46:32 PM5/24/14
to sage-s...@googlegroups.com
Yes I just started looking at this again about an hour ago. It looks like the way Sage gets the map is only by doing linear changes of coordinates on P^2 and a Cremona, as outlined here:
http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CCwQFjAA&url=http%3A%2F%2Ftrac.sagemath.org%2Fraw-attachment%2Fticket%2F3416%2Fcubic_to_weierstrass_documentation.pdf&ei=mASBU4zHJ6KlsATngYHQCA&usg=AFQjCNHyMPTkzhy9KhgNr-MB0pI6pJXNTw&sig2=AORDehO_tzL8xrZTO7OLZg&bvm=bv.67720277,d.cWc&cad=rja
In fact I followed the procedure there by hand since I didn't look at the actual Sage code and the output was the same exact equation.

diophan

unread,
May 24, 2014, 5:10:42 PM5/24/14
to sage-s...@googlegroups.com
To get back to the question, did you find the inverse by hand or is there something in Sage to help out? I have potentially a large number of cubics I'd like to carry this out with and if there's a way to avoid doing it by hand each time that'd be great.


On Saturday, May 24, 2014 4:38:48 PM UTC-4, Nils Bruin wrote:

leif

unread,
May 24, 2014, 5:47:01 PM5/24/14
to sage-s...@googlegroups.com
diophan wrote:
> To get back to the question, did you find the inverse by hand or is
> there something in Sage to help out? I have potentially a large number
> of cubics I'd like to carry this out with and if there's a way to avoid
> doing it by hand each time that'd be great.

Ahem, ever heard of tab completion?

sage: R.<x,y,z> = QQ[]
sage: f = 3*y^2*x-y^2*z-2*x*y*z+y*z^2+2*x^3-2*x^2*z
sage: e = EllipticCurve_from_cubic(f,[0,0,1])
sage: e
Scheme morphism:
From: Closed subscheme of Projective Space of dimension 2 over
Rational Field defined by:
2*x^3 + 3*x*y^2 - 2*x^2*z - 2*x*y*z - y^2*z + y*z^2
To: Elliptic Curve defined by y^2 + 6*x*y + 256*y = x^3 - 73*x^2
over Rational Field
Defn: Defined on coordinates by sending (x : y : z) to
(1/8*x*y - 1/16*y^2 - 1/8*y*z : -x^2 + 1/8*x*y + 3/16*y^2 + x*z
+ 3/8*y*z : -1/256*y^2)

sage: type(e)
<class
'sage.schemes.elliptic_curves.weierstrass_transform.WeierstrassTransformationWithInverse_class'>

sage: e.inverse()
Scheme morphism:
From: Elliptic Curve defined by y^2 + 6*x*y + 256*y = x^3 - 73*x^2
over Rational Field
To: Closed subscheme of Projective Space of dimension 2 over
Rational Field defined by:
2*x^3 + 3*x*y^2 - 2*x^2*z - 2*x*y*z - y^2*z + y*z^2
Defn: Defined on coordinates by sending (x : y : z) to
(-12*x*z - 4*y*z : 32*x*z : x^2 - 28*x*z - 4*y*z)

sage: e.inverse().defining_polynomials()
[-12*x*z - 4*y*z, 32*x*z, x^2 - 28*x*z - 4*y*z]


-leif


> On Saturday, May 24, 2014 4:38:48 PM UTC-4, Nils Bruin wrote:
>
> On Saturday, May 24, 2014 9:18:29 AM UTC-7, Volker Braun wrote:
>
> Its a 4:1 map so you can't invert it...
>
>
> I would find that surprising. For a general plane cubic, there are
> good recipes for getting a 9:1 map to a Weierstrass model in general
> and a 1:1 map when a rational point is specified. A 4:1 map is
> rather unnatural to get in that situation. You'd expect that from a
> y^2=quartic in x model.
>
> Indeed, the map returned is invertible, the inverse being:
>
> [ -12*x*z - 4*y*z, 32*x*z, x^2 - 28*x*z - 4*y*z]

--
() The ASCII Ribbon Campaign
/\ Help Cure HTML E-Mail

Volker Braun

unread,
May 24, 2014, 6:46:46 PM5/24/14
to sage-s...@googlegroups.com
On Saturday, May 24, 2014 9:38:48 PM UTC+1, Nils Bruin wrote:
You'd expect that from a y^2=quartic in x model.

Yes, I was thinking about the degree-2 case... which is also implemented btw ;-)

Nils Bruin

unread,
May 25, 2014, 12:12:28 PM5/25/14
to sage-s...@googlegroups.com
Some design comments:

sage: R.<x,y,z> = QQ[]
sage: f = 3*y^2*x-y^2*z-2*x*y*z+y*z^2+2*x^3-2*x^2*z
sage: e = EllipticCurve_from_cubic(f,[0,0,1])
sage: e
Scheme morphism: ...
 
This is not ideal naming. The command reads like you'd be asking for an elliptic curve, but a morphism is returned in its place. Sure, via e.codomain() the elliptic curve can be retrieved too, but shouldn't the routine be named ellipticcurve_transformation_from_cubic instead, or something like that?

sage: e.inverse()

The inverse is there because it's explicitly included upon creation (that's good!). It would be nice to have a routine to compute the inverse just from the equations as well, though.
 
Similarly, it would be nice to have routines that return birational maps to Weierstrass forms for other (all ?) cases of genus 1 curves with a point.

Volker Braun

unread,
May 25, 2014, 12:52:32 PM5/25/14
to sage-s...@googlegroups.com
On Sunday, May 25, 2014 5:12:28 PM UTC+1, Nils Bruin wrote:
Some design comments:

sage: e = EllipticCurve_from_cubic(f,[0,0,1])
sage: e
Scheme morphism: ...
 
This is not ideal naming. The command reads like you'd be asking for an elliptic curve, but a morphism is returned in its place. Sure, via e.codomain() the elliptic curve can be retrieved too, but shouldn't the routine be named ellipticcurve_transformation_from_cubic instead, or something like that?

There is Jacobian(f) if you just want to know the jacobian. Or the slightly more awkward EllipticCurve_from_cubic(f, [0,0,1], morphism=False).

I agree that the naming isn't perfect (starting with the whole mixed CamelCase / underscores). But now its difficult to change.

Similarly, it would be nice to have routines that return birational maps to Weierstrass forms for other (all ?) cases of genus 1 curves with a point.

There is the transformation=True option, from the docs:

        sage: R.<x,y> = QQ[]
        sage: cubic = x^3 + y^3 + 1
        sage: f, g = WeierstrassForm(cubic);  (f, g)
        (0, -27/4)

        sage: X,Y,Z = WeierstrassForm(cubic, transformation=True);  (X,Y,Z)
        (-x^3*y^3 - x^3 - y^3,
         1/2*x^6*y^3 - 1/2*x^3*y^6 - 1/2*x^6 + 1/2*y^6 + 1/2*x^3 - 1/2*y^3,
         x*y)

        sage: -Y^2 + X^3 + f*X*Z^4 + g*Z^6
        -1/4*x^12*y^6 - 1/2*x^9*y^9 - 1/4*x^6*y^12 + 1/2*x^12*y^3
        - 7/2*x^9*y^6 - 7/2*x^6*y^9 + 1/2*x^3*y^12 - 1/4*x^12 - 7/2*x^9*y^3
        - 45/4*x^6*y^6 - 7/2*x^3*y^9 - 1/4*y^12 - 1/2*x^9 - 7/2*x^6*y^3
        - 7/2*x^3*y^6 - 1/2*y^9 - 1/4*x^6 + 1/2*x^3*y^3 - 1/4*y^6
        sage: cubic.divides(-Y^2 + X^3 + f*X*Z^4 + g*Z^6)
        True

Reply all
Reply to author
Forward
0 new messages