Skip to content

Commit

Permalink
[FTheoryTools] Absorb convenience functions for blowups into FTheoryT…
Browse files Browse the repository at this point in the history
…ools
  • Loading branch information
HereAround committed Feb 4, 2025
1 parent e881004 commit dac55d7
Showing 1 changed file with 109 additions and 0 deletions.
109 changes: 109 additions & 0 deletions experimental/FTheoryTools/src/auxiliary.jl
Original file line number Diff line number Diff line change
Expand Up @@ -453,3 +453,112 @@ eval_poly(n::Number, R) = R(n)
#
# julia> eval_poly("-x1 - 3//5*x2^3 + 5 - 3", Qx)
# -x1 - 3//5*x2^3 + 2



###########################################################################
# 10: Convenience functions for blowups
# 10: FOR INTERNAL USE ONLY (as of Feb 1, 2025 and PR 4523)
# 10: They are not in use (as of Feb 1, 2025 and PR 4523)
# 10: Gauge in the future if they are truly needed!
###########################################################################

@doc raw"""
_martins_desired_blowup(m::NormalToricVariety, I::ToricIdealSheafFromCoxRingIdeal; coordinate_name::String = "e")
Blow up the toric variety along a toric ideal sheaf.
!!! warning
This function is type unstable. The type of the domain of the output `f` is always a subtype of `AbsCoveredScheme` (meaning that `domain(f) isa AbsCoveredScheme` is always true).
Sometimes, the type of the domain will be a toric variety (meaning that `domain(f) isa NormalToricVariety` is true) if the algorithm can successfully detect this.
In the future, the detection algorithm may be improved so that this is successful more often.
!!! warning
This is an internal method. It is NOT exported.
# Examples
```jldoctest
julia> P3 = projective_space(NormalToricVariety, 3)
Normal toric variety
julia> x1, x2, x3, x4 = gens(cox_ring(P3))
4-element Vector{MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}}:
x1
x2
x3
x4
julia> II = ideal_sheaf(P3, ideal([x1*x2]))
Sheaf of ideals
on normal toric variety
with restrictions
1: Ideal (x_1_1*x_2_1)
2: Ideal (x_2_2)
3: Ideal (x_1_3)
4: Ideal (x_1_4*x_2_4)
julia> f = Oscar._martins_desired_blowup(P3, II);
```
"""
function _martins_desired_blowup(v::NormalToricVarietyType, I::ToricIdealSheafFromCoxRingIdeal; coordinate_name::Union{String, Nothing} = nothing)
coords = _ideal_sheaf_to_minimal_supercone_coordinates(v, I)
if !isnothing(coords)
return blow_up_along_minimal_supercone_coordinates(v, coords; coordinate_name=coordinate_name) # Apply toric method
else
return blow_up(I) # Reroute to scheme theory
end
end


@doc raw"""
_martins_desired_blowup(v::NormalToricVariety, I::MPolyIdeal; coordinate_name::String = "e")
Blow up the toric variety by subdividing the cone in the list
of *all* cones of the fan of `v` which corresponds to the
provided ideal `I`. Note that this cone need not be maximal.
By default, we pick "e" as the name of the homogeneous coordinate for
the exceptional prime divisor. As third optional argument one can supply
a custom variable name.
# Examples
```jldoctest
julia> P3 = projective_space(NormalToricVariety, 3)
Normal toric variety
julia> (x1,x2,x3,x4) = gens(cox_ring(P3))
4-element Vector{MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}}:
x1
x2
x3
x4
julia> I = ideal([x2,x3])
Ideal generated by
x2
x3
julia> bP3 = domain(Oscar._martins_desired_blowup(P3, I))
Normal toric variety
julia> cox_ring(bP3)
Multivariate polynomial ring in 5 variables over QQ graded by
x1 -> [1 0]
x2 -> [0 1]
x3 -> [0 1]
x4 -> [1 0]
e -> [1 -1]
julia> I2 = ideal([x2 * x3])
Ideal generated by
x2*x3
julia> b2P3 = Oscar._martins_desired_blowup(P3, I2);
julia> codomain(b2P3) == P3
true
```
"""
function _martins_desired_blowup(v::NormalToricVarietyType, I::MPolyIdeal; coordinate_name::Union{String, Nothing} = nothing)
return _martins_desired_blowup(v, ideal_sheaf(v, I))
end

0 comments on commit dac55d7

Please sign in to comment.