x, y, z = MPolynomialRing(GF(5), 3, 'xyz').gens()
f = x^7 + y^7 + z^7
C = Curve(f); pts = C.rational_points()
D = C.divisor([ (3, pts[0]), (-1,pts[1]), (10, pts[5]) ])
C.riemann_roch_basis(D)    # output is random (!!!!)

but under MAGMA:


magma: f := x^7 + y^7 + z^7
magma: C := Curve(P, f)
magma: D := DivisorGroup(C)
magma: d = 3*Divisor(C![0,4,1]) - Divisor(C![1,2,1]) + 10*Divisor(C![4,1,0])
magma: RiemannRochSpace(d)
KModule of dimension 2 over GF(5)
Mapping from: KModule of dimension 2 over GF(5) to Function Field of C given by a rule
magma: V,i = RiemannRochSpace(d)
magma: i(V.1)
$.1*$.1^6 + 4*$.1^2*$.1^5 + $.1^3*$.1^4 + 4*$.1^4*$.1^3 + $.1^5*$.1^2 + 4*$.1^6*$.1 + $.1^7 + 4
magma: i(V.2)
$.1^6 + 4*$.1*$.1^5 + $.1^2*$.1^4 + 4*$.1^3*$.1^3 + $.1^4*$.1^2 + 4*$.1^5*$.1 + $.1^6 + 2


