Projective plane conics over finite fields - Plane and Space Curves

Skip to content
Back to top
View this page
Edit this page

# Projective plane conics over finite fields

AUTHORS:

- Marco Streng (2010-07-20)

class sage.schemes.plane_conics.con_finite_field.ProjectiveConic_finite_field(A, f)

  Bases: `ProjectiveConic_field`, `ProjectivePlaneCurve_finite_field`

  Create a projective plane conic curve over a finite field.

  See `Conic` for full documentation.

  EXAMPLES:

  Sage

      sage: K.<a> = FiniteField(9, 'a')
      sage: P.<X, Y, Z> = K[]
      sage: Conic(X^2 + Y^2 - a*Z^2)
      Projective Conic Curve over Finite Field in a of size 3^2
       defined by X^2 + Y^2 + (-a)*Z^2

  Python

      >>> from sage.all import *
      >>> K = FiniteField(Integer(9), 'a', names=('a',)); (a,) = K._first_ngens(1)
      >>> P = K['X, Y, Z']; (X, Y, Z,) = P._first_ngens(3)
      >>> Conic(X**Integer(2) + Y**Integer(2) - a*Z**Integer(2))
      Projective Conic Curve over Finite Field in a of size 3^2
       defined by X^2 + Y^2 + (-a)*Z^2

  Sage

      sage: P.<X, Y, Z> = FiniteField(5)[]
      sage: Conic(X^2 + Y^2 - 2*Z^2)
      Projective Conic Curve over Finite Field of size 5 defined by X^2 + Y^2 - 2*Z^2

  [Python]

      >>> from sage.all import *
      >>> P = FiniteField(Integer(5))['X, Y, Z']; (X, Y, Z,) = P._first_ngens(3)
      >>> Conic(X**Integer(2) + Y**Integer(2) - Integer(2)*Z**Integer(2))
      Projective Conic Curve over Finite Field of size 5 defined by X^2 + Y^2 - 2*Z^2

  count_points(n)

    If the base field \(B\) of `self` is finite of order \(q\), then returns the number of points over \(\GF{q}, ..., \GF{q^n}\).

    EXAMPLES:

    Sage

        sage: P.<x,y,z> = GF(3)[]
        sage: c = Curve(x^2+y^2+z^2); c
        Projective Conic Curve over Finite Field of size 3 defined by x^2 + y^2 + z^2
        sage: c.count_points(4)
        [4, 10, 28, 82]

    Python

        >>> from sage.all import *
        >>> P = GF(Integer(3))['x, y, z']; (x, y, z,) = P._first_ngens(3)
        >>> c = Curve(x**Integer(2)+y**Integer(2)+z**Integer(2)); c
        Projective Conic Curve over Finite Field of size 3 defined by x^2 + y^2 + z^2
        >>> c.count_points(Integer(4))
        [4, 10, 28, 82]

  has_rational_point(point=False, read_cache=True, algorithm='default')

    Always returns `True` because `self` has a point defined over its finite base field \(B\).

    If `point` is True, then returns a second output \(S\), which is a rational point if one exists.

    Points are cached. If `read_cache` is True, then cached information is used for the output if available. If no cached point is available or `read_cache` is False, then random \(y\)-coordinates are tried if `self` is smooth and a singular point is returned otherwise.

    EXAMPLES:

    Sage

        sage: Conic(FiniteField(37), [1, 2, 3, 4, 5, 6]).has_rational_point()
        True

        sage: C = Conic(FiniteField(2), [1, 1, 1, 1, 1, 0]); C
        Projective Conic Curve over Finite Field of size 2
         defined by x^2 + x*y + y^2 + x*z + y*z
        sage: C.has_rational_point(point = True)  # output is random
        (True, (0 : 0 : 1))

        sage: p = next_prime(10^50)
        sage: F = FiniteField(p)
        sage: C = Conic(F, [1, 2, 3]); C
        Projective Conic Curve over Finite Field
         of size 100000000000000000000000000000000000000000000000151
         defined by x^2 + 2*y^2 + 3*z^2
        sage: C.has_rational_point(point = True)  # output is random
        (True,
         (14971942941468509742682168602989039212496867586852
          : 75235465708017792892762202088174741054630437326388 : 1)

        sage: F.<a> = FiniteField(7^20)
        sage: C = Conic([1, a, -5]); C
        Projective Conic Curve over Finite Field in a of size 7^20
         defined by x^2 + a*y^2 + 2*z^2
        sage: C.has_rational_point(point = True)  # output is random
        (True,
         (a^18 + 2*a^17 + 4*a^16 + 6*a^13 + a^12 + 6*a^11 + 3*a^10 + 4*a^9 + 2*a^8
            + 4*a^7 + a^6 + 4*a^4 + 6*a^2 + 3*a + 6
          : 5*a^19 + 5*a^18 + 5*a^17 + a^16 + 2*a^15 + 3*a^14 + 4*a^13 + 5*a^12
            + a^11 + 3*a^10 + 2*a^8 + 3*a^7 + 4*a^6 + 4*a^5 + 6*a^3 + 5*a^2 + 2*a + 4
          : 1))

    Python

        >>> from sage.all import *
        >>> Conic(FiniteField(Integer(37)), [Integer(1), Integer(2), Integer(3), Integer(4), Integer(5), Integer(6)]).has_rational_point()
        True

        >>> C = Conic(FiniteField(Integer(2)), [Integer(1), Integer(1), Integer(1), Integer(1), Integer(1), Integer(0)]); C
        Projective Conic Curve over Finite Field of size 2
         defined by x^2 + x*y + y^2 + x*z + y*z
        >>> C.has_rational_point(point = True)  # output is random
        (True, (0 : 0 : 1))

        >>> p = next_prime(Integer(10)**Integer(50))
        >>> F = FiniteField(p)
        >>> C = Conic(F, [Integer(1), Integer(2), Integer(3)]); C
        Projective Conic Curve over Finite Field
         of size 100000000000000000000000000000000000000000000000151
         defined by x^2 + 2*y^2 + 3*z^2
        >>> C.has_rational_point(point = True)  # output is random
        (True,
         (14971942941468509742682168602989039212496867586852
          : 75235465708017792892762202088174741054630437326388 : 1)

        >>> F = FiniteField(Integer(7)**Integer(20), names=('a',)); (a,) = F._first_ngens(1)
        >>> C = Conic([Integer(1), a, -Integer(5)]); C
        Projective Conic Curve over Finite Field in a of size 7^20
         defined by x^2 + a*y^2 + 2*z^2
        >>> C.has_rational_point(point = True)  # output is random
        (True,
         (a^18 + 2*a^17 + 4*a^16 + 6*a^13 + a^12 + 6*a^11 + 3*a^10 + 4*a^9 + 2*a^8
            + 4*a^7 + a^6 + 4*a^4 + 6*a^2 + 3*a + 6
          : 5*a^19 + 5*a^18 + 5*a^17 + a^16 + 2*a^15 + 3*a^14 + 4*a^13 + 5*a^12
            + a^11 + 3*a^10 + 2*a^8 + 3*a^7 + 4*a^6 + 4*a^5 + 6*a^3 + 5*a^2 + 2*a + 4
          : 1))