Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
joschmitt committed Aug 21, 2024
1 parent 38cc0a9 commit a24b598
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/Rings/mpoly-graded.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1503,6 +1503,7 @@ mutable struct HilbertData
@req all(is_homogeneous, gens(I)) "The generators of the ideal must be homogeneous"

G = groebner_assure(I)
singular_assure(I)
cf = Singular.hilbert_series_data(G.S, W)
return new(cf, W, I)
end
Expand Down
6 changes: 3 additions & 3 deletions src/Rings/mpoly-ideals.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2069,7 +2069,7 @@ function grassmann_pluecker_ideal(subspace_dimension::Int, ambient_dimension::In
o = degrevlex(base)

return ideal(IdealGens(base,base.(gens(I)), o;
keep_ordering=true,
keep_ordering=false,
isReduced=true,
isGB=true))
end
Expand Down Expand Up @@ -2112,12 +2112,12 @@ function grassmann_pluecker_ideal(ring::MPolyRing,
return coeff_ring(numerator(c))
end
if !is_graded(ring)
ring, _ = grade(ring)
ring, _ = grade(ring)
end
h = hom(base_ring(I), ring, coeffmap, gens(ring))
converted_generators = elem_type(ring)[h(g) for g in groebner_basis(I; ordering = degrevlex(base_ring(I)))]
ideal(IdealGens(ring, converted_generators, o;
keep_ordering=true,
keep_ordering=false,
isReduced=true,
isGB=true))
end
Expand Down
15 changes: 12 additions & 3 deletions test/Rings/mpoly.jl
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,18 @@ end
end

@testset "Grassmann Plücker Relations" begin
R, x = graded_polynomial_ring(residue_ring(ZZ, 7)[1], "x" => (1:2, 1:3))
test_ideal =ideal([x[1, 2]*x[2, 2] + 6*x[2, 1]*x[1, 3] + x[1, 1]*x[2, 3]])
@test grassmann_pluecker_ideal(R, 2, 4) == test_ideal
R, x = graded_polynomial_ring(residue_ring(ZZ, 7)[1], "x" => (1:2, 1:3))
test_ideal =ideal([x[1, 2]*x[2, 2] + 6*x[2, 1]*x[1, 3] + x[1, 1]*x[2, 3]])
@test grassmann_pluecker_ideal(R, 2, 4) == test_ideal

# Issue #4018
I = grassmann_pluecker_ideal(2, 5)
@test degree(I) == 5
@test dim(I) == 7
R, x = graded_polynomial_ring(GF(7), 10, "x")
I = grassmann_pluecker_ideal(R, 2, 5)
@test degree(I) == 5
@test dim(I) == 7
end

@testset "IdealGens" begin
Expand Down

0 comments on commit a24b598

Please sign in to comment.