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
Nonadditivity.HaarInvariantTensor.average_eq_weingartenNonadditivity.HaarInvariantTensor.integral_entryMonomial_eq_weingartenNonadditivity.HaarInvariantTensor.invariant_eq_contractionsNonadditivity.HaarInvariantTensor.invariant_mem_range_contractions
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) :27v = contractions N p *ᵥ (fun σ : Perm p => v (e ∘ σ,e)) := by28classical29let c : Perm p → ℂ := fun σ => v (e ∘ σ,e)30let w : Pair N p → ℂ := v - contractions N p *ᵥ c31have hw (U : LocalUnitary N) : mixed N p U *ᵥ w = w := by32dsimp [w]33rw [Matrix.mulVec_sub, Matrix.mulVec_mulVec, mixed_mul_contractions, hv]34have hws (σ : Perm p) : w (e ∘ σ,e) = 0 := by35change v (e ∘ σ,e) - (contractions N p *ᵥ c) (e ∘ σ,e) = 036rw [contractions_row_mulVec]37exact sub_self _38have hwe (x : Tuple N p) : w (x,e) = 0 := by39by_cases hm : ∀ r, HaarMixedMoments.multiplicity x r = HaarMixedMoments.multiplicity e r40· obtain ⟨σ, hσ⟩ := exists_perm_of_multiplicity_eq x e hm41rw [hσ]42exact hws σ43· push_neg at hm44obtain ⟨r, hr⟩ := hm45exact invariant_eq_zero_of_multiplicity_ne w hw x e r hr46let T : Matrix (Tuple N p) (Tuple N p) ℂ := fun x y => w (x,y)47have hTu (U : LocalUnitary N) :48power p (U : HaarFourthMoments.Mat N) * T = T * power p (U : HaarFourthMoments.Mat N) := by49apply (mixed_fixed_iff_commute U T).mp50exact hw U51have hT : T = 0 := eq_zero_of_commute_power_of_column_zero e T52(HaarInvariantCommutant.commute_power_of_unitary T hTu) hwe53funext xy54have h := congrFun (congrFun hT xy.1) xy.255change v xy - (contractions N p *ᵥ c) xy = 0 at h56exact 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 := by61let e : Fin p ↪ Fin (N+1) := ⟨Fin.castLE hp, Fin.castLE_injective hp⟩62exact ⟨_, 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) :67average (mixed N p) = contractions N p * weingarten N p * (contractions N p)ᴴ := by68classical69let e : Fin p ↪ Fin (N+1) := ⟨Fin.castLE hp, Fin.castLE_injective hp⟩70let P := average (mixed N p)71let B := contractions N p72let C : Matrix (Perm p) (Pair N p) ℂ := fun σ ab => P (e ∘ σ,e) ab73have hfactor : P = B * C := by74ext xy ab75have hv (U : LocalUnitary N) :76mixed N p U *ᵥ (fun xy => P xy ab) = (fun xy => P xy ab) := by77funext xy78change (mixed N p U * average (mixed N p)) xy ab = average (mixed N p) xy ab79rw [mul_average _ (continuous_mixed N p) (mixed_mul N p)]80exact congrFun (invariant_eq_contractions e (fun xy => P xy ab) hv) xy81have hleft : Bᴴ * P = Bᴴ := by82have h := congrArg Matrix.conjTranspose (average_mul_contractions N p)83simpa only [Matrix.conjTranspose_mul, (mixed_average_hermitian N p).eq] using h84have hgram : gram N p * C = Bᴴ := by85change (Bᴴ * B) * C = Bᴴ86rw [Matrix.mul_assoc, ← hfactor, hleft]87have hc : C = weingarten N p * Bᴴ := by88rw [← hgram, ← Matrix.mul_assoc, weingarten_mul_gram hp, Matrix.one_mul]89rw [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) := by99have h := congrFun (congrFun (average_eq_weingarten hp) (i,k)) (j,l)100change (∫ U : LocalUnitary N, HaarMixedMoments.entryMonomial i j k l U ∂haar N) = _ at h101rw [h]102simp only [Matrix.mul_apply, Matrix.conjTranspose_apply, contractions,103apply_ite star, star_one, star_zero, Finset.sum_mul]104rw [Finset.sum_comm]105106end Nonadditivity.HaarInvariantTensor