-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTrisecantFlops.m2
174 lines (155 loc) · 7.49 KB
/
TrisecantFlops.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
newPackage(
"TrisecantFlops",
Version => "1.7",
Date => "August 27, 2022",
Headline => "Some examples of Trisecant Flops",
Authors => {{Name => "Giovanni Staglianò", Email => "[email protected]"}},
PackageImports => {"PrimaryDecomposition"},
PackageExports => {"SpecialFanoFourfolds"},
AuxiliaryFiles => true,
CacheExampleOutput => false,
DebuggingMode => false,
Reload => false
);
if version#"VERSION" < "1.20" then error "this package requires Macaulay2 version 1.20 or newer";
if SpecialFanoFourfolds.Options.Version < "2.6" then (
<<endl<<"Your version of the SpecialFanoFourfolds package is outdated (required version 2.6 or newer);"<<endl;
<<"you can manually download the latest version from"<<endl;
<<"https://github.com/Macaulay2/M2/tree/development/M2/Macaulay2/packages."<<endl;
<<"To automatically download the latest version of SpecialFanoFourfolds in your current directory,"<<endl;
<<"you may run the following Macaulay2 code:"<<endl<<"***"<<endl<<endl;
<<///run "curl -s -o SpecialFanoFourfolds.m2 https://raw.githubusercontent.com/Macaulay2/M2/development/M2/Macaulay2/packages/SpecialFanoFourfolds.m2";///<<endl<<endl<<"***"<<endl;
error "required SpecialFanoFourfolds package version 2.6 or newer";
);
debug SpecialFanoFourfolds;
export{"specialRationalMap"};
dir = TrisecantFlops#"auxiliary files";
load (dir|"SRM.m2");
eX := local eX;
example = method(Options => {Verbose => false});
example (ZZ) := o -> (jj) -> (
if jj < 0 or jj > 17 then error "expected integer between 0 and 17";
if class eX_jj =!= SpecialRationalMap then (
nfile := dir|toString(jj)|".dat";
if o.Verbose then <<"-- loading data file "<<nfile<<" ";
F := get nfile;
if o.Verbose then <<"done!"<<endl<<"-- valuing data file... ";
F = value F;
if o.Verbose then <<"done!"<<endl<<"-- executing data file...";
eX_jj = F();
if o.Verbose then <<"done!"<<endl;
);
return eX_jj;
);
nonMinimalAssociatedK3surface = method();
nonMinimalAssociatedK3surface (ZZ) := (jj) -> (
f := example jj;
if jj == 10 or jj == 14 or jj == 16 or jj == 17 then return (value get(dir|toString(jj)|"ass.dat"))(gens ambient target f) else return trim lift(specialBaseLocus inverse f,ambient target f);
);
eY := local eY;
example (Nothing,ZZ) := o -> (nu,jj) -> (
if jj < 0 or jj > 17 then error "expected integer between 0 and 17";
if jj == 15 then error "not implemented yet";
if class eY_jj =!= RationalMap then (
nfile := dir|"fromXtoY"|toString(jj)|".dat";
if o.Verbose then <<"-- loading data file "<<nfile<<" ";
F := get nfile;
if o.Verbose then <<"done!"<<endl<<"-- valuing data file... ";
F = value F;
if o.Verbose then <<"done!"<<endl<<"-- executing data file...";
eY_jj = F();
if o.Verbose then <<"done!"<<endl;
);
return eY_jj;
);
eW := local eW;
example (ZZ,Nothing) := o -> (jj,nu) -> (
if jj < 0 or jj > 17 then error "expected integer between 0 and 17";
if jj == 15 then error "not implemented yet";
if class eW_jj =!= RationalMap then (
nfile := dir|"fromWtoY"|toString(jj)|".dat";
if o.Verbose then <<"-- loading data file "<<nfile<<" ";
F := get nfile;
if o.Verbose then <<"done!"<<endl<<"-- valuing data file... ";
F = value F;
if o.Verbose then <<"done!"<<endl<<"-- executing data file...";
eW_jj = F();
if o.Verbose then <<"done!"<<endl;
);
return eW_jj;
);
randomQuinticDelPezzoSurfaceIntersectingTheSpecialBaseLocusOfExample7AlongADegree10EGenus6Curve = () -> (
S := specialBaseLocus example 7;
x := gens ring S;
q := ideal(x_4+1011695*x_5,x_3+2243139*x_5,x_2-480752*x_5,x_1+771527*x_5,x_0); -- singular point of S
h := (rationalMap q)|S;
ideal h;
M := random(1,ring S) * matrix (h#"maps")_0 + random(0,ring S) * matrix (h#"maps")_1;
assert(h == rationalMap(source h,target h,M));
J := top ideal lift(M,ring S);
D := first select(unique apply(entries transpose mingens kernel matrix select(entries transpose syz gens J,g -> max flatten degrees ideal g == 1),g' -> trim ideal g'),i -> dim i >= 1);
assert(? D == "smooth surface of degree 5 and sectional genus 1 in PP^5 cut out by 5 hypersurfaces of degree 2" and dim(D + S) == 2 and degree(D + S) == 10);
projectiveVariety(D,MinimalGenerators=>false,Saturate=>false)
);
EXmap := local EXmap;
extend MultirationalMap := o -> Phi -> Phi.cache#"extension";
trisecantFlop ZZ := o -> i -> (
if i === -190181 then return null;
if instance(EXmap_i,MultirationalMap) then return EXmap_i;
N := {(0,5),(1,0),(2,3),(3,0),(4,1),(5,6),(6,0),(7,1),(8,0),(9,0),(10,0),(11,3),(12,3),(13,0),(14,4),(15,0),(16,3),(17,0)};
E := {(0,-23),(1,11),(2,-14),(3,13),(4,-1),(5,-32),(6,27),(7,18),(8,46),(9,70),(10,14),(11,-14),(12,-14),(13,8),(14,-20),(15,29),(16,-2),(17,16)};
mm := {(0,3),(1,2),(2,2),(3,2),(4,2),(5,3),(6,3),(7,3),(8,5),(9,5),(10,5),(11,3),(12,3),(13,3),(14,5),(15,5),(16,6),(17,5)};
f := example(i,Verbose=>o.Verbose);
X := specialFourfold(specialBaseLocus f,ideal source f,InputCheck=>0,NumNodes=>(last N_i));
(surface X).cache#"euler" = last E_i;
(surface X).cache#"rationalParametrization" = check multirationalMap({parametrizeSpecialBaseLocus f},surface X);
Y := projectiveVariety(target f,MinimalGenerators=>false,Saturate=>false);
T := projectiveVariety(nonMinimalAssociatedK3surface i,MinimalGenerators=>false,Saturate=>false);
if i == 15 then Y = specialFourfold(T,Y,InputCheck=>0,NumNodes=>(last N_15)) else Y = specialFourfold(T,Y,InputCheck=>0);
F := multirationalMap f#"rationalMap";
assert(ring target F === ring Y);
F#"target" = Y;
assert(ring source F === ring X);
F#"source" = X;
Fe := multirationalMap (extend f)#"rationalMap";
assert(ring target Fe === ring Y);
Fe#"target" = Y;
F.cache#"extension" = Fe;
mu := toRationalMap Fe;
(mu#"map").cache#"multiplicityFanoMap" = last mm_i;
(surface X).cache#("fanoMap",ambient X) = mu;
(surface X).cache#("surfaceDeterminingInverseOfFanoMap",ideal X) = T;
if F#"inverse" =!= null or not(i == 10 or i == 14 or i == 16 or i == 17) then (
assert(F#"inverse" =!= null);
assert(ring target inverse F === ring X);
(inverse F)#"target" = X;
assert(ring source inverse F === ring Y);
(inverse F)#"source" = Y;
Ge := multirationalMap (extend inverse f)#"rationalMap";
assert(ring target Ge === ring X);
Ge#"target" = X;
if i == 7 then (
assert(ideal ring source Ge === ideal ambientFivefold Y);
(surface Y).cache#"euler" = 24;
);
if i == 15 then (
(surface Y).cache#"euler" = last E_15;
);
(inverse F).cache#"extension" = Ge;
X.cache#"rationalParametrization" = inverse F;
assert(f#"inverse" =!= null);
(surface Y).cache#"rationalParametrization" = check multirationalMap({parametrizeSpecialBaseLocus inverse f},surface Y);
);
EXmap_i = F
);
trisecantFlop (Nothing,ZZ) := o -> (nu,i) -> (
f := multirationalMap example(null,i,Verbose=>o.Verbose);
assert(ideal ring source f === ideal ring source trisecantFlop(i,Verbose=>o.Verbose));
f
);
trisecantFlop (ZZ,Nothing) := o -> (i,nu) -> (
g := multirationalMap example(i,null,Verbose=>o.Verbose);
assert(ideal ring source g === ideal ring target trisecantFlop(i,Verbose=>o.Verbose));
g
);
load (dir|"doc.m2");