# 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)#

Create a projective plane conic curve over a finite field.

See Conic for full documentation.

EXAMPLES:

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

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

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: 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]


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: 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))