Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarMixedMoments

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

Direct imports

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

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,22      f (rowPhase i z hz * U) = (z^p * (star z)^q) * f U) :23    (∫ U, f U ∂haar N) = 0 := by24  let m := p+q+125  have hm : m ≠ 0 := by dsimp [m]; omega26  let z := Complex.exp (2 * Real.pi * Complex.I / m)27  have hzprim : IsPrimitiveRoot z m := Complex.isPrimitiveRoot_exp m hm28  have hznorm : ‖z‖ = 1 := hzprim.norm'_eq_one hm29  have hz : star z*z=1 := by30    rw [Complex.star_def, ← Complex.normSq_eq_conj_mul_self,31      Complex.normSq_eq_norm_sq, hznorm]32    norm_num33  have hne : z^p ≠ z^q := fun h => hpq (hzprim.pow_inj (by dsimp [m]; omega)34    (by dsimp [m]; omega) h)35  have h := integral_mul_left_eq_self (μ := haar N) f (rowPhase i z hz)36  simp_rw [hf, integral_const_mul] at h37  have hzq : (star z)^q * z^q = 1 := by rw [← mul_pow, hz, one_pow]38  have he : z^p * (∫ U, f U ∂haar N) = z^q * (∫ U, f U ∂haar N) := by39    calc40      _ = 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]43  exact (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 := by49  apply integral_eq_zero_of_row_phase _ i p q hpq50  intro z hz U51  simp only [rowPhase_mul_entry, if_true, mul_pow, star_mul]52  ring5354/-- 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) =57      if p=q then (p.factorial:ℂ) / ((N+1).ascFactorial p:ℂ) else 0 := by58  by_cases hpq : p=q59  · subst q60    rw [if_pos rfl]61    simp_rw [← norm_even_complex]62    rw [integral_complex_ofReal, integral_entry_norm_even]63    push_cast64    rfl65  · rw [if_neg hpq]66    exact 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) := by74  simp [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) :84    entryMonomial 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 := by86  simp only [entryMonomial, rowPhase_mul_entry, star_mul, apply_ite star, star_one,87    Finset.prod_mul_distrib, prod_row_phase]88  ring8990/-- 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 := by96  exact integral_eq_zero_of_row_phase _ r _ _ hr (entryMonomial_row_phase i j k l r)9798end Nonadditivity.HaarMixedMoments99