I’m working with the AbstractAlgebra.jl library in Julia and encountered an issue when defining an ideal in a polynomial ring with rational coefficients. Here’s the minimal example:
using AbstractAlgebra
# Integer coefficients (works fine)
R, (x, y) = polynomial_ring(ZZ, [:x, :y]; internal_ordering=:degrevlex)
V = [2x*y, 3x + y]
I = Generic.Ideal(R, V) # This works
# Rational coefficients (throws an error)
R, (x, y) = polynomial_ring(QQ, [:x, :y]; internal_ordering=:degrevlex)
V = [0.1x*y, 0.1x + y]
# I = Generic.Ideal(R, V) # Error: rational coefficients are not supported
The issue arises when I use rational coefficients (QQ
or 0.1
). It seems like Generic.Ideal
doesn’t support this type of coefficient.
Question:
- Is there a known workaround to handle ideals with rational coefficients in AbstractAlgebra.jl?
- Alternatively, is there another Julia package that supports this functionality for polynomial rings?
Any suggestions or insights would be appreciated. Thanks!