math / data /lean /OAI /Combinatorics /GotsmanLinial /BlockCoupling.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
11 kB
import OAI.Combinatorics.GotsmanLinial.BinomialMoments
import OAI.Combinatorics.GotsmanLinial.FiniteCoupling
import OAI.Combinatorics.GotsmanLinial.ProjectionBlocks
import Mathlib.Data.Fintype.BigOperators
namespace OAI
/-!
# The finite block coupling
Normalize a nonnegative matrix of block masses, identify its two binomial
marginals, and reflect its first index. The low-degree block vanishing gives
the one-sided displacement bound required by the finite coupling lemma.
-/
open scoped BigOperators
namespace LeanBlast.GotsmanLinial
/-- Normalize finite two-index masses by their total mass. -/
noncomputable def normalizedPairWeight {Ξ± Ξ² : Type*}
(B : Ξ± β†’ Ξ² β†’ ℝ) (Z : ℝ) (t : Ξ± Γ— Ξ²) : ℝ :=
B t.1 t.2 / Z
theorem normalizedPairWeight_nonneg {Ξ± Ξ² : Type*}
(B : Ξ± β†’ Ξ² β†’ ℝ) (Z : ℝ) (hB : βˆ€ r s, 0 ≀ B r s) (hZ : 0 ≀ Z)
(t : Ξ± Γ— Ξ²) : 0 ≀ normalizedPairWeight B Z t :=
div_nonneg (hB t.1 t.2) hZ
theorem normalizedPairWeight_row {Ξ± Ξ² : Type*} [Fintype Ξ²]
(B : Ξ± β†’ Ξ² β†’ ℝ) (Z : ℝ) (r : Ξ±) :
(βˆ‘ s : Ξ², normalizedPairWeight B Z (r, s)) = (βˆ‘ s : Ξ², B r s) / Z := by
simp only [normalizedPairWeight, ← Finset.sum_div]
theorem normalizedPairWeight_column {Ξ± Ξ² : Type*} [Fintype Ξ±]
(B : Ξ± β†’ Ξ² β†’ ℝ) (Z : ℝ) (s : Ξ²) :
(βˆ‘ r : Ξ±, normalizedPairWeight B Z (r, s)) = (βˆ‘ r : Ξ±, B r s) / Z := by
simp only [normalizedPairWeight, ← Finset.sum_div]
/-- First-coordinate expectations are computed from the row sums. -/
theorem normalizedPairWeight_expect_fst {Ξ± Ξ² : Type*} [Fintype Ξ±] [Fintype Ξ²]
(B : Ξ± β†’ Ξ² β†’ ℝ) (Z : ℝ) (Ο† : Ξ± β†’ ℝ) :
(βˆ‘ t : Ξ± Γ— Ξ², normalizedPairWeight B Z t * Ο† t.1) =
βˆ‘ r : Ξ±, ((βˆ‘ s : Ξ², B r s) / Z) * Ο† r := by
rw [Fintype.sum_prod_type]
apply Finset.sum_congr rfl
intro r _
simp only [normalizedPairWeight]
rw [← Finset.sum_mul, ← Finset.sum_div]
/-- Second-coordinate expectations are computed from the column sums. -/
theorem normalizedPairWeight_expect_snd {Ξ± Ξ² : Type*} [Fintype Ξ±] [Fintype Ξ²]
(B : Ξ± β†’ Ξ² β†’ ℝ) (Z : ℝ) (Ο† : Ξ² β†’ ℝ) :
(βˆ‘ t : Ξ± Γ— Ξ², normalizedPairWeight B Z t * Ο† t.2) =
βˆ‘ s : Ξ², ((βˆ‘ r : Ξ±, B r s) / Z) * Ο† s := by
rw [Fintype.sum_prod_type_right]
apply Finset.sum_congr rfl
intro s _
simp only [normalizedPairWeight]
rw [← Finset.sum_mul, ← Finset.sum_div]
/-- Finite masses with binomial row and column sums, supported above the
anti-diagonal `r+s=n-d`, have the required centered quadratic bound. -/
theorem binomial_block_coupling_bound
(n d : β„•) (B : Fin (n + 1) β†’ Fin (n + 1) β†’ ℝ)
(hB : βˆ€ r s, 0 ≀ B r s)
(hrow : βˆ€ r, (βˆ‘ s : Fin (n + 1), B r s) = (n.choose r.val : ℝ))
(hcol : βˆ€ s, (βˆ‘ r : Fin (n + 1), B r s) = (n.choose s.val : ℝ))
(hvanish : βˆ€ r s, r.val + s.val < n - d β†’ B r s = 0) :
(βˆ‘ r : Fin (n + 1), βˆ‘ s : Fin (n + 1),
((s.val : ℝ) + (r.val : ℝ) - (n : ℝ)) ^ 2 * B r s) ≀
4 * (d : ℝ) * Real.sqrt (n : ℝ) * (2 : ℝ) ^ n := by
let w : Fin (n + 1) Γ— Fin (n + 1) β†’ ℝ :=
normalizedPairWeight B ((2 : ℝ) ^ n)
let U : Fin (n + 1) Γ— Fin (n + 1) β†’ ℝ := fun t => (t.2.val : ℝ)
let V : Fin (n + 1) Γ— Fin (n + 1) β†’ ℝ :=
fun t => (n : ℝ) - (t.1.val : ℝ)
have hU (Ο† : ℝ β†’ ℝ) :
(βˆ‘ t : Fin (n + 1) Γ— Fin (n + 1), w t * Ο† (U t)) =
βˆ‘ s : Fin (n + 1), binomialWeight n s * Ο† (s.val : ℝ) := by
simpa only [w, U, hcol, binomialWeight] using
normalizedPairWeight_expect_snd B ((2 : ℝ) ^ n)
(fun s => Ο† (s.val : ℝ))
have hV (Ο† : ℝ β†’ ℝ) :
(βˆ‘ t : Fin (n + 1) Γ— Fin (n + 1), w t * Ο† (V t)) =
βˆ‘ r : Fin (n + 1),
binomialWeight n r * Ο† ((n : ℝ) - (r.val : ℝ)) := by
simpa only [w, V, hrow, binomialWeight] using
normalizedPairWeight_expect_fst B ((2 : ℝ) ^ n)
(fun r => Ο† ((n : ℝ) - (r.val : ℝ)))
have hw : βˆ€ t, 0 ≀ w t :=
normalizedPairWeight_nonneg B _ hB (binomialDenominator_pos n).le
have hprob : (βˆ‘ t, w t) = 1 := by
have h := hU (fun _ => 1)
simpa only [mul_one, sum_binomialWeight] using h
have hsame : βˆ€ Ο† : ℝ β†’ ℝ,
(βˆ‘ t, w t * Ο† (U t)) = βˆ‘ t, w t * Ο† (V t) := by
intro Ο†
rw [hU, hV, binomialWeight_reflect]
have hvariance :
(βˆ‘ t, w t * (U t - (n : ℝ) / 2) ^ 2) =
(Real.sqrt (n : ℝ) / 2) ^ 2 := by
rw [hU (fun z => (z - (n : ℝ) / 2) ^ 2)]
rw [binomialWeight_variance, binomialSigma_sq]
have hstep : βˆ€ t, w t β‰  0 β†’ V t - U t ≀ (d : ℝ) := by
rintro ⟨r, s⟩ ht
have hnonzero : B r s β‰  0 := by
intro hz
exact ht (by simp only [w, normalizedPairWeight, hz, zero_div])
have hnat : n - d ≀ r.val + s.val :=
Nat.le_of_not_gt (fun hlt => hnonzero (hvanish r s hlt))
have hnat' : n ≀ r.val + s.val + d := by omega
have hreal : (n : ℝ) ≀ (r.val : ℝ) + (s.val : ℝ) + (d : ℝ) := by
exact_mod_cast hnat'
dsimp only [U, V]
linarith
have hbound := finite_one_sided_coupling_bound w U V
((n : ℝ) / 2) (Real.sqrt (n : ℝ) / 2) (d : ℝ)
hw hprob hsame (binomialSigma_nonneg n) (Nat.cast_nonneg d) hvariance hstep
calc
_ = (2 : ℝ) ^ n * (βˆ‘ t, w t * (U t - V t) ^ 2) := by
rw [Fintype.sum_prod_type, Finset.mul_sum]
apply Finset.sum_congr rfl
intro r _
rw [Finset.mul_sum]
apply Finset.sum_congr rfl
intro s _
dsimp only [w, U, V, normalizedPairWeight]
field_simp [binomialDenominator_ne_zero n]
ring
_ ≀ (2 : ℝ) ^ n * (8 * (d : ℝ) * (Real.sqrt (n : ℝ) / 2)) :=
mul_le_mul_of_nonneg_left hbound (binomialDenominator_pos n).le
_ = 4 * (d : ℝ) * Real.sqrt (n : ℝ) * (2 : ℝ) ^ n := by ring
/-- The actual finite probability weights supplied by the Hilbert--Schmidt
blocks of an operator in a binomial orthogonal grading. -/
noncomputable def blockCouplingWeight {n : β„•} {ΞΉ : Type*} [Fintype ΞΉ]
(P : Fin (n + 1) β†’ Matrix ΞΉ ΞΉ β„‚) (H : Matrix ΞΉ ΞΉ β„‚)
(t : Fin (n + 1) Γ— Fin (n + 1)) : ℝ :=
normalizedPairWeight (fun r s => hsNormSq (P s * H * P r)) ((2 : ℝ) ^ n) t
theorem blockCouplingWeight_nonneg {n : β„•} {ΞΉ : Type*} [Fintype ΞΉ]
(P : Fin (n + 1) β†’ Matrix ΞΉ ΞΉ β„‚) (H : Matrix ΞΉ ΞΉ β„‚)
(t : Fin (n + 1) Γ— Fin (n + 1)) : 0 ≀ blockCouplingWeight P H t :=
normalizedPairWeight_nonneg _ _ (fun _ _ => hsNormSq_nonneg _)
(binomialDenominator_pos n).le t
/-- The first block index has the binomial distribution. -/
theorem blockCouplingWeight_fst_marginal {n : β„•} {ΞΉ : Type*}
[Fintype ΞΉ] [DecidableEq ΞΉ]
{P : Fin (n + 1) β†’ Matrix ΞΉ ΞΉ β„‚} (hP : OrthogonalProjectionFamily P)
(H : Matrix ΞΉ ΞΉ β„‚) (hH : H.conjTranspose * H = 1)
(hmult : βˆ€ k, hsNormSq (P k) = (n.choose k.val : ℝ))
(r : Fin (n + 1)) :
(βˆ‘ s : Fin (n + 1), blockCouplingWeight P H (r, s)) = binomialWeight n r := by
unfold blockCouplingWeight
rw [normalizedPairWeight_row, sum_hsNormSq_blocks_column hP H r hH, hmult]
rfl
/-- The second block index has the same binomial distribution. -/
theorem blockCouplingWeight_snd_marginal {n : β„•} {ΞΉ : Type*}
[Fintype ΞΉ] [DecidableEq ΞΉ]
{P : Fin (n + 1) β†’ Matrix ΞΉ ΞΉ β„‚} (hP : OrthogonalProjectionFamily P)
(H : Matrix ΞΉ ΞΉ β„‚) (hH : H * H.conjTranspose = 1)
(hmult : βˆ€ k, hsNormSq (P k) = (n.choose k.val : ℝ))
(s : Fin (n + 1)) :
(βˆ‘ r : Fin (n + 1), blockCouplingWeight P H (r, s)) = binomialWeight n s := by
unfold blockCouplingWeight
rw [normalizedPairWeight_column, sum_hsNormSq_blocks_row hP H s hH, hmult]
rfl
/-- Unitarity and the grading multiplicities make the block weights a
probability distribution without any additional normalization assumption. -/
theorem sum_blockCouplingWeight {n : β„•} {ΞΉ : Type*}
[Fintype ΞΉ] [DecidableEq ΞΉ]
{P : Fin (n + 1) β†’ Matrix ΞΉ ΞΉ β„‚} (hP : OrthogonalProjectionFamily P)
(H : Matrix ΞΉ ΞΉ β„‚) (hH : H.conjTranspose * H = 1)
(hmult : βˆ€ k, hsNormSq (P k) = (n.choose k.val : ℝ)) :
(βˆ‘ t : Fin (n + 1) Γ— Fin (n + 1), blockCouplingWeight P H t) = 1 := by
rw [Fintype.sum_prod_type]
simp_rw [blockCouplingWeight_fst_marginal hP H hH hmult]
exact sum_binomialWeight n
/-- A nonzero block probability lies on or above the required anti-diagonal. -/
theorem blockCouplingWeight_support {n d : β„•} {ΞΉ : Type*} [Fintype ΞΉ]
(P : Fin (n + 1) β†’ Matrix ΞΉ ΞΉ β„‚) (H : Matrix ΞΉ ΞΉ β„‚)
(hvanish : βˆ€ r s, r.val + s.val < n - d β†’ P s * H * P r = 0)
(r s : Fin (n + 1)) (ht : blockCouplingWeight P H (r, s) β‰  0) :
n - d ≀ r.val + s.val := by
apply Nat.le_of_not_gt
intro hlt
apply ht
simp only [blockCouplingWeight, normalizedPairWeight, hvanish r s hlt,
hsNormSq_zero, zero_div]
/-- The spectral block coupling bounds the actual centered grading
anticommutator. Its hypotheses are the orthogonal grading, its binomial
multiplicities, unitarity, and the separately proved low-degree vanishing. -/
theorem hsNormSq_centeredGrading_anticommutator_le {ΞΉ : Type*}
[Fintype ΞΉ] [DecidableEq ΞΉ]
(n d : β„•) (P : Fin (n + 1) β†’ Matrix ΞΉ ΞΉ β„‚)
(hP : OrthogonalProjectionFamily P) (H : Matrix ΞΉ ΞΉ β„‚)
(hleft : H.conjTranspose * H = 1) (hright : H * H.conjTranspose = 1)
(hmult : βˆ€ k, hsNormSq (P k) = (n.choose k.val : ℝ))
(hvanish : βˆ€ r s, r.val + s.val < n - d β†’ P s * H * P r = 0) :
hsNormSq (centeredGrading P * H + H * centeredGrading P) ≀
4 * (d : ℝ) * Real.sqrt (n : ℝ) * (2 : ℝ) ^ n := by
rw [hsNormSq_centered_anticommutator hP H]
apply binomial_block_coupling_bound n d (fun r s => hsNormSq (P s * H * P r))
Β· intro r s
exact hsNormSq_nonneg _
Β· intro r
rw [sum_hsNormSq_blocks_column hP H r hleft, hmult]
Β· intro s
rw [sum_hsNormSq_blocks_row hP H s hright, hmult]
Β· intro r s hrs
rw [hvanish r s hrs, hsNormSq_zero]
/-- Trace-multiplicity form, for direct use with finite-dimensional orthogonal
projections whose ranks have already been computed. -/
theorem hsNormSq_centeredGrading_anticommutator_le_of_trace {ΞΉ : Type*}
[Fintype ΞΉ] [DecidableEq ΞΉ]
(n d : β„•) (P : Fin (n + 1) β†’ Matrix ΞΉ ΞΉ β„‚)
(hP : OrthogonalProjectionFamily P) (H : Matrix ΞΉ ΞΉ β„‚)
(hleft : H.conjTranspose * H = 1) (hright : H * H.conjTranspose = 1)
(htrace : βˆ€ k, (Matrix.trace (P k)).re = (n.choose k.val : ℝ))
(hvanish : βˆ€ r s, r.val + s.val < n - d β†’ P s * H * P r = 0) :
hsNormSq (centeredGrading P * H + H * centeredGrading P) ≀
4 * (d : ℝ) * Real.sqrt (n : ℝ) * (2 : ℝ) ^ n := by
apply hsNormSq_centeredGrading_anticommutator_le n d P hP H hleft hright _ hvanish
intro k
rw [hsNormSq_projection (P k) (hP.conjTranspose_eq k) (hP.idempotent k), htrace]
end LeanBlast.GotsmanLinial
end OAI