Skip to content

Commit

Permalink
Fix up decomposition_info.
Browse files Browse the repository at this point in the history
  • Loading branch information
HechtiDerLachs committed Oct 4, 2024
1 parent f4df3ad commit 493a6c9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 19 deletions.
16 changes: 10 additions & 6 deletions src/AlgebraicGeometry/Schemes/Covering/Objects/Attributes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,22 @@ function inherit_decomposition_info!(

for V in patches(orig_cov)
# Collect the patches in `ref_cov` refining V
V_ref = [U for U in patches(ref_cov) if decomp_dict[U][1] === V]
# Collect the corresponding complement equations
comp_eqns = [decomp_dict[U][2] for U in V_ref]
V_ref = [(U, (UV, h)) for (U, (UV, h)) in decomp_dict if UV === V]
_compl(a) = sum(length(lifted_numerator(b)) + length(lifted_denominator(b)) for b in a[2][2]; init=0)
V_ref = sort!(V_ref, by=_compl)
# Start out from the original decomposition info
dec_inf = copy(decomposition_info(orig_cov)[V])
for (i, U) in enumerate(V_ref)
for (i, (U, (_, h))) in enumerate(V_ref)
# Cast the already made decomposition info down to U
tmp = elem_type(OO(U))[OX(V, U)(i) for i in dec_inf] # help the compiler
# Append the equations for the previously covered patches
for j in 1:i-1
W = V_ref[j]
surplus = OX(V, U).(decomp_dict[W][2])
(_, (_, hh)) = V_ref[j]
if is_empty(hh) # The patch for hh already covered everything; this one can hence be discarded.
push!(tmp, one(OO(U)))
break
end
surplus = OX(V, U).(hh)
push!(tmp, prod(surplus; init=one(OO(U))))
end
set_decomposition_info!(ref_cov, U, tmp)
Expand Down
13 changes: 0 additions & 13 deletions src/AlgebraicGeometry/Schemes/Sheaves/CoherentSheaves.jl
Original file line number Diff line number Diff line change
Expand Up @@ -784,19 +784,6 @@ end
return C
end

function inherit_decomposition_info!(C::Covering, X::AbsCoveredScheme)
D = default_covering(X)
OOX = OO(X)
if has_decomposition_info(D)
for U in patches(C)
V = __find_chart(U, D)
phi = OOX(V, U)
set_decomposition_info!(C, U, phi.(decomposition_info(D)[V]))
end
end
return C
end

@attr Covering function trivializing_covering(M::HomSheaf)
X = scheme(M)
OOX = OO(X)
Expand Down

0 comments on commit 493a6c9

Please sign in to comment.