Documentation

CsdLean4.Thermo.EnergyWindow

E2: the microcanonical energy window #

Category: conceptually 1-Mathlib (CSD-free quantum statistical mechanics), kept under CSD.Thermo.

The equilibration arc's second item (specs/equilibration-arc-plan.md E2), re-scoped by E3's verdict. E2 was originally "E1 on the unit sphere of a spectral sector H_R". That formulation is refuted: Thermo/SectorRestriction.lean proves an exact spectral sector is Fubini–Study-null, so restricting to one gives the zero measure and there is nothing to condition on. The surviving route — route 1 of E3's two — is a positive-measure energy window, and this module builds it.

The setting: a diagonal Hamiltonian #

For H = diag(λ) in the moment-map basis, the energy expectation of a ray is the linear statistic ⟨H⟩_p = Σ_k λ_k x_k (rayEnergy). That is exactly the shape Q24's linear moments and Chebyshev bound speak about, so the window's measure is controlled by landed results with no new integral.

What is proved #

⚠️ Honest scope — what conditioning does and does not preserve #

Conditioning on an energy window breaks the U(N) invariance that Q24's twirl argument uses, so the moment values do not transfer. The situation is not uniform, and the split is sharp:

So the vanishing results (which use only sign flips) survive conditioning, while the moment values E[x_i²] = 2/(N(N+1)) etc. do not. Computing conditional moments is a genuinely different problem (a microcanonical density-of-states computation) and is not attempted here.

References #

specs/equilibration-arc-plan.md (E2, and E3's verdict that forced this re-scope); Thermo/SectorRestriction.lean (the refutation of the exact-sector formulation); Thermo/CanonicalTypicality.lean (Q24's linear moments and fs_chebyshev_concentration).

The energy expectation of a ray #

noncomputable def CSD.Thermo.rayEnergy {N : } (lam : Fin N) (p : LF4.CPN N) :

The energy expectation of a ray, for a Hamiltonian diag lam in the moment-map basis: the linear statistic ⟨H⟩_p = Σ_k λ_k x_k.

Equations
Instances For
    noncomputable def CSD.Thermo.energyMean {N : } (lam : Fin N) :

    The mean energy over Fubini–Study: the equal-weight average of the spectrum.

    Equations
    Instances For
      noncomputable def CSD.Thermo.energyVar {N : } (lam : Fin N) :

      The Fubini–Study variance of the energy (Q24's closed form).

      Equations
      Instances For

        The mean energy is fs_linear_expectation, restated.

        The window #

        def CSD.Thermo.energyWindow {N : } (lam : Fin N) (ε : ) :

        The microcanonical energy window of half-width ε about the mean energy.

        Equations
        Instances For
          theorem CSD.Thermo.compl_energyWindow {N : } (lam : Fin N) (ε : ) :

          The window's complement is the Chebyshev tail event.

          theorem CSD.Thermo.energyWindow_ne_zero {N : } [NeZero N] (p₀ : LF4.CPN N) (lam : Fin N) {ε : } ( : 0 < ε) (hwidth : ENNReal.ofReal (energyVar lam / ε ^ 2) < 1) :

          ★★ The energy window has positive measure once it exceeds the fluctuation scale.

          This is the hypothesis E3's verdict makes load-bearing — an exact spectral sector is Fubini–Study-null, so a microcanonical statement needs a window that provably carries weight. The condition is quantitative: the Chebyshev tail Var/ε² must be < 1, i.e. the window must be wider than the standard deviation.

          noncomputable def CSD.Thermo.microMeasure {N : } (p₀ : LF4.CPN N) (lam : Fin N) (ε : ) :

          The microcanonical law: Fubini–Study conditioned on the energy window.

          Equations
          Instances For

            The microcanonical law is a probability measure exactly when the window carries weight — which energyWindow_ne_zero supplies.

            ★★ What survives conditioning: the sign flips #

            The point of this section is a sharp split. Conditioning on an energy window destroys the U(N) invariance Q24's twirl argument runs on — but not uniformly. A sign flip fixes every moment coordinate (momentMap_signFlip), hence fixes the energy, hence maps the window to itself; so the whole sign-flip half of the twirl toolkit survives conditioning intact. The permutations and the Hadamard rotation move moment coordinates and therefore change the energy, so they do not.

            theorem CSD.Thermo.rayEnergy_signFlip {N : } [NeZero N] (lam : Fin N) (k : Fin N) (p : LF4.CPN N) :
            rayEnergy lam (signFlip k p) = rayEnergy lam p

            The energy is invariant under a sign flip: the flip fixes every moment coordinate.

            theorem CSD.Thermo.energyWindow_signFlip_preimage {N : } [NeZero N] (lam : Fin N) (ε : ) (k : Fin N) :
            (fun (p : LF4.CPN N) => signFlip k p) ⁻¹' energyWindow lam ε = energyWindow lam ε

            Hence the sign flip preserves the energy window.

            theorem CSD.Thermo.map_signFlip_microMeasure {N : } [NeZero N] (p₀ : LF4.CPN N) (lam : Fin N) (ε : ) (k : Fin N) :
            MeasureTheory.Measure.map (fun (p : LF4.CPN N) => signFlip k p) (microMeasure p₀ lam ε) = microMeasure p₀ lam ε

            The microcanonical law is sign-flip invariant. The window is preserved and μ_FS is unitarily invariant, so conditioning commutes with the flip.

            theorem CSD.Thermo.micro_integral_signFlip {N : } [NeZero N] (p₀ : LF4.CPN N) (lam : Fin N) (ε : ) (k : Fin N) {f : LF4.CPN N} (hf : Measurable f) :
            (p : LF4.CPN N), f p microMeasure p₀ lam ε = (p : LF4.CPN N), f (signFlip k p) microMeasure p₀ lam ε

            The change-of-variables engine, conditioned: integrals against the microcanonical law are unchanged by a sign flip. The conditioned analogue of fs_integral_unitary, available for the sign flips only.

            ★★ The four-index vanishing survives conditioning #

            theorem CSD.Thermo.micro_redOff_cross_vanish {N : } [NeZero N] {dA dB : } (p₀ : LF4.CPN N) (lam : Fin N) (ε : ) (e : Fin N Fin dA × Fin dB) {a a' : Fin dA} (haa : a a') {b b' : Fin dB} (hbb : b b') :
            (p : LF4.CPN N), (rayDensity p (e.symm (a, b)) (e.symm (a', b))).re * (rayDensity p (e.symm (a, b')) (e.symm (a', b'))).re + (rayDensity p (e.symm (a, b)) (e.symm (a', b))).im * (rayDensity p (e.symm (a, b')) (e.symm (a', b'))).im microMeasure p₀ lam ε = 0

            ★★ The four-index expectations vanish microcanonically too. The proof of fs_redOff_cross_vanish used only a sign flip, and sign flips preserve the energy window, so the argument transfers verbatim to the conditioned law. This is the part of E1's machinery that survives E2's conditioning — in contrast to the moment values, which do not (see the module header).