Module: sage.schemes.generic.affine_space
Module-level Functions
n, [R=None], [names=None]) |
Return affine space of dimension
over the ring
.
The dimension and ring can be given in either order.
sage: AffineSpace(3, QQ) Affine Space of dimension 3 over Rational Field sage: AffineSpace(5, QQ) Affine Space of dimension 5 over Rational Field sage: A = AffineSpace(2, QQ, names='XY'); A Affine Space of dimension 2 over Rational Field sage: A.coordinate_ring() Polynomial Ring in X, Y over Rational Field
Use the divide operator for base extension.
sage: AffineSpace(5)/GF(17) Affine Space of dimension 5 over Finite Field of size 17
The default base ring is
.
sage: AffineSpace(5) Affine Space of dimension 5 over Integer Ring
There is also an affine space associated each polynomial ring.
sage: R = GF(7)['x,y,z'] sage: A = AffineSpace(R); A Affine Space of dimension 3 over Finite Field of size 7 sage: A.coordinate_ring() is R True
x) |
Returns True if x is an affine space, i.e., an ambient space
, where
is a ring and
is an integer.
sage: is_AffineSpace(AffineSpace(5)) True sage: is_AffineSpace(AffineSpace(5, GF(9))) True sage: is_AffineSpace(Spec(Z)) False
Class: AffineSpace_generic
sage: X = AffineSpace(3, Q) sage: X.base_scheme() Spectrum of Rational Field sage: X.base_ring() Rational Field sage: X.structure_morphism () Scheme morphism: From: Affine Space of dimension 3 over Rational Field To: Spectrum of Rational Field Defn: Structure map
Loading and saving:
sage: loads(X.dumps()) == X True
We create several other examples of affine spaces.
sage: AffineSpace(5, PolynomialRing(Q, 'z')) Affine Space of dimension 5 over Univariate Polynomial Ring in z over Rational Field
sage: AffineSpace(3, RealField()) Affine Space of dimension 3 over Real Field with 53 bits of precision
sage: AffineSpace(2, pAdicField(7)) Affine Space of dimension 2 over 7-adic Field
Even 0-dimensional affine spaces are supported.
sage: AffineSpace(0) Affine Space of dimension 0 over Integer Ring
self, n, R, [names=None]) |
Functions: coordinate_ring,
projective_embedding,
rational_points,
subscheme,
subscheme_complement
self) |
Return the coordinate ring of this scheme, if defined. Otherwise raise a ValueError.
sage: R = AffineSpace(2, GF(9)).coordinate_ring(); R Polynomial Ring in x0, x1 over Finite Field in a of size 3^2 sage: AffineSpace(3, R).coordinate_ring() Polynomial Ring in x0, x1, x2 over Polynomial Ring in x0, x1 over Finite Field in a of size 3^2
self, [i=None], [PP=None]) |
Returns a morphism from this space into an ambient projective space of the same dimension.
INPUT: i -- integer (default: dimension of self = last coordinate) determines which projective embedding to compute. The embedding is that which has a 1 in the i-th coordinate, numbered from 0.
PP - (default: None) ambient projective space, i.e., codomain of morphism; this is constructed if it is not given.
sage: AA = AffineSpace(2, Q) sage: pi = AA.projective_embedding(0); pi Scheme morphism: From: Affine Space of dimension 2 over Rational Field To: Projective Space of dimension 2 over Rational Field Defn: Defined on coordinates by sending (x0, x1) to (1 : x0 : x1) sage: z = AA(3,4) sage: pi(z) (1/4 : 3/4 : 1) sage: pi(AA(0,2)) (1/2 : 0 : 1) sage: pi = AA.projective_embedding(1); pi Scheme morphism: From: Affine Space of dimension 2 over Rational Field To: Projective Space of dimension 2 over Rational Field Defn: Defined on coordinates by sending (x0, x1) to (x0 : 1 : x1) sage: pi(z) (3/4 : 1/4 : 1) sage: pi = AA.projective_embedding(2) sage: pi(z) (3 : 4 : 1)
self, X) |
Return the closed subscheme defined by X.
INPUT: X -- a list or tuple of equations
sage: A, (x,y) = AffineSpace(2, Q).objgens('xy') sage: X = A.subscheme([x, y^2, x*y^2]); X Closed subscheme of Affine Space of dimension 2 over Rational Field defined by: x y^2 x*y^2
sage: X.defining_polynomials () (x, y^2, x*y^2) sage: I = X.defining_ideal(); I Ideal (y^2, x, x*y^2) of Polynomial Ring in x, y over Rational Field sage: I.groebner_basis() [x, y^2] sage: X.dimension() 0 sage: X.base_ring() Rational Field sage: X.base_scheme() Spectrum of Rational Field sage: X.structure_morphism() Scheme morphism: From: Closed subscheme of Affine Space of dimension 2 over Rational Field defined by: x y^2 x*y^2 To: Spectrum of Rational Field Defn: Structure map sage: X.dimension() 0
Special Functions: __cmp__,
__iter__,
__pow__,
_constructor,
_homset_class,
_latex_,
_latex_generic_point,
_point_class,
_point_morphism_class,
_repr_,
_repr_generic_point
self, right) |
sage: AffineSpace(3, Q) == AffineSpace(3, Z) False sage: AffineSpace(1, Z) == AffineSpace(0, Z) False sage: loads(AffineSpace(1, Z).dumps()) == AffineSpace(1, Z) True
self) |
Return iterator over the elements of this affine space when defined over a finite field.
sage: FF = FiniteField(3) sage: AA = AffineSpace(0, FF) sage: [ x for x in AA ] [()] sage: AA = AffineSpace(1, FF) sage: [ x for x in AA ] [(0), (1), (2)] sage: AA = AffineSpace(2, FF) sage: [ x for x in AA ] [(0, 0), (1, 0), (2, 0), (0, 1), (1, 1), (2, 1), (0, 2), (1, 2), (2, 2)]
Author: David Kohel (kohel@maths.usyd.edu.au)
self, m) |
sage: A = AffineSpace(1, Q) sage: A^5 Affine Space of dimension 5 over Rational Field
self) |
sage: print latex(AffineSpace(1, Z)) {\mathbf A}_{\mbox{\bf{}Z}}^1