Skip to content

Commit

Permalink
[ToricSchemes] Fixes to blow up of toric variety from new ray
Browse files Browse the repository at this point in the history
  • Loading branch information
HereAround committed Apr 11, 2024
1 parent 3b3a806 commit 5c0c4ce
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 14 deletions.
8 changes: 1 addition & 7 deletions experimental/Schemes/ToricBlowups/attributes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ index_of_new_ray(bl::ToricBlowdownMorphism) = bl.index_of_new_ray
Return the center of the toric blowdown morphism as ideal sheaf.
Currently (October 2023), ideal sheaves are only supported for
smooth toric varieties. Hence, there will be instances in which
the construction of a blowdown morphism succeeds, but the center
of the blowup, as represented by an ideal sheaf, cannot yet be
computed.
# Examples
```jldoctest
julia> P3 = projective_space(NormalToricVariety, 3)
Expand All @@ -63,7 +57,7 @@ Toric blowdown morphism
julia> center(blow_down_morphism)
Sheaf of ideals
on normal toric variety
on normal, smooth toric variety
with restrictions
1: Ideal (x_3_1, x_2_1)
2: Ideal (x_3_2, x_2_2)
Expand Down
48 changes: 47 additions & 1 deletion experimental/Schemes/ToricBlowups/constructors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,60 @@ Multivariate polynomial ring in 5 variables over QQ graded by
x3 -> [0 1]
x4 -> [1 0]
e -> [1 -1]
julia> typeof(center(blow_down_morphism))
Oscar.ToricIdealSheafFromCoxRingIdeal{NormalToricVariety, AbsAffineScheme, Ideal, Map}
julia> Oscar.ideal_in_cox_ring(center(blow_down_morphism))
Ideal generated by
x2
x3
```
Notice that in the above example, the blowup center is not just an ideal sheaf.
Rather, it is an ideal sheaf that knows its datum, in the form of an ideal,
in the Cox ring. Sadly, we cannot always (at least not yet) compute such a datum.
The following example demonstrates such a case.
# Examples
```jldoctest
julia> rs = [1 1; -1 1]
2×2 Matrix{Int64}:
1 1
-1 1
julia> max_cones = IncidenceMatrix([[1, 2]])
1×2 IncidenceMatrix
[1, 2]
julia> v = normal_toric_variety(max_cones, rs)
Normal toric variety
julia> bu = blow_up(v, [0, 1])
Toric blowdown morphism
julia> center(bu)
Sheaf of ideals
on normal, non-smooth toric variety
with restriction
1: Ideal (x_3_1, x_2_1, x_1_1)
julia> typeof(center(bu))
IdealSheaf{NormalToricVariety, AbsAffineScheme, Ideal, Map}
```
"""
function blow_up(v::NormalToricVariety, new_ray::AbstractVector{<:IntegerUnion}; coordinate_name::String = "e")
new_variety = normal_toric_variety(star_subdivision(v, new_ray))
@req n_rays(v) != n_rays(new_variety) "New ray already a ray of the given toric variety"
if is_smooth(v) == false
return ToricBlowdownMorphism(v, new_variety, coordinate_name, new_ray)
end
inx = _get_maximal_cones_containing_vector(polyhedral_fan(v), new_ray)
old_rays = matrix(ZZ, rays(v))
cone_generators = matrix(ZZ, [old_rays[i,:] for i in 1:nrows(old_rays) if ray_indices(maximal_cones(v))[inx[1], i]])
powers = solve_mixed(ZZMatrix, transpose(cone_generators), transpose(matrix(ZZ, [new_ray])), identity_matrix(ZZ, ncols(old_rays)))
powers = solve_non_negative(ZZMatrix, transpose(cone_generators), transpose(matrix(ZZ, [new_ray])))
if nrows(powers) != 1
return ToricBlowdownMorphism(v, new_variety, coordinate_name, new_ray)
end
gens_S = gens(cox_ring(v))
variables = [gens_S[i] for i in 1:nrows(old_rays) if ray_indices(maximal_cones(v))[inx[1], i]]
list_of_gens = [variables[i]^powers[i] for i in 1:length(powers) if powers[i] != 0]
Expand Down
2 changes: 1 addition & 1 deletion experimental/Schemes/ToricBlowups/methods.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ julia> x, y, z = gens(S);
julia> I = ideal_sheaf(P2, ideal([x*y]))
Sheaf of ideals
on normal toric variety
on normal, smooth toric variety
with restrictions
1: Ideal (x_1_1*x_2_1)
2: Ideal (x_2_2)
Expand Down
13 changes: 8 additions & 5 deletions experimental/Schemes/ToricBlowups/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@

toric_morphism::ToricMorphism
index_of_new_ray::Integer
center::ToricIdealSheafFromCoxRingIdeal
center::Union{ToricIdealSheafFromCoxRingIdeal, IdealSheaf}
exceptional_divisor::ToricDivisor

function ToricBlowdownMorphism(v::NormalToricVariety, new_variety::NormalToricVariety, coordinate_name::String, center::ToricIdealSheafFromCoxRingIdeal, new_ray::AbstractVector{<:IntegerUnion})
bl = ToricBlowdownMorphism(v, new_variety, coordinate_name, new_ray)
bl.center = center
return bl
end

function ToricBlowdownMorphism(v::NormalToricVariety, new_variety::NormalToricVariety, coordinate_name::String, new_ray::AbstractVector{<:IntegerUnion})

# Compute position of new ray
new_rays = matrix(ZZ, rays(new_variety))
Expand All @@ -37,13 +43,10 @@

# Construct the toric morphism and construct the object
bl = toric_morphism(new_variety, identity_matrix(ZZ, ambient_dim(polyhedral_fan(v))), v; check=false)
return new{typeof(domain(bl)), typeof(codomain(bl))}(bl, position_new_ray, center)
return new{typeof(domain(bl)), typeof(codomain(bl))}(bl, position_new_ray)
end
end

#toric_blowdown_morphism(bl::ToricMorphism, new_ray::AbstractVector{<:IntegerUnion}, center::IdealSheaf) = ToricBlowdownMorphism(bl, new_ray, center)
#toric_blowdown_morphism(Y::NormalToricVariety, new_ray::AbstractVector{<:IntegerUnion}, coordinate_name::String) = ToricBlowdownMorphism(Y, new_ray, coordinate_name)



########################################################################
Expand Down

0 comments on commit 5c0c4ce

Please sign in to comment.