#  Copyright (c) 1997-2015
#  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.
#-------------------------------------------------------------------------------

# A //T//-invariant divisor on a normal toric variety.
declare object TDivisor {

   # @category Algebraic Geometry
   # True if the divisor is __ample__.
   property AMPLE : Bool;

   # @category Algebraic Geometry
   # True if the divisor is __basepoint-free__.
   property BASEPOINT_FREE : Bool;

   # @category Algebraic Geometry
   # True if the divisor is __Cartier__.
   property CARTIER : Bool;

   # @category Combinatorics
   # Contains the __Cartier data__ of the divisor if it is [[CARTIER]],
   # i.e., contains a list of vertices of the lattice polytope defined by the divisor and the variety.
   # The vertices appear in the same order as the maximal cones of the fan.
   property CARTIER_DATA : Map<Set<Int>,Vector>;

   # @category Combinatorics
   # The divisor on a toric variety,
   # given as a list of coefficients for the torus invariant divisors corresponding to the [[PolyhedralFan::RAYS|RAYS]] of the fan.
   # Take care of labeling of the Rays.
   property COEFFICIENTS : Vector<Rational>;

   # @category Algebraic Geometry
   # True if the divisor is __effective__.
   property EFFECTIVE : Bool;

   # @category Algebraic Geometry
   # True if the divisor is __integral__.
   property INTEGRAL : Bool;

   # @category Algebraic Geometry
   # True if the divisor is __nef__.
   property NEF : Bool;

   # @category Algebraic Geometry
   # True if the divisor is __principal__.
   property PRINCIPAL : Bool;

   # @category Algebraic Geometry
   # A divisor is __Q-Cartier__ if some multiple of it is [[CARTIER]].
   property Q_CARTIER : Bool;

   # @category Combinatorics
   # The polytope whose lattice points correspond to the global sections of the divisor.
   property SECTION_POLYTOPE : Polytope<Rational>;

   # @category Algebraic Geometry
   # True if the divisor is __semiample__.
   property SEMIAMPLE : Bool;

}

object NormalToricVariety {

   # @category Algebraic Geometry
   # A toric invariant divisor on the variety given by the fan.
   # It is represented by an integer vector with entries corresponding to the rays of the fan.
   # The actual divisor is stored in the property [[COEFFICIENTS]].
   property DIVISOR : TDivisor : multiple;

}


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