Can you compute a basis of a Riemann-Roch space in Sage?
Unfortunately, the answer is ``no'' at the present time.
The version of Singular currently used by Sage
(version 3.0.2) has a Brill-Noether algorithm
implementation (computing a basis of a Riemann-Roch space)
which appears to be buggy. The rest of this section is included to
illustrate the syntax once the bugs in brnoeth
get worked out (or to help any developers wishing to work on
this themselves).
To compute a basis for the Riemann-Roch space
associated to a divisor
on a curve
over a field
,
you can use Sage's ``wrapper''
riemann_roch_basis
to Singular or Singular itself. Both are illustrated below.
sage: x, y, z = PolynomialRing(GF(5), 3, 'xyz').gens() sage: f = x^7 + y^7 + z^7 sage: C = Curve(f); pts = C.rational_points() sage: D = C.divisor([ (3, pts[0]), (-1,pts[1]), (10, pts[5]) ]) sage: C.riemann_roch_basis(D) [z/(y + x)]
BrillNoether
command
(for details on this command, see the section
Brill-Noether in the Singular
online documentation
(http://www.singular.uni-kl.de/Manual/html/sing_960.htmand the paper [CF]):
sage: singular.LIB('brnoeth.lib') sage: _ = singular.ring(5,'(x,y)','lp') sage: print singular.eval("list X = Adj_div(-x5+y2+x);") Computing affine singular points ... Computing all points at infinity ... Computing affine singular places ... Computing singular places at infinity ... Computing non-singular places at infinity ... Adjunction divisor computed successfully <BLANKLINE> The genus of the curve is 2 sage: print singular.eval("X = NSplaces(1..2,X);") Computing non-singular affine places of degree 1 ... Computing non-singular affine places of degree 2 ... sage: print singular("X[3];") [1]: 1,1 [2]: 1,2 [3]: 1,3 [4]: 1,4 [5]: 1,5 [6]: 1,6
The 6 Places in X[3] are of degree 1. We define the rational divisor
G = 4*C[3][1]+4*C[3][2]+4*C[3][3]
(of degree 12):
sage: singular.eval("intvec G = 4,4,4,0,0,0;") '' sage: singular.eval("def R = X[1][2];") '' sage: singular.eval("setring R;") '' sage: print singular.eval("list LG = BrillNoether(G,X);") Forms of degree 6 : 28 <BLANKLINE> Vector basis successfully computed <BLANKLINE> sage: print singular.eval("LG;") # here is the vector basis of L(G): [1]: _[1]=-1 _[2]=-1 [2]: _[1]=2x2+xz+z2 _[2]=-x2-xz+y2 ...