Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.NoncommutativeCSPaths

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

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

45 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.NoncommutativeCSMemory78/-! # Literal path-sum identity for open-register contractions910The kernels below are explicit finite sums of coefficient products with equality11constraints on retained indices. Their norm estimate is derived from the actual12operators, rather than assumed as an identity or a matrix norm hypothesis.13-/1415noncomputable section1617namespace Nonadditivity.NoncommutativeCS1819open scoped BigOperators InnerProduct2021variable {𝕜 E J : Type*} [RCLike 𝕜]22variable [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [CompleteSpace E]23variable [Fintype J] [DecidableEq J]2425def insertState {n : ℕ} (s : Fin n → J) : E →L[𝕜] Memory J E n :=26  LinearMap.mkContinuous27    { toFun := fun x => WithLp.toLp 2 (Pi.single s x)28      map_add' := by intros; ext t; simp [Pi.single_apply]; split_ifs <;> simp29      map_smul' := by intros; ext t; simp [Pi.single_apply] }30    1 (fun x => by simp [PiLp.norm_toLp_single])3132def extractState {n : ℕ} (s : Fin n → J) : Memory J E n →L[𝕜] E :=33  LinearMap.mkContinuous34    { toFun := fun x => x s35      map_add' := by intros; rfl36      map_smul' := by intros; rfl }37    1 (fun x => by simpa only [one_mul] using PiLp.norm_apply_le x s)3839omit [CompleteSpace E] in40@[simp] theorem insertState_apply {n : ℕ} (s : Fin n → J) (x : E) (t : Fin n → J) :41    insertState (𝕜 := 𝕜) s x t = if t = s then x else 0 := by42  simp [insertState, Pi.single_apply]4344omit [CompleteSpace E] [DecidableEq J] in45@[simp] theorem extractState_apply {n : ℕ} (s : Fin n → J) (x : Memory J E n) :46    extractState (𝕜 := 𝕜) s x = x s := rfl4748omit [CompleteSpace E] in49theorem insertState_norm_le {n : ℕ} (s : Fin n → J) :50    ‖insertState (𝕜 := 𝕜) (E := E) s‖ ≤ 1 := by51  apply ContinuousLinearMap.opNorm_le_bound _ (by norm_num)52  intro x53  simp [insertState, PiLp.norm_toLp_single]5455omit [CompleteSpace E] [DecidableEq J] in56theorem extractState_norm_le {n : ℕ} (s : Fin n → J) :57    ‖extractState (𝕜 := 𝕜) (E := E) s‖ ≤ 1 := by58  apply ContinuousLinearMap.opNorm_le_bound _ (by norm_num)59  intro x60  simpa using PiLp.norm_apply_le x s6162omit [CompleteSpace E] in63/-- The retained registers form an actual orthogonal resolution of identity. -/64theorem state_resolution (n : ℕ) :65    (∑ s : Fin n → J, insertState (𝕜 := 𝕜) (E := E) s ∘L extractState s) =66      ContinuousLinearMap.id 𝕜 (Memory J E n) := by67  ext x t68  simp6970namespace Contraction7172/-- Literal coefficient matrix of a contraction between prescribed memory states. -/73def kernel {m n : ℕ} (P : Contraction 𝕜 E J m n) (s : Fin n → J) (t : Fin m → J) :74    E →L[𝕜] E := extractState s ∘L P.operator ∘L insertState t7576/-- Every individual coefficient has the same product bound as the contraction. -/77theorem kernel_norm_le {m n : ℕ} (P : Contraction 𝕜 E J m n)78    (s : Fin n → J) (t : Fin m → J) : ‖P.kernel s t‖ ≤ P.cost := by79  calc80    _ ≤ ‖extractState (𝕜 := 𝕜) (E := E) s‖ *81        (‖P.operator‖ * ‖insertState (𝕜 := 𝕜) (E := E) t‖) := by82      exact (ContinuousLinearMap.opNorm_comp_le _ _).trans83        (mul_le_mul_of_nonneg_left (ContinuousLinearMap.opNorm_comp_le _ _) (norm_nonneg _))84    _ ≤ 1 * (P.cost * 1) :=85      mul_le_mul (extractState_norm_le s)86        (mul_le_mul P.norm_operator_le (insertState_norm_le t) (norm_nonneg _) P.cost_nonneg)87        (by positivity) (by norm_num)88    _ = _ := by ring8990@[simp] theorem kernel_identity (n : ℕ) (s t : Fin n → J) :91    (Contraction.identity (𝕜 := 𝕜) (E := E) (J := J) n).kernel s t =92      if s = t then ContinuousLinearMap.id 𝕜 E else 0 := by93  ext x94  by_cases h : s = t <;> simp [kernel, operator, h]9596@[simp] theorem kernel_open {n : ℕ} (p : Fin (n + 1)) (A : J → E →L[𝕜] E)97    (s : Fin (n + 1) → J) (t : Fin n → J) :98    (Contraction.openReg p A).kernel s t = if p.removeNth s = t then A (s p) else 0 := by99  ext x100  by_cases h : p.removeNth s = t <;> simp [kernel, operator, h]101102@[simp] theorem kernel_close {n : ℕ} (p : Fin (n + 1)) (A : J → E →L[𝕜] E)103    (s : Fin n → J) (t : Fin (n + 1) → J) :104    (Contraction.closeReg p A).kernel s t = if p.removeNth t = s then A (t p) else 0 := by105  ext x106  simp only [kernel, operator, ContinuousLinearMap.comp_apply, extractState_apply,107    closeRegister_apply, insertState_apply, apply_ite, map_zero]108  have hmatch (j : J) : p.insertNth j s = t ↔ j = t p ∧ s = p.removeNth t := by109    rw [Fin.insertNth_eq_iff]110  simp only [hmatch]111  by_cases hs : p.removeNth t = s112  · subst s113    simp114  · simp [hs, Ne.symm hs]115116@[simp] theorem kernel_diagonal (n : ℕ) (A : (Fin n → J) → E →L[𝕜] E)117    (s t : Fin n → J) :118    (Contraction.diagonalReg n A).kernel s t = if s = t then A s else 0 := by119  ext x120  by_cases h : s = t <;> simp [kernel, operator, h]121122/-- Composition is exactly the sum over all intermediate register assignments. -/123theorem kernel_comp {l m n : ℕ} (Q : Contraction 𝕜 E J m n) (P : Contraction 𝕜 E J l m)124    (s : Fin n → J) (t : Fin l → J) :125    (Q.comp P).kernel s t = ∑ u : Fin m → J, Q.kernel s u ∘L P.kernel u t := by126  have h := state_resolution (𝕜 := 𝕜) (E := E) (J := J) m127  ext x128  have h' := congrArg (fun R : Memory J E m →L[𝕜] Memory J E m =>129    extractState (𝕜 := 𝕜) s (Q.operator (R (P.operator (insertState (𝕜 := 𝕜) t x))))) h130  simpa [kernel, operator, map_sum] using h'.symm131132/-- A fully expanded path-sum definition with explicit open/close constraints. -/133def pathSum {m n : ℕ} :134    Contraction 𝕜 E J m n → (Fin n → J) → (Fin m → J) → E →L[𝕜] E135  | .identity _, s, t => if s = t then ContinuousLinearMap.id 𝕜 E else 0136  | .openReg p A, s, t => if p.removeNth s = t then A (s p) else 0137  | .closeReg p A, s, t => if p.removeNth t = s then A (t p) else 0138  | .diagonalReg _ A, s, t => if s = t then A s else 0139  | .comp Q P, s, t => ∑ u, pathSum Q s u ∘L pathSum P u t140141/-- The path-to-contraction identity is proved, not supplied as a premise. -/142theorem pathSum_eq_kernel {m n : ℕ} (P : Contraction 𝕜 E J m n)143    (s : Fin n → J) (t : Fin m → J) : P.pathSum s t = P.kernel s t := by144  induction P with145  | identity => exact (kernel_identity _ _ _).symm146  | openReg => exact (kernel_open _ _ _ _).symm147  | closeReg => exact (kernel_close _ _ _ _).symm148  | diagonalReg => exact (kernel_diagonal _ _ _ _).symm149  | comp Q P hQ hP => simp only [pathSum, hQ, hP, kernel_comp]150151/-- An unconditional bound on the literal constrained coefficient path sum. -/152theorem pathSum_norm_le {m n : ℕ} (P : Contraction 𝕜 E J m n)153    (s : Fin n → J) (t : Fin m → J) : ‖P.pathSum s t‖ ≤ P.cost := by154  rw [pathSum_eq_kernel]155  exact P.kernel_norm_le s t156157end Contraction158159end Nonadditivity.NoncommutativeCS