Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarPathExpansion

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

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

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

23 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarPathWeights78/-! # Exact matrix-word expansion into closed Haar paths910The finite matrix trace is expanded into the literal path products bounded11in `HaarPathWeights`; no probabilistic estimate is assumed in this expansion.12-/13noncomputable section14set_option backward.isDefEq.respectTransparency false15set_option maxHeartbeats 100000016namespace Nonadditivity.HaarPathExpansion17open HaarModel HaarFourthMoments HaarPathWeights MeasureTheory18open scoped BigOperators Matrix Matrix.Norms.L2Operator1920variable {V : Type*} [Fintype V] [DecidableEq V]2122def chainProduct {m : ℕ} (A : Fin m → Matrix V V ℂ) (x : Fin (m+1) → V) : ℂ :=23  ∏ i, A i (x i.castSucc) (x i.succ)2425omit [DecidableEq V] in26lemma sum_functions_succ {m : ℕ} (f : (Fin (m+1) → V) → ℂ) :27    ∑ x, f x = ∑ a, ∑ y : Fin m → V, f (Fin.cons a y) := by28  have h := (Fin.consEquiv (fun _ : Fin (m+1) => V)).sum_comp f29  simpa only [Fintype.sum_prod_type, Fin.consEquiv_apply] using h.symm3031omit [Fintype V] [DecidableEq V] in32lemma chainProduct_cons {m : ℕ} (A : Fin (m+1) → Matrix V V ℂ)33    (a b : V) (x : Fin m → V) :34    chainProduct A (Fin.cons a (Fin.cons b x)) =35      A 0 a b * chainProduct (fun i => A i.succ) (Fin.cons b x) := by36  simp [chainProduct, Fin.prod_univ_succ, Fin.castSucc_succ]3738/-- Exact endpoint expansion of an arbitrary finite ordered matrix product. -/39theorem matrixProduct_entry {m : ℕ} (A : Fin m → Matrix V V ℂ) (a b : V) :40    (List.ofFn A).prod a b =41      ∑ x : Fin m → V, chainProduct A (Fin.cons a x) *42        (if (Fin.cons a x : Fin (m+1) → V) (Fin.last m)=b then 1 else 0) := by43  induction m generalizing a b with44  | zero => simp [chainProduct, Matrix.one_apply]45  | succ m ih =>46    rw [List.ofFn_succ, List.prod_cons, Matrix.mul_apply, sum_functions_succ]47    simp_rw [ih, Finset.mul_sum]48    apply Finset.sum_congr rfl49    intro c _50    apply Finset.sum_congr rfl51    intro x _52    rw [chainProduct_cons]53    simp only [Fin.cons_last]54    ring5556/-- The trace is the sum over precisely the closed vertex assignments. -/57theorem matrixProduct_trace {m : ℕ} (A : Fin m → Matrix V V ℂ) :58    (List.ofFn A).prod.trace =59      ∑ x : Fin (m+1) → V, if x (Fin.last m)=x 0 then chainProduct A x else 0 := by60  rw [Matrix.trace, sum_functions_succ]61  apply Finset.sum_congr rfl62  intro a _63  change (List.ofFn A).prod a a = _64  rw [matrixProduct_entry]65  apply Finset.sum_congr rfl66  intro x _67  simp only [Fin.cons_zero]68  split_ifs <;> simp_all6970/-- Closed assignments include the chosen starting vertex. -/71abbrev ClosedAssignment (V : Type*) (m : ℕ) :=72  {x : Fin (m+1) → V // x (Fin.last m)=x 0}7374/-- A fixed reduced word and a closed vertex assignment form the exact path75object used by the graph estimates. -/76def assignmentPath {m : ℕ} (c : Fin m → HaarPathProfiles.Color 2)77    (hc : ∀ i j : Fin m, i.val+1=j.val → c j ≠ HaarPathGraph.flipColor (c i))78    (x : ClosedAssignment V m) : HaarPathGraph.Path V 2 m where79  vertex := x.val80  colors := c81  closed := x.property82  reduced := hc8384/-- Subtype version, without a zero-valued contribution for open paths. -/85theorem matrixProduct_trace_closed {m : ℕ} (A : Fin m → Matrix V V ℂ) :86    (List.ofFn A).prod.trace = ∑ x : ClosedAssignment V m, chainProduct A x.val := by87  rw [matrixProduct_trace, ← Finset.sum_filter]88  exact Finset.sum_subtype _ (fun x => by simp) _8990def pairGenerator {N : ℕ} (U : LocalUnitary N × LocalUnitary N) (a : Fin 2) :91    LocalUnitary N := if a=0 then U.1 else U.29293def letterMatrix {N : ℕ} (U : LocalUnitary N × LocalUnitary N)94    (c : HaarPathProfiles.Color 2) : Mat N :=95  if c.2 then (pairGenerator U c.1 : Mat N) else (pairGenerator U c.1 : Mat N)ᴴ9697/-- Exact equality between a free-word evaluation and its ordered letter matrices. -/98theorem word_eval_eq_matrixProduct {N : ℕ} (U : LocalUnitary N × LocalUnitary N)99    (L : List (HaarPathProfiles.Color 2)) :100    ((FreeGroup.lift (pairGenerator U) (FreeGroup.mk L) : LocalUnitary N) : Mat N) =101      (L.map (letterMatrix U)).prod := by102  induction L with103  | nil => simp [FreeGroup.lift_mk]104  | cons c L ih =>105    rw [HaarWordPhase.eval_cons, ih]106    rfl107108/-- The actual Haar word trace is a sum of the actual closed path products. -/109theorem word_trace_eq_sum_pathProduct {N m : ℕ}110    (c : Fin m → HaarPathProfiles.Color 2)111    (hc : ∀ i j : Fin m, i.val+1=j.val → c j ≠ HaarPathGraph.flipColor (c i))112    (U : LocalUnitary N × LocalUnitary N) :113    (((FreeGroup.lift (pairGenerator U) (FreeGroup.mk (List.ofFn c)) : LocalUnitary N) : Mat N).trace) =114      ∑ x : ClosedAssignment (Fin (N+1)) m, pathProduct (assignmentPath c hc x) U := by115  rw [word_eval_eq_matrixProduct, List.map_ofFn, matrixProduct_trace_closed]116  simp only [chainProduct, letterMatrix, pathProduct, assignmentPath,117    pairGenerator, Function.comp_apply]118  apply Finset.sum_congr rfl119  intro x _120  apply Finset.prod_congr rfl121  intro i _122  split_ifs <;> rfl123124/-- Every individual path product is a continuous function of the two Haar125matrices, supplying the integrability required for the exact finite expansion. -/126theorem continuous_pathProduct {N m : ℕ}127    (P : HaarPathGraph.Path (Fin (N+1)) 2 m) : Continuous (pathProduct P) := by128  change Continuous (fun U => pathProduct P U)129  simp_rw [pathProduct_eq, signedProduct_eq, listMonomial_eq_entryMonomial]130  exact ((HaarInvariantTensor.continuous_entryMonomial _ _ _ _).comp continuous_fst).mul131    ((HaarInvariantTensor.continuous_entryMonomial _ _ _ _).comp continuous_snd)132133theorem integrable_pathProduct {N m : ℕ}134    (P : HaarPathGraph.Path (Fin (N+1)) 2 m) :135    Integrable (pathProduct P) ((haar N).prod (haar N)) :=136  (continuous_pathProduct P).integrable_of_hasCompactSupport137    (HasCompactSupport.of_compactSpace _)138139/-- Exact expected trace expansion. This is the analytic interface between140matrix moments and the path-class estimates. -/141theorem integral_word_trace_eq_sum_pathProduct {N m : ℕ}142    (c : Fin m → HaarPathProfiles.Color 2)143    (hc : ∀ i j : Fin m, i.val+1=j.val → c j ≠ HaarPathGraph.flipColor (c i)) :144    (∫ U : LocalUnitary N × LocalUnitary N,145      (((FreeGroup.lift (pairGenerator U) (FreeGroup.mk (List.ofFn c)) : LocalUnitary N) : Mat N).trace)146      ∂(haar N).prod (haar N)) =147      ∑ x : ClosedAssignment (Fin (N+1)) m,148        ∫ U : LocalUnitary N × LocalUnitary N,149          pathProduct (assignmentPath c hc x) U ∂(haar N).prod (haar N) := by150  simp_rw [word_trace_eq_sum_pathProduct c hc]151  exact integral_finset_sum _ (fun x _ => integrable_pathProduct (assignmentPath c hc x))152153end Nonadditivity.HaarPathExpansion