From 58abe477838e5c6984a0299da33b6b0e5a2b5244 Mon Sep 17 00:00:00 2001 From: Matthias Zach <85350711+HechtiDerLachs@users.noreply.github.com> Date: Thu, 20 Jun 2024 21:32:11 +0200 Subject: [PATCH] Some more fixes for the fibration hopping. (#3877) * Some fixes in the production of ideal sheaves. * give the compiler a hint in order to avoid an infinite recursion --------- Co-authored-by: Simon Brandhorst --- experimental/Schemes/src/IdealSheaves.jl | 4 ++-- src/Rings/MPolyQuo.jl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/experimental/Schemes/src/IdealSheaves.jl b/experimental/Schemes/src/IdealSheaves.jl index c6dd35a3f872..edc1e9a42912 100644 --- a/experimental/Schemes/src/IdealSheaves.jl +++ b/experimental/Schemes/src/IdealSheaves.jl @@ -1583,7 +1583,7 @@ function produce_object(F::PrimeIdealSheafFromChart, U2::AbsAffineScheme) function complexity(X1::AbsAffineScheme) init = maximum(total_degree.(lifted_numerator.(gens(F(X1)))); init=0) - glue = default_covering(X)[V, X1] + glue = default_covering(X)[X1, V2] if glue isa SimpleGluing || (glue isa LazyGluing && is_computed(glue)) return init end @@ -1598,7 +1598,7 @@ function produce_object(F::PrimeIdealSheafFromChart, U2::AbsAffineScheme) glue = default_covering(X)[W, V2] f, g = gluing_morphisms(glue) if glue isa SimpleGluing || (glue isa LazyGluing && first(gluing_domains(glue)) isa PrincipalOpenSubset) - complement_equation(codomain(g)) in F(W) && continue # We know the ideal is prime. No need to saturate! + complement_equation(codomain(g)) in F(W) && return ideal(OO(U2), one(OO(U2))) # We know the ideal is prime. No need to saturate! I2 = F(codomain(g)) I = pullback(g)(I2) I = ideal(OO(V2), lifted_numerator.(gens(I))) diff --git a/src/Rings/MPolyQuo.jl b/src/Rings/MPolyQuo.jl index 7cfa0aab6fb7..0e53c2cf69e3 100644 --- a/src/Rings/MPolyQuo.jl +++ b/src/Rings/MPolyQuo.jl @@ -654,7 +654,7 @@ function ideal(A::MPolyQuoRing{T}, V::Vector{MPolyQuoRingElem{T}}) where T <: MP return MPolyQuoIdeal(A, ideal(base_ring(A), map(p->p.f, V))) end -ideal(R::MPolyQuoRing, V::Vector) = ideal(R, R.(V)) +ideal(R::MPolyQuoRing, V::Vector) = ideal(R, elem_type(R)[R(x) for x in V]) function ideal(A::MPolyQuoRing{T}, x::T) where T <: MPolyRingElem