Documentation

CslibFrontier.Foundations.Data.Matrix.Ryser

Ryser's Boolean-sum formula for the permanent #

Ryser's inclusion–exclusion identity expresses the permanent as a signed sum over Boolean column selectors Schauz, Theorem 1.2, p. 3. The sign is the product of 1 for each selected column and -1 for each unselected column. Each summand multiplies the selected row sums. The proof works over every commutative ring, including characteristic two and the zero ring; Schauz's section-wide convention is an integral domain of characteristic zero.

The proof expands the row product into a sum over all functions from rows to columns. Summing the signs cancels every nonsurjective function. On a finite square matrix, the surviving functions are exactly the permutations. The empty matrix has permanent 1 and contributes one empty Boolean assignment.

Main results #

References #

The proof is adapted from the saved Complexitylib development at revision 5b8acca7.

theorem Matrix.permanent_eq_ryser_bool {n : Type u_1} [Fintype n] [DecidableEq n] {R : Type u_2} [CommRing R] (A : Matrix n n R) :
A.permanent = ∑ e : n → Bool, (∏ j : n, if e j = true then 1 else -1) * ∏ i : n, ∑ j : n, if e j = true then A i j else 0

Boolean-indicator form of Ryser's inclusion–exclusion formula for the permanent Schauz, Theorem 1.2, p. 3, generalized to every commutative ring.