Ah. That is a confusing error message. AttributeError: 'ProjectiveCurve_finite_field' object has no attribute > 'riemann_roch_basis'
... because the size of the finite_field F is not prime. According to the documentation<http://www.sagemath.org/doc/constructions/algebraic_geometry.html> > To compute a basis of the Riemann-Roch space of a divisor [image: D] on a > curve over a field [image: F], one can use Sage’s wrapper > riemann_roch_basis of Singular’s implementation of the Brill Noether > algorithm. Note that this wrapper currently only works when [image: F] is > prime and the divisor [image: D] is supported on rational points. Your example gave me the same error. I then tried the example on the documentation page, (Field size = 5) and it worked, so it appears this information is still accurate. I don't see any problem with the way you defined w, but I could be wrong. This math is still new to me. Good luck. On Tuesday, June 12, 2012 8:20:04 PM UTC-7, Gato wrote: > > hello! i have a question with this code (i speak little english) > > F.<w>=GF(4,'w') > R.<X,Y,Z> = ProjectiveSpace(F,2) > C = Curve(X^2*Y + w*Y^2*Z+ w^2*Z^2*X) > print C > print C.genus() > pts = C.rational_points() > print pts[4] > print pts[5] > D = C.divisor([ (2, pts[4]),(1, pts[5]) ]) > print D > print C.riemann_roch_basis(D) > > result: > > Projective Curve over Finite Field in w of size 2^2 defined by X^2*Y + > (w)*Y^2*Z + (w + 1)*X*Z^2 > 1 > (1 : w : 1) > (w : 1 : 1) > 2*(X + Z, Y + (w)*Z) + (X + (w)*Z, Y + Z) > Traceback (most recent call last): print pts[4] > File "", line 1, in <module> > > File "/tmp/tmpkLnPnU/___code___.py", line 13, in <module> > exec compile(u'print C.riemann_roch_basis(D) > File "", line 1, in <module> > > File "parent.pyx", line 871, in sage.structure.parent.Parent.__getattr__ > (sage/structure/parent.c:6648) > AttributeError: 'ProjectiveCurve_finite_field' object has no attribute > 'riemann_roch_basis' > > > why? > > I think the problem is in the function w associated to the curve > > -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
