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)[source]¶
Bases:
ProjectiveConic_number_field
Create a projective plane conic curve over
.See
Conic
for 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
>>> from sage.all import * >>> P = QQ['X, Y, Z']; (X, Y, Z,) = P._first_ngens(3) >>> Conic(X**Integer(2) + Y**Integer(2) - Integer(3)*Z**Integer(2)) Projective Conic Curve over Rational Field defined by X^2 + Y^2 - 3*Z^2
P.<X, Y, Z> = QQ[] Conic(X^2 + Y^2 - 3*Z^2)
- has_rational_point(point=False, obstruction=False, algorithm='default', read_cache=True)[source]¶
Return
True
if and only ifself
has a point defined over .If
point
andobstruction
are bothFalse
(default), then the output is a booleanout
saying whetherself
has a rational point.If
point
orobstruction
isTrue
, then the output is a pair(out, S)
, whereout
is as above and the following holds:if
point
isTrue
andself
has a rational point, thenS
is a rational point,if
obstruction
isTrue
andself
has no rational point, thenS
is a prime such that no rational point exists over the completion atS
or if no point exists over .
Points and obstructions are cached, whenever they are found. Cached information is used if and only if
read_cache
isTrue
.ALGORITHM:
The parameter
algorithm
specifies the algorithm to be used:'qfsolve'
– use PARI/GP function pari:qfsolve'rnfisnorm'
– use PARI’s function pari: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 withpoint = True
)'default'
– use'qfsolve'
'magma'
(requires Magma to be installed) – delegates the task to the Magma computer algebra system.
EXAMPLES:
sage: # needs sage.libs.pari 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)
>>> from sage.all import * >>> # needs sage.libs.pari >>> C = Conic(QQ, [Integer(1), Integer(2), -Integer(3)]) >>> C.has_rational_point(point=True) (True, (1 : 1 : 1)) >>> D = Conic(QQ, [Integer(1), Integer(3), -Integer(5)]) >>> D.has_rational_point(point=True) (False, 3) >>> P = QQ['X, Y, Z']; (X, Y, Z,) = P._first_ngens(3) >>> E = Curve(X**Integer(2) + Y**Integer(2) + Z**Integer(2)); E Projective Conic Curve over Rational Field defined by X^2 + Y^2 + Z^2 >>> E.has_rational_point(obstruction=True) (False, -1)
# needs sage.libs.pari C = Conic(QQ, [1, 2, -3]) C.has_rational_point(point=True) D = Conic(QQ, [1, 3, -5]) D.has_rational_point(point=True) P.<X,Y,Z> = QQ[] E = Curve(X^2 + Y^2 + Z^2); E E.has_rational_point(obstruction=True)
The following would not terminate quickly with
algorithm = 'rnfisnorm'
sage: C = Conic(QQ, [1, 113922743, -310146482690273725409]) sage: C.has_rational_point(point=True) # needs sage.libs.pari (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', # optional - magma ....: read_cache=False) (True, (30106379962113/7913 : 12747947692/7913 : 1))
>>> from sage.all import * >>> C = Conic(QQ, [Integer(1), Integer(113922743), -Integer(310146482690273725409)]) >>> C.has_rational_point(point=True) # needs sage.libs.pari (True, (-76842858034579/5424 : -5316144401/5424 : 1)) >>> C.has_rational_point(algorithm='local', read_cache=False) True >>> C.has_rational_point(point=True, algorithm='magma', # optional - magma ... read_cache=False) (True, (30106379962113/7913 : 12747947692/7913 : 1))
C = Conic(QQ, [1, 113922743, -310146482690273725409]) C.has_rational_point(point=True) # needs sage.libs.pari C.has_rational_point(algorithm='local', read_cache=False) C.has_rational_point(point=True, algorithm='magma', # optional - magma read_cache=False)
- is_locally_solvable(p)[source]¶
Return
True
if and only ifself
has a solution over the -adic numbers.Here
is a prime number or equals , infinity, or to denote the infinite place.EXAMPLES:
sage: # needs sage.libs.pari 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
>>> from sage.all import * >>> # needs sage.libs.pari >>> C = Conic(QQ, [Integer(1),Integer(2),Integer(3)]) >>> C.is_locally_solvable(-Integer(1)) False >>> C.is_locally_solvable(Integer(2)) False >>> C.is_locally_solvable(Integer(3)) True >>> C.is_locally_solvable(QQ.hom(RR)) False >>> D = Conic(QQ, [Integer(1), Integer(2), -Integer(3)]) >>> D.is_locally_solvable(infinity) True >>> D.is_locally_solvable(RR) True
# needs sage.libs.pari C = Conic(QQ, [1,2,3]) C.is_locally_solvable(-1) C.is_locally_solvable(2) C.is_locally_solvable(3) C.is_locally_solvable(QQ.hom(RR)) D = Conic(QQ, [1, 2, -3]) D.is_locally_solvable(infinity) D.is_locally_solvable(RR)
- local_obstructions(finite=True, infinite=True, read_cache=True)[source]¶
Return 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
finite
andinfinite
(bothTrue
by default) are used to specify whether to look at finite and/or infinite places.Note that
finite = True
involves factorization of the determinant ofself
, hence may be slow.Local obstructions are cached. The parameter
read_cache
specifies whether to look at the cache before computing anything.EXAMPLES:
sage: # needs sage.libs.pari 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]
>>> from sage.all import * >>> # needs sage.libs.pari >>> Conic(QQ, [Integer(1), Integer(1), Integer(1)]).local_obstructions() [2, -1] >>> Conic(QQ, [Integer(1), Integer(2), -Integer(3)]).local_obstructions() [] >>> Conic(QQ, [Integer(1), Integer(2), Integer(3), Integer(4), Integer(5), Integer(6)]).local_obstructions() [41, -1]
# needs sage.libs.pari Conic(QQ, [1, 1, 1]).local_obstructions() Conic(QQ, [1, 2, -3]).local_obstructions() Conic(QQ, [1, 2, 3, 4, 5, 6]).local_obstructions()
- parametrization(point=None, morphism=True)[source]¶
Return a parametrization
ofself
together with the inverse of .If
point
is specified, then that point is used for the parametrization. Otherwise, useself.rational_point()
to find a point.If
morphism
isTrue
, 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 pari:qfparam.
EXAMPLES:
sage: # needs sage.libs.pari 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))
>>> from sage.all import * >>> # needs sage.libs.pari >>> c = Conic([Integer(1),Integer(1),-Integer(1)]) >>> 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))
# needs sage.libs.pari c = Conic([1,1,-1]) c.parametrization()
An example with
morphism = False
sage: # needs sage.libs.pari sage: 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
>>> from sage.all import * >>> # needs sage.libs.pari >>> R = QQ['x, y, z']; (x, y, z,) = R._first_ngens(3) >>> C = Curve(Integer(7)*x**Integer(2) + Integer(2)*y*z + z**Integer(2)) >>> (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]) >>> C.defining_polynomial()(p) 0 >>> i[Integer(0)](p) / i[Integer(1)](p) x/y
# needs sage.libs.pari R.<x,y,z> = QQ[] C = Curve(7*x^2 + 2*y*z + z^2) (p, i) = C.parametrization(morphism=False); (p, i) C.defining_polynomial()(p) i[0](p) / i[1](p)
A
ValueError
is raised ifself
has no rational pointsage: # needs sage.libs.pari sage: 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!
>>> from sage.all import * >>> # needs sage.libs.pari >>> C = Conic(x**Integer(2) + Integer(2)*y**Integer(2) + z**Integer(2)) >>> 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!
# needs sage.libs.pari C = Conic(x^2 + 2*y^2 + z^2) C.parametrization()
A
ValueError
is raised ifself
is not smoothsage: # needs sage.libs.pari sage: 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.
>>> from sage.all import * >>> # needs sage.libs.pari >>> C = Conic(x**Integer(2) + y**Integer(2)) >>> 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.
# needs sage.libs.pari C = Conic(x^2 + y^2) C.parametrization()