Chapter 10: summands and partial sums of the mock theta series over
DefinitionQseriesFormalization_Pending_Chapter10_MockTheta_PSchan-invitation-qseriesformal-power-seriesmock-theta
This bundle defines the -th summand of Ramanujan's third-order mock theta function as a power series over , and its partial sums over .
Definition code
-- Generated by qseries-p2m/p2m/generate.py from QseriesFormalization.Pending.Chapter10_MockTheta_PS: skeleton subtraction
-- keeps 2 declaration(s); proofs kept; project imports -> Definitions bundles.
import Definitions.Def_QseriesFormalization_DefCoreQSeries
import Mathlib.Combinatorics.Enumerative.Partition.GenFun
import Mathlib.RingTheory.PowerSeries.Basic
import Mathlib.RingTheory.PowerSeries.Expand
import Mathlib.RingTheory.PowerSeries.Inverse
import Mathlib
import Mathlib.Combinatorics.Enumerative.Partition.Basic
import Mathlib.Tactic.Linarith
namespace QseriesFormalization.PartII.Ch10 end QseriesFormalization.PartII.Ch10
/-!
# Chapter 10 / mock theta `f(q)` — formal power series foundation
⚠️ **AUX-LEVEL SCAFFOLDING** for what is currently a SHADOW chapter.
Ramanujan's third-order mock theta function (Lost Notebook):
`f(q) := ∑_{n≥0} q^{n²} / (-q;q)_n²`.
The existing `Chapter10.ramanujanMockF_trunc` is the finite truncation;
this file defines `f(q)` as a *formal power series* `ramanujanMockFPS R`
(noncomputable, but well-defined coefficient-wise) and proves the basic
algebraic facts. Chan §10's chapter-main result (Watson's identity, or
the mock-modular property) is not closed; this file lays the formal-PS
foundation toward such a closure.
## What this file contributes
- `ramanujanMockFPS R : PowerSeries R` over any commutative ring `R`,
defined coefficient-wise via the truncations.
- `coeff_zero_ramanujanMockFPS = 1`: the `n = 0` term contributes `1`,
higher-`n` terms contribute `0` to the constant coefficient.
- `ramanujanMockFPS_eq_coeff_trunc`: at the formal-PS level, each
coefficient of `f(q)` equals the same coefficient of the finite
truncation `ramanujanMockF_trunc q N` for any sufficiently-large `N`
(the q-adic stabilisation argument).
## Approach to Chan §10 closure (open)
The chapter-main target is one of:
1. Watson's identity (1936): a closed form for `f(q)` in terms of theta
series (the half-integral-weight cusp form / Eichler integral form).
2. The mock-modular property: `f(q)` has weight-1/2 mock-modular completion
`\hat f(τ) = f(e^{2πiτ}) + (correction)` transforming as a modular form
under `SL₂(ℤ)` (full proof needs Zwegers's holomorphic projection).
3. Andrews–Gordon–McIntosh order-3 mock theta identities.
All three are research-level (not in Hirschhorn either, per the
2026-05-24 subagent confirmation in `AUDIT_CLEANUP_PLAN.md`).
-/
namespace QseriesFormalization
namespace Pending
namespace Ch10MockThetaPS
open PowerSeries
open QseriesFormalization.PartII.Ch10
/-- The `n`-th summand of Ramanujan's mock theta, as a formal power series
over `ℚ`: `X^{n²} / (−X;X)_n²`. The denominator `(−X;X)_n` has constant
term `1` (each factor `(1 − (−X)·X^k) = 1 + X^(k+1)` evaluates to `1` at
`X = 0`), so it's a unit in `ℚ⟦X⟧` (Field-instance `Inv` agrees with
the unit-inverse). -/
noncomputable def ramanujanMockSummandPS (n : ℕ) : ℚ⟦X⟧ :=
X ^ (n * n) * ((qPoch (-X : ℚ⟦X⟧) X n)⁻¹) ^ 2
/-- Finite partial sum of `f(q)` as a formal power series over `ℚ`. -/
noncomputable def ramanujanMockFPartialPS (N : ℕ) : ℚ⟦X⟧ :=
∑ n ∈ Finset.range (N + 1), ramanujanMockSummandPS n
/-! ## Low-degree coefficients
For the current definition
`ramanujanMockSummandPS n = X^(n*n) * (qPoch (-X) X n)⁻¹^2`, the
stabilized coefficients through degree `5` are
`1, 1, -2, 3, -3, 3`.
-/
end Ch10MockThetaPS
end Pending
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/Pending/Chapter10_MockTheta_PS.lean (definitions of this module that the uploaded theorems need; ported to Lean v4.33.1 / Mathlib 0df444a).