Documentation

CertifiedGaps.Trace.Frobenius

Gibbs traces from representative columns #

The thermal seeds of the spin-1 certificate (OpenAI, thermal72.tex, Sections "Representative columns" and "Exact totals and rational enclosures") never form the Gibbs operator. They write

Z = Tr e^{-bH} = e^{bc} ‖F‖_F², F = exp (-(b/2) (H + c I)),

compute one integer column X_ρ ≈ Q F e_ρ per symmetry orbit of basis vectors, and turn the integer W = ∑_ρ ν_ρ ‖X_ρ‖² into a rational enclosure of Z. This file proves that chain for an arbitrary Hermitian matrix on an arbitrary finite index type, so that each concrete enclosure needs only the per-column error E and the integer W as data.

The paper states |√W - Q ‖F‖_F| ≤ √(3^n) E < ℰ; only ≤ ℰ is used, so the hypotheses below ask for (∑ ν) E² ≤ ℰ², a rational inequality.

The half-step Gibbs factor #

noncomputable def CertifiedGaps.Trace.gibbsHalf {n : Type u_1} [Fintype n] [DecidableEq n] (H : Matrix n n ℂ) (b c : ℝ) :

The half-step Gibbs factor F = exp (-(b/2) (H + c I)) of the shifted Hamiltonian, whose squared Frobenius norm is e^{-bc} Tr e^{-bH}.

Equations
Instances For

    Fᴴ F = e^{-bc} e^{-bH}: the two half steps recombine into one full Gibbs step.

    theorem CertifiedGaps.Trace.gibbsTrace_eq_exp_mul_sum_nsq {n : Type u_1} [Fintype n] [DecidableEq n] {H : Matrix n n ℂ} (hH : H.IsHermitian) (b c : ℝ) :
    gibbsTrace H b = Real.exp (b * c) * ∑ r : n, Spectral.nsq ((gibbsHalf H b c).mulVec (Pi.single r 1))

    Frobenius form of the Gibbs trace. Z = Tr e^{-bH} = e^{bc} ∑_r ‖F e_r‖².

    theorem CertifiedGaps.Trace.sum_nsq_gibbsHalf_eq_sum {n : Type u_1} [Fintype n] [DecidableEq n] {H : Matrix n n ℂ} (hH : H.IsHermitian) (b c : ℝ) :
    ∑ r : n, Spectral.nsq ((gibbsHalf H b c).mulVec (Pi.single r 1)) = ∑ i : n, Real.exp (-(b * (hH.eigenvalues i + c)))

    The squared Frobenius norm of F in terms of the spectrum: ∑_r ‖F e_r‖² = ∑ᵢ e^{-b(λᵢ + c)}.

    theorem CertifiedGaps.Trace.gibbsTrace_add_smul_one {n : Type u_1} [Fintype n] [DecidableEq n] (H : Matrix n n ℂ) (a b : ℝ) :
    gibbsTrace (H + ↑a • 1) b = Real.exp (-(b * a)) * gibbsTrace H b

    A scalar shift H + a multiplies the Gibbs trace by e^{-ba}.

    theorem CertifiedGaps.Trace.gibbsHalf_add_smul_one {n : Type u_1} [Fintype n] [DecidableEq n] (H : Matrix n n ℂ) (a b c : ℝ) :
    gibbsHalf (H + ↑a • 1) b c = gibbsHalf H b (a + c)

    The half-step factor of a shifted Hamiltonian: the shifts add up.

    Symmetries #

    theorem CertifiedGaps.Trace.commute_gibbsHalf {n : Type u_1} [Fintype n] [DecidableEq n] {U H : Matrix n n ℂ} (hUH : Commute U H) (b c : ℝ) :
    Commute U (gibbsHalf H b c)

    A matrix commuting with H commutes with the half-step factor F.

    theorem CertifiedGaps.Trace.nsq_gibbsHalf_mulVec_unitary {n : Type u_1} [Fintype n] [DecidableEq n] {U H : Matrix n n ℂ} (hU : U.conjTranspose * U = 1) (hUH : Commute U H) (b c : ℝ) (v : n → ℂ) :

    A unitary symmetry U of H can be moved through F without changing norms: ‖F U v‖ = ‖U F v‖ = ‖F v‖.

    theorem CertifiedGaps.Trace.nsq_gibbsHalf_single_eq {n : Type u_1} [Fintype n] [DecidableEq n] {U H : Matrix n n ℂ} (hU : U.conjTranspose * U = 1) (hUH : Commute U H) (b c : ℝ) {r r' : n} {u : ℂ} (hu : ‖u‖ = 1) (hUr : U.mulVec (Pi.single r 1) = u • Pi.single r' 1) :

    Signed and phase permutations. If a unitary symmetry U of H maps the basis vector e_r to u e_{r'} with |u| = 1, the columns r and r' of F have equal norms.

    Minkowski's inequality in the weighted direct sum #

    theorem CertifiedGaps.Trace.abs_sqrt_wsum_sub_le {ι : Type u_1} {m : Type u_2} [Fintype m] (R : Finset ι) {w : ι → ℝ} (hw : ∀ (ρ : ι), 0 ≤ w ρ) (X Y : ι → m → ℂ) {E : ℝ} (hE : 0 ≤ E) (hXY : ∀ ρ ∈ R, Spectral.nsq (X ρ - Y ρ) ≤ E ^ 2) :
    |√(∑ ρ ∈ R, w ρ * Spectral.nsq (X ρ)) - √(∑ ρ ∈ R, w ρ * Spectral.nsq (Y ρ))| ≤ √(∑ ρ ∈ R, w ρ) * E

    Minkowski in the weighted direct sum. If every column error is at most E, the weighted ℓ² norms of the two families differ by at most √(∑ w) E. With integer weights w_ρ = ν_ρ this is the triangle inequality in the direct sum that repeats each column ν_ρ times.

    theorem CertifiedGaps.Trace.nsq_add_le_sq {ι : Type u_1} [Fintype ι] {x y : ι → ℂ} {a b : ℝ} (ha : 0 ≤ a) (hb : 0 ≤ b) (hx : Spectral.nsq x ≤ a ^ 2) (hy : Spectral.nsq y ≤ b ^ 2) :
    Spectral.nsq (x + y) ≤ (a + b) ^ 2

    The triangle inequality for squared norms: ‖x‖ ≤ a and ‖y‖ ≤ b give ‖x + y‖ ≤ a + b. Used to add the rounding error of an integer column to the truncation error of the polynomial it approximates.

    The rational enclosure #

    theorem CertifiedGaps.Trace.gibbsTrace_enclosure {n : Type u_1} [Fintype n] [DecidableEq n] {H : Matrix n n ℂ} (hH : H.IsHermitian) (b c : ℝ) (R : Finset n) (ν : n → ℕ) (horbit : ∑ r : n, Spectral.nsq ((gibbsHalf H b c).mulVec (Pi.single r 1)) = ∑ ρ ∈ R, ↑(ν ρ) * Spectral.nsq ((gibbsHalf H b c).mulVec (Pi.single ρ 1))) (X : n → n → ℂ) {Q E ℰ : ℝ} (hQ : 0 < Q) (hE : 0 ≤ E) (hcol : ∀ ρ ∈ R, Spectral.nsq (X ρ - ↑Q • (gibbsHalf H b c).mulVec (Pi.single ρ 1)) ≤ E ^ 2) (hℰ0 : 0 ≤ ℰ) (hℰ : (∑ ρ ∈ R, ↑(ν ρ)) * E ^ 2 ≤ ℰ ^ 2) {W r : ℕ} (hW : ∑ ρ ∈ R, ↑(ν ρ) * Spectral.nsq (X ρ) = ↑W) (hrW : r ^ 2 ≤ W) (hWr : W < (r + 1) ^ 2) {s t : ℝ} (hs : s ≤ Real.exp (b * c)) (ht : Real.exp (b * c) ≤ s + t) :
    s * max 0 (↑r - ℰ) ^ 2 / Q ^ 2 ≤ gibbsTrace H b ∧ gibbsTrace H b ≤ (s + t) * (↑r + 1 + ℰ) ^ 2 / Q ^ 2

    Rational enclosure of a Gibbs trace from representative columns.

    Data: representatives R with weights ν that reproduce the squared Frobenius norm of F = gibbsHalf H b c (horbit), computed columns X_ρ within E of Q F e_ρ (hcol), their weighted total W (hW), an integer r with r² ≤ W < (r + 1)², a bound (∑ ν) E² ≤ ℰ², and s ≤ e^{bc} ≤ s + t. Conclusion: s max(0, r - ℰ)² / Q² ≤ Tr e^{-bH} ≤ (s + t)(r + 1 + ℰ)² / Q².

    theorem CertifiedGaps.Trace.gibbsTrace_enclosure_of_rep {n : Type u_1} [Fintype n] [DecidableEq n] {H : Matrix n n ℂ} (hH : H.IsHermitian) (b c : ℝ) (rep : n → n) (hrep : ∀ (r : n), Spectral.nsq ((gibbsHalf H b c).mulVec (Pi.single r 1)) = Spectral.nsq ((gibbsHalf H b c).mulVec (Pi.single (rep r) 1))) (X : n → n → ℂ) {Q E ℰ : ℝ} (hQ : 0 < Q) (hE : 0 ≤ E) (hcol : ∀ ρ ∈ Finset.image rep Finset.univ, Spectral.nsq (X ρ - ↑Q • (gibbsHalf H b c).mulVec (Pi.single ρ 1)) ≤ E ^ 2) (hℰ0 : 0 ≤ ℰ) (hℰ : ↑(Fintype.card n) * E ^ 2 ≤ ℰ ^ 2) {W r : ℕ} (hW : ∑ ρ ∈ Finset.image rep Finset.univ, ↑{x : n | rep x = ρ}.card * Spectral.nsq (X ρ) = ↑W) (hrW : r ^ 2 ≤ W) (hWr : W < (r + 1) ^ 2) {s t : ℝ} (hs : s ≤ Real.exp (b * c)) (ht : Real.exp (b * c) ≤ s + t) :
    s * max 0 (↑r - ℰ) ^ 2 / Q ^ 2 ≤ gibbsTrace H b ∧ gibbsTrace H b ≤ (s + t) * (↑r + 1 + ℰ) ^ 2 / Q ^ 2

    gibbsTrace_enclosure with the representatives produced by a map rep that is constant on column norms: ν_ρ is the size of the fiber of ρ, so ∑ ν = |n| and the error budget reads |n| E² ≤ ℰ².

    theorem CertifiedGaps.Trace.gibbsTrace_enclosure_of_intColumns {n : Type u_1} [Fintype n] [DecidableEq n] {H : Matrix n n ℂ} (hH : H.IsHermitian) (b c : ℝ) (R : Finset n) (ν : n → ℕ) (horbit : ∑ r : n, Spectral.nsq ((gibbsHalf H b c).mulVec (Pi.single r 1)) = ∑ ρ ∈ R, ↑(ν ρ) * Spectral.nsq ((gibbsHalf H b c).mulVec (Pi.single ρ 1))) (X : n → n → ℤ) {Q E ℰ : ℝ} (hQ : 0 < Q) (hE : 0 ≤ E) (hcol : ∀ ρ ∈ R, Spectral.nsq ((fun (w : n) => ↑(X ρ w)) - ↑Q • (gibbsHalf H b c).mulVec (Pi.single ρ 1)) ≤ E ^ 2) (hℰ0 : 0 ≤ ℰ) (hℰ : (∑ ρ ∈ R, ↑(ν ρ)) * E ^ 2 ≤ ℰ ^ 2) {W : ℕ} (hW : ∑ ρ ∈ R, ↑(ν ρ) * ∑ w : n, X ρ w ^ 2 = ↑W) {s t : ℝ} (hs : s ≤ Real.exp (b * c)) (ht : Real.exp (b * c) ≤ s + t) :
    s * max 0 (↑W.sqrt - ℰ) ^ 2 / Q ^ 2 ≤ gibbsTrace H b ∧ gibbsTrace H b ≤ (s + t) * (↑W.sqrt + 1 + ℰ) ^ 2 / Q ^ 2

    gibbsTrace_enclosure for integer columns X_ρ ∈ ℤⁿ and r = ⌊√W⌋, where the integer total is W = ∑_ρ ν_ρ ∑_w X_ρ(w)².