Chapter 7 Step 1 (second identity) definitions: H-type Schur polynomials and finite sums
DefinitionQseriesFormalization_Chapter07_RRStep1Hchan-invitation-qseriespentagonal-numbersq-binomialrogers-ramanujan
This bundle is the analogue of the first Rogers--Ramanujan Step 1 for the second identity. It defines the polynomial by , , the H-Schur finite sum , the exponent , the bottom index , and the theta-Gaussian finite sum (top index ). It also defines the per- term, residual and carry used for the recurrence proof.
Definition code
-- Generated by qseries-p2m/p2m/generate.py from QseriesFormalization.Chapter07_RRStep1H: skeleton subtraction
-- keeps 11 declaration(s); proofs kept; project imports -> Definitions bundles.
import Definitions.Def_QseriesFormalization_Chapter07_RRStep1
import Mathlib
import Mathlib.Analysis.SpecialFunctions.Log.Summable
import Mathlib.Analysis.Normed.Group.Tannery
/-!
# Chapter 7 — Rogers-Ramanujan SECOND identity, Step 1 (H-type Schur)
Parallel to `Chapter07_RRStep1` (the G/first identity) for the H/second
identity. The H-finite-LHS is `∑_n q^{n²+n}·[N-n choose n]_q` (the `a=1`
Rogers-Ramanujan polynomial, `rrJInf q q` in the limit).
The H-Schur polynomial recurrence and RHS convention are **derived and
sanity-checked** here (same methodology that caught/corrected the G-side
`5j` floor convention), not assumed.
Target: `rrJInf q q · (q;q)_∞ = ∑'_j (-1)^j q^(j(5j+3)/2)` (h_step2).
See `docs/RR_step1_schur.md`.
-/
namespace QseriesFormalization
namespace PartII
namespace Ch07
section Complex
open Filter Topology
/-- The H-type Rogers-Ramanujan / Schur polynomial `e_N`, defined by
`e_0 = e_1 = 1`, `e_{N+2} = e_{N+1} + q^{N+2}·e_N`. The exponent `N+2`
(vs `N+1` for the G-polynomial `rrPoly`) is **derived** from the
`∑ q^{n²+n}[N-n choose n]_q` sanity values `e_2 = 1+q²`, `e_3 = 1+q²+q³`. -/
noncomputable def rrPolyH (q : ℂ) : ℕ → ℂ
| 0 => 1
| 1 => 1
| (N + 2) => rrPolyH q (N + 1) + q ^ (N + 2) * rrPolyH q N
@[simp] theorem rrPolyH_zero (q : ℂ) : rrPolyH q 0 = 1 := rfl
@[simp] theorem rrPolyH_one (q : ℂ) : rrPolyH q 1 = 1 := rfl
/-- The H-Schur finite sum `Sʜ q N := ∑_{n=0}^{N} q^(n²+n)·[N-n choose n]_q`
(the `a=1` Rogers-Ramanujan finite LHS). -/
noncomputable def schurSumH (q : ℂ) (N : ℕ) : ℂ :=
∑ n ∈ Finset.range (N + 1), q ^ (n ^ 2 + n) * gaussianBinom q (N - n) n
/-! ### H-Schur recurrence (parallel to the G-side `schurSum_recurrence`) -/
/-! ### H-pentagonal exponent `j(5j+3)/2`
Fixed by `theta_sum_2_eq_jacobiSeries` (Ch04: `∑'_j (-1)^j q^(j(5j+3)/2)`),
not a guessed convention. Mechanical infrastructure parallel to the
G-side `pentExp5`. -/
/-- H-generalized pentagonal exponent `j(5j+3)/2` as a `ℕ`. -/
noncomputable def pentExp5H (j : ℤ) : ℕ := (j * (5 * j + 3) / 2).toNat
/-! ### H-Schur RHS (theta-Gaussian finite form) — DERIVED + VERIFIED
Derived from the proven LHS recurrence (`rrPolyH_eq_schurSumH`) and
cross-checked against the proven `rrPolyH` oracle at `N = 0..4` (the
same sanctioned methodology that caught the G-side `2j` and `q⁵→q⁶`
errors). See `docs/RR_step1_schur.md` ("RR Step 2 — UNBLOCKED").
Key structural fact: the H form uses **top index `N+1`** (not `N`),
which is exactly what reconciles the `e`-recurrence exponent `q^{N+2}`
with the natural two-`q`-Pascal-step `q^{N+1}`. With top `N+1`, the
*same* G floor `⌊(N-5j)/2⌋` and the H pentagonal `j(5j+3)/2` close it:
`e_N = Σ_j (-1)^j q^{j(5j+3)/2} · [N+1 choose ⌊(N-5j)/2⌋]_q`. -/
/-- Raw integer floor bottom `⌊(N-5j)/2⌋` (no `if` wrapper: `gBz` itself
zero-extends out-of-range, and for every in-range `j` the numerator
`N-5j ≥ 0`, so `Int./` agrees with the genuine floor). -/
noncomputable def schurBottomH (N : ℕ) (j : ℤ) : ℤ := ((N : ℤ) - 5 * j) / 2
/-- The H-Schur RHS: `Σ_j (-1)^j q^{j(5j+3)/2} · [N+1 choose ⌊(N-5j)/2⌋]_q`,
summed over `j ∈ [-(N+1), N+1]` (outside, `gBz` is `0`). Top index `N+1`. -/
noncomputable def schurRHSH (q : ℂ) (N : ℕ) : ℂ :=
∑ j ∈ Finset.Icc (-(N : ℤ) - 1) ((N : ℤ) + 1),
(-1 : ℂ) ^ j * q ^ pentExp5H j * gBz q (N + 1) (schurBottomH N j)
/-! ### H-Schur carry-telescope (UNCONDITIONAL recurrence)
Faithful mirror of the G-side `schurResidual_eq_carry_sub` /
`schurRHSz_recurrence` (RRStep1) with top index `N+1`, pentagonal
`j(5j+3)/2`, recurrence weight `q^{N+2}`. Reuses the de-privatized
G-side `gBz_even_residual` / `gBz_odd_residual` at `M = N+1` and
`sumIcc_sub_telescope`. See `docs/RR_step1_schur.md`. -/
/-- Per-`j` H-Schur RHS term (raw-floor bottom, **top index `N+1`**). -/
noncomputable def schurTermHZ' (q : ℂ) (N : ℕ) (j : ℤ) : ℂ :=
(-1 : ℂ) ^ j * q ^ pentExp5H j * gBz q (N + 1) (schurBottomH N j)
/-- Common reindex range (wide enough for `N`, `N+1`, `N+2`). -/
noncomputable def bigJH (N : ℕ) : Finset ℤ :=
Finset.Icc (-(N : ℤ) - 3) ((N : ℤ) + 3)
noncomputable def schurResidualH (q : ℂ) (N : ℕ) (j : ℤ) : ℂ :=
schurTermHZ' q (N + 2) j - schurTermHZ' q (N + 1) j
- q ^ (N + 2) * schurTermHZ' q N j
noncomputable def schurCarryH (q : ℂ) (N : ℕ) (j : ℤ) : ℂ :=
if ((N : ℤ) - 5 * j) % 2 = 0 then
(-1 : ℂ) ^ j * q ^ (pentExp5H j + (schurBottomH N j + 1).toNat)
* gBz q (N + 1) (schurBottomH N j + 1)
else 0
end Complex
end Ch07
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 7. Lean source: https://github.com/xiangyazi24/invitation-to-qseries-lean/blob/5df34b280b6a9c4a68ab09105b4e5d3c7bbe88d1/QseriesFormalization/Chapter07_RRStep1H.lean (definitions of this module that the uploaded theorems need; ported to Lean v4.33.1 / Mathlib 0df444a).