Hilbert functions, formal series and numerical values
Fix a \(k\)-vector space \(M\) with integer-indexed homogeneous subspaces \(M_n\). For a \(k\)-subspace \(S\subseteq M\), the source defines \[ \operatorname{piece}(S,n)=\{m\in M_n:m\in S\}. \] This is a subspace of the fixed ambient component \(M_n\). Its underlying vectors form \(S\cap M_n\).
The code uses the natural-number finite rank of each intersection piece. When these pieces are finite-dimensional, this is their usual vector-space dimension, giving the Hilbert function \[ h_S(n)=\dim_k(S\cap M_n). \] For \(S=M\), this is the usual component dimension \(h_M(n)=\dim_kM_n\).
Formal series
For a nonnegative grading, write \[ \operatorname{Hilb}(M;z)=\sum_{n\ge0}h_M(n)z^n. \] The symbol \(z\) is formal: the series specifies a sequence of coefficients. A grading bounded below gives a formal Laurent series, with only finitely many possible negative exponents.
If \(S\) is homogeneous, its intersection pieces form the grading of \(S\), so they define its Hilbert series in the same way. The local piece construction also applies to arbitrary subspaces of the ambient vector space.
Numerical terms and values
For a real parameter \(q\), the local definitions are \[ \operatorname{term}(S,q,n)=h_S(n)q^n,\qquad \operatorname{value}(S,q)=\sum_{n\in\mathbb Z}h_S(n)q^n. \] The implementation uses a real infinite sum for value. Summability means that finite partial sums approach a fixed real number as their finite index sets increase. For nonnegative terms this is equivalent to boundedness of those finite sums. The comparison theorems supply positivity and summability hypotheses.
We write \(H_S(q)\) for this numerical Hilbert value when using those theorems. For finite graded modules over \(k[X_1,\ldots,X_N]\), convergence and finite-dimensional pieces are proved for every \(0<q<1\). Homogeneous free bases give an explicit formula; finite homogeneous free covers give convergence for general finite modules.
The OpenAI notes use \(\operatorname{Hilb}(M;q)\) in these convergent numerical comparisons. Formal coefficient identities can also be evaluated at such a \(q\).
The running module
For \(A=k[X]\) and \(M=A\oplus A(2)\), \[ M_n=A_n\oplus A_{n-2}. \] The dimensions are \(1,1,2,2,\ldots\). Thus \[ \operatorname{Hilb}(M;z)=1+z+2z^2+2z^3+\cdots, \] and, for \(0<q<1\), \[ H_M(q)=\frac{1+q^2}{1-q}. \] The numerator counts the two module generators in degrees zero and two. The full Hilbert function also counts their polynomial multiples.
For \(A/(X)\), only the constant class survives, so its Hilbert function is one at degree zero and zero elsewhere, and its value is one.
Two presentations of a submodule piece
For an \(A\)-submodule \(S\), the family of intersections can be represented inside \(S\) itself or inside the fixed ambient pieces \(M_n\). The corresponding degree-\(n\) vector spaces identify by retaining the same vector and exchanging the two membership conditions \(m\in S\), \(m\in M_n\).
Thus their finite dimensions, terms and Hilbert values agree. This is the source's subPieceEquiv and value_subPiece conversion.
Relation to the OpenAI notes
Explicit convergence and degreewise comparison.
OpenAI notes: The graded-rank paragraph gives \(\operatorname{Hilb}(M;q)=\operatorname{grk}_A(M;q)/(1-q)^N\) for a homogeneous free basis. The comparison evaluates Hilbert series at \(0<q<1\), uses the factor \(1-q\) for a degree-one scalar quotient, and detects equality through a positive quotient deficit. sec:background, eq:state, eq:image-equality.
Lean (primary): The implementation defines real integer-indexed terms from the finite ranks of intersections with ambient pieces. Finite homogeneous covers prove piece finiteness and summability. Degreewise exactness proves the scalar-quotient factor, and inclusion plus homogeneity of the larger subspace turns one equal positive Hilbert value into equality. ModuleAlgebra:506, HilbertSeries:245, Support:1186, ModuleAlgebra:549.
Role in the proof: The KB distinguishes the formal coefficient series, its convergent real value and the free-module basis-degree polynomial. The factor \((1-q)^N\) removes the coefficient-ring contribution; \(1-q\) records quotienting by a regular degree-one label.
References
The local source declarations below give the construction and proof.
Lean formalization
OAI.KLInvariance.Hilbert.piece: ModuleAlgebra.lean:500.
OAI.KLInvariance.Hilbert.term: ModuleAlgebra.lean:503.
OAI.KLInvariance.Hilbert.value: ModuleAlgebra.lean:506.
OAI.KLInvariance.Hilbert.subPieceEquiv: HilbertSeries.lean:434.
OAI.KLInvariance.Hilbert.term_subPiece: HilbertSeries.lean:443.
OAI.KLInvariance.Hilbert.value_subPiece: HilbertSeries.lean:447.
Used by
- Finite graded polynomial modules have convergent Hilbert values
- Degreewise quotient defects of a subspace inclusion
- Hilbert additivity for the image of a homogeneous submodule
- Hilbert values of a regular homogeneous scalar image and quotient
- The polynomial-ring Hilbert series from monomial degrees
- The Hilbert value of an actual saturated image
- Homogeneous image pieces and their Hilbert degree shift
- Kernel Hilbert values and normalized states
- Hilbert additivity for homogeneous exact sequences
- Equality and strict inclusion detected by Hilbert values
- Hilbert series and values of a homogeneous free basis