Chapter 9 definitions: Bailey pair relation, Lemma 9.1 sums, the -operator
DefinitionQseriesFormalization_Chapter09bailey-pairschan-invitation-qseriesq-binomialq-pochhammer
This bundle defines the Bailey pair relation in finite form: the -th summand and the sum of those summands. It defines both sides of Lemma 9.1, namely and , together with the general version with a shift . It also defines the -operator at , acting on by and on by .
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.Chapter09: skeleton subtraction
-- keeps 8 declaration(s); proofs kept; project imports -> Definitions bundles.
import Definitions.Def_QseriesFormalization_DefCoreQSeries
import Mathlib
/-!
# Chapter 9 — Bailey pairs and Bailey's lemma
⚠️ **AUX CHAPTER — chapter-main result OPEN**.
Per `PLAYBOOK_AUDIT.md` (2026-05-22): this file contains substantive
Bailey-pair infrastructure — definitions (`BaileyTerm`, `BaileyBeta`,
`IsBaileyPairUpTo`), finite preservation of the Bailey transform under
nonzero-denominator hypotheses up through `N = 7`, the eight-coefficient
linear assembly needed for the q-Saalschütz reduction.
The chapter-main result — **Bailey's lemma in general** (Tier 1 #2 in
`TODO_THEOREMS.md`, the unconditional Bailey-transform identity that
underlies Rogers-Ramanujan and Macdonald-Bailey applications) — is
**not yet closed**. See `BaileyTransform_preserves_pair_general` and
the Chapter 9 strategy doc.
-/
namespace QseriesFormalization
namespace PartII
namespace Ch09
section Field
variable {R : Type*} [Field R]
/-- The Bailey pair relation, finite form. `BaileyTerm a q n α k` is the
k-th summand in the Bailey defining relation
`β_n = ∑_{k=0}^n α_k / ((q;q)_{n-k} (a q; q)_{n+k})`. -/
noncomputable def BaileyTerm (a q : R) (α : Nat → R) (n k : Nat) : R :=
α k / (qPochhammer q (n - k) * qPoch (a * q) q (n + k))
/-- The β-side of a Bailey pair, defined by the truncated sum. -/
noncomputable def BaileyBeta (a q : R) (α : Nat → R) (n : Nat) : R :=
natSum (fun k => BaileyTerm a q α n k) n
/-! ### Rogers–Ramanujan Bailey pair seed and Bailey transform -/
-- (For (aq;q)_13 / (aq;q)_12, reuse `BaileyTransform_seven_qpoch_aq_thirteen_over_twelve`.)
-- NOTE: There is intentionally no
-- `BaileyTransform_eight_alpha_zero_common_denominator_identity`.
-- The `*_alpha_zero_*_ratio` / `*_common_denominator_identity` ladder for
-- n = 2..7 is the original hand-expansion route and is superseded: the finite
-- Bailey lemma is now proved in full generality by
-- `BaileyTransform_preserves_pair_general` (see `section GeneralBaileyLemma`),
-- which factors through the q-Pfaff–Saalschütz kernel identity
-- `baileyKernelSum = baileyKernelTarget` rather than per-n common-denominator
-- expansions. Nothing references the n = 8 identity; the n = 8 ratio lemmas
-- above are kept only as a verified cross-check of the ladder pattern. The
-- remaining genuine analytic input is the *general* q-Pfaff–Saalschütz
-- summation (currently discharged unconditionally only for the boundary
-- j = n and for the small (n, j) instances consumed by the n ≤ 2
-- specializations); that, not this n = 8 polynomial, is the open item.
/-! ### General Bailey lemma framework
The following section develops the structural tools needed for the general
finite Bailey lemma: if `(α, β)` is a Bailey pair relative to `a`, then
`(BaileyTransformAlpha α, BaileyTransformBeta β)` is again a Bailey pair.
The proof reduces to a single algebraic kernel identity via double-sum swap. -/
section GeneralBaileyLemma
/-! #### q-Pfaff–Saalschütz kernel identity
The final analytic input needed for the general Bailey lemma is a single
pointwise evaluation of the inner sum from `BaileyTransformBeta_of_pair_double_sum`:
for each `0 ≤ j ≤ n`,
∑_{k=j}^{n} c_{nk} / ((q;q)_{k-j} (aq;q)_{k+j})
= (ρ₁;q)_j (ρ₂;q)_j (aq/(ρ₁ρ₂))^j /
((aq/ρ₁;q)_j (aq/ρ₂;q)_j (q;q)_{n-j} (aq;q)_{n+j})
This is an instance of the q-Pfaff–Saalschütz (Jackson) summation formula.
The identity itself is left as an analytic hypothesis;
`BaileyTransform_preserves_pair_general` is the structural theorem
that consumes it. The single-term boundary case `j = n` is verified
unconditionally below. -/
/-! #### Specializations: Bailey-pair preservation through the verified q-PS instances
The verified kernel instances `baileyKernelSum_eq_target_n` and the
n=1, n=2 j-companions discharge the q-PS hypothesis of
`BaileyTransform_preserves_pair_general` for `n ≤ 2`. The resulting
specialised theorems require only the natural nonvanishing hypotheses
on the q-Pochhammer denominators. -/
end GeneralBaileyLemma
/-! ### §9.2 Lemma 9.1 — Base case (Eq. 9.26)
Lemma 9.1 (Eq. 9.10) is the matrix identity `LM = MD`. The base case
`m = 0` reads (Eq. 9.26):
`∑_{k=0}^{n} x^k q^{k²} [n; k]_q / (xq; q)_k = 1 / (xq; q)_n`.
We prove this by induction on `n`.
-/
/-- The LHS of Eq. (9.26): `∑_{k=0}^{N} x^k q^{k²} [N;k]_q / (xq;q)_k`. -/
noncomputable def lemma91Base (x q : R) (N : Nat) : R :=
∑ k ∈ Finset.range (N + 1),
x ^ k * q ^ (k * k) * gaussianBinom q N k / qPoch (x * q) q k
/-- The RHS of Eq. (9.26): `1 / (xq; q)_N`. -/
noncomputable def lemma91Target (x q : R) (N : Nat) : R :=
1 / qPoch (x * q) q N
/-! ### General Lemma 9.1 (Chan Eq. 9.10/9.27): the `m > 0` parameter
The matrix identity `LM = MD` gives, for each `m ≥ 0`:
`∑_{k=0}^N x^k q^{k(k+m)} [N;k]_q / (xq;q)_{k+m} = 1 / (xq;q)_{N+m}`.
The `m = 0` case is `lemma91_base_general` (Eq. 9.26). The general case
reduces to the `m = 0` case via the substitution `x → xq^m` combined with
the q-Pochhammer splitting identity `(xq;q)_{k+m} = (xq;q)_m · (xq^{m+1};q)_k`. -/
/-- LHS of general Lemma 9.1 (`m` parameter). -/
noncomputable def lemma91BaseM (x q : R) (m N : Nat) : R :=
∑ k ∈ Finset.range (N + 1),
x ^ k * q ^ (k * (k + m)) * gaussianBinom q N k / qPoch (x * q) q (k + m)
/-- RHS of general Lemma 9.1 (closed form). -/
noncomputable def lemma91TargetM (x q : R) (m N : Nat) : R :=
1 / qPoch (x * q) q (N + m)
/-! ### Corollary: Lemma 9.1 base case at `x = 1` (Chan Eq. 9.12)
Setting `x = 1` in the general base case gives
`∑_{k=0}^{N} q^{k²} [N;k]_q / (q;q)_k = 1 / (q;q)_N`,
which is a key ingredient for the finite Rogers-Ramanujan identity. -/
/-! ### The M-operator (ρ → ∞ limit of Bailey transform, at a = 1)
The M-operator is the key transform for Rogers-Ramanujan identities. It takes a
Bailey pair (α, β) w.r.t. `a = 1` to a new Bailey pair (Mα, Mβ) defined by:
- `(Mα)_n = q^{n²} α_n`
- `(Mβ)_n = ∑_{k=0}^n q^{k²} β_k / (q;q)_{n-k}`
The preservation property `Mβ = BaileyBeta 1 q (Mα)` follows directly from
General Lemma 9.1 via a double-sum swap.
This is the missing piece for finite/infinite Rogers-Ramanujan from the
Bailey pair `(a*, b*)`. -/
/-- The M-operator on the α-side. -/
noncomputable def MAlpha (q : R) (α : Nat → R) (n : Nat) : R :=
q ^ (n * n) * α n
/-- The M-operator on the β-side. -/
noncomputable def MBeta (q : R) (β : Nat → R) (n : Nat) : R :=
∑ k ∈ Finset.range (n + 1), q ^ (k * k) * β k / qPochhammer q (n - k)
-- M_preserves_BaileyPair (general n): proof structure clear from Lemma 9.1 + double-sum swap,
-- but Lean formalization of the swap+reindex requires more careful sum_comm'/sum_Ico machinery.
-- Concrete cases n=0,1,2 above suffice for finite RR verification up to n=2.
/-! ### Bailey pair (a*, b*) — Rogers-Ramanujan source
The Bailey pair derived from finite JTP at `z = 1`:
- `b*_n = δ_{n,0}` (since `(1)_n = 0` for `n ≥ 1`)
- `a*_k` involves `(-1)^k q^{k²/2}` terms
With `x = 1`, Theorem 9.2 `(L²b*)_n = (MD²a*)_n` gives the finite RR
identity Eq. (9.21). -/
/-! ### Gaussian binomial evaluations for finite RR verifications -/
/-! ### Bailey pair connection (continued) -/
-- finiteRRRHS_two: the given definition of finiteRRRHS doesn't match finiteRRLHS at n ≥ 2.
-- The Schur-Bressoud finite RR identity needs a bilateral sum or different unilateral form.
-- (n=0, n=1 happen to work; deferred.)
end Field
end Ch09
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 9. Lean source: https://github.com/xiangyazi24/invitation-to-qseries-lean/blob/5df34b280b6a9c4a68ab09105b4e5d3c7bbe88d1/QseriesFormalization/Chapter09.lean (definitions of this module that the uploaded theorems need; ported to Lean v4.33.1 / Mathlib 0df444a).