/-
Copyright 2026 The Formal Conjectures Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-/modulepublicimportMathlib.LinearAlgebra.Dimension.FinitepublicimportMathlib.RingTheory.MvPolynomial.Homogeneous
Hilbert functions, lex ideals and ideals of pure powers
Let k be a field and let S = k[x₁, …, xₙ], graded by total degree, with the variables ordered
by x₁ > x₂ > ⋯ > xₙ. This file defines the Hilbert function d ↦ dim_k I_d of an ideal I of
S, monomial ideals, lex ideals, and the ideal generated by pure powers of the first c
variables. The sum of a lex ideal and an ideal of pure powers is a lex-plus-powers ideal.
Main definitions
MvPolynomial.hilbertFunction: the Hilbert function d ↦ dim_k I_d of an ideal I.
MvPolynomial.IsMonomialIdeal: the ideal is generated by monomials.
MvPolynomial.IsLexIdeal: a monomial ideal that, in each degree, contains every monomial that
is lexicographically larger than one of its monomials.
MvPolynomial.purePowersIdeal: the ideal (x₁ ^ d₁, …, x_c ^ d_c).
References
C. A. Francisco, B. P. Richert, Lex-plus-powers ideals, in Syzygies and Hilbert functions,
Lect. Notes Pure Appl. Math. 254, 113-144.
The Hilbert function of a homogeneous ideal I of $k[x_1, \dots, x_n]$, sending d to
$\dim_k I_d$. This is finite, since $I_d$ is a subspace of the finite dimensional space $S_d$.
Two homogeneous ideals have the same Hilbert function in this sense if and only if the graded
quotients by them do, since $\dim_k (S/I)_d = \dim_k S_d - \dim_k I_d$.
A lex ideal is a monomial ideal L such that for monomials u, v of the same degree with
u larger than v in the lexicographic order, v ∈ L implies u ∈ L. Here the variables are
ordered by $x_1 > x_2 > \dots > x_n$, which for exponent vectors is toLex.