Formalization of Herzog, Hibi, Hreinsdóttir, Kahle & Rauh · 2010

Binomial Edge Ideals

A machine-checked companion to Binomial edge ideals and conditional independence statements. Read the paper alongside the formal proofs, and follow any theorem down to the Lean code that verifies it.

What Is A Binomial Edge Ideal?

To a simple graph $G$ on vertices ${1, \dots, n}$, the binomial edge ideal $J_G$ attaches one binomial per edge:

\[J_G \;=\; \langle\, x_i y_j - x_j y_i \;:\; \{i, j\} \in E(G) \,\rangle \;\subseteq\; K[x_1, \dots, x_n, y_1, \dots, y_n].\]

The paper approaches these ideals from three sides: when the given generators already form a Gröbner basis, how the prime decomposition is controlled by the graph, and how the same ideals arise from conditional independence statements in algebraic statistics. Every result on this site links to the Lean file that verifies it.

1 2 3 4
$f_{12} \,=\, x_1 y_2 - x_2 y_1$
$f_{23} \,=\, x_2 y_3 - x_3 y_2$
$f_{34} \,=\, x_3 y_4 - x_4 y_3$
$J_{P_4} \,=\, \langle\, f_{12},\; f_{23},\; f_{34}\, \rangle$
A path on four vertices, and the three quadratic generators of its binomial edge ideal.

Definitions In Lean

These are the formal counterparts of the objects above. The first three live in BEI/Definitions.lean and the last in BEI/MonomialOrder.lean. The Foundations page tabulates the supporting infrastructure (generators $f_{ij}$, leading-term lemmas, the closure construction).

variable {K : Type*} [Field K] {V : Type*} [LinearOrder V]

def BinomialEdgeVars (V : Type*) := V  V

def binomialEdgeIdeal (G : SimpleGraph V) :
    Ideal (MvPolynomial (BinomialEdgeVars V) K) :=
  Ideal.span { f |  i j, G.Adj i j  i < j  f = x i * y j - x j * y i }

def IsClosedGraph (G : SimpleGraph V) : Prop :=
  ( {i j k : V}, i < j  i < k  j  k  G.Adj i j  G.Adj i k  G.Adj j k) 
  ( {i j k : V}, i < k  j < k  i  j  G.Adj i k  G.Adj j k  G.Adj i j)

noncomputable def binomialEdgeMonomialOrder :
    MonomialOrder (BinomialEdgeVars V) := MonomialOrder.lex

In order: the index type for the two copies of variables $x_i$, $y_i$ (encoded as $V \oplus V$); the ideal $J_G$; the closed-graph condition that characterizes when the quadratic generators form a Gröbner basis (Theorem 1.1); and the lexicographic monomial order from the paper, $x_1 > \cdots > x_n > y_1 > \cdots > y_n$.

Sections

A Taste Of The Formalization

Each card has the paper’s statement on the left and the formal Lean theorem on the right. Click through to open the Lean file and read the full proof.