diff --git a/src/FunField/HessQR.jl b/src/FunField/HessQR.jl index b5a0d86eca..b5d7d6e3ba 100644 --- a/src/FunField/HessQR.jl +++ b/src/FunField/HessQR.jl @@ -111,6 +111,8 @@ function expressify(a::HessQRElem; context = nothing) expressify(a.g, context = context))) end +Hecke.characteristic(::HessQR) = 0 + function Hecke.integral_split(a::Generic.RationalFunctionFieldElem{QQFieldElem}, S::HessQR) if iszero(a) return zero(S), one(S) diff --git a/src/Misc/nmod_poly.jl b/src/Misc/nmod_poly.jl index 510d979da6..5e3d9ad6e2 100644 --- a/src/Misc/nmod_poly.jl +++ b/src/Misc/nmod_poly.jl @@ -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)]) diff --git a/src/NumFieldOrd/NfOrd/Ideal/Ideal.jl b/src/NumFieldOrd/NfOrd/Ideal/Ideal.jl index 2399da4d0d..66cf12b241 100644 --- a/src/NumFieldOrd/NfOrd/Ideal/Ideal.jl +++ b/src/NumFieldOrd/NfOrd/Ideal/Ideal.jl @@ -1033,6 +1033,9 @@ function _minmod(a::ZZRingElem, b::AbsNumFieldOrderElem) end function _minmod_easy(a::ZZRingElem, b::AbsSimpleNumFieldOrderElem) + if is_one(a) + return a + end Zk = parent(b) k = number_field(Zk) if fits(Int, a) @@ -1053,6 +1056,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) @@ -1147,7 +1153,6 @@ end function _minmod_comp(a::ZZRingElem, b::AbsSimpleNumFieldOrderElem) - Zk = parent(b) k = number_field(Zk) acom, auncom = ppio(a, index(Zk))