-
Notifications
You must be signed in to change notification settings - Fork 113
/
attributes.jl
264 lines (199 loc) · 9.84 KB
/
attributes.jl
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
###################################################################
###################################################################
# 1: Attributes that work the same tor toric and non-toric settings
###################################################################
###################################################################
#####################################################
# 1.1 Weierstrass sections and Weierstrass polynomial
#####################################################
@doc raw"""
weierstrass_section_f(w::WeierstrassModel)
Return the polynomial ``f`` used for the
construction of the Weierstrass model.
```jldoctest
julia> w = su5_weierstrass_model_over_arbitrary_3d_base()
Assuming that the first row of the given grading is the grading under Kbar
Weierstrass model over a not fully specified base
julia> weierstrass_section_f(w);
```
"""
weierstrass_section_f(w::WeierstrassModel) = explicit_model_sections(w)["f"]
@doc raw"""
weierstrass_section_g(w::WeierstrassModel)
Return the polynomial ``g`` used for the
construction of the Weierstrass model.
```jldoctest
julia> w = su5_weierstrass_model_over_arbitrary_3d_base()
Assuming that the first row of the given grading is the grading under Kbar
Weierstrass model over a not fully specified base
julia> weierstrass_section_g(w);
```
"""
weierstrass_section_g(w::WeierstrassModel) = explicit_model_sections(w)["g"]
#####################################################
# 1.2 Weierstrass polynomial
#####################################################
@doc raw"""
weierstrass_polynomial(w::WeierstrassModel)
Return the Weierstrass polynomial of the Weierstrass model.
```jldoctest
julia> w = su5_weierstrass_model_over_arbitrary_3d_base()
Assuming that the first row of the given grading is the grading under Kbar
Weierstrass model over a not fully specified base
julia> weierstrass_polynomial(w);
```
"""
function weierstrass_polynomial(w::WeierstrassModel)
if !isdefined(w, :weierstrass_polynomial)
@req w.weierstrass_ideal_sheaf isa ToricIdealSheafFromCoxRingIdeal "Reconstruction of Weierstrass polynomial is not implemented in the non-toric case"
if isdefined(w, :weierstrass_ideal_sheaf) && isone(ngens(ideal_in_cox_ring(w.weierstrass_ideal_sheaf)))
weierstrass_ideal = ideal_in_cox_ring(w.weierstrass_ideal_sheaf)
@req isone(ngens(weierstrass_ideal)) "Weierstrass ideal generated by more than one polynomial"
w.weierstrass_polynomial = first(gens(weierstrass_ideal))
else
error("Weierstrass polynomial cannot be reconstructed")
end
end
return w.weierstrass_polynomial
end
@doc raw"""
weierstrass_ideal_sheaf(w::WeierstrassModel)
Return the Weierstrass ideal sheaf of the Weierstrass model.
```jldoctest
julia> B3 = projective_space(NormalToricVariety, 3)
Normal toric variety
julia> w = 2 * torusinvariant_prime_divisors(B3)[1]
Torus-invariant, non-prime divisor on a normal toric variety
julia> t = literature_model(arxiv_id = "1109.3454", equation = "3.1", base_space = B3, defining_classes = Dict("w" => w), completeness_check = false)
Construction over concrete base may lead to singularity enhancement. Consider computing singular_loci. However, this may take time!
Global Tate model over a concrete base -- SU(5)xU(1) restricted Tate model based on arXiv paper 1109.3454 Eq. (3.1)
julia> w = weierstrass_model(t)
Weierstrass model over a concrete base -- SU(5)xU(1) restricted Tate model based on arXiv paper 1109.3454 Eq. (3.1)
julia> weierstrass_ideal_sheaf(w)
Sheaf of ideals
on normal toric variety
with restrictions
1: Ideal with 1 generator
2: Ideal with 1 generator
3: Ideal with 1 generator
4: Ideal with 1 generator
5: Ideal with 2 generators
6: Ideal with 2 generators
7: Ideal with 2 generators
8: Ideal with 2 generators
9: Ideal with 5 generators
10: Ideal with 5 generators
11: Ideal with 5 generators
12: Ideal with 5 generators
```
"""
function weierstrass_ideal_sheaf(w::WeierstrassModel)
if !isdefined(w, :weierstrass_ideal_sheaf)
@req ambient_space(w) isa NormalToricVariety "Reconstruction from Weierstrass polynomial not implemented in the non-toric case"
if isdefined(w, :weierstrass_polynomial)
my_ideal = ideal([w.weierstrass_polynomial])
w.weierstrass_ideal_sheaf = ideal_sheaf(ambient_space(w), my_ideal)
else
error("Weierstrass ideal sheaf cannot be reconstructed")
end
end
return w.weierstrass_ideal_sheaf
end
###################################################################
###################################################################
# 2: Attributes that currently only works in toric settings
###################################################################
###################################################################
#####################################################
# 2.1 Calabi-Yau hypersurface
#####################################################
@doc raw"""
calabi_yau_hypersurface(w::WeierstrassModel)
Return the Calabi-Yau hypersurface in the toric ambient space
which defines the Weierstrass model.
```jldoctest
julia> w = weierstrass_model(sample_toric_variety(); completeness_check = false)
Weierstrass model over a concrete base
julia> calabi_yau_hypersurface(w)
Closed subvariety of a normal toric variety
```
"""
@attr ClosedSubvarietyOfToricVariety function calabi_yau_hypersurface(w::WeierstrassModel)
@req base_space(w) isa NormalToricVariety "Calabi-Yau hypersurface currently only supported for toric varieties as base space"
is_base_space_fully_specified(w) || @vprint :FTheoryModelPrinter 1 "Base space was not fully specified. Returning hypersurface in AUXILIARY ambient space.\n"
return closed_subvariety_of_toric_variety(ambient_space(w), [weierstrass_polynomial(w)])
end
########################################################
# 2.2 Turn Weierstrass model into Weierstrass/Tate model
########################################################
# For convenience, allow to turn Weierstrass model into itself
function weierstrass_model(w::WeierstrassModel)
@vprint :FTheoryModelPrinter 0 "Weierstrass model provided, returning this very model.\n"
return w
end
# Currently no plan to include conversion of Weierstrass model into Tate model.
#####################################################
# 2.3 Discriminant and singular loci
#####################################################
@doc raw"""
discriminant(w::WeierstrassModel)
Return the discriminant ``\Delta = 4 f^3 + 27 g^2``.
```jldoctest
julia> w = su5_weierstrass_model_over_arbitrary_3d_base()
Assuming that the first row of the given grading is the grading under Kbar
Weierstrass model over a not fully specified base
julia> discriminant(w);
```
"""
@attr MPolyRingElem function discriminant(w::WeierstrassModel)
@req (base_space(w) isa NormalToricVariety || base_space(w) isa FamilyOfSpaces) "Discriminant of Weierstrass model is currently only supported for toric varieties and family of spaces as base space"
return 4 * weierstrass_section_f(w)^3 + 27 * weierstrass_section_g(w)^2
end
@doc raw"""
singular_loci(w::WeierstrassModel)
Return the singular loci of the Weierstrass model, along with the order of
vanishing of ``(f, g, \Delta)`` at each locus and the refined Tate fiber type.
For the time being, we either explicitly or implicitly focus on toric varieties
as base spaces. Explicitly, in case the user provides such a variety as base space,
and implicitly, in case we work over a non-fully specified base. This has the
advantage that we can "filter out" trivial singular loci.
Specifically, recall that every closed subvariety of a simplicial toric variety is
of the form ``V(I)``, where ``I`` is a homogeneous ideal of the Cox ring. Let ``B``
be the irrelevant ideal of this toric variety. Then, by proposition 5.2.6. of
[CLS11](@cite), ``V(I)`` is trivial/empty iff ``B^l \subseteq I`` for a suitable ``l \geq 0``.
This can be checked by checking if the saturation ``I:B^\infty`` is the ideal generated by ``1``.
By treating a not-fully specified base space implicitly as toric space, we can extend this
result straightforwardly to this situation also. This is the reason for constructing this
auxiliary base space.
```jldoctest
julia> w = su5_weierstrass_model_over_arbitrary_3d_base()
Assuming that the first row of the given grading is the grading under Kbar
Weierstrass model over a not fully specified base
julia> length(singular_loci(w))
2
```
"""
@attr Vector{<:Tuple{<:MPolyIdeal{<:MPolyRingElem}, Tuple{Int64, Int64, Int64}, String}} function singular_loci(w::WeierstrassModel)
@req (base_space(w) isa NormalToricVariety || base_space(w) isa FamilyOfSpaces) "Singular loci of Weierstrass model is currently only supported for toric varieties and families of spaces as base space"
B = irrelevant_ideal(base_space(w))
d_primes = primary_decomposition(ideal([discriminant(w)]))
nontrivial_d_primes = Tuple{<:MPolyIdeal{<:MPolyRingElem}, <:MPolyIdeal{<:MPolyRingElem}}[]
for k in 1:length(d_primes)
if _is_nontrivial(d_primes[k][2], B)
push!(nontrivial_d_primes, d_primes[k])
end
end
f_primes = primary_decomposition(ideal([weierstrass_section_f(w)]))
g_primes = primary_decomposition(ideal([weierstrass_section_g(w)]))
kodaira_types = Tuple{<:MPolyIdeal{<:MPolyRingElem}, Tuple{Int64, Int64, Int64}, String}[]
for d_prime in nontrivial_d_primes
f_index = findfirst(fp -> fp[2] == d_prime[2], f_primes)
g_index = findfirst(gp -> gp[2] == d_prime[2], g_primes)
f_order = !isnothing(f_index) ? saturation_with_index(f_primes[f_index][1], d_prime[2])[2] : 0
g_order = !isnothing(g_index) ? saturation_with_index(g_primes[g_index][1], d_prime[2])[2] : 0
d_order = saturation_with_index(d_prime[1], d_prime[2])[2]
ords = (f_order, g_order, d_order)
push!(kodaira_types, (d_prime[2], ords, _kodaira_type(d_prime[2], weierstrass_section_f(w), weierstrass_section_g(w), discriminant(w), ords)))
end
return kodaira_types
end