Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Hilbert functions of box filtrations, the torus model of GaA0×GmA1\mathbb{G}_a^{A_0} \times \mathbb{G}_m^{A_1}GaA0​​×GmA1​​, and an unmixedness property

Definition
DiazHilbertBox

by carlok · Oct 29, 2026 · Mathlib 0df444a (Lean v4.33.1)

commutative-algebradiaz-modulus-leanhilbert-functiontranscendence

Vocabulary for finite-level Hilbert functions, used by the C1.1 nodes of the Diaz modulus mission (the Hilbert-function layer of the elementary multiplicity estimate MultiplicityEstimateElem). It contains definitions and six one-line structural facts, and no theorem of substance.

Hilbert function of a filtration. Let SSS be a commutative KKK-algebra over a field KKK, and let FFF assign to each T∈NBT \in \mathbb{N}^BT∈NB a KKK-subspace F(T)F(T)F(T) of SSS. For an ideal III of SSS, boxHilb F I T is

hI(T)=dim⁡K(image of F(T) in S/I),h_I(T) = \dim_K \bigl(\text{image of } F(T) \text{ in } S/I\bigr),hI​(T)=dimK​(image of F(T) in S/I),

which is DALAG's H(I;T)=dim⁡K(F(T)+I)/IH(I; T) = \dim_K (F(T) + I)/IH(I;T)=dimK​(F(T)+I)/I (0 when the image is infinite-dimensional, as Module.finrank is).

Boxes. For a map β:σ→ι\beta : \sigma \to \iotaβ:σ→ι grouping the variables of K[Xs:s∈σ]K[X_s : s \in \sigma]K[Xs​:s∈σ] into blocks, blockBox K β T is the span of the monomials whose total degree in the variables of each block bbb is at most TbT_bTb​. The torus model is K[X,Y,Z]K[X, Y, Z]K[X,Y,Z] with variables XhX_hXh​ (h∈A0h \in A_0h∈A0​) and Yi,ZiY_i, Z_iYi​,Zi​ (i∈A1i \in A_1i∈A1​), and torusBox K A₀ A₁ T is the block box for the blocks {Xh}\{X_h\}{Xh​} and {Yi,Zi}\{Y_i, Z_i\}{Yi​,Zi​}: XhX_hXh​-degree at most ThT_hTh​, and deg⁡Yi+deg⁡Zi\deg_{Y_i} + \deg_{Z_i}degYi​​+degZi​​ at most TiT_iTi​. boxD A₀ A₁ D₀ D₁ is the multidegree equal to D0D_0D0​ on A0A_0A0​ and D1D_1D1​ on A1A_1A1​.

The torus. torusIdeal K A₀ A₁ is the ideal J0=(YiZi−1)i∈A1J_0 = (Y_i Z_i - 1)_{i \in A_1}J0​=(Yi​Zi​−1)i∈A1​​, the kernel of K[X,Y,Z]→K[GaA0×GmA1]K[X, Y, Z] \to K[\mathbb{G}_a^{A_0} \times \mathbb{G}_m^{A_1}]K[X,Y,Z]→K[GaA0​​×GmA1​​], and torusList lists its generators (for finite A1A_1A1​). torusReduced is the set of exponents of the reduced monomials XaYbZcX^a Y^b Z^cXaYbZc, those with min⁡(bi,ci)=0\min(b_i, c_i) = 0min(bi​,ci​)=0 for every iii. torusPoint x y is the point (x,y,y−1)(x, y, y^{-1})(x,y,y−1) of KA0×KA1×KA1K^{A_0} \times K^{A_1} \times K^{A_1}KA0​×KA1​×KA1​ for x∈KA0x \in K^{A_0}x∈KA0​ and y∈(K×)A1y \in (K^\times)^{A_1}y∈(K×)A1​. For finite A0,A1A_0, A_1A0​,A1​ and coefficients cτ,sc_{\tau, s}cτ,s​ indexed by τ∈{0,…,D0}A0\tau \in \{0, \dots, D_0\}^{A_0}τ∈{0,…,D0​}A0​ and s∈{0,…,2D1}A1s \in \{0, \dots, 2D_1\}^{A_1}s∈{0,…,2D1​}A1​, torusCoeffPoly D₀ D₁ c is

Pc=∑τ,scτ,s Xτ∏i∈A1Yi(si−D1)+Zi(D1−si)+,P_c = \sum_{\tau, s} c_{\tau, s}\, X^\tau \prod_{i \in A_1} Y_i^{(s_i - D_1)_+} Z_i^{(D_1 - s_i)_+},Pc​=τ,s∑​cτ,s​Xτi∈A1​∏​Yi(si​−D1​)+​​Zi(D1​−si​)+​​,

the polynomial whose value at torusPoint x y is ∑cτ,s xτ∏iyisi−D1\sum c_{\tau, s}\, x^\tau \prod_i y_i^{s_i - D_1}∑cτ,s​xτ∏i​yisi​−D1​​.

Unmixedness. UnmixedHeight S is the proposition: for every weakly regular sequence r1,…,rkr_1, \dots, r_kr1​,…,rk​ of SSS, every associated prime of S/(r1,…,rk)S/(r_1, \dots, r_k)S/(r1​,…,rk​) has height at most kkk. For S=K[X1,…,Xn]S = K[X_1, \dots, X_n]S=K[X1​,…,Xn​] this follows from Macaulay's unmixedness theorem as recalled in DALAG §8.2.1; here it is only a definition, carried as a hypothesis where it is used.

Structural facts. boxD evaluates to D0D_0D0​ on A0A_0A0​ and to D1D_1D1​ on A1A_1A1​; blockBox is monotone in TTT and contains 111 at T=0T = 0T=0; torusList has length ∣A1∣|A_1|∣A1​∣; and J0J_0J0​ is the ideal generated by torusList.

Definition code
import Mathlib

namespace DiazModulus

/-! # Hilbert functions of box filtrations, and the torus model

The vocabulary of C1.1, the finite-level Hilbert-function layer of the elementary
multiplicity estimate (DALAG Ch. 5 and 8 at finite level, no Hilbert polynomials).

* `boxHilb F I T`: the Hilbert function `h_I(T) = dim_K image(F T → S ⧸ I)` of a filtration
  `F : (B → ℕ) → Submodule K S` of a commutative `K`-algebra `S` (DALAG's `H(I; T)`).
* `blockBox K β T`: for a block map `β : σ → ι`, the span of the monomials of
  `MvPolynomial σ K` whose degree in each block `b` is at most `T b`.
* The model `K[X, Y, Z] = MvPolynomial (A₀ ⊕ (A₁ × Bool)) K`, with `Sum.inr (i, true)` for
  `Y_i` and `Sum.inr (i, false)` for `Z_i`: the per-coordinate box `torusBox`, the torus
  ideal `torusIdeal` = `(Y_i Z_i − 1)_i` and its generators `torusList`, the reduced
  monomials `torusReduced`, hME's multidegree `boxD`, the polynomial `torusCoeffPoly` of a
  coefficient vector on hME's box, and the point `torusPoint x y = (x, y, y⁻¹)`.
* `UnmixedHeight S`: Macaulay's unmixedness (U) in the form the regular chain consumes.

Only definitions and structural lemmas (each a few lines) live here. -/

/-- The finite-level Hilbert function `h_I(T) = dim_K image(F T → S ⧸ I)` of a filtration `F`
(DALAG's `H(I; T)`). -/
noncomputable def boxHilb {K S B : Type*} [Field K] [CommRing S] [Algebra K S]
    (F : (B → ℕ) → Submodule K S) (I : Ideal S) (T : B → ℕ) : ℕ :=
  Module.finrank K ↥((F T).map (Ideal.Quotient.mkₐ K I).toLinearMap)

/-- The block box: monomials of `MvPolynomial σ K` whose degree in each block `b` of the block
map `β : σ → ι` is at most `T b`. -/
noncomputable def blockBox (K : Type*) {σ ι : Type*} [Field K] (β : σ → ι) (T : ι → ℕ) :
    Submodule K (MvPolynomial σ K) :=
  MvPolynomial.restrictSupport K {m : σ →₀ ℕ | ∀ b, m.mapDomain β b ≤ T b}

/-- The per-coordinate box of `K[X, Y, Z] = MvPolynomial (A₀ ⊕ (A₁ × Bool)) K`: `X_h`-degree
`≤ T (inl h)` and `deg Y_i + deg Z_i ≤ T (inr i)`; the block box of `Sum.map id Prod.fst`. -/
noncomputable def torusBox (K A₀ A₁ : Type*) [Field K] (T : A₀ ⊕ A₁ → ℕ) :
    Submodule K (MvPolynomial (A₀ ⊕ (A₁ × Bool)) K) :=
  blockBox K (Sum.map id Prod.fst) T

/-- The torus ideal `(Y_i Z_i − 1)_i`, the kernel of `K[X, Y, Z] → K[𝔾ₐ^{A₀} × 𝔾ₘ^{A₁}]`. -/
noncomputable def torusIdeal (K A₀ A₁ : Type*) [Field K] :
    Ideal (MvPolynomial (A₀ ⊕ (A₁ × Bool)) K) :=
  Ideal.span (Set.range fun i : A₁ =>
    (MvPolynomial.X (Sum.inr (i, true)) * MvPolynomial.X (Sum.inr (i, false)) - 1 :
      MvPolynomial (A₀ ⊕ (A₁ × Bool)) K))

/-- The torus generators `(Y_i Z_i − 1)_i` as a list (for `Ideal.ofList`). -/
noncomputable def torusList (K A₀ A₁ : Type*) [Field K] [Fintype A₁] :
    List (MvPolynomial (A₀ ⊕ (A₁ × Bool)) K) :=
  (Finset.univ : Finset A₁).toList.map fun i =>
    (MvPolynomial.X (Sum.inr (i, true)) * MvPolynomial.X (Sum.inr (i, false)) - 1 :
      MvPolynomial (A₀ ⊕ (A₁ × Bool)) K)

/-- The reduced monomials `X^a Y^b Z^c` of `K[X, Y, Z]`: `min(b_i, c_i) = 0` for every `i`. -/
def torusReduced (A₀ A₁ : Type*) : Set (A₀ ⊕ (A₁ × Bool) →₀ ℕ) :=
  {m | ∀ i, m (Sum.inr (i, true)) = 0 ∨ m (Sum.inr (i, false)) = 0}

/-- hME's multidegree `(D₀, …, D₀; D₁, …, D₁)`. -/
def boxD (A₀ A₁ : Type*) (D₀ D₁ : ℕ) : A₀ ⊕ A₁ → ℕ :=
  Sum.elim (fun _ : A₀ => D₀) (fun _ : A₁ => D₁)

/-- The polynomial `P_c = Σ_l c_l X^τ Π_i Y_i^{(s_i − D₁)₊} Z_i^{(D₁ − s_i)₊}` of a coefficient
vector `c` on hME's box `l = (τ, s) ∈ (A₀ → Fin (D₀ + 1)) × (A₁ → Fin (2 D₁ + 1))`. -/
noncomputable def torusCoeffPoly {K A₀ A₁ : Type*} [Field K] [Fintype A₀] [Fintype A₁]
    [DecidableEq A₀] [DecidableEq A₁] (D₀ D₁ : ℕ)
    (c : (A₀ → Fin (D₀ + 1)) × (A₁ → Fin (2 * D₁ + 1)) → K) :
    MvPolynomial (A₀ ⊕ (A₁ × Bool)) K :=
  ∑ l, c l • ((∏ h, MvPolynomial.X (Sum.inl h) ^ (l.1 h : ℕ)) *
    ∏ i, (MvPolynomial.X (Sum.inr (i, true)) ^ ((l.2 i : ℕ) - D₁) *
      MvPolynomial.X (Sum.inr (i, false)) ^ (D₁ - (l.2 i : ℕ))) :
        MvPolynomial (A₀ ⊕ (A₁ × Bool)) K)

/-- The point `(x, y, y⁻¹)` of `K^{A₀} × K^{A₁} × K^{A₁}` over `(x, y) ∈ K^{A₀} × (K^×)^{A₁}`. -/
def torusPoint {K A₀ A₁ : Type*} [Field K] (x : A₀ → K) (y : A₁ → Kˣ) : A₀ ⊕ (A₁ × Bool) → K :=
  Sum.elim x fun p : A₁ × Bool => if p.2 = true then (y p.1 : K) else (((y p.1)⁻¹ : Kˣ) : K)

/-- Macaulay's unmixedness (U) in the shape C1.1 consumes: every associated prime of the
quotient by a weakly regular list has height at most the length of the list. -/
def UnmixedHeight (S : Type*) [CommRing S] : Prop :=
  ∀ rs : List S, RingTheory.Sequence.IsWeaklyRegular S rs →
    ∀ p ∈ associatedPrimes S (S ⧸ Ideal.ofList rs), p.height ≤ (rs.length : ℕ∞)

@[simp] theorem boxD_inl {A₀ A₁ : Type*} (D₀ D₁ : ℕ) (h : A₀) :
    boxD A₀ A₁ D₀ D₁ (Sum.inl h) = D₀ := rfl

@[simp] theorem boxD_inr {A₀ A₁ : Type*} (D₀ D₁ : ℕ) (i : A₁) :
    boxD A₀ A₁ D₀ D₁ (Sum.inr i) = D₁ := rfl

theorem blockBox_mono (K : Type*) {σ ι : Type*} [Field K] (β : σ → ι) :
    Monotone (blockBox K β) := fun _ _ hT =>
  MvPolynomial.restrictSupport_mono K fun _ hm b => (hm b).trans (hT b)

theorem one_mem_blockBox_zero (K : Type*) {σ ι : Type*} [Field K] (β : σ → ι) :
    (1 : MvPolynomial σ K) ∈ blockBox K β 0 := by
  rw [blockBox, MvPolynomial.mem_restrictSupport_iff, MvPolynomial.support_one]
  intro m hm
  simp_all

theorem torusList_length (K A₀ A₁ : Type*) [Field K] [Fintype A₁] :
    (torusList K A₀ A₁).length = Fintype.card A₁ := by
  simp [torusList, Finset.length_toList]

theorem torusIdeal_eq_ofList (K A₀ A₁ : Type*) [Field K] [Fintype A₁] :
    torusIdeal K A₀ A₁ = Ideal.ofList (torusList K A₀ A₁) := by
  unfold torusIdeal torusList Ideal.ofList
  congr 1
  ext f
  simp

end DiazModulus
Source
M. Waldschmidt, Diophantine Approximation on Linear Algebraic Groups, Grundlehren der mathematischen Wissenschaften 326, Springer, 2000, Chapter 8 (by D. Roy): the Hilbert function H(I; D) of an ideal, §8.2.2 (p. 235), and of an ideal of K[G] through K[X, Y, Z], §8.3.1; rank, unmixed ideals and Macaulay's theorem, §8.2.1 (pp. 234–235, citing Zariski–Samuel, Commutative Algebra, Th. 26, §8, Ch. VII). Written here at finite level and in coordinates, with no Hilbert polynomial. C1.1 of the Diaz modulus mission. Definitions in coordinates: 29 October 2026 (C. Perassi).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me