# Ticket #8988: trac_8988_Kaehler_Mori_cones.patch

File trac_8988_Kaehler_Mori_cones.patch, 4.6 KB (added by novoselt, 12 years ago)

Code to be included later.

• ## sage/schemes/generic/toric_variety.py

# HG changeset patch
# User Volker Braun <vbraun@stp.dias.ie>
# Date 1277790432 21600
# Node ID 8a188cb26b26dbd2699e64bdd82839c42dec3b29
# Parent  093b476eeab8965d437fe4d60503975057df3f6a
Trac 8988: introduce rational_divisor_class_group for Kaehler_cone, Mori_vectors

diff -r 093b476eeab8 -r 8a188cb26b26 sage/schemes/generic/toric_variety.py
 a """ return self.fan().is_smooth() def Kaehler_cone(self): r""" Return the closure of the Kähler cone of self. OUTPUT: - :class:cone . .. NOTE:: This cone sits in the rational divisor class group of self and the choice of coordinates agrees with :meth:rational_divisor_class_group. EXAMPLES:: sage: fan = FaceFan(lattice_polytope.octahedron(2)) sage: P1xP1 = ToricVariety(fan) sage: Kc = P1xP1.Kaehler_cone() sage: Kc 2-d cone in 2-d lattice sage: Kc.rays() ((0, 1), (1, 0)) sage: Kc.lattice() Vector space of dimension 2 over Rational Field """ if "_Kaehler_cone" not in self.__dict__: fan = self.fan() GT = fan.gale_transform().columns() n = fan.nrays() K = None for cone in fan: sigma = Cone([GT[i] for i in range(n) if i not in cone.ambient_ray_indices()], lattice = self.rational_divisor_class_group()) K = K.intersection(sigma) if K is not None else sigma self._Kaehler_cone = K return self._Kaehler_cone def Mori_vectors(self): """ Returns the rays of the Mori cone. OUTPUT: - The rays of the Mori cone, that is, the dual of the Kähler cone. - The points in the Mori cone are the effective curves in the variety. - The first self.fan().nrays() integer entries in each Mori vector are the intersection numbers of the curve corresponding to the generator of the ray with the divisors of the toric variety in the same order as :meth:divisors. - The last entry is associated to the orgin of the N-lattice. - The Mori vectors are also known as the gauged linear sigma model charge vectors. EXAMPLES:: sage: P4_11169 = toric_varieties.P4_11169_resolved() sage: P4_11169.Mori_vectors() [(3, 2, 0, 0, 0, 1, -6), (0, 0, 1, 1, 1, -3, 0)] """ Mc = [ facet_normal * self._fan.gale_transform() for facet_normal in self.Kaehler_cone().facet_normals() ] return Mc; def rational_divisor_class_group(self): r""" Return the rational divisor class group of self. Let X be a toric variety. The **Weil divisor class group** \mathop{Cl}(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** of 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. OUTPUT: - rational divisor class group, represented as \ZZ^n. .. NOTE:: * Coordinates correspond to the rows of self.fan().gale_transform(). * :meth:Kaehler_cone yields a cone in this group. EXAMPLES:: sage: fan = FaceFan(lattice_polytope.octahedron(2)) sage: P1xP1 = ToricVariety(fan) sage: P1xP1.rational_divisor_class_group() Vector space of dimension 2 over Rational Field """ if "_rational_divisor_class_group" not in self.__dict__: self._rational_divisor_class_group = \ QQ**(self.fan().nrays() - self.fan().lattice_dim()) return self._rational_divisor_class_group def resolve(self, **kwds): r""" Construct a toric variety whose fan subdivides the fan of self.