Skip to content

Commit

Permalink
Revert "Make all UnivPoly compatible with AbstractAlgebra 0.42 (#209)"
Browse files Browse the repository at this point in the history
This reverts commit f929069.
  • Loading branch information
fingolfin committed Sep 30, 2024
1 parent cb8c392 commit 6c48d0e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/GenericCyclotomics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ import Base: show, +, -, *, ^, ==, inv, isone, iszero, one, zero, rand, deepcopy
import Compat

if Compat.pkgversion(Oscar.AbstractAlgebra) >= v"0.42.0"
const ZZUPoly = Generic.UnivPoly{ZZRingElem}
const UPoly = Generic.UnivPoly{QQFieldElem}
const UPolyRing = Generic.UniversalPolyRing{QQFieldElem}
else
const ZZUPoly = Generic.UnivPoly{ZZRingElem, Generic.MPoly{ZZRingElem}}
const UPoly = Generic.UnivPoly{QQFieldElem, Generic.MPoly{QQFieldElem}}
const UPolyRing = Generic.UniversalPolyRing{QQFieldElem, Generic.MPoly{QQFieldElem}}
end
Expand Down Expand Up @@ -75,7 +73,7 @@ julia> kempner(12)
kempner(m::Int64) = kempner_with_data(m)[1]

@doc raw"""
normal_form(f::ZZUPoly, m::Int64)
normal_form(f::AbstractAlgebra.Generic.UnivPoly{ZZRingElem, AbstractAlgebra.Generic.MPoly{ZZRingElem}}, m::Int64)
Return a normal form of `f` modulo `m`, such that `normal_form(f,m)` is equal
to `normal_form(g,m)` if and only if `f` and `g` are congruent modulo `m`.
Expand All @@ -100,7 +98,7 @@ julia> normal_form(4*x^9+x^7-(x^3+4*x),12)
```
"""
function normal_form(f::ZZUPoly, m::Int64)
function normal_form(f::AbstractAlgebra.Generic.UnivPoly{ZZRingElem, AbstractAlgebra.Generic.MPoly{ZZRingElem}}, m::Int64)
if m < 1
throw(DomainError(m, "A normal form for non-positive moduli is not defined!"))
end
Expand Down

0 comments on commit 6c48d0e

Please sign in to comment.