24.2 Affine plane curves over a general ring

Module: sage.schemes.plane_curves.affine_curve

Author Log:

Class: AffineCurve_finite_field

class AffineCurve_finite_field

Functions: rational_points

rational_points( self, [algorithm=enum])

Return sorted list of all rational points on this curve.

Use very naive point enumeration to find all rational points on this curve over a finite field.

sage: A, (x,y) = AffineSpace(2,GF(9)).objgens()
sage: C = Curve(x^2 + y^2 - 1)
sage: C
Affine Curve over Finite Field in a of size 3^2 defined by 2 + x1^2 + x0^2
sage: C.rational_points()
[(2*a + 2, 2*a + 2), (2*a + 2, a + 1), (a + 1, 2*a + 2),
 (a + 1, a + 1), (2, 0), (1, 0), (0, 2), (0, 1)]

Class: AffineCurve_generic

class AffineCurve_generic
AffineCurve_generic( self, A, f)

Functions: divisor_of_function,$  $ local_coordinates

divisor_of_function( self, r)

Return the divisor of a function on a curve.

INPUT:
     r is a rational function on X
     
OUTPUT:
     list -- The divisor of r represented as a list of coefficients and
points.
             (TODO: This will change to a more structural output in the
future.)

sage: F = GF(5)
sage: P2 = AffineSpace(2, F, names = 'xy')
sage: R = P2.coordinate_ring()
sage: x, y = R.gens()
sage: f = y^2 - x^9 - x
sage: C = Curve(f)
sage: K = FractionField(R)
sage: r = 1/x
sage: C.divisor_of_function(r)     # todo: not implemented (broken)
      [[-1, (0, 0, 1)]]
sage: r = 1/x^3
sage: C.divisor_of_function(r)     # todo: not implemented (broken)
      [[-3, (0, 0, 1)]]

local_coordinates( self, pt, n)

Return local coordinates to precision n at the given point.


\begin{note}
{\bf Behaviour is flakey} - some choices of $n$ are worst that others.
\end{note}

INPUT:
    pt -- an F-rational point on X which is not a
          point of ramification for the projection (x,y) -> x.
    n  -- the number of terms desired

OUTPUT:
    x = x0 + t
    y = y0 + power series in t

sage: F = GF(5)
sage: pt = (2,3)
sage: R = MPolynomialRing(F,2, names = ['x','y'])
sage: x,y = R.gens()
sage: f = y^2-x^9-x
sage: C = Curve(f)
sage: C.local_coordinates(pt, 9)
[2 + t, 3 + 3*t^2 + t^3 + 3*t^4 + 3*t^6 + 3*t^7 + t^8 + 2*t^9 + 3*t^11 +
3*t^12]

Special Functions: _repr_type

Class: AffineCurve_prime_finite_field

class AffineCurve_prime_finite_field

Functions: rational_points,$  $ riemann_roch_basis

rational_points( self, [algorithm=enum])

Return sorted list of all rational points on this curve.

INPUT:
    algorithm -- string: 
                   'enum' -- straightforward enumeration
                   'bn' -- via Singular's Brill-Noether package.
                   'all' -- use all implemented algorithms
                            and verify that they give the same answer,
                            then return it

Note: The Brill-Noether package does not always work. When it fails a RuntimeError exception is raised.

sage: x, y = (GF(5)['x,y']).gens()
sage: f = y^2 - x^9 - x
sage: C = Curve(f); C
Affine Curve over Finite Field of size 5 defined by y^2 + 4*x + 4*x^9
sage: C.rational_points(algorithm='bn')
[(0, 0), (2, 2), (2, 3), (3, 1), (3, 4)]
sage: C = Curve(x - y + 1)
sage: C.rational_points()
[(0, 1), (1, 2), (2, 3), (3, 4), (4, 0)]

sage: x, y = (GF(17)['x,y']).gens()
sage: C = Curve(x^2 + y^5 + x*y - 19)
sage: v = C.rational_points(algorithm='bn')
sage: w = C.rational_points(algorithm='enum')
sage: len(v)
20
sage: v == w
True

riemann_roch_basis( self, D)

Interfaces with Singular's BrillNoether command.

INPUT:
    self -- a plane curve defined by a polynomial eqn f(x,y) = 0
            over a prime finite field F = GF(p) 
            in 2 variables x,y representing a curve
            X: f(x,y) = 0 having n F-rational points (see
            the SAGE function places_on_curve)
    D    -- an n-tuple of integers $(d1, ..., dn)$ representing the
            divisor $Div = d1*P1+...+dn*Pn$, where
            $X(F) = \{P1,...,Pn\}$.
            **The ordering is that dictated by places_on_curve.**

OUTPUT:
    basis of L(Div)

sage: R = MPolynomialRing(GF(5),2,names = ["x","y"])
sage: x, y = R.gens()
sage: f = y^2 - x^9 - x
sage: C = Curve(f)
sage: D = [6,0,0,0,0,0]
sage: C.riemann_roch_basis(D)
[1, (y^2*z^4 + 4*x*z^5)/x^6, (y^2*z^5 + 4*x*z^6)/x^7, (y^2*z^6 +
4*x*z^7)/x^8]

Class: AffineSpaceCurve_generic

class AffineSpaceCurve_generic
AffineSpaceCurve_generic( self, A, X)

Special Functions: _repr_type

See About this document... for information on suggesting changes.