Documentation

LeanPool.PentagonalNumberTheoremAnalytic.Franklin.Lemmas

Pentagonal Number Theorem — Lemmas #

This file contains the key lemmas for the Pentagonal Number Theorem, following Franklin's involution argument.

Main results #

The pentagonal identity a * (3 * a - 1) = 3 * a ^ 2 - a, stated without truncated subtraction so that omega can use it.

The set smkSet(k) has exactly k elements.

theorem PentagonalNumberTheorem.Franklin.SmkSet_sum (k : ℕ) (hk : 1 ≤ k) :
(smkSet k).sum id = (3 * k ^ 2 - k) / 2

The sum of smkSet(k) equals (3k²-k)/2.

The set spkSet(k) has exactly k elements.

theorem PentagonalNumberTheorem.Franklin.SpkSet_sum (k : ℕ) (hk : 1 ≤ k) :
(spkSet k).sum id = (3 * k ^ 2 + k) / 2

The sum of spkSet(k) equals (3k²+k)/2.

A nonempty distinct partition whose top run reaches all the way down to its base is the whole interval Icc (partBase S) (partMax S).

A nonempty special partition of n is exactly the interval Icc b m running from its base b to its max m. Consequently its slope is the full length m - b + 1 of that interval, and 2 * n = s * (b + m) by Gauss' summation formula.

theorem PentagonalNumberTheorem.Franklin.DPspecial_empty_of_nonpent (n : ℕ) (hn : 1 ≤ n) (h1 : ∀ (k : ℕ), 1 ≤ k → 2 * n ≠ 3 * k ^ 2 - k) (h2 : ∀ (k : ℕ), 1 ≤ k → 2 * n ≠ 3 * k ^ 2 + k) :

For non-pentagonal n ≥ 1, there are no special partitions.

theorem PentagonalNumberTheorem.Franklin.pent_minus_inj {a b : ℕ} (h : 3 * a ^ 2 + b = 3 * b ^ 2 + a) :
a = b

x ↦ 3x² − x is injective on ℕ, stated without truncated subtraction.

theorem PentagonalNumberTheorem.Franklin.pent_plus_ne_pent_minus {j k : ℕ} (hk : 1 ≤ k) (h : 3 * j ^ 2 + j + k = 3 * k ^ 2) :

The two pentagonal families never collide: 3j² + j ≠ 3k² − k when 1 ≤ k.

For n = (3k²-k)/2 (pentagonal minus), the only special partition is smkSet(k).

The base of spkSet k is k + 1.

The largest part of spkSet k is 2 * k.

spkSet k is one single run, so its slope is its whole length k.

theorem PentagonalNumberTheorem.Franklin.pent_plus_inj {a b : ℕ} (h : a * (3 * a + 1) = 3 * b ^ 2 + b) :
a = b

The pentagonal numbers of the second kind are pairwise distinct: a ↦ a * (3 * a + 1) is injective.

theorem PentagonalNumberTheorem.Franklin.pent_minus_ne_pent_plus (c b : ℕ) :
(c + 1) * (3 * c + 2) ≠ 3 * b ^ 2 + b

No pentagonal number of the first kind is also one of the second kind: with a = c + 1, a * (3 * a - 1) = (c + 1) * (3 * c + 2) never equals b * (3 * b + 1).

For n = (3k²+k)/2 (pentagonal plus), the only special partition is spkSet(k).

The Franklin α-operation maps α-partitions into β-partitions.

The Franklin β-operation maps β-partitions into α-partitions.

The β-operation is a left inverse of the α-operation.

The α-operation is a left inverse of the β-operation.

alphaOp is injective on distinctPartitionsAlpha n, since betaOp is a left inverse.

Franklin's involution gives a bijection: |α(n)| = |β(n)|.

The α-operation preserves the number of parts.

The β-operation preserves the number of parts.

theorem PentagonalNumberTheorem.Franklin.DPalpha_filter_card_eq (n : ℕ) (p q : ℕ → Prop) [DecidablePred p] [DecidablePred q] (hpq : ∀ (a : ℕ), p (a + 1) ↔ q a) :

Franklin's involution refined by a condition on the number of parts: α matches the members of 𝒫_α(n) whose size satisfies p with those of 𝒫_β(n) whose size satisfies q, provided p (a + 1) and q a always agree (recall |α(S)| + 1 = |S|).

|{S ∈ α(n) : |S| odd}| = |{S ∈ β(n) : |S| even}|.

|{S ∈ α(n) : |S| even}| = |{S ∈ β(n) : |S| odd}|.

Any filtered count of distinctPartitions n splits along the α/β/special decomposition.

pe(n) - po(n) equals the signed count of special partitions.

Lemma 24 (Source), case n = 0: p_e(0) − p_o(0) = 1.

theorem PentagonalNumberTheorem.Franklin.pe_minus_po_nonpent (n : ℕ) (hn : 1 ≤ n) (h1 : ∀ (k : ℕ), 1 ≤ k → 2 * n ≠ 3 * k ^ 2 - k) (h2 : ∀ (k : ℕ), 1 ≤ k → 2 * n ≠ 3 * k ^ 2 + k) :
↑(pe n) - ↑(po n) = 0

For non-pentagonal n ≥ 1, pe(n) - po(n) = 0.

theorem PentagonalNumberTheorem.Franklin.signed_card_of_singleton (T : Finset ℕ) (k : ℕ) (hT : T.card = k) :
↑{S ∈ {T} | S.card % 2 = 0}.card - ↑{S ∈ {T} | S.card % 2 = 1}.card = (-1) ^ k

The signed count of a one-element family of partitions with k parts is (-1) ^ k.

theorem PentagonalNumberTheorem.Franklin.pe_minus_po_pent_minus (n k : ℕ) (hk : 1 ≤ k) (hn : 2 * n = 3 * k ^ 2 - k) :
↑(pe n) - ↑(po n) = (-1) ^ k

For n = (3k²-k)/2, pe(n) - po(n) = (-1)^k.

theorem PentagonalNumberTheorem.Franklin.pe_minus_po_pent_plus (n k : ℕ) (hk : 1 ≤ k) (hn : 2 * n = 3 * k ^ 2 + k) :
↑(pe n) - ↑(po n) = (-1) ^ k

For n = (3k²+k)/2, pe(n) - po(n) = (-1)^k.