Skip to content

Commit

Permalink
[ToricVarieties] Extend blow_up method to use schemes as fallback if …
Browse files Browse the repository at this point in the history
…needed
  • Loading branch information
HereAround committed Aug 30, 2023
1 parent 80e1466 commit 08e6c8b
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 5 deletions.
7 changes: 7 additions & 0 deletions experimental/Schemes/IdealSheaves.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1305,3 +1305,10 @@ function _my_dot(v::PointVector{ZZRingElem}, u::ZZMatrix)
return sum(v[i]*u[1,i] for i in 1:n; init=zero(QQ))
end

function _generic_blow_up(v::Any, I::Any)
error("Not yet supported")
end

function _generic_blow_up(v::NormalToricVarietyType, I::MPolyIdeal)
return blow_up(IdealSheaf(v, I))
end
Original file line number Diff line number Diff line change
Expand Up @@ -321,19 +321,55 @@ Multivariate polynomial ring in 5 variables over QQ graded by
x3 -> [0 1]
x4 -> [1 0]
e -> [1 -1]
julia> I2 = ideal([x2 * x3])
ideal(x2 * x3)
julia> b2P3 = blow_up(P3, I2)
Blow up
of scheme over QQ covered with 4 patches
1b: [x_1_1, x_2_1, x_3_1] normal, affine toric variety
2b: [x_1_2, x_2_2, x_3_2] normal, affine toric variety
3b: [x_1_3, x_2_3, x_3_3] normal, affine toric variety
4b: [x_1_4, x_2_4, x_3_4] normal, affine toric variety
in sheaf of ideals with restrictions
1b: ideal(x_2_1*x_3_1)
2b: ideal(x_2_2*x_3_2)
3b: ideal(x_3_3)
4b: ideal(x_2_4)
with domain
scheme over QQ covered with 4 patches
1a: [x_1_1, x_2_1, x_3_1] spec of quotient of multivariate polynomial ring
2a: [x_1_2, x_2_2, x_3_2] spec of quotient of multivariate polynomial ring
3a: [x_1_3, x_2_3, x_3_3] spec of quotient of multivariate polynomial ring
4a: [x_1_4, x_2_4, x_3_4] spec of quotient of multivariate polynomial ring
and exceptional divisor
effective cartier divisor defined by
sheaf of ideals with restrictions
1a: ideal(x_2_1*x_3_1)
2a: ideal(x_2_2*x_3_2)
3a: ideal(x_3_3)
4a: ideal(x_2_4)
```
"""
function blow_up(v::NormalToricVarietyType, I::MPolyIdeal; coordinate_name::String = "e", set_attributes::Bool = true)
@req base_ring(I) == cox_ring(v) "The ideal must be contained in the cox ring of the toric variety"
indices = [findfirst(y -> y == x, gens(cox_ring(v))) for x in gens(I)]
@req length(indices) == ngens(I) "All generators must be indeterminates of the cox ring of the toric variety"
rs = matrix(ZZ, rays(v))
new_ray = vec(sum([rs[i,:] for i in indices]))
new_ray = new_ray ./ gcd(new_ray)
return blow_up(v, new_ray; coordinate_name = coordinate_name, set_attributes = set_attributes)
if length(indices) == ngens(I) && (nothing in indices) == false
# We perform this blowup with toric techniques.
rs = matrix(ZZ, rays(v))
new_ray = vec(sum([rs[i,:] for i in indices]))
new_ray = new_ray ./ gcd(new_ray)
return blow_up(v, new_ray; coordinate_name = coordinate_name, set_attributes = set_attributes)
else
# We rely on advanced techniques to conduct this blowup (if available).
return _generic_blow_up(v, I)
end
end



@doc raw"""
blow_up(v::NormalToricVarietyType, new_ray::AbstractVector{<:IntegerUnion}; coordinate_name::String = "e", set_attributes::Bool = true)
Expand Down

0 comments on commit 08e6c8b

Please sign in to comment.