From 5c0c4ce8889adc0e948cd1f8aa719e985f729d9b Mon Sep 17 00:00:00 2001 From: Martin Bies Date: Thu, 11 Apr 2024 15:42:37 +0200 Subject: [PATCH] [ToricSchemes] Fixes to blow up of toric variety from new ray --- .../Schemes/ToricBlowups/attributes.jl | 8 +--- .../Schemes/ToricBlowups/constructors.jl | 48 ++++++++++++++++++- experimental/Schemes/ToricBlowups/methods.jl | 2 +- experimental/Schemes/ToricBlowups/types.jl | 13 +++-- 4 files changed, 57 insertions(+), 14 deletions(-) diff --git a/experimental/Schemes/ToricBlowups/attributes.jl b/experimental/Schemes/ToricBlowups/attributes.jl index 476da6222104..3c936e1daefd 100644 --- a/experimental/Schemes/ToricBlowups/attributes.jl +++ b/experimental/Schemes/ToricBlowups/attributes.jl @@ -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) @@ -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) diff --git a/experimental/Schemes/ToricBlowups/constructors.jl b/experimental/Schemes/ToricBlowups/constructors.jl index 9c0bba89477f..b2ada98c7787 100644 --- a/experimental/Schemes/ToricBlowups/constructors.jl +++ b/experimental/Schemes/ToricBlowups/constructors.jl @@ -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] diff --git a/experimental/Schemes/ToricBlowups/methods.jl b/experimental/Schemes/ToricBlowups/methods.jl index ab0007e51154..a281156fdabd 100644 --- a/experimental/Schemes/ToricBlowups/methods.jl +++ b/experimental/Schemes/ToricBlowups/methods.jl @@ -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) diff --git a/experimental/Schemes/ToricBlowups/types.jl b/experimental/Schemes/ToricBlowups/types.jl index 234aa1955fbb..4b0f92fa4fbb 100644 --- a/experimental/Schemes/ToricBlowups/types.jl +++ b/experimental/Schemes/ToricBlowups/types.jl @@ -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)) @@ -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) - ########################################################################