Ambient spaces¶
- class sage.schemes.generic.ambient_space.AmbientSpace(n, R=Integer Ring)[source]¶
- Bases: - Scheme- Base class for ambient spaces over a ring. - INPUT: - n– dimension
- R– ring
 - ambient_space()[source]¶
- Return the ambient space of the scheme self, in this case self itself. - EXAMPLES: - sage: P = ProjectiveSpace(4, ZZ) sage: P.ambient_space() is P True sage: A = AffineSpace(2, GF(3)) sage: A.ambient_space() Affine Space of dimension 2 over Finite Field of size 3 - >>> from sage.all import * >>> P = ProjectiveSpace(Integer(4), ZZ) >>> P.ambient_space() is P True >>> A = AffineSpace(Integer(2), GF(Integer(3))) >>> A.ambient_space() Affine Space of dimension 2 over Finite Field of size 3 
 - base_extend(R)[source]¶
- Return the natural extension of - selfover- R.- INPUT: - R– a commutative ring, such that there is a natural map from the base ring of- selfto- R
 - OUTPUT: an ambient space over - Rof the same structure as- self- Note - A - ValueErroris raised if there is no such natural map. If you need to drop this condition, use- self.change_ring(R).- EXAMPLES: - sage: P.<x, y, z> = ProjectiveSpace(2, ZZ) sage: PQ = P.base_extend(QQ); PQ Projective Space of dimension 2 over Rational Field sage: PQ.base_extend(GF(5)) Traceback (most recent call last): ... ValueError: no natural map from the base ring (=Rational Field) to R (=Finite Field of size 5)! - >>> from sage.all import * >>> P = ProjectiveSpace(Integer(2), ZZ, names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3) >>> PQ = P.base_extend(QQ); PQ Projective Space of dimension 2 over Rational Field >>> PQ.base_extend(GF(Integer(5))) Traceback (most recent call last): ... ValueError: no natural map from the base ring (=Rational Field) to R (=Finite Field of size 5)! 
 - change_ring(R)[source]¶
- Return an ambient space over ring \(R\) and otherwise the same as - self.- INPUT: - R– commutative ring
 - OUTPUT: ambient space over - R- Note - There is no need to have any relation between \(R\) and the base ring of self, if you want to have such a relation, use - self.base_extend(R)instead.
 - defining_polynomials()[source]¶
- Return the defining polynomials of the scheme - self. Since- selfis an ambient space, this is an empty list.- EXAMPLES: - sage: ProjectiveSpace(2, QQ).defining_polynomials() () sage: AffineSpace(0, ZZ).defining_polynomials() () - >>> from sage.all import * >>> ProjectiveSpace(Integer(2), QQ).defining_polynomials() () >>> AffineSpace(Integer(0), ZZ).defining_polynomials() () 
 - dimension()[source]¶
- Return the absolute dimension of this scheme. - EXAMPLES: - sage: A2Q = AffineSpace(2, QQ) sage: A2Q.dimension_absolute() 2 sage: A2Q.dimension() 2 sage: A2Z = AffineSpace(2, ZZ) sage: A2Z.dimension_absolute() 3 sage: A2Z.dimension() 3 - >>> from sage.all import * >>> A2Q = AffineSpace(Integer(2), QQ) >>> A2Q.dimension_absolute() 2 >>> A2Q.dimension() 2 >>> A2Z = AffineSpace(Integer(2), ZZ) >>> A2Z.dimension_absolute() 3 >>> A2Z.dimension() 3 
 - dimension_absolute()[source]¶
- Return the absolute dimension of this scheme. - EXAMPLES: - sage: A2Q = AffineSpace(2, QQ) sage: A2Q.dimension_absolute() 2 sage: A2Q.dimension() 2 sage: A2Z = AffineSpace(2, ZZ) sage: A2Z.dimension_absolute() 3 sage: A2Z.dimension() 3 - >>> from sage.all import * >>> A2Q = AffineSpace(Integer(2), QQ) >>> A2Q.dimension_absolute() 2 >>> A2Q.dimension() 2 >>> A2Z = AffineSpace(Integer(2), ZZ) >>> A2Z.dimension_absolute() 3 >>> A2Z.dimension() 3 
 - dimension_relative()[source]¶
- Return the relative dimension of this scheme over its base. - EXAMPLES: - sage: A2Q = AffineSpace(2, QQ) sage: A2Q.dimension_relative() 2 sage: A2Z = AffineSpace(2, ZZ) sage: A2Z.dimension_relative() 2 - >>> from sage.all import * >>> A2Q = AffineSpace(Integer(2), QQ) >>> A2Q.dimension_relative() 2 >>> A2Z = AffineSpace(Integer(2), ZZ) >>> A2Z.dimension_relative() 2 
 - gen(n=0)[source]¶
- Return the \(n\)-th generator of the coordinate ring of the scheme - self.- EXAMPLES: - sage: P.<x, y, z> = ProjectiveSpace(2, ZZ) sage: P.gen(1) y - >>> from sage.all import * >>> P = ProjectiveSpace(Integer(2), ZZ, names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3) >>> P.gen(Integer(1)) y 
 - gens()[source]¶
- Return the generators of the coordinate ring of the scheme - self.- EXAMPLES: - sage: AffineSpace(0, QQ).gens() () sage: P.<x, y, z> = ProjectiveSpace(2, GF(5)) sage: P.gens() (x, y, z) - >>> from sage.all import * >>> AffineSpace(Integer(0), QQ).gens() () >>> P = ProjectiveSpace(Integer(2), GF(Integer(5)), names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3) >>> P.gens() (x, y, z) 
 - identity_morphism()[source]¶
- Return the identity morphism. - OUTPUT: the identity morphism of the scheme - self- EXAMPLES: - sage: A = AffineSpace(2, GF(3)) sage: A.identity_morphism() Scheme endomorphism of Affine Space of dimension 2 over Finite Field of size 3 Defn: Identity map sage: P = ProjectiveSpace(3, ZZ) sage: P.identity_morphism() Scheme endomorphism of Projective Space of dimension 3 over Integer Ring Defn: Identity map - >>> from sage.all import * >>> A = AffineSpace(Integer(2), GF(Integer(3))) >>> A.identity_morphism() Scheme endomorphism of Affine Space of dimension 2 over Finite Field of size 3 Defn: Identity map >>> P = ProjectiveSpace(Integer(3), ZZ) >>> P.identity_morphism() Scheme endomorphism of Projective Space of dimension 3 over Integer Ring Defn: Identity map 
 - is_projective()[source]¶
- Return whether this ambient space is projective n-space. - EXAMPLES: - sage: AffineSpace(3, QQ).is_projective() False sage: ProjectiveSpace(3, QQ).is_projective() True - >>> from sage.all import * >>> AffineSpace(Integer(3), QQ).is_projective() False >>> ProjectiveSpace(Integer(3), QQ).is_projective() True 
 
- sage.schemes.generic.ambient_space.is_AmbientSpace(x)[source]¶
- Return - Trueif \(x\) is an ambient space.- EXAMPLES: - sage: from sage.schemes.generic.ambient_space import is_AmbientSpace sage: is_AmbientSpace(ProjectiveSpace(3, ZZ)) doctest:warning... DeprecationWarning: The function is_AmbientSpace is deprecated; use 'isinstance(..., AmbientSpace)' instead. See https://github.com/sagemath/sage/issues/38022 for details. True sage: is_AmbientSpace(AffineSpace(2, QQ)) True sage: P.<x, y, z> = ProjectiveSpace(2, ZZ) sage: is_AmbientSpace(P.subscheme([x + y + z])) False - >>> from sage.all import * >>> from sage.schemes.generic.ambient_space import is_AmbientSpace >>> is_AmbientSpace(ProjectiveSpace(Integer(3), ZZ)) doctest:warning... DeprecationWarning: The function is_AmbientSpace is deprecated; use 'isinstance(..., AmbientSpace)' instead. See https://github.com/sagemath/sage/issues/38022 for details. True >>> is_AmbientSpace(AffineSpace(Integer(2), QQ)) True >>> P = ProjectiveSpace(Integer(2), ZZ, names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3) >>> is_AmbientSpace(P.subscheme([x + y + z])) False