Library of toric varieties¶

This module provides a simple way to construct often-used toric varieties. Please see the help for the individual methods of toric_varieties for a more detailed description of which varieties can be constructed.

AUTHORS:

• Volker Braun (2010-07-02): initial version

EXAMPLES:

sage: toric_varieties.dP6()
2-d CPR-Fano toric variety covered by 6 affine patches


You can assign the homogeneous coordinates to Sage variables either with inject_variables() or immediately during assignment like this:

sage: P2.<x,y,z> = toric_varieties.P2()
sage: x^2 + y^2 + z^2
x^2 + y^2 + z^2
sage: P2.coordinate_ring()
Multivariate Polynomial Ring in x, y, z over Rational Field

class sage.schemes.toric.library.ToricVarietyFactory

The methods of this class construct toric varieties.

Warning

You need not create instances of this class. Use the already-provided object toric_varieties instead.

A(n, names='z+', base_ring=Rational Field)

Construct the n-dimensional affine space.

INPUT:

• n – positive integer. The dimension of the affine space.
• names – string. Names for the homogeneous coordinates. See normalize_names() for acceptable formats.
• base_ring – a ring (default: $$\QQ$$). The base ring for the toric variety.

OUTPUT:

EXAMPLES:

sage: A3 = toric_varieties.A(3)
sage: A3
3-d affine toric variety
sage: A3.fan().rays()
N(1, 0, 0),
N(0, 1, 0),
N(0, 0, 1)
in 3-d lattice N
sage: A3.gens()
(z0, z1, z2)

A1(names='z', base_ring=Rational Field)

Construct the affine line $$\mathbb{A}^1$$ as a toric variety.

INPUT:

• names – string. Names for the homogeneous coordinates. See normalize_names() for acceptable formats.
• base_ring – a ring (default: $$\QQ$$). The base ring for the toric variety.

OUTPUT:

EXAMPLES:

sage: A1 = toric_varieties.A1()
sage: A1
1-d affine toric variety
sage: A1.fan().rays()
N(1)
in 1-d lattice N
sage: A1.gens()
(z,)

A2(names='x y', base_ring=Rational Field)

Construct the affine plane $$\mathbb{A}^2$$ as a toric variety.

INPUT:

• names – string. Names for the homogeneous coordinates. See normalize_names() for acceptable formats.
• base_ring – a ring (default: $$\QQ$$). The base ring for the toric variety.

OUTPUT:

EXAMPLES:

sage: A2 = toric_varieties.A2()
sage: A2
2-d affine toric variety
sage: A2.fan().rays()
N(1, 0),
N(0, 1)
in 2-d lattice N
sage: A2.gens()
(x, y)

A2_Z2(names='x y', base_ring=Rational Field)

Construct the orbifold $$\mathbb{A}^2 / \ZZ_2$$ as a toric variety.

INPUT:

• names – string. Names for the homogeneous coordinates. See normalize_names() for acceptable formats.
• base_ring – a ring (default: $$\QQ$$). The base ring for the toric variety.

OUTPUT:

EXAMPLES:

sage: A2_Z2 = toric_varieties.A2_Z2()
sage: A2_Z2
2-d affine toric variety
sage: A2_Z2.fan().rays()
N(1, 0),
N(1, 2)
in 2-d lattice N
sage: A2_Z2.gens()
(x, y)

BCdlOG(names='v1 v2 c1 c2 v4 v5 b e1 e2 e3 f g v6', base_ring=Rational Field)

Construct the 5-dimensional toric variety studied in [BCdlOG], [HLY2002]

INPUT:

• names – string. Names for the homogeneous coordinates. See normalize_names() for acceptable formats.
• base_ring – a ring (default: $$\QQ$$). The base ring for the toric variety.

OUTPUT:

EXAMPLES:

sage: X = toric_varieties.BCdlOG()
sage: X
5-d CPR-Fano toric variety covered by 54 affine patches
sage: X.fan().rays()
N(-1,  0,  0,  2,  3),
N( 0, -1,  0,  2,  3),
N( 0,  0, -1,  2,  3),
N( 0,  0, -1,  1,  2),
N( 0,  0,  0, -1,  0),
N( 0,  0,  0,  0, -1),
N( 0,  0,  0,  2,  3),
N( 0,  0,  1,  2,  3),
N( 0,  0,  2,  2,  3),
N( 0,  0,  1,  1,  1),
N( 0,  1,  2,  2,  3),
N( 0,  1,  3,  2,  3),
N( 1,  0,  4,  2,  3)
in 5-d lattice N
sage: X.gens()
(v1, v2, c1, c2, v4, v5, b, e1, e2, e3, f, g, v6)


REFERENCES:

 [BCdlOG] Volker Braun, Philip Candelas, Xendia de la Ossa, Antonella Grassi, Toric Calabi-Yau Fourfolds, Duality Between N=1 Theories and Divisors that Contribute to the Superpotential, Arxiv hep-th/0001208
BCdlOG_base(names='d4 d3 r2 r1 d2 u d1', base_ring=Rational Field)

Construct the base of the $$\mathbb{P}^2(1,2,3)$$ fibration BCdlOG().

INPUT:

• names – string. Names for the homogeneous coordinates. See normalize_names() for acceptable formats.
• base_ring – a ring (default: $$\QQ$$). The base ring for the toric variety.

OUTPUT:

EXAMPLES:

sage: base = toric_varieties.BCdlOG_base()
sage: base
3-d toric variety covered by 10 affine patches
sage: base.fan().rays()
N(-1,  0,  0),
N( 0, -1,  0),
N( 0,  0, -1),
N( 0,  0,  1),
N( 0,  1,  2),
N( 0,  1,  3),
N( 1,  0,  4)
in 3-d lattice N
sage: base.gens()
(d4, d3, r2, r1, d2, u, d1)

Conifold(names='u x y v', base_ring=Rational Field)

Construct the conifold as a toric variety.

INPUT:

• names – string. Names for the homogeneous coordinates. See normalize_names() for acceptable formats.
• base_ring – a ring (default: $$\QQ$$). The base ring for the toric variety.

OUTPUT:

EXAMPLES:

sage: Conifold = toric_varieties.Conifold()
sage: Conifold
3-d affine toric variety
sage: Conifold.fan().rays()
N(0, 0, 1),
N(0, 1, 1),
N(1, 0, 1),
N(1, 1, 1)
in 3-d lattice N
sage: Conifold.gens()
(u, x, y, v)

Cube_deformation(k, names=None, base_ring=Rational Field)

Construct, for each $$k\in\ZZ_{\geq 0}$$, a toric variety with $$\ZZ_k$$-torsion in the Chow group.

The fans of this sequence of toric varieties all equal the face fan of a unit cube topologically, but the (1,1,1)-vertex is moved to (1,1,2k+1). This example was studied in [FS].

INPUT:

• k – integer. The case k=0 is the same as Cube_face_fan().
• names – string. Names for the homogeneous coordinates. See normalize_names() for acceptable formats.
• base_ring – a ring (default: $$\QQ$$). The base ring for the toric variety.

OUTPUT:

A toric variety $$X_k$$. Its Chow group is $$A_1(X_k)=\ZZ_k$$.

EXAMPLES:

sage: X_2 = toric_varieties.Cube_deformation(2)
sage: X_2
3-d toric variety covered by 6 affine patches
sage: X_2.fan().rays()
N( 1,  1,  5),
N( 1, -1,  1),
N(-1,  1,  1),
N(-1, -1,  1),
N(-1, -1, -1),
N(-1,  1, -1),
N( 1, -1, -1),
N( 1,  1, -1)
in 3-d lattice N
sage: X_2.gens()
(z0, z1, z2, z3, z4, z5, z6, z7)


REFERENCES:

 [FS] William Fulton, Bernd Sturmfels, Intersection Theory on Toric Varieties, Arxiv alg-geom/9403002
Cube_face_fan(names='z+', base_ring=Rational Field)

Construct the toric variety given by the face fan of the 3-dimensional unit lattice cube.

This variety has 6 conifold singularities but the fan is still polyhedral.

INPUT:

• names – string. Names for the homogeneous coordinates. See normalize_names() for acceptable formats.
• base_ring – a ring (default: $$\QQ$$). The base ring for the toric variety.

OUTPUT:

EXAMPLES:

sage: Cube_face_fan = toric_varieties.Cube_face_fan()
sage: Cube_face_fan
3-d CPR-Fano toric variety covered by 6 affine patches
sage: Cube_face_fan.fan().rays()
N( 1,  1,  1),
N( 1, -1,  1),
N(-1,  1,  1),
N(-1, -1,  1),
N(-1, -1, -1),
N(-1,  1, -1),
N( 1, -1, -1),
N( 1,  1, -1)
in 3-d lattice N
sage: Cube_face_fan.gens()
(z0, z1, z2, z3, z4, z5, z6, z7)

Cube_nonpolyhedral(names='z+', base_ring=Rational Field)

Construct the toric variety defined by a fan that is not the face fan of a polyhedron.

This toric variety is defined by a fan that is topologically like the face fan of a 3-dimensional cube, but with a different N-lattice structure.

INPUT:

• names – string. Names for the homogeneous coordinates. See normalize_names() for acceptable formats.
• base_ring – a ring (default: $$\QQ$$). The base ring for the toric variety.

OUTPUT:

Note

• This is an example of an non-polyhedral fan.
• Its Chow group has torsion: $$A_2(X)=\ZZ^5 \oplus \ZZ_2$$

EXAMPLES:

sage: Cube_nonpolyhedral = toric_varieties.Cube_nonpolyhedral()
sage: Cube_nonpolyhedral
3-d toric variety covered by 6 affine patches
sage: Cube_nonpolyhedral.fan().rays()
N( 1,  2,  3),
N( 1, -1,  1),
N(-1,  1,  1),
N(-1, -1,  1),
N(-1, -1, -1),
N(-1,  1, -1),
N( 1, -1, -1),
N( 1,  1, -1)
in 3-d lattice N
sage: Cube_nonpolyhedral.gens()
(z0, z1, z2, z3, z4, z5, z6, z7)

Cube_sublattice(names='z+', base_ring=Rational Field)

Construct the toric variety defined by a face fan over a 3-dimensional cube, but not the unit cube in the N-lattice. See [FultonP65].

Its Chow group is $$A_2(X)=\ZZ^5$$, which distinguishes it from the face fan of the unit cube.

INPUT:

• names – string. Names for the homogeneous coordinates. See normalize_names() for acceptable formats.
• base_ring – a ring (default: $$\QQ$$). The base ring for the toric variety.

OUTPUT:

EXAMPLES:

sage: Cube_sublattice = toric_varieties.Cube_sublattice()
sage: Cube_sublattice
3-d CPR-Fano toric variety covered by 6 affine patches
sage: Cube_sublattice.fan().rays()
N( 1,  0,  0),
N( 0,  1,  0),
N( 0,  0,  1),
N(-1,  1,  1),
N(-1,  0,  0),
N( 0, -1,  0),
N( 0,  0, -1),
N( 1, -1, -1)
in 3-d lattice N
sage: Cube_sublattice.gens()
(z0, z1, z2, z3, z4, z5, z6, z7)


REFERENCES:

 [FultonP65] Page 65, 3rd exercise (Section 3.4) of Wiliam Fulton, “Introduction to Toric Varieties”, Princeton University Press
P(n, names='z+', base_ring=Rational Field)

Construct the n-dimensional projective space $$\mathbb{P}^n$$.

INPUT:

• n – positive integer. The dimension of the projective space.
• names – string. Names for the homogeneous coordinates. See normalize_names() for acceptable formats.
• base_ring – a ring (default: $$\QQ$$). The base ring for the toric variety.

OUTPUT:

EXAMPLES:

sage: P3 = toric_varieties.P(3)
sage: P3
3-d CPR-Fano toric variety covered by 4 affine patches
sage: P3.fan().rays()
N( 1,  0,  0),
N( 0,  1,  0),
N( 0,  0,  1),
N(-1, -1, -1)
in 3-d lattice N
sage: P3.gens()
(z0, z1, z2, z3)

P1(names='s t', base_ring=Rational Field)

Construct the projective line $$\mathbb{P}^1$$ as a toric variety.

INPUT:

• names – string. Names for the homogeneous coordinates. See normalize_names() for acceptable formats.
• base_ring – a ring (default: $$\QQ$$). The base ring for the toric variety.

OUTPUT:

EXAMPLES:

sage: P1 = toric_varieties.P1()
sage: P1
1-d CPR-Fano toric variety covered by 2 affine patches
sage: P1.fan().rays()
N( 1),
N(-1)
in 1-d lattice N
sage: P1.gens()
(s, t)

P1xA1(names='s t z', base_ring=Rational Field)

Construct the Cartesian product $$\mathbb{P}^1 \times \mathbb{A}^1$$ as a toric variety.

INPUT:

• names – string. Names for the homogeneous coordinates. See normalize_names() for acceptable formats.
• base_ring – a ring (default: $$\QQ$$). The base ring for the toric variety.

OUTPUT:

EXAMPLES:

sage: P1xA1 = toric_varieties.P1xA1()
sage: P1xA1
2-d toric variety covered by 2 affine patches
sage: P1xA1.fan().rays()
N( 1, 0),
N(-1, 0),
N( 0, 1)
in 2-d lattice N
sage: P1xA1.gens()
(s, t, z)

P1xP1(names='s t x y', base_ring=Rational Field)

Construct the del Pezzo surface $$\mathbb{P}^1 \times \mathbb{P}^1$$ as a toric variety.

INPUT:

• names – string. Names for the homogeneous coordinates. See normalize_names() for acceptable formats.
• base_ring – a ring (default: $$\QQ$$). The base ring for the toric variety.

OUTPUT:

EXAMPLES:

sage: P1xP1 = toric_varieties.P1xP1()
sage: P1xP1
2-d CPR-Fano toric variety covered by 4 affine patches
sage: P1xP1.fan().rays()
N( 1,  0),
N(-1,  0),
N( 0,  1),
N( 0, -1)
in 2-d lattice N
sage: P1xP1.gens()
(s, t, x, y)

P1xP1_Z2(names='s t x y', base_ring=Rational Field)

Construct the toric $$\ZZ_2$$-orbifold of the del Pezzo surface $$\mathbb{P}^1 \times \mathbb{P}^1$$ as a toric variety.

INPUT:

• names – string. Names for the homogeneous coordinates. See normalize_names() for acceptable formats.
• base_ring – a ring (default: $$\QQ$$). The base ring for the toric variety.

OUTPUT:

EXAMPLES:

sage: P1xP1_Z2 = toric_varieties.P1xP1_Z2()
sage: P1xP1_Z2
2-d CPR-Fano toric variety covered by 4 affine patches
sage: P1xP1_Z2.fan().rays()
N( 1,  1),
N(-1, -1),
N(-1,  1),
N( 1, -1)
in 2-d lattice N
sage: P1xP1_Z2.gens()
(s, t, x, y)
sage: P1xP1_Z2.Chow_group().degree(1)
C2 x Z^2

P2(names='x y z', base_ring=Rational Field)

Construct the projective plane $$\mathbb{P}^2$$ as a toric variety.

INPUT:

• names – string. Names for the homogeneous coordinates. See normalize_names() for acceptable formats.
• base_ring – a ring (default: $$\QQ$$). The base ring for the toric variety.

OUTPUT:

EXAMPLES:

sage: P2 = toric_varieties.P2()
sage: P2
2-d CPR-Fano toric variety covered by 3 affine patches
sage: P2.fan().rays()
N( 1,  0),
N( 0,  1),
N(-1, -1)
in 2-d lattice N
sage: P2.gens()
(x, y, z)

P2_112(names='z+', base_ring=Rational Field)

Construct the weighted projective space $$\mathbb{P}^2(1,1,2)$$.

INPUT:

• names – string. Names for the homogeneous coordinates. See normalize_names() for acceptable formats.
• base_ring – a ring (default: $$\QQ$$). The base ring for the toric variety.

OUTPUT:

EXAMPLES:

sage: P2_112 = toric_varieties.P2_112()
sage: P2_112
2-d CPR-Fano toric variety covered by 3 affine patches
sage: P2_112.fan().rays()
N( 1,  0),
N( 0,  1),
N(-1, -2)
in 2-d lattice N
sage: P2_112.gens()
(z0, z1, z2)

P2_123(names='z+', base_ring=Rational Field)

Construct the weighted projective space $$\mathbb{P}^2(1,2,3)$$.

INPUT:

• names – string. Names for the homogeneous coordinates. See normalize_names() for acceptable formats.
• base_ring – a ring (default: $$\QQ$$). The base ring for the toric variety.

OUTPUT:

EXAMPLES:

sage: P2_123 = toric_varieties.P2_123()
sage: P2_123
2-d CPR-Fano toric variety covered by 3 affine patches
sage: P2_123.fan().rays()
N( 1,  0),
N( 0,  1),
N(-2, -3)
in 2-d lattice N
sage: P2_123.gens()
(z0, z1, z2)

P4_11133(names='z+', base_ring=Rational Field)

Construct the weighted projective space $$\mathbb{P}^4(1,1,1,3,3)$$.

INPUT:

• names – string. Names for the homogeneous coordinates. See normalize_names() for acceptable formats.
• base_ring – a ring (default: $$\QQ$$). The base ring for the toric variety.

OUTPUT:

EXAMPLES:

sage: P4_11133 = toric_varieties.P4_11133()
sage: P4_11133
4-d CPR-Fano toric variety covered by 5 affine patches
sage: P4_11133.fan().rays()
N( 1,  0,  0,  0),
N( 0,  1,  0,  0),
N( 0,  0,  1,  0),
N( 0,  0,  0,  1),
N(-3, -3, -1, -1)
in 4-d lattice N
sage: P4_11133.gens()
(z0, z1, z2, z3, z4)

P4_11133_resolved(names='z+', base_ring=Rational Field)

Construct the weighted projective space $$\mathbb{P}^4(1,1,1,3,3)$$.

INPUT:

• names – string. Names for the homogeneous coordinates. See normalize_names() for acceptable formats.
• base_ring – a ring (default: $$\QQ$$). The base ring for the toric variety.

OUTPUT:

EXAMPLES:

sage: P4_11133_resolved = toric_varieties.P4_11133_resolved()
sage: P4_11133_resolved
4-d CPR-Fano toric variety covered by 9 affine patches
sage: P4_11133_resolved.fan().rays()
N( 1,  0,  0,  0),
N( 0,  1,  0,  0),
N( 0,  0,  1,  0),
N( 0,  0,  0,  1),
N(-3, -3, -1, -1),
N(-1, -1,  0,  0)
in 4-d lattice N
sage: P4_11133_resolved.gens()
(z0, z1, z2, z3, z4, z5)

P4_11169(names='z+', base_ring=Rational Field)

Construct the weighted projective space $$\mathbb{P}^4(1,1,1,6,9)$$.

INPUT:

• names – string. Names for the homogeneous coordinates. See normalize_names() for acceptable formats.
• base_ring – a ring (default: $$\QQ$$). The base ring for the toric variety.

OUTPUT:

EXAMPLES:

sage: P4_11169 = toric_varieties.P4_11169()
sage: P4_11169
4-d CPR-Fano toric variety covered by 5 affine patches
sage: P4_11169.fan().rays()
N( 1,  0,  0,  0),
N( 0,  1,  0,  0),
N( 0,  0,  1,  0),
N( 0,  0,  0,  1),
N(-9, -6, -1, -1)
in 4-d lattice N
sage: P4_11169.gens()
(z0, z1, z2, z3, z4)

P4_11169_resolved(names='z+', base_ring=Rational Field)

Construct the blow-up of the weighted projective space $$\mathbb{P}^4(1,1,1,6,9)$$ at its curve of $$\ZZ_3$$ orbifold fixed points.

INPUT:

• names – string. Names for the homogeneous coordinates. See normalize_names() for acceptable formats.
• base_ring – a ring (default: $$\QQ$$). The base ring for the toric variety.

OUTPUT:

EXAMPLES:

sage: P4_11169_resolved = toric_varieties.P4_11169_resolved()
sage: P4_11169_resolved
4-d CPR-Fano toric variety covered by 9 affine patches
sage: P4_11169_resolved.fan().rays()
N( 1,  0,  0,  0),
N( 0,  1,  0,  0),
N( 0,  0,  1,  0),
N( 0,  0,  0,  1),
N(-9, -6, -1, -1),
N(-3, -2,  0,  0)
in 4-d lattice N
sage: P4_11169_resolved.gens()
(z0, z1, z2, z3, z4, z5)

WP(*q, **kw)

Construct weighted projective $$n$$-space over a field.

INPUT:

• q – a sequence of positive integers relatively prime to one another. The weights q can be given either as a list or tuple, or as positional arguments.

Two keyword arguments:

• base_ring – a field (default: $$\QQ$$).
• names – string or list (tuple) of strings (default ‘z+’). See normalize_names() for acceptable formats.

OUTPUT:

• A toric variety. If $$q=(q_0,\dots,q_n)$$, then the output is the weighted projective space $$\mathbb{P}(q_0,\dots,q_n)$$ over base_ring. names are the names of the generators of the homogeneous coordinate ring.

EXAMPLES:

A hyperelliptic curve $$C$$ of genus 2 as a subscheme of the weighted projective plane $$\mathbb{P}(1,3,1)$$:

sage: X = toric_varieties.WP([1,3,1], names='x y z')
sage: X.inject_variables()
Defining x, y, z
sage: g = y^2-(x^6-z^6)
sage: C = X.subscheme([g]); C
Closed subscheme of 2-d toric variety covered by 3 affine patches defined by:
-x^6 + z^6 + y^2

dP6(names='x u y v z w', base_ring=Rational Field)

Construct the del Pezzo surface of degree 6 ($$\mathbb{P}^2$$ blown up at 3 points) as a toric variety.

INPUT:

• names – string. Names for the homogeneous coordinates. See normalize_names() for acceptable formats.
• base_ring – a ring (default: $$\QQ$$). The base ring for the toric variety.

OUTPUT:

EXAMPLES:

sage: dP6 = toric_varieties.dP6()
sage: dP6
2-d CPR-Fano toric variety covered by 6 affine patches
sage: dP6.fan().rays()
N( 0,  1),
N(-1,  0),
N(-1, -1),
N( 0, -1),
N( 1,  0),
N( 1,  1)
in 2-d lattice N
sage: dP6.gens()
(x, u, y, v, z, w)

dP6xdP6(names='x0 x1 x2 x3 x4 x5 y0 y1 y2 y3 y4 y5', base_ring=Rational Field)

Construct the product of two del Pezzo surfaces of degree 6 ($$\mathbb{P}^2$$ blown up at 3 points) as a toric variety.

INPUT:

• names – string. Names for the homogeneous coordinates. See normalize_names() for acceptable formats.
• base_ring – a ring (default: $$\QQ$$). The base ring for the toric variety.

OUTPUT:

EXAMPLES:

sage: dP6xdP6 = toric_varieties.dP6xdP6()
sage: dP6xdP6
4-d CPR-Fano toric variety covered by 36 affine patches
sage: dP6xdP6.fan().rays()
N( 0,  1,  0,  0),
N(-1,  0,  0,  0),
N(-1, -1,  0,  0),
N( 0, -1,  0,  0),
N( 1,  0,  0,  0),
N( 1,  1,  0,  0),
N( 0,  0,  0,  1),
N( 0,  0, -1,  0),
N( 0,  0, -1, -1),
N( 0,  0,  0, -1),
N( 0,  0,  1,  0),
N( 0,  0,  1,  1)
in 4-d lattice N
sage: dP6xdP6.gens()
(x0, x1, x2, x3, x4, x5, y0, y1, y2, y3, y4, y5)

dP7(names='x u y v z', base_ring=Rational Field)

Construct the del Pezzo surface of degree 7 ($$\mathbb{P}^2$$ blown up at 2 points) as a toric variety.

INPUT:

• names – string. Names for the homogeneous coordinates. See normalize_names() for acceptable formats.
• base_ring – a ring (default: $$\QQ$$). The base ring for the toric variety.

OUTPUT:

EXAMPLES:

sage: dP7 = toric_varieties.dP7()
sage: dP7
2-d CPR-Fano toric variety covered by 5 affine patches
sage: dP7.fan().rays()
N( 0,  1),
N(-1,  0),
N(-1, -1),
N( 0, -1),
N( 1,  0)
in 2-d lattice N
sage: dP7.gens()
(x, u, y, v, z)

dP8(names='t x y z', base_ring=Rational Field)

Construct the del Pezzo surface of degree 8 ($$\mathbb{P}^2$$ blown up at 1 point) as a toric variety.

INPUT:

• names – string. Names for the homogeneous coordinates. See normalize_names() for acceptable formats.
• base_ring – a ring (default: $$\QQ$$). The base ring for the toric variety.

OUTPUT:

EXAMPLES:

sage: dP8 = toric_varieties.dP8()
sage: dP8
2-d CPR-Fano toric variety covered by 4 affine patches
sage: dP8.fan().rays()
N( 1,  1),
N( 0,  1),
N(-1, -1),
N( 1,  0)
in 2-d lattice N
sage: dP8.gens()
(t, x, y, z)

torus(n, names='z+', base_ring=Rational Field)

Construct the n-dimensional algebraic torus $$(\mathbb{F}^\times)^n$$.

INPUT:

• n – non-negative integer. The dimension of the algebraic torus.
• names – string. Names for the homogeneous coordinates. See normalize_names() for acceptable formats.
• base_ring – a ring (default: $$\QQ$$). The base ring for the toric variety.

OUTPUT:

EXAMPLES:

sage: T3 = toric_varieties.torus(3);  T3
3-d affine toric variety
sage: T3.fan().rays()
Empty collection
in 3-d lattice N
sage: T3.fan().virtual_rays()
N(1, 0, 0),
N(0, 1, 0),
N(0, 0, 1)
in 3-d lattice N
sage: T3.gens()
(z0, z1, z2)
sage: sorted(T3.change_ring(GF(3)).point_set().list())
[[1 : 1 : 1], [1 : 1 : 2], [1 : 2 : 1], [1 : 2 : 2],
[2 : 1 : 1], [2 : 1 : 2], [2 : 2 : 1], [2 : 2 : 2]]