Stars and bars: the number of with is
ProvedDiazModulus.card_multiIndexcommutative-algebradiaz-modulus-leanmultiplicity-estimatetranscendence
For , the number of with is .
Proof. Adding the slack as an extra entry is a bijection onto the tuples in of sum , counted by stars and bars.
Novelty. Classical; routine formalisation.
Preamble
import Mathlib
Formal statement
namespace DiazModulus
theorem card_multiIndex (n S : ℕ) :
(Finset.univ.filter fun α : Fin n → Fin (S + 1) => ∑ i, (α i : ℕ) ≤ S).card = (S + n).choose n := by
sorry
end DiazModulus
Source
Classical combinatorics: stars and bars. C1.3 of the Diaz modulus mission. Formal proof: Diaz modulus mission, 30 October 2026 (C. Perassi).