#  Copyright (c) 1997-2018
#  Ewgenij Gawrilow, Michael Joswig (Technische Universitaet Berlin, Germany)
#  http://www.polymake.org
#
#  This program is free software; you can redistribute it and/or modify it
#  under the terms of the GNU General Public License as published by the
#  Free Software Foundation; either version 2, or (at your option) any
#  later version: http://www.gnu.org/licenses/gpl.txt.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#-------------------------------------------------------------------------------

# The class group Cl(X) of Weil divisors on the toric variety
# defined by the fan is a finitely generated abelian group of rank [[PolyhedralFan::N_RAYS|N_RAYS]]-[[PolyhedralFan::DIM|DIM]].
# It usually contains torsion.
# The rational divisor class group is the tensor product of Cl(X) with Q over Z.
# This group is torsion free and corresponds to the Picard group if the variety is non-singular.
declare object RationalDivisorClassGroup {

   # @category Algebraic Geometry
   # Maps a divisor on the variety onto its representation in the class group.
   property PROJECTION : Matrix<Integer>;

   # @category Algebraic Geometry
   # Lifts a divisor in the class group onto a divisor on the fan.
   property LIFTING : Matrix<Integer>;

}

object NormalToricVariety {

   file_suffix tv

   # @category Algebraic Geometry
   # A toric variety is __affine__ if the fan consists of a single cone.
   property AFFINE : Bool;

   # @category Algebraic Geometry
   # A toric variety is __degenerate__ if the fan is not [[FULL_DIM]].
   property DEGENERATE : Bool;  	

   # @category Algebraic Geometry
   # The cone of effective divisors in the rational class group.
   # A class of divisors D is effective if the corresponding polytope P<sub>D</sub> is non-empty.
   property EFFECTIVE_CONE : Cone<Rational>;

   # @category Algebraic Geometry
   # A toric variety is __fano__ if the anticanonical divisor is [[AMPLE]].
   property FANO : Bool;

   # @category Basic properties
   # Polytope such that the fan of the toric variety is the normal fan of this polytope.
   # This does not necessarily exist. For determining existence and computation we use
   # Shepards theorem.
   property GENERATING_POLYTOPE : Polytope<Rational>;

   # @category Algebraic Geometry
   # The dual of the [[NEF_CONE]].
   property MORI_CONE : Cone<Rational>;

   # @category Algebraic Geometry
   # The cone of nef divisors in the rational class group.
   # This is the closure of the cone of ample divisors, where
   # a divisor of the variety is ample if the fan coincides with the normal fan of P<sub>D</sub>;
   # equivalently, a divisor is nef if the inequalities it defines are tight on P<sub>D</sub>.
   property NEF_CONE : Cone<Rational>;

   # @category Basic properties
   # The number of maximal torus orbits. Equals the number of rays of the fan.
   property N_MAXIMAL_TORUS_ORBITS : Int;

   # @category Basic properties
   # A toric variety is an __orbifold__ if the fan is [[SIMPLICIAL]].
   property ORBIFOLD : Bool;

   # @category Algebraic Geometry
   # A toric variety is __projective__ if the corresponding fan is the [[fan::normal_fan|normal fan]] of some polytope.
   property PROJECTIVE = override REGULAR;

   # @category Algebraic Geometry
   # The torsion free part of the class group.
   property RATIONAL_DIVISOR_CLASS_GROUP : RationalDivisorClassGroup;

   # @category Algebraic Geometry
   # A toric variety is __smooth__ if the fan is [[SMOOTH_FAN|smooth]].
   property SMOOTH = override SMOOTH_FAN;

}


# Local Variables:
# mode: perl
# cperl-indent-level: 3
# indent-tabs-mode:nil
# End:
