From 60e781738f6f0e7a5e09b36b95178028dc4c876c Mon Sep 17 00:00:00 2001 From: John Abbott Date: Mon, 31 Jul 2023 11:07:57 +0200 Subject: [PATCH] Check dim of shifts in hilbert_series --- src/module/module.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/module/module.jl b/src/module/module.jl index 534ced548..c67d72f1a 100644 --- a/src/module/module.jl +++ b/src/module/module.jl @@ -495,6 +495,7 @@ function hilbert_series(M::smodule{spoly{T}}, w::Vector{<:Integer}, shifts::Vect M.isGB || error("Not a Groebner basis") R = base_ring(M) length(w) == nvars(R) || error("wrong number of weights") + length(shifts) == rank(M) || error("wrong number of weights") all(x -> x>0, w) || error("weights must be positive") w = convert(Vector{Int32}, w) shifts = convert(Vector{Int32}, shifts)