23.8 Projective $ n$ space over a ring

Module: sage.schemes.generic.projective_space

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 $ \mathbf{Q}$ :

sage: X = ProjectiveSpace(1000, Q); 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)/Q; 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, Q, 'xyz').objgens()
sage: P2
Projective Space of dimension 2 over Rational Field
sage: x.parent()
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:
  z + y + x
  -1*z + y + x
sage: V.dimension()
0

Module-level Functions

ProjectiveSpace( n, [R=None], [names=None])

Return projective space of dimension $ n$ over the ring $ R$ .

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()
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 $ \mathbf{Z}$ .

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()
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 glueing constructions).

is_ProjectiveSpace( x)

Class: ProjectiveSpace_field

class ProjectiveSpace_field

Special Functions: _homset_class,$  $ _point_class

Class: ProjectiveSpace_finite_field

class ProjectiveSpace_finite_field

Functions: rational_points

Special Functions: __iter__

__iter__( self)

Return iterator over the elements of this projective space.

Note that iteration is over the decomposition $ \mathbf{P}^n = \AA^n \cup \mathbf{P}^n-1$ , where $ \AA^n$ is the $ n$ -th affine patch and $ \mathbf{P}^n-1$ is the hyperplane at infinity $ x_n = 0$ .

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)]

Author: David Kohel (kohel@maths.usyd.edu.au)

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.

Class: ProjectiveSpace_rational_field

class ProjectiveSpace_rational_field

Functions: rational_points

rational_points( self, [bound=0])

Returns the projective points $ (x_0:\cdots:x_n)$ over $ \mathbf{Q}$ with $ \vert x_i\vert \leq$ bound.

INPUT:
    bound -- integer

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

Class: ProjectiveSpace_ring

class ProjectiveSpace_ring
Projective space of dimension $ n$ over the ring $ R$ .

sage: X = ProjectiveSpace(3, Q, 'xyzw')
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()
Polynomial Ring in x, y, z, w over Rational Field

Loading and saving:

sage: loads(X.dumps()) == X
True
ProjectiveSpace_ring( self, n, [R=None], [names=Integer Ring])

Functions: affine_patch,$  $ coordinate_ring,$  $ subscheme,$  $ subscheme_complement

affine_patch( self, i)

Return the $ i$ -th affine patch of this projective space. This is an ambient affine space $ \mathbf{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.

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( self)

Return the coordinate ring of this scheme, if defined. Otherwise raise a ValueError.

sage: ProjectiveSpace(3, GF(19^2), 'abcd').coordinate_ring()
Polynomial Ring in a, b, c, d over Finite Field in a of size 19^2

sage: ProjectiveSpace(3).coordinate_ring()
Polynomial Ring in x0, x1, x2, x3 over Integer Ring

sage: ProjectiveSpace(2, Q, ['alpha', 'beta', 'gamma']).coordinate_ring()
Polynomial Ring in alpha, beta, gamma over Rational Field

subscheme( self, X)

Return the closed subscheme defined by X.

INPUT:
    X -- a list or tuple of equations

sage: A, (x,y,z) = ProjectiveSpace(2, Q).objgens('xyz')
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 (y^2*z, x*z^2, x*y^2) of Polynomial Ring in x, y, z over Rational
Field
sage: I.groebner_basis()
[x*z^2, y^2*z, 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 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

Special Functions: __cmp__,$  $ _check_satisfies_equations,$  $ _constructor,$  $ _homset_class,$  $ _latex_,$  $ _latex_generic_point,$  $ _point_class,$  $ _point_morphism_class,$  $ _repr_,$  $ _repr_generic_point

_check_satisfies_equations( self, v)

Verify that the coordinates of v define a point on this scheme, or raise a TypeError.

See About this document... for information on suggesting changes.