# Products of projective spaces#

This class builds on the projective space class and its point and morphism classes.

Products of projective spaces of varying dimension are convenient ambient spaces for complete intersections.

Group actions on them, and the interplay with representation theory, provide many interesting examples of algebraic varieties.

EXAMPLES:

We construct products projective spaces of various dimensions over the same ring:

sage: P1 = ProjectiveSpace(ZZ, 1, 'x')
sage: P2 = ProjectiveSpace(ZZ, 2, 'y')
sage: ProductProjectiveSpaces([P1, P2])
Product of projective spaces P^1 x P^2 over Integer Ring

>>> from sage.all import *
>>> P1 = ProjectiveSpace(ZZ, Integer(1), 'x')
>>> P2 = ProjectiveSpace(ZZ, Integer(2), 'y')
>>> ProductProjectiveSpaces([P1, P2])
Product of projective spaces P^1 x P^2 over Integer Ring


We can also construct the product by specifying the dimensions and the base ring:

sage: ProductProjectiveSpaces([1, 2, 3], QQ, 'z')
Product of projective spaces P^1 x P^2 x P^3 over Rational Field

sage: P2xP2 = ProductProjectiveSpaces([2, 2], QQ, names=['x', 'y'])
sage: P2xP2.coordinate_ring().inject_variables()
Defining x0, x1, x2, y0, y1, y2

>>> from sage.all import *
>>> ProductProjectiveSpaces([Integer(1), Integer(2), Integer(3)], QQ, 'z')
Product of projective spaces P^1 x P^2 x P^3 over Rational Field

>>> P2xP2 = ProductProjectiveSpaces([Integer(2), Integer(2)], QQ, names=['x', 'y'])
>>> P2xP2.coordinate_ring().inject_variables()
Defining x0, x1, x2, y0, y1, y2

sage.schemes.product_projective.space.ProductProjectiveSpaces(n, R=None, names='x')[source]#

Return the Cartesian product of projective spaces.

The input n is either a list of projective space over the same base ring or the list of dimensions, R the base ring, and names the variable names.

INPUT:

• n – a list of integers or a list of projective spaces

• R – a ring

• names – a string or list of strings

EXAMPLES:

sage: P1 = ProjectiveSpace(QQ, 2, 'x')
sage: P2 = ProjectiveSpace(QQ, 3, 'y')
sage: ProductProjectiveSpaces([P1, P2])
Product of projective spaces P^2 x P^3 over Rational Field

>>> from sage.all import *
>>> P1 = ProjectiveSpace(QQ, Integer(2), 'x')
>>> P2 = ProjectiveSpace(QQ, Integer(3), 'y')
>>> ProductProjectiveSpaces([P1, P2])
Product of projective spaces P^2 x P^3 over Rational Field

sage: ProductProjectiveSpaces([2, 2], GF(7), 'y')
Product of projective spaces P^2 x P^2 over Finite Field of size 7

>>> from sage.all import *
>>> ProductProjectiveSpaces([Integer(2), Integer(2)], GF(Integer(7)), 'y')
Product of projective spaces P^2 x P^2 over Finite Field of size 7

sage: P1 = ProjectiveSpace(ZZ, 2, 'x')
sage: P2 = ProjectiveSpace(QQ, 3, 'y')
sage: ProductProjectiveSpaces([P1, P2])
Traceback (most recent call last):
...
AttributeError: components must be over the same base ring

>>> from sage.all import *
>>> P1 = ProjectiveSpace(ZZ, Integer(2), 'x')
>>> P2 = ProjectiveSpace(QQ, Integer(3), 'y')
>>> ProductProjectiveSpaces([P1, P2])
Traceback (most recent call last):
...
AttributeError: components must be over the same base ring

class sage.schemes.product_projective.space.ProductProjectiveSpaces_field(N, R=Rational Field, names=None)[source]#
points_of_bounded_height(**kwds)[source]#

Returns an iterator of the points in this product of projective spaces with the absolute heights of the components of at most the given bound.

Bound check is strict for the rational field. Requires the base field of this space to be a number field. Uses the Doyle-Krumm algorithm 4 (algorithm 5 for imaginary quadratic) for computing algebraic numbers up to a given height [DK2013].

The algorithm requires floating point arithmetic, so the user is allowed to specify the precision for such calculations. Additionally, due to floating point issues, points slightly larger than the bound may be returned. This can be controlled by lowering the tolerance.

INPUT:

• bound – a real number

• tolerance – a rational number in (0,1] used in doyle-krumm algorithm-4

• precision – the precision to use for computing the elements of bounded height of number fields.

OUTPUT: an iterator of points in this space

EXAMPLES:

sage: PP = ProductProjectiveSpaces(QQ, [1, 2])
sage: sorted(list(PP.points_of_bounded_height(bound=1)))
[(-1 : 1 , -1 : -1 : 1), (-1 : 1 , -1 : 0 : 1), (-1 : 1 , -1 : 1 : 0),
(-1 : 1 , -1 : 1 : 1), (-1 : 1 , 0 : -1 : 1), (-1 : 1 , 0 : 0 : 1),
(-1 : 1 , 0 : 1 : 0), (-1 : 1 , 0 : 1 : 1), (-1 : 1 , 1 : -1 : 1),
(-1 : 1 , 1 : 0 : 0), (-1 : 1 , 1 : 0 : 1), (-1 : 1 , 1 : 1 : 0),
(-1 : 1 , 1 : 1 : 1), (0 : 1 , -1 : -1 : 1), (0 : 1 , -1 : 0 : 1),
(0 : 1 , -1 : 1 : 0), (0 : 1 , -1 : 1 : 1), (0 : 1 , 0 : -1 : 1),
(0 : 1 , 0 : 0 : 1), (0 : 1 , 0 : 1 : 0), (0 : 1 , 0 : 1 : 1),
(0 : 1 , 1 : -1 : 1), (0 : 1 , 1 : 0 : 0), (0 : 1 , 1 : 0 : 1),
(0 : 1 , 1 : 1 : 0), (0 : 1 , 1 : 1 : 1), (1 : 0 , -1 : -1 : 1),
(1 : 0 , -1 : 0 : 1), (1 : 0 , -1 : 1 : 0), (1 : 0 , -1 : 1 : 1),
(1 : 0 , 0 : -1 : 1), (1 : 0 , 0 : 0 : 1), (1 : 0 , 0 : 1 : 0),
(1 : 0 , 0 : 1 : 1), (1 : 0 , 1 : -1 : 1), (1 : 0 , 1 : 0 : 0),
(1 : 0 , 1 : 0 : 1), (1 : 0 , 1 : 1 : 0), (1 : 0 , 1 : 1 : 1),
(1 : 1 , -1 : -1 : 1), (1 : 1 , -1 : 0 : 1), (1 : 1 , -1 : 1 : 0),
(1 : 1 , -1 : 1 : 1), (1 : 1 , 0 : -1 : 1), (1 : 1 , 0 : 0 : 1),
(1 : 1 , 0 : 1 : 0), (1 : 1 , 0 : 1 : 1), (1 : 1 , 1 : -1 : 1),
(1 : 1 , 1 : 0 : 0), (1 : 1 , 1 : 0 : 1), (1 : 1 , 1 : 1 : 0),
(1 : 1 , 1 : 1 : 1)]

>>> from sage.all import *
>>> PP = ProductProjectiveSpaces(QQ, [Integer(1), Integer(2)])
>>> sorted(list(PP.points_of_bounded_height(bound=Integer(1))))
[(-1 : 1 , -1 : -1 : 1), (-1 : 1 , -1 : 0 : 1), (-1 : 1 , -1 : 1 : 0),
(-1 : 1 , -1 : 1 : 1), (-1 : 1 , 0 : -1 : 1), (-1 : 1 , 0 : 0 : 1),
(-1 : 1 , 0 : 1 : 0), (-1 : 1 , 0 : 1 : 1), (-1 : 1 , 1 : -1 : 1),
(-1 : 1 , 1 : 0 : 0), (-1 : 1 , 1 : 0 : 1), (-1 : 1 , 1 : 1 : 0),
(-1 : 1 , 1 : 1 : 1), (0 : 1 , -1 : -1 : 1), (0 : 1 , -1 : 0 : 1),
(0 : 1 , -1 : 1 : 0), (0 : 1 , -1 : 1 : 1), (0 : 1 , 0 : -1 : 1),
(0 : 1 , 0 : 0 : 1), (0 : 1 , 0 : 1 : 0), (0 : 1 , 0 : 1 : 1),
(0 : 1 , 1 : -1 : 1), (0 : 1 , 1 : 0 : 0), (0 : 1 , 1 : 0 : 1),
(0 : 1 , 1 : 1 : 0), (0 : 1 , 1 : 1 : 1), (1 : 0 , -1 : -1 : 1),
(1 : 0 , -1 : 0 : 1), (1 : 0 , -1 : 1 : 0), (1 : 0 , -1 : 1 : 1),
(1 : 0 , 0 : -1 : 1), (1 : 0 , 0 : 0 : 1), (1 : 0 , 0 : 1 : 0),
(1 : 0 , 0 : 1 : 1), (1 : 0 , 1 : -1 : 1), (1 : 0 , 1 : 0 : 0),
(1 : 0 , 1 : 0 : 1), (1 : 0 , 1 : 1 : 0), (1 : 0 , 1 : 1 : 1),
(1 : 1 , -1 : -1 : 1), (1 : 1 , -1 : 0 : 1), (1 : 1 , -1 : 1 : 0),
(1 : 1 , -1 : 1 : 1), (1 : 1 , 0 : -1 : 1), (1 : 1 , 0 : 0 : 1),
(1 : 1 , 0 : 1 : 0), (1 : 1 , 0 : 1 : 1), (1 : 1 , 1 : -1 : 1),
(1 : 1 , 1 : 0 : 0), (1 : 1 , 1 : 0 : 1), (1 : 1 , 1 : 1 : 0),
(1 : 1 , 1 : 1 : 1)]

sage: u = QQ['u'].0
sage: P = ProductProjectiveSpaces([1, 1], NumberField(u^2 - 2, 'v'))        # needs sage.rings.number_field
sage: sorted(list(P.points_of_bounded_height(bound=1.5)))                   # needs sage.rings.number_field
[(-v : 1 , -v : 1), (-v : 1 , -1 : 1), (-v : 1 , -1/2*v : 1), (-v : 1 , 0 : 1),
(-v : 1 , 1/2*v : 1), (-v : 1 , 1 : 0), (-v : 1 , 1 : 1), (-v : 1 , v : 1),
(-1 : 1 , -v : 1), (-1 : 1 , -1 : 1), (-1 : 1 , -1/2*v : 1), (-1 : 1 , 0 : 1),
(-1 : 1 , 1/2*v : 1), (-1 : 1 , 1 : 0), (-1 : 1 , 1 : 1), (-1 : 1 , v : 1),
(-1/2*v : 1 , -v : 1), (-1/2*v : 1 , -1 : 1), (-1/2*v : 1 , -1/2*v : 1),
(-1/2*v : 1 , 0 : 1), (-1/2*v : 1 , 1/2*v : 1), (-1/2*v : 1 , 1 : 0),
(-1/2*v : 1 , 1 : 1), (-1/2*v : 1 , v : 1), (0 : 1 , -v : 1), (0 : 1 , -1 : 1),
(0 : 1 , -1/2*v : 1), (0 : 1 , 0 : 1), (0 : 1 , 1/2*v : 1), (0 : 1 , 1 : 0),
(0 : 1 , 1 : 1), (0 : 1 , v : 1), (1/2*v : 1 , -v : 1), (1/2*v : 1 , -1 : 1),
(1/2*v : 1 , -1/2*v : 1), (1/2*v : 1 , 0 : 1), (1/2*v : 1 , 1/2*v : 1),
(1/2*v : 1 , 1 : 0), (1/2*v : 1 , 1 : 1), (1/2*v : 1 , v : 1), (1 : 0 , -v : 1),
(1 : 0 , -1 : 1), (1 : 0 , -1/2*v : 1), (1 : 0 , 0 : 1), (1 : 0 , 1/2*v : 1),
(1 : 0 , 1 : 0), (1 : 0 , 1 : 1), (1 : 0 , v : 1), (1 : 1 , -v : 1),
(1 : 1 , -1 : 1), (1 : 1 , -1/2*v : 1), (1 : 1 , 0 : 1), (1 : 1 , 1/2*v : 1),
(1 : 1 , 1 : 0), (1 : 1 , 1 : 1), (1 : 1 , v : 1), (v : 1 , -v : 1),
(v : 1 , -1 : 1), (v : 1 , -1/2*v : 1), (v : 1 , 0 : 1), (v : 1 , 1/2*v : 1),
(v : 1 , 1 : 0), (v : 1 , 1 : 1), (v : 1 , v : 1)]

>>> from sage.all import *
>>> u = QQ['u'].gen(0)
>>> P = ProductProjectiveSpaces([Integer(1), Integer(1)], NumberField(u**Integer(2) - Integer(2), 'v'))        # needs sage.rings.number_field
>>> sorted(list(P.points_of_bounded_height(bound=RealNumber('1.5'))))                   # needs sage.rings.number_field
[(-v : 1 , -v : 1), (-v : 1 , -1 : 1), (-v : 1 , -1/2*v : 1), (-v : 1 , 0 : 1),
(-v : 1 , 1/2*v : 1), (-v : 1 , 1 : 0), (-v : 1 , 1 : 1), (-v : 1 , v : 1),
(-1 : 1 , -v : 1), (-1 : 1 , -1 : 1), (-1 : 1 , -1/2*v : 1), (-1 : 1 , 0 : 1),
(-1 : 1 , 1/2*v : 1), (-1 : 1 , 1 : 0), (-1 : 1 , 1 : 1), (-1 : 1 , v : 1),
(-1/2*v : 1 , -v : 1), (-1/2*v : 1 , -1 : 1), (-1/2*v : 1 , -1/2*v : 1),
(-1/2*v : 1 , 0 : 1), (-1/2*v : 1 , 1/2*v : 1), (-1/2*v : 1 , 1 : 0),
(-1/2*v : 1 , 1 : 1), (-1/2*v : 1 , v : 1), (0 : 1 , -v : 1), (0 : 1 , -1 : 1),
(0 : 1 , -1/2*v : 1), (0 : 1 , 0 : 1), (0 : 1 , 1/2*v : 1), (0 : 1 , 1 : 0),
(0 : 1 , 1 : 1), (0 : 1 , v : 1), (1/2*v : 1 , -v : 1), (1/2*v : 1 , -1 : 1),
(1/2*v : 1 , -1/2*v : 1), (1/2*v : 1 , 0 : 1), (1/2*v : 1 , 1/2*v : 1),
(1/2*v : 1 , 1 : 0), (1/2*v : 1 , 1 : 1), (1/2*v : 1 , v : 1), (1 : 0 , -v : 1),
(1 : 0 , -1 : 1), (1 : 0 , -1/2*v : 1), (1 : 0 , 0 : 1), (1 : 0 , 1/2*v : 1),
(1 : 0 , 1 : 0), (1 : 0 , 1 : 1), (1 : 0 , v : 1), (1 : 1 , -v : 1),
(1 : 1 , -1 : 1), (1 : 1 , -1/2*v : 1), (1 : 1 , 0 : 1), (1 : 1 , 1/2*v : 1),
(1 : 1 , 1 : 0), (1 : 1 , 1 : 1), (1 : 1 , v : 1), (v : 1 , -v : 1),
(v : 1 , -1 : 1), (v : 1 , -1/2*v : 1), (v : 1 , 0 : 1), (v : 1 , 1/2*v : 1),
(v : 1 , 1 : 0), (v : 1 , 1 : 1), (v : 1 , v : 1)]

class sage.schemes.product_projective.space.ProductProjectiveSpaces_finite_field(N, R=Rational Field, names=None)[source]#
rational_points(F=None)[source]#

Return the list of $$F$$-rational points on this product of projective spaces, where $$F$$ is a given finite field, or the base ring of this space.

EXAMPLES:

sage: P = ProductProjectiveSpaces([1, 1], GF(5))
sage: P.rational_points()
[(0 : 1 , 0 : 1), (1 : 1 , 0 : 1), (2 : 1 , 0 : 1), (3 : 1 , 0 : 1), (4 : 1 , 0 : 1), (1 : 0 , 0 : 1),
(0 : 1 , 1 : 1), (1 : 1 , 1 : 1), (2 : 1 , 1 : 1), (3 : 1 , 1 : 1), (4 : 1 , 1 : 1), (1 : 0 , 1 : 1),
(0 : 1 , 2 : 1), (1 : 1 , 2 : 1), (2 : 1 , 2 : 1), (3 : 1 , 2 : 1), (4 : 1 , 2 : 1), (1 : 0 , 2 : 1),
(0 : 1 , 3 : 1), (1 : 1 , 3 : 1), (2 : 1 , 3 : 1), (3 : 1 , 3 : 1), (4 : 1 , 3 : 1), (1 : 0 , 3 : 1),
(0 : 1 , 4 : 1), (1 : 1 , 4 : 1), (2 : 1 , 4 : 1), (3 : 1 , 4 : 1), (4 : 1 , 4 : 1), (1 : 0 , 4 : 1),
(0 : 1 , 1 : 0), (1 : 1 , 1 : 0), (2 : 1 , 1 : 0), (3 : 1 , 1 : 0), (4 : 1 , 1 : 0), (1 : 0 , 1 : 0)]

>>> from sage.all import *
>>> P = ProductProjectiveSpaces([Integer(1), Integer(1)], GF(Integer(5)))
>>> P.rational_points()
[(0 : 1 , 0 : 1), (1 : 1 , 0 : 1), (2 : 1 , 0 : 1), (3 : 1 , 0 : 1), (4 : 1 , 0 : 1), (1 : 0 , 0 : 1),
(0 : 1 , 1 : 1), (1 : 1 , 1 : 1), (2 : 1 , 1 : 1), (3 : 1 , 1 : 1), (4 : 1 , 1 : 1), (1 : 0 , 1 : 1),
(0 : 1 , 2 : 1), (1 : 1 , 2 : 1), (2 : 1 , 2 : 1), (3 : 1 , 2 : 1), (4 : 1 , 2 : 1), (1 : 0 , 2 : 1),
(0 : 1 , 3 : 1), (1 : 1 , 3 : 1), (2 : 1 , 3 : 1), (3 : 1 , 3 : 1), (4 : 1 , 3 : 1), (1 : 0 , 3 : 1),
(0 : 1 , 4 : 1), (1 : 1 , 4 : 1), (2 : 1 , 4 : 1), (3 : 1 , 4 : 1), (4 : 1 , 4 : 1), (1 : 0 , 4 : 1),
(0 : 1 , 1 : 0), (1 : 1 , 1 : 0), (2 : 1 , 1 : 0), (3 : 1 , 1 : 0), (4 : 1 , 1 : 0), (1 : 0 , 1 : 0)]

sage: P = ProductProjectiveSpaces([1, 1], GF(2))
sage: sorted(P.rational_points(GF(2^2, 'a')), key=str)                      # needs sage.rings.finite_rings
[(0 : 1 , 0 : 1), (0 : 1 , 1 : 0), (0 : 1 , 1 : 1), (0 : 1 , a + 1 : 1), (0 : 1 , a : 1),
(1 : 0 , 0 : 1), (1 : 0 , 1 : 0), (1 : 0 , 1 : 1), (1 : 0 , a + 1 : 1), (1 : 0 , a : 1),
(1 : 1 , 0 : 1), (1 : 1 , 1 : 0), (1 : 1 , 1 : 1), (1 : 1 , a + 1 : 1), (1 : 1 , a : 1),
(a + 1 : 1 , 0 : 1), (a + 1 : 1 , 1 : 0), (a + 1 : 1 , 1 : 1), (a + 1 : 1 , a + 1 : 1), (a + 1 : 1 , a : 1),
(a : 1 , 0 : 1), (a : 1 , 1 : 0), (a : 1 , 1 : 1), (a : 1 , a + 1 : 1), (a : 1 , a : 1)]

>>> from sage.all import *
>>> P = ProductProjectiveSpaces([Integer(1), Integer(1)], GF(Integer(2)))
>>> sorted(P.rational_points(GF(Integer(2)**Integer(2), 'a')), key=str)                      # needs sage.rings.finite_rings
[(0 : 1 , 0 : 1), (0 : 1 , 1 : 0), (0 : 1 , 1 : 1), (0 : 1 , a + 1 : 1), (0 : 1 , a : 1),
(1 : 0 , 0 : 1), (1 : 0 , 1 : 0), (1 : 0 , 1 : 1), (1 : 0 , a + 1 : 1), (1 : 0 , a : 1),
(1 : 1 , 0 : 1), (1 : 1 , 1 : 0), (1 : 1 , 1 : 1), (1 : 1 , a + 1 : 1), (1 : 1 , a : 1),
(a + 1 : 1 , 0 : 1), (a + 1 : 1 , 1 : 0), (a + 1 : 1 , 1 : 1), (a + 1 : 1 , a + 1 : 1), (a + 1 : 1 , a : 1),
(a : 1 , 0 : 1), (a : 1 , 1 : 0), (a : 1 , 1 : 1), (a : 1 , a + 1 : 1), (a : 1 , a : 1)]

class sage.schemes.product_projective.space.ProductProjectiveSpaces_ring(N, R=Rational Field, names=None)[source]#

Bases: AmbientSpace

Cartesian product of projective spaces $$\mathbb{P}^{n_1} \times \cdots \times \mathbb{P}^{n_r}$$.

EXAMPLES:

sage: P.<x0,x1,x2,x3,x4> = ProductProjectiveSpaces([1, 2], QQ); P
Product of projective spaces P^1 x P^2 over Rational Field
sage: P.coordinate_ring()
Multivariate Polynomial Ring in x0, x1, x2, x3, x4 over Rational Field
sage: P[0]
Projective Space of dimension 1 over Rational Field
sage: P[1]
Projective Space of dimension 2 over Rational Field
sage: Q = P(6, 3, 2, 2, 2); Q
(2 : 1 , 1 : 1 : 1)
sage: Q[0]
(2 : 1)
sage: H = Hom(P,P)
sage: f = H([x0^2*x3, x2*x1^2, x2^2, 2*x3^2, x4^2])
sage: f(Q)
(4 : 1 , 1 : 2 : 1)

>>> from sage.all import *
>>> P = ProductProjectiveSpaces([Integer(1), Integer(2)], QQ, names=('x0', 'x1', 'x2', 'x3', 'x4',)); (x0, x1, x2, x3, x4,) = P._first_ngens(5); P
Product of projective spaces P^1 x P^2 over Rational Field
>>> P.coordinate_ring()
Multivariate Polynomial Ring in x0, x1, x2, x3, x4 over Rational Field
>>> P[Integer(0)]
Projective Space of dimension 1 over Rational Field
>>> P[Integer(1)]
Projective Space of dimension 2 over Rational Field
>>> Q = P(Integer(6), Integer(3), Integer(2), Integer(2), Integer(2)); Q
(2 : 1 , 1 : 1 : 1)
>>> Q[Integer(0)]
(2 : 1)
>>> H = Hom(P,P)
>>> f = H([x0**Integer(2)*x3, x2*x1**Integer(2), x2**Integer(2), Integer(2)*x3**Integer(2), x4**Integer(2)])
>>> f(Q)
(4 : 1 , 1 : 2 : 1)

affine_patch(I, return_embedding=False)[source]#

Return the $$I^{th}$$ affine patch of this projective space product where I is a multi-index.

INPUT:

• I – a list or tuple of positive integers.

• return_embedding – Boolean, if true the projective embedding is also returned.

OUTPUT:

• An affine space.

• An embedding into a product of projective spaces (optional).

EXAMPLES:

sage: PP = ProductProjectiveSpaces([2, 2, 2], ZZ, 'x')
sage: phi = PP.affine_patch([0, 1, 2], True)
sage: phi.domain()
Affine Space of dimension 6 over Integer Ring
sage: phi
Scheme morphism:
From: Affine Space of dimension 6 over Integer Ring
To:   Product of projective spaces P^2 x P^2 x P^2 over Integer Ring
Defn: Defined on coordinates by sending (x0, x1, x2, x3, x4, x5) to
(1 : x0 : x1 , x2 : 1 : x3 , x4 : x5 : 1)

>>> from sage.all import *
>>> PP = ProductProjectiveSpaces([Integer(2), Integer(2), Integer(2)], ZZ, 'x')
>>> phi = PP.affine_patch([Integer(0), Integer(1), Integer(2)], True)
>>> phi.domain()
Affine Space of dimension 6 over Integer Ring
>>> phi
Scheme morphism:
From: Affine Space of dimension 6 over Integer Ring
To:   Product of projective spaces P^2 x P^2 x P^2 over Integer Ring
Defn: Defined on coordinates by sending (x0, x1, x2, x3, x4, x5) to
(1 : x0 : x1 , x2 : 1 : x3 , x4 : x5 : 1)

change_ring(R)[source]#

Return a product of projective spaces over a ring R and otherwise the same as this projective space.

INPUT:

• R – commutative ring or morphism

OUTPUT:

• Product of projective spaces over R.

Note

There is no need to have any relation between R and the base ring of this space, if you want to have such a relation, use self.base_extend(R) instead.

EXAMPLES:

sage: T.<x,y,z,u,v,w> = ProductProjectiveSpaces([2, 2], QQ)
sage: T.change_ring(GF(17))
Product of projective spaces P^2 x P^2 over Finite Field of size 17

>>> from sage.all import *
>>> T = ProductProjectiveSpaces([Integer(2), Integer(2)], QQ, names=('x', 'y', 'z', 'u', 'v', 'w',)); (x, y, z, u, v, w,) = T._first_ngens(6)
>>> T.change_ring(GF(Integer(17)))
Product of projective spaces P^2 x P^2 over Finite Field of size 17

components()[source]#

Return the components of this product of projective spaces.

OUTPUT: a list of projective spaces

EXAMPLES:

sage: P.<x,y,z,u,v> = ProductProjectiveSpaces(QQ, [2, 1])
sage: P.components()
[Projective Space of dimension 2 over Rational Field,
Projective Space of dimension 1 over Rational Field]

>>> from sage.all import *
>>> P = ProductProjectiveSpaces(QQ, [Integer(2), Integer(1)], names=('x', 'y', 'z', 'u', 'v',)); (x, y, z, u, v,) = P._first_ngens(5)
>>> P.components()
[Projective Space of dimension 2 over Rational Field,
Projective Space of dimension 1 over Rational Field]

dimension()[source]#

Return the absolute dimension of the product of projective spaces.

OUTPUT: a positive integer

EXAMPLES:

sage: T.<x,y,z,u,v,w> = ProductProjectiveSpaces([2, 2], GF(17))
sage: T.dimension_absolute()
4
sage: T.dimension()
4

>>> from sage.all import *
>>> T = ProductProjectiveSpaces([Integer(2), Integer(2)], GF(Integer(17)), names=('x', 'y', 'z', 'u', 'v', 'w',)); (x, y, z, u, v, w,) = T._first_ngens(6)
>>> T.dimension_absolute()
4
>>> T.dimension()
4

dimension_absolute()[source]#

Return the absolute dimension of the product of projective spaces.

OUTPUT: a positive integer

EXAMPLES:

sage: T.<x,y,z,u,v,w> = ProductProjectiveSpaces([2, 2], GF(17))
sage: T.dimension_absolute()
4
sage: T.dimension()
4

>>> from sage.all import *
>>> T = ProductProjectiveSpaces([Integer(2), Integer(2)], GF(Integer(17)), names=('x', 'y', 'z', 'u', 'v', 'w',)); (x, y, z, u, v, w,) = T._first_ngens(6)
>>> T.dimension_absolute()
4
>>> T.dimension()
4

dimension_absolute_components()[source]#

Return the absolute dimension of the product of projective spaces.

OUTPUT: a list of positive integers

EXAMPLES:

sage: T.<x,y,z,u,v,w> = ProductProjectiveSpaces([2, 2], GF(17))
sage: T.dimension_absolute_components()
[2, 2]
sage: T.dimension_components()
[2, 2]

>>> from sage.all import *
>>> T = ProductProjectiveSpaces([Integer(2), Integer(2)], GF(Integer(17)), names=('x', 'y', 'z', 'u', 'v', 'w',)); (x, y, z, u, v, w,) = T._first_ngens(6)
>>> T.dimension_absolute_components()
[2, 2]
>>> T.dimension_components()
[2, 2]

dimension_components()[source]#

Return the absolute dimension of the product of projective spaces.

OUTPUT: a list of positive integers

EXAMPLES:

sage: T.<x,y,z,u,v,w> = ProductProjectiveSpaces([2, 2], GF(17))
sage: T.dimension_absolute_components()
[2, 2]
sage: T.dimension_components()
[2, 2]

>>> from sage.all import *
>>> T = ProductProjectiveSpaces([Integer(2), Integer(2)], GF(Integer(17)), names=('x', 'y', 'z', 'u', 'v', 'w',)); (x, y, z, u, v, w,) = T._first_ngens(6)
>>> T.dimension_absolute_components()
[2, 2]
>>> T.dimension_components()
[2, 2]

dimension_relative()[source]#

Return the relative dimension of the product of projective spaces.

OUTPUT: a positive integer

EXAMPLES:

sage: T.<a,x,y,z,u,v,w> = ProductProjectiveSpaces([3, 2], QQ)
sage: T.dimension_relative()
5

>>> from sage.all import *
>>> T = ProductProjectiveSpaces([Integer(3), Integer(2)], QQ, names=('a', 'x', 'y', 'z', 'u', 'v', 'w',)); (a, x, y, z, u, v, w,) = T._first_ngens(7)
>>> T.dimension_relative()
5

dimension_relative_components()[source]#

Return the relative dimension of the product of projective spaces.

OUTPUT: a list of positive integers

EXAMPLES:

sage: T.<a,x,y,z,u,v,w> = ProductProjectiveSpaces([3, 2], QQ)
sage: T.dimension_relative_components()
[3, 2]

>>> from sage.all import *
>>> T = ProductProjectiveSpaces([Integer(3), Integer(2)], QQ, names=('a', 'x', 'y', 'z', 'u', 'v', 'w',)); (a, x, y, z, u, v, w,) = T._first_ngens(7)
>>> T.dimension_relative_components()
[3, 2]

ngens()[source]#

Return the number of generators of this space.

This is the number of variables in the coordinate ring of the projective space.

OUTPUT: an integer

EXAMPLES:

sage: T = ProductProjectiveSpaces([1, 1, 1], GF(5), 'x')
sage: T.ngens()
6

>>> from sage.all import *
>>> T = ProductProjectiveSpaces([Integer(1), Integer(1), Integer(1)], GF(Integer(5)), 'x')
>>> T.ngens()
6

num_components()[source]#

Returns the number of components of this space.

OUTPUT: an integer

EXAMPLES:

sage: T = ProductProjectiveSpaces([1, 1, 1], GF(5), 'x')
sage: T.num_components()
3

>>> from sage.all import *
>>> T = ProductProjectiveSpaces([Integer(1), Integer(1), Integer(1)], GF(Integer(5)), 'x')
>>> T.num_components()
3

segre_embedding(PP=None, var='u')[source]#

Return the Segre embedding of this space into the appropriate projective space.

INPUT:

• PP – (default: None) ambient image projective space;

this is constructed if it is not given.

• var – string, variable name of the image projective space, default $$u$$ (optional).

OUTPUT:

Hom – from this space to the appropriate subscheme of projective space.

Todo

Cartesian products with more than two components.

EXAMPLES:

sage: X.<y0,y1,y2,y3,y4,y5> = ProductProjectiveSpaces(ZZ, [2, 2])
sage: phi = X.segre_embedding(); phi                                        # needs sage.libs.singular
Scheme morphism:
From: Product of projective spaces P^2 x P^2 over Integer Ring
To:   Closed subscheme of Projective Space of dimension 8 over Integer Ring
defined by:
-u5*u7 + u4*u8,       -u5*u6 + u3*u8,       -u4*u6 + u3*u7,
-u2*u7 + u1*u8,       -u2*u4 + u1*u5,       -u2*u6 + u0*u8,
-u1*u6 + u0*u7,       -u2*u3 + u0*u5,       -u1*u3 + u0*u4
Defn: Defined by sending (y0 : y1 : y2 , y3 : y4 : y5) to
(y0*y3 : y0*y4 : y0*y5 : y1*y3 : y1*y4 : y1*y5 : y2*y3 : y2*y4 : y2*y5).

::

sage: T = ProductProjectiveSpaces([1, 2], CC, 'z')                          # needs sage.rings.real_mpfr
sage: T.segre_embedding()                                                   # needs sage.libs.singular sage.rings.real_mpfr
Scheme morphism:
From: Product of projective spaces P^1 x P^2
over Complex Field with 53 bits of precision
To:   Closed subscheme of Projective Space of dimension 5
over Complex Field with 53 bits of precision defined by:
-u2*u4 + u1*u5,       -u2*u3 + u0*u5,       -u1*u3 + u0*u4
Defn: Defined by sending (z0 : z1 , z2 : z3 : z4) to
(z0*z2 : z0*z3 : z0*z4 : z1*z2 : z1*z3 : z1*z4).

::

sage: T = ProductProjectiveSpaces([1, 2, 1], QQ, 'z')
sage: T.segre_embedding()                                                   # needs sage.libs.singular
Scheme morphism:
From: Product of projective spaces P^1 x P^2 x P^1 over Rational Field
To:   Closed subscheme of Projective Space of dimension 11
over Rational Field defined by:
-u9*u10 + u8*u11,     -u7*u10 + u6*u11,     -u7*u8 + u6*u9,
-u5*u10 + u4*u11,     -u5*u8 + u4*u9,       -u5*u6 + u4*u7,
-u5*u9 + u3*u11,      -u5*u8 + u3*u10,      -u5*u8 + u2*u11,
-u4*u8 + u2*u10,      -u3*u8 + u2*u9,       -u3*u6 + u2*u7,
-u3*u4 + u2*u5,       -u5*u7 + u1*u11,      -u5*u6 + u1*u10,
-u3*u7 + u1*u9,       -u3*u6 + u1*u8,       -u5*u6 + u0*u11,
-u4*u6 + u0*u10,      -u3*u6 + u0*u9,       -u2*u6 + u0*u8,
-u1*u6 + u0*u7,       -u1*u4 + u0*u5,       -u1*u2 + u0*u3
Defn: Defined by sending (z0 : z1 , z2 : z3 : z4 , z5 : z6) to
(z0*z2*z5 : z0*z2*z6 : z0*z3*z5 : z0*z3*z6 : z0*z4*z5 : z0*z4*z6
: z1*z2*z5 : z1*z2*z6 : z1*z3*z5 : z1*z3*z6 : z1*z4*z5 : z1*z4*z6).

>>> from sage.all import *
>>> X = ProductProjectiveSpaces(ZZ, [Integer(2), Integer(2)], names=('y0', 'y1', 'y2', 'y3', 'y4', 'y5',)); (y0, y1, y2, y3, y4, y5,) = X._first_ngens(6)
>>> phi = X.segre_embedding(); phi                                        # needs sage.libs.singular
Scheme morphism:
From: Product of projective spaces P^2 x P^2 over Integer Ring
To:   Closed subscheme of Projective Space of dimension 8 over Integer Ring
defined by:
-u5*u7 + u4*u8,       -u5*u6 + u3*u8,       -u4*u6 + u3*u7,
-u2*u7 + u1*u8,       -u2*u4 + u1*u5,       -u2*u6 + u0*u8,
-u1*u6 + u0*u7,       -u2*u3 + u0*u5,       -u1*u3 + u0*u4
Defn: Defined by sending (y0 : y1 : y2 , y3 : y4 : y5) to
(y0*y3 : y0*y4 : y0*y5 : y1*y3 : y1*y4 : y1*y5 : y2*y3 : y2*y4 : y2*y5).

::

>>> T = ProductProjectiveSpaces([Integer(1), Integer(2)], CC, 'z')                          # needs sage.rings.real_mpfr
>>> T.segre_embedding()                                                   # needs sage.libs.singular sage.rings.real_mpfr
Scheme morphism:
From: Product of projective spaces P^1 x P^2
over Complex Field with 53 bits of precision
To:   Closed subscheme of Projective Space of dimension 5
over Complex Field with 53 bits of precision defined by:
-u2*u4 + u1*u5,       -u2*u3 + u0*u5,       -u1*u3 + u0*u4
Defn: Defined by sending (z0 : z1 , z2 : z3 : z4) to
(z0*z2 : z0*z3 : z0*z4 : z1*z2 : z1*z3 : z1*z4).

::

>>> T = ProductProjectiveSpaces([Integer(1), Integer(2), Integer(1)], QQ, 'z')
>>> T.segre_embedding()                                                   # needs sage.libs.singular
Scheme morphism:
From: Product of projective spaces P^1 x P^2 x P^1 over Rational Field
To:   Closed subscheme of Projective Space of dimension 11
over Rational Field defined by:
-u9*u10 + u8*u11,     -u7*u10 + u6*u11,     -u7*u8 + u6*u9,
-u5*u10 + u4*u11,     -u5*u8 + u4*u9,       -u5*u6 + u4*u7,
-u5*u9 + u3*u11,      -u5*u8 + u3*u10,      -u5*u8 + u2*u11,
-u4*u8 + u2*u10,      -u3*u8 + u2*u9,       -u3*u6 + u2*u7,
-u3*u4 + u2*u5,       -u5*u7 + u1*u11,      -u5*u6 + u1*u10,
-u3*u7 + u1*u9,       -u3*u6 + u1*u8,       -u5*u6 + u0*u11,
-u4*u6 + u0*u10,      -u3*u6 + u0*u9,       -u2*u6 + u0*u8,
-u1*u6 + u0*u7,       -u1*u4 + u0*u5,       -u1*u2 + u0*u3
Defn: Defined by sending (z0 : z1 , z2 : z3 : z4 , z5 : z6) to
(z0*z2*z5 : z0*z2*z6 : z0*z3*z5 : z0*z3*z6 : z0*z4*z5 : z0*z4*z6
: z1*z2*z5 : z1*z2*z6 : z1*z3*z5 : z1*z3*z6 : z1*z4*z5 : z1*z4*z6).

subscheme(X)[source]#

Return the closed subscheme defined by X.

INPUT:

• X – a list or tuple of equations

OUTPUT:

AlgebraicScheme_subscheme_projective_cartesian_product.

EXAMPLES:

sage: P.<x,y,z,w> = ProductProjectiveSpaces([1, 1], GF(5))
sage: X = P.subscheme([x - y, z - w]); X
Closed subscheme of Product of projective spaces P^1 x P^1
over Finite Field of size 5 defined by:
x - y,
z - w
sage: X.defining_polynomials()
[x - y, z - w]
sage: I = X.defining_ideal(); I
Ideal (x - y, z - w) of Multivariate Polynomial Ring in x, y, z, w
over Finite Field of size 5
sage: X.dimension()                                                         # needs sage.libs.singular
0
sage: X.base_ring()
Finite Field of size 5
sage: X.base_scheme()
Spectrum of Finite Field of size 5
sage: X.structure_morphism()
Scheme morphism:
From: Closed subscheme of Product of projective spaces P^1 x P^1
over Finite Field of size 5 defined by: x - y, z - w
To:   Spectrum of Finite Field of size 5
Defn: Structure map

>>> from sage.all import *
>>> P = ProductProjectiveSpaces([Integer(1), Integer(1)], GF(Integer(5)), names=('x', 'y', 'z', 'w',)); (x, y, z, w,) = P._first_ngens(4)
>>> X = P.subscheme([x - y, z - w]); X
Closed subscheme of Product of projective spaces P^1 x P^1
over Finite Field of size 5 defined by:
x - y,
z - w
>>> X.defining_polynomials()
[x - y, z - w]
>>> I = X.defining_ideal(); I
Ideal (x - y, z - w) of Multivariate Polynomial Ring in x, y, z, w
over Finite Field of size 5
>>> X.dimension()                                                         # needs sage.libs.singular
0
>>> X.base_ring()
Finite Field of size 5
>>> X.base_scheme()
Spectrum of Finite Field of size 5
>>> X.structure_morphism()
Scheme morphism:
From: Closed subscheme of Product of projective spaces P^1 x P^1
over Finite Field of size 5 defined by: x - y, z - w
To:   Spectrum of Finite Field of size 5
Defn: Structure map

sage.schemes.product_projective.space.is_ProductProjectiveSpaces(x)[source]#

Return True if x is a product of projective spaces.

This is an ambient space defined by $$\mathbb{P}^n_R \times \cdots \times \mathbb{P}^m_R$$, where $$R$$ is a ring and $$n,\ldots, m\geq 0$$ are integers.

OUTPUT: Boolean.

EXAMPLES:

sage: is_ProductProjectiveSpaces(ProjectiveSpace(5, names='x'))
doctest:warning...
DeprecationWarning: The function is_ProductProjectiveSpaces is deprecated; use 'isinstance(..., ProductProjectiveSpaces_ring)' instead.
See https://github.com/sagemath/sage/issues/38022 for details.
False
sage: is_ProductProjectiveSpaces(ProductProjectiveSpaces([1, 2, 3], ZZ, 'x'))
True

>>> from sage.all import *
>>> is_ProductProjectiveSpaces(ProjectiveSpace(Integer(5), names='x'))
doctest:warning...
DeprecationWarning: The function is_ProductProjectiveSpaces is deprecated; use 'isinstance(..., ProductProjectiveSpaces_ring)' instead.
See https://github.com/sagemath/sage/issues/38022 for details.
False
>>> is_ProductProjectiveSpaces(ProductProjectiveSpaces([Integer(1), Integer(2), Integer(3)], ZZ, 'x'))
True