How can I get Sage to provide an explicit isomorphism from a genus 1 curve to its Weierstrass equation?
I defined the curve to be C = Curve(f, A) where f is a quartic in two variables and A is rational affine space. As C having genus 1 gives an isomorphism from C to Jacobian(C), I then called Jacobian(C) , and Jacobian(C) gives a Weierstrass equation for the curve. I tried reading the Sage documentation for Jacobian, but did not find a way to get an explicit morphism.
I know I need to identify a non-singular point on C to define the group law, and can find such a point algorithmically without much difficulty. Any help is greatly appreciated!
I am not super familiar with the Sage interface, so the following code may be slightly buggy. In the documentation I could not find and analogy to Magma's
EllipticCurvecommand, so instead I will discuss how in general we perform such a computation and give a slightly hacky solution with my little knowledge of Sage.Consider a genus $1$ curve $C$ over a field $K$. We know that over $\bar{K}$ that $C$ is birational (indeed isomorphic if and only if $C$ is smooth) to its Jacobian $E := \operatorname{Jac}(C)$, which of course can be put in Weierstrass form. I will therefore assume we have extended $K$ sufficiently so that $C(K)$ is nonempty, and fix a nonsingluar point $O \in C(K)$.
Thus $(C, O)$ is an elliptic curve in the sense of Chapter III of Silverman (if $C$ is singular it is not quite, but the fact that $O$ is nonsingular makes it work anyway). The point now is to emulate the proof of Prop III.3.1 of Silverman, to put $(C, O)$ in Weierstrass form.
That is, let $\{1,x\}$ be a basis for the Riemann-Roch space $H^0(C, \mathcal{O}_C(2O))$ and let $y$ be such that $\{1,x, y\}$ be a basis for the Riemann-Roch space $H^0(C, \mathcal{O}_C(3O))$. The same arguemnt as Prop III.3.1 shows that $x,y$ must satisfy a Weierstrass equation.
So we just have to force Sage to compute the Riemann-Roch basis. Now while writing this I noticed that I can't find a general implimentation for this on Schemes in Sage (one does exist in Magma) and perhaps this is why such a function does not exist? I would not know. In any case, for curves over finite fields such a function does exist. I'll give an example now where I put $C: y^2 = x^4 - 1$ over $\mathbb{F}_5$ into Weierstrass form with the point $O = (1,0)$: