Exact Lean source
Nonadditivity.HaarMixedMoments
Download original .lean · View on GitHub · Jump to source
Direct imports
Nonadditivity.HaarColumnMomentsMathlib.RingTheory.RootsOfUnity.Complexdependency
Imported by project modules
3 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
14 project constants, including generated, internal and private declarations.
14 declarations
Nonadditivity.HaarMixedMoments.entryMonomialNonadditivity.HaarMixedMoments.entryMonomial.eq_1internal/detail/privateNonadditivity.HaarMixedMoments.entryMonomial_row_phaseNonadditivity.HaarMixedMoments.integral_entryMonomial_eq_zero_of_row_mismatchNonadditivity.HaarMixedMoments.integral_entry_pow_mul_star_powNonadditivity.HaarMixedMoments.integral_entry_pow_mul_star_pow._simp_1_1internal/detail/privateNonadditivity.HaarMixedMoments.integral_entry_pow_mul_star_pow_of_neNonadditivity.HaarMixedMoments.integral_eq_zero_of_row_phaseNonadditivity.HaarMixedMoments.integral_eq_zero_of_row_phase._proof_1_1internal/detail/privateNonadditivity.HaarMixedMoments.integral_eq_zero_of_row_phase._proof_1_2internal/detail/privateNonadditivity.HaarMixedMoments.integral_eq_zero_of_row_phase._proof_1_3internal/detail/privateNonadditivity.HaarMixedMoments.multiplicityNonadditivity.HaarMixedMoments.multiplicity.eq_1internal/detail/privateNonadditivity.HaarMixedMoments.prod_row_phase
Full module
1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarColumnMoments7import Mathlib.RingTheory.RootsOfUnity.Complex89/-! # Exact phase selection for arbitrary Haar entry moments -/10noncomputable section11set_option backward.isDefEq.respectTransparency false1213namespace Nonadditivity.HaarMixedMoments14open MeasureTheory HaarModel HaarMoments HaarFourthMoments HaarColumnMoments15open scoped Matrix Matrix.Norms.L2Operator16variable {N : ℕ}1718/-- An unequal pair of phase weights forces the actual Haar integral to vanish. -/19theorem integral_eq_zero_of_row_phase (f : LocalUnitary N → ℂ)20(i : Fin (N+1)) (p q : ℕ) (hpq : p ≠ q)21(hf : ∀ z : ℂ, ∀ hz : star z*z=1, ∀ U : LocalUnitary N,22f (rowPhase i z hz * U) = (z^p * (star z)^q) * f U) :23(∫ U, f U ∂haar N) = 0 := by24let m := p+q+125have hm : m ≠ 0 := by dsimp [m]; omega26let z := Complex.exp (2 * Real.pi * Complex.I / m)27have hzprim : IsPrimitiveRoot z m := Complex.isPrimitiveRoot_exp m hm28have hznorm : ‖z‖ = 1 := hzprim.norm'_eq_one hm29have hz : star z*z=1 := by30rw [Complex.star_def, ← Complex.normSq_eq_conj_mul_self,31Complex.normSq_eq_norm_sq, hznorm]32norm_num33have hne : z^p ≠ z^q := fun h => hpq (hzprim.pow_inj (by dsimp [m]; omega)34(by dsimp [m]; omega) h)35have h := integral_mul_left_eq_self (μ := haar N) f (rowPhase i z hz)36simp_rw [hf, integral_const_mul] at h37have hzq : (star z)^q * z^q = 1 := by rw [← mul_pow, hz, one_pow]38have he : z^p * (∫ U, f U ∂haar N) = z^q * (∫ U, f U ∂haar N) := by39calc40_ = z^p * (((star z)^q * z^q) * (∫ U, f U ∂haar N)) := by rw [hzq, one_mul]41_ = z^q * ((z^p * (star z)^q) * (∫ U, f U ∂haar N)) := by ring42_ = _ := by rw [h]43exact (mul_eq_mul_right_iff.mp he).resolve_left hne4445/-- All unbalanced complex moments of a Haar entry are exactly zero. -/46theorem integral_entry_pow_mul_star_pow_of_ne (i j : Fin (N+1)) (p q : ℕ)47(hpq : p ≠ q) :48(∫ U : LocalUnitary N, ((U:Mat N) i j)^p * (star ((U:Mat N) i j))^q ∂haar N) = 0 := by49apply integral_eq_zero_of_row_phase _ i p q hpq50intro z hz U51simp only [rowPhase_mul_entry, if_true, mul_pow, star_mul]52ring5354/-- The complete complex moment formula for one Haar entry, at every pair of orders. -/55theorem integral_entry_pow_mul_star_pow (i j : Fin (N+1)) (p q : ℕ) :56(∫ U : LocalUnitary N, ((U:Mat N) i j)^p * (star ((U:Mat N) i j))^q ∂haar N) =57if p=q then (p.factorial:ℂ) / ((N+1).ascFactorial p:ℂ) else 0 := by58by_cases hpq : p=q59· subst q60rw [if_pos rfl]61simp_rw [← norm_even_complex]62rw [integral_complex_ofReal, integral_entry_norm_even]63push_cast64rfl65· rw [if_neg hpq]66exact integral_entry_pow_mul_star_pow_of_ne i j p q hpq6768/-- Number of occurrences of one row in an arbitrary list of entries. -/69def multiplicity {p : ℕ} (i : Fin p → Fin (N+1)) (r : Fin (N+1)) : ℕ :=70(Finset.univ.filter (fun a => i a=r)).card7172lemma prod_row_phase {p : ℕ} (i : Fin p → Fin (N+1)) (r : Fin (N+1)) (z : ℂ) :73(∏ a, if i a=r then z else 1) = z^(multiplicity i r) := by74simp [multiplicity, Finset.prod_ite]7576/-- A completely general entry monomial with arbitrary positive and conjugate factors. -/77def entryMonomial {p q : ℕ} (i j : Fin p → Fin (N+1)) (k l : Fin q → Fin (N+1))78(U : LocalUnitary N) : ℂ :=79(∏ a, (U:Mat N) (i a) (j a)) * (∏ b, star ((U:Mat N) (k b) (l b)))8081lemma entryMonomial_row_phase {p q : ℕ}82(i j : Fin p → Fin (N+1)) (k l : Fin q → Fin (N+1))83(r : Fin (N+1)) (z : ℂ) (hz : star z*z=1) (U : LocalUnitary N) :84entryMonomial i j k l (rowPhase r z hz * U) =85(z^(multiplicity i r) * (star z)^(multiplicity k r)) * entryMonomial i j k l U := by86simp only [entryMonomial, rowPhase_mul_entry, star_mul, apply_ite star, star_one,87Finset.prod_mul_distrib, prod_row_phase]88ring8990/-- An arbitrary mixed Haar moment vanishes unless each row occurs equally often91among the ordinary entries and their conjugates. -/92theorem integral_entryMonomial_eq_zero_of_row_mismatch {p q : ℕ}93(i j : Fin p → Fin (N+1)) (k l : Fin q → Fin (N+1))94(r : Fin (N+1)) (hr : multiplicity i r ≠ multiplicity k r) :95(∫ U, entryMonomial i j k l U ∂haar N) = 0 := by96exact integral_eq_zero_of_row_phase _ r _ _ hr (entryMonomial_row_phase i j k l r)9798end Nonadditivity.HaarMixedMoments99