Documentation

LeanPool.CriticalPortraits.Census

The headline census theorem: #{portraits} = C(N, d−1) / d for all d #

This module assembles the four proved, sorry-free ingredients into the final count. With positions in ZMod N (N = d*m) and the delete-min map T:

theorem CriticalPortraits.card_portraits_mul {d m : } (hd : 0 < d) (hm : 0 < m) :
d * Fintype.card { P : Finset (Finset (ZMod (d * m))) // Portrait d m P } = (d * m).choose (d - 1)

PRIMARY (multiplicative form). d · #{portraits} = C(d*m, d-1).

The cleanest statement: the count of portraits times d equals the binomial numerator. Proved by the T-bijection onto level-canonical (d−1)-subsets composed with card_levelCanonical_mul.

theorem CriticalPortraits.card_portraits {d m : } (hd : 0 < d) (hm : 0 < m) :
Fintype.card { P : Finset (Finset (ZMod (d * m))) // Portrait d m P } = (d * m).choose (d - 1) / d

HEADLINE CENSUS THEOREM. #{portraits} = C(d*m, d-1) / d for all d (and all m).

The number of degree-d portraits at level m equals C(d·m, d−1) / d. Follows from the multiplicative form by Nat.div_eq_of_eq_mul_right (exact -division, no remainder).

theorem CriticalPortraits.d_dvd_choose {d m : } (hd : 0 < d) (hm : 0 < m) :
d (d * m).choose (d - 1)

Exactness of the / d. The denominator divides the numerator: d ∣ C(d*m, d-1). Hence the / d in card_portraits is exact -division (the count is a genuine integer), not floor rounding — the witness is the portrait count itself, read off card_portraits_mul.