Projective plane conics over
¶
AUTHORS:
- Marco Streng (2010-07-20)
- Nick Alexander (2008-01-08)
-
class
sage.schemes.plane_conics.con_rational_field.ProjectiveConic_rational_field(A, f)¶ Bases:
sage.schemes.plane_conics.con_number_field.ProjectiveConic_number_fieldCreate a projective plane conic curve over
.
See Conicfor full documentation.EXAMPLES:
sage: P.<X, Y, Z> = QQ[] sage: Conic(X^2 + Y^2 - 3*Z^2) Projective Conic Curve over Rational Field defined by X^2 + Y^2 - 3*Z^2
TESTS:
sage: Conic([2, 1, -1])._test_pickling()-
has_rational_point(point=False, obstruction=False, algorithm='default', read_cache=True)¶ Returns True if and only if
selfhas a point defined over
.If
pointandobstructionare both False (default), then the output is a booleanoutsaying whetherselfhas a rational point.If
pointorobstructionis True, then the output is a pair(out, S), whereoutis as above and the following holds:- if
pointis True andselfhas a rational point, thenSis a rational point, - if
obstructionis True andselfhas no rational point, thenSis a prime such that no rational point exists over the completion atSor
if no point exists over
.
Points and obstructions are cached, whenever they are found. Cached information is used if and only if
read_cacheis True.ALGORITHM:
The parameter
algorithmspecifies the algorithm to be used:'qfsolve'– Use PARI/GP functionqfsolve'rnfisnorm'– Use PARI’s function rnfisnorm (cannot be combined withobstruction = True)'local'– Check if a local solution exists for all primes and infinite places of
and apply the Hasse principle
(cannot be combined with point = True)'default'– Use'qfsolve''magma'(requires Magma to be installed) – delegates the task to the Magma computer algebra system.
EXAMPLES:
sage: C = Conic(QQ, [1, 2, -3]) sage: C.has_rational_point(point = True) (True, (1 : 1 : 1)) sage: D = Conic(QQ, [1, 3, -5]) sage: D.has_rational_point(point = True) (False, 3) sage: P.<X,Y,Z> = QQ[] sage: E = Curve(X^2 + Y^2 + Z^2); E Projective Conic Curve over Rational Field defined by X^2 + Y^2 + Z^2 sage: E.has_rational_point(obstruction = True) (False, -1)
The following would not terminate quickly with
algorithm = 'rnfisnorm'sage: C = Conic(QQ, [1, 113922743, -310146482690273725409]) sage: C.has_rational_point(point = True) (True, (-76842858034579/5424 : -5316144401/5424 : 1)) sage: C.has_rational_point(algorithm = 'local', read_cache = False) True sage: C.has_rational_point(point=True, algorithm='magma', read_cache=False) # optional - magma (True, (30106379962113/7913 : 12747947692/7913 : 1))
TESTS:
Create a bunch of conics over
, check if has_rational_pointruns without errors and returns consistent answers for all algorithms. Check if all points returned are valid.sage: l = Sequence(cartesian_product_iterator([[-1, 0, 1] for i in range(6)])) sage: c = [Conic(QQ, a) for a in l if a != [0,0,0] and a != (0,0,0,0,0,0)] sage: d = [] sage: d = [[C]+[C.has_rational_point(algorithm = algorithm, read_cache = False, obstruction = (algorithm != 'rnfisnorm'), point = (algorithm != 'local')) for algorithm in ['local', 'qfsolve', 'rnfisnorm']] for C in c[::10]] # long time: 7 seconds sage: assert all([e[1][0] == e[2][0] and e[1][0] == e[3][0] for e in d]) sage: assert all([e[0].defining_polynomial()(Sequence(e[i][1])) == 0 for e in d for i in [2,3] if e[1][0]])
- if
-
is_locally_solvable(p)¶ Returns True if and only if
selfhas a solution over the
-adic numbers. Here
is a prime number or equals
, infinity, or
to denote the infinite place.EXAMPLES:
sage: C = Conic(QQ, [1,2,3]) sage: C.is_locally_solvable(-1) False sage: C.is_locally_solvable(2) False sage: C.is_locally_solvable(3) True sage: C.is_locally_solvable(QQ.hom(RR)) False sage: D = Conic(QQ, [1, 2, -3]) sage: D.is_locally_solvable(infinity) True sage: D.is_locally_solvable(RR) True
-
local_obstructions(finite=True, infinite=True, read_cache=True)¶ Returns the sequence of finite primes and/or infinite places such that self is locally solvable at those primes and places.
The infinite place is denoted
.The parameters
finiteandinfinite(both True by default) are used to specify whether to look at finite and/or infinite places. Note thatfinite = Trueinvolves factorization of the determinant ofself, hence may be slow.Local obstructions are cached. The parameter
read_cachespecifies whether to look at the cache before computing anything.EXAMPLES
sage: Conic(QQ, [1, 1, 1]).local_obstructions() [2, -1] sage: Conic(QQ, [1, 2, -3]).local_obstructions() [] sage: Conic(QQ, [1, 2, 3, 4, 5, 6]).local_obstructions() [41, -1]
-
parametrization(point=None, morphism=True)¶ Return a parametrization
of selftogether with the inverse of
.If
pointis specified, then that point is used for the parametrization. Otherwise, useself.rational_point()to find a point.If
morphismis True, then
is returned in the form
of a Scheme morphism. Otherwise, it is a tuple of polynomials
that gives the parametrization.ALGORITHM:
Uses the PARI/GP function
qfparam.EXAMPLES
sage: c = Conic([1,1,-1]) sage: c.parametrization() (Scheme morphism: From: Projective Space of dimension 1 over Rational Field To: Projective Conic Curve over Rational Field defined by x^2 + y^2 - z^2 Defn: Defined on coordinates by sending (x : y) to (2*x*y : x^2 - y^2 : x^2 + y^2), Scheme morphism: From: Projective Conic Curve over Rational Field defined by x^2 + y^2 - z^2 To: Projective Space of dimension 1 over Rational Field Defn: Defined on coordinates by sending (x : y : z) to (1/2*x : -1/2*y + 1/2*z))
An example with
morphism = Falsesage: R.<x,y,z> = QQ[] sage: C = Curve(7*x^2 + 2*y*z + z^2) sage: (p, i) = C.parametrization(morphism = False); (p, i) ([-2*x*y, x^2 + 7*y^2, -2*x^2], [-1/2*x, 1/7*y + 1/14*z]) sage: C.defining_polynomial()(p) 0 sage: i[0](p) / i[1](p) x/y
A
ValueErroris raised ifselfhas no rational pointsage: C = Conic(x^2 + 2*y^2 + z^2) sage: C.parametrization() Traceback (most recent call last): ... ValueError: Conic Projective Conic Curve over Rational Field defined by x^2 + 2*y^2 + z^2 has no rational points over Rational Field!
A
ValueErroris raised ifselfis not smoothsage: C = Conic(x^2 + y^2) sage: C.parametrization() Traceback (most recent call last): ... ValueError: The conic self (=Projective Conic Curve over Rational Field defined by x^2 + y^2) is not smooth, hence does not have a parametrization.
-
