CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

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

Views: 418346
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!DOCTYPE Book SYSTEM "gapdoc.dtd">
3
4
<Book Name="toric">
5
6
<#Include SYSTEM "title.xml">
7
8
<TableOfContents/>
9
10
<Body>
11
12
13
<Chapter><Heading>Introduction</Heading>
14
15
<Section>
16
<Heading>Introduction to the <Package>toric</Package> package</Heading>
17
18
<P/>
19
This manual describes the <Package>toric</Package> package for working with
20
toric varieties in &GAP;. Toric varieties can be dealt
21
with more easily than general varieties since often
22
times questions about a toric variety can be reformulated in terms
23
of combinatorial geometry.
24
25
Some coding theory commands related to toric varieties
26
are contained in the error-correcting codes
27
<Package>GUAVA</Package> package
28
(for example, the command <C>ToricCode</C>).
29
We refer to the <Package>GUAVA</Package> manual
30
<Cite Key="Gua05"/> and the expository
31
paper <Cite Key="JV02"/> for more details.
32
33
<P/>
34
The <Package>toric</Package> package also contains
35
several commands unrelated to toric varieties
36
(mostly for list manipulations).
37
These will not be described in this documention but
38
they are briefly documented in the <C>lib/util.gd</C>
39
file.
40
41
<P/>
42
<Package>toric</Package> is implemented in the &GAP; language,
43
and runs on any system supporting &GAP;4.3 and above.
44
The <Package>toric</Package> package is loaded with the command
45
<Verb> gap> LoadPackage( "toric" ); </Verb>
46
47
<P/>
48
Please send bug reports, suggestions and other comments about
49
<Package>toric</Package> to
50
<Email>[email protected]</Email>.
51
52
</Section>
53
54
<Section>
55
<Heading>Introduction to constructing toric varieties</Heading>
56
57
Rather than sketch the theory of
58
toric varieties, we refer to
59
<Cite Key="JV02"/> and <Cite Key="F93"/> for details.
60
However, we briefly describe some terminology and notation.
61
62
<Subsection>
63
<Heading>Generalities</Heading>
64
65
Let <M>F</M> denote a field and
66
<M>R=F [x_1,...,x_n]</M> be a ring in <M>n</M> variables.
67
A <B>binomial equation</B>
68
in <M>R</M> is one of the form
69
70
<Display>
71
x_1^{k_1}...x_n^{k_n}=x_1^{\ell_1}...x_n^{\ell_n},
72
</Display>
73
where <M>k_i \geq 0,\ \ell_j \geq 0</M> are integers.
74
A binomial variety
75
is a subvariety of affine <M>n</M>-space
76
<M>A_F^n</M> defined by a finite set of binomial
77
equations (such a variety need not be normal).
78
A typical ``toric variety'' is binomial, though they
79
will be introduced via an <E>a priori</E>
80
independent construction.
81
The basic idea of the construction is to
82
replace each such binomial equation as above by a relation in a
83
semigroup contained in a lattice
84
and replace <M>R</M> by the ``group algebra'' of this
85
semigroup. By the way, a toric variety is
86
always normal (see for example, <Cite Key="F93"/>,
87
page 29).
88
89
</Subsection>
90
91
<Subsection>
92
<Heading>Basic combinatorial geometry constructions</Heading>
93
94
Let <M>Q</M> denote the field of rational numbers and <M>Z</M> denote the
95
set of integers. Let <M>n>1</M> denote an integer.
96
97
<P/>
98
Let <Math>V=Q^n</Math> having basis
99
<M>f_1=(1,0,...,0)</M>, ..., <M>f_n=(0,...,0,1)</M>.
100
Let <M>L_0=Z^n\subset V</M> be the standard lattice in <M>V</M>.
101
We identify <M>V</M> and <M>L_0\otimes_{Z} Q</M>.
102
We use <M>\langle\ ,\ \rangle</M> to denote
103
the (standard) inner product on <M>V</M>. Let
104
105
<Display>
106
L_0^*={\rm Hom}(L_0,Z)=\{ v\in V\ |\ \langle v,w \rangle \in Z,
107
\ \forall w\in L_0\}
108
</Display>
109
denote the <B>dual lattice</B>, so (fixing the standard basis
110
<M>e_1^*</M>,...,<M>e_n^*</M> dual to the <M>f_1</M>,...,<M>f_n</M>)
111
<M>L_0^*</M> may be identified with <M>Z^n</M>.
112
113
<P/>
114
A <B>cone</B> in <M>V</M> is a set <M>\sigma</M> of the form
115
116
<Display>
117
\sigma=\{a_1v_1+...+a_mv_m\ |\ a_i\geq 0\}\subset V,
118
</Display>
119
where <M>v_1,...,v_m \in V</M> is a given collection of
120
vectors, called (semigroup) <B>generators</B> of <M>\sigma</M>.
121
A <B>rational cone</B> is one where <M>v_1,...,v_m \in L_0</M>.
122
A <B>strongly convex</B> cone is one which contains
123
no lines through the origin.
124
125
<P/>
126
<E>
127
By abuse of terminology, from now on
128
a <B>cone</B> of <M>L_0</M> is a strongly convex rational cone.
129
</E>
130
<Index>cone</Index>
131
<P/>
132
A <B>face</B> of a cone <M>\sigma</M> is either <M>\sigma</M>
133
itself or a subset of the form <M>H\cap \sigma</M>,
134
where <M>H</M> is a codimension one subspace of <M>V</M>
135
which intersects the cone non-trivially and such that the cone
136
is contained in exactly one of the two half-spaces determined by
137
<M>H</M>. A <B>ray</B> (or edge) of a cone is a one-dimensional face.
138
<Index>ray</Index>
139
Typically, cones are represented in <Package>toric</Package>
140
by the list of vectors defining their rays.
141
The <B>dimension</B> of a cone is the dimension of the
142
vector space it spans.
143
The <Package>toric</Package> package can test if a
144
given vector is in a given cone (see <C>InsideCone</C>).
145
146
<P/>
147
If <M>\sigma</M> is a cone then the <B>dual cone</B> is defined by
148
149
<Display>
150
\sigma^* =\{w \in L_0^*\otimes Q
151
\ |\ \langle v,w \rangle \geq 0,\ \forall v\in \sigma\}.
152
</Display>
153
The <Package>toric</Package> package can test if a
154
vector is in the dual of a given cone (see <C>InDualCone</C>).
155
<Index>dual cone</Index>
156
157
<P/>
158
Associate to the dual cone <M>\sigma^*</M> is the semigroup
159
160
<Display>
161
S_\sigma =\sigma^*\cap L_0^*
162
=\{w\in L_0^*
163
\ |\ \langle v,w\rangle \geq 0,\
164
\forall v\in \sigma\}.
165
</Display>
166
Though <M>L_0^*</M> has $n$ generators <E>as a lattice</E>,
167
typically <M>S_\sigma</M> will have more than <M>n</M>
168
generators <E>as a semigroup</E>.
169
The <Package>toric</Package> package can compute a
170
minimal list of semigroup generators of <M>S_\sigma</M>
171
(see <C>DualSemigroupGenerators</C>).
172
<Index>semigroup associated to cone</Index>
173
174
<P/>
175
A fan is a collection of cones which ``fit together'' well.
176
177
A <B>fan</B> in <M>L_0</M> is a set
178
<M>\Delta=\{\sigma \}</M> of rational strongly convex
179
cones in <M>V= L_0 \otimes Q</M>
180
such that
181
182
<List>
183
184
<Item>
185
if <M>\sigma \in \Delta</M> and <M>\tau \subset \sigma</M> is a face
186
of <M>\sigma</M> then <M>\tau \in \Delta</M>,
187
</Item>
188
189
<Item>
190
if <M>\sigma_1, \sigma_2 \in \Delta</M> then
191
the intersection <M>\sigma_1 \cap \sigma_2</M> is a face of
192
both <M>\sigma_1</M> and <M>\sigma_2</M> (and hence
193
belongs to <M>\Delta</M>).
194
</Item>
195
</List>
196
In particular, the face of a cone in a fan is a cone is the fan.
197
<P/>
198
If <M>V</M> is the (set-theoretic) union of the
199
cones in <M>\Delta</M> then we call the fan <B>complete</B>.
200
We shall assume that all fans are finite.
201
A fan is determined by its list of maximal cones.
202
<Index>fan</Index>
203
204
<P/>
205
<E>Notation</E>: A fan <M>\Delta</M> is represented in
206
<Package>toric</Package> as a set of maximal cones.
207
For example, if <M>\Delta</M> is the fan with maximal cones
208
<M>\sigma_1=Q_+\cdot f_1+Q_+\cdot (-f_1+f_2)</M>,
209
<M>\sigma_2=Q_+\cdot (-f_1+f_2)+Q_+\cdot (-f_1-f_2)</M>,
210
<M>\sigma_3=Q_+\cdot (-f_1-f_2)+Q_+\cdot f_1</M>,
211
then <M>\Delta</M> is represented by
212
<M>[[[1,0],[-1,1]],[[-1,1],[-1,-1]],[[-1,-1],[1,0]]]</M>.
213
214
<P/>
215
The <Package>toric</Package> package can compute all cones
216
in a fan of a given dimension (see <C>ConesOfFan</C>).
217
Moreover, <Package>toric</Package> can compute
218
the set of all normal vectors to the faces (i.e., hyperplanes)
219
of a cone (see <C>Faces</C>).
220
221
<P/>
222
The <B>star</B> of a cone <M>\sigma</M> in a
223
fan <M>\Delta</M> is the set <M>\Delta_\sigma</M>
224
of cones in <M>\Delta</M> containing <M>\sigma</M> as a face.
225
The <Package>toric</Package> package can compute stars
226
(see <C>ToricStar</C>).
227
<Index>star</Index>
228
229
<P/>
230
231
</Subsection>
232
233
<Subsection>
234
<Heading>Basic affine toric variety constructions</Heading>
235
236
Let
237
<Display>
238
R_\sigma = F [S_\sigma]
239
</Display>
240
denote the ``group algebra'' of this semigroup. It is a
241
finitely generated commutative F-algebra.
242
It is in fact integrally closed (<Cite Key="F93"/>, page 29).
243
We may interprete <M>R_\sigma</M> as a subring of
244
<M>R=F [x_1,...,x_n]</M> as follows: First,
245
identify each <M>e_i^*</M> with the variable <M>x_i</M>.
246
If <M>S_\sigma</M> is generated as a semigroup by
247
vectors of the form <M>\ell_1 e_1^*+...+\ell_n e_n^*</M>,
248
where <M>\ell_i</M> is an integer, then its image in
249
<M>R</M> is generated by monomials of the
250
form <M>x_1^{\ell_1}\dots x_n^{\ell_n}</M>.
251
The <Package>toric</Package> package can compute these
252
generating monomials (see <C>EmbeddingAffineToricVariety</C>).
253
See Lemma 2.14 in <Cite Key="JV02"/> for more details.
254
This embedding can also be used to resolve singularities -
255
see section 5 of <Cite Key="JV02"/> for more details.
256
257
<P/>
258
Let
259
<Display>
260
U_\sigma={\rm Spec}\ R_\sigma.
261
</Display>
262
This defines an <B>affine toric variety</B> (associated
263
to <M>\sigma</M>). It is known that the coordinate ring
264
<M>R_\sigma</M> of the affine toric variety <M>U_\sigma</M>
265
has the form <M>R_\sigma = F[x_1,...,x_n]/J</M>, where <M>J</M>
266
is an ideal. The <Package>toric</Package> package can compute
267
generators of this ideal by using the <C>DualSemigroupGenerators</C>
268
and the <C>EmbeddingAffineToricVariety</C>
269
commands.
270
<Index>affine toric variety</Index>
271
272
<P/>
273
Roughly speaking, the toric variety <M>X(\Delta)</M> associated to
274
the fan <M>\Delta</M> is given by a collection of affine
275
pieces $U_{\sigma_1},U_{\sigma_2},\dots,U_{\sigma_d}$
276
which ``glue'' together (where <M>\Delta = \{\sigma_i\}</M>).
277
The affine pieces are given by the zero
278
sets of polynomial equations in some affine spaces
279
and the gluings are given by maps
280
<M>\phi_{i,j} : U_{\sigma_i} \rightarrow U_{\sigma_j}</M>
281
which are defined by ratios of polynomials on open subsets of the
282
$U_{\sigma_i}$.
283
The <Package>toric</Package> package does <E>not</E>
284
compute these gluings or work directly with these
285
(non-affine) varieties <M>X(\Delta)</M>.
286
287
<P/>
288
A cone <M>\sigma \subset V</M> is said to be <B>nonsingular</B> if
289
it is generated by part of a basis for the lattice <M>L_0</M>.
290
A fan <M>\Delta</M> of cones is said to be <B>nonsingular</B> if
291
all its cones are nonsingular. It is known that <M>U_\sigma</M>
292
is nonsingular if and only if <M>\sigma</M> is nonsingular
293
(Proposition 2.1 in <Cite Key="F93"/>).
294
<Index>cone, nonsingular</Index>
295
296
<P/>
297
<B>Example:</B>
298
In three dimensions, consider the cones
299
<M>\sigma_{\epsilon_1,\epsilon_2,\epsilon_3,i,j}</M>
300
generated by <M>(\epsilon_1\cdot 1,\epsilon_2\cdot 1,\epsilon_3\cdot 1)</M>
301
and the standard basis vectors <M>f_i,f_j</M>,
302
where <M>\epsilon_i=\pm 1</M> and
303
<M>1\leq i\not= j\leq 3</M>. There are 8 cones per octant,
304
for a total of 64 cones. Let <M>\Delta</M> denote the
305
fan in <M>V=Q^3</M> determined by these maximal cones.
306
The toric variety <M>X(\Delta)</M> is nonsingular.
307
<P/>
308
309
</Subsection>
310
311
<Subsection>
312
<Heading>Riemann-Roch spaces and related constructions</Heading>
313
314
Although the <Package>toric</Package> package does not
315
work directly with the toric varieties <M>X(\Delta)</M>,
316
it can compute objects associated with it.
317
For example, it can compute the
318
Euler characteristic (see <C>EulerCharacteristic</C>), Betti numbers
319
(see <C>BettiNumberToric</C>), and the
320
number of GF(q)-rational points
321
(see <C>CardinalityOfToricVariety</C>) of <M>X(\Delta)</M>,
322
<E> provided <M>\Delta</M> is nonsingular.</E>
323
324
<P/>
325
For an algebraic variety <M>X</M> the group of <B>Weil divisors</B>
326
on <M>X</M> is
327
the abelian group <M>Div(X)</M> generated (additively) by the
328
irreducible subvarieties of X of codimension <M>1</M>.
329
For a toric variety <M>X(\Delta)</M> with dense open torus <M>T</M>, a Weil divisor
330
D is <B>T-invariant</B> if <M>D=T\cdot D</M>.
331
The group of <M>T</M>-invariant Weil divisors is denoted
332
<M>TDiv(X)</M>. This is finitely generated by an explicitly
333
given finite set of divisors
334
<M>\{D_1,...,D_r\}</M> which correspond naturally to certain
335
cones in <M>\Delta</M> (see <Cite Key="F93"/> for details).
336
In particular, we may represent such a divisor <M>D</M> in <M>TDiv(X)</M>
337
by an <M>k</M>-tuple <M>(d_1,...,d_k)</M> of integers.
338
<Index>Weil divisors</Index>
339
340
<P/>
341
Let <M>\Delta</M> denote a fan in <M>V=Q^n</M> with rays (or edges)
342
<M>\tau_i</M>, <M>1\leq i\leq k</M>, and let
343
<M>v_i</M> denote the first lattice point on <M>\tau_i</M>.
344
Associated to the T-invariant Weil divisor <M>D=d_1D_1+...+d_kD_k</M>,
345
is the <B>polytope</B>
346
<Display>
347
P_D = \{ x=(x_1,...,x_n)\ |\ \langle x,v_i \rangle \geq -d_i,
348
\ \forall 1 \leq i \leq k\}.
349
</Display>
350
The <Package>toric</Package> package can compute
351
<M>P_D</M> (see <C>DivisorPolytope</C>), as well as the set of all
352
lattice points contained in this polytope
353
(see <C>DivisorPolytopeLatticePoints</C>).
354
Also associated to the <M>T</M>-invariant Weil divisor
355
<M>D=d_1D_1+...+d_kD_k</M>, is the Riemann-Roch space,
356
<M>L(D)</M>. This is a space of functions on
357
<M>X(\Delta)</M> whose zeros and poles are
358
``controlled'' by <M>D</M> (for a more precise definition, see
359
<Cite Key="F93"/>). The <Package>toric</Package> package can compute
360
a basis for <M>L(D)</M> (see <C>RiemannRochBasis</C>),
361
<E> provided <M>\Delta</M> is complete and nonsingular.</E>
362
<Index>polytope associated to divisor</Index>
363
364
</Subsection>
365
</Section>
366
367
</Chapter>
368
369
<Chapter>
370
<Heading>Cones and semigroups</Heading>
371
372
373
<Section>
374
<Heading>Cones</Heading>
375
376
This section introduces the <Package>toric</Package>
377
commands which deal with cones and related
378
combinatorial-geometric objects.
379
380
Recall, a <B>cone</B> is a strongly convex polyhedral
381
cone (<Cite Key="F93"/>, page 4).
382
383
<ManSection Label="InsideCone">
384
<Func Name="InsideCone" Arg=" v, L "/>
385
386
<Description>
387
This command returns `true` if the vector <A>v</A> belongs to the interior
388
of the (strongly convex polyhedral)
389
cone generated by the vectors in <A>L</A>.
390
</Description>
391
</ManSection>
392
393
This procedure does not check if <A>L</A> generates a
394
strongly convex polyhedral cone.
395
396
<Example>
397
gap> L:=[[1,0,0],[1,1,0],[1,1,1],[1,0,1]];; v:=[0,0,1];;
398
gap> InsideCone(v,L);
399
false
400
gap> L:=[[1,0],[3,4]];;
401
gap> v:=[1,-7]; InsideCone(v,L);
402
[ 1, -7 ]
403
false
404
gap> v:=[4,-3]; InsideCone(v,L);
405
[ 4, -3 ]
406
false
407
gap> v:=[4,-4]; InsideCone(v,L);
408
[ 4, -4 ]
409
false
410
gap> v:=[4,1]; InsideCone(v,L);
411
[ 4, 1 ]
412
true
413
</Example>
414
<!--
415
L:=[[1,0,0],[1,1,0],[1,1,1],[1,0,1]];;
416
v:=[0,0,1];;
417
InsideCone(v,L);
418
false
419
L:=[[1,0],[3,4]];;
420
v:=[1,-7]; InsideCone(v,L);
421
v:=[4,-3]; InsideCone(v,L);
422
v:=[4,-4]; InsideCone(v,L);
423
v:=[4,1]; InsideCone(v,L);
424
-->
425
426
<ManSection Label="InDualCone">
427
<Func Name="InDualCone" Arg=" v, L "/>
428
429
<Description>
430
This command
431
returns `true` if <A>v</A> belongs to the dual of the cone generated by
432
the vectors in <A>L</A>.
433
</Description>
434
</ManSection>
435
436
<Example>
437
gap> L:=[[1,0,0],[1,1,0],[1,1,1],[1,0,1]];; v:=[0,0,1];;
438
gap> InDualCone(v,L);
439
true
440
gap> L:=[[1,0],[3,4]];
441
[ [ 1, 0 ], [ 3, 4 ] ]
442
gap> v:=[1,-7]; InDualCone(v,L);
443
[ 1, -7 ]
444
false
445
gap> v:=[4,-3]; InDualCone(v,L);
446
[ 4, -3 ]
447
true
448
gap> v:=[4,-4]; InDualCone(v,L);
449
[ 4, -4 ]
450
false
451
gap> v:=[4,1]; InDualCone(v,L);
452
[ 4, 1 ]
453
true
454
</Example>
455
<!--
456
L:=[[1,0,0],[1,1,0],[1,1,1],[1,0,1]];; v:=[0,0,1];;
457
InDualCone(v,L);
458
L:=[[1,0],[3,4]];
459
v:=[1,-7]; InDualCone(v,L);
460
v:=[4,-3]; InDualCone(v,L);
461
v:=[4,-4]; InDualCone(v,L);
462
v:=[4,1]; InDualCone(v,L);
463
-->
464
465
<ManSection>
466
<Func Name="PolytopeLatticePoints" Arg=" A, Perps "/>
467
468
<Description>
469
<E>Input</E>: <A>Perps</A><M>=[v_1,...,v_k]</M> is the list of ``inward normal"
470
vectors perpendicular to the walls of a polytope <M>P</M> in the
471
vector space <M>L_0^*\otimes Q</M>,
472
<Br></Br>
473
<A>A</A><M>=[a_1,...,a_k]</M> is a k-tuple of integers, where
474
<M>a_i</M> denotes the amount the i-th ``wall" (defined by the normal <M>v_i</M>)
475
is shifted from the origin (each <M>a_i</M> is assumed non-negative).
476
<Br></Br>
477
For example, the polytope <M>P</M> with faces
478
<C>[x=0, x=a, y=0, y=b]</C>
479
has <A>Perps</A><M>=[[1,0],[-1,0],[0,1],[0,-1]]</M> and <A>A</A><M>=[0,a,0,b]</M>.
480
<Br></Br>
481
<E>Output</E>: the list of points in <M>P \cap L_0^*</M>.
482
</Description>
483
</ManSection>
484
485
<Example>
486
gap> Perps:=[[1,0],[-1,0],[0,1],[0,-1]];
487
[ [ 1, 0 ], [ -1, 0 ], [ 0, 1 ], [ 0, -1 ] ]
488
gap> A:=[0,4,0,3];
489
[ 0, 4, 0, 3 ]
490
gap> PolytopeLatticePoints(A,Perps);
491
[ [ 0, 0 ], [ 0, 1 ], [ 0, 2 ], [ 0, 3 ], [ 1, 0 ], [ 1, 1 ], [ 1, 2 ],
492
[ 1, 3 ], [ 2, 0 ], [ 2, 1 ], [ 2, 2 ], [ 2, 3 ], [ 3, 0 ], [ 3, 1 ],
493
[ 3, 2 ], [ 3, 3 ], [ 4, 0 ], [ 4, 1 ], [ 4, 2 ], [ 4, 3 ] ]
494
gap> Length(last);
495
20
496
</Example>
497
<!--
498
Perps:=[[1,0],[-1,0],[0,1],[0,-1]];
499
A:=[0,4,0,3];
500
PolytopeLatticePoints(A,Perps);
501
Length(last);
502
-->
503
504
<ManSection>
505
<Func Name="Faces" Arg=" Rays "/>
506
507
<Description>
508
<E>Input</E>: <A>Rays</A> is a list of rays for the fan <M>\Delta</M>
509
<Br></Br>
510
<E>Output</E>: All the normals to the faces (hyperplanes of the cone).
511
</Description>
512
513
</ManSection>
514
515
<Example>
516
gap> Cones1:=[[[2,-1],[-1,2]],[[-1,2],[-1,-1]],[[-1,-1],[2,-1]]];;
517
gap> Faces(Cones1[1]);
518
[ [ 1/2, 1 ], [ 2, 1 ] ]
519
gap> Faces(Cones1[2]);
520
[ [ -2, -1 ], [ -1, 1 ] ]
521
gap> Cones2:=[[[ 2,0,0],[0,2,0],[0,0,2]], [[2,0,0], [0,2,0], [2,-2,1],[1,2,-2]]];;
522
gap> Faces(Cones2[1]);
523
[ [ 0, 0, 1 ], [ 0, 1, 0 ], [ 1, 0, 0 ] ]
524
gap> Faces(Cones2[2]);
525
[ [ 1/3, 5/6, 1 ], [ 1/2, 0, -1 ], [ 2, 0, 1 ] ]
526
</Example>
527
<!--
528
Cones1:=[[[2,-1],[-1,2]],[[-1,2],[-1,-1]],[[-1,-1],[2,-1]]];;
529
Faces(Cones1[1]);
530
Faces(Cones1[2]);
531
Cones2:=[[[ 2,0,0],[0,2,0],[0,0,2]], [[2,0,0], [0,2,0], [2,-2,1],[1,2,-2]]];;
532
Faces(Cones2[1]);
533
Faces(Cones2[2]);
534
-->
535
536
537
538
<ManSection>
539
<Func Name="ConesOfFan" Arg=" Delta k "/>
540
541
<Description>
542
<E>Input</E>: <A>Delta</A> is the fan of cones,
543
<Br></Br>
544
<A>k</A> is the dimension of the cones desired.
545
<Br></Br>
546
<E>Output</E>: The <A>k</A>-dimensional cones in the fan.
547
</Description>
548
549
</ManSection>
550
551
552
553
<ManSection>
554
<Func Name="NumberOfConesOfFan" Arg=" Delta k "/>
555
556
<Description>
557
<E>Input</E>: <A>Delta</A> is the fan of cones in <M>V=Q^n</M>,
558
<Br></Br>
559
<A>k</A> is the dimension of the cones counted.
560
<Br></Br>
561
<E>Output</E>: The number of <A>k</A>-dimensional cones in the fan.
562
</Description>
563
</ManSection>
564
565
Idea: The fan <A>Delta</A> is represented as a set of maximal cones.
566
For each maximal cone, look at the <A>k</A>-dimensional faces
567
obtained by taking <M>n</M> choose <A>k</A> subsets of the
568
rays describing the cone. Certain of these <A>k</A>-subsets
569
yield the desired cones.
570
571
<Example>
572
gap> Delta0:=[ [ [2,0,0],[0,2,0],[0,0,2] ], [ [2,0,0],[0,2,0],[2,-2,1],[1,2,-2] ] ];;
573
gap> NumberOfConesOfFan(Delta0,2);
574
6
575
gap> ConesOfFan(Delta0,2);
576
[ [ [ 0, 0, 2 ], [ 0, 2, 0 ] ], [ [ 0, 0, 2 ], [ 2, 0, 0 ] ],
577
[ [ 0, 2, 0 ], [ 1, 2, -2 ] ], [ [ 0, 2, 0 ], [ 2, -2, 1 ] ],
578
[ [ 0, 2, 0 ], [ 2, 0, 0 ] ], [ [ 1, 2, -2 ], [ 2, -2, 1 ] ] ]
579
gap> ConesOfFan(Delta0,1);
580
[ [ [ 0, 0, 2 ] ], [ [ 0, 2, 0 ] ], [ [ 1, 2, -2 ] ],
581
[ [ 2, -2, 1 ] ], [ [ 2, 0, 0 ] ] ]
582
gap> NumberOfConesOfFan(Delta0,1);
583
5
584
</Example>
585
<!--
586
Delta0:=[ [ [2,0,0],[0,2,0],[0,0,2] ], [ [2,0,0],[0,2,0],[2,-2,1],[1,2,-2] ] ];;
587
NumberOfConesOfFan(Delta0,2);
588
ConesOfFan(Delta0,2);
589
ConesOfFan(Delta0,1);
590
NumberOfConesOfFan(Delta0,1);
591
592
-->
593
594
595
<ManSection>
596
<Func Name="ToricStar" Arg=" sigma, Delta "/>
597
598
<Description>
599
<E>Input</E>: <A>sigma</A> is a cone in the fan,
600
represented by its set of maximal (i.e., highest dimensional) cones.
601
<Br></Br>
602
<A>Delta</A> is the fan of cones in <M>V=Q^n</M>.
603
<Br></Br>
604
<E>Output</E>: The star of the cone <A>sigma</A> in <A>Delta</A>,
605
i.e., the cones <M>\tau</M> which have <A>sigma</A> as a face.
606
607
</Description>
608
609
</ManSection>
610
611
<Example>
612
gap> MaxCones:=[ [ [2,0,0],[0,2,0],[0,0,2] ],
613
> [ [2,0,0],[0,2,0],[2,-2,1],[1,2,-2] ] ];;
614
gap> #this is the set of maximal cones in the fan Delta
615
gap> ToricStar([[1,0]],MaxCones);
616
[ ]
617
gap> ToricStar([[2,0,0],[0,2,0]],MaxCones);
618
[ [ [ 0, 2, 0 ], [ 2, 0, 0 ] ], [ [ 2, 0, 0 ], [ 0, 2, 0 ], [ 0, 0, 2 ] ],
619
[ [ 2, 0, 0 ], [ 0, 2, 0 ], [ 2, -2, 1 ], [ 1, 2, -2 ] ] ]
620
gap> MaxCones:=[ [ [2,0,0],[0,2,0],[0,0,2] ], [ [2,0,0],[0,2,0],[1,1,-2] ] ];;
621
gap> ToricStar([[2,0,0],[0,2,0]],MaxCones);
622
[ [ [ 0, 2, 0 ], [ 2, 0, 0 ] ], [ [ 2, 0, 0 ], [ 0, 2, 0 ], [ 0, 0, 2 ] ],
623
[ [ 2, 0, 0 ], [ 0, 2, 0 ], [ 1, 1, -2 ] ] ]
624
gap> ToricStar([[1,0]],MaxCones);
625
[ ]
626
</Example>
627
<!--
628
MaxCones:=[ [ [2,0,0],[0,2,0],[0,0,2] ], [ [2,0,0],[0,2,0],[2,-2,1],[1,2,-2] ] ];;
629
ToricStar([[1,0]],MaxCones);
630
ToricStar([[2,0,0],[0,2,0]],MaxCones);
631
MaxCones:=[ [ [2,0,0],[0,2,0],[0,0,2] ], [ [2,0,0],[0,2,0],[1,1,-2] ] ];;
632
ToricStar([[2,0,0],[0,2,0]],MaxCones);
633
ToricStar([[1,0]],MaxCones);
634
-->
635
636
</Section>
637
638
<Section>
639
<Heading>Semigroups</Heading>
640
641
<ManSection>
642
<Func Name="DualSemigroupGenerators" Arg=" L "/>
643
644
<Description>
645
<E>Input</E>: <A>L</A> is a list of integral <M>n</M>-vectors generating a
646
cone <M>\sigma</M>.
647
<Br></Br>
648
<E>Output</E>: the generators of <M>S_\sigma</M>,
649
<P/>
650
Idea: let <M>M</M> be the maximum of the absolute values of the
651
coordinates of the <A>L</A>[i]'s, for each vector <M>v</M> in
652
<M>[1..M]^n</M>, test if <M>v</M> is in the dual cone
653
<M>\sigma^*</M>. If so,
654
add <M>v</M> to list of possible generators.
655
Once this for loop is finished, one can check
656
this list for redundant generators. The
657
trick is to simply omit those elements
658
which are of the form <M>d_1+d_2</M>, where <M>d_1</M> and <M>d_2</M>
659
are ``small" elements in the integral dual cone.
660
<P/>
661
This program is not very efficient and should not be used
662
in ``large examples'' involving semigroups with ``many'' generators.
663
For example, if you take
664
<A>L:=[[1,2,3,4],[0,1,0,7],[3,1,0,2],[0,0,1,0]];</A> then
665
<C>DualSemigroupGenerators(L);</C> can exhaust GAP's memory
666
allocation.
667
</Description>
668
</ManSection>
669
670
<Example>
671
gap> L:=[[1,0],[3,4]];; DualSemigroupGenerators([[1,0],[3,4]]);
672
[ [ 0, 0 ], [ 0, 1 ], [ 1, 0 ], [ 2, -1 ], [ 3, -2 ], [ 4, -3 ] ]
673
gap> L:=[[1,0,0],[1,1,0],[1,1,1],[1,0,1]];;
674
gap> DualSemigroupGenerators(L);
675
[ [ 0, 0, 0 ], [ 0, 0, 1 ], [ 0, 1, 0 ], [ 1, -1, 0 ], [ 1, 0, -1 ] ]
676
</Example>
677
<!--
678
L:=[[1,0],[3,4]];; DualSemigroupGenerators([[1,0],[3,4]]);
679
L:=[[1,0,0],[1,1,0],[1,1,1],[1,0,1]];;
680
DualSemigroupGenerators(L);
681
-->
682
683
</Section>
684
685
</Chapter>
686
687
<Chapter>
688
<Heading>Affine toric varieties</Heading>
689
690
This chapter concerns <Package>toric</Package>
691
commands which deal with the coordinate rings of
692
affine toric varieties <M>U_\sigma</M>.
693
694
<Section>
695
<Heading>Ideals defining affine toric varieties</Heading>
696
697
<ManSection>
698
<Func Name="EmbeddingAffineToricVariety" Arg=" L "/>
699
700
<Description>
701
<E>Input</E>: <A>L</A> is a list generating a cone
702
(as in <C>DualSemigroupGenerators</C>).
703
<Br></Br>
704
<E>Output</E>: the toroidal embedding of <M>X=Spec(I)</M>, where I is the
705
ideal of the affine toric variety (given as a list of multinomials).
706
</Description>
707
</ManSection>
708
709
<Example>
710
gap> phi:=EmbeddingAffineToricVariety([[1,0],[3,4]]);
711
[ x_2, x_1, x_1^2/x_4, x_1^3/x_4^2, x_1^4/x_4^3 ]
712
gap> L:=[[1,0,0],[1,1,0],[1,1,1],[1,0,1]];;
713
gap> phi:=EmbeddingAffineToricVariety(L);
714
[ x_3, x_2, x_1/x_5, x_1/x_6 ]
715
</Example>
716
717
718
</Section>
719
</Chapter>
720
721
<Chapter>
722
<Heading>Toric varieties <M>X(\Delta)</M> </Heading>
723
724
This chapter concerns <Package>toric</Package>
725
commands which deal with certain objects associated to the
726
(non-affine) toric varieties <M>X(\Delta)</M>.
727
728
<Section>
729
<Heading>Riemann-Roch spaces</Heading>
730
731
Let <M>\Delta</M> denote a complete nonsingular fan.
732
733
<ManSection>
734
<Func Name="DivisorPolytope" Arg=" D, Rays "/>
735
736
<Description>
737
<E>Input</E>: <A>Rays</A> is the list of smallest integer
738
vectors in the rays for the fan <M>\Delta</M>
739
which determine the Weil divisors of <M>X(\Delta)</M>.
740
<Br></Br>
741
<A>D</A> is the list of coefficients for the a Weil divisor.
742
<Br></Br>
743
<E>Output</E>: the linear expressions in the affine coordinates of the
744
space of the cone which must be positive for a point to be in the
745
desired polytope.
746
</Description>
747
</ManSection>
748
749
<Example>
750
gap> DivisorPolytope([6,6,0],[[2,-1],[-1,2],[-1,-1]]);
751
[ 2*x_1-x_2+6, -x_1+2*x_2+6, -x_1-x_2 ]
752
</Example>
753
754
See also Example 6.13 in <Cite Key="JV02"/>.
755
756
<ManSection>
757
<Func Name="DivisorPolytopeLatticePoints" Arg=" D, Delta, Rays "/>
758
759
<Description>
760
<E>Input</E>: <A>Delta</A> is the fan <Br></Br>
761
<A>Rays</A> is the <E>ordered</E> list of rays for <A>Delta</A> <Br></Br>
762
<A>D</A> is the list of coefficients for a Weil divisor.
763
<Br></Br>
764
<E>Output</E>: the list of points in <M>P_D \cap L_0^*</M>
765
which parameterize the elements in the Riemann-Roch space
766
<M>L(D)</M>, where <M>P_D</M>
767
is the polytope associated to the divisor <M>D</M>
768
(see <C>DivisorPolytope</C>).
769
</Description>
770
</ManSection>
771
772
<Example>
773
gap> Div:=[6,6,0];; Rays:=[[2,-1],[-1,2],[-1,-1]];;
774
gap> Delta0:=[[[2,-1],[-1,2]],[[-1,2],[-1,-1]],[[-1,-1],[2,-1]]];;
775
gap> P_Div:=DivisorPolytopeLatticePoints(Div,Delta0,Rays);
776
[ [ -6, -6 ], [ -5, -5 ], [ -5, -4 ], [ -4, -5 ], [ -4, -4 ], [ -4, -3 ],
777
[ -4, -2 ], [ -3, -4 ], [ -3, -3 ], [ -3, -2 ], [ -3, -1 ], [ -3, 0 ],
778
[ -2, -4 ], [ -2, -3 ], [ -2, -2 ], [ -2, -1 ], [ -2, 0 ], [ -2, 1 ],
779
[ -2, 2 ], [ -1, -3 ], [ -1, -2 ], [ -1, -1 ], [ -1, 0 ], [ -1, 1 ],
780
[ 0, -3 ], [ 0, -2 ], [ 0, -1 ], [ 0, 0 ], [ 1, -2 ], [ 1, -1 ], [ 2, -2 ] ]
781
</Example>
782
<!--
783
Div:=[6,6,0];; Rays:=[[2,-1],[-1,2],[-1,-1]];;
784
Delta0:=[[[2,-1],[-1,2]],[[-1,2],[-1,-1]],[[-1,-1],[2,-1]]];;
785
P_Div:=DivisorPolytopeLatticePoints(Div,Delta0,Rays);
786
-->
787
788
<ManSection>
789
<Func Name="RiemannRochBasis" Arg=" D, Delta, Rays "/>
790
791
<Description>
792
<E>Input</E>: <A>Delta</A> is a complete and nonsingular fan <Br></Br>
793
<A>D</A> is the list of coefficients for the Weil divisor<Br></Br>
794
<A>Rays</A> is a list of rays for the fan used to describe
795
the Weil divisors.
796
<Br></Br>
797
<E>Output</E>: A basis (a list of monomials)
798
for the Riemann-Roch space of the divisor represented by <A>D</A>.
799
</Description>
800
</ManSection>
801
802
For details on how the Weil divisors can be expressed in terms of
803
the rays of the fan, please see section 3.3 in
804
<Cite Key="F93"/>.
805
806
This procedure does not check if the fan is complete and nonsingular.
807
808
<Example>
809
gap> Div:=[6,6,0];; Rays:=[[2,-1],[-1,2],[-1,-1]];;
810
gap> Delta0:=[[[2,-1],[-1,2]],[[-1,2],[-1,-1]],[[-1,-1],[2,-1]]];;
811
gap> RiemannRochBasis(Div,Delta0,Rays);
812
[ 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),
813
1/(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),
814
1/(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),
815
1/(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,
816
x_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,
817
1/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 ]
818
</Example>
819
<!--
820
Div:=[6,6,0];; Rays:=[[2,-1],[-1,2],[-1,-1]];;
821
Delta:=[[[2,-1],[-1,2]],[[-1,2],[-1,-1]],[[-1,-1],[2,-1]]];;
822
RiemannRochBasis(Div,Delta,Rays);
823
-->
824
825
</Section>
826
827
<Section>
828
<Heading>Topological invariants</Heading>
829
830
Throughout this section, <M>X(\Delta)</M> <E>must be non-singular</E>.
831
832
<ManSection>
833
<Func Name="EulerCharacteristic" Arg=" Delta "/>
834
835
<Description>
836
<E>Input</E>: <A>Delta</A> is a nonsingular fan of cones,
837
represented by its list of maximal cones.
838
<Br></Br>
839
<E>Output</E>: the Euler characteristic of the toric variety
840
<M>X(\Delta)</M>, where <M>\Delta</M> is a fan determined by
841
<A>Delta</A>.
842
</Description>
843
</ManSection>
844
845
<Example>
846
gap> Cones:=[[[2,-1],[-1,2]],[[-1,2],[-1,-1]],[[-1,-1],[2,-1]]];;
847
gap> EulerCharacteristic(Cones);
848
3
849
</Example>
850
851
Note: <M>X(\Delta)</M> <E>must be non-singular</E>
852
here.
853
854
<ManSection>
855
<Func Name="BettiNumberToric" Arg=" Delta, k "/>
856
857
<Description>
858
<E>Input</E>: <A>Delta</A> represents a nonsingular
859
fan <M>\Delta</M> (represented by maximal cones),
860
<Br></Br>
861
<A>k</A> is an integer.
862
<Br></Br>
863
<E>Output</E>: the <A>k</A>-th Betti number of the toric variety
864
<M>X(\Delta)</M>.
865
866
</Description>
867
</ManSection>
868
869
The <C>BettiNumberToric</C> procedure does not check if
870
<A>Delta</A> is nonsingular. It is possible that this procedure outputs
871
nonsense when <A>Delta</A> is not represented by maximal cones or
872
is nonsingular.
873
874
<Example>
875
gap> Cones:=[[[2,-1],[-1,2]],[[-1,2],[-1,-1]],[[-1,-1],[2,-1]]];;
876
gap> BettiNumberToric(Cones,1);
877
0
878
gap> BettiNumberToric(Cones,2);
879
1
880
gap> Cones:=[[[2,-1],[-1,1]],[[-1,1],[-1,0]],[[-1,0],[2,-1]]];;
881
gap> BettiNumberToric(Cones,1);
882
0
883
gap> BettiNumberToric(Cones,2);
884
1
885
</Example>
886
<!--
887
The first example is singular, second is nonsingular.
888
889
-->
890
891
Not to be confused with the Betti number of a polycyclically
892
presented torsion free group, already available in &GAP;.
893
894
</Section>
895
896
<Section>
897
<Heading>Points over a finite field</Heading>
898
899
900
<ManSection>
901
<Func Name="CardinalityOfToricVariety" Arg=" Cones q "/>
902
903
<Description>
904
<E>Input</E>: <A>Cones</A> is the list of maximal cones of a
905
fan <M>\Delta</M>, <A>q</A> is a prime power.
906
<Br></Br>
907
<E>Output</E>: The size of the set of <M>GF(q)</M>-rational
908
points of the toric variety <M>X(\Delta)</M>.
909
</Description>
910
</ManSection>
911
912
Note: <M>X(\Delta)</M> <E>must be non-singular</E>
913
here.
914
915
<Example>
916
gap> Cones:=[[[2,-1],[-1,2]],[[-1,2],[-1,-1]],[[-1,-1],[2,-1]]];;
917
gap> CardinalityOfToricVariety(Cones,3);
918
13
919
gap> CardinalityOfToricVariety(Cones,4);
920
21
921
gap> CardinalityOfToricVariety(Cones,5);
922
31
923
gap> CardinalityOfToricVariety(Cones,7);
924
57
925
</Example>
926
<!--
927
Cones:=[[[2,-1],[-1,2]],[[-1,2],[-1,-1]],[[-1,-1],[2,-1]]];;
928
CardinalityOfToricVariety(Cones,3);
929
CardinalityOfToricVariety(Cones,4);
930
CardinalityOfToricVariety(Cones,5);
931
CardinalityOfToricVariety(Cones,7);
932
-->
933
934
</Section>
935
936
</Chapter>
937
938
</Body>
939
<Bibliography Databases="toric"/>
940
<TheIndex/>
941
</Book>
942
943