Projective n space over a ring.

EXAMPLES: We construct projective space over various rings of various dimensions.

The simplest projective space:

sage: ProjectiveSpace(0)
Projective Space of dimension 0 over Integer Ring

A slightly bigger projective space over \QQ:

sage: X = ProjectiveSpace(1000, QQ); X
Projective Space of dimension 1000 over Rational Field
sage: X.dimension()
1000

We can use “over” notation to create projective spaces over various base rings.

sage: X = ProjectiveSpace(5)/QQ; X
Projective Space of dimension 5 over Rational Field
sage: X/CC
Projective Space of dimension 5 over Complex Field with 53 bits of precision

The third argument specifies the printing names of the generators of the homogenous coordinate ring. Using objgens() you can obtain both the space and the generators as ready to use variables.

sage: P2, (x,y,z) = ProjectiveSpace(2, QQ, 'xyz').objgens()
sage: P2
Projective Space of dimension 2 over Rational Field
sage: x.parent()
Multivariate Polynomial Ring in x, y, z over Rational Field

For example, we use x,y,z to define the intersection of two lines.

sage: V = P2.subscheme([x+y+z, x+y-z]); V
Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
 x + y + z
 x + y - z
sage: V.dimension()
0
sage.schemes.generic.projective_space.ProjectiveSpace(n, R=None, names='x')

Return projective space of dimension n over the ring R.

EXAMPLES: The dimension and ring can be given in either order.

sage: ProjectiveSpace(3, QQ)
Projective Space of dimension 3 over Rational Field
sage: ProjectiveSpace(5, QQ)
Projective Space of dimension 5 over Rational Field
sage: P = ProjectiveSpace(2, QQ, names='XYZ'); P
Projective Space of dimension 2 over Rational Field
sage: P.coordinate_ring()
Multivariate Polynomial Ring in X, Y, Z over Rational Field

The divide operator does base extension.

sage: ProjectiveSpace(5)/GF(17)
Projective Space of dimension 5 over Finite Field of size 17

The default base ring is \ZZ.

sage: ProjectiveSpace(5)
Projective Space of dimension 5 over Integer Ring

There is also an projective space associated each polynomial ring.

sage: R = GF(7)['x,y,z']
sage: P = ProjectiveSpace(R); P
Projective Space of dimension 2 over Finite Field of size 7
sage: P.coordinate_ring()
Multivariate Polynomial Ring in x, y, z over Finite Field of size 7
sage: P.coordinate_ring() is R
True

Projective spaces are not cached, i.e., there can be several with the same base ring and dimension (to facilitate gluing constructions).

class sage.schemes.generic.projective_space.ProjectiveSpace_field(n, R=Integer Ring, names=None)
_homset_class(*args, **kwds)
_point_class(*args, **kwds)
class sage.schemes.generic.projective_space.ProjectiveSpace_finite_field(n, R=Integer Ring, names=None)
__iter__()

Return iterator over the elements of this projective space.

Note that iteration is over the decomposition

System Message: WARNING/2 (\PP^n = \mathbb{A}A^n \cup \PP^n-1)

latex exited with error: [stderr] [stdout] This is pdfTeX, Version 3.141592-1.40.5 (Web2C 7.5.5) entering extended mode (./math.tex LaTeX2e <2005/12/01> Babel <v3.8h> and hyphenation patterns for american, french, german, ngerman, b ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, esperanto, e stonian, finnish, greek, icelandic, irish, italian, latin, magyar, norsk, polis h, portuges, romanian, russian, serbian, slovak, slovene, spanish, swedish, tur kish, ukrainian, nohyphenation, loaded. (/usr/share/texmf/tex/latex/base/article.cls Document Class: article 2005/09/16 v1.4f Standard LaTeX document class (/usr/share/texmf/tex/latex/base/size12.clo)) (/usr/share/texmf/tex/latex/base/inputenc.sty (/usr/share/texmf/tex/latex/base/utf8.def (/usr/share/texmf/tex/latex/base/t1enc.dfu) (/usr/share/texmf/tex/latex/base/ot1enc.dfu) (/usr/share/texmf/tex/latex/base/omsenc.dfu))) (/usr/share/texmf/tex/latex/amsmath/amsmath.sty For additional information on amsmath, use the `?’ option. (/usr/share/texmf/tex/latex/amsmath/amstext.sty (/usr/share/texmf/tex/latex/amsmath/amsgen.sty)) (/usr/share/texmf/tex/latex/amsmath/amsbsy.sty) (/usr/share/texmf/tex/latex/amsmath/amsopn.sty)) (/usr/share/texmf/tex/latex/amscls/amsthm.sty) (/usr/share/texmf/tex/latex/amsfonts/amssymb.sty (/usr/share/texmf/tex/latex/amsfonts/amsfonts.sty)) (/usr/share/texmf/tex/latex/tools/bm.sty) (./math.aux) (/usr/share/texmf/tex/latex/amsfonts/umsa.fd) (/usr/share/texmf/tex/latex/amsfonts/umsb.fd) ! Undefined control sequence. <recently read> \PP l.30 $\PP ^n = \mathbb{A}A^n \cup \PP^n-1$ ! Undefined control sequence. l.30 $\PP^n = \mathbb{A}A^n \cup \PP ^n-1$ [1] (./math.aux) ) (see the transcript file for additional information) Output written on math.dvi (1 page, 424 bytes). Transcript written on math.log.
, where \mathbb{A}A^n is the n-th affine patch and

System Message: WARNING/2 (\PP^n-1)

latex exited with error: [stderr] [stdout] This is pdfTeX, Version 3.141592-1.40.5 (Web2C 7.5.5) entering extended mode (./math.tex LaTeX2e <2005/12/01> Babel <v3.8h> and hyphenation patterns for american, french, german, ngerman, b ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, esperanto, e stonian, finnish, greek, icelandic, irish, italian, latin, magyar, norsk, polis h, portuges, romanian, russian, serbian, slovak, slovene, spanish, swedish, tur kish, ukrainian, nohyphenation, loaded. (/usr/share/texmf/tex/latex/base/article.cls Document Class: article 2005/09/16 v1.4f Standard LaTeX document class (/usr/share/texmf/tex/latex/base/size12.clo)) (/usr/share/texmf/tex/latex/base/inputenc.sty (/usr/share/texmf/tex/latex/base/utf8.def (/usr/share/texmf/tex/latex/base/t1enc.dfu) (/usr/share/texmf/tex/latex/base/ot1enc.dfu) (/usr/share/texmf/tex/latex/base/omsenc.dfu))) (/usr/share/texmf/tex/latex/amsmath/amsmath.sty For additional information on amsmath, use the `?’ option. (/usr/share/texmf/tex/latex/amsmath/amstext.sty (/usr/share/texmf/tex/latex/amsmath/amsgen.sty)) (/usr/share/texmf/tex/latex/amsmath/amsbsy.sty) (/usr/share/texmf/tex/latex/amsmath/amsopn.sty)) (/usr/share/texmf/tex/latex/amscls/amsthm.sty) (/usr/share/texmf/tex/latex/amsfonts/amssymb.sty (/usr/share/texmf/tex/latex/amsfonts/amsfonts.sty)) (/usr/share/texmf/tex/latex/tools/bm.sty) (./math.aux) (/usr/share/texmf/tex/latex/amsfonts/umsa.fd) (/usr/share/texmf/tex/latex/amsfonts/umsb.fd) ! Undefined control sequence. <recently read> \PP l.30 $\PP ^n-1$ [1] (./math.aux) ) (see the transcript file for additional information) Output written on math.dvi (1 page, 308 bytes). Transcript written on math.log.
is the hyperplane at infinity x_n = 0.

EXAMPLES:

sage: FF = FiniteField(3)
sage: PP = ProjectiveSpace(0,FF)
sage: [ x for x in PP ]
[(1)]
sage: PP = ProjectiveSpace(1,FF)
sage: [ x for x in PP ]
[(0 : 1), (1 : 1), (2 : 1), (1 : 0)]
sage: PP = ProjectiveSpace(2,FF)
sage: [ x for x in PP ]
[(0 : 0 : 1),
 (1 : 0 : 1),
 (2 : 0 : 1),
 (0 : 1 : 1),
 (1 : 1 : 1),
 (2 : 1 : 1),
 (0 : 2 : 1),
 (1 : 2 : 1),
 (2 : 2 : 1),
 (0 : 1 : 0),
 (1 : 1 : 0),
 (2 : 1 : 0),
 (1 : 0 : 0)]

AUTHORS:

  • David Kohel

TODO: Iteration for point sets over finite fields, and return of iter of point set over base field. Note that the point set does not know whether this is a projective space or subscheme.

rational_points(F=None)

Return the list of F-rational points on the affine space self, where F is a given finite field, or the base ring of self.

EXAMPLES:

sage: P = ProjectiveSpace(1, GF(3))
sage: P.rational_points()
[(0 : 1), (1 : 1), (2 : 1), (1 : 0)]
sage: P.rational_points(GF(3^2, 'b'))
[(0 : 1), (2*b : 1), (b + 1 : 1), (b + 2 : 1), (2 : 1), (b : 1), (2*b + 2 : 1), (2*b + 1 : 1), (1 : 1), (1 : 0)]
class sage.schemes.generic.projective_space.ProjectiveSpace_rational_field(n, R=Integer Ring, names=None)
rational_points(bound=0)

Returns the projective points (x_0:\cdots:x_n) over \QQ with |x_i| \leq bound.

INPUT:

  • bound - integer

EXAMPLES:

sage: PP = ProjectiveSpace(0,QQ)
sage: PP.rational_points(1)
[(1)]
sage: PP = ProjectiveSpace(1,QQ)
sage: PP.rational_points(2)
[(-2 : 1), (-1 : 1), (0 : 1), (1 : 1), (2 : 1), (-1/2 : 1), (1/2 : 1), (1 : 0)]
sage: PP = ProjectiveSpace(2,QQ)
sage: PP.rational_points(2)
[(-2 : -2 : 1), (-1 : -2 : 1), (0 : -2 : 1), (1 : -2 : 1), (2 : -2 : 1),
(-2 : -1 : 1), (-1 : -1 : 1), (0 : -1 : 1), (1 : -1 : 1), (2 : -1 : 1),
(-2 : 0 : 1), (-1 : 0 : 1), (0 : 0 : 1), (1 : 0 : 1), (2 : 0 : 1), (-2 :
1 : 1), (-1 : 1 : 1), (0 : 1 : 1), (1 : 1 : 1), (2 : 1 : 1), (-2 : 2 :
1), (-1 : 2 : 1), (0 : 2 : 1), (1 : 2 : 1), (2 : 2 : 1), (-1/2 : -1 :
1), (1/2 : -1 : 1), (-1 : -1/2 : 1), (-1/2 : -1/2 : 1), (0 : -1/2 : 1),
(1/2 : -1/2 : 1), (1 : -1/2 : 1), (-1/2 : 0 : 1), (1/2 : 0 : 1), (-1 :
1/2 : 1), (-1/2 : 1/2 : 1), (0 : 1/2 : 1), (1/2 : 1/2 : 1), (1 : 1/2 :
1), (-1/2 : 1 : 1), (1/2 : 1 : 1), (-2 : 1 : 0), (-1 : 1 : 0), (0 : 1 :
0), (1 : 1 : 0), (2 : 1 : 0), (-1/2 : 1 : 0), (1/2 : 1 : 0), (1 : 0 :
0)]

Note

The very simple algorithm works as follows: every point (x_0:\cdots:x_n) in projective space has a unique largest index i for which x_i is not zero. The algorithm then iterates downward on this index. We normalize by choosing x_i positive. Then, the points x_0,\ldots,x_{i-1} are the points of affine i-space that are relatively prime to x_i. We access these by using the Tuples method.

AUTHORS:

  • Benjamin Antieau (2008-01-12)
class sage.schemes.generic.projective_space.ProjectiveSpace_ring(n, R=Integer Ring, names=None)

Projective space of dimension n over the ring R.

EXAMPLES:

sage: X.<x,y,z,w> = ProjectiveSpace(3, QQ)
sage: X.base_scheme()
Spectrum of Rational Field
sage: X.base_ring()
Rational Field
sage: X.structure_morphism ()
Scheme morphism:
  From: Projective Space of dimension 3 over Rational Field
  To:   Spectrum of Rational Field
  Defn: Structure map
sage: X.coordinate_ring()
Multivariate Polynomial Ring in x, y, z, w over Rational Field

Loading and saving:

sage: loads(X.dumps()) == X
True
__cmp__(right)

EXAMPLES:

sage: ProjectiveSpace(QQ, 3, 'a') == ProjectiveSpace(ZZ, 3, 'a')
False
sage: ProjectiveSpace(ZZ, 1, 'a') == ProjectiveSpace(ZZ, 0, 'a')
False
sage: ProjectiveSpace(ZZ, 2, 'a') == AffineSpace(ZZ, 2, 'a')
False
sage: loads(AffineSpace(ZZ, 1, 'x').dumps()) == AffineSpace(ZZ, 1, 'x')
True
__init__(n, R=Integer Ring, names=None)

EXAMPLES:

sage: ProjectiveSpace(3, Zp(5), 'y')
Projective Space of dimension 3 over 5-adic Ring with capped relative precision 20
_check_satisfies_equations(v)

Return True if v defines a point on the scheme self; raise a TypeError otherwise.

EXAMPLES:

sage: P = ProjectiveSpace(2, ZZ)
sage: P._check_satisfies_equations([1, 1, 0])
True
sage: P._check_satisfies_equations((0, 1, 0))
True
sage: P._check_satisfies_equations([0, 0, 0])
...
TypeError: The zero vector is not a point in projective space
sage: P._check_satisfies_equations([1, 2, 3, 4, 5])
...
TypeError: The list v=[1, 2, 3, 4, 5] must have 3 components
sage: P._check_satisfies_equations([1/2, 1, 1])
...
TypeError: The components of v=[1/2, 1, 1] must be elements of Integer Ring
sage: P._check_satisfies_equations(5)
...
TypeError: The argument v=5 must be a list or tuple
_constructor(*args, **kwds)
_homset_class(*args, **kwds)
_latex_()

Return a LaTeX representation of this projective space.

EXAMPLES:

sage: print latex(ProjectiveSpace(1, ZZ, 'x'))
{\mathbf P}_{\Bold{Z}}^1

TESTS:

sage: ProjectiveSpace(3, Zp(5), 'y')._latex_()
'{\\mathbf P}_{\\ZZ_{5}}^3'
_latex_generic_point(v=None)

Return a LaTeX representation of the generic point corresponding to the list of polys on this projective space.

If polys is None, the representation of the generic point of the projective space is returned.

EXAMPLES:

sage: P.<x, y, z> = ProjectiveSpace(2, ZZ)
sage: P._latex_generic_point([z*y-x^2])
'\left(- x^{2} + y z\right)'
sage: P._latex_generic_point()
'\left(x : y : z\right)'
_point_class(*args, **kwds)
_point_morphism_class(*args, **kwds)
_repr_()

Return a string representation of this projective space.

EXAMPLES:

sage: ProjectiveSpace(1, ZZ, 'x')
Projective Space of dimension 1 over Integer Ring

TESTS:

sage: ProjectiveSpace(3, Zp(5), 'y')._repr_()
'Projective Space of dimension 3 over 5-adic Ring with capped relative precision 20'
_repr_generic_point(v=None)

Return a string representation of the generic point corresponding to the list of polys on this projective space.

If polys is None, the representation of the generic point of the projective space is returned.

EXAMPLES:

sage: P.<x, y, z> = ProjectiveSpace(2, ZZ)
sage: P._repr_generic_point([z*y-x^2])
'(-x^2 + y*z)'
sage: P._repr_generic_point()
'(x : y : z)'
_validate(v)

Return a valid tuple of polynomial functions on self given by v. Raise an error if v does not consist of valid functions (in particular, if they are not homogeneous).

EXAMPLES:

sage: P.<x, y, z> = ProjectiveSpace(2, ZZ)
sage: P._validate([x*y-z^2, 1])
(x*y - z^2, 1)
sage: P._validate([x, y, 1/3*z])
...
ValueError: The arguments [x, y, 1/3*z] are not valid polynomial functions on this projective space
sage: P._validate([x*y-z])
...
TypeError: The polynomial(s) [x*y - z] must be homogeneous
affine_patch(i)

Return the i^{th} affine patch of this projective space. This is an ambient affine space \mathbb{A}^n_R, where R is the base ring of self, whose “projective embedding” map is 1 in the i^{th} factor.

INPUT:

  • i - integer between 0 and dimension of self, inclusive.

OUTPUT: an ambient affine space with fixed projective_embedding map.

EXAMPLES:

sage: PP = ProjectiveSpace(5) / QQ
sage: AA = PP.affine_patch(2)
sage: AA
Affine Space of dimension 5 over Rational Field
sage: AA.projective_embedding()
Scheme morphism:
  From: Affine Space of dimension 5 over Rational Field
  To:   Projective Space of dimension 5 over Rational Field
  Defn: Defined on coordinates by sending (x0, x1, x2, x3, x4) to
        (x0 : x1 : 1 : x2 : x3 : x4)
sage: AA.projective_embedding(0)
Scheme morphism:
  From: Affine Space of dimension 5 over Rational Field
  To:   Projective Space of dimension 5 over Rational Field
  Defn: Defined on coordinates by sending (x0, x1, x2, x3, x4) to
        (1 : x0 : x1 : x2 : x3 : x4)
coordinate_ring()

Return the coordinate ring of this scheme.

EXAMPLES:

sage: ProjectiveSpace(3, GF(19^2,'alpha'), 'abcd').coordinate_ring()
Multivariate Polynomial Ring in a, b, c, d over Finite Field in alpha of size 19^2
sage: ProjectiveSpace(3).coordinate_ring()
Multivariate Polynomial Ring in x0, x1, x2, x3 over Integer Ring
sage: ProjectiveSpace(2, QQ, ['alpha', 'beta', 'gamma']).coordinate_ring()
Multivariate Polynomial Ring in alpha, beta, gamma over Rational Field
ngens()

Return the number of generators of self, i.e. the number of variables in the coordinate ring of self.

EXAMPLES:

sage: ProjectiveSpace(3, QQ).ngens()
4
sage: ProjectiveSpace(7, ZZ).ngens()
8
subscheme(X)

Return the closed subscheme defined by X.

INPUT:

  • X - a list or tuple of equations

EXAMPLES:

sage: A.<x,y,z> = ProjectiveSpace(2, QQ)
sage: X = A.subscheme([x*z^2, y^2*z, x*y^2]); X
Closed subscheme of Projective Space of dimension 2 over Rational Field defined by:
  x*z^2
  y^2*z
  x*y^2
sage: X.defining_polynomials ()
(x*z^2, y^2*z, x*y^2)
sage: I = X.defining_ideal(); I
Ideal (x*z^2, y^2*z, x*y^2) of Multivariate Polynomial Ring in x, y, z over Rational Field
sage: I.groebner_basis()
[x*y^2, y^2*z,  x*z^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 Projective Space of dimension 2 over Rational Field defined by:
  x*z^2
  y^2*z
  x*y^2
  To:   Spectrum of Rational Field
  Defn: Structure map
sage.schemes.generic.projective_space.is_ProjectiveSpace(x)

Return True if x is a projective space, i.e., an ambient space \mathbb{P}^n_R, where R is a ring and n\geq 0 is an integer.

EXAMPLES:

sage: from sage.schemes.generic.projective_space import is_ProjectiveSpace
sage: is_ProjectiveSpace(ProjectiveSpace(5, names='x'))
True
sage: is_ProjectiveSpace(ProjectiveSpace(5, GF(9,'alpha'), names='x'))
True
sage: is_ProjectiveSpace(Spec(ZZ))
False

Previous topic

Affine n space over a ring.

Next topic

Algebraic schemes

This Page