Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
| Download
GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
Project: cocalc-sagemath-dev-slelievre
Views: 418346<?xml version="1.0" encoding="UTF-8"?>1<!DOCTYPE Book SYSTEM "gapdoc.dtd">23<Book Name="toric">45<#Include SYSTEM "title.xml">67<TableOfContents/>89<Body>101112<Chapter><Heading>Introduction</Heading>1314<Section>15<Heading>Introduction to the <Package>toric</Package> package</Heading>1617<P/>18This manual describes the <Package>toric</Package> package for working with19toric varieties in &GAP;. Toric varieties can be dealt20with more easily than general varieties since often21times questions about a toric variety can be reformulated in terms22of combinatorial geometry.2324Some coding theory commands related to toric varieties25are contained in the error-correcting codes26<Package>GUAVA</Package> package27(for example, the command <C>ToricCode</C>).28We refer to the <Package>GUAVA</Package> manual29<Cite Key="Gua05"/> and the expository30paper <Cite Key="JV02"/> for more details.3132<P/>33The <Package>toric</Package> package also contains34several commands unrelated to toric varieties35(mostly for list manipulations).36These will not be described in this documention but37they are briefly documented in the <C>lib/util.gd</C>38file.3940<P/>41<Package>toric</Package> is implemented in the &GAP; language,42and runs on any system supporting &GAP;4.3 and above.43The <Package>toric</Package> package is loaded with the command44<Verb> gap> LoadPackage( "toric" ); </Verb>4546<P/>47Please send bug reports, suggestions and other comments about48<Package>toric</Package> to49<Email>[email protected]</Email>.5051</Section>5253<Section>54<Heading>Introduction to constructing toric varieties</Heading>5556Rather than sketch the theory of57toric varieties, we refer to58<Cite Key="JV02"/> and <Cite Key="F93"/> for details.59However, we briefly describe some terminology and notation.6061<Subsection>62<Heading>Generalities</Heading>6364Let <M>F</M> denote a field and65<M>R=F [x_1,...,x_n]</M> be a ring in <M>n</M> variables.66A <B>binomial equation</B>67in <M>R</M> is one of the form6869<Display>70x_1^{k_1}...x_n^{k_n}=x_1^{\ell_1}...x_n^{\ell_n},71</Display>72where <M>k_i \geq 0,\ \ell_j \geq 0</M> are integers.73A binomial variety74is a subvariety of affine <M>n</M>-space75<M>A_F^n</M> defined by a finite set of binomial76equations (such a variety need not be normal).77A typical ``toric variety'' is binomial, though they78will be introduced via an <E>a priori</E>79independent construction.80The basic idea of the construction is to81replace each such binomial equation as above by a relation in a82semigroup contained in a lattice83and replace <M>R</M> by the ``group algebra'' of this84semigroup. By the way, a toric variety is85always normal (see for example, <Cite Key="F93"/>,86page 29).8788</Subsection>8990<Subsection>91<Heading>Basic combinatorial geometry constructions</Heading>9293Let <M>Q</M> denote the field of rational numbers and <M>Z</M> denote the94set of integers. Let <M>n>1</M> denote an integer.9596<P/>97Let <Math>V=Q^n</Math> having basis98<M>f_1=(1,0,...,0)</M>, ..., <M>f_n=(0,...,0,1)</M>.99Let <M>L_0=Z^n\subset V</M> be the standard lattice in <M>V</M>.100We identify <M>V</M> and <M>L_0\otimes_{Z} Q</M>.101We use <M>\langle\ ,\ \rangle</M> to denote102the (standard) inner product on <M>V</M>. Let103104<Display>105L_0^*={\rm Hom}(L_0,Z)=\{ v\in V\ |\ \langle v,w \rangle \in Z,106\ \forall w\in L_0\}107</Display>108denote the <B>dual lattice</B>, so (fixing the standard basis109<M>e_1^*</M>,...,<M>e_n^*</M> dual to the <M>f_1</M>,...,<M>f_n</M>)110<M>L_0^*</M> may be identified with <M>Z^n</M>.111112<P/>113A <B>cone</B> in <M>V</M> is a set <M>\sigma</M> of the form114115<Display>116\sigma=\{a_1v_1+...+a_mv_m\ |\ a_i\geq 0\}\subset V,117</Display>118where <M>v_1,...,v_m \in V</M> is a given collection of119vectors, called (semigroup) <B>generators</B> of <M>\sigma</M>.120A <B>rational cone</B> is one where <M>v_1,...,v_m \in L_0</M>.121A <B>strongly convex</B> cone is one which contains122no lines through the origin.123124<P/>125<E>126By abuse of terminology, from now on127a <B>cone</B> of <M>L_0</M> is a strongly convex rational cone.128</E>129<Index>cone</Index>130<P/>131A <B>face</B> of a cone <M>\sigma</M> is either <M>\sigma</M>132itself or a subset of the form <M>H\cap \sigma</M>,133where <M>H</M> is a codimension one subspace of <M>V</M>134which intersects the cone non-trivially and such that the cone135is contained in exactly one of the two half-spaces determined by136<M>H</M>. A <B>ray</B> (or edge) of a cone is a one-dimensional face.137<Index>ray</Index>138Typically, cones are represented in <Package>toric</Package>139by the list of vectors defining their rays.140The <B>dimension</B> of a cone is the dimension of the141vector space it spans.142The <Package>toric</Package> package can test if a143given vector is in a given cone (see <C>InsideCone</C>).144145<P/>146If <M>\sigma</M> is a cone then the <B>dual cone</B> is defined by147148<Display>149\sigma^* =\{w \in L_0^*\otimes Q150\ |\ \langle v,w \rangle \geq 0,\ \forall v\in \sigma\}.151</Display>152The <Package>toric</Package> package can test if a153vector is in the dual of a given cone (see <C>InDualCone</C>).154<Index>dual cone</Index>155156<P/>157Associate to the dual cone <M>\sigma^*</M> is the semigroup158159<Display>160S_\sigma =\sigma^*\cap L_0^*161=\{w\in L_0^*162\ |\ \langle v,w\rangle \geq 0,\163\forall v\in \sigma\}.164</Display>165Though <M>L_0^*</M> has $n$ generators <E>as a lattice</E>,166typically <M>S_\sigma</M> will have more than <M>n</M>167generators <E>as a semigroup</E>.168The <Package>toric</Package> package can compute a169minimal list of semigroup generators of <M>S_\sigma</M>170(see <C>DualSemigroupGenerators</C>).171<Index>semigroup associated to cone</Index>172173<P/>174A fan is a collection of cones which ``fit together'' well.175176A <B>fan</B> in <M>L_0</M> is a set177<M>\Delta=\{\sigma \}</M> of rational strongly convex178cones in <M>V= L_0 \otimes Q</M>179such that180181<List>182183<Item>184if <M>\sigma \in \Delta</M> and <M>\tau \subset \sigma</M> is a face185of <M>\sigma</M> then <M>\tau \in \Delta</M>,186</Item>187188<Item>189if <M>\sigma_1, \sigma_2 \in \Delta</M> then190the intersection <M>\sigma_1 \cap \sigma_2</M> is a face of191both <M>\sigma_1</M> and <M>\sigma_2</M> (and hence192belongs to <M>\Delta</M>).193</Item>194</List>195In particular, the face of a cone in a fan is a cone is the fan.196<P/>197If <M>V</M> is the (set-theoretic) union of the198cones in <M>\Delta</M> then we call the fan <B>complete</B>.199We shall assume that all fans are finite.200A fan is determined by its list of maximal cones.201<Index>fan</Index>202203<P/>204<E>Notation</E>: A fan <M>\Delta</M> is represented in205<Package>toric</Package> as a set of maximal cones.206For example, if <M>\Delta</M> is the fan with maximal cones207<M>\sigma_1=Q_+\cdot f_1+Q_+\cdot (-f_1+f_2)</M>,208<M>\sigma_2=Q_+\cdot (-f_1+f_2)+Q_+\cdot (-f_1-f_2)</M>,209<M>\sigma_3=Q_+\cdot (-f_1-f_2)+Q_+\cdot f_1</M>,210then <M>\Delta</M> is represented by211<M>[[[1,0],[-1,1]],[[-1,1],[-1,-1]],[[-1,-1],[1,0]]]</M>.212213<P/>214The <Package>toric</Package> package can compute all cones215in a fan of a given dimension (see <C>ConesOfFan</C>).216Moreover, <Package>toric</Package> can compute217the set of all normal vectors to the faces (i.e., hyperplanes)218of a cone (see <C>Faces</C>).219220<P/>221The <B>star</B> of a cone <M>\sigma</M> in a222fan <M>\Delta</M> is the set <M>\Delta_\sigma</M>223of cones in <M>\Delta</M> containing <M>\sigma</M> as a face.224The <Package>toric</Package> package can compute stars225(see <C>ToricStar</C>).226<Index>star</Index>227228<P/>229230</Subsection>231232<Subsection>233<Heading>Basic affine toric variety constructions</Heading>234235Let236<Display>237R_\sigma = F [S_\sigma]238</Display>239denote the ``group algebra'' of this semigroup. It is a240finitely generated commutative F-algebra.241It is in fact integrally closed (<Cite Key="F93"/>, page 29).242We may interprete <M>R_\sigma</M> as a subring of243<M>R=F [x_1,...,x_n]</M> as follows: First,244identify each <M>e_i^*</M> with the variable <M>x_i</M>.245If <M>S_\sigma</M> is generated as a semigroup by246vectors of the form <M>\ell_1 e_1^*+...+\ell_n e_n^*</M>,247where <M>\ell_i</M> is an integer, then its image in248<M>R</M> is generated by monomials of the249form <M>x_1^{\ell_1}\dots x_n^{\ell_n}</M>.250The <Package>toric</Package> package can compute these251generating monomials (see <C>EmbeddingAffineToricVariety</C>).252See Lemma 2.14 in <Cite Key="JV02"/> for more details.253This embedding can also be used to resolve singularities -254see section 5 of <Cite Key="JV02"/> for more details.255256<P/>257Let258<Display>259U_\sigma={\rm Spec}\ R_\sigma.260</Display>261This defines an <B>affine toric variety</B> (associated262to <M>\sigma</M>). It is known that the coordinate ring263<M>R_\sigma</M> of the affine toric variety <M>U_\sigma</M>264has the form <M>R_\sigma = F[x_1,...,x_n]/J</M>, where <M>J</M>265is an ideal. The <Package>toric</Package> package can compute266generators of this ideal by using the <C>DualSemigroupGenerators</C>267and the <C>EmbeddingAffineToricVariety</C>268commands.269<Index>affine toric variety</Index>270271<P/>272Roughly speaking, the toric variety <M>X(\Delta)</M> associated to273the fan <M>\Delta</M> is given by a collection of affine274pieces $U_{\sigma_1},U_{\sigma_2},\dots,U_{\sigma_d}$275which ``glue'' together (where <M>\Delta = \{\sigma_i\}</M>).276The affine pieces are given by the zero277sets of polynomial equations in some affine spaces278and the gluings are given by maps279<M>\phi_{i,j} : U_{\sigma_i} \rightarrow U_{\sigma_j}</M>280which are defined by ratios of polynomials on open subsets of the281$U_{\sigma_i}$.282The <Package>toric</Package> package does <E>not</E>283compute these gluings or work directly with these284(non-affine) varieties <M>X(\Delta)</M>.285286<P/>287A cone <M>\sigma \subset V</M> is said to be <B>nonsingular</B> if288it is generated by part of a basis for the lattice <M>L_0</M>.289A fan <M>\Delta</M> of cones is said to be <B>nonsingular</B> if290all its cones are nonsingular. It is known that <M>U_\sigma</M>291is nonsingular if and only if <M>\sigma</M> is nonsingular292(Proposition 2.1 in <Cite Key="F93"/>).293<Index>cone, nonsingular</Index>294295<P/>296<B>Example:</B>297In three dimensions, consider the cones298<M>\sigma_{\epsilon_1,\epsilon_2,\epsilon_3,i,j}</M>299generated by <M>(\epsilon_1\cdot 1,\epsilon_2\cdot 1,\epsilon_3\cdot 1)</M>300and the standard basis vectors <M>f_i,f_j</M>,301where <M>\epsilon_i=\pm 1</M> and302<M>1\leq i\not= j\leq 3</M>. There are 8 cones per octant,303for a total of 64 cones. Let <M>\Delta</M> denote the304fan in <M>V=Q^3</M> determined by these maximal cones.305The toric variety <M>X(\Delta)</M> is nonsingular.306<P/>307308</Subsection>309310<Subsection>311<Heading>Riemann-Roch spaces and related constructions</Heading>312313Although the <Package>toric</Package> package does not314work directly with the toric varieties <M>X(\Delta)</M>,315it can compute objects associated with it.316For example, it can compute the317Euler characteristic (see <C>EulerCharacteristic</C>), Betti numbers318(see <C>BettiNumberToric</C>), and the319number of GF(q)-rational points320(see <C>CardinalityOfToricVariety</C>) of <M>X(\Delta)</M>,321<E> provided <M>\Delta</M> is nonsingular.</E>322323<P/>324For an algebraic variety <M>X</M> the group of <B>Weil divisors</B>325on <M>X</M> is326the abelian group <M>Div(X)</M> generated (additively) by the327irreducible subvarieties of X of codimension <M>1</M>.328For a toric variety <M>X(\Delta)</M> with dense open torus <M>T</M>, a Weil divisor329D is <B>T-invariant</B> if <M>D=T\cdot D</M>.330The group of <M>T</M>-invariant Weil divisors is denoted331<M>TDiv(X)</M>. This is finitely generated by an explicitly332given finite set of divisors333<M>\{D_1,...,D_r\}</M> which correspond naturally to certain334cones in <M>\Delta</M> (see <Cite Key="F93"/> for details).335In particular, we may represent such a divisor <M>D</M> in <M>TDiv(X)</M>336by an <M>k</M>-tuple <M>(d_1,...,d_k)</M> of integers.337<Index>Weil divisors</Index>338339<P/>340Let <M>\Delta</M> denote a fan in <M>V=Q^n</M> with rays (or edges)341<M>\tau_i</M>, <M>1\leq i\leq k</M>, and let342<M>v_i</M> denote the first lattice point on <M>\tau_i</M>.343Associated to the T-invariant Weil divisor <M>D=d_1D_1+...+d_kD_k</M>,344is the <B>polytope</B>345<Display>346P_D = \{ x=(x_1,...,x_n)\ |\ \langle x,v_i \rangle \geq -d_i,347\ \forall 1 \leq i \leq k\}.348</Display>349The <Package>toric</Package> package can compute350<M>P_D</M> (see <C>DivisorPolytope</C>), as well as the set of all351lattice points contained in this polytope352(see <C>DivisorPolytopeLatticePoints</C>).353Also associated to the <M>T</M>-invariant Weil divisor354<M>D=d_1D_1+...+d_kD_k</M>, is the Riemann-Roch space,355<M>L(D)</M>. This is a space of functions on356<M>X(\Delta)</M> whose zeros and poles are357``controlled'' by <M>D</M> (for a more precise definition, see358<Cite Key="F93"/>). The <Package>toric</Package> package can compute359a basis for <M>L(D)</M> (see <C>RiemannRochBasis</C>),360<E> provided <M>\Delta</M> is complete and nonsingular.</E>361<Index>polytope associated to divisor</Index>362363</Subsection>364</Section>365366</Chapter>367368<Chapter>369<Heading>Cones and semigroups</Heading>370371372<Section>373<Heading>Cones</Heading>374375This section introduces the <Package>toric</Package>376commands which deal with cones and related377combinatorial-geometric objects.378379Recall, a <B>cone</B> is a strongly convex polyhedral380cone (<Cite Key="F93"/>, page 4).381382<ManSection Label="InsideCone">383<Func Name="InsideCone" Arg=" v, L "/>384385<Description>386This command returns `true` if the vector <A>v</A> belongs to the interior387of the (strongly convex polyhedral)388cone generated by the vectors in <A>L</A>.389</Description>390</ManSection>391392This procedure does not check if <A>L</A> generates a393strongly convex polyhedral cone.394395<Example>396gap> L:=[[1,0,0],[1,1,0],[1,1,1],[1,0,1]];; v:=[0,0,1];;397gap> InsideCone(v,L);398false399gap> L:=[[1,0],[3,4]];;400gap> v:=[1,-7]; InsideCone(v,L);401[ 1, -7 ]402false403gap> v:=[4,-3]; InsideCone(v,L);404[ 4, -3 ]405false406gap> v:=[4,-4]; InsideCone(v,L);407[ 4, -4 ]408false409gap> v:=[4,1]; InsideCone(v,L);410[ 4, 1 ]411true412</Example>413<!--414L:=[[1,0,0],[1,1,0],[1,1,1],[1,0,1]];;415v:=[0,0,1];;416InsideCone(v,L);417false418L:=[[1,0],[3,4]];;419v:=[1,-7]; InsideCone(v,L);420v:=[4,-3]; InsideCone(v,L);421v:=[4,-4]; InsideCone(v,L);422v:=[4,1]; InsideCone(v,L);423-->424425<ManSection Label="InDualCone">426<Func Name="InDualCone" Arg=" v, L "/>427428<Description>429This command430returns `true` if <A>v</A> belongs to the dual of the cone generated by431the vectors in <A>L</A>.432</Description>433</ManSection>434435<Example>436gap> L:=[[1,0,0],[1,1,0],[1,1,1],[1,0,1]];; v:=[0,0,1];;437gap> InDualCone(v,L);438true439gap> L:=[[1,0],[3,4]];440[ [ 1, 0 ], [ 3, 4 ] ]441gap> v:=[1,-7]; InDualCone(v,L);442[ 1, -7 ]443false444gap> v:=[4,-3]; InDualCone(v,L);445[ 4, -3 ]446true447gap> v:=[4,-4]; InDualCone(v,L);448[ 4, -4 ]449false450gap> v:=[4,1]; InDualCone(v,L);451[ 4, 1 ]452true453</Example>454<!--455L:=[[1,0,0],[1,1,0],[1,1,1],[1,0,1]];; v:=[0,0,1];;456InDualCone(v,L);457L:=[[1,0],[3,4]];458v:=[1,-7]; InDualCone(v,L);459v:=[4,-3]; InDualCone(v,L);460v:=[4,-4]; InDualCone(v,L);461v:=[4,1]; InDualCone(v,L);462-->463464<ManSection>465<Func Name="PolytopeLatticePoints" Arg=" A, Perps "/>466467<Description>468<E>Input</E>: <A>Perps</A><M>=[v_1,...,v_k]</M> is the list of ``inward normal"469vectors perpendicular to the walls of a polytope <M>P</M> in the470vector space <M>L_0^*\otimes Q</M>,471<Br></Br>472<A>A</A><M>=[a_1,...,a_k]</M> is a k-tuple of integers, where473<M>a_i</M> denotes the amount the i-th ``wall" (defined by the normal <M>v_i</M>)474is shifted from the origin (each <M>a_i</M> is assumed non-negative).475<Br></Br>476For example, the polytope <M>P</M> with faces477<C>[x=0, x=a, y=0, y=b]</C>478has <A>Perps</A><M>=[[1,0],[-1,0],[0,1],[0,-1]]</M> and <A>A</A><M>=[0,a,0,b]</M>.479<Br></Br>480<E>Output</E>: the list of points in <M>P \cap L_0^*</M>.481</Description>482</ManSection>483484<Example>485gap> Perps:=[[1,0],[-1,0],[0,1],[0,-1]];486[ [ 1, 0 ], [ -1, 0 ], [ 0, 1 ], [ 0, -1 ] ]487gap> A:=[0,4,0,3];488[ 0, 4, 0, 3 ]489gap> PolytopeLatticePoints(A,Perps);490[ [ 0, 0 ], [ 0, 1 ], [ 0, 2 ], [ 0, 3 ], [ 1, 0 ], [ 1, 1 ], [ 1, 2 ],491[ 1, 3 ], [ 2, 0 ], [ 2, 1 ], [ 2, 2 ], [ 2, 3 ], [ 3, 0 ], [ 3, 1 ],492[ 3, 2 ], [ 3, 3 ], [ 4, 0 ], [ 4, 1 ], [ 4, 2 ], [ 4, 3 ] ]493gap> Length(last);49420495</Example>496<!--497Perps:=[[1,0],[-1,0],[0,1],[0,-1]];498A:=[0,4,0,3];499PolytopeLatticePoints(A,Perps);500Length(last);501-->502503<ManSection>504<Func Name="Faces" Arg=" Rays "/>505506<Description>507<E>Input</E>: <A>Rays</A> is a list of rays for the fan <M>\Delta</M>508<Br></Br>509<E>Output</E>: All the normals to the faces (hyperplanes of the cone).510</Description>511512</ManSection>513514<Example>515gap> Cones1:=[[[2,-1],[-1,2]],[[-1,2],[-1,-1]],[[-1,-1],[2,-1]]];;516gap> Faces(Cones1[1]);517[ [ 1/2, 1 ], [ 2, 1 ] ]518gap> Faces(Cones1[2]);519[ [ -2, -1 ], [ -1, 1 ] ]520gap> Cones2:=[[[ 2,0,0],[0,2,0],[0,0,2]], [[2,0,0], [0,2,0], [2,-2,1],[1,2,-2]]];;521gap> Faces(Cones2[1]);522[ [ 0, 0, 1 ], [ 0, 1, 0 ], [ 1, 0, 0 ] ]523gap> Faces(Cones2[2]);524[ [ 1/3, 5/6, 1 ], [ 1/2, 0, -1 ], [ 2, 0, 1 ] ]525</Example>526<!--527Cones1:=[[[2,-1],[-1,2]],[[-1,2],[-1,-1]],[[-1,-1],[2,-1]]];;528Faces(Cones1[1]);529Faces(Cones1[2]);530Cones2:=[[[ 2,0,0],[0,2,0],[0,0,2]], [[2,0,0], [0,2,0], [2,-2,1],[1,2,-2]]];;531Faces(Cones2[1]);532Faces(Cones2[2]);533-->534535536537<ManSection>538<Func Name="ConesOfFan" Arg=" Delta k "/>539540<Description>541<E>Input</E>: <A>Delta</A> is the fan of cones,542<Br></Br>543<A>k</A> is the dimension of the cones desired.544<Br></Br>545<E>Output</E>: The <A>k</A>-dimensional cones in the fan.546</Description>547548</ManSection>549550551552<ManSection>553<Func Name="NumberOfConesOfFan" Arg=" Delta k "/>554555<Description>556<E>Input</E>: <A>Delta</A> is the fan of cones in <M>V=Q^n</M>,557<Br></Br>558<A>k</A> is the dimension of the cones counted.559<Br></Br>560<E>Output</E>: The number of <A>k</A>-dimensional cones in the fan.561</Description>562</ManSection>563564Idea: The fan <A>Delta</A> is represented as a set of maximal cones.565For each maximal cone, look at the <A>k</A>-dimensional faces566obtained by taking <M>n</M> choose <A>k</A> subsets of the567rays describing the cone. Certain of these <A>k</A>-subsets568yield the desired cones.569570<Example>571gap> Delta0:=[ [ [2,0,0],[0,2,0],[0,0,2] ], [ [2,0,0],[0,2,0],[2,-2,1],[1,2,-2] ] ];;572gap> NumberOfConesOfFan(Delta0,2);5736574gap> ConesOfFan(Delta0,2);575[ [ [ 0, 0, 2 ], [ 0, 2, 0 ] ], [ [ 0, 0, 2 ], [ 2, 0, 0 ] ],576[ [ 0, 2, 0 ], [ 1, 2, -2 ] ], [ [ 0, 2, 0 ], [ 2, -2, 1 ] ],577[ [ 0, 2, 0 ], [ 2, 0, 0 ] ], [ [ 1, 2, -2 ], [ 2, -2, 1 ] ] ]578gap> ConesOfFan(Delta0,1);579[ [ [ 0, 0, 2 ] ], [ [ 0, 2, 0 ] ], [ [ 1, 2, -2 ] ],580[ [ 2, -2, 1 ] ], [ [ 2, 0, 0 ] ] ]581gap> NumberOfConesOfFan(Delta0,1);5825583</Example>584<!--585Delta0:=[ [ [2,0,0],[0,2,0],[0,0,2] ], [ [2,0,0],[0,2,0],[2,-2,1],[1,2,-2] ] ];;586NumberOfConesOfFan(Delta0,2);587ConesOfFan(Delta0,2);588ConesOfFan(Delta0,1);589NumberOfConesOfFan(Delta0,1);590591-->592593594<ManSection>595<Func Name="ToricStar" Arg=" sigma, Delta "/>596597<Description>598<E>Input</E>: <A>sigma</A> is a cone in the fan,599represented by its set of maximal (i.e., highest dimensional) cones.600<Br></Br>601<A>Delta</A> is the fan of cones in <M>V=Q^n</M>.602<Br></Br>603<E>Output</E>: The star of the cone <A>sigma</A> in <A>Delta</A>,604i.e., the cones <M>\tau</M> which have <A>sigma</A> as a face.605606</Description>607608</ManSection>609610<Example>611gap> MaxCones:=[ [ [2,0,0],[0,2,0],[0,0,2] ],612> [ [2,0,0],[0,2,0],[2,-2,1],[1,2,-2] ] ];;613gap> #this is the set of maximal cones in the fan Delta614gap> ToricStar([[1,0]],MaxCones);615[ ]616gap> ToricStar([[2,0,0],[0,2,0]],MaxCones);617[ [ [ 0, 2, 0 ], [ 2, 0, 0 ] ], [ [ 2, 0, 0 ], [ 0, 2, 0 ], [ 0, 0, 2 ] ],618[ [ 2, 0, 0 ], [ 0, 2, 0 ], [ 2, -2, 1 ], [ 1, 2, -2 ] ] ]619gap> MaxCones:=[ [ [2,0,0],[0,2,0],[0,0,2] ], [ [2,0,0],[0,2,0],[1,1,-2] ] ];;620gap> ToricStar([[2,0,0],[0,2,0]],MaxCones);621[ [ [ 0, 2, 0 ], [ 2, 0, 0 ] ], [ [ 2, 0, 0 ], [ 0, 2, 0 ], [ 0, 0, 2 ] ],622[ [ 2, 0, 0 ], [ 0, 2, 0 ], [ 1, 1, -2 ] ] ]623gap> ToricStar([[1,0]],MaxCones);624[ ]625</Example>626<!--627MaxCones:=[ [ [2,0,0],[0,2,0],[0,0,2] ], [ [2,0,0],[0,2,0],[2,-2,1],[1,2,-2] ] ];;628ToricStar([[1,0]],MaxCones);629ToricStar([[2,0,0],[0,2,0]],MaxCones);630MaxCones:=[ [ [2,0,0],[0,2,0],[0,0,2] ], [ [2,0,0],[0,2,0],[1,1,-2] ] ];;631ToricStar([[2,0,0],[0,2,0]],MaxCones);632ToricStar([[1,0]],MaxCones);633-->634635</Section>636637<Section>638<Heading>Semigroups</Heading>639640<ManSection>641<Func Name="DualSemigroupGenerators" Arg=" L "/>642643<Description>644<E>Input</E>: <A>L</A> is a list of integral <M>n</M>-vectors generating a645cone <M>\sigma</M>.646<Br></Br>647<E>Output</E>: the generators of <M>S_\sigma</M>,648<P/>649Idea: let <M>M</M> be the maximum of the absolute values of the650coordinates of the <A>L</A>[i]'s, for each vector <M>v</M> in651<M>[1..M]^n</M>, test if <M>v</M> is in the dual cone652<M>\sigma^*</M>. If so,653add <M>v</M> to list of possible generators.654Once this for loop is finished, one can check655this list for redundant generators. The656trick is to simply omit those elements657which are of the form <M>d_1+d_2</M>, where <M>d_1</M> and <M>d_2</M>658are ``small" elements in the integral dual cone.659<P/>660This program is not very efficient and should not be used661in ``large examples'' involving semigroups with ``many'' generators.662For example, if you take663<A>L:=[[1,2,3,4],[0,1,0,7],[3,1,0,2],[0,0,1,0]];</A> then664<C>DualSemigroupGenerators(L);</C> can exhaust GAP's memory665allocation.666</Description>667</ManSection>668669<Example>670gap> L:=[[1,0],[3,4]];; DualSemigroupGenerators([[1,0],[3,4]]);671[ [ 0, 0 ], [ 0, 1 ], [ 1, 0 ], [ 2, -1 ], [ 3, -2 ], [ 4, -3 ] ]672gap> L:=[[1,0,0],[1,1,0],[1,1,1],[1,0,1]];;673gap> DualSemigroupGenerators(L);674[ [ 0, 0, 0 ], [ 0, 0, 1 ], [ 0, 1, 0 ], [ 1, -1, 0 ], [ 1, 0, -1 ] ]675</Example>676<!--677L:=[[1,0],[3,4]];; DualSemigroupGenerators([[1,0],[3,4]]);678L:=[[1,0,0],[1,1,0],[1,1,1],[1,0,1]];;679DualSemigroupGenerators(L);680-->681682</Section>683684</Chapter>685686<Chapter>687<Heading>Affine toric varieties</Heading>688689This chapter concerns <Package>toric</Package>690commands which deal with the coordinate rings of691affine toric varieties <M>U_\sigma</M>.692693<Section>694<Heading>Ideals defining affine toric varieties</Heading>695696<ManSection>697<Func Name="EmbeddingAffineToricVariety" Arg=" L "/>698699<Description>700<E>Input</E>: <A>L</A> is a list generating a cone701(as in <C>DualSemigroupGenerators</C>).702<Br></Br>703<E>Output</E>: the toroidal embedding of <M>X=Spec(I)</M>, where I is the704ideal of the affine toric variety (given as a list of multinomials).705</Description>706</ManSection>707708<Example>709gap> phi:=EmbeddingAffineToricVariety([[1,0],[3,4]]);710[ x_2, x_1, x_1^2/x_4, x_1^3/x_4^2, x_1^4/x_4^3 ]711gap> L:=[[1,0,0],[1,1,0],[1,1,1],[1,0,1]];;712gap> phi:=EmbeddingAffineToricVariety(L);713[ x_3, x_2, x_1/x_5, x_1/x_6 ]714</Example>715716717</Section>718</Chapter>719720<Chapter>721<Heading>Toric varieties <M>X(\Delta)</M> </Heading>722723This chapter concerns <Package>toric</Package>724commands which deal with certain objects associated to the725(non-affine) toric varieties <M>X(\Delta)</M>.726727<Section>728<Heading>Riemann-Roch spaces</Heading>729730Let <M>\Delta</M> denote a complete nonsingular fan.731732<ManSection>733<Func Name="DivisorPolytope" Arg=" D, Rays "/>734735<Description>736<E>Input</E>: <A>Rays</A> is the list of smallest integer737vectors in the rays for the fan <M>\Delta</M>738which determine the Weil divisors of <M>X(\Delta)</M>.739<Br></Br>740<A>D</A> is the list of coefficients for the a Weil divisor.741<Br></Br>742<E>Output</E>: the linear expressions in the affine coordinates of the743space of the cone which must be positive for a point to be in the744desired polytope.745</Description>746</ManSection>747748<Example>749gap> DivisorPolytope([6,6,0],[[2,-1],[-1,2],[-1,-1]]);750[ 2*x_1-x_2+6, -x_1+2*x_2+6, -x_1-x_2 ]751</Example>752753See also Example 6.13 in <Cite Key="JV02"/>.754755<ManSection>756<Func Name="DivisorPolytopeLatticePoints" Arg=" D, Delta, Rays "/>757758<Description>759<E>Input</E>: <A>Delta</A> is the fan <Br></Br>760<A>Rays</A> is the <E>ordered</E> list of rays for <A>Delta</A> <Br></Br>761<A>D</A> is the list of coefficients for a Weil divisor.762<Br></Br>763<E>Output</E>: the list of points in <M>P_D \cap L_0^*</M>764which parameterize the elements in the Riemann-Roch space765<M>L(D)</M>, where <M>P_D</M>766is the polytope associated to the divisor <M>D</M>767(see <C>DivisorPolytope</C>).768</Description>769</ManSection>770771<Example>772gap> Div:=[6,6,0];; Rays:=[[2,-1],[-1,2],[-1,-1]];;773gap> Delta0:=[[[2,-1],[-1,2]],[[-1,2],[-1,-1]],[[-1,-1],[2,-1]]];;774gap> P_Div:=DivisorPolytopeLatticePoints(Div,Delta0,Rays);775[ [ -6, -6 ], [ -5, -5 ], [ -5, -4 ], [ -4, -5 ], [ -4, -4 ], [ -4, -3 ],776[ -4, -2 ], [ -3, -4 ], [ -3, -3 ], [ -3, -2 ], [ -3, -1 ], [ -3, 0 ],777[ -2, -4 ], [ -2, -3 ], [ -2, -2 ], [ -2, -1 ], [ -2, 0 ], [ -2, 1 ],778[ -2, 2 ], [ -1, -3 ], [ -1, -2 ], [ -1, -1 ], [ -1, 0 ], [ -1, 1 ],779[ 0, -3 ], [ 0, -2 ], [ 0, -1 ], [ 0, 0 ], [ 1, -2 ], [ 1, -1 ], [ 2, -2 ] ]780</Example>781<!--782Div:=[6,6,0];; Rays:=[[2,-1],[-1,2],[-1,-1]];;783Delta0:=[[[2,-1],[-1,2]],[[-1,2],[-1,-1]],[[-1,-1],[2,-1]]];;784P_Div:=DivisorPolytopeLatticePoints(Div,Delta0,Rays);785-->786787<ManSection>788<Func Name="RiemannRochBasis" Arg=" D, Delta, Rays "/>789790<Description>791<E>Input</E>: <A>Delta</A> is a complete and nonsingular fan <Br></Br>792<A>D</A> is the list of coefficients for the Weil divisor<Br></Br>793<A>Rays</A> is a list of rays for the fan used to describe794the Weil divisors.795<Br></Br>796<E>Output</E>: A basis (a list of monomials)797for the Riemann-Roch space of the divisor represented by <A>D</A>.798</Description>799</ManSection>800801For details on how the Weil divisors can be expressed in terms of802the rays of the fan, please see section 3.3 in803<Cite Key="F93"/>.804805This procedure does not check if the fan is complete and nonsingular.806807<Example>808gap> Div:=[6,6,0];; Rays:=[[2,-1],[-1,2],[-1,-1]];;809gap> Delta0:=[[[2,-1],[-1,2]],[[-1,2],[-1,-1]],[[-1,-1],[2,-1]]];;810gap> RiemannRochBasis(Div,Delta0,Rays);811[ 1/(x_1^6*x_2^6), 1/(x_1^5*x_2^5), 1/(x_1^5*x_2^4), 1/(x_1^4*x_2^5),8121/(x_1^4*x_2^4), 1/(x_1^4*x_2^3), 1/(x_1^4*x_2^2), 1/(x_1^3*x_2^4),8131/(x_1^3*x_2^3), 1/(x_1^3*x_2^2), 1/(x_1^3*x_2), 1/x_1^3, 1/(x_1^2*x_2^4),8141/(x_1^2*x_2^3), 1/(x_1^2*x_2^2), 1/(x_1^2*x_2), 1/x_1^2, x_2/x_1^2,815x_2^2/x_1^2, 1/(x_1*x_2^3), 1/(x_1*x_2^2), 1/(x_1*x_2), 1/x_1, x_2/x_1,8161/x_2^3, 1/x_2^2, 1/x_2, 1, x_1/x_2^2, x_1/x_2, x_1^2/x_2^2 ]817</Example>818<!--819Div:=[6,6,0];; Rays:=[[2,-1],[-1,2],[-1,-1]];;820Delta:=[[[2,-1],[-1,2]],[[-1,2],[-1,-1]],[[-1,-1],[2,-1]]];;821RiemannRochBasis(Div,Delta,Rays);822-->823824</Section>825826<Section>827<Heading>Topological invariants</Heading>828829Throughout this section, <M>X(\Delta)</M> <E>must be non-singular</E>.830831<ManSection>832<Func Name="EulerCharacteristic" Arg=" Delta "/>833834<Description>835<E>Input</E>: <A>Delta</A> is a nonsingular fan of cones,836represented by its list of maximal cones.837<Br></Br>838<E>Output</E>: the Euler characteristic of the toric variety839<M>X(\Delta)</M>, where <M>\Delta</M> is a fan determined by840<A>Delta</A>.841</Description>842</ManSection>843844<Example>845gap> Cones:=[[[2,-1],[-1,2]],[[-1,2],[-1,-1]],[[-1,-1],[2,-1]]];;846gap> EulerCharacteristic(Cones);8473848</Example>849850Note: <M>X(\Delta)</M> <E>must be non-singular</E>851here.852853<ManSection>854<Func Name="BettiNumberToric" Arg=" Delta, k "/>855856<Description>857<E>Input</E>: <A>Delta</A> represents a nonsingular858fan <M>\Delta</M> (represented by maximal cones),859<Br></Br>860<A>k</A> is an integer.861<Br></Br>862<E>Output</E>: the <A>k</A>-th Betti number of the toric variety863<M>X(\Delta)</M>.864865</Description>866</ManSection>867868The <C>BettiNumberToric</C> procedure does not check if869<A>Delta</A> is nonsingular. It is possible that this procedure outputs870nonsense when <A>Delta</A> is not represented by maximal cones or871is nonsingular.872873<Example>874gap> Cones:=[[[2,-1],[-1,2]],[[-1,2],[-1,-1]],[[-1,-1],[2,-1]]];;875gap> BettiNumberToric(Cones,1);8760877gap> BettiNumberToric(Cones,2);8781879gap> Cones:=[[[2,-1],[-1,1]],[[-1,1],[-1,0]],[[-1,0],[2,-1]]];;880gap> BettiNumberToric(Cones,1);8810882gap> BettiNumberToric(Cones,2);8831884</Example>885<!--886The first example is singular, second is nonsingular.887888-->889890Not to be confused with the Betti number of a polycyclically891presented torsion free group, already available in &GAP;.892893</Section>894895<Section>896<Heading>Points over a finite field</Heading>897898899<ManSection>900<Func Name="CardinalityOfToricVariety" Arg=" Cones q "/>901902<Description>903<E>Input</E>: <A>Cones</A> is the list of maximal cones of a904fan <M>\Delta</M>, <A>q</A> is a prime power.905<Br></Br>906<E>Output</E>: The size of the set of <M>GF(q)</M>-rational907points of the toric variety <M>X(\Delta)</M>.908</Description>909</ManSection>910911Note: <M>X(\Delta)</M> <E>must be non-singular</E>912here.913914<Example>915gap> Cones:=[[[2,-1],[-1,2]],[[-1,2],[-1,-1]],[[-1,-1],[2,-1]]];;916gap> CardinalityOfToricVariety(Cones,3);91713918gap> CardinalityOfToricVariety(Cones,4);91921920gap> CardinalityOfToricVariety(Cones,5);92131922gap> CardinalityOfToricVariety(Cones,7);92357924</Example>925<!--926Cones:=[[[2,-1],[-1,2]],[[-1,2],[-1,-1]],[[-1,-1],[2,-1]]];;927CardinalityOfToricVariety(Cones,3);928CardinalityOfToricVariety(Cones,4);929CardinalityOfToricVariety(Cones,5);930CardinalityOfToricVariety(Cones,7);931-->932933</Section>934935</Chapter>936937</Body>938<Bibliography Databases="toric"/>939<TheIndex/>940</Book>941942943