Toric rational divisor classes#
This module is a part of the framework for toric varieties
.
AUTHORS:
Volker Braun and Andrey Novoseltsev (2010-09-05): initial version.
- class sage.schemes.toric.divisor_class.ToricRationalDivisorClass[source]#
Bases:
Vector_rational_dense
Create a toric rational divisor class.
Warning
You probably should not construct divisor classes explicitly.
INPUT:
same as for
Vector_rational_dense
.
OUTPUT:
toric rational divisor class.
- lift()[source]#
Return a divisor representing this divisor class.
OUTPUT:
An instance of
ToricDivisor
representingself
.EXAMPLES:
sage: X = toric_varieties.Cube_nonpolyhedral() sage: D = X.divisor([0,1,2,3,4,5,6,7]); D V(z1) + 2*V(z2) + 3*V(z3) + 4*V(z4) + 5*V(z5) + 6*V(z6) + 7*V(z7) sage: D.divisor_class() Divisor class [29, 6, 8, 10, 0] sage: Dequiv = D.divisor_class().lift(); Dequiv 15*V(z1) - 11*V(z2) - 9*V(z5) + 19*V(z6) + 10*V(z7) sage: Dequiv == D False sage: Dequiv.divisor_class() == D.divisor_class() True
>>> from sage.all import * >>> X = toric_varieties.Cube_nonpolyhedral() >>> D = X.divisor([Integer(0),Integer(1),Integer(2),Integer(3),Integer(4),Integer(5),Integer(6),Integer(7)]); D V(z1) + 2*V(z2) + 3*V(z3) + 4*V(z4) + 5*V(z5) + 6*V(z6) + 7*V(z7) >>> D.divisor_class() Divisor class [29, 6, 8, 10, 0] >>> Dequiv = D.divisor_class().lift(); Dequiv 15*V(z1) - 11*V(z2) - 9*V(z5) + 19*V(z6) + 10*V(z7) >>> Dequiv == D False >>> Dequiv.divisor_class() == D.divisor_class() True
- sage.schemes.toric.divisor_class.is_ToricRationalDivisorClass(x)[source]#
Check if
x
is a toric rational divisor class.INPUT:
x
– anything.
OUTPUT:
True
ifx
is a toric rational divisor class,False
otherwise.
EXAMPLES:
sage: from sage.schemes.toric.divisor_class import is_ToricRationalDivisorClass sage: is_ToricRationalDivisorClass(1) False sage: dP6 = toric_varieties.dP6() sage: D = dP6.rational_class_group().gen(0); D Divisor class [1, 0, 0, 0] sage: is_ToricRationalDivisorClass(D) True
>>> from sage.all import * >>> from sage.schemes.toric.divisor_class import is_ToricRationalDivisorClass >>> is_ToricRationalDivisorClass(Integer(1)) False >>> dP6 = toric_varieties.dP6() >>> D = dP6.rational_class_group().gen(Integer(0)); D Divisor class [1, 0, 0, 0] >>> is_ToricRationalDivisorClass(D) True