I'm interested in producing explicit bases for the sections of a line bundle on an embedded genus 1 curve. Let me restrict to the first case that I don't know how to do, so that I can be as concrete as possible. Take a smooth genus 1 curve E defined over QQ by an explicit cubic equation C0 in QQ[x,y,z]. Let D be a divisor of degree 6 on E, and I\_D be defined by four cubic equations (C0,C1,C2,C3). Note that D does not lie on any conic. Riemann-Roch says that h^0(E,OE(D))=6, and I'd like to find an explicit basis of rational functions for this vector space. How do I find such a basis?


Note that if D sat on a conic defined by Q, then finding a basis is relatively easy: we could simply choose the functions x^2/Q, xy/Q, ..., z^2/Q as our rational functions.



Sections of a divisor on elliptic curve
I think I know how to answer this now. The main point is that OE(D) is the dual of ID. Namely: OE(D)=sheafHom(ID, OE). Thus, H^0(E,OE(D))=Hom(ID, OE). 


This can be computed explicitly in any computer algebra package. Or you can see how to compute it as follows. Take a free presentation of ID as an OE-module. In the case I asked about, this yields:


OE3(-4)-->OE3(-3)-->ID.


Label the first map F. Then Hom(ID, OE) is just the kernel of the map of free modules:


Hom(OE3(-3), OE)--> Hom(OE3(-4), OE)


induced by composition with F. Thus, computing a free presentation of the ideal sheaf ID yields a presentation of H^0(E,OE(D)) as the kernel of a map of free modules.


