← All papers
First page of Formalizing Gröbner Basis Theory in Lean

Formalizing Gröbner Basis Theory in Lean

Junyu Guo, Hao Shen, Junqi Liu, Lihong Zhi

math.AC Feb 13, 2026 · v1
Formalizes Gröbner basis theory in Lean 4 atop Mathlib's multivariate polynomial and monomial-order infrastructure.
We present a formalization of Gröbner basis theory in Lean 4, built on top of Mathlib's infrastructure for multivariate polynomials and monomial orders. Our development covers the core foundations of Gröbner basis theory, including polynomial division with remainder, Buchberger's criterion, and the existence and uniqueness of reduced Gröbner bases. We develop the theory uniformly for polynomial rings indexed by arbitrary types, enabling the treatment of Gröbner bases in rings with infinitely many variables. Furthermore, we connect the finite and infinite settings by showing that infinite-variable reduced Gröbner bases can be characterized via reduced Gröbner bases on finite-variable subrings through monomial-order embeddings and filter-based limit constructions.

Groebner basis theory is fundamental to computational algebra, but lacked a comprehensive formalization in Lean 4 that covers the core foundations uniformly for polynomial rings indexed by arbitrary types.

The authors formalize Groebner basis theory in Lean 4 on top of Mathlib's multivariate polynomial infrastructure. The development covers polynomial division with remainder, Buchberger's criterion, and the existence and uniqueness of reduced Groebner bases. The theory is developed uniformly for polynomial rings indexed by arbitrary types, enabling treatment of infinitely many variables. They connect finite and infinite settings by showing infinite-variable Groebner bases reduce to finite cases.

The formalization provides a complete treatment of core Groebner basis theory in Lean 4, including the reduction from infinite to finite variable cases. It integrates with Mathlib's existing monomial order infrastructure and establishes the key algorithmic foundations (division, Buchberger's criterion, reduced bases).