Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fast strict transform under toric blowups #4484

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,15 @@ function blow_up(m::AbstractFTheoryModel, I::AbsIdealSheaf; coordinate_name::Str
# Construct the new model
if m isa GlobalTateModel
if isdefined(m, :tate_polynomial) && new_ambient_space isa NormalToricVariety
new_tate_polynomial = _strict_transform(bd, tate_polynomial(m))
new_tate_polynomial = cox_ring_module_homomorphism(bd, tate_polynomial(m))
model = GlobalTateModel(explicit_model_sections(m), defining_section_parametrization(m), new_tate_polynomial, base_space(m), new_ambient_space)
else
new_tate_ideal_sheaf = _strict_transform(bd, tate_ideal_sheaf(m))
model = GlobalTateModel(explicit_model_sections(m), defining_section_parametrization(m), new_tate_ideal_sheaf, base_space(m), new_ambient_space)
end
else
if isdefined(m, :weierstrass_polynomial) && new_ambient_space isa NormalToricVariety
new_weierstrass_polynomial = _strict_transform(bd, weierstrass_polynomial(m))
new_weierstrass_polynomial = cox_ring_module_homomorphism(bd, weierstrass_polynomial(m))
model = WeierstrassModel(explicit_model_sections(m), defining_section_parametrization(m), new_weierstrass_polynomial, base_space(m), new_ambient_space)
else
new_weierstrass_ideal_sheaf = _strict_transform(bd, weierstrass_ideal_sheaf(m))
Expand Down
41 changes: 2 additions & 39 deletions experimental/FTheoryTools/src/auxiliary.jl
Original file line number Diff line number Diff line change
Expand Up @@ -463,43 +463,6 @@
_strict_transform(bd::AbsCoveredSchemeMorphism, II::AbsIdealSheaf) = strict_transform(bd, II)

function _strict_transform(bd::ToricBlowupMorphism, II::ToricIdealSheafFromCoxRingIdeal)
center_ideal = ideal_in_cox_ring(center_unnormalized(bd))
if (ngens(ideal_in_cox_ring(II)) != 1) || (all(in(gens(base_ring(center_ideal))), gens(center_ideal)) == false)
return strict_transform(bd, II)
end
S = cox_ring(domain(bd))
_e = gen(S, index_of_exceptional_ray(bd))
images = MPolyRingElem[]
g_list = gens(S)
g_center = [string(k) for k in symbols(ideal_in_cox_ring(center_unnormalized(bd)))]
for v in g_list
v == _e && continue
if string(v) in g_center
push!(images, v * _e)
else
push!(images, v)
end
end
ring_map = hom(cox_ring(codomain(bd)), S, images)
total_transform = ring_map(ideal_in_cox_ring(II))
exceptional_ideal = total_transform + ideal([_e])
strict_transform, exceptional_factor = saturation_with_index(total_transform, exceptional_ideal)
return ideal_sheaf(domain(bd), strict_transform)
end

function _strict_transform(bd::ToricBlowupMorphism, tate_poly::MPolyRingElem)
S = cox_ring(domain(bd))
_e = gen(S, index_of_exceptional_ray(bd))
g_list = string.(symbols(S))
g_center = [string(k) for k in gens(ideal_in_cox_ring(center_unnormalized(bd)))]
position_of_center_variables = [findfirst(==(g), g_list) for g in g_center]
pos_of_e = findfirst(==(string(_e)), g_list)
C = MPolyBuildCtx(S)
for m in terms(tate_poly)
exps = collect(exponents(m))[1]
insert!(exps, pos_of_e, sum(exps[position_of_center_variables]))
push_term!(C, collect(coefficients(m))[1], exps)
end
f = finish(C)
return remove(f, _e)[2]
transf = strict_transform(bd, ideal_in_cox_ring(II))
return ideal_sheaf(domain(bd), transf)

Check warning on line 467 in experimental/FTheoryTools/src/auxiliary.jl

View check run for this annotation

Codecov / codecov/patch

experimental/FTheoryTools/src/auxiliary.jl#L466-L467

Added lines #L466 - L467 were not covered by tests
end
27 changes: 16 additions & 11 deletions experimental/Schemes/src/ToricBlowups/methods.jl
Original file line number Diff line number Diff line change
Expand Up @@ -193,20 +193,25 @@ function cox_ring_module_homomorphism(f::ToricBlowupMorphism, g::MPolyDecRingEle
@req parent(g) === cox_ring(codomain(f)) "g must be an element of the Cox ring of the codomain of f"
R = cox_ring(codomain(f))
S = cox_ring(domain(f))

# Assuming the i-th variable of `R` is the i-th variable of `S`
S_vars = elem_type(S)[S[i] for i in 1:nvars(S)]

nvars(R) == nvars(S) && return hom(R, S, S_vars)(g)
nvars(R) == nvars(S) && return evaluate(g, gens(S))
ps = minimal_supercone_coordinates_of_exceptional_ray(f)
if lcm(denominator.(ps)) == 1
ps_fast = Vector{Int64}(numerator.(ps))
else
ps_fast = Vector{Rational{Int64}}(ps)
end
exceptional_var = S[index_of_exceptional_ray(f)]
make_S_term(c, exps) = c*prod(map(^, S_vars, exps))
coeff_exps = collect(zip(coefficients(g), exponents(g)))
h = S(0)
for (c, exps) in coeff_exps
exceptional_exp = ceil(ZZRingElem, sum(ps.*exps))
h += exceptional_var^exceptional_exp * make_S_term(c, exps)
C = MPolyBuildCtx(S)

# Core loop
for m in terms(g)
exps = first(exponents(m))
exceptional_exp = ceil(Int64, sum(ps_fast.*exps))
exps = [exps; exceptional_exp]
push_term!(C, first(coefficients(m)), exps)
end

h = finish(C)
return h
end

Expand Down
19 changes: 19 additions & 0 deletions experimental/Schemes/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,23 @@ end
J_strict = strict_transform(f, I)
@test J_strict == ideal(S, [x_ + y_*z_^2*u])
@test ideal_sheaf(Y, J_strict) == strict_transform(f, ideal_sheaf(X, I))

# Quadratic cone, blowup along non-Cartier divisor
ray_generators = [[0, 0, 1], [1, 0, 1], [1, 1, 1], [0, 1, 1]]
max_cones = IncidenceMatrix([[1, 2, 3, 4]])
PF = polyhedral_fan(max_cones, ray_generators)
X = normal_toric_variety(PF)
set_coordinate_names(X, ["x", "y", "z", "w"])
R = cox_ring(X)
x, y, z, w = gens(R)
f = blow_up_along_minimal_supercone_coordinates(X, [1, 0, 0, 0]; coordinate_name="u")
Y = domain(f)
S = cox_ring(Y)
x_, y_, z_, w_ = gens(S)

## Subscheme is a curve
I = ideal(R, [x + z^2*y])
J_strict = strict_transform(f, I)
@test J_strict == ideal(S, [x_ + y_*z_^2])
@test ideal_sheaf(Y, J_strict) == strict_transform(f, ideal_sheaf(X, I))
end
Loading