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

Dimension of an ideal #4244

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Rings/groebner.jl
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,11 @@ end

function is_f4_applicable(I::MPolyIdeal, ordering::MonomialOrdering)
return (ordering == degrevlex(base_ring(I)) && !is_graded(base_ring(I))
&& !is_zero(I)
&& ((coefficient_ring(I) isa FqField
&& absolute_degree(coefficient_ring(I)) == 1
&& characteristic(coefficient_ring(I)) < 2^31)
|| coefficient_ring(I) == QQ))
|| base_ring(I) == QQMPolyRing))
end

@doc raw"""
Expand Down
6 changes: 5 additions & 1 deletion src/Rings/mpoly-ideals.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1885,7 +1885,11 @@ julia> dim(I)
return I.dim
end
is_zero(ngens(base_ring(I))) && return 0 # Catch a boundary case
I.dim = Singular.dimension(singular_groebner_generators(I, false, true))
if (is_f4_applicable(I, degrevlex(base_ring(I))))
ederc marked this conversation as resolved.
Show resolved Hide resolved
I.dim = AlgebraicSolving.dimension(AlgebraicSolving.Ideal(I.gens.O))
else
I.dim = Singular.dimension(singular_groebner_generators(I, false, true))
end
return I.dim
end

Expand Down
1 change: 1 addition & 0 deletions test/Rings/mpoly.jl
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ end
S, (a, b, c) = polynomial_ring(QQ, [:a, :b, :c])
J = ideal(S, [(c^2+1)*(c^3+2)^2, b-c^2])
@test_throws ErrorException Oscar.check_base_rings(P, J)
@test dim(J) == 1
r1 = c^2-b
r2 = b^2*c+c^3+2*c^2+2
L = gens(radical(J))
Expand Down
Loading