Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarInvariantCommutant

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

Direct imports

  • Nonadditivity.HaarInvariantTensor
  • Mathlib.Analysis.Matrix.Spectrum dependency
  • Mathlib.LinearAlgebra.Matrix.Transvection dependency
  • Mathlib.LinearAlgebra.Matrix.Swap dependency

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

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

8 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarInvariantTensor7import Mathlib.Analysis.Matrix.Spectrum8import Mathlib.LinearAlgebra.Matrix.Transvection9import Mathlib.LinearAlgebra.Matrix.Swap1011/-! # The tensor-power commutant of the unitary group1213Commutation with every unitary tensor power implies commutation with every14matrix tensor power.  Phase weights give diagonal matrices, the spectral15theorem gives Hermitian matrices, and elementary matrices finish the proof.16-/17noncomputable section18set_option backward.isDefEq.respectTransparency false19set_option maxHeartbeats 100000020namespace Nonadditivity.HaarInvariantCommutant21open HaarModel HaarInvariantTensor HaarFourthMoments22open scoped BigOperators Matrix Matrix.Norms.L2Operator2324variable {N p : ℕ}2526theorem power_diagonal (d : Fin (N+1) → ℂ) :27    power p (Matrix.diagonal d) = Matrix.diagonal (fun x : Tuple N p => ∏ r, d (x r)) := by28  classical29  ext x y30  by_cases hxy : x = y31  · subst y32    simp [power]33  · rw [Matrix.diagonal_apply_ne _ hxy]34    obtain ⟨r, hr⟩ := Function.ne_iff.mp hxy35    exact Finset.prod_eq_zero (Finset.mem_univ r) (by simp [hr])3637theorem commute_diagonal_of_unitary (T : Matrix (Tuple N p) (Tuple N p) ℂ)38    (hT : ∀ U : LocalUnitary N, Commute T (power p (U : Mat N)))39    (d : Fin (N+1) → ℂ) : Commute T (power p (Matrix.diagonal d)) := by40  classical41  have hv : ∀ U : LocalUnitary N, mixed N p U *ᵥ vectorize T = vectorize T :=42    fun U => (mixed_fixed_iff_commute U T).mpr (hT U).eq.symm43  rw [power_diagonal]44  change T * Matrix.diagonal _ = Matrix.diagonal _ * T45  ext x y46  simp only [Matrix.mul_diagonal, Matrix.diagonal_mul]47  by_cases hzero : T x y = 048  · simp [hzero]49  · have hm (r : Fin (N+1)) : HaarMixedMoments.multiplicity x r =50        HaarMixedMoments.multiplicity y r := by51      by_contra hne52      exact hzero (invariant_eq_zero_of_multiplicity_ne (vectorize T) hv x y r hne)53    obtain ⟨σ, hσ⟩ := exists_perm_of_multiplicity_eq x y hm54    have he : (∏ r, d (x r)) = ∏ r, d (y r) := by55      rw [hσ]56      exact Equiv.prod_comp σ (fun r => d (y r))57    rw [he, mul_comm]5859theorem commute_hermitian_of_unitary (T : Matrix (Tuple N p) (Tuple N p) ℂ)60    (hT : ∀ U : LocalUnitary N, Commute T (power p (U : Mat N)))61    (A : Mat N) (hA : A.IsHermitian) : Commute T (power p A) := by62  rw [hA.spectral_theorem, Unitary.conjStarAlgAut_apply, power_mul, power_mul]63  exact ((hT hA.eigenvectorUnitary).mul_right64    (commute_diagonal_of_unitary T hT _)).mul_right (hT (star hA.eigenvectorUnitary))6566theorem commute_transvection_one_of_unitary (T : Matrix (Tuple N p) (Tuple N p) ℂ)67    (hT : ∀ U : LocalUnitary N, Commute T (power p (U : Mat N)))68    (i j : Fin (N+1)) : Commute T (power p (Matrix.transvection i j 1)) := by69  let S : Mat N := Matrix.swap ℂ i j70  have hS : S.IsHermitian := Matrix.conjTranspose_swap i j71  have hD : (Matrix.single j j (1 : ℂ)).IsHermitian := by72    simp [Matrix.IsHermitian]73  have he : S * Matrix.single j j (1 : ℂ) = Matrix.single i j 1 := by74    ext a b75    have hs : (j = Equiv.swap i j a) ↔ i = a := by76      constructor77      · intro h78        simpa using congrArg (Equiv.swap i j) h79      · intro h80        simp [← h]81    simp [S, Matrix.swap, PEquiv.toMatrix_toPEquiv_mul,82      Matrix.single_apply, hs]83  have hprod : S * (S + Matrix.single j j 1) = Matrix.transvection i j 1 := by84    rw [Matrix.mul_add, he]85    simp [S, Matrix.swap_mul_self, Matrix.transvection]86  rw [← hprod, power_mul]87  exact (commute_hermitian_of_unitary T hT S hS).mul_right88    (commute_hermitian_of_unitary T hT _ (hS.add hD))8990theorem commute_transvection_of_unitary (T : Matrix (Tuple N p) (Tuple N p) ℂ)91    (hT : ∀ U : LocalUnitary N, Commute T (power p (U : Mat N)))92    (i j : Fin (N+1)) (hij : i ≠ j) (c : ℂ) :93    Commute T (power p (Matrix.transvection i j c)) := by94  classical95  by_cases hc : c = 096  · subst c97    simp [power_one]98  · let d : Fin (N+1) → ℂ := fun r => if r=i then c else 199    let e : Fin (N+1) → ℂ := fun r => if r=i then c⁻¹ else 1100    have he : Matrix.diagonal d * Matrix.transvection i j 1 * Matrix.diagonal e =101        Matrix.transvection i j c := by102      ext a b103      simp only [Matrix.mul_diagonal, Matrix.diagonal_mul, Matrix.transvection,104        Matrix.add_apply, Matrix.one_apply, Matrix.single_apply]105      by_cases hab : a=b106      · subst b107        by_cases hai : a=i <;> by_cases haj : a=j <;>108          simp_all [d, e, eq_comm]109      · by_cases hai : a=i <;> by_cases hbj : b=j <;>110          simp_all [d, e, eq_comm]111    rw [← he, power_mul, power_mul]112    exact ((commute_diagonal_of_unitary T hT d).mul_right113      (commute_transvection_one_of_unitary T hT i j)).mul_right114        (commute_diagonal_of_unitary T hT e)115116/-- The unitary and full-matrix tensor powers have the same commutant. -/117theorem commute_all_matrices_of_unitary (T : Matrix (Tuple N p) (Tuple N p) ℂ)118    (hT : ∀ U : LocalUnitary N, Commute T (power p (U : Mat N)))119    (A : Mat N) : Commute T (power p A) := by120  apply Matrix.diagonal_transvection_induction (fun A => Commute T (power p A)) A121  · intro d _122    exact commute_diagonal_of_unitary T hT d123  · intro t124    exact commute_transvection_of_unitary T hT t.i t.j t.hij t.c125  · intro A B hA hB126    rw [power_mul]127    exact hA.mul_right hB128129theorem commute_power_of_unitary (T : Matrix (Tuple N p) (Tuple N p) ℂ)130    (hT : ∀ U : LocalUnitary N, power p (U : Mat N) * T = T * power p (U : Mat N))131    (A : Mat N) : power p A * T = T * power p A :=132  (commute_all_matrices_of_unitary T (fun U => (hT U).symm) A).eq.symm133134end Nonadditivity.HaarInvariantCommutant