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

Allow constructing ideals with no generators #784

Closed
joschmitt opened this issue Nov 3, 2021 · 1 comment
Closed

Allow constructing ideals with no generators #784

joschmitt opened this issue Nov 3, 2021 · 1 comment

Comments

@joschmitt
Copy link
Member

There is the following inconvenience when working with ideals in multivariate polynomial rings (MPolyIdeal):

julia> R, (x, y) = PolynomialRing(QQ, [ "x", "y" ])
(Multivariate Polynomial Ring in x, y over Rational Field, fmpq_mpoly[x, y])

julia> ideal(R, elem_type(R)[])
ERROR: AssertionError: length(g) > 0
Stacktrace:
 [1] ideal(g::Vector{fmpq_mpoly})
   @ Oscar ~/.julia/dev/Oscar/src/Rings/mpoly-ideals.jl:40
 [2] ideal(R::FmpqMPolyRing, g::Vector{fmpq_mpoly})
   @ Oscar ~/.julia/dev/Oscar/src/Rings/mpoly-ideals.jl:46
 [3] top-level scope
   @ REPL[33]:1

I would expect this to give the zero ideal in R instead (the ideal with no generators).
Note that I of course do not expect ideal(elem_type(R)[]) to do anything but error.

@joschmitt
Copy link
Member Author

This is settled by #821 as far as I'm concerned. Feel free to close the issue.

@thofma thofma closed this as completed Nov 17, 2021
thofma pushed a commit that referenced this issue Nov 18, 2021
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

2 participants