Skip to content

Commit

Permalink
Wrap saturation2 and use it for Laurent polynomials (oscar-system#2562)
Browse files Browse the repository at this point in the history
  • Loading branch information
thofma authored Jul 14, 2023
1 parent 3b64d46 commit 19a211e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion experimental/Laurent/src/Laurent.jl
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ function preimage(f::MPolyAnyMap{X, <: LaurentMPolyRing, Y, Z}, I::LaurentMPolyI
# the Laurent polynomial ring R
_R = base_ring(II)
for g in gens(_R)
II = saturation(II, g*_R)
II = Oscar._saturation2(II, g*_R)
end
# We need to translate to an ideal of R
return ideal(R, map(x -> map_coefficients(identity, x, parent = R), gens(II)))
Expand Down
10 changes: 10 additions & 0 deletions src/Rings/mpoly-ideals.jl
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,16 @@ function saturation(I::MPolyIdeal{T}, J::MPolyIdeal{T}) where T
K, _ = Singular.saturation(I.gens.S, J.gens.S)
return MPolyIdeal(base_ring(I), K)
end

# the following is corresponding to saturation2 from Singular
# TODO: think about how to use use this properly/automatically
function _saturation2(I::MPolyIdeal{T}, J::MPolyIdeal{T}) where T
singular_assure(I)
singular_assure(J)
K, _ = Singular.saturation2(I.gens.S, J.gens.S)
return MPolyIdeal(base_ring(I), K)
end

#######################################################
@doc raw"""
saturation_with_index(I::MPolyIdeal{T}, J::MPolyIdeal{T}) where T
Expand Down

0 comments on commit 19a211e

Please sign in to comment.