Plane conic constructor#
AUTHORS:
Marco Streng (2010-07-20)
Nick Alexander (2008-01-08)
- sage.schemes.plane_conics.constructor.Conic(base_field, F=None, names=None, unique=True)[source]#
Return the plane projective conic curve defined by
F
overbase_field
.The input form
Conic(F, names=None)
is also accepted, in which case the fraction field of the base ring ofF
is used as base field.INPUT:
base_field
– The base field of the conic.names
– a list, tuple, or comma separated string of three variable names specifying the names of the coordinate functions of the ambient space \(\Bold{P}^3\). If not specified or read off fromF
, then this defaults to'x,y,z'
.F
– a polynomial, list, matrix, ternary quadratic form, or list or tuple of 5 points in the plane.If
F
is a polynomial or quadratic form, then the output is the curve in the projective plane defined byF = 0
.If
F
is a polynomial, then it must be a polynomial of degree at most 2 in 2 variables, or a homogeneous polynomial in of degree 2 in 3 variables.If
F
is a matrix, then the output is the zero locus of \((x,y,z) F (x,y,z)^t\).If
F
is a list of coefficients, then it has length 3 or 6 and gives the coefficients of the monomials \(x^2, y^2, z^2\) or all 6 monomials \(x^2, xy, xz, y^2, yz, z^2\) in lexicographic order.If
F
is a list of 5 points in the plane, then the output is a conic through those points.unique
– Used only ifF
is a list of points in the plane. If the conic through the points is not unique, then raiseValueError
if and only ifunique
isTrue
OUTPUT:
A plane projective conic curve defined by
F
over a field.EXAMPLES:
Conic curves given by polynomials
sage: X,Y,Z = QQ['X,Y,Z'].gens() sage: Conic(X^2 - X*Y + Y^2 - Z^2) Projective Conic Curve over Rational Field defined by X^2 - X*Y + Y^2 - Z^2 sage: x,y = GF(7)['x,y'].gens() sage: Conic(x^2 - x + 2*y^2 - 3, 'U,V,W') Projective Conic Curve over Finite Field of size 7 defined by U^2 + 2*V^2 - U*W - 3*W^2
>>> from sage.all import * >>> X,Y,Z = QQ['X,Y,Z'].gens() >>> Conic(X**Integer(2) - X*Y + Y**Integer(2) - Z**Integer(2)) Projective Conic Curve over Rational Field defined by X^2 - X*Y + Y^2 - Z^2 >>> x,y = GF(Integer(7))['x,y'].gens() >>> Conic(x**Integer(2) - x + Integer(2)*y**Integer(2) - Integer(3), 'U,V,W') Projective Conic Curve over Finite Field of size 7 defined by U^2 + 2*V^2 - U*W - 3*W^2
Conic curves given by matrices
sage: Conic(matrix(QQ, [[1, 2, 0], [4, 0, 0], [7, 0, 9]]), 'x,y,z') Projective Conic Curve over Rational Field defined by x^2 + 6*x*y + 7*x*z + 9*z^2 sage: x,y,z = GF(11)['x,y,z'].gens() sage: C = Conic(x^2 + y^2 - 2*z^2); C Projective Conic Curve over Finite Field of size 11 defined by x^2 + y^2 - 2*z^2 sage: Conic(C.symmetric_matrix(), 'x,y,z') Projective Conic Curve over Finite Field of size 11 defined by x^2 + y^2 - 2*z^2
>>> from sage.all import * >>> Conic(matrix(QQ, [[Integer(1), Integer(2), Integer(0)], [Integer(4), Integer(0), Integer(0)], [Integer(7), Integer(0), Integer(9)]]), 'x,y,z') Projective Conic Curve over Rational Field defined by x^2 + 6*x*y + 7*x*z + 9*z^2 >>> x,y,z = GF(Integer(11))['x,y,z'].gens() >>> C = Conic(x**Integer(2) + y**Integer(2) - Integer(2)*z**Integer(2)); C Projective Conic Curve over Finite Field of size 11 defined by x^2 + y^2 - 2*z^2 >>> Conic(C.symmetric_matrix(), 'x,y,z') Projective Conic Curve over Finite Field of size 11 defined by x^2 + y^2 - 2*z^2
Conics given by coefficients
sage: Conic(QQ, [1,2,3]) Projective Conic Curve over Rational Field defined by x^2 + 2*y^2 + 3*z^2 sage: Conic(GF(7), [1,2,3,4,5,6], 'X') Projective Conic Curve over Finite Field of size 7 defined by X0^2 + 2*X0*X1 - 3*X1^2 + 3*X0*X2 - 2*X1*X2 - X2^2
>>> from sage.all import * >>> Conic(QQ, [Integer(1),Integer(2),Integer(3)]) Projective Conic Curve over Rational Field defined by x^2 + 2*y^2 + 3*z^2 >>> Conic(GF(Integer(7)), [Integer(1),Integer(2),Integer(3),Integer(4),Integer(5),Integer(6)], 'X') Projective Conic Curve over Finite Field of size 7 defined by X0^2 + 2*X0*X1 - 3*X1^2 + 3*X0*X2 - 2*X1*X2 - X2^2
The conic through a set of points
sage: C = Conic(QQ, [[10,2],[3,4],[-7,6],[7,8],[9,10]]); C Projective Conic Curve over Rational Field defined by x^2 + 13/4*x*y - 17/4*y^2 - 35/2*x*z + 91/4*y*z - 37/2*z^2 sage: C.rational_point() (10 : 2 : 1) sage: C.point([3,4]) (3 : 4 : 1) sage: a = AffineSpace(GF(13), 2) sage: Conic([a([x,x^2]) for x in range(5)]) Projective Conic Curve over Finite Field of size 13 defined by x^2 - y*z
>>> from sage.all import * >>> C = Conic(QQ, [[Integer(10),Integer(2)],[Integer(3),Integer(4)],[-Integer(7),Integer(6)],[Integer(7),Integer(8)],[Integer(9),Integer(10)]]); C Projective Conic Curve over Rational Field defined by x^2 + 13/4*x*y - 17/4*y^2 - 35/2*x*z + 91/4*y*z - 37/2*z^2 >>> C.rational_point() (10 : 2 : 1) >>> C.point([Integer(3),Integer(4)]) (3 : 4 : 1) >>> a = AffineSpace(GF(Integer(13)), Integer(2)) >>> Conic([a([x,x**Integer(2)]) for x in range(Integer(5))]) Projective Conic Curve over Finite Field of size 13 defined by x^2 - y*z