Points on affine varieties#
This module implements scheme morphism for points on affine varieties.
AUTHORS:
David Kohel, William Stein (2006): initial version
Volker Braun (2011-08-08): renamed classes, more documentation, misc cleanups
Ben Hutz (2013): many improvements
- class sage.schemes.affine.affine_point.SchemeMorphism_point_affine(X, v, check=True)[source]#
Bases:
SchemeMorphism_point
A rational point on an affine scheme.
INPUT:
X
– a subscheme of an ambient affine space over a ring \(R\)v
– a list/tuple/iterable of coordinates in \(R\)check
– boolean (default:True
); whether to check the input for consistency
EXAMPLES:
sage: A = AffineSpace(2, QQ) sage: A(1, 2) (1, 2)
>>> from sage.all import * >>> A = AffineSpace(Integer(2), QQ) >>> A(Integer(1), Integer(2)) (1, 2)
- global_height(prec=None)[source]#
Returns the logarithmic height of the point.
INPUT:
prec
– desired floating point precision (default: default RealField precision).
OUTPUT:
a real number.
EXAMPLES:
sage: P.<x,y> = AffineSpace(QQ, 2) sage: Q = P(41, 1/12) sage: Q.global_height() # needs sage.rings.real_mpfr 3.71357206670431
>>> from sage.all import * >>> P = AffineSpace(QQ, Integer(2), names=('x', 'y',)); (x, y,) = P._first_ngens(2) >>> Q = P(Integer(41), Integer(1)/Integer(12)) >>> Q.global_height() # needs sage.rings.real_mpfr 3.71357206670431
sage: P = AffineSpace(ZZ, 4, 'x') sage: Q = P(3, 17, -51, 5) sage: Q.global_height() # needs sage.rings.real_mpfr 3.93182563272433
>>> from sage.all import * >>> P = AffineSpace(ZZ, Integer(4), 'x') >>> Q = P(Integer(3), Integer(17), -Integer(51), Integer(5)) >>> Q.global_height() # needs sage.rings.real_mpfr 3.93182563272433
sage: R.<x> = PolynomialRing(QQ) sage: k.<w> = NumberField(x^2 + 5) # needs sage.rings.number_field sage: A = AffineSpace(k, 2, 'z') # needs sage.rings.number_field sage: A([3, 5*w + 1]).global_height(prec=100) # needs sage.rings.number_field sage.rings.real_mpfr 2.4181409534757389986565376694
>>> from sage.all import * >>> R = PolynomialRing(QQ, names=('x',)); (x,) = R._first_ngens(1) >>> k = NumberField(x**Integer(2) + Integer(5), names=('w',)); (w,) = k._first_ngens(1)# needs sage.rings.number_field >>> A = AffineSpace(k, Integer(2), 'z') # needs sage.rings.number_field >>> A([Integer(3), Integer(5)*w + Integer(1)]).global_height(prec=Integer(100)) # needs sage.rings.number_field sage.rings.real_mpfr 2.4181409534757389986565376694
Todo
P-adic heights.
- homogenize(n)[source]#
Return the homogenization of the point at the
nth
coordinate.INPUT:
n
– integer between 0 and dimension of the map, inclusive.
OUTPUT:
A point in the projectivization of the codomain of the map .
EXAMPLES:
sage: A.<x,y> = AffineSpace(ZZ, 2) sage: Q = A(2, 3) sage: Q.homogenize(2).dehomogenize(2) == Q True :: sage: A.<x,y> = AffineSpace(QQ, 2) sage: Q = A(2, 3) sage: P = A(0, 1) sage: Q.homogenize(2).codomain() == P.homogenize(2).codomain() True
>>> from sage.all import * >>> A = AffineSpace(ZZ, Integer(2), names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> Q = A(Integer(2), Integer(3)) >>> Q.homogenize(Integer(2)).dehomogenize(Integer(2)) == Q True :: >>> A = AffineSpace(QQ, Integer(2), names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> Q = A(Integer(2), Integer(3)) >>> P = A(Integer(0), Integer(1)) >>> Q.homogenize(Integer(2)).codomain() == P.homogenize(Integer(2)).codomain() True
- class sage.schemes.affine.affine_point.SchemeMorphism_point_affine_field(X, v, check=True)[source]#
Bases:
SchemeMorphism_point_affine
- as_subscheme()[source]#
Return the subscheme associated with this rational point.
EXAMPLES:
sage: A2.<x,y> = AffineSpace(QQ, 2) sage: p1 = A2.point([0,0]).as_subscheme(); p1 Closed subscheme of Affine Space of dimension 2 over Rational Field defined by: x, y sage: p2 = A2.point([1,1]).as_subscheme(); p2 Closed subscheme of Affine Space of dimension 2 over Rational Field defined by: x - 1, y - 1 sage: p1 + p2 Closed subscheme of Affine Space of dimension 2 over Rational Field defined by: x - y, y^2 - y
>>> from sage.all import * >>> A2 = AffineSpace(QQ, Integer(2), names=('x', 'y',)); (x, y,) = A2._first_ngens(2) >>> p1 = A2.point([Integer(0),Integer(0)]).as_subscheme(); p1 Closed subscheme of Affine Space of dimension 2 over Rational Field defined by: x, y >>> p2 = A2.point([Integer(1),Integer(1)]).as_subscheme(); p2 Closed subscheme of Affine Space of dimension 2 over Rational Field defined by: x - 1, y - 1 >>> p1 + p2 Closed subscheme of Affine Space of dimension 2 over Rational Field defined by: x - y, y^2 - y
- intersection_multiplicity(X)[source]#
Return the intersection multiplicity of the codomain of this point and
X
at this point.This uses the intersection_multiplicity implementations for projective/affine subschemes. This point must be a point on an affine subscheme.
INPUT:
X
– a subscheme in the same ambient space as that of the codomain of this point.
OUTPUT: Integer.
EXAMPLES:
sage: # needs sage.libs.singular sage: A.<x,y> = AffineSpace(GF(17), 2) sage: X = A.subscheme([y^2 - x^3 + 2*x^2 - x]) sage: Y = A.subscheme([y - 2*x + 2]) sage: Q1 = Y([1,0]) sage: Q1.intersection_multiplicity(X) 2 sage: Q2 = X([4,6]) sage: Q2.intersection_multiplicity(Y) 1
>>> from sage.all import * >>> # needs sage.libs.singular >>> A = AffineSpace(GF(Integer(17)), Integer(2), names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> X = A.subscheme([y**Integer(2) - x**Integer(3) + Integer(2)*x**Integer(2) - x]) >>> Y = A.subscheme([y - Integer(2)*x + Integer(2)]) >>> Q1 = Y([Integer(1),Integer(0)]) >>> Q1.intersection_multiplicity(X) 2 >>> Q2 = X([Integer(4),Integer(6)]) >>> Q2.intersection_multiplicity(Y) 1
sage: A.<x,y,z,w> = AffineSpace(QQ, 4) sage: X = A.subscheme([x^2 - y*z^2, z - 2*w^2]) sage: Q = A([2,1,2,-1]) sage: Q.intersection_multiplicity(X) Traceback (most recent call last): ... TypeError: this point must be a point on an affine subscheme
>>> from sage.all import * >>> A = AffineSpace(QQ, Integer(4), names=('x', 'y', 'z', 'w',)); (x, y, z, w,) = A._first_ngens(4) >>> X = A.subscheme([x**Integer(2) - y*z**Integer(2), z - Integer(2)*w**Integer(2)]) >>> Q = A([Integer(2),Integer(1),Integer(2),-Integer(1)]) >>> Q.intersection_multiplicity(X) Traceback (most recent call last): ... TypeError: this point must be a point on an affine subscheme
- multiplicity()[source]#
Return the multiplicity of this point on its codomain.
Uses the subscheme multiplicity implementation. This point must be a point on an affine subscheme.
OUTPUT: an integer.
EXAMPLES:
sage: A.<x,y,z> = AffineSpace(QQ, 3) sage: X = A.subscheme([y^2 - x^7*z]) sage: Q1 = X([1,1,1]) sage: Q1.multiplicity() # needs sage.libs.singular 1 sage: Q2 = X([0,0,2]) sage: Q2.multiplicity() # needs sage.libs.singular 2
>>> from sage.all import * >>> A = AffineSpace(QQ, Integer(3), names=('x', 'y', 'z',)); (x, y, z,) = A._first_ngens(3) >>> X = A.subscheme([y**Integer(2) - x**Integer(7)*z]) >>> Q1 = X([Integer(1),Integer(1),Integer(1)]) >>> Q1.multiplicity() # needs sage.libs.singular 1 >>> Q2 = X([Integer(0),Integer(0),Integer(2)]) >>> Q2.multiplicity() # needs sage.libs.singular 2
- weil_restriction()[source]#
Compute the Weil restriction of this point over some extension field.
If the field is a finite field, then this computes the Weil restriction to the prime subfield.
A Weil restriction of scalars - denoted \(Res_{L/k}\) - is a functor which, for any finite extension of fields \(L/k\) and any algebraic variety \(X\) over \(L\), produces another corresponding variety \(Res_{L/k}(X)\), defined over \(k\). It is useful for reducing questions about varieties over large fields to questions about more complicated varieties over smaller fields. This functor applied to a point gives the equivalent point on the Weil restriction of its codomain.
OUTPUT: Scheme point on the Weil restriction of the codomain of this point.
EXAMPLES:
sage: # needs sage.libs.singular sage.rings.finite_rings sage: A.<x,y,z> = AffineSpace(GF(5^3, 't'), 3) sage: X = A.subscheme([y^2 - x*z, z^2 + y]) sage: Y = X.weil_restriction() sage: P = X([1, -1, 1]) sage: Q = P.weil_restriction();Q (1, 0, 0, 4, 0, 0, 1, 0, 0) sage: Q.codomain() == Y True
>>> from sage.all import * >>> # needs sage.libs.singular sage.rings.finite_rings >>> A = AffineSpace(GF(Integer(5)**Integer(3), 't'), Integer(3), names=('x', 'y', 'z',)); (x, y, z,) = A._first_ngens(3) >>> X = A.subscheme([y**Integer(2) - x*z, z**Integer(2) + y]) >>> Y = X.weil_restriction() >>> P = X([Integer(1), -Integer(1), Integer(1)]) >>> Q = P.weil_restriction();Q (1, 0, 0, 4, 0, 0, 1, 0, 0) >>> Q.codomain() == Y True
sage: # needs sage.libs.singular sage.rings.number_field sage: R.<x> = QQ[] sage: K.<w> = NumberField(x^5 - 2) sage: R.<x> = K[] sage: L.<v> = K.extension(x^2 + w) sage: A.<x,y> = AffineSpace(L, 2) sage: P = A([w^3 - v, 1 + w + w*v]) sage: P.weil_restriction() (w^3, -1, w + 1, w)
>>> from sage.all import * >>> # needs sage.libs.singular sage.rings.number_field >>> R = QQ['x']; (x,) = R._first_ngens(1) >>> K = NumberField(x**Integer(5) - Integer(2), names=('w',)); (w,) = K._first_ngens(1) >>> R = K['x']; (x,) = R._first_ngens(1) >>> L = K.extension(x**Integer(2) + w, names=('v',)); (v,) = L._first_ngens(1) >>> A = AffineSpace(L, Integer(2), names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> P = A([w**Integer(3) - v, Integer(1) + w + w*v]) >>> P.weil_restriction() (w^3, -1, w + 1, w)