Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Chapter 13 definitions: r(q)r(q)r(q) as a quotient of pentagonal series and v=Xr(q5)v=Xr(q^5)v=Xr(q5)

Definition
QseriesFormalization_Pending_Chapter13_RRCF_RForm

by FormallyCorrect · Oct 23, 2026 · Mathlib 0df444a (Lean v4.33.1)

chan-invitation-qseriescontinued-fractionspentagonal-numbersrogers-ramanujan

This bundle defines the Rogers--Ramanujan quotient r(q)=P014⋅P023−1r(q)=P_{014}\cdot P_{023}^{-1}r(q)=P014​⋅P023−1​ as a power series over Q\mathbb{Q}Q, where P014=∑(−1)kXk(5k−3)/2P_{014}=\sum(-1)^kX^{k(5k-3)/2}P014​=∑(−1)kXk(5k−3)/2 and P023=∑(−1)kXk(5k−1)/2P_{023}=\sum(-1)^kX^{k(5k-1)/2}P023​=∑(−1)kXk(5k−1)/2 are the bilateral pentagonal series (the inverse exists since the constant coefficient of P023P_{023}P023​ is 111). It also defines v=X⋅r(X5)v=X\cdot r(X^5)v=X⋅r(X5), the fractional-power-free image of R(q5)R(q^5)R(q5).

Definition code
-- Generated by qseries-p2m/p2m/generate.py from QseriesFormalization.Pending.Chapter13_RRCF_RForm: skeleton subtraction
-- keeps 2 declaration(s); proofs kept; project imports -> Definitions bundles.
import Definitions.Def_QseriesFormalization_DefCoreQSeries
import Mathlib.Topology.Algebra.InfiniteSum.NatInt
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Analysis.Normed.Ring.InfiniteSum
import Mathlib
import Mathlib.Analysis.SpecialFunctions.Log.Summable
import Mathlib.Analysis.Normed.Group.Tannery
import Mathlib.Combinatorics.Enumerative.Partition.GenFun
import Mathlib.RingTheory.PowerSeries.Basic
import Mathlib.RingTheory.PowerSeries.Expand
import Mathlib.RingTheory.PowerSeries.Inverse
import Mathlib.Combinatorics.Enumerative.Partition.Basic
import Mathlib.Tactic.Linarith

namespace QseriesFormalization.Pending.Ch16MBIProof end QseriesFormalization.Pending.Ch16MBIProof

/-!
# Chapter 13 / §11.5 — the Rogers–Ramanujan continued fraction in fractional-power-free form

Chan's "difficult and deep" identity (Theorem 11.5) relates `u = R(q)` and `v = R(q⁵)`:
`u⁵ = v · (1 − 2v + 4v² − 3v³ + v⁴) / (1 + 3v + 4v² + 2v³ + v⁴)`.

The repo's `Chapter11.R_trunc` is a DEGENERATE truncation (its recurrence
`R_{n+1} = 1/(1+q^{n+1}R_n)` has `q^{n+1}→0`, so it converges trivially to `1`, NOT to the RRCF).
This file builds the CORRECT, fractional-power-free object.

**Key device.** `R(q) = q^{1/5}·r(q)` where
`r(q) = (q;q⁵)∞(q⁴;q⁵)∞ / ((q²;q⁵)∞(q³;q⁵)∞)` has NO fractional power — it is a genuine formal
power series. Moreover `r(q) = H(q)/G(q)` where `G,H` are the two Rogers–Ramanujan products; in the
repo's keystone variables `r = pentagonal014SeriesPS / pentagonal023SeriesPS` (numerically confirmed:
`pentagonal014 = (q,q⁴,q⁵;q⁵)`, `pentagonal023 = (q²,q³,q⁵;q⁵)`, and the `(q⁵;q⁵)` factors cancel in the
ratio, leaving exactly `r`).

With `u = q^{1/5} r(q)`, `v = q·r(q⁵)` (note `(q⁵)^{1/5} = q`, so `v` is fractional-power-free too),
Theorem 11.5 becomes the FORMAL POWER SERIES identity (verified numerically to degree 60, residual 0):
```
r(q)⁵ · (1 + 3v + 4v² + 2v³ + v⁴)  =  r(q⁵) · (1 − 2v + 4v² − 3v³ + v⁴),    v := X · r(q⁵).
```
`r(q⁵) = PowerSeries.expand 5 r`.

**Proof strategy (next steps, deep — Hardy: "difficult and deep").** This `u⁵ = v·N(v)/D(v)` form is
NOT the same as the R(q)-only quintic already proved in `RamanujanQuinticJTP` (`core·E(q⁵)=E(q)¹¹`); it
ADDITIONALLY relates `R(q)` to `R(q⁵)`, and the standard route is the **Gugg telescoping** (Chan §13.1 /
Hirschhorn §9.2): a product `Q = ∏ₖ tₖ` of single-mode factors telescopes to `R(q)⁵/R(q⁵)`, while a
second evaluation gives the rational function in `R(q⁵)`. Formalizing that telescoping is the substantial
remaining work. This file lays the fractional-power-free foundation only.
-/

namespace QseriesFormalization
namespace Pending
namespace Ch13RRCF

open QseriesFormalization.Pending.JTPFormalPSPentagonal

/-- The fractional-power-free part of the Rogers–Ramanujan continued fraction,
`r(q) = R(q)·q^{-1/5} = (q,q⁴,q⁵;q⁵)∞ / (q²,q³,q⁵;q⁵)∞`, as a formal power series over `ℚ`.
(The shared `(q⁵;q⁵)∞` factor cancels, so this equals `H(q)/G(q)` for the RR functions `G,H`;
in keystone variables `r = pentagonal014SeriesPS / pentagonal023SeriesPS`.) -/
noncomputable def rrcf_r : PowerSeries ℚ :=
  pentagonal014SeriesPS ℚ * (pentagonal023SeriesPS ℚ)⁻¹

/-- `v := X · r(q⁵)`, the fractional-power-free image of `v = R(q⁵)` (since `(q⁵)^{1/5}=q=X`).
`r(q⁵) = PowerSeries.expand 5 rrcf_r`. -/
noncomputable def rrcf_v : PowerSeries ℚ :=
  PowerSeries.X * (PowerSeries.expand 5 (by decide) rrcf_r)

/-! ## Well-definedness of `rrcf_r`

Section 13.1 of Chan (and §9.2 of Hirschhorn) treats `r(q)` as if it were a
genuine power series; that is justified here because the denominator
`pentagonal023SeriesPS ℚ` has constant term `1`, hence is a unit in `ℚ⟦X⟧`,
hence has the standard formal-PS inverse and `rrcf_r · pentagonal023 =
pentagonal014` as a formal equality.  None of this is the deep Chan §13
identity (that requires Gugg telescoping); these are the bookkeeping facts
that need to be in place before any closure attempt can begin.
-/

open QseriesFormalization.Pending.JTPFormalPSPentagonal
open QseriesFormalization.Pending.Ch16MBIProof

/-! ### Algebraic relations for `rrcf_v` (image of `r(q⁵)` under `X·expand 5`)

`rrcf_v` is intentionally chosen so that `rrcf_v.coeff 0 = 0` (no constant
term), which makes any polynomial `1 + c₁·rrcf_v + c₂·rrcf_v² + ⋯` a unit
in `ℚ⟦X⟧` (constant term `1`).  This is the technical reason Chan's
Theorem 11.5 can be stated as a clean formal-PS identity.
-/

/-! ### Constant-coefficient verification of Chan Theorem 11.5

A first step toward Chan's Theorem 11.5 (`Pending/Chapter13_DeepIdentity`):
both sides of the conjectured formal-PS identity have the same constant
coefficient (=1), so the *difference* of the two sides has constant
coefficient 0. This is the simplest nontrivial verification.

Verifying the full identity coefficient-by-coefficient up to all orders is
the open work (Gugg telescoping); this constant-coefficient match is the
first of infinitely many such matches.
-/

end Ch13RRCF
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 13. Lean source: https://github.com/xiangyazi24/invitation-to-qseries-lean/blob/5df34b280b6a9c4a68ab09105b4e5d3c7bbe88d1/QseriesFormalization/Pending/Chapter13_RRCF_RForm.lean (definitions of this module that the uploaded theorems need; ported to Lean v4.33.1 / Mathlib 0df444a).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me