Weierstrass construction from Riemann-Roch in genus one (source code)

= Weierstrass construction from Riemann-Roch in genus one

Let $E$ be a <genus one curve> and choose $O\in E$. Since a canonical divisor is linearly equivalent to zero, <Riemann-Roch theorem>[Riemann--Roch] gives $\ell(nO)=n$ for $n\geq1$. Choose $x\in L(2O)\setminus L(O)$ and $y\in L(3O)\setminus L(2O)$. Their pole orders at $O$ are two and three. The seven functions
$$
1,x,y,x^2,xy,x^3,y^2\in L(6O)
$$
are linearly dependent because $\ell(6O)=6$, and comparison of pole orders puts the relation in <Weierstrass equation of an elliptic curve>[Weierstrass form]. The complete linear system $|3O|$ is very ample and realizes this relation as a smooth plane cubic. In characteristic other than two and three, completing the square and translating $x$ produce a <Short Weierstrass form>.