Skip to content

Commit

Permalink
Catch an important special case in is_refinement.
Browse files Browse the repository at this point in the history
  • Loading branch information
HechtiDerLachs committed Oct 1, 2024
1 parent dd08681 commit ebacd2e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/AlgebraicGeometry/Schemes/Covering/Objects/Methods.jl
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,18 @@ function has_ancestor_in(L::Vector, U::AbsAffineScheme)
end

function is_refinement(D::Covering, C::Covering)
# catch the case that `C` is a simplification of `D`
if all(x isa SimplifiedAffineScheme for x in patches(C)) && all(y->any(x->original(x)===y, patches(C)), patches(D))
map_dict = IdDict{AbsAffineScheme, AbsAffineSchemeMor}()
for U in patches(C)
f, g = identification_maps(U)
V = domain(g)
map_dict[V] = g
end
return true, CoveringMorphism(D, C, map_dict, check=false)
# TODO: Catch the more complicated case where `D` is a proper
# refinement of the original covering for `C`.
end
if !all(x->has_ancestor(u->any(y->(u===y), patches(C)), x), patches(D))
return false, nothing
end
Expand Down

0 comments on commit ebacd2e

Please sign in to comment.