Franklin setup: fermion-sea states, charge, energy, Ferrers cells
DefinitionQseriesFormalization_Chapter04_FranklinPentagonalchan-invitation-qseriescombinatoricspartitionspentagonal-numbers
This bundle (Chapter 4/5 Franklin setup) defines admissible states as pairs of finite sets of added and removed levels (a fermion-sea model), with charge equal to added minus removed count and energy equal to the sum of the shifted levels. It also defines list-model partitions: the number of parts, the staircase partition , and a Ferrers-diagram cell predicate. These are the objects for Franklin's involution and the boson-fermion correspondence.
Definition code
-- Generated by qseries-p2m/p2m/generate.py from QseriesFormalization.Chapter04_FranklinPentagonal: skeleton subtraction
-- keeps 8 declaration(s); proofs kept; project imports -> Definitions bundles.
import Mathlib
/-!
# Chapter 5 — Boson-Fermion correspondence (Chan §5) — **partial setup only**
⚠️ **AUX CHAPTER — chapter-main result OPEN; file also contains Ch4-style
combinatorial material (strict partitions, Franklin involution)**.
Per `PLAYBOOK_AUDIT.md` (2026-05-22):
What's here:
- (lines ~7-39) Setup for Chan §5: `AdmissibleState`, `charge`, `energy`,
`vacuum` — Borcherd's fermion-sea configurations. These are the
building blocks for Chan's third proof of JTP via fermionic vs bosonic
evaluation of the partition function `Z(q,z)`.
- (lines ~41 onward) Strict-partition infrastructure used by Franklin's
involution (`Chapter05_Franklin.lean`), which is Chan §4's combinatorial
proof of Euler's pentagonal number theorem (NOT §5 content).
What is **not** here:
- Chan Theorem 5 (effectively Eq 5.2 = Eq 5.4 ⇒ JTP) — the fermionic
evaluation `Z(q,z) = ∏ (1+zq^{n-1/2})(1+z^{-1}q^{n-1/2})`, the bosonic
evaluation `Z(q,z) = (1/(q;q)_∞) · ∑_{n∈ℤ} z^n q^{n²/2}`, and the
derivation that equating them gives JTP. These are the chapter's
actual main content and are NOT formalized.
So this file is a mix of "Ch5 setup definitions" and "Ch4 Franklin
infrastructure". The Franklin work is solid.
**Update (2026-05-24)**: Chan §5's *main theorem* — the **Jacobi Triple
Product** — IS proved in the repository and re-exported as
`Pending.Ch05JTP.jacobi_triple_product` (= `Ch02.jacobiTripleProduct`). The
*result* of §5 is thus available; only §5's specific *proof method*
(Boson–Fermion / fermionic Fock space, eqs 5.2 = 5.4) is not formalized — the
repo instead proves JTP via the Chan §3 finite-JTP limit.
-/
namespace QseriesFormalization
namespace PartI
namespace Ch04Franklin
/-- An admissible "fermion sea" configuration, modelled as the finset
of levels (offset from ℤ+1/2 to ℤ for Lean simplicity) that DIFFER
from the vacuum state. Vacuum has all i ≤ -1 occupied; an admissible
state has finitely many levels added (i ≥ 0 occupied) or removed
(i ≤ -1 vacated). -/
structure AdmissibleState where
/-- Levels added (i ≥ 0 occupied beyond vacuum). -/
added : Finset Nat
/-- Levels removed (i ≤ -1 vacated below vacuum, encoded as Nat for the
reflection k = -1 - i ≥ 0). -/
removed : Finset Nat
/-- Charge `Q(S) := added.card - removed.card`. -/
def charge (S : AdmissibleState) : Int :=
(S.added.card : Int) - S.removed.card
/-- Energy `H(S) := ∑_{i ∈ added} (i + 1) + ∑_{k ∈ removed} (k + 1)`.
(Using offset `+1` so that the lowest added level i=0 contributes 1, etc.) -/
def energy (S : AdmissibleState) : Nat :=
S.added.sum (· + 1) + S.removed.sum (· + 1)
/-- Number of parts in the list model. -/
def numberOfParts (lam : List Nat) : Nat :=
lam.length
/-- The staircase partition `[n, n-1, ..., 1]`. Its Ferrers diagram is a
triangular staircase, one of the basic shapes in Franklin's involution. -/
def staircasePartition : Nat → List Nat
| 0 => []
| Nat.succ n => Nat.succ n :: staircasePartition n
@[simp] theorem staircasePartition_zero :
staircasePartition 0 = [] := rfl
@[simp] theorem staircasePartition_succ (n : Nat) :
staircasePartition (Nat.succ n) = Nat.succ n :: staircasePartition n := rfl
/-- A cell in the Ferrers diagram of a list-based partition. Rows and columns
are zero-indexed. -/
def FerrersCell (lam : List Nat) (r c : Nat) : Prop :=
r < lam.length ∧ c < lam.getD r 0
end Ch04Franklin
end PartI
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 4. Lean source: https://github.com/xiangyazi24/invitation-to-qseries-lean/blob/5df34b280b6a9c4a68ab09105b4e5d3c7bbe88d1/QseriesFormalization/Chapter04_FranklinPentagonal.lean (definitions of this module that the uploaded theorems need; ported to Lean v4.33.1 / Mathlib 0df444a).