-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNormalToricVarieties.m2
177 lines (162 loc) · 6.46 KB
/
NormalToricVarieties.m2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
-- -*- coding: utf-8 -*-
------------------------------------------------------------------------------
-- Copyright 2009--2020 Gregory G. Smith
--
-- 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 3 of the License, or (at your option)
-- any later version.
--
-- 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.
--
-- You should have received a copy of the GNU General Public License along
-- with this program. If not, see <http://www.gnu.org/licenses/>.
------------------------------------------------------------------------------
newPackage(
"NormalToricVarieties",
AuxiliaryFiles => true,
Version => "1.9",
Date => "31 May 2020",
Authors => {{
Name => "Gregory G. Smith",
Email => "[email protected]",
HomePage => "http://www.mast.queensu.ca/~ggsmith"}},
Headline => "routines for working with normal toric varieties and related objects",
PackageExports => {"Polyhedra", "Schubert2"},
PackageImports => {"FourierMotzkin","Normaliz","LLLBases"},
DebuggingMode => false
)
export {
-- types
"NormalToricVariety",
"ToricDivisor",
"ToricMap",
--functions / methods
"affineSpace",
"toricBlowup",
"cartesianProduct",
"cartierDivisorGroup",
"classGroup",
"diagonalToricMap",
"fromCDivToPic",
"fromCDivToWDiv",
"fromPicToCl",
"fromWDivToCl",
"hirzebruchSurface",
"isAmple",
"isCartier",
"isDegenerate",
"isDominant",
"isEffective",
"isFano",
"isFibration",
"isNef",
"isProjective",
"isProper",
"isQQCartier",
"kleinschmidt",
"makeSimplicial",
"makeSmooth",
"nefGenerators",
"normalToricVariety",
"orbits",
"picardGroup",
"pullback",
"toricProjectiveSpace",
"smallAmpleToricDivisor",
"smoothFanoToricVariety",
"toricDivisor",
"weightedProjectiveSpace",
"weilDivisorGroup",
-- symbols
"WeilToClass"
}
protect emsBound
protect rawHHOO
protect maxRayList
------------------------------------------------------------------------------
-- CODE
------------------------------------------------------------------------------
load "NormalToricVarieties/ToricVarieties.m2"
load "NormalToricVarieties/Divisors.m2"
load "NormalToricVarieties/Sheaves.m2"
load "NormalToricVarieties/Chow.m2"
load "NormalToricVarieties/ToricMaps.m2"
------------------------------------------------------------------------------
-- THINGS TO IMPLEMENT?
-- homology, NormalToricVariety
-- operational Chow rings
-- linear series
-- isSemiprojective
-- toric maps
-- pullback divisors
-- pushforward divisors
-- birational map with makeSimplicial & makeSmooth
------------------------------------------------------------------------------
-- DOCUMENTATION
------------------------------------------------------------------------------
beginDocumentation ()
load "NormalToricVarieties/ToricVarietiesDocumentation.m2"
load "NormalToricVarieties/DivisorsDocumentation.m2"
load "NormalToricVarieties/SheavesDocumentation.m2"
load "NormalToricVarieties/ToricMapsDocumentation.m2"
load "NormalToricVarieties/ChowDocumentation.m2"
------------------------------------------------------------------------------
-- TESTS
------------------------------------------------------------------------------
load "NormalToricVarieties/Tests.m2"
end---------------------------------------------------------------------------
------------------------------------------------------------------------------
-- SCRATCH SPACE
------------------------------------------------------------------------------
-- XXX
uninstallPackage "NormalToricVarieties";
restart
installPackage "NormalToricVarieties"
check NormalToricVarieties
needsPackage "NormalToricVarieties";
------------------------------------------------------------------------------
-- interesting test but it is currently to slow to be on the basic list.
TEST ///
rayList = {{1,0,0,0,0,0},{0,1,0,0,0,0},{0,0,1,0,0,0},{0,0,0,1,0,0},{0,0,0,0,1,0},
{0,0,0,0,0,1},{-1,-1,-1,-1,-1,-1},{1,1,1,0,0,0},{1,0,0,1,1,0},
{0,-1,-1,-1,-1,0},{0,1,0,1,0,1},{0,0,1,0,1,1},{-1,-1,0,0,-1,-1},
{-1,0,-1,-1,0,-1}};
coneList = {{0,1,3,6,8,9,10,13},{0,1,3,6,8,12,13},{0,1,3,6,9,10,12},{0,1,3,7,8,10},
{0,1,3,7,8,12},{0,1,3,7,10,12},{0,1,4,5,8,11},{0,1,4,5,8,13},{0,1,4,5,11,13},
{0,1,4,7,8,11},{0,1,4,7,8,13},{0,1,4,7,11,13},{0,1,5,7,8,10,11},
{0,1,5,7,9,11,13},{0,1,5,7,9,12},{0,1,5,7,10,12},{0,1,5,8,9,10,13},
{0,1,5,9,10,12},{0,1,6,7,9,12},{0,1,6,7,9,13},{0,1,6,7,12,13},{0,1,7,8,12,13},
{0,2,3,5,7,8,10,11},{0,2,3,5,7,10,12},{0,2,3,5,8,11,12},{0,2,3,7,8,12},
{0,2,4,7,8,11},{0,2,4,7,8,12,13},{0,2,4,7,11,13},{0,2,4,8,11,12},
{0,2,4,11,12,13},{0,2,5,7,9,11},{0,2,5,7,9,12},{0,2,5,9,11,12},{0,2,6,7,9,11,13},
{0,2,6,7,9,12},{0,2,6,7,12,13},{0,2,6,9,11,12},{0,2,6,11,12,13},
{0,3,5,8,9,10},{0,3,5,8,9,12},{0,3,5,9,10,12},{0,3,6,8,9,12},{0,4,5,8,9,11},
{0,4,5,8,9,13},{0,4,5,9,11,13},{0,4,6,8,9,11,12},{0,4,6,8,9,13},
{0,4,6,8,12,13},{0,4,6,9,11,13},{0,4,6,11,12,13},{0,5,8,9,11,12},
{1,2,3,7,8,10,11},{1,2,3,7,8,12},{1,2,3,7,10,12},{1,2,3,8,11,12},
{1,2,3,10,11,12},{1,2,4,7,8,11},{1,2,4,7,8,12,13},{1,2,4,7,11,13},
{1,2,4,8,11,12},{1,2,4,11,12,13},{1,2,5,6,7,9,11,13},{1,2,5,6,7,9,12},
{1,2,5,6,11,12,13},{1,2,5,7,10,11},{1,2,5,7,10,12},{1,2,5,10,11,12},
{1,2,6,7,12,13},{1,3,4,8,10,11},{1,3,4,8,10,13},{1,3,4,8,11,12},
{1,3,4,8,12,13},{1,3,4,10,11,12,13},{1,3,6,10,12,13},{1,4,5,8,10,11},
{1,4,5,8,10,13},{1,4,5,10,11,13},{1,5,6,9,10,12},{1,5,6,9,10,13},
{1,5,6,10,12,13},{1,5,10,11,12,13},{2,3,5,10,11,12},{2,5,6,9,11,12},
{3,4,5,8,10,11},{3,4,5,8,10,13},{3,4,5,8,11,12},{3,4,5,8,12,13},
{3,4,5,10,11,12,13},{3,5,6,8,9,10,13},{3,5,6,8,9,12},{3,5,6,8,12,13},
{3,5,6,9,10,12},{3,5,6,10,12,13},{4,5,6,8,9,11,12},{4,5,6,8,9,13},
{4,5,6,8,12,13},{4,5,6,9,11,13},{4,5,6,11,12,13}};
X = normalToricVariety (rayList, coneList);
Y = makeSimplicial X;
debugLevel = 2;
assert (isWellDefined Y === true)
assert (isSimplicial Y === true)
assert (isProjective Y === true)
Y = makeSimplicial (X, Strategy => 0);
assert (isWellDefined Y === true)
assert (isSimplicial Y === true)
assert (isProjective Y === true)
///