Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarBranchTimeSum

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

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

51 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarBranchContractions7import Nonadditivity.HaarPathRuns8import Mathlib.Algebra.BigOperators.Fin910/-! # Exact time-allocation sums for branch contractions1112All durations are constructed and counted. The last duration is determined13by the total, giving the essential `L^(r-1)` count. Only marked factors incur14additional time powers.15-/16noncomputable section17set_option backward.isDefEq.respectTransparency false18namespace Nonadditivity.HaarNonbacktracking19open scoped BigOperators InnerProduct20open NoncommutativeCS2122/-- Positive durations represented by their predecessors, with exact total. -/23abbrev Durations (L r : ℕ) := {t : Fin r → Fin L // ∑ i, ((t i:ℕ)+1) = L}2425theorem durations_drop_injective (L r : ℕ) :26    Function.Injective (fun t : Durations L (r+1) => fun i : Fin r => t.val i.succ) := by27  intro t u h28  apply Subtype.ext29  have ht := t.property30  have hu := u.property31  rw [Fin.sum_univ_succ] at ht hu32  have htail : (∑ i : Fin r, ((t.val i.succ:ℕ)+1)) =33      ∑ i : Fin r, ((u.val i.succ:ℕ)+1) := by34    apply Finset.sum_congr rfl35    intro i hi36    exact congrArg (fun f : Fin r → Fin L => (f i:ℕ)+1) h37  funext i38  refine Fin.cases ?_ (fun j => congrFun h j) i39  apply Fin.ext40  omega4142theorem card_durations_le (L r : ℕ) (hr : 0 < r) :43    Fintype.card (Durations L r) ≤ L^(r-1) := by44  cases r with45  | zero => omega46  | succ r =>47    simpa using Fintype.card_le_of_injective48      (fun t : Durations L (r+1) => fun i : Fin r => t.val i.succ)49      (durations_drop_injective L r)5051namespace BranchPlan52variable {G J : Type*} {m n : ℕ}5354def blocks {m n : ℕ} : BranchPlan G J m n → ℕ55  | .identity _ => 056  | .openReg _ _ _ _ _ => 157  | .closeReg _ _ _ _ _ => 158  | .middle _ _ _ _ => 159  | .singleton _ _ _ _ _ => 160  | .comp Q P => Q.blocks + P.blocks6162/-- Change only the positive time assigned to each actual branch factor. -/63def retime {m n : ℕ} : (P : BranchPlan G J m n) →64    (Fin P.blocks → ℕ) → BranchPlan G J m n65  | .identity n, _ => .identity n66  | .openReg p g _ w hw, t => .openReg p g (t ⟨0,by simp [blocks]⟩) w hw67  | .closeReg p g _ w hw, t => .closeReg p g (t ⟨0,by simp [blocks]⟩) w hw68  | .middle n g _ w, t => .middle n g (t ⟨0,by simp [blocks]⟩) w69  | .singleton n g _ w hw, t => .singleton n g (t ⟨0,by simp [blocks]⟩) w hw70  | .comp Q P, t =>71      (Q.retime (fun i => t (Fin.castAdd P.blocks i))).comp72        (P.retime (fun i => t (Fin.natAdd Q.blocks i)))7374theorem marked_retime (P : BranchPlan G J m n) (t : Fin P.blocks → ℕ) :75    (P.retime t).marked = P.marked := by76  induction P with77  | identity => rfl78  | openReg => rfl79  | closeReg => rfl80  | middle => rfl81  | singleton => rfl82  | comp Q P hQ hP => simp only [retime, marked, hQ, hP]8384theorem singletons_retime (P : BranchPlan G J m n) (t : Fin P.blocks → ℕ) :85    (P.retime t).singletons = P.singletons := by86  induction P with87  | identity => rfl88  | openReg => rfl89  | closeReg => rfl90  | middle => rfl91  | singleton => rfl92  | comp Q P hQ hP => simp only [retime, singletons, hQ, hP]9394theorem order_retime (P : BranchPlan G J m n) (t : Fin P.blocks → ℕ) :95    (P.retime t).order = ∑ i, (t i+1) := by96  induction P with97  | identity => simp [retime, order, blocks]98  | openReg => simp [retime, order, blocks]99  | closeReg => simp [retime, order, blocks]100  | middle => simp [retime, order, blocks]101  | singleton => simp [retime, order, blocks]102  | comp Q P hQ hP =>103    simp only [retime, order, hQ, hP]104    exact (Fin.sum_univ_add (fun i : Fin (Q.blocks+P.blocks) => t i+1)).symm105106variable {E : Type*} [Group G] [DecidableEq G] [Fintype J] [DecidableEq J]107variable [NormedAddCommGroup E] [InnerProductSpace ℂ E] [CompleteSpace E]108109/-- Literal finite sum of the actual coefficient contractions over all110positive segment durations adding to `L`. -/111def timeSum (A : H G E →L[ℂ] H G E) (P : BranchPlan G J m n)112    (s : Fin n → J) (t : Fin m → J) (L : ℕ) : E →L[ℂ] E :=113  ∑ τ : Durations L P.blocks,114    ((P.retime (fun i => (τ.val i:ℕ))).realize A).pathSum s t115116theorem timeSum_norm_le {A : H G E →L[ℂ] H G E} (hA : IsStationary A)117    (P : BranchPlan G J m n) (hP : 0 < P.blocks)118    (s : Fin n → J) (t : Fin m → J) (L : ℕ) :119    ‖timeSum A P s t L‖ ≤ (L:ℝ)^(P.blocks-1+P.marked) * ‖A‖^L *120      (Real.sqrt (Fintype.card J:ℝ))^P.singletons := by121  have hb (τ : Durations L P.blocks) :122      ‖((P.retime (fun i => (τ.val i:ℕ))).realize A).pathSum s t‖ ≤123        (L:ℝ)^P.marked * ‖A‖^L * (Real.sqrt (Fintype.card J:ℝ))^P.singletons := by124    have ho : (P.retime (fun i => (τ.val i:ℕ))).order = L :=125      (order_retime _ _).trans τ.property126    simpa only [marked_retime, singletons_retime, ho] using127      pathSum_norm_le hA (P.retime (fun i => (τ.val i:ℕ))) s t L ho.le128  have hc : (Fintype.card (Durations L P.blocks):ℝ) ≤ (L:ℝ)^(P.blocks-1) := by129    exact_mod_cast card_durations_le L P.blocks hP130  calc131    _ ≤ ∑ τ : Durations L P.blocks,132        ‖((P.retime (fun i => (τ.val i:ℕ))).realize A).pathSum s t‖ := norm_sum_le _ _133    _ ≤ ∑ _τ : Durations L P.blocks,134        (L:ℝ)^P.marked * ‖A‖^L * (Real.sqrt (Fintype.card J:ℝ))^P.singletons :=135      Finset.sum_le_sum (fun τ _ => hb τ)136    _ = (Fintype.card (Durations L P.blocks):ℝ) *137        ((L:ℝ)^P.marked * ‖A‖^L * (Real.sqrt (Fintype.card J:ℝ))^P.singletons) := by simp138    _ ≤ (L:ℝ)^(P.blocks-1) *139        ((L:ℝ)^P.marked * ‖A‖^L * (Real.sqrt (Fintype.card J:ℝ))^P.singletons) :=140      mul_le_mul_of_nonneg_right hc (by positivity)141    _ = _ := by rw [pow_add]; ring142143/-- The corrected first/last-visit count supplies the required polynomial144exponent, without using the false intermediate bound on the number of runs. -/145theorem timeSum_norm_le_of_markers {A : H G E →L[ℂ] H G E} (hA : IsStationary A)146    (P : BranchPlan G J m n) (hP : 0 < P.blocks)147    (s : Fin n → J) (t : Fin m → J) (L : ℕ) (hL : 1 ≤ L)148    (flags : List Bool) (e : ℕ) (hhead : flags.head?=some true)149    (hmarks : flags.count true ≤ 2*e)150    (hblocks : P.blocks = HaarPathRuns.blockCount flags)151    (hmarked : P.marked = flags.count true) :152    ‖timeSum A P s t L‖ ≤ (L:ℝ)^(6*e-2) * ‖A‖^L *153      (Real.sqrt (Fintype.card J:ℝ))^P.singletons := by154  have he : P.blocks-1+P.marked ≤ 6*e-2 := by155    rw [hblocks,hmarked]156    exact HaarPathRuns.corrected_exponent_le hhead hmarks157  apply (timeSum_norm_le hA P hP s t L).trans158  have hp : (L:ℝ)^(P.blocks-1+P.marked) ≤ (L:ℝ)^(6*e-2) :=159    pow_le_pow_right₀ (by exact_mod_cast hL) he160  exact mul_le_mul_of_nonneg_right161    (mul_le_mul_of_nonneg_right hp (by positivity)) (by positivity)162163/-- A regular-polynomial version with its stationarity premise discharged. -/164theorem regular_timeSum_norm_le {I : Type*} [Fintype I]165    (v : I → G) (a : I → E →L[ℂ] E)166    (P : BranchPlan G J m n) (hP : 0 < P.blocks)167    (s : Fin n → J) (t : Fin m → J) (L : ℕ) :168    ‖timeSum (MatrixRegularRestriction.coefficientPolynomial v a) P s t L‖ ≤169      (L:ℝ)^(P.blocks-1+P.marked) *170        ‖MatrixRegularRestriction.coefficientPolynomial v a‖^L *171          (Real.sqrt (Fintype.card J:ℝ))^P.singletons :=172  timeSum_norm_le (stationary_regularPolynomial v a) P hP s t L173174end BranchPlan175end Nonadditivity.HaarNonbacktracking