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

Modulo with polynomials is sometimes broken #1401

Open
SoongNoonien opened this issue Jul 14, 2023 · 0 comments
Open

Modulo with polynomials is sometimes broken #1401

SoongNoonien opened this issue Jul 14, 2023 · 0 comments

Comments

@SoongNoonien
Copy link
Contributor

Hi!
As mentioned in Nemocas/Nemo.jl#1509, modulo with polynomials in Nemo is a bit inconsistent. But in AbstractAlgebra there is another problem with modulo:

julia> using AbstractAlgebra

julia> R,x=ZZ[:x]
(Univariate polynomial ring in x over integers, x)

julia> mod(R(-1),R(2))
ERROR: ArgumentError: not a unit
Stacktrace:
 [1] inv(a::BigInt)
   @ AbstractAlgebra ~/.julia/packages/AbstractAlgebra/YkCOC/src/julia/Integer.jl:224
 [2] mod(f::AbstractAlgebra.Generic.Poly{BigInt}, g::AbstractAlgebra.Generic.Poly{BigInt})
   @ AbstractAlgebra ~/.julia/packages/AbstractAlgebra/YkCOC/src/Poly.jl:1449
 [3] top-level scope
   @ REPL[6]:1

This is very weird since it works if R is multivariate, which can be seen in Nemocas/Nemo.jl#1509.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant