Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarWeingartenInverse

Download original .lean · View on GitHub · Jump to source

Direct imports

Imported by project modules

2 direct reverse imports

Relationships above come from literal import commands. The declarations below link to types and references extracted from Lean’s environment. Source text is complete and unchanged.

Declarations in this module

11 project constants, including generated, internal and private declarations.

11 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarPermutationSupport7import Nonadditivity.HaarWeingartenInverseSum8import Nonadditivity.HaarWeingartenCycles9import Mathlib.Order.Interval.Finset.Nat1011/-! # Weighted inverse bounds for permutation Gram matrices1213The number of permutations in a Hamming-distance layer is polynomial in the14degree. Summing those layers yields a uniform inverse bound, with no factorial15loss in the number of permutations.16-/1718noncomputable section19set_option maxHeartbeats 100000020namespace Nonadditivity.HaarWeingartenInverse21open HaarPermutationSupport22open scoped BigOperators Matrix2324theorem geometric_tail_le_half (p : ℕ) :25    (∑ d ∈ Finset.Icc 2 p, (1/2:ℝ)^d) ≤ 1/2 := by26  have hs : ∀ n : ℕ, (∑ d ∈ Finset.Icc 2 (n+1), (1/2:ℝ)^d) ≤27      1/2-(1/2:ℝ)^(n+1) := by28    intro n29    induction n with30    | zero => norm_num31    | succ n ih =>32      rw [Finset.sum_Icc_succ_top (by omega : 2 ≤ n+1+1)]33      have he : (1/2:ℝ)^(n+1+1) = (1/2:ℝ)^(n+1)/2 := by rw [pow_succ]; ring34      rw [he]35      linarith36  cases p with37  | zero => norm_num38  | succ n => exact (hs n).trans (by linarith [pow_nonneg (by norm_num : (0:ℝ) ≤ 1/2) (n+1)])3940def weight (p : ℕ) (q : ℝ) (σ τ : Equiv.Perm (Fin p)) : ℝ :=41  (q/(2*(p:ℝ)))^(distance σ τ)4243theorem weighted_row_sum_le (p : ℕ) (hp : 0 < p) (q : ℝ) (hq : 0 < q)44    (A : Matrix (Equiv.Perm (Fin p)) (Equiv.Perm (Fin p)) ℂ)45    (hdiag : ∀ σ, A σ σ = 1)46    (hA : ∀ σ τ, σ ≠ τ → ‖A σ τ‖ ≤ (q⁻¹)^(distance σ τ))47    (σ : Equiv.Perm (Fin p)) :48    (∑ τ, weight p q σ τ * ‖(1-A) σ τ‖) ≤ 1/2 := by49  have hp0 : (0:ℝ) < p := by exact_mod_cast hp50  let c : ℝ := 1/(2*(p:ℝ))51  have hc : 0 ≤ c := by dsimp [c]; positivity52  have hterm (τ : Equiv.Perm (Fin p)) (hne : τ ≠ σ) :53      weight p q σ τ * ‖(1-A) σ τ‖ ≤ c^(distance σ τ) := by54    have hne' := Ne.symm hne55    have hz : (1-A) σ τ = -A σ τ := by simp [hne']56    rw [hz, norm_neg]57    calc58      _ ≤ weight p q σ τ * (q⁻¹)^(distance σ τ) :=59        mul_le_mul_of_nonneg_left (hA σ τ hne') (by unfold weight; positivity)60      _ = c^(distance σ τ) := by61        unfold weight c62        rw [← mul_pow]63        congr 164        field_simp65  have hsum : (∑ τ, weight p q σ τ * ‖(1-A) σ τ‖) ≤66      ∑ τ ∈ Finset.univ.erase σ, c^(distance σ τ) := by67    rw [← Finset.sum_erase_add _ _ (Finset.mem_univ σ)]68    simp only [Matrix.sub_apply, Matrix.one_apply_eq, hdiag, sub_self, norm_zero,69      mul_zero, add_zero]70    exact Finset.sum_le_sum (fun τ hτ => hterm τ (Finset.mem_erase.mp hτ).1)71  have hfiber : (∑ τ ∈ Finset.univ.erase σ, c^(distance σ τ)) =72      ∑ d ∈ Finset.Icc 2 p,73        ∑ τ ∈ (Finset.univ.erase σ).filter (fun τ => distance σ τ=d), c^d := by74    symm75    have hmap : ∀ τ ∈ Finset.univ.erase σ, distance σ τ ∈ Finset.Icc 2 p := by76      intro τ hτ77      exact Finset.mem_Icc.mpr ⟨two_le_distance_of_ne σ τ (Ne.symm (Finset.mem_erase.mp hτ).1),78        by simpa using distance_le_card σ τ⟩79    simpa using Finset.sum_fiberwise_of_maps_to' hmap (fun d => c^d)80  have hlayer (d : ℕ) :81      ((Finset.univ.erase σ).filter (fun τ => distance σ τ=d)).card ≤ p^d := by82    calc83      _ ≤ (Finset.univ.filter (fun τ : Equiv.Perm (Fin p) => distance σ τ=d)).card :=84        Finset.card_le_card (Finset.filter_subset_filter _ (Finset.erase_subset _ _))85      _ = Fintype.card {τ : Equiv.Perm (Fin p) // distance σ τ=d} := by86        simp [Fintype.card_subtype]87      _ ≤ p^d := by simpa using card_distance_layer_le_pow σ d88  calc89    _ ≤ ∑ τ ∈ Finset.univ.erase σ, c^(distance σ τ) := hsum90    _ = _ := hfiber91    _ ≤ ∑ d ∈ Finset.Icc 2 p, (1/2:ℝ)^d := by92      apply Finset.sum_le_sum93      intro d hd94      simp only [Finset.sum_const, nsmul_eq_mul]95      calc96        _ ≤ (p:ℝ)^d * c^d := by97          apply mul_le_mul_of_nonneg_right _ (pow_nonneg hc d)98          exact_mod_cast hlayer d99        _ = (1/2:ℝ)^d := by100          rw [← mul_pow]101          congr 1102          dsimp [c]103          field_simp104    _ ≤ _ := geometric_tail_le_half p105106/-- Hamming decay of the inverse of a normalized Gram matrix. -/107theorem inverse_entry_bound (p : ℕ) (hp : 0 < p) (q : ℝ)108    (hq : 2*(p:ℝ) ≤ q)109    (A X : Matrix (Equiv.Perm (Fin p)) (Equiv.Perm (Fin p)) ℂ)110    (hAX : A*X=1) (hdiag : ∀ σ, A σ σ=1)111    (hA : ∀ σ τ, σ ≠ τ → ‖A σ τ‖ ≤ (q⁻¹)^(distance σ τ))112    (σ τ : Equiv.Perm (Fin p)) :113    weight p q σ τ * ‖X σ τ‖ ≤ 2 := by114  have hp0 : (0:ℝ) < p := by exact_mod_cast hp115  have hq0 : 0 < q := lt_of_lt_of_le (by positivity) hq116  have hr : 1 ≤ q/(2*(p:ℝ)) := (le_div_iff₀ (by positivity)).mpr (by simpa using hq)117  apply WeightedMatrixInverse.weighted_inverse_entry_le_two A X hAX (weight p q)118  · intro σ τ119    unfold weight120    positivity121  · intro σ122    simp [weight]123  · intro σ κ τ124    unfold weight125    rw [← pow_add]126    exact pow_le_pow_right₀ hr (distance_triangle σ κ τ)127  · exact weighted_row_sum_le p hp q hq0 A hdiag hA128129theorem inverse_sum_bound (p : ℕ) (hp : 0 < p) (q : ℝ)130    (hq : 2*(p:ℝ) ≤ q)131    (A X : Matrix (Equiv.Perm (Fin p)) (Equiv.Perm (Fin p)) ℂ)132    (hAX : A*X=1) (hdiag : ∀ σ, A σ σ=1)133    (hA : ∀ σ τ, σ ≠ τ → ‖A σ τ‖ ≤ (q⁻¹)^(distance σ τ))134    (σ : Equiv.Perm (Fin p)) :135    (∑ τ, weight p q σ τ * ‖X σ τ‖) ≤ 2 := by136  have hp0 : (0:ℝ) < p := by exact_mod_cast hp137  have hq0 : 0 < q := lt_of_lt_of_le (by positivity) hq138  have hr : 1 ≤ q/(2*(p:ℝ)) := (le_div_iff₀ (by positivity)).mpr (by simpa using hq)139  apply WeightedMatrixInverse.weighted_inverse_sum_le_two A X hAX (weight p q)140  · intro σ τ141    unfold weight142    positivity143  · intro σ144    simp [weight]145  · intro σ κ τ146    unfold weight147    rw [← pow_add]148    exact pow_le_pow_right₀ hr (distance_triangle σ κ τ)149  · exact weighted_row_sum_le p hp q hq0 A hdiag hA150151open HaarInvariantTensor in152/-- A uniform weighted absolute row bound for the actual inverse Haar Gram153matrix. Both the matrix and its inverse are the constructed invariant-tensor154objects, and the only premises are explicit numerical dimension bounds. -/155theorem weingarten_weighted_sum_le (N p : ℕ) (hp : 0 < p) (hpd : p ≤ N+1)156    (hsize : 2*(p:ℝ) ≤ Real.sqrt (N+1)) (σ : Perm p) :157    (∑ τ, weight p (Real.sqrt (N+1)) σ τ * ‖weingarten N p σ τ‖) ≤158      2/(N+1:ℝ)^p := by159  let r : ℝ := (N+1:ℝ)^p160  let q : ℝ := Real.sqrt (N+1)161  have hr : 0 < r := by dsimp [r]; positivity162  have hq : 0 < q := by dsimp [q]; positivity163  let A : Matrix (Perm p) (Perm p) ℂ := r⁻¹ • gram N p164  let X : Matrix (Perm p) (Perm p) ℂ := r • weingarten N p165  have hAX : A*X=1 := by166    dsimp [A,X]167    rw [smul_mul_smul_comm, gram_mul_weingarten hpd, inv_mul_cancel₀ (ne_of_gt hr)]168    ext σ τ169    simp170  have hdiag (σ : Perm p) : A σ σ=1 := by171    change r⁻¹ • gram N p σ σ = 1172    rw [gram_apply_self]173    have he : (N+1:ℂ)^p = (r:ℂ) := by dsimp [r]; norm_cast174    rw [he]175    change (r⁻¹:ℝ) • (r:ℂ) = 1176    simp only [Complex.real_smul, ← Complex.ofReal_mul,177      inv_mul_cancel₀ (ne_of_gt hr), Complex.ofReal_one]178  have hA (σ τ : Perm p) (_hne : σ ≠ τ) : ‖A σ τ‖ ≤ q⁻¹^(distance σ τ) := by179    have hs : ‖A σ τ‖ = r⁻¹*‖gram N p σ τ‖ := by180      simp [A, Matrix.smul_apply, Real.norm_eq_abs, abs_of_pos hr]181    have hg := HaarWeingartenCycles.norm_gram_mul_sqrt_pow_le N p σ τ182    rw [← distance_eq_support] at hg183    change ‖gram N p σ τ‖ * q^(distance σ τ) ≤ r at hg184    rw [inv_pow, ← one_div]185    apply (le_div_iff₀ (pow_pos hq _)).mpr186    rw [hs, mul_assoc]187    calc188      _ ≤ r⁻¹*r := mul_le_mul_of_nonneg_left hg (inv_nonneg.mpr hr.le)189      _ = 1 := inv_mul_cancel₀ (ne_of_gt hr)190  have h := inverse_sum_bound p hp q hsize A X hAX hdiag hA σ191  have hnorm (τ : Perm p) : ‖X σ τ‖ = r*‖weingarten N p σ τ‖ := by192    simp [X, Matrix.smul_apply, Real.norm_eq_abs, abs_of_pos hr]193  simp_rw [hnorm] at h194  apply (le_div_iff₀ hr).mpr195  calc196    _ = ∑ τ, weight p q σ τ * (r*‖weingarten N p σ τ‖) := by197      rw [Finset.sum_mul]198      apply Finset.sum_congr rfl199      intro τ _200      ring201    _ ≤ 2 := h202203end Nonadditivity.HaarWeingartenInverse