Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't use polynomial rings over zero rings #1684

Merged
merged 4 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/FunField/HessQR.jl
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@
expressify(a.g, context = context)))
end

Hecke.characteristic(::HessQR) = 0

Check warning on line 114 in src/FunField/HessQR.jl

View check run for this annotation

Codecov / codecov/patch

src/FunField/HessQR.jl#L114

Added line #L114 was not covered by tests

function Hecke.integral_split(a::Generic.RationalFunctionFieldElem{QQFieldElem}, S::HessQR)
if iszero(a)
return zero(S), one(S)
Expand Down
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
7 changes: 6 additions & 1 deletion src/NumFieldOrd/NfOrd/Ideal/Ideal.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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))
Expand Down
Loading