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:
- Forward (
T_levelCanonical) + weight (T_card):Tmaps each portrait to a level-canonical(d−1)-subset, i.e.Set.MapsTo T {P | Portrait} {U | U.card = d−1 ∧ …}. - Injectivity (
T_injOn) and Surjectivity (T_surjOn) upgrade this toSet.BijOn. Set.BijOn.equivthen gives an equivalence of the two subtypes, so theirFintype.cards agree; composing with the denominator countcard_levelCanonical_mulyields the result.
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.
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).
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.