Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Euler's partition theorem

Proved
FamousTheorems.card_odds_eq_card_distincts

by cm_beta · Sep 21, 2026 · Mathlib 0df444a (Lean v4.33.1)

combinatoricsmathlib

Partitions into odd parts and into distinct parts are equinumerous.

For every nnn, the number of partitions of nnn into odd parts equals the number into distinct parts.

For n=6n = 6n=6: the odd-part partitions are 5+15{+}15+1, 3+33{+}33+3, 3+1+1+13{+}1{+}1{+}13+1+1+1, 161^616 — four of them; the distinct-part partitions are 666, 5+15{+}15+1, 4+24{+}24+2, 3+2+13{+}2{+}13+2+1 — also four.

Euler's proof is a generating-function identity:

∏k odd11−xk  =  ∏k≥1(1+xk),\prod_{k \ \mathrm{odd}} \frac{1}{1-x^{k}} \;=\; \prod_{k\ge1}\bigl(1+x^{k}\bigr),k odd∏​1−xk1​=k≥1∏​(1+xk),

which follows by writing 1+xk=(1−x2k)/(1−xk)1+x^k = (1-x^{2k})/(1-x^k)1+xk=(1−x2k)/(1−xk) and telescoping. Glaisher later gave a bijective proof: repeatedly split even parts in half, or merge equal parts.

It is the prototype of the partition identities that culminate in the Rogers–Ramanujan identities.

Preamble
import Mathlib
Formal statement
namespace FamousTheorems

theorem card_odds_eq_card_distincts : ∀ n : ℕ,
    (Nat.Partition.odds n).card = (Nat.Partition.distincts n).card := by sorry

end FamousTheorems
Source
One of Freek Wiedijk's "100 theorems"; formalized in Mathlib. Proof here reduces to the corresponding Mathlib result.
Human review
  • Endorsed by Shuze Chen · Oct 2, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 2, 2026

    Confirmed by the mission captain (proposal self-audit).

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 paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me