Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Count a fixed block total by a binomial coefficient

Proved
OAI.PiExponent.LiteralAnalytic.blockFiber_card

by Eyal1990 · Oct 16, 2026 · Mathlib 0df444a (Lean v4.33.1)

number-theoryopenai-pi-exponent-017

The number of assignments of total n to m slots is the weak-composition coefficient. This includes m = 0: the fiber has one element for n = 0 and is empty for positive n, matching the natural-number binomial expression.

Preamble
import Mathlib.Tactic

open scoped BigOperators
Formal statement
theorem OAI.PiExponent.LiteralAnalytic.blockFiber_card
    (m n : ℕ) :
    Fintype.card
      {g : Fin m → Fin (n + 1) //
        Finset.univ.sum (fun j => (g j).val) = n} =
      Nat.choose (n + m - 1) n := by sorry
Source
https://github.com/openai/math/blob/adc7f1241b42e322a6451854ab7e4b4c146bf78a/lean/OAI/NumberTheory/PiExponent/Analysis/LiteralAnalyticSummand.lean#L163-L175

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me