Skip to content

Commit

Permalink
Fixes #795
Browse files Browse the repository at this point in the history
The shortcut for zero-ideals used the wrong order.
  • Loading branch information
thofma authored and fingolfin committed Nov 12, 2021
1 parent 87ec163 commit 58d8ae7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion experimental/ModStd/ModStdQ.jl
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ end
function Oscar.groebner_basis_with_transform(I::MPolyIdeal{fmpq_mpoly}; ordering::Symbol = :degrevlex, complete_reduction::Bool = true, use_hilbert::Bool = false)

if iszero(I)
I.gb = BiPolyArray(base_ring(I), fmpq_mpoly[], isGB = true)
I.gb = BiPolyArray(base_ring(I), fmpq_mpoly[], isGB = true, keep_ordering = false)
singular_assure(I.gb)
return fmpq_mpoly[], matrix(base_ring(I), ngens(I), 0, fmpq_mpoly[])
end
Expand Down
1 change: 1 addition & 0 deletions src/Rings/mpoly-ideals.jl
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,7 @@ false
```
"""
function Base.:(==)(I::MPolyIdeal, J::MPolyIdeal)
I === J && return true
return issubset(I, J) && issubset(J, I)
end

Expand Down
7 changes: 7 additions & 0 deletions test/Rings/mpoly-test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -262,3 +262,10 @@ end
end
@test Q == I
end

@testset "#795" begin
R, = QQ["x", "y"]
I = ideal(R, zero(R))
@test issubset(I, I)
@test I == I
end

0 comments on commit 58d8ae7

Please sign in to comment.