Documentation

LeanPool.PentagonalNumberTheorem.Partition

LeanPool.PentagonalNumberTheorem.Partition #

Imported Lean Pool material for LeanPool.PentagonalNumberTheorem.Partition.

theorem two_pentagonal (k : ℤ) :
2 * (k * (3 * k - 1) / 2) = k * (3 * k - 1)
theorem pentagonal_nonneg (k : ℤ) :
0 ≤ k * (3 * k - 1) / 2
theorem two_pentagonal_inj {x y : ℤ} (h : x * (3 * x - 1) = y * (3 * y - 1)) :
x = y
theorem pentagonal_injective :
Function.Injective fun (k : ℤ) => k * (3 * k - 1) / 2
theorem pentagonal_toNat_injective :
Function.Injective fun (k : ℤ) => (k * (3 * k - 1) / 2).toNat
noncomputable def Nat.Partition.kSet (n : ℤ) :

The finite set of integers k for which the pentagonal number k * (3 * k - 1) / 2 is at most n. Used to express the pentagonal recurrence for the partition function.

Equations
Instances For
    theorem Nat.Partition.mem_kSet_iff {n k : ℤ} :
    k ∈ kSet n ↔ k * (3 * k - 1) / 2 ≤ n
    theorem Nat.Partition.sum_partition (n : ℕ) (hn : n ≠ 0) :
    ∑ k ∈ kSet ↑n, ↑k.negOnePow * ↑(Fintype.card (n - (k * (3 * k - 1) / 2).toNat).Partition) = 0

    The recurrence relation of (non-distinct) partition function $p(n)$:

    $$\sum_{k \in \mathbb{Z}} (-1)^k p(n - k(3k-1)/2) = 0 \quad (n > 0)$$

    Note that this is a finite sum, as the term for $k$ outside $n - k(3k-1)/2 ≥ 0$ vanishes. Here we explicitly restrict the set of $k$.