Documentation

CsdLean4.RecordLayer.JarzynskiRecord

TH5d: the Jarzynski equality at the Σ level — the record-layer work statistics are TH5a's #

Category: 7-SigmaLayer (the record layer — thermodynamics stated on Σ, not on bare matrices; specs/thermo-plan.md TH5, specs/BACKLOG.md ▶ OPEN QUEUE #4; the first thermodynamic consumer of Q29(e)).

Glossary: https://glossary.constraintsurfacedynamics.com/jarzynski-equality/

What "at the Σ level" means here #

TH5a (Thermo/Jarzynski.lean) is a theorem about matrices: a joint law tpmLaw DEFINED as Gibbs weight × transition probability, and the identity ∑ tpmLaw · e^{−βW} = Z₁/Z₀. This module runs the same protocol as records on the sector and proves that the record statistics ARE tpmLaw:

★★ sigma_tpm_law: the driven two-stage preparation gives the joint record sector (energy record i at t₁, energy record j at t₂) exactly the mass tpmLaw hH₀ hH₁ U β i j. Not a definition — the Gibbs weight is the mixed dynamical Born weight of the first readout (traceForm_gibbsDensity_energy through driven_mixed_two_time_born), and the transition probability is the second context's rate at the DRIVEN collapsed state (basisContext_rate_smul). No positivity hypothesis: Gibbs weights are strictly positive (gibbsWeight_pos), so the conditioning is always licensed.

★★ sigma_jarzynski: hence ∑ᵢⱼ P_Σ(i, j) · e^{−βW(i,j)} = Z₁/Z₀ for the record probabilities P_Σ, with ★★ sigma_jarzynski_freeEnergy (= e^{−βΔF} in TH3's free energies) and ★ sigma_mean_work_ge_freeEnergy_sub (the second law of the driven process, on Σ); sum_tpmSigmaSector (the record law is a probability law), sigma_first_energy_record (the first readout's records carry the Gibbs weights; no retro-action from the drive).

Q29(e) consumed #

★★ sigma_tpm_law_hamiltonianFlow, ★★ sigma_jarzynski_hamiltonianFlow: the drive written as the MANIFOLD Hamiltonian flow IsSymplectic.hamiltonianFlow of the Schrödinger Hamiltonian −2⟨H_d⟩ for the Fubini–Study form (HamiltonianFlowVolume.lean), for a driving Hamiltonian H_d over a time τ. Q29(e)'s identification hamiltonianFlow_schrodingerHamiltonian turns it into exp(−iτH_d) • ·, and the theorem above applies. This is the first thermodynamic statement in the corpus whose driving is the sector's own Hamiltonian flow rather than a matrix.

CSD reading #

Work is what the two energy records disagree by; the exponential average over the driven record chain is a state function of the two equilibrium endpoints. Nothing in the protocol is a matrix identity: the Gibbs weights are the Born weights the first record dynamics assigns to the mixed preparation, the transition weights are the Born weights the second record dynamics assigns to the relocated-and-driven state, and the equality is bookkeeping on the doubly stochastic transition matrix that unitarity forces (TH5a). The thermodynamics of a driven process lives on the record layer.

⚠️ Honest scope #

References #

specs/thermo-plan.md TH5; specs/BACKLOG.md (▶ OPEN QUEUE #4 = TH5d; Q29(e)); specs/generator-layer-scoping.md §11 (Q29); Thermo/Jarzynski.lean (TH5a: tpmLaw, tpmTransition_eq, gibbsWeight_eq_re_born, jarzynski, jarzynski_freeEnergy, mean_work_ge_freeEnergy_sub); Thermo/FreeEnergy.lean (TH3: gibbsState, gibbsWeight_pos, gibbsState_posDef, gibbsState_trace); RecordLayer/DrivenTwoTime.lean (driven_mixed_two_time_born, baseLift); RecordLayer/RotatedContext.lean (basisContext_rate_mk); RecordLayer/RotatedSwap.lean (basisPoint); Mathlib/Geometry/Manifold/Instances/ProjectiveSpaceSchrodingerFlow.lean (hamiltonianFlow_schrodingerHamiltonian, Q29(e)); LF4/ProjectedDynamics.lean (schrodingerUnitary); specs/future-work.md.

tr(R · ∣v⟩⟨v∣) = ⟨v, R v⟩ on a general finite index (trace_mul_outerProduct of LF2/EffectGleason.lean, restated to keep that module out of this closure).

The Gibbs preparation and the energy contexts #

noncomputable def CSD.RecordLayer.gibbsDensity {N : ℕ} [NeZero N] {H₀ : Matrix (Fin N) (Fin N) ℂ} (hH₀ : H₀.IsHermitian) (β : ℝ) :

The Gibbs state as a density operator (TH3's gibbsState, packaged for the record tier).

Equations
Instances For
    @[simp]
    theorem CSD.RecordLayer.gibbsDensity_M {N : ℕ} [NeZero N] {H₀ : Matrix (Fin N) (Fin N) ℂ} (hH₀ : H₀.IsHermitian) (β : ℝ) :
    (gibbsDensity hH₀ β).M = Thermo.gibbsState H₀ hH₀ β
    theorem CSD.RecordLayer.traceForm_gibbsDensity_energy {N : ℕ} [NeZero N] {H₀ : Matrix (Fin N) (Fin N) ℂ} (hH₀ : H₀.IsHermitian) (β : ℝ) (i : Fin N) :

    The Gibbs weight is the record tier's Born pairing at the energy outcome: Tr(ρ_β ∣e₀ᵢ⟩⟨e₀ᵢ∣) = e^{−βE₀ᵢ}/Z₀.

    theorem CSD.RecordLayer.basisContext_rate_smul {N : ℕ} {H₀ H₁ : Matrix (Fin N) (Fin N) ℂ} (hH₀ : H₀.IsHermitian) (hH₁ : H₁.IsHermitian) (U : ↥(Matrix.unitaryGroup (Fin N) ℂ)) (i j : Fin N) :

    The second energy readout's rate at the driven collapsed state is the transition probability: the context reading the eigenbasis of H₁, evaluated at U • [e₀ᵢ], assigns outcome j the weight ‖⟨e₁ⱼ, U e₀ᵢ⟩‖² = tpmTransition i j.

    The Σ-level two-point-measurement protocol #

    noncomputable def CSD.RecordLayer.tpmSigmaPrep {N : ℕ} [NeZero N] {H₀ : Matrix (Fin N) (Fin N) ℂ} (hH₀ : H₀.IsHermitian) (β : ℝ) :

    The Σ-level two-point-measurement preparation: the Gibbs state of H₀ as the mixed preparation on the two-stage arena, the first bank calibrated to the energy eigenrays of H₀.

    Equations
    Instances For
      noncomputable def CSD.RecordLayer.tpmSigmaSector {N : ℕ} [NeZero N] {H₀ H₁ : Matrix (Fin N) (Fin N) ℂ} (hH₀ : H₀.IsHermitian) (hH₁ : H₁.IsHermitian) (U : ↥(Matrix.unitaryGroup (Fin N) ℂ)) (i j : Fin N) :

      The Σ-level joint record sector: the initial states destined to display energy record i (in the eigenbasis of H₀) at t₁ and, after the drive U on the sector, energy record j (in the eigenbasis of H₁) at t₂.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        theorem CSD.RecordLayer.sigma_tpm_law {N : ℕ} [NeZero N] {H₀ H₁ : Matrix (Fin N) (Fin N) ℂ} (hH₀ : H₀.IsHermitian) (hH₁ : H₁.IsHermitian) (U : ↥(Matrix.unitaryGroup (Fin N) ℂ)) (β : ℝ) (i j : Fin N) :
        (tpmSigmaPrep hH₀ β) (tpmSigmaSector hH₀ hH₁ U i j) = ENNReal.ofReal (Thermo.tpmLaw hH₀ hH₁ U β i j)

        ★★ TH5d, the law: the record statistics of the Σ-level protocol ARE tpmLaw. The driven two-stage preparation gives the joint sector (energy record i at t₁, energy record j at t₂) exactly the mass gibbsWeight (E₀ i) · ‖⟨e₁ j, U e₀ i⟩‖². No positivity hypothesis: Gibbs weights are strictly positive.

        theorem CSD.RecordLayer.sum_tpmSigmaSector {N : ℕ} [NeZero N] {H₀ H₁ : Matrix (Fin N) (Fin N) ℂ} (hH₀ : H₀.IsHermitian) (hH₁ : H₁.IsHermitian) (U : ↥(Matrix.unitaryGroup (Fin N) ℂ)) (β : ℝ) :
        ∑ i : Fin N, ∑ j : Fin N, (tpmSigmaPrep hH₀ β) (tpmSigmaSector hH₀ hH₁ U i j) = 1

        The Σ-level record law is a probability law on the outcome pairs.

        theorem CSD.RecordLayer.sigma_first_energy_record {N : ℕ} [NeZero N] {H₀ H₁ : Matrix (Fin N) (Fin N) ℂ} (hH₀ : H₀.IsHermitian) (hH₁ : H₁.IsHermitian) (U : ↥(Matrix.unitaryGroup (Fin N) ℂ)) (β : ℝ) (i : Fin N) :

        The first energy readout's records carry the Gibbs weights, and neither the drive nor the second apparatus retro-acts on them.

        ★★ Jarzynski on Σ #

        theorem CSD.RecordLayer.sigma_jarzynski {N : ℕ} [NeZero N] {H₀ H₁ : Matrix (Fin N) (Fin N) ℂ} (hH₀ : H₀.IsHermitian) (hH₁ : H₁.IsHermitian) (U : ↥(Matrix.unitaryGroup (Fin N) ℂ)) (β : ℝ) :
        ∑ i : Fin N, ∑ j : Fin N, ((tpmSigmaPrep hH₀ β) (tpmSigmaSector hH₀ hH₁ U i j)).toReal * Real.exp (-β * Thermo.tpmWork hH₀ hH₁ i j) = Thermo.partitionFn H₁ hH₁ β / Thermo.partitionFn H₀ hH₀ β

        ★★ TH5d — the Jarzynski equality on Σ. The exponential average of the two-point- measurement work over the RECORD probabilities of the driven protocol on the sector is the ratio of the partition functions, ∑ᵢⱼ P_Σ(i, j) · e^{−βW(i,j)} = Z₁/Z₀.

        theorem CSD.RecordLayer.sigma_jarzynski_freeEnergy {N : ℕ} [NeZero N] {H₀ H₁ : Matrix (Fin N) (Fin N) ℂ} (hH₀ : H₀.IsHermitian) (hH₁ : H₁.IsHermitian) (U : ↥(Matrix.unitaryGroup (Fin N) ℂ)) {β : ℝ} (hβ : 0 < β) :
        ∑ i : Fin N, ∑ j : Fin N, ((tpmSigmaPrep hH₀ β) (tpmSigmaSector hH₀ hH₁ U i j)).toReal * Real.exp (-β * Thermo.tpmWork hH₀ hH₁ i j) = Real.exp (-β * (Thermo.freeEnergy H₁ β⁻¹ ⋯ - Thermo.freeEnergy H₀ β⁻¹ ⋯))

        ★★ Jarzynski on Σ, free-energy form: ⟨e^{−βW}⟩_Σ = e^{−β(F₁ − F₀)} in TH3's equilibrium free energies.

        theorem CSD.RecordLayer.sigma_mean_work_ge_freeEnergy_sub {N : ℕ} [NeZero N] {H₀ H₁ : Matrix (Fin N) (Fin N) ℂ} (hH₀ : H₀.IsHermitian) (hH₁ : H₁.IsHermitian) (U : ↥(Matrix.unitaryGroup (Fin N) ℂ)) {β : ℝ} (hβ : 0 < β) :
        Thermo.freeEnergy H₁ β⁻¹ ⋯ - Thermo.freeEnergy H₀ β⁻¹ ⋯ ≤ ∑ i : Fin N, ∑ j : Fin N, ((tpmSigmaPrep hH₀ β) (tpmSigmaSector hH₀ hH₁ U i j)).toReal * Thermo.tpmWork hH₀ hH₁ i j

        ★ The second law of the driven process, on Σ: the mean work over the record probabilities is at least the free-energy difference, ΔF ≤ ⟨W⟩_Σ.

        Q29(e) consumed: the drive as the manifold Hamiltonian flow #

        theorem CSD.RecordLayer.hamiltonianFlow_schrodinger_eq {n : ℕ} {Hd : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} (hHd : Hd.IsHermitian) (τ : ℝ) :
        ⋯.hamiltonianFlow ⋯ τ = fun (p : LF4.CPN (n + 1)) => Matrix.schrodingerUnitary hHd τ • p

        The drive as the Hamiltonian flow of the Schrödinger Hamiltonian. The manifold flow IsSymplectic.hamiltonianFlow of −2⟨H_d⟩ for the Fubini–Study form, run for time τ, is the unitary flow exp(−iτH_d) • · (Q29(e), hamiltonianFlow_schrodingerHamiltonian), as a function.

        theorem CSD.RecordLayer.sigma_tpm_law_hamiltonianFlow {n : ℕ} {H₀ H₁ Hd : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} (hH₀ : H₀.IsHermitian) (hH₁ : H₁.IsHermitian) (hHd : Hd.IsHermitian) (τ β : ℝ) (i j : Fin (n + 1)) :

        ★★ TH5d with the drive as the sector's Hamiltonian flow (Q29(e) consumed): with the system driven for a time τ by the MANIFOLD Hamiltonian flow of the Schrödinger Hamiltonian of H_d on ℂℙⁿ, the joint record law is tpmLaw at the unitary exp(−iτH_d).

        theorem CSD.RecordLayer.sigma_jarzynski_hamiltonianFlow {n : ℕ} {H₀ H₁ Hd : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} (hH₀ : H₀.IsHermitian) (hH₁ : H₁.IsHermitian) (hHd : Hd.IsHermitian) (τ β : ℝ) :
        ∑ i : Fin (n + 1), ∑ j : Fin (n + 1), ((tpmSigmaPrep hH₀ β) (drivenJointRecordSector (basinIndex (basisContext hH₀.eigenvectorBasis)) (baseLift (⋯.hamiltonianFlow ⋯ τ)) (basinIndex (basisContext hH₁.eigenvectorBasis)) i j)).toReal * Real.exp (-β * Thermo.tpmWork hH₀ hH₁ i j) = Thermo.partitionFn H₁ hH₁ β / Thermo.partitionFn H₀ hH₀ β

        ★★ Jarzynski on Σ with the drive as the sector's Hamiltonian flow (Q29(e) consumed): the exponential average of the work over the record probabilities of the protocol driven by the Hamiltonian flow of −2⟨H_d⟩ for time τ is Z₁/Z₀.