Chapter 8 definitions: partial sums for the series
DefinitionQseriesFormalization_Chapter08chan-invitation-qseriesq-seriesrogers-ramanujan
This bundle defines, over a field, the partial sum (for a natural-number parameter ) and the truncated of Chapter 8, which is simply defined as that finite partial sum.
Division uses Lean’s totalized field convention . The statement or definition does not impose nonvanishing of its displayed denominators.
Definition code
-- Generated by qseries-p2m/p2m/generate.py from QseriesFormalization.Chapter08: skeleton subtraction
-- keeps 2 declaration(s); proofs kept; project imports -> Definitions bundles.
import Definitions.Def_QseriesFormalization_DefCoreQSeries
import Mathlib
/-!
# Chapter 8 — `D_n(q, a)` series
⚠️ **SHADOW CHAPTER**.
Per `PLAYBOOK_AUDIT.md` (2026-05-22): this file currently contains only the
finite truncation `D_partialSum q a N := ∑_{k=0}^N q^{k²+ak}/(q;q)_k` and
closed-form unfoldings `D_partialSum_zero..thirteen`. Chan's Ch 8 main
identity for the `D_n(q, a)` series (the Bailey/Slater-type infinite-product
or theta-series representation as `N → ∞`) is **not** formalized here.
Until a real chapter-main theorem is added, this file is auxiliary
scaffolding only.
-/
namespace QseriesFormalization
namespace PartII
namespace Ch08
section Field
variable {R : Type*} [Field R]
/-- Partial-sum truncation for Chan Ch 8's `D_n(q, a)` series. -/
noncomputable def D_partialSum (q : R) (a : Nat) (N : Nat) : R :=
natSum (fun n => q ^ (n * n + a * n) / qPochhammer q n) N
/-- Truncated `D_N(q, a)` from Chan Ch 8, represented by its finite partial sum. -/
noncomputable def D_trunc (q : R) (a : Nat) (N : Nat) : R :=
D_partialSum q a N
end Field
end Ch08
end PartII
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 8. Lean source: https://github.com/xiangyazi24/invitation-to-qseries-lean/blob/5df34b280b6a9c4a68ab09105b4e5d3c7bbe88d1/QseriesFormalization/Chapter08.lean (definitions of this module that the uploaded theorems need; ported to Lean v4.33.1 / Mathlib 0df444a).