Chapter 10 definition: truncation of the mock theta function
DefinitionQseriesFormalization_Chapter10chan-invitation-qseriesmock-thetaq-series
This bundle defines the finite truncation of Ramanujan's third-order mock theta function : namely over a field. The source notes that the chapter file is auxiliary scaffolding only.
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.Chapter10: skeleton subtraction
-- keeps 1 declaration(s); proofs kept; project imports -> Definitions bundles.
import Definitions.Def_QseriesFormalization_DefCoreQSeries
import Mathlib
/-!
# Chapter 10 — Ramanujan's mock theta `f(q)`
⚠️ **SHADOW CHAPTER**.
Per `PLAYBOOK_AUDIT.md` (2026-05-22): this file currently contains only the
finite truncation `ramanujanMockF_trunc q N := ∑_{n=0}^N q^{n²}/(-q;q)_n²`
and closed-form unfoldings `ramanujanMockF_trunc_zero..thirteen`. Chan's
Ch 10 main results about `f(q)` (the Watson-type identity, the
mock-modular / weight-1/2 quasimodular characterisation, or the Hurwitz
class number / Eichler integral connections) are **not** formalized here.
Until a real chapter-main theorem is added, this file is auxiliary
scaffolding only.
-/
namespace QseriesFormalization
namespace PartII
namespace Ch10
section Field
variable {R : Type*} [Field R]
/-- Ramanujan's third-order mock theta `f(q) := ∑_{n=0}^N q^{n²} / (-q;q)_n²`,
finite truncation. -/
noncomputable def ramanujanMockF_trunc (q : R) (N : Nat) : R :=
natSum (fun n => q ^ (n * n) / (qPoch (-q) q n) ^ 2) N
end Field
end Ch10
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 10. Lean source: https://github.com/xiangyazi24/invitation-to-qseries-lean/blob/5df34b280b6a9c4a68ab09105b4e5d3c7bbe88d1/QseriesFormalization/Chapter10.lean (definitions of this module that the uploaded theorems need; ported to Lean v4.33.1 / Mathlib 0df444a).