Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarInvariantSpanning

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

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

4 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarInvariantCommutant78/-! # The unitary invariant tensors are spanned by permutations910The proof uses only phase invariance, matrix tensor powers, and finite-dimensional11spectral linear algebra.  The resulting inverse-Gram formula is an identity for12actual Haar integrals, with no invariant-spanning assumption.13-/1415noncomputable section16set_option backward.isDefEq.respectTransparency false17set_option maxHeartbeats 10000001819namespace Nonadditivity.HaarInvariantTensor2021open MeasureTheory HaarModel HaarAveraging22open scoped BigOperators Matrix Matrix.Norms.L2Operator ComplexOrder2324/-- Invariants are exactly the permutation contractions in the stable range. -/25theorem invariant_eq_contractions {N p : ℕ} (e : Fin p ↪ Fin (N+1))26    (v : Pair N p → ℂ) (hv : ∀ U : LocalUnitary N, mixed N p U *ᵥ v = v) :27    v = contractions N p *ᵥ (fun σ : Perm p => v (e ∘ σ,e)) := by28  classical29  let c : Perm p → ℂ := fun σ => v (e ∘ σ,e)30  let w : Pair N p → ℂ := v - contractions N p *ᵥ c31  have hw (U : LocalUnitary N) : mixed N p U *ᵥ w = w := by32    dsimp [w]33    rw [Matrix.mulVec_sub, Matrix.mulVec_mulVec, mixed_mul_contractions, hv]34  have hws (σ : Perm p) : w (e ∘ σ,e) = 0 := by35    change v (e ∘ σ,e) - (contractions N p *ᵥ c) (e ∘ σ,e) = 036    rw [contractions_row_mulVec]37    exact sub_self _38  have hwe (x : Tuple N p) : w (x,e) = 0 := by39    by_cases hm : ∀ r, HaarMixedMoments.multiplicity x r = HaarMixedMoments.multiplicity e r40    · obtain ⟨σ, hσ⟩ := exists_perm_of_multiplicity_eq x e hm41      rw [hσ]42      exact hws σ43    · push_neg at hm44      obtain ⟨r, hr⟩ := hm45      exact invariant_eq_zero_of_multiplicity_ne w hw x e r hr46  let T : Matrix (Tuple N p) (Tuple N p) ℂ := fun x y => w (x,y)47  have hTu (U : LocalUnitary N) :48      power p (U : HaarFourthMoments.Mat N) * T = T * power p (U : HaarFourthMoments.Mat N) := by49    apply (mixed_fixed_iff_commute U T).mp50    exact hw U51  have hT : T = 0 := eq_zero_of_commute_power_of_column_zero e T52    (HaarInvariantCommutant.commute_power_of_unitary T hTu) hwe53  funext xy54  have h := congrFun (congrFun hT xy.1) xy.255  change v xy - (contractions N p *ᵥ c) xy = 0 at h56  exact sub_eq_zero.mp h5758theorem invariant_mem_range_contractions {N p : ℕ} (hp : p ≤ N+1)59    (v : Pair N p → ℂ) (hv : ∀ U : LocalUnitary N, mixed N p U *ᵥ v = v) :60    ∃ c : Perm p → ℂ, v = contractions N p *ᵥ c := by61  let e : Fin p ↪ Fin (N+1) := ⟨Fin.castLE hp, Fin.castLE_injective hp⟩62  exact ⟨_, invariant_eq_contractions e v hv⟩6364/-- Exact arbitrary-order Weingarten integration: the actual Haar projection is65the inverse-Gram projection onto the permutation contraction tensors. -/66theorem average_eq_weingarten {N p : ℕ} (hp : p ≤ N+1) :67    average (mixed N p) = contractions N p * weingarten N p * (contractions N p)ᴴ := by68  classical69  let e : Fin p ↪ Fin (N+1) := ⟨Fin.castLE hp, Fin.castLE_injective hp⟩70  let P := average (mixed N p)71  let B := contractions N p72  let C : Matrix (Perm p) (Pair N p) ℂ := fun σ ab => P (e ∘ σ,e) ab73  have hfactor : P = B * C := by74    ext xy ab75    have hv (U : LocalUnitary N) :76        mixed N p U *ᵥ (fun xy => P xy ab) = (fun xy => P xy ab) := by77      funext xy78      change (mixed N p U * average (mixed N p)) xy ab = average (mixed N p) xy ab79      rw [mul_average _ (continuous_mixed N p) (mixed_mul N p)]80    exact congrFun (invariant_eq_contractions e (fun xy => P xy ab) hv) xy81  have hleft : Bᴴ * P = Bᴴ := by82    have h := congrArg Matrix.conjTranspose (average_mul_contractions N p)83    simpa only [Matrix.conjTranspose_mul, (mixed_average_hermitian N p).eq] using h84  have hgram : gram N p * C = Bᴴ := by85    change (Bᴴ * B) * C = Bᴴ86    rw [Matrix.mul_assoc, ← hfactor, hleft]87  have hc : C = weingarten N p * Bᴴ := by88    rw [← hgram, ← Matrix.mul_assoc, weingarten_mul_gram hp, Matrix.one_mul]89  rw [show average (mixed N p) = B*C from hfactor, hc, ← Matrix.mul_assoc]9091/-- The full entrywise unitary Weingarten formula, proved for normalized Haar92measure at every degree up to the dimension. -/93theorem integral_entryMonomial_eq_weingarten {N p : ℕ} (hp : p ≤ N+1)94    (i j k l : Tuple N p) :95    (∫ U : LocalUnitary N, HaarMixedMoments.entryMonomial i j k l U ∂haar N) =96      ∑ σ : Perm p, ∑ τ : Perm p,97        (if i = k ∘ σ then 1 else 0) * weingarten N p σ τ *98          (if j = l ∘ τ then 1 else 0) := by99  have h := congrFun (congrFun (average_eq_weingarten hp) (i,k)) (j,l)100  change (∫ U : LocalUnitary N, HaarMixedMoments.entryMonomial i j k l U ∂haar N) = _ at h101  rw [h]102  simp only [Matrix.mul_apply, Matrix.conjTranspose_apply, contractions,103    apply_ite star, star_one, star_zero, Finset.sum_mul]104  rw [Finset.sum_comm]105106end Nonadditivity.HaarInvariantTensor