Skip to content

Commit

Permalink
fix: don't use polynomial rings over zero rings
Browse files Browse the repository at this point in the history
  • Loading branch information
thofma committed Nov 14, 2024
1 parent 0d6625a commit ddf1e30
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Misc/nmod_poly.jl
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ function resultant_ideal_pp(f::PolyRingElem{T}, g::PolyRingElem{T}) where T <: R
s = gcd(lift(res), pn)
if !isone(s)
new_pn = divexact(pn, s)
if is_one(new_pn)
return zero(R)
end
R1 = residue_ring(ZZ, S(new_pn), cached = false)[1]
R1t = polynomial_ring(R1, "y", cached = false)[1]
f2 = R1t(T[R1(lift(coeff(f, i))) for i = 0:degree(f)])
Expand Down
3 changes: 3 additions & 0 deletions src/NumFieldOrd/NfOrd/Ideal/Ideal.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1053,6 +1053,9 @@ function _minmod_easy(a::ZZRingElem, b::AbsSimpleNumFieldOrderElem)
end

function _minmod_easy_pp(a::ZZRingElem, b::AbsSimpleNumFieldOrderElem)
if isone(a)
return one(a)
end
Zk = parent(b)
k = number_field(Zk)
if fits(Int, a)
Expand Down

0 comments on commit ddf1e30

Please sign in to comment.