Toric divisors and divisor classes#

Let \(X\) be a toric variety corresponding to a rational polyhedral fan \(\Sigma\). A toric divisor \(D\) is a T-Weil divisor over a given coefficient ring (usually \(\ZZ\) or \(\QQ\)), i.e. a formal linear combination of torus-invariant subvarieties of \(X\) of codimension one. In homogeneous coordinates \([z_0:\cdots:z_k]\), these are the subvarieties \(\{z_i=0\}\). Note that there is a finite number of such subvarieties, one for each ray of \(\Sigma\). We generally identify

  • Toric divisor \(D\),

  • Sheaf \(\mathcal{O}(D)\) (if \(D\) is Cartier, it is a line bundle),

  • Support function \(\phi_D\) (if \(D\) is \(\QQ\)-Cartier, it is a function linear on each cone of \(\Sigma\)).

EXAMPLES:

We start with an illustration of basic divisor arithmetic:

sage: dP6 = toric_varieties.dP6()
sage: Dx,Du,Dy,Dv,Dz,Dw = dP6.toric_divisor_group().gens()
sage: Dx
V(x)
sage: -Dx
-V(x)
sage: 2*Dx
2*V(x)
sage: Dx*2
2*V(x)
sage: (1/2)*Dx + Dy/3 - Dz
1/2*V(x) + 1/3*V(y) - V(z)
sage: Dx.parent()
Group of toric ZZ-Weil divisors
on 2-d CPR-Fano toric variety covered by 6 affine patches
sage: (Dx/2).parent()
Group of toric QQ-Weil divisors
on 2-d CPR-Fano toric variety covered by 6 affine patches
>>> from sage.all import *
>>> dP6 = toric_varieties.dP6()
>>> Dx,Du,Dy,Dv,Dz,Dw = dP6.toric_divisor_group().gens()
>>> Dx
V(x)
>>> -Dx
-V(x)
>>> Integer(2)*Dx
2*V(x)
>>> Dx*Integer(2)
2*V(x)
>>> (Integer(1)/Integer(2))*Dx + Dy/Integer(3) - Dz
1/2*V(x) + 1/3*V(y) - V(z)
>>> Dx.parent()
Group of toric ZZ-Weil divisors
on 2-d CPR-Fano toric variety covered by 6 affine patches
>>> (Dx/Integer(2)).parent()
Group of toric QQ-Weil divisors
on 2-d CPR-Fano toric variety covered by 6 affine patches

Now we create a more complicated variety to demonstrate divisors of different types:

sage: F = Fan(cones=[(0,1,2,3), (0,1,4)],
....:         rays=[(1,1,1), (1,-1,1), (1,-1,-1), (1,1,-1), (0,0,1)])
sage: X = ToricVariety(F)
sage: QQ_Cartier = X.divisor([2,2,1,1,1])
sage: Cartier = 2 * QQ_Cartier
sage: Weil = X.divisor([1,1,1,0,0])
sage: QQ_Weil = 1/2 * Weil
sage: [QQ_Weil.is_QQ_Weil(),
....:  QQ_Weil.is_Weil(),
....:  QQ_Weil.is_QQ_Cartier(),
....:  QQ_Weil.is_Cartier()]
[True, False, False, False]
sage: [Weil.is_QQ_Weil(),
....:  Weil.is_Weil(),
....:  Weil.is_QQ_Cartier(),
....:  Weil.is_Cartier()]
[True, True, False, False]
sage: [QQ_Cartier.is_QQ_Weil(),
....:  QQ_Cartier.is_Weil(),
....:  QQ_Cartier.is_QQ_Cartier(),
....:  QQ_Cartier.is_Cartier()]
[True, True, True, False]
sage: [Cartier.is_QQ_Weil(),
....:  Cartier.is_Weil(),
....:  Cartier.is_QQ_Cartier(),
....:  Cartier.is_Cartier()]
[True, True, True, True]
>>> from sage.all import *
>>> F = Fan(cones=[(Integer(0),Integer(1),Integer(2),Integer(3)), (Integer(0),Integer(1),Integer(4))],
...         rays=[(Integer(1),Integer(1),Integer(1)), (Integer(1),-Integer(1),Integer(1)), (Integer(1),-Integer(1),-Integer(1)), (Integer(1),Integer(1),-Integer(1)), (Integer(0),Integer(0),Integer(1))])
>>> X = ToricVariety(F)
>>> QQ_Cartier = X.divisor([Integer(2),Integer(2),Integer(1),Integer(1),Integer(1)])
>>> Cartier = Integer(2) * QQ_Cartier
>>> Weil = X.divisor([Integer(1),Integer(1),Integer(1),Integer(0),Integer(0)])
>>> QQ_Weil = Integer(1)/Integer(2) * Weil
>>> [QQ_Weil.is_QQ_Weil(),
...  QQ_Weil.is_Weil(),
...  QQ_Weil.is_QQ_Cartier(),
...  QQ_Weil.is_Cartier()]
[True, False, False, False]
>>> [Weil.is_QQ_Weil(),
...  Weil.is_Weil(),
...  Weil.is_QQ_Cartier(),
...  Weil.is_Cartier()]
[True, True, False, False]
>>> [QQ_Cartier.is_QQ_Weil(),
...  QQ_Cartier.is_Weil(),
...  QQ_Cartier.is_QQ_Cartier(),
...  QQ_Cartier.is_Cartier()]
[True, True, True, False]
>>> [Cartier.is_QQ_Weil(),
...  Cartier.is_Weil(),
...  Cartier.is_QQ_Cartier(),
...  Cartier.is_Cartier()]
[True, True, True, True]

The toric (\(\QQ\)-Weil) divisors on a toric variety \(X\) modulo linear equivalence generate the divisor class group \(\mathrm{Cl}(X)\), implemented by ToricRationalDivisorClassGroup. If \(X\) is smooth, this equals the Picard group \(\mathop{\mathrm{Pic}}(X)\). We continue using del Pezzo surface of degree 6 introduced above:

sage: Cl = dP6.rational_class_group(); Cl
The toric rational divisor class group
of a 2-d CPR-Fano toric variety covered by 6 affine patches
sage: Cl.ngens()
4
sage: c0,c1,c2,c3 = Cl.gens()
sage: c = c0 + 2*c1 - c3; c
Divisor class [1, 2, 0, -1]
>>> from sage.all import *
>>> Cl = dP6.rational_class_group(); Cl
The toric rational divisor class group
of a 2-d CPR-Fano toric variety covered by 6 affine patches
>>> Cl.ngens()
4
>>> c0,c1,c2,c3 = Cl.gens()
>>> c = c0 + Integer(2)*c1 - c3; c
Divisor class [1, 2, 0, -1]

Divisors are mapped to their classes and lifted via:

sage: Dx.divisor_class()
Divisor class [1, 0, 0, 0]
sage: Dx.divisor_class() in Cl
True
sage: (-Dw + Dv + Dy).divisor_class()
Divisor class [1, 0, 0, 0]
sage: c0
Divisor class [1, 0, 0, 0]
sage: c0.lift()
V(x)
>>> from sage.all import *
>>> Dx.divisor_class()
Divisor class [1, 0, 0, 0]
>>> Dx.divisor_class() in Cl
True
>>> (-Dw + Dv + Dy).divisor_class()
Divisor class [1, 0, 0, 0]
>>> c0
Divisor class [1, 0, 0, 0]
>>> c0.lift()
V(x)

The (rational) divisor class group is where the Kaehler cone lives:

sage: Kc = dP6.Kaehler_cone(); Kc
4-d cone in 4-d lattice
sage: Kc.rays()
Divisor class [0, 1, 1, 0],
Divisor class [0, 0, 1, 1],
Divisor class [1, 1, 0, 0],
Divisor class [1, 1, 1, 0],
Divisor class [0, 1, 1, 1]
in Basis lattice of The toric rational divisor class group
of a 2-d CPR-Fano toric variety covered by 6 affine patches
sage: Kc.ray(1).lift()
V(x) + V(w)
>>> from sage.all import *
>>> Kc = dP6.Kaehler_cone(); Kc
4-d cone in 4-d lattice
>>> Kc.rays()
Divisor class [0, 1, 1, 0],
Divisor class [0, 0, 1, 1],
Divisor class [1, 1, 0, 0],
Divisor class [1, 1, 1, 0],
Divisor class [0, 1, 1, 1]
in Basis lattice of The toric rational divisor class group
of a 2-d CPR-Fano toric variety covered by 6 affine patches
>>> Kc.ray(Integer(1)).lift()
V(x) + V(w)

Given a divisor \(D\), we have an associated line bundle (or a reflexive sheaf, if \(D\) is not Cartier) \(\mathcal{O}(D)\). Its sections are:

sage: P2 = toric_varieties.P2()
sage: H = P2.divisor(0); H
V(x)
sage: H.sections()
(M(-1, 0), M(-1, 1), M(0, 0))
sage: H.sections_monomials()
(z, y, x)
>>> from sage.all import *
>>> P2 = toric_varieties.P2()
>>> H = P2.divisor(Integer(0)); H
V(x)
>>> H.sections()
(M(-1, 0), M(-1, 1), M(0, 0))
>>> H.sections_monomials()
(z, y, x)

Note that the space of sections is always spanned by monomials. Therefore, we can grade the sections (as homogeneous monomials) by their weight under rescaling individual coordinates. This weight data amounts to a point of the dual lattice.

In the same way, we can grade cohomology groups by their cohomological degree and a weight:

sage: M = P2.fan().lattice().dual()
sage: H.cohomology(deg=0, weight=M(-1,0))
Vector space of dimension 1 over Rational Field
sage: _.dimension()
1
>>> from sage.all import *
>>> M = P2.fan().lattice().dual()
>>> H.cohomology(deg=Integer(0), weight=M(-Integer(1),Integer(0)))
Vector space of dimension 1 over Rational Field
>>> _.dimension()
1

Here is a more complicated example with \(h^1(dP_6, \mathcal{O}(D))=4\)

sage: D = dP6.divisor([0, 0, -1, 0, 2, -1])
sage: D.cohomology()
{0: Vector space of dimension 0 over Rational Field,
 1: Vector space of dimension 4 over Rational Field,
 2: Vector space of dimension 0 over Rational Field}
sage: D.cohomology(dim=True)
(0, 4, 0)
>>> from sage.all import *
>>> D = dP6.divisor([Integer(0), Integer(0), -Integer(1), Integer(0), Integer(2), -Integer(1)])
>>> D.cohomology()
{0: Vector space of dimension 0 over Rational Field,
 1: Vector space of dimension 4 over Rational Field,
 2: Vector space of dimension 0 over Rational Field}
>>> D.cohomology(dim=True)
(0, 4, 0)

AUTHORS:

  • Volker Braun, Andrey Novoseltsev (2010-09-07): initial version.

sage.schemes.toric.divisor.ToricDivisor(toric_variety, arg=None, ring=None, check=True, reduce=True)[source]#

Construct a divisor of toric_variety.

INPUT:

  • toric_variety – a toric variety;

  • arg – one of the following description of the toric divisor to be constructed:

    • None or 0 (the trivial divisor);

    • monomial in the homogeneous coordinates;

    • one-dimensional cone of the fan of toric_variety or a lattice point generating such a cone;

    • sequence of rational numbers, specifying multiplicities for each of the toric divisors.

  • ring – usually either \(\ZZ\) or \(\QQ\). The base ring of the divisor group. If ring is not specified, a coefficient ring suitable for arg is derived.

  • check – bool (default: True). Whether to coerce coefficients into base ring. Setting it to False can speed up construction.

  • reduce – reduce (default: True). Whether to combine common terms. Setting it to False can speed up construction.

Warning

The coefficients of the divisor must be in the base ring and the terms must be reduced. If you set check=False and/or reduce=False it is your responsibility to pass valid input data arg.

OUTPUT: A sage.schemes.toric.divisor.ToricDivisor_generic.

EXAMPLES:

sage: from sage.schemes.toric.divisor import ToricDivisor
sage: dP6 = toric_varieties.dP6()
sage: ToricDivisor(dP6, [(1,dP6.gen(2)), (1,dP6.gen(1))])
V(u) + V(y)
sage: ToricDivisor(dP6, (0,1,1,0,0,0), ring=QQ)
V(u) + V(y)
sage: dP6.inject_variables()
Defining x, u, y, v, z, w
sage: ToricDivisor(dP6, u + y)
Traceback (most recent call last):
...
ValueError: u + y is not a monomial
sage: ToricDivisor(dP6, u*y)
V(u) + V(y)
sage: ToricDivisor(dP6, dP6.fan(dim=1)[2] )
V(y)
sage: cone = Cone(dP6.fan(dim=1)[2])
sage: ToricDivisor(dP6, cone)
V(y)
sage: N = dP6.fan().lattice()
sage: ToricDivisor(dP6, N(1,1) )
V(w)
>>> from sage.all import *
>>> from sage.schemes.toric.divisor import ToricDivisor
>>> dP6 = toric_varieties.dP6()
>>> ToricDivisor(dP6, [(Integer(1),dP6.gen(Integer(2))), (Integer(1),dP6.gen(Integer(1)))])
V(u) + V(y)
>>> ToricDivisor(dP6, (Integer(0),Integer(1),Integer(1),Integer(0),Integer(0),Integer(0)), ring=QQ)
V(u) + V(y)
>>> dP6.inject_variables()
Defining x, u, y, v, z, w
>>> ToricDivisor(dP6, u + y)
Traceback (most recent call last):
...
ValueError: u + y is not a monomial
>>> ToricDivisor(dP6, u*y)
V(u) + V(y)
>>> ToricDivisor(dP6, dP6.fan(dim=Integer(1))[Integer(2)] )
V(y)
>>> cone = Cone(dP6.fan(dim=Integer(1))[Integer(2)])
>>> ToricDivisor(dP6, cone)
V(y)
>>> N = dP6.fan().lattice()
>>> ToricDivisor(dP6, N(Integer(1),Integer(1)) )
V(w)

We attempt to guess the correct base ring:

sage: ToricDivisor(dP6, [(1/2,u)])
1/2*V(u)
sage: _.parent()
Group of toric QQ-Weil divisors on
2-d CPR-Fano toric variety covered by 6 affine patches
sage: ToricDivisor(dP6, [(1/2,u), (1/2,u)])
V(u)
sage: _.parent()
Group of toric ZZ-Weil divisors on
2-d CPR-Fano toric variety covered by 6 affine patches
sage: ToricDivisor(dP6, [(u,u)])
Traceback (most recent call last):
...
TypeError: cannot deduce coefficient ring for [(u, u)]
>>> from sage.all import *
>>> ToricDivisor(dP6, [(Integer(1)/Integer(2),u)])
1/2*V(u)
>>> _.parent()
Group of toric QQ-Weil divisors on
2-d CPR-Fano toric variety covered by 6 affine patches
>>> ToricDivisor(dP6, [(Integer(1)/Integer(2),u), (Integer(1)/Integer(2),u)])
V(u)
>>> _.parent()
Group of toric ZZ-Weil divisors on
2-d CPR-Fano toric variety covered by 6 affine patches
>>> ToricDivisor(dP6, [(u,u)])
Traceback (most recent call last):
...
TypeError: cannot deduce coefficient ring for [(u, u)]
class sage.schemes.toric.divisor.ToricDivisorGroup(toric_variety, base_ring)[source]#

Bases: DivisorGroup_generic

The group of (\(\QQ\)-T-Weil) divisors on a toric variety.

EXAMPLES:

sage: P2 = toric_varieties.P2()
sage: P2.toric_divisor_group()
Group of toric ZZ-Weil divisors
on 2-d CPR-Fano toric variety covered by 3 affine patches
>>> from sage.all import *
>>> P2 = toric_varieties.P2()
>>> P2.toric_divisor_group()
Group of toric ZZ-Weil divisors
on 2-d CPR-Fano toric variety covered by 3 affine patches
Element[source]#

alias of ToricDivisor_generic

base_extend(R)[source]#

Extend the scalars of self to R.

INPUT:

  • R – ring.

OUTPUT:

  • toric divisor group.

EXAMPLES:

sage: P2 = toric_varieties.P2()
sage: DivZZ = P2.toric_divisor_group()
sage: DivQQ = P2.toric_divisor_group(base_ring=QQ)
sage: DivZZ.base_extend(QQ) is DivQQ
True
>>> from sage.all import *
>>> P2 = toric_varieties.P2()
>>> DivZZ = P2.toric_divisor_group()
>>> DivQQ = P2.toric_divisor_group(base_ring=QQ)
>>> DivZZ.base_extend(QQ) is DivQQ
True
gen(i)[source]#

Return the i-th generator of the divisor group.

INPUT:

  • i – integer.

OUTPUT:

The divisor \(z_i=0\), where \(z_i\) is the \(i\)-th homogeneous coordinate.

EXAMPLES:

sage: P2 = toric_varieties.P2()
sage: TDiv = P2.toric_divisor_group()
sage: TDiv.gen(2)
V(z)
>>> from sage.all import *
>>> P2 = toric_varieties.P2()
>>> TDiv = P2.toric_divisor_group()
>>> TDiv.gen(Integer(2))
V(z)
gens()[source]#

Return the generators of the divisor group.

EXAMPLES:

sage: P2 = toric_varieties.P2()
sage: TDiv = P2.toric_divisor_group()
sage: TDiv.gens()
(V(x), V(y), V(z))
>>> from sage.all import *
>>> P2 = toric_varieties.P2()
>>> TDiv = P2.toric_divisor_group()
>>> TDiv.gens()
(V(x), V(y), V(z))
ngens()[source]#

Return the number of generators.

OUTPUT:

The number of generators of self, which equals the number of rays in the fan of the toric variety.

EXAMPLES:

sage: P2 = toric_varieties.P2()
sage: TDiv = P2.toric_divisor_group()
sage: TDiv.ngens()
3
>>> from sage.all import *
>>> P2 = toric_varieties.P2()
>>> TDiv = P2.toric_divisor_group()
>>> TDiv.ngens()
3
class sage.schemes.toric.divisor.ToricDivisor_generic(v, parent, check=True, reduce=True)[source]#

Bases: Divisor_generic

Construct a (toric Weil) divisor on the given toric variety.

INPUT:

Warning

Do not construct ToricDivisor_generic objects manually. Instead, use either the function ToricDivisor() or the method divisor() of toric varieties.

EXAMPLES:

sage: dP6 = toric_varieties.dP6()
sage: ray = dP6.fan().ray(0)
sage: ray
N(0, 1)
sage: D = dP6.divisor(ray); D
V(x)
sage: D.parent()
Group of toric ZZ-Weil divisors
on 2-d CPR-Fano toric variety covered by 6 affine patches
>>> from sage.all import *
>>> dP6 = toric_varieties.dP6()
>>> ray = dP6.fan().ray(Integer(0))
>>> ray
N(0, 1)
>>> D = dP6.divisor(ray); D
V(x)
>>> D.parent()
Group of toric ZZ-Weil divisors
on 2-d CPR-Fano toric variety covered by 6 affine patches
Chern_character()[source]#

Return the Chern character of the sheaf \(\mathcal{O}(D)\) defined by the divisor \(D\).

You can also use a shortcut ch().

EXAMPLES:

sage: dP6 = toric_varieties.dP6()
sage: N = dP6.fan().lattice()
sage: D3 = dP6.divisor(dP6.fan().cone_containing( N(0,1)   ))
sage: D5 = dP6.divisor(dP6.fan().cone_containing( N(-1,-1) ))
sage: D6 = dP6.divisor(dP6.fan().cone_containing( N(0,-1)  ))
sage: D = -D3 + 2*D5 - D6
sage: D.Chern_character()                                                   # needs sage.libs.singular
[5*w^2 + y - 2*v + w + 1]
sage: dP6.integrate(D.ch() * dP6.Td())                                      # needs sage.libs.singular
-4
>>> from sage.all import *
>>> dP6 = toric_varieties.dP6()
>>> N = dP6.fan().lattice()
>>> D3 = dP6.divisor(dP6.fan().cone_containing( N(Integer(0),Integer(1))   ))
>>> D5 = dP6.divisor(dP6.fan().cone_containing( N(-Integer(1),-Integer(1)) ))
>>> D6 = dP6.divisor(dP6.fan().cone_containing( N(Integer(0),-Integer(1))  ))
>>> D = -D3 + Integer(2)*D5 - D6
>>> D.Chern_character()                                                   # needs sage.libs.singular
[5*w^2 + y - 2*v + w + 1]
>>> dP6.integrate(D.ch() * dP6.Td())                                      # needs sage.libs.singular
-4
Chow_cycle(ring=Integer Ring)[source]#

Returns the Chow homology class of the divisor.

INPUT:

  • ring – Either ZZ (default) or QQ. The base ring of the Chow group.

OUTPUT:

The ChowCycle represented by the divisor.

EXAMPLES:

sage: dP6 = toric_varieties.dP6()
sage: cone = dP6.fan(1)[5]
sage: D = dP6.divisor(cone); D
V(w)
sage: D.Chow_cycle()
( 0 | -1, 0, 1, 1 | 0 )
sage: dP6.Chow_group()(cone)
( 0 | -1, 0, 1, 1 | 0 )
>>> from sage.all import *
>>> dP6 = toric_varieties.dP6()
>>> cone = dP6.fan(Integer(1))[Integer(5)]
>>> D = dP6.divisor(cone); D
V(w)
>>> D.Chow_cycle()
( 0 | -1, 0, 1, 1 | 0 )
>>> dP6.Chow_group()(cone)
( 0 | -1, 0, 1, 1 | 0 )
Kodaira_map(names='z')[source]#

Return the Kodaira map.

The Kodaira map is the rational map \(X_\Sigma \to \mathbb{P}^{n-1}\), where \(n\) equals the number of sections. It is defined by the monomial sections of the line bundle.

If the divisor is ample and the toric variety smooth or of dimension 2, then this is an embedding.

INPUT:

  • names – string (optional; default 'z'). The variable names for the destination projective space.

EXAMPLES:

sage: P1.<u,v> = toric_varieties.P1()
sage: D = -P1.K()
sage: D.Kodaira_map()                                                       # needs fpylll sage.libs.singular
Scheme morphism:
  From: 1-d CPR-Fano toric variety covered by 2 affine patches
  To:   Closed subscheme of Projective Space of dimension 2
        over Rational Field defined by: -z1^2 + z0*z2
  Defn: Defined on coordinates by sending [u : v] to (v^2 : u*v : u^2)

sage: dP6 = toric_varieties.dP6()
sage: D = -dP6.K()
sage: D.Kodaira_map(names='x')                                              # needs fpylll sage.libs.singular
Scheme morphism:
  From: 2-d CPR-Fano toric variety covered by 6 affine patches
  To:   Closed subscheme of Projective Space of dimension 6
        over Rational Field defined by:
          -x1*x5 + x0*x6,       -x2*x3 + x0*x5,       -x1*x3 + x0*x4,
          x4*x5 - x3*x6,        -x1*x2 + x0*x3,       x3*x5 - x2*x6,
          x3*x4 - x1*x6,        x3^2 - x1*x5,         x2*x4 - x1*x5,
          -x1*x5^2 + x2*x3*x6, -x1*x5^3 + x2^2*x6^2
  Defn: Defined on coordinates by sending [x : u : y : v : z : w] to
        (x*u^2*y^2*v : x^2*u^2*y*w : u*y^2*v^2*z : x*u*y*v*z*w :
         x^2*u*z*w^2 : y*v^2*z^2*w : x*v*z^2*w^2)
>>> from sage.all import *
>>> P1 = toric_varieties.P1(names=('u', 'v',)); (u, v,) = P1._first_ngens(2)
>>> D = -P1.K()
>>> D.Kodaira_map()                                                       # needs fpylll sage.libs.singular
Scheme morphism:
  From: 1-d CPR-Fano toric variety covered by 2 affine patches
  To:   Closed subscheme of Projective Space of dimension 2
        over Rational Field defined by: -z1^2 + z0*z2
  Defn: Defined on coordinates by sending [u : v] to (v^2 : u*v : u^2)

>>> dP6 = toric_varieties.dP6()
>>> D = -dP6.K()
>>> D.Kodaira_map(names='x')                                              # needs fpylll sage.libs.singular
Scheme morphism:
  From: 2-d CPR-Fano toric variety covered by 6 affine patches
  To:   Closed subscheme of Projective Space of dimension 6
        over Rational Field defined by:
          -x1*x5 + x0*x6,       -x2*x3 + x0*x5,       -x1*x3 + x0*x4,
          x4*x5 - x3*x6,        -x1*x2 + x0*x3,       x3*x5 - x2*x6,
          x3*x4 - x1*x6,        x3^2 - x1*x5,         x2*x4 - x1*x5,
          -x1*x5^2 + x2*x3*x6, -x1*x5^3 + x2^2*x6^2
  Defn: Defined on coordinates by sending [x : u : y : v : z : w] to
        (x*u^2*y^2*v : x^2*u^2*y*w : u*y^2*v^2*z : x*u*y*v*z*w :
         x^2*u*z*w^2 : y*v^2*z^2*w : x*v*z^2*w^2)
ch()[source]#

Return the Chern character of the sheaf \(\mathcal{O}(D)\) defined by the divisor \(D\).

You can also use a shortcut ch().

EXAMPLES:

sage: dP6 = toric_varieties.dP6()
sage: N = dP6.fan().lattice()
sage: D3 = dP6.divisor(dP6.fan().cone_containing( N(0,1)   ))
sage: D5 = dP6.divisor(dP6.fan().cone_containing( N(-1,-1) ))
sage: D6 = dP6.divisor(dP6.fan().cone_containing( N(0,-1)  ))
sage: D = -D3 + 2*D5 - D6
sage: D.Chern_character()                                                   # needs sage.libs.singular
[5*w^2 + y - 2*v + w + 1]
sage: dP6.integrate(D.ch() * dP6.Td())                                      # needs sage.libs.singular
-4
>>> from sage.all import *
>>> dP6 = toric_varieties.dP6()
>>> N = dP6.fan().lattice()
>>> D3 = dP6.divisor(dP6.fan().cone_containing( N(Integer(0),Integer(1))   ))
>>> D5 = dP6.divisor(dP6.fan().cone_containing( N(-Integer(1),-Integer(1)) ))
>>> D6 = dP6.divisor(dP6.fan().cone_containing( N(Integer(0),-Integer(1))  ))
>>> D = -D3 + Integer(2)*D5 - D6
>>> D.Chern_character()                                                   # needs sage.libs.singular
[5*w^2 + y - 2*v + w + 1]
>>> dP6.integrate(D.ch() * dP6.Td())                                      # needs sage.libs.singular
-4
coefficient(x)[source]#

Return the coefficient of x.

INPUT:

  • x – one of the homogeneous coordinates, either given by the variable or its index.

OUTPUT:

The coefficient of x.

EXAMPLES:

sage: P2 = toric_varieties.P2()
sage: D = P2.divisor((11,12,13)); D
11*V(x) + 12*V(y) + 13*V(z)
sage: D.coefficient(1)
12
sage: P2.inject_variables()
Defining x, y, z
sage: D.coefficient(y)
12
>>> from sage.all import *
>>> P2 = toric_varieties.P2()
>>> D = P2.divisor((Integer(11),Integer(12),Integer(13))); D
11*V(x) + 12*V(y) + 13*V(z)
>>> D.coefficient(Integer(1))
12
>>> P2.inject_variables()
Defining x, y, z
>>> D.coefficient(y)
12
cohomology(weight=None, deg=None, dim=False)[source]#

Return the cohomology of the line bundle associated to the Cartier divisor or reflexive sheaf associated to the Weil divisor.

Note

The cohomology of a toric line bundle/reflexive sheaf is graded by the usual degree as well as by the \(M\)-lattice.

INPUT:

  • weight – (optional) a point of the \(M\)-lattice.

  • deg – (optional) the degree of the cohomology group.

  • dim – boolean. If False (default), the cohomology groups are returned as vector spaces. If True, only the dimension of the vector space(s) is returned.

OUTPUT:

The vector space \(H^\text{deg}(X,\mathcal{O}(D))\) (if deg is specified) or a dictionary {degree:cohomology(degree)} of all degrees between 0 and the dimension of the variety.

If weight is specified, return only the subspace \(H^\text{deg}(X,\mathcal{O}(D))_\text{weight}\) of the cohomology of the given weight.

If dim==True, the dimension of the cohomology vector space is returned instead of actual vector space. Moreover, if deg was not specified, a vector whose entries are the dimensions is returned instead of a dictionary.

ALGORITHM:

Roughly, Chech cohomology is used to compute the cohomology. For toric divisors, the local sections can be chosen to be monomials (instead of general homogeneous polynomials), this is the reason for the extra grading by \(m\in M\). General references would be [Ful1993], [CLS2011]. Here are some salient features of our implementation:

  • First, a finite set of \(M\)-lattice points is identified that supports the cohomology. The toric divisor determines a (polyhedral) chamber decomposition of \(M_\RR\), see Section 9.1 and Figure 4 of [CLS2011]. The cohomology vanishes on the non-compact chambers. Hence, the convex hull of the vertices of the chamber decomposition contains all non-vanishing cohomology groups. This is returned by the private method _sheaf_cohomology_support().

    It would be more efficient, but more difficult to implement, to keep track of all of the individual chambers. We leave this for future work.

  • For each point \(m\in M\), the weight-\(m\) part of the cohomology can be rewritten as the cohomology of a simplicial complex, see Exercise 9.1.10 of [CLS2011], [Per2007]. This is returned by the private method _sheaf_complex().

    The simplicial complex is the same for all points in a chamber, but we currently do not make use of this and compute each point \(m\in M\) separately.

  • Finally, the cohomology (over \(\QQ\)) of this simplicial complex is computed in the private method _sheaf_cohomology(). Summing over the supporting points \(m\in M\) yields the cohomology of the sheaf`.

EXAMPLES:

Example 9.1.7 of Cox, Little, Schenck: “Toric Varieties” [CLS2011]:

sage: F = Fan(cones=[(0,1), (1,2), (2,3), (3,4), (4,5), (5,0)],
....:         rays=[(1,0), (1,1), (0,1), (-1,0), (-1,-1), (0,-1)])
sage: dP6 = ToricVariety(F)
sage: D3 = dP6.divisor(2)
sage: D5 = dP6.divisor(4)
sage: D6 = dP6.divisor(5)
sage: D = -D3 + 2*D5 - D6
sage: D.cohomology()
{0: Vector space of dimension 0 over Rational Field,
 1: Vector space of dimension 4 over Rational Field,
 2: Vector space of dimension 0 over Rational Field}
sage: D.cohomology(deg=1)
Vector space of dimension 4 over Rational Field
sage: M = F.dual_lattice()
sage: D.cohomology( M(0,0) )
{0: Vector space of dimension 0 over Rational Field,
 1: Vector space of dimension 1 over Rational Field,
 2: Vector space of dimension 0 over Rational Field}
sage: D.cohomology( weight=M(0,0), deg=1 )
Vector space of dimension 1 over Rational Field
sage: dP6.integrate(D.ch() * dP6.Td())                                      # needs sage.libs.singular
-4
>>> from sage.all import *
>>> F = Fan(cones=[(Integer(0),Integer(1)), (Integer(1),Integer(2)), (Integer(2),Integer(3)), (Integer(3),Integer(4)), (Integer(4),Integer(5)), (Integer(5),Integer(0))],
...         rays=[(Integer(1),Integer(0)), (Integer(1),Integer(1)), (Integer(0),Integer(1)), (-Integer(1),Integer(0)), (-Integer(1),-Integer(1)), (Integer(0),-Integer(1))])
>>> dP6 = ToricVariety(F)
>>> D3 = dP6.divisor(Integer(2))
>>> D5 = dP6.divisor(Integer(4))
>>> D6 = dP6.divisor(Integer(5))
>>> D = -D3 + Integer(2)*D5 - D6
>>> D.cohomology()
{0: Vector space of dimension 0 over Rational Field,
 1: Vector space of dimension 4 over Rational Field,
 2: Vector space of dimension 0 over Rational Field}
>>> D.cohomology(deg=Integer(1))
Vector space of dimension 4 over Rational Field
>>> M = F.dual_lattice()
>>> D.cohomology( M(Integer(0),Integer(0)) )
{0: Vector space of dimension 0 over Rational Field,
 1: Vector space of dimension 1 over Rational Field,
 2: Vector space of dimension 0 over Rational Field}
>>> D.cohomology( weight=M(Integer(0),Integer(0)), deg=Integer(1) )
Vector space of dimension 1 over Rational Field
>>> dP6.integrate(D.ch() * dP6.Td())                                      # needs sage.libs.singular
-4

Note the different output options:

sage: D.cohomology()
{0: Vector space of dimension 0 over Rational Field,
 1: Vector space of dimension 4 over Rational Field,
 2: Vector space of dimension 0 over Rational Field}
sage: D.cohomology(dim=True)
(0, 4, 0)
sage: D.cohomology(weight=M(0,0))
{0: Vector space of dimension 0 over Rational Field,
 1: Vector space of dimension 1 over Rational Field,
 2: Vector space of dimension 0 over Rational Field}
sage: D.cohomology(weight=M(0,0), dim=True)
(0, 1, 0)
sage: D.cohomology(deg=1)
Vector space of dimension 4 over Rational Field
sage: D.cohomology(deg=1, dim=True)
4
sage: D.cohomology(weight=M(0,0), deg=1)
Vector space of dimension 1 over Rational Field
sage: D.cohomology(weight=M(0,0), deg=1, dim=True)
1
>>> from sage.all import *
>>> D.cohomology()
{0: Vector space of dimension 0 over Rational Field,
 1: Vector space of dimension 4 over Rational Field,
 2: Vector space of dimension 0 over Rational Field}
>>> D.cohomology(dim=True)
(0, 4, 0)
>>> D.cohomology(weight=M(Integer(0),Integer(0)))
{0: Vector space of dimension 0 over Rational Field,
 1: Vector space of dimension 1 over Rational Field,
 2: Vector space of dimension 0 over Rational Field}
>>> D.cohomology(weight=M(Integer(0),Integer(0)), dim=True)
(0, 1, 0)
>>> D.cohomology(deg=Integer(1))
Vector space of dimension 4 over Rational Field
>>> D.cohomology(deg=Integer(1), dim=True)
4
>>> D.cohomology(weight=M(Integer(0),Integer(0)), deg=Integer(1))
Vector space of dimension 1 over Rational Field
>>> D.cohomology(weight=M(Integer(0),Integer(0)), deg=Integer(1), dim=True)
1

Here is a Weil (non-Cartier) divisor example:

sage: K = toric_varieties.Cube_nonpolyhedral().K()
sage: K.is_Weil()
True
sage: K.is_QQ_Cartier()
False
sage: K.cohomology(dim=True)
(0, 0, 0, 1)
>>> from sage.all import *
>>> K = toric_varieties.Cube_nonpolyhedral().K()
>>> K.is_Weil()
True
>>> K.is_QQ_Cartier()
False
>>> K.cohomology(dim=True)
(0, 0, 0, 1)
cohomology_class()[source]#

Return the degree-2 cohomology class associated to the divisor.

OUTPUT:

The corresponding cohomology class as an instance of CohomologyClass. The cohomology class is the first Chern class of the associated line bundle \(\mathcal{O}(D)\).

EXAMPLES:

sage: dP6 = toric_varieties.dP6()
sage: D = dP6.divisor(dP6.fan().ray(0))
sage: D.cohomology_class()                                                  # needs sage.libs.singular
[y + v - w]
>>> from sage.all import *
>>> dP6 = toric_varieties.dP6()
>>> D = dP6.divisor(dP6.fan().ray(Integer(0)))
>>> D.cohomology_class()                                                  # needs sage.libs.singular
[y + v - w]
cohomology_support()[source]#

Return the weights for which the cohomology groups do not vanish.

OUTPUT:

A tuple of dual lattice points. self.cohomology(weight=m) does not vanish if and only if m is in the output.

Note

This method is provided for educational purposes and it is not an efficient way of computing the cohomology groups.

EXAMPLES:

sage: F = Fan(cones=[(0,1), (1,2), (2,3), (3,4), (4,5), (5,0)],
....:         rays=[(1,0), (1,1), (0,1), (-1,0), (-1,-1), (0,-1)])
sage: dP6 = ToricVariety(F)
sage: D3 = dP6.divisor(2)
sage: D5 = dP6.divisor(4)
sage: D6 = dP6.divisor(5)
sage: D = -D3 + 2*D5 - D6
sage: D.cohomology_support()
(M(0, 0), M(1, 0), M(2, 0), M(1, 1))
>>> from sage.all import *
>>> F = Fan(cones=[(Integer(0),Integer(1)), (Integer(1),Integer(2)), (Integer(2),Integer(3)), (Integer(3),Integer(4)), (Integer(4),Integer(5)), (Integer(5),Integer(0))],
...         rays=[(Integer(1),Integer(0)), (Integer(1),Integer(1)), (Integer(0),Integer(1)), (-Integer(1),Integer(0)), (-Integer(1),-Integer(1)), (Integer(0),-Integer(1))])
>>> dP6 = ToricVariety(F)
>>> D3 = dP6.divisor(Integer(2))
>>> D5 = dP6.divisor(Integer(4))
>>> D6 = dP6.divisor(Integer(5))
>>> D = -D3 + Integer(2)*D5 - D6
>>> D.cohomology_support()
(M(0, 0), M(1, 0), M(2, 0), M(1, 1))
divisor_class()[source]#

Return the linear equivalence class of the divisor.

OUTPUT:

The class of the divisor in \(\mathop{Cl}(X) \otimes_\ZZ \QQ\) as an instance of ToricRationalDivisorClassGroup.

EXAMPLES:

sage: dP6 = toric_varieties.dP6()
sage: D = dP6.divisor(0)
sage: D.divisor_class()
Divisor class [1, 0, 0, 0]
>>> from sage.all import *
>>> dP6 = toric_varieties.dP6()
>>> D = dP6.divisor(Integer(0))
>>> D.divisor_class()
Divisor class [1, 0, 0, 0]
function_value(point)[source]#

Return the value of the support function at point.

Let \(X\) be the ambient toric variety of self, \(\Sigma\) the fan associated to \(X\), and \(N\) the ambient lattice of \(\Sigma\).

INPUT:

  • point – either an integer, interpreted as the index of a ray of \(\Sigma\), or a point of the lattice \(N\).

OUTPUT: An integer or a rational number.

EXAMPLES:

sage: P2 = toric_varieties.P2()
sage: D = P2.divisor([11,22,44])   # total degree 77
sage: D.function_value(0)
11
sage: N = P2.fan().lattice()
sage: D.function_value( N(1,1) )
33
sage: D.function_value( P2.fan().ray(0) )
11
>>> from sage.all import *
>>> P2 = toric_varieties.P2()
>>> D = P2.divisor([Integer(11),Integer(22),Integer(44)])   # total degree 77
>>> D.function_value(Integer(0))
11
>>> N = P2.fan().lattice()
>>> D.function_value( N(Integer(1),Integer(1)) )
33
>>> D.function_value( P2.fan().ray(Integer(0)) )
11
is_Cartier()[source]#

Return whether the divisor is a Cartier-divisor.

Note

The sheaf \(\mathcal{O}(D)\) associated to the given divisor \(D\) is a line bundle if and only if the divisor is Cartier.

EXAMPLES:

sage: X = toric_varieties.P4_11169()
sage: D = X.divisor(3)
sage: D.is_Cartier()
False
sage: D.is_QQ_Cartier()
True
>>> from sage.all import *
>>> X = toric_varieties.P4_11169()
>>> D = X.divisor(Integer(3))
>>> D.is_Cartier()
False
>>> D.is_QQ_Cartier()
True
is_QQ_Cartier()[source]#

Return whether the divisor is a \(\QQ\)-Cartier divisor.

A \(\QQ\)-Cartier divisor is a divisor such that some multiple of it is Cartier.

EXAMPLES:

sage: X = toric_varieties.P4_11169()
sage: D = X.divisor(3)
sage: D.is_QQ_Cartier()
True

sage: X = toric_varieties.Cube_face_fan()
sage: D = X.divisor(3)
sage: D.is_QQ_Cartier()
False
>>> from sage.all import *
>>> X = toric_varieties.P4_11169()
>>> D = X.divisor(Integer(3))
>>> D.is_QQ_Cartier()
True

>>> X = toric_varieties.Cube_face_fan()
>>> D = X.divisor(Integer(3))
>>> D.is_QQ_Cartier()
False
is_QQ_Weil()[source]#

Return whether the divisor is a \(\QQ\)-Weil-divisor.

Note

This function returns always True since ToricDivisor can only describe \(\QQ\)-Weil divisors.

EXAMPLES:

sage: P2 = toric_varieties.P2()
sage: D = P2.divisor([1,2,3])
sage: D.is_QQ_Weil()
True
sage: (D/2).is_QQ_Weil()
True
>>> from sage.all import *
>>> P2 = toric_varieties.P2()
>>> D = P2.divisor([Integer(1),Integer(2),Integer(3)])
>>> D.is_QQ_Weil()
True
>>> (D/Integer(2)).is_QQ_Weil()
True
is_Weil()[source]#

Return whether the divisor is a Weil-divisor.

EXAMPLES:

sage: P2 = toric_varieties.P2()
sage: D = P2.divisor([1,2,3])
sage: D.is_Weil()
True
sage: (D/2).is_Weil()
False
>>> from sage.all import *
>>> P2 = toric_varieties.P2()
>>> D = P2.divisor([Integer(1),Integer(2),Integer(3)])
>>> D.is_Weil()
True
>>> (D/Integer(2)).is_Weil()
False
is_ample()[source]#

Return whether a \(\QQ\)-Cartier divisor is ample.

OUTPUT:

  • True if the divisor is in the ample cone, False otherwise.

Note

  • For a \(\QQ\)-Cartier divisor, some positive integral multiple is Cartier. We return whether this associated divisor is ample, i.e. corresponds to an ample line bundle.

  • In the orbifold case, the ample cone is an open and full-dimensional cone in the rational divisor class group ToricRationalDivisorClassGroup.

  • If the variety has worse than orbifold singularities, the ample cone is a full-dimensional cone within the (not full-dimensional) subspace spanned by the Cartier divisors inside the rational (Weil) divisor class group, that is, ToricRationalDivisorClassGroup. The ample cone is then relative open (open in this subspace).

  • See also is_nef().

  • A toric divisor is ample if and only if its support function is strictly convex.

EXAMPLES:

sage: P2 = toric_varieties.P2()
sage: K = P2.K()
sage: (+K).is_ample()
False
sage: (0*K).is_ample()
False
sage: (-K).is_ample()
True
>>> from sage.all import *
>>> P2 = toric_varieties.P2()
>>> K = P2.K()
>>> (+K).is_ample()
False
>>> (Integer(0)*K).is_ample()
False
>>> (-K).is_ample()
True

Example 6.1.3, 6.1.11, 6.1.17 of [CLS2011]:

sage: from itertools import product
sage: fan = Fan(cones=[(0,1), (1,2), (2,3), (3,0)],
....:           rays=[(-1,2), (0,1), (1,0), (0,-1)])
sage: F2 = ToricVariety(fan,'u1, u2, u3, u4')
sage: def D(a,b): return a*F2.divisor(2) + b*F2.divisor(3)
sage: [ (a,b) for a,b in product(range(-3,3), repeat=2)
....:         if D(a,b).is_ample() ]
[(1, 1), (1, 2), (2, 1), (2, 2)]
sage: [ (a,b) for a,b in product(range(-3,3), repeat=2)
....:         if D(a,b).is_nef() ]
[(0, 0), (0, 1), (0, 2), (1, 0), (1, 1), (1, 2), (2, 0), (2, 1), (2, 2)]
>>> from sage.all import *
>>> from itertools import product
>>> fan = Fan(cones=[(Integer(0),Integer(1)), (Integer(1),Integer(2)), (Integer(2),Integer(3)), (Integer(3),Integer(0))],
...           rays=[(-Integer(1),Integer(2)), (Integer(0),Integer(1)), (Integer(1),Integer(0)), (Integer(0),-Integer(1))])
>>> F2 = ToricVariety(fan,'u1, u2, u3, u4')
>>> def D(a,b): return a*F2.divisor(Integer(2)) + b*F2.divisor(Integer(3))
>>> [ (a,b) for a,b in product(range(-Integer(3),Integer(3)), repeat=Integer(2))
...         if D(a,b).is_ample() ]
[(1, 1), (1, 2), (2, 1), (2, 2)]
>>> [ (a,b) for a,b in product(range(-Integer(3),Integer(3)), repeat=Integer(2))
...         if D(a,b).is_nef() ]
[(0, 0), (0, 1), (0, 2), (1, 0), (1, 1), (1, 2), (2, 0), (2, 1), (2, 2)]

A (worse than orbifold) singular Fano threefold:

sage: points = [(1,0,0),(0,1,0),(0,0,1),(-2,0,-1),(-2,-1,0),(-3,-1,-1),(1,1,1)]
sage: facets = [[0,1,3],[0,1,6],[0,2,4],[0,2,6],[0,3,5],[0,4,5],[1,2,3,4,5,6]]
sage: X = ToricVariety(Fan(cones=facets, rays=points))
sage: X.rational_class_group().dimension()
4
sage: X.Kaehler_cone().rays()
Divisor class [1, 0, 0, 0]
in Basis lattice of The toric rational divisor class group
of a 3-d toric variety covered by 7 affine patches
sage: antiK = -X.K()
sage: antiK.divisor_class()
Divisor class [2, 0, 0, 0]
sage: antiK.is_ample()
True
>>> from sage.all import *
>>> points = [(Integer(1),Integer(0),Integer(0)),(Integer(0),Integer(1),Integer(0)),(Integer(0),Integer(0),Integer(1)),(-Integer(2),Integer(0),-Integer(1)),(-Integer(2),-Integer(1),Integer(0)),(-Integer(3),-Integer(1),-Integer(1)),(Integer(1),Integer(1),Integer(1))]
>>> facets = [[Integer(0),Integer(1),Integer(3)],[Integer(0),Integer(1),Integer(6)],[Integer(0),Integer(2),Integer(4)],[Integer(0),Integer(2),Integer(6)],[Integer(0),Integer(3),Integer(5)],[Integer(0),Integer(4),Integer(5)],[Integer(1),Integer(2),Integer(3),Integer(4),Integer(5),Integer(6)]]
>>> X = ToricVariety(Fan(cones=facets, rays=points))
>>> X.rational_class_group().dimension()
4
>>> X.Kaehler_cone().rays()
Divisor class [1, 0, 0, 0]
in Basis lattice of The toric rational divisor class group
of a 3-d toric variety covered by 7 affine patches
>>> antiK = -X.K()
>>> antiK.divisor_class()
Divisor class [2, 0, 0, 0]
>>> antiK.is_ample()
True
is_integral()[source]#

Return whether the coefficients of the divisor are all integral.

EXAMPLES:

sage: P2 = toric_varieties.P2()
sage: DZZ = P2.toric_divisor_group(base_ring=ZZ).gen(0); DZZ
V(x)
sage: DQQ = P2.toric_divisor_group(base_ring=QQ).gen(0); DQQ
V(x)
sage: DZZ.is_integral()
True
sage: DQQ.is_integral()
True
>>> from sage.all import *
>>> P2 = toric_varieties.P2()
>>> DZZ = P2.toric_divisor_group(base_ring=ZZ).gen(Integer(0)); DZZ
V(x)
>>> DQQ = P2.toric_divisor_group(base_ring=QQ).gen(Integer(0)); DQQ
V(x)
>>> DZZ.is_integral()
True
>>> DQQ.is_integral()
True
is_nef()[source]#

Return whether a \(\QQ\)-Cartier divisor is nef.

OUTPUT:

  • True if the divisor is in the closure of the ample cone, False otherwise.

Note

  • For a \(\QQ\)-Cartier divisor, some positive integral multiple is Cartier. We return whether this associated divisor is nef.

  • The nef cone is the closure of the ample cone.

  • See also is_ample().

  • A toric divisor is nef if and only if its support function is convex (but not necessarily strictly convex).

  • A toric Cartier divisor is nef if and only if its linear system is basepoint free.

EXAMPLES:

sage: P2 = toric_varieties.P2()
sage: K = P2.K()
sage: (+K).is_nef()
False
sage: (0*K).is_nef()
True
sage: (-K).is_nef()
True
>>> from sage.all import *
>>> P2 = toric_varieties.P2()
>>> K = P2.K()
>>> (+K).is_nef()
False
>>> (Integer(0)*K).is_nef()
True
>>> (-K).is_nef()
True

Example 6.1.3, 6.1.11, 6.1.17 of [CLS2011]:

sage: from itertools import product
sage: fan = Fan(cones=[(0,1), (1,2), (2,3), (3,0)],
....:           rays=[(-1,2), (0,1), (1,0), (0,-1)])
sage: F2 = ToricVariety(fan,'u1, u2, u3, u4')
sage: def D(a,b): return a*F2.divisor(2) + b*F2.divisor(3)
sage: [ (a,b) for a,b in product(range(-3,3), repeat=2)
....:         if D(a,b).is_ample() ]
[(1, 1), (1, 2), (2, 1), (2, 2)]
sage: [ (a,b) for a,b in product(range(-3,3), repeat=2)
....:         if D(a,b).is_nef() ]
[(0, 0), (0, 1), (0, 2), (1, 0), (1, 1), (1, 2), (2, 0), (2, 1), (2, 2)]
>>> from sage.all import *
>>> from itertools import product
>>> fan = Fan(cones=[(Integer(0),Integer(1)), (Integer(1),Integer(2)), (Integer(2),Integer(3)), (Integer(3),Integer(0))],
...           rays=[(-Integer(1),Integer(2)), (Integer(0),Integer(1)), (Integer(1),Integer(0)), (Integer(0),-Integer(1))])
>>> F2 = ToricVariety(fan,'u1, u2, u3, u4')
>>> def D(a,b): return a*F2.divisor(Integer(2)) + b*F2.divisor(Integer(3))
>>> [ (a,b) for a,b in product(range(-Integer(3),Integer(3)), repeat=Integer(2))
...         if D(a,b).is_ample() ]
[(1, 1), (1, 2), (2, 1), (2, 2)]
>>> [ (a,b) for a,b in product(range(-Integer(3),Integer(3)), repeat=Integer(2))
...         if D(a,b).is_nef() ]
[(0, 0), (0, 1), (0, 2), (1, 0), (1, 1), (1, 2), (2, 0), (2, 1), (2, 2)]
m(cone)[source]#

Return \(m_\sigma\) representing \(\phi_D\) on cone.

Let \(X\) be the ambient toric variety of this divisor \(D\) associated to the fan \(\Sigma\) in lattice \(N\). Let \(M\) be the lattice dual to \(N\). Given the cone \(\sigma =\langle v_1, \dots, v_k \rangle\) in \(\Sigma\), this method searches for a vector \(m_\sigma \in M_\QQ\) such that \(\phi_D(v_i) = \langle m_\sigma, v_i \rangle\) for all \(i=1, \dots, k\), where \(\phi_D\) is the support function of \(D\).

INPUT:

  • cone – A cone in the fan of the toric variety.

OUTPUT:

  • If possible, a point of lattice \(M\).

  • If the dual vector cannot be chosen integral, a rational vector is returned.

  • If there is no such vector (i.e. self is not even a \(\QQ\)-Cartier divisor), a ValueError is raised.

EXAMPLES:

sage: F = Fan(cones=[(0,1,2,3), (0,1,4)],
....:         rays=[(1,1,1), (1,-1,1), (1,-1,-1), (1,1,-1), (0,0,1)])
sage: X = ToricVariety(F)
sage: square_cone = X.fan().cone_containing(0,1,2,3)
sage: triangle_cone = X.fan().cone_containing(0,1,4)
sage: ray = X.fan().cone_containing(0)
sage: QQ_Cartier = X.divisor([2,2,1,1,1])
sage: QQ_Cartier.m(ray)
M(0, 2, 0)
sage: QQ_Cartier.m(square_cone)
(3/2, 0, 1/2)
sage: QQ_Cartier.m(triangle_cone)
M(1, 0, 1)
sage: QQ_Cartier.m(Cone(triangle_cone))
M(1, 0, 1)
sage: Weil = X.divisor([1,1,1,0,0])
sage: Weil.m(square_cone)
Traceback (most recent call last):
...
ValueError: V(z0) + V(z1) + V(z2) is not QQ-Cartier,
cannot choose a dual vector on 3-d cone
of Rational polyhedral fan in 3-d lattice N
sage: Weil.m(triangle_cone)
M(1, 0, 0)
>>> from sage.all import *
>>> F = Fan(cones=[(Integer(0),Integer(1),Integer(2),Integer(3)), (Integer(0),Integer(1),Integer(4))],
...         rays=[(Integer(1),Integer(1),Integer(1)), (Integer(1),-Integer(1),Integer(1)), (Integer(1),-Integer(1),-Integer(1)), (Integer(1),Integer(1),-Integer(1)), (Integer(0),Integer(0),Integer(1))])
>>> X = ToricVariety(F)
>>> square_cone = X.fan().cone_containing(Integer(0),Integer(1),Integer(2),Integer(3))
>>> triangle_cone = X.fan().cone_containing(Integer(0),Integer(1),Integer(4))
>>> ray = X.fan().cone_containing(Integer(0))
>>> QQ_Cartier = X.divisor([Integer(2),Integer(2),Integer(1),Integer(1),Integer(1)])
>>> QQ_Cartier.m(ray)
M(0, 2, 0)
>>> QQ_Cartier.m(square_cone)
(3/2, 0, 1/2)
>>> QQ_Cartier.m(triangle_cone)
M(1, 0, 1)
>>> QQ_Cartier.m(Cone(triangle_cone))
M(1, 0, 1)
>>> Weil = X.divisor([Integer(1),Integer(1),Integer(1),Integer(0),Integer(0)])
>>> Weil.m(square_cone)
Traceback (most recent call last):
...
ValueError: V(z0) + V(z1) + V(z2) is not QQ-Cartier,
cannot choose a dual vector on 3-d cone
of Rational polyhedral fan in 3-d lattice N
>>> Weil.m(triangle_cone)
M(1, 0, 0)
monomial(point)[source]#

Return the monomial in the homogeneous coordinate ring associated to the point in the dual lattice.

INPUT:

  • point – a point in self.variety().fan().dual_lattice().

OUTPUT:

For a fixed divisor D, the sections are generated by monomials in ToricVariety.coordinate_ring. Alternatively, the monomials can be described as \(M\)-lattice points in the polyhedron D.polyhedron(). This method converts the points \(m\in M\) into homogeneous polynomials.

EXAMPLES:

sage: P2 = toric_varieties.P2()
sage: O3_P2 = -P2.K()
sage: M = P2.fan().dual_lattice()
sage: O3_P2.monomial( M(0,0) )
x*y*z
>>> from sage.all import *
>>> P2 = toric_varieties.P2()
>>> O3_P2 = -P2.K()
>>> M = P2.fan().dual_lattice()
>>> O3_P2.monomial( M(Integer(0),Integer(0)) )
x*y*z
move_away_from(cone)[source]#

Move the divisor away from the orbit closure of cone.

INPUT:

  • A cone of the fan of the toric variety.

OUTPUT:

A (rationally equivalent) divisor that is moved off the orbit closure of the given cone.

Note

A divisor that is Weil but not Cartier might be impossible to move away. In this case, a ValueError is raised.

EXAMPLES:

sage: F = Fan(cones=[(0,1,2,3), (0,1,4)],
....:         rays=[(1,1,1), (1,-1,1), (1,-1,-1), (1,1,-1), (0,0,1)])
sage: X = ToricVariety(F)
sage: square_cone = X.fan().cone_containing(0,1,2,3)
sage: triangle_cone = X.fan().cone_containing(0,1,4)
sage: line_cone = square_cone.intersection(triangle_cone)
sage: Cartier = X.divisor([2,2,1,1,1])
sage: Cartier
2*V(z0) + 2*V(z1) + V(z2) + V(z3) + V(z4)
sage: Cartier.move_away_from(line_cone)
3*V(z2) + 3*V(z3) - V(z4)
sage: QQ_Weil = X.divisor([1,0,1,1,0])
sage: QQ_Weil.move_away_from(line_cone)
2*V(z2) + V(z3) - 1/2*V(z4)
>>> from sage.all import *
>>> F = Fan(cones=[(Integer(0),Integer(1),Integer(2),Integer(3)), (Integer(0),Integer(1),Integer(4))],
...         rays=[(Integer(1),Integer(1),Integer(1)), (Integer(1),-Integer(1),Integer(1)), (Integer(1),-Integer(1),-Integer(1)), (Integer(1),Integer(1),-Integer(1)), (Integer(0),Integer(0),Integer(1))])
>>> X = ToricVariety(F)
>>> square_cone = X.fan().cone_containing(Integer(0),Integer(1),Integer(2),Integer(3))
>>> triangle_cone = X.fan().cone_containing(Integer(0),Integer(1),Integer(4))
>>> line_cone = square_cone.intersection(triangle_cone)
>>> Cartier = X.divisor([Integer(2),Integer(2),Integer(1),Integer(1),Integer(1)])
>>> Cartier
2*V(z0) + 2*V(z1) + V(z2) + V(z3) + V(z4)
>>> Cartier.move_away_from(line_cone)
3*V(z2) + 3*V(z3) - V(z4)
>>> QQ_Weil = X.divisor([Integer(1),Integer(0),Integer(1),Integer(1),Integer(0)])
>>> QQ_Weil.move_away_from(line_cone)
2*V(z2) + V(z3) - 1/2*V(z4)
polyhedron()[source]#

Return the polyhedron \(P_D\subset M\) associated to a toric divisor \(D\).

OUTPUT:

\(P_D\) as an instance of Polyhedron_base.

EXAMPLES:

sage: dP7 = toric_varieties.dP7()
sage: D = dP7.divisor(2)
sage: P_D = D.polyhedron(); P_D
A 0-dimensional polyhedron in QQ^2 defined as the convex hull of 1 vertex
sage: P_D.Vrepresentation()
(A vertex at (0, 0),)
sage: D.is_nef()
False
sage: dP7.integrate(D.ch() * dP7.Td())                                      # needs sage.libs.singular
1
sage: P_antiK = (-dP7.K()).polyhedron(); P_antiK
A 2-dimensional polyhedron in QQ^2 defined as the convex hull of 5 vertices
sage: P_antiK.Vrepresentation()
(A vertex at (1, -1), A vertex at (0, 1), A vertex at (1, 0),
 A vertex at (-1, 1), A vertex at (-1, -1))
sage: P_antiK.integral_points()
((-1, -1), (-1, 0), (-1, 1), (0, -1), (0, 0), (0, 1), (1, -1), (1, 0))
>>> from sage.all import *
>>> dP7 = toric_varieties.dP7()
>>> D = dP7.divisor(Integer(2))
>>> P_D = D.polyhedron(); P_D
A 0-dimensional polyhedron in QQ^2 defined as the convex hull of 1 vertex
>>> P_D.Vrepresentation()
(A vertex at (0, 0),)
>>> D.is_nef()
False
>>> dP7.integrate(D.ch() * dP7.Td())                                      # needs sage.libs.singular
1
>>> P_antiK = (-dP7.K()).polyhedron(); P_antiK
A 2-dimensional polyhedron in QQ^2 defined as the convex hull of 5 vertices
>>> P_antiK.Vrepresentation()
(A vertex at (1, -1), A vertex at (0, 1), A vertex at (1, 0),
 A vertex at (-1, 1), A vertex at (-1, -1))
>>> P_antiK.integral_points()
((-1, -1), (-1, 0), (-1, 1), (0, -1), (0, 0), (0, 1), (1, -1), (1, 0))

Example 6.1.3, 6.1.11, 6.1.17 of [CLS2011]:

sage: fan = Fan(cones=[(0,1), (1,2), (2,3), (3,0)],
....:           rays=[(-1,2), (0,1), (1,0), (0,-1)])
sage: F2 = ToricVariety(fan,'u1, u2, u3, u4')
sage: D = F2.divisor(3)
sage: D.polyhedron().Vrepresentation()
(A vertex at (0, 0), A vertex at (2, 1), A vertex at (0, 1))
sage: Dprime = F2.divisor(1) + D
sage: Dprime.polyhedron().Vrepresentation()
(A vertex at (2, 1), A vertex at (0, 1), A vertex at (0, 0))
sage: D.is_ample()
False
sage: D.is_nef()
True
sage: Dprime.is_nef()
False
>>> from sage.all import *
>>> fan = Fan(cones=[(Integer(0),Integer(1)), (Integer(1),Integer(2)), (Integer(2),Integer(3)), (Integer(3),Integer(0))],
...           rays=[(-Integer(1),Integer(2)), (Integer(0),Integer(1)), (Integer(1),Integer(0)), (Integer(0),-Integer(1))])
>>> F2 = ToricVariety(fan,'u1, u2, u3, u4')
>>> D = F2.divisor(Integer(3))
>>> D.polyhedron().Vrepresentation()
(A vertex at (0, 0), A vertex at (2, 1), A vertex at (0, 1))
>>> Dprime = F2.divisor(Integer(1)) + D
>>> Dprime.polyhedron().Vrepresentation()
(A vertex at (2, 1), A vertex at (0, 1), A vertex at (0, 0))
>>> D.is_ample()
False
>>> D.is_nef()
True
>>> Dprime.is_nef()
False

A more complicated example where \(P_D\) is not a lattice polytope:

sage: X = toric_varieties.BCdlOG_base()
sage: antiK = -X.K()
sage: P_D = antiK.polyhedron()
sage: P_D
A 3-dimensional polyhedron in QQ^3 defined as the convex hull of 8 vertices
sage: P_D.Vrepresentation()
(A vertex at (1, -1, 0), A vertex at (1, -3, 1),
 A vertex at (1, 1, 1), A vertex at (-5, 1, 1),
 A vertex at (1, 1, -1/2), A vertex at (1, 1/2, -1/2),
 A vertex at (-1, -1, 0), A vertex at (-5, -3, 1))
sage: P_D.Hrepresentation()
(An inequality (-1, 0, 0) x + 1 >= 0, An inequality (0, -1, 0) x + 1 >= 0,
 An inequality (0, 0, -1) x + 1 >= 0, An inequality (1, 0, 4) x + 1 >= 0,
 An inequality (0, 1, 3) x + 1 >= 0, An inequality (0, 1, 2) x + 1 >= 0)
sage: P_D.integral_points()
((-1, -1, 0), (0, -1, 0), (1, -1, 0), (-1, 0, 0), (0, 0, 0),
 (1, 0, 0), (-1, 1, 0), (0, 1, 0), (1, 1, 0), (-5, -3, 1),
 (-4, -3, 1), (-3, -3, 1), (-2, -3, 1), (-1, -3, 1), (0, -3, 1),
 (1, -3, 1), (-5, -2, 1), (-4, -2, 1), (-3, -2, 1), (-2, -2, 1),
 (-1, -2, 1), (0, -2, 1), (1, -2, 1), (-5, -1, 1), (-4, -1, 1),
 (-3, -1, 1), (-2, -1, 1), (-1, -1, 1), (0, -1, 1), (1, -1, 1),
 (-5, 0, 1), (-4, 0, 1), (-3, 0, 1), (-2, 0, 1), (-1, 0, 1),
 (0, 0, 1), (1, 0, 1), (-5, 1, 1), (-4, 1, 1), (-3, 1, 1),
 (-2, 1, 1), (-1, 1, 1), (0, 1, 1), (1, 1, 1))
>>> from sage.all import *
>>> X = toric_varieties.BCdlOG_base()
>>> antiK = -X.K()
>>> P_D = antiK.polyhedron()
>>> P_D
A 3-dimensional polyhedron in QQ^3 defined as the convex hull of 8 vertices
>>> P_D.Vrepresentation()
(A vertex at (1, -1, 0), A vertex at (1, -3, 1),
 A vertex at (1, 1, 1), A vertex at (-5, 1, 1),
 A vertex at (1, 1, -1/2), A vertex at (1, 1/2, -1/2),
 A vertex at (-1, -1, 0), A vertex at (-5, -3, 1))
>>> P_D.Hrepresentation()
(An inequality (-1, 0, 0) x + 1 >= 0, An inequality (0, -1, 0) x + 1 >= 0,
 An inequality (0, 0, -1) x + 1 >= 0, An inequality (1, 0, 4) x + 1 >= 0,
 An inequality (0, 1, 3) x + 1 >= 0, An inequality (0, 1, 2) x + 1 >= 0)
>>> P_D.integral_points()
((-1, -1, 0), (0, -1, 0), (1, -1, 0), (-1, 0, 0), (0, 0, 0),
 (1, 0, 0), (-1, 1, 0), (0, 1, 0), (1, 1, 0), (-5, -3, 1),
 (-4, -3, 1), (-3, -3, 1), (-2, -3, 1), (-1, -3, 1), (0, -3, 1),
 (1, -3, 1), (-5, -2, 1), (-4, -2, 1), (-3, -2, 1), (-2, -2, 1),
 (-1, -2, 1), (0, -2, 1), (1, -2, 1), (-5, -1, 1), (-4, -1, 1),
 (-3, -1, 1), (-2, -1, 1), (-1, -1, 1), (0, -1, 1), (1, -1, 1),
 (-5, 0, 1), (-4, 0, 1), (-3, 0, 1), (-2, 0, 1), (-1, 0, 1),
 (0, 0, 1), (1, 0, 1), (-5, 1, 1), (-4, 1, 1), (-3, 1, 1),
 (-2, 1, 1), (-1, 1, 1), (0, 1, 1), (1, 1, 1))
sections()[source]#

Return the global sections (as points of the \(M\)-lattice) of the line bundle (or reflexive sheaf) associated to the divisor.

OUTPUT: A tuple of points of lattice \(M\).

EXAMPLES:

sage: P2 = toric_varieties.P2()
sage: P2.fan().nrays()
3
sage: P2.divisor(0).sections()
(M(-1, 0), M(-1, 1), M(0, 0))
sage: P2.divisor(1).sections()
(M(0, -1), M(0, 0), M(1, -1))
sage: P2.divisor(2).sections()
(M(0, 0), M(0, 1), M(1, 0))
>>> from sage.all import *
>>> P2 = toric_varieties.P2()
>>> P2.fan().nrays()
3
>>> P2.divisor(Integer(0)).sections()
(M(-1, 0), M(-1, 1), M(0, 0))
>>> P2.divisor(Integer(1)).sections()
(M(0, -1), M(0, 0), M(1, -1))
>>> P2.divisor(Integer(2)).sections()
(M(0, 0), M(0, 1), M(1, 0))

The divisor can be non-nef yet still have sections:

sage: rays = [(1,0,0),(0,1,0),(0,0,1),(-2,0,-1),(-2,-1,0),(-3,-1,-1),(1,1,1),(-1,0,0)]
sage: cones = [[0,1,3],[0,1,6],[0,2,4],[0,2,6],[0,3,5],[0,4,5],[1,3,7],[1,6,7],[2,4,7],[2,6,7],[3,5,7],[4,5,7]]
sage: X = ToricVariety(Fan(rays=rays, cones=cones))
sage: D = X.divisor(2); D
V(z2)
sage: D.is_nef()
False
sage: D.sections()
(M(0, 0, 0),)
sage: D.cohomology(dim=True)
(1, 0, 0, 0)
>>> from sage.all import *
>>> rays = [(Integer(1),Integer(0),Integer(0)),(Integer(0),Integer(1),Integer(0)),(Integer(0),Integer(0),Integer(1)),(-Integer(2),Integer(0),-Integer(1)),(-Integer(2),-Integer(1),Integer(0)),(-Integer(3),-Integer(1),-Integer(1)),(Integer(1),Integer(1),Integer(1)),(-Integer(1),Integer(0),Integer(0))]
>>> cones = [[Integer(0),Integer(1),Integer(3)],[Integer(0),Integer(1),Integer(6)],[Integer(0),Integer(2),Integer(4)],[Integer(0),Integer(2),Integer(6)],[Integer(0),Integer(3),Integer(5)],[Integer(0),Integer(4),Integer(5)],[Integer(1),Integer(3),Integer(7)],[Integer(1),Integer(6),Integer(7)],[Integer(2),Integer(4),Integer(7)],[Integer(2),Integer(6),Integer(7)],[Integer(3),Integer(5),Integer(7)],[Integer(4),Integer(5),Integer(7)]]
>>> X = ToricVariety(Fan(rays=rays, cones=cones))
>>> D = X.divisor(Integer(2)); D
V(z2)
>>> D.is_nef()
False
>>> D.sections()
(M(0, 0, 0),)
>>> D.cohomology(dim=True)
(1, 0, 0, 0)
sections_monomials()[source]#

Return the global sections of the line bundle associated to the Cartier divisor.

The sections are described as monomials in the generalized homogeneous coordinates.

OUTPUT:

  • tuple of monomials in the coordinate ring of self.

EXAMPLES:

sage: P2 = toric_varieties.P2()
sage: P2.fan().nrays()
3
sage: P2.divisor(0).sections_monomials()
(z, y, x)
sage: P2.divisor(1).sections_monomials()
(z, y, x)
sage: P2.divisor(2).sections_monomials()
(z, y, x)
>>> from sage.all import *
>>> P2 = toric_varieties.P2()
>>> P2.fan().nrays()
3
>>> P2.divisor(Integer(0)).sections_monomials()
(z, y, x)
>>> P2.divisor(Integer(1)).sections_monomials()
(z, y, x)
>>> P2.divisor(Integer(2)).sections_monomials()
(z, y, x)

From [Cox] page 38:

sage: lp = LatticePolytope([(1,0), (1,1), (0,1), (-1,0), (0,-1)])
sage: lp
2-d reflexive polytope #5 in 2-d lattice M
sage: dP7 = ToricVariety(FaceFan(lp), 'x1, x2, x3, x4, x5')
sage: AK = -dP7.K()
sage: AK.sections()
(N(-1, 0), N(-1, 1), N(0, -1), N(0, 0),
 N(0, 1), N(1, -1), N(1, 0), N(1, 1))
sage: AK.sections_monomials()
(x3*x4^2*x5, x2*x3^2*x4^2, x1*x4*x5^2, x1*x2*x3*x4*x5,
 x1*x2^2*x3^2*x4, x1^2*x2*x5^2, x1^2*x2^2*x3*x5, x1^2*x2^3*x3^2)
>>> from sage.all import *
>>> lp = LatticePolytope([(Integer(1),Integer(0)), (Integer(1),Integer(1)), (Integer(0),Integer(1)), (-Integer(1),Integer(0)), (Integer(0),-Integer(1))])
>>> lp
2-d reflexive polytope #5 in 2-d lattice M
>>> dP7 = ToricVariety(FaceFan(lp), 'x1, x2, x3, x4, x5')
>>> AK = -dP7.K()
>>> AK.sections()
(N(-1, 0), N(-1, 1), N(0, -1), N(0, 0),
 N(0, 1), N(1, -1), N(1, 0), N(1, 1))
>>> AK.sections_monomials()
(x3*x4^2*x5, x2*x3^2*x4^2, x1*x4*x5^2, x1*x2*x3*x4*x5,
 x1*x2^2*x3^2*x4, x1^2*x2*x5^2, x1^2*x2^2*x3*x5, x1^2*x2^3*x3^2)
class sage.schemes.toric.divisor.ToricRationalDivisorClassGroup(toric_variety)[source]#

Bases: FreeModule_ambient_field, UniqueRepresentation

The rational divisor class group of a toric variety.

The T-Weil divisor class group \(\mathop{Cl}(X)\) of a toric variety \(X\) is a finitely generated abelian group and can contain torsion. Its rank equals the number of rays in the fan of \(X\) minus the dimension of \(X\).

The rational divisor class group is \(\mathop{Cl}(X) \otimes_\ZZ \QQ\) and never includes torsion. If \(X\) is smooth, this equals the Picard group \(\mathop{\mathrm{Pic}}(X)\), whose elements are the isomorphism classes of line bundles on \(X\). The group law (which we write as addition) is the tensor product of the line bundles. The Picard group of a toric variety is always torsion-free.

Warning

Do not instantiate this class yourself. Use rational_class_group() method of toric varieties if you need the divisor class group. Or you can obtain it as the parent of any divisor class constructed, for example, via ToricDivisor_generic.divisor_class().

INPUT:

  • toric_varietytoric variety <sage.schemes.toric.variety.ToricVariety_field.

OUTPUT:

  • rational divisor class group of a toric variety.

EXAMPLES:

sage: P2 = toric_varieties.P2()
sage: P2.rational_class_group()
The toric rational divisor class group of a 2-d CPR-Fano
toric variety covered by 3 affine patches
sage: D = P2.divisor(0); D
V(x)
sage: Dclass = D.divisor_class(); Dclass
Divisor class [1]
sage: Dclass.lift()
V(y)
sage: Dclass.parent()
The toric rational divisor class group of a 2-d CPR-Fano
toric variety covered by 3 affine patches
>>> from sage.all import *
>>> P2 = toric_varieties.P2()
>>> P2.rational_class_group()
The toric rational divisor class group of a 2-d CPR-Fano
toric variety covered by 3 affine patches
>>> D = P2.divisor(Integer(0)); D
V(x)
>>> Dclass = D.divisor_class(); Dclass
Divisor class [1]
>>> Dclass.lift()
V(y)
>>> Dclass.parent()
The toric rational divisor class group of a 2-d CPR-Fano
toric variety covered by 3 affine patches
Element[source]#

alias of ToricRationalDivisorClass

class sage.schemes.toric.divisor.ToricRationalDivisorClassGroup_basis_lattice(group)[source]#

Bases: FreeModule_ambient_pid

Construct the basis lattice of the group.

INPUT:

OUTPUT:

  • the basis lattice of group.

EXAMPLES:

sage: P1xP1 = toric_varieties.P1xP1()
sage: L = P1xP1.Kaehler_cone().lattice()
sage: L
Basis lattice of The toric rational divisor class group of a
2-d CPR-Fano toric variety covered by 4 affine patches
sage: L.basis()
[
Divisor class [1, 0],
Divisor class [0, 1]
]
>>> from sage.all import *
>>> P1xP1 = toric_varieties.P1xP1()
>>> L = P1xP1.Kaehler_cone().lattice()
>>> L
Basis lattice of The toric rational divisor class group of a
2-d CPR-Fano toric variety covered by 4 affine patches
>>> L.basis()
[
Divisor class [1, 0],
Divisor class [0, 1]
]
Element[source]#

alias of ToricRationalDivisorClass

sage.schemes.toric.divisor.is_ToricDivisor(x)[source]#

Test whether x is a toric divisor.

INPUT:

  • x – anything.

OUTPUT:

EXAMPLES:

sage: from sage.schemes.toric.divisor import is_ToricDivisor
sage: is_ToricDivisor(1)
False
sage: P2 = toric_varieties.P2()
sage: D = P2.divisor(0); D
V(x)
sage: is_ToricDivisor(D)
True
>>> from sage.all import *
>>> from sage.schemes.toric.divisor import is_ToricDivisor
>>> is_ToricDivisor(Integer(1))
False
>>> P2 = toric_varieties.P2()
>>> D = P2.divisor(Integer(0)); D
V(x)
>>> is_ToricDivisor(D)
True