  
  [1X5 [33X[0;0YFans[133X[101X
  
  
  [1X5.1 [33X[0;0YConstructors[133X[101X
  
  [1X5.1-1 Fan[101X
  
  [33X[1;0Y[29X[2XFan[102X( [3XF[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10Ya fan object[133X
  
  [33X[0;0YIf the input [3XF[103X is fan then return [3XF[103X.[133X
  
  [1X5.1-2 Fan[101X
  
  [33X[1;0Y[29X[2XFan[102X( [3XC[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10Ya fan object[133X
  
  [33X[0;0YThe  input  is  a list of list [23XC[123X. the output is the fan defined by the cones
  [23X\{\mathrm{Cone}_i(C_i )\}_{C_i\in C}[123X.[133X
  
  [1X5.1-3 Fan[101X
  
  [33X[1;0Y[29X[2XFan[102X( [3XR[103X, [3XC[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10Ya fan object[133X
  
  [33X[0;0YThe  input  is two lists, [23XR[123X that indicates the rays and [23XC[123X that indicates the
  cones.  The output is the fan defined by the cones [23X\{\mathrm{Cone}_i(\{ R_j,
  j\in C_i\} )\}_{C_i\in C}[123X.[133X
  
  [33X[0;0YBelow we define the same fan in two different ways:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XF1 := Fan( [ [ [ 2, 1 ], [ 1, 2 ] ], [ [ 2, 1 ], [ 1, -1 ] ],[127X[104X
    [4X[25X>[125X [27X             [ [ -3, 1 ], [ -1, -3 ] ] ] );[127X[104X
    [4X[28X<A fan in |R^2>             [128X[104X
    [4X[25Xgap>[125X [27XF2 := Fan( [ [ 2, 1 ], [ 1, 2 ], [ -3, 1 ], [ -1, -3 ], [ 1, -1 ] ], [127X[104X
    [4X[25X>[125X [27X        [ [ 1, 2 ], [ 1, 5 ], [ 3, 4 ] ] );[127X[104X
    [4X[28X<A fan in |R^2>[128X[104X
    [4X[25Xgap>[125X [27Xrays1 := RayGenerators( F1 );[127X[104X
    [4X[28X[ [ -3, 1 ], [ -1, -3 ], [ 1, -1 ], [ 1, 2 ], [ 2, 1 ] ][128X[104X
    [4X[25Xgap>[125X [27Xrays2 := RayGenerators( F2 );[127X[104X
    [4X[28X[ [ -3, 1 ], [ -1, -3 ], [ 1, -1 ], [ 1, 2 ], [ 2, 1 ] ][128X[104X
    [4X[25Xgap>[125X [27XRaysInMaximalCones( F1 );[127X[104X
    [4X[28X[ [ 0, 0, 0, 1, 1 ], [ 0, 0, 1, 0, 1 ], [ 1, 1, 0, 0, 0 ] ][128X[104X
    [4X[25Xgap>[125X [27XRaysInMaximalCones( F2 );[127X[104X
    [4X[28X[ [ 0, 0, 0, 1, 1 ], [ 0, 0, 1, 0, 1 ], [ 1, 1, 0, 0, 0 ] ][128X[104X
    [4X[25Xgap>[125X [27XRaysInAllCones( F1 );[127X[104X
    [4X[28X[ [ 0, 0, 0, 0, 0 ], [ 0, 0, 0, 1, 1 ], [ 0, 0, 0, 0, 1 ], [128X[104X
    [4X[28X [ 0, 0, 0, 1, 0 ], [ 0, 0, 1, 0, 1 ], [ 0, 0, 1, 0, 0 ], [128X[104X
    [4X[28X [ 1, 1, 0, 0, 0 ], [ 0, 1, 0, 0, 0 ], [ 1, 0, 0, 0, 0 ] ][128X[104X
    [4X[25Xgap>[125X [27XFVector( F1 );[127X[104X
    [4X[28X[ 5, 3 ][128X[104X
    [4X[25Xgap>[125X [27XIsComplete( F1 );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsSimplicial( F1 );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsNormalFan( F1 );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsRegularFan( F1 );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XP1 := Polytope( [ [ 1 ], [ -1 ] ] );[127X[104X
    [4X[28X<A polytope in |R^1>[128X[104X
    [4X[25Xgap>[125X [27XP1 := NormalFan( P1 );[127X[104X
    [4X[28X<A complete fan in |R^1>[128X[104X
    [4X[25Xgap>[125X [27XRayGenerators( P1 );[127X[104X
    [4X[28X[ [ -1 ], [ 1 ] ][128X[104X
    [4X[25Xgap>[125X [27XP3 := P1 * P1 * P1;[127X[104X
    [4X[28X<A fan in |R^3>[128X[104X
    [4X[25Xgap>[125X [27XRayGenerators( P3 );[127X[104X
    [4X[28X[ [ -1, 0, 0 ], [ 0, -1, 0 ], [ 0, 0, -1 ], [ 0, 0, 1 ], [ 0, 1, 0 ], [128X[104X
    [4X[28X  [ 1, 0, 0 ] ][128X[104X
    [4X[25Xgap>[125X [27XRaysInMaximalCones( P3 );[127X[104X
    [4X[28X[ [ 0, 0, 0, 1, 1, 1 ], [ 0, 0, 1, 0, 1, 1 ], [ 0, 1, 0, 1, 0, 1 ], [128X[104X
    [4X[28X  [ 0, 1, 1, 0, 0, 1 ], [ 1, 0, 0, 1, 1, 0 ], [ 1, 0, 1, 0, 1, 0 ], [128X[104X
    [4X[28X  [ 1, 1, 0, 1, 0, 0 ], [ 1, 1, 1, 0, 0, 0 ] ][128X[104X
    [4X[25Xgap>[125X [27XRaysInAllCones( P3 );[127X[104X
    [4X[28X[ [ 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 1, 1, 1 ], [ 0, 0, 0, 1, 1, 0 ], [128X[104X
    [4X[28X  [ 0, 0, 0, 1, 0, 0 ], [ 0, 0, 0, 0, 1, 0 ], [ 0, 0, 0, 1, 0, 1 ], [128X[104X
    [4X[28X  [ 0, 0, 0, 0, 0, 1 ], [ 0, 0, 0, 0, 1, 1 ], [ 0, 0, 1, 0, 1, 1 ], [128X[104X
    [4X[28X  [ 0, 0, 1, 0, 1, 0 ], [ 0, 0, 1, 0, 0, 0 ], [ 0, 0, 1, 0, 0, 1 ], [128X[104X
    [4X[28X  [ 0, 1, 0, 1, 0, 1 ], [ 0, 1, 0, 1, 0, 0 ], [ 0, 1, 0, 0, 0, 0 ], [128X[104X
    [4X[28X  [ 0, 1, 0, 0, 0, 1 ], [ 0, 1, 1, 0, 0, 1 ], [ 0, 1, 1, 0, 0, 0 ], [128X[104X
    [4X[28X  [ 1, 0, 0, 1, 1, 0 ], [ 1, 0, 0, 1, 0, 0 ], [ 1, 0, 0, 0, 0, 0 ], [128X[104X
    [4X[28X  [ 1, 0, 0, 0, 1, 0 ], [ 1, 0, 1, 0, 1, 0 ], [ 1, 0, 1, 0, 0, 0 ], [128X[104X
    [4X[28X  [ 1, 1, 0, 1, 0, 0 ], [ 1, 1, 0, 0, 0, 0 ], [ 1, 1, 1, 0, 0, 0 ] ][128X[104X
    [4X[25Xgap>[125X [27XIsNormalFan( P3 );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XDimension( P3 );[127X[104X
    [4X[28X3[128X[104X
    [4X[25Xgap>[125X [27XPrimitiveCollections( P3 );[127X[104X
    [4X[28X[ [ 4, 3 ], [ 5, 2 ], [ 6, 1 ] ][128X[104X
  [4X[32X[104X
  
  [33X[0;0YThe following is an example for a fan that is complete but not normal.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xrays := [ [ 1, 0, 0 ], [ -1, 0, 0 ], [ 0, 1, 0 ], [ 0, -1, 0 ], [127X[104X
    [4X[25X>[125X [27X[ 0, 0, 1 ], [ 0, 0, -1 ], [ 2, 1, 1 ], [ 1, 2, 1 ], [ 1, 1, 2 ], [127X[104X
    [4X[25X>[125X [27X[ 1, 1, 1 ] ];;[127X[104X
    [4X[25Xgap>[125X [27Xcones := [ [ 1, 3, 6 ], [ 1, 4, 6 ], [ 1, 4, 5 ], [ 2, 3, 6 ], [127X[104X
    [4X[25X>[125X [27X[ 2, 4, 6 ], [ 2, 3, 5 ], [ 2, 4, 5 ], [ 1, 5, 9 ], [ 3, 5, 8 ], [127X[104X
    [4X[25X>[125X [27X[ 1, 3, 7 ], [ 1, 7, 9 ], [ 5, 8, 9 ], [ 3, 7, 8 ], [ 7, 9, 10 ], [127X[104X
    [4X[25X>[125X [27X[ 8, 9, 10 ], [ 7, 8, 10 ] ];;[127X[104X
    [4X[25Xgap>[125X [27XF := Fan( rays, cones );[127X[104X
    [4X[28X<A fan in |R^3>[128X[104X
    [4X[25Xgap>[125X [27XIsComplete( F );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsNormalFan( F );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XPrimitiveCollections( F );[127X[104X
    [4X[28X[ [ 7, 1 ], [ 7, 2 ], [ 7, 3 ], [ 7, 4 ], [ 7, 5 ], [ 7, 6 ], [128X[104X
    [4X[28X  [ 9, 1 ], [ 9, 2 ], [ 9, 3 ], [ 9, 6 ], [ 10, 1 ], [ 10, 2 ], [128X[104X
    [4X[28X  [ 10, 3 ], [ 10, 4 ], [ 8, 1 ], [ 8, 2 ], [ 8, 3 ], [ 8, 5 ], [128X[104X
    [4X[28X  [ 6, 1 ], [ 5, 2 ], [ 4, 3 ], [ 9, 10, 8 ], [ 5, 6, 4 ] ][128X[104X
  [4X[32X[104X
  
  [1X5.1-4 FansFromTriangulation[101X
  
  [33X[1;0Y[29X[2XFansFromTriangulation[102X( [3XR[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10Ya list of fans[133X
  
  [33X[0;0YThe  input  is  a  list  of  ray  generators  [23XR[123X.  Provided  that the package
  TopcomInterface  is  available,  this function computes the list of all fine
  and regular triangulations of these ray generators. It then returns the list
  of the associated fans of these triangulations.[133X
  
  [1X5.1-5 FanFromTriangulation[101X
  
  [33X[1;0Y[29X[2XFanFromTriangulation[102X( [3XR[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10Ya fan[133X
  
  [33X[0;0YThe  input  is  a  list  of  ray  generators  [23XR[123X.  Provided  that the package
  TopcomInterface  is  available,  this  function  computes a fine and regular
  triangulation of these ray generators and returns the associated fan.[133X
  
  [33X[0;0YThe  above methods construct fans from so-called triangulations. For a given
  list  [23XR[123X  of lists of integers, a triangulation is a fan whose ray generators
  are contained in the given list [23XR[123X.[133X
  
  [33X[0;0YA  regular  triangulation  is  such  a fan, for which all cones are strictly
  convex.  It  is  called  a fine triangulation, iff all elements of [23XR[123X are ray
  generators of this fan.[133X
  
  [33X[0;0YAbove  we  present  two method which make this approach available in NConvex
  via  the package TopcomInterface, which in turn rests on the program Topcom.
  Consequently,   these   methods   are   only   available   if   the  package
  TopcomInterface  is  available.  They  compute  either  all  of the fine and
  regular triangulations or merely just a single such triangulation.[133X
  
  [33X[0;0YAs an example inspired from toric geometry, let us use the ray generators of
  the fan of the resolved conifold (i.e. the total space of the bundle ). This
  space  is  known  to  allow for two different triangulations. The code below
  reproduces this feature.[133X
  
  [4X[32X  Code  [32X[104X
    [4Xgap> rays := [ [ 1, 0, 1 ], [ 1, 1, 0 ], [ 0, 0, -1 ], [ 0, -1, 0 ] ];;[104X
    [4Xgap> all_triangulations := FansFromTriangulation( rays );[104X
    [4X[ <A fan in |R^3>, <A fan in |R^3> ][104X
    [4Xgap> one_triangulation := FanFromTriangulation( rays );[104X
    [4X<A fan in |R^3>[104X
  [4X[32X[104X
  
  
  [1X5.2 [33X[0;0YAttributes[133X[101X
  
  [1X5.2-1 RayGenerators[101X
  
  [33X[1;0Y[29X[2XRayGenerators[102X( [3XF[103X ) [32X attribute[133X
  [6XReturns:[106X  [33X[0;10Ya list[133X
  
  [33X[0;0YThe  input  is  a  fan [3XF[103X. The output is the set of all ray generators of the
  maximal cones in the fan.[133X
  
  [1X5.2-2 GivenRayGenerators[101X
  
  [33X[1;0Y[29X[2XGivenRayGenerators[102X( [3XF[103X ) [32X attribute[133X
  [6XReturns:[106X  [33X[0;10Ya list[133X
  
  [33X[0;0YThe  input  is  a  fan  [3XF[103X.  The  output  is the given or defining set of ray
  generators of the maximal cones in the fan.[133X
  
  [1X5.2-3 RaysInMaximalCones[101X
  
  [33X[1;0Y[29X[2XRaysInMaximalCones[102X( [3XF[103X ) [32X attribute[133X
  [6XReturns:[106X  [33X[0;10Ya list[133X
  
  [33X[0;0YThe  input  is  a  fan  [3XF[103X. The output is a list of lists. which represent an
  incidence matrix for the correspondence of the rays and the maximal cones of
  the  fan  [3XF[103X. The i'th list in the result represents the i'th maximal cone of
  [3XF[103X.  In  such  a  list, the j'th entry is [23X1[123X if the j'th ray is in the cone, 0
  otherwise.[133X
  
  [1X5.2-4 MaximalCones[101X
  
  [33X[1;0Y[29X[2XMaximalCones[102X( [3XF[103X ) [32X attribute[133X
  [6XReturns:[106X  [33X[0;10Ya list[133X
  
  [33X[0;0YThe input is a fan [3XF[103X. The output is a list of the maximal cones of [3XF[103X.[133X
  
  [1X5.2-5 FVector[101X
  
  [33X[1;0Y[29X[2XFVector[102X( [3XF[103X ) [32X attribute[133X
  [6XReturns:[106X  [33X[0;10Ya list[133X
  
  [33X[0;0YDescription[133X
  
  
  [1X5.3 [33X[0;0YProperties[133X[101X
  
  [1X5.3-1 IsWellDefinedFan[101X
  
  [33X[1;0Y[29X[2XIsWellDefinedFan[102X( [3XF[103X ) [32X property[133X
  [6XReturns:[106X  [33X[0;10Ya true or false[133X
  
  [33X[0;0YIt checks whether the constructed fan is well defined or not.[133X
  
  [1X5.3-2 IsComplete[101X
  
  [33X[1;0Y[29X[2XIsComplete[102X( [3XF[103X ) [32X property[133X
  [6XReturns:[106X  [33X[0;10Ya true or false[133X
  
  [33X[0;0YChecks whether the fan is complete, i.e. if its support is the whole space.[133X
  
  [1X5.3-3 IsPointed[101X
  
  [33X[1;0Y[29X[2XIsPointed[102X( [3XF[103X ) [32X property[133X
  [6XReturns:[106X  [33X[0;10Ya true or false[133X
  
  [33X[0;0YChecks  whether  the  fan  is  pointed, i.e., that every cone it contains is
  pointed.[133X
  
  [1X5.3-4 IsSmooth[101X
  
  [33X[1;0Y[29X[2XIsSmooth[102X( [3XF[103X ) [32X property[133X
  [6XReturns:[106X  [33X[0;10Ya true or false[133X
  
  [33X[0;0YChecks if the fan is smooth, i.e. if every cone in the fan is smooth.[133X
  
  [1X5.3-5 IsSimplicial[101X
  
  [33X[1;0Y[29X[2XIsSimplicial[102X( [3XF[103X ) [32X property[133X
  [6XReturns:[106X  [33X[0;10Ya true or false[133X
  
  [33X[0;0YChecks  if  the  fan  is  simplicial,  i.e.  if  every  cone  in  the fan is
  simplicial.[133X
  
  [1X5.3-6 IsNormalFan[101X
  
  [33X[1;0Y[29X[2XIsNormalFan[102X( [3XF[103X ) [32X property[133X
  [6XReturns:[106X  [33X[0;10Ya true or false[133X
  
  [33X[0;0YChecks  if  the  fan  is  normal as described in (Theorem 4.7, Combinatorial
  convexity and algebraic geometry, Ewald, Guenter).[133X
  
  [1X5.3-7 IsRegularFan[101X
  
  [33X[1;0Y[29X[2XIsRegularFan[102X( [3XF[103X ) [32X property[133X
  [6XReturns:[106X  [33X[0;10Ya true or false[133X
  
  [33X[0;0YSynonyme to [10XIsNormalFan[110X[133X
  
  [1X5.3-8 IsFanoFan[101X
  
  [33X[1;0Y[29X[2XIsFanoFan[102X( [3XF[103X ) [32X property[133X
  [6XReturns:[106X  [33X[0;10Ya true or false[133X
  
  [33X[0;0YChecks whether the fan is a fano fan.[133X
  
  
  [1X5.4 [33X[0;0YOperations on fans[133X[101X
  
  [33X[0;0YA  star  subdivision is a certain way of extending a fan. In toric geometry,
  its  applications  include  blowups  of  varieties.  The  following examples
  correspond  to  blowups of the origin of the 2-dimensional and 3-dimensional
  affine space, respectively.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xrays := [ [ 1,0 ], [ 0,1 ] ];;[127X[104X
    [4X[25Xgap>[125X [27Xmax_cones := [ [1,2] ];;[127X[104X
    [4X[25Xgap>[125X [27Xfan_affine2 := Fan( rays, max_cones );;[127X[104X
    [4X[25Xgap>[125X [27Xfan_blowup_affine2 := StarSubdivisionOfIthMaximalCone( fan_affine2, 1 );[127X[104X
    [4X[28X<A fan in |R^2>[128X[104X
    [4X[25Xgap>[125X [27XLength( RaysInMaximalCones( fan_blowup_affine2 ) );[127X[104X
    [4X[28X2[128X[104X
    [4X[25Xgap>[125X [27Xrays := [ [ 1,0,0 ], [ 0,1,0 ], [0,0,1] ];;[127X[104X
    [4X[25Xgap>[125X [27Xmax_cones := [ [1,2,3] ];;[127X[104X
    [4X[25Xgap>[125X [27Xfan_affine3 := Fan( rays, max_cones );;[127X[104X
    [4X[25Xgap>[125X [27Xfan_blowup_affine3 := StarSubdivisionOfIthMaximalCone( fan_affine3, 1 );[127X[104X
    [4X[28X<A fan in |R^3>[128X[104X
    [4X[25Xgap>[125X [27XLength( RaysInMaximalCones( fan_blowup_affine3 ) );[127X[104X
    [4X[28X3[128X[104X
  [4X[32X[104X
  
