Chapter 16 definition: truncated left side of the generating function
DefinitionQseriesFormalization_Chapter16chan-invitation-qseriespartition-congruencespartitions
This bundle defines the truncation over a commutative ring, with the partition function, the truncated left side of Ramanujan's identity for the generating function of .
Definition code
-- Generated by qseries-p2m/p2m/generate.py from QseriesFormalization.Chapter16: skeleton subtraction
-- keeps 1 declaration(s); proofs kept; project imports -> Definitions bundles.
import Definitions.Def_QseriesFormalization_DefCoreQSeries
import Mathlib
import Mathlib.Combinatorics.Enumerative.Partition.Basic
/-!
# Chapter 16 — Part IV: Proofs of the 'Most Beautiful Identity'
(Hei-Chi Chan, *An Invitation to q-Series*, Ch 16, pp. 147-156.)
⚠️ **SHADOW CHAPTER**.
Per `PLAYBOOK_AUDIT.md` (2026-05-22): this file currently contains ~5,057
declarations, of which roughly 4,900 are mechanical `mbiRHSDenominatorTrunc_N`
/ `mbiRHSNumeratorTrunc_N` / `mbiLHSTrunc_N` closed-form unfoldings extending
to `_hundredandsixteen`. Chan's "Most Beautiful Identity" itself,
∑_{n=0}^∞ p(5n+4) q^n = 5 · (q^5;q^5)_∞^5 / (q;q)_∞^6 ,
is **not** stated as a theorem in this repository — neither as a formal
power series identity nor as an analytic identity for `‖q‖ < 1`.
Until Chan's MBI is added as a real theorem (with proof, or with `sorry`
honestly tagged), this file is auxiliary scaffolding.
-/
namespace QseriesFormalization
namespace PartIV
namespace Ch16
section CommRing
variable {R : Type*} [CommRing R]
/-- Truncated LHS: `∑_{n=0}^N p(5n+4) q^n`. Uses `partitionCount` from Ch 1. -/
def mbiLHSTrunc (q : R) (N : Nat) : R :=
natSum (fun n => (Ch01.partitionCount (5 * n + 4) : R) * q ^ n) N
end CommRing
section Field
variable {R : Type*} [Field R]
end Field
end Ch16
end PartIV
end QseriesFormalization
Source
Lean formalization (Xiang Huang) of Hei-Chi Chan, An Invitation to q-Series: From Jacobi's Triple Product Identity to Ramanujan's "Most Beautiful Identity" (World Scientific, 2011), Chapter 16. Lean source: https://github.com/xiangyazi24/invitation-to-qseries-lean/blob/5df34b280b6a9c4a68ab09105b4e5d3c7bbe88d1/QseriesFormalization/Chapter16.lean (definitions of this module that the uploaded theorems need; ported to Lean v4.33.1 / Mathlib 0df444a).