Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.QuantumCodingUnion

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

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

35 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.NoncommutativeCS7import Mathlib.Algebra.Order.BigOperators.Ring.Finset89/-! # A projective quantum union bound1011Sequential orthogonal projections lose at most four times the sum of their12individual failure probabilities on the original vector. The proof uses13telescoping, Pythagoras, and finite Cauchy--Schwarz. This is the vector form14of Gao's quantum union bound (arXiv:1410.5688); see also O'Donnell and15Venkateswaran, arXiv:2103.07827. No decoding-error estimate is postulated.16-/17noncomputable section18namespace Nonadditivity.QuantumCoding19open scoped BigOperators InnerProductSpace2021variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℂ E]2223/-- An actual bounded orthogonal projection, specified by its algebraic laws. -/24structure Projection (E : Type*) [NormedAddCommGroup E] [InnerProductSpace ℂ E] where25  map : E →L[ℂ] E26  symmetric : ∀ x y, ⟪map x, y⟫_ℂ = ⟪x, map y⟫_ℂ27  idempotent : ∀ x, map (map x) = map x2829namespace Projection3031theorem inner_map_self (P : Projection E) (x : E) :32    ⟪x, P.map x⟫_ℂ = ⟪P.map x, P.map x⟫_ℂ := by33  rw [P.symmetric, P.idempotent]3435theorem pythagoras (P : Projection E) (x : E) :36    ‖x‖^2 = ‖P.map x‖^2 + ‖x-P.map x‖^2 := by37  rw [norm_sub_sq (𝕜 := ℂ), P.inner_map_self, inner_self_eq_norm_sq (𝕜 := ℂ)]38  ring3940theorem inner_reject (P : Projection E) (x y : E) :41    ⟪x, y-P.map y⟫_ℂ = ⟪x-P.map x, y-P.map y⟫_ℂ := by42  rw [inner_sub_left, P.symmetric]43  simp only [map_sub, P.idempotent, sub_self, inner_zero_right, sub_zero]4445/-- The unnormalized state vector after the first `n` selected outcomes. -/46def trajectory (P : ℕ → Projection E) (x : E) : ℕ → E47  | 0 => x48  | n+1 => (P n).map (trajectory P x n)4950theorem energy_identity (P : ℕ → Projection E) (x : E) (n : ℕ) :51    ‖x‖^2-‖trajectory P x n‖^2 =52      ∑ i ∈ Finset.range n, ‖trajectory P x i-trajectory P x (i+1)‖^2 := by53  induction n with54  | zero => simp [trajectory]55  | succ n ih =>56    rw [Finset.sum_range_succ, ←ih]57    have hp := (P n).pythagoras (trajectory P x n)58    simp only [trajectory] at hp ⊢59    linarith6061theorem displacement_identity (P : ℕ → Projection E) (x : E) (n : ℕ) :62    x-trajectory P x n =63      ∑ i ∈ Finset.range n, (trajectory P x i-trajectory P x (i+1)) := by64  induction n with65  | zero => simp [trajectory]66  | succ n ih => rw [Finset.sum_range_succ, ←ih]; abel6768theorem overlap_identity (P : ℕ → Projection E) (x : E) (n : ℕ) :69    ⟪x, x-trajectory P x n⟫_ℂ =70      ∑ i ∈ Finset.range n,71        ⟪x-(P i).map x, trajectory P x i-trajectory P x (i+1)⟫_ℂ := by72  rw [displacement_identity, inner_sum]73  apply Finset.sum_congr rfl74  intro i hi75  exact (P i).inner_reject x (trajectory P x i)7677/-- Gao's bound, without a dimension factor or a normalization assumption. -/78theorem union_bound (P : ℕ → Projection E) (x : E) (n : ℕ) :79    ‖x‖^2-‖trajectory P x n‖^2 ≤80      4*∑ i ∈ Finset.range n, ‖x-(P i).map x‖^2 := by81  let a : ℕ → ℝ := fun i => ‖x-(P i).map x‖82  let b : ℕ → ℝ := fun i => ‖trajectory P x i-trajectory P x (i+1)‖83  let D := ‖x‖^2-‖trajectory P x n‖^284  let B := ∑ i ∈ Finset.range n, a i^285  let s := ∑ i ∈ Finset.range n, a i*b i86  have hD : D = ∑ i ∈ Finset.range n, b i^2 := energy_identity P x n87  have hD0 : 0≤D := by rw [hD]; positivity88  have hB0 : 0≤B := by dsimp [B]; positivity89  have hs0 : 0≤s := by dsimp [s,a,b]; positivity90  have hc : s^2≤B*D := by91    rw [hD]92    exact Finset.sum_mul_sq_le_sq_mul_sq (Finset.range n) a b93  have ho : (⟪x, x-trajectory P x n⟫_ℂ).re ≤ s := by94    rw [overlap_identity, Complex.re_sum]95    apply Finset.sum_le_sum96    intro i hi97    exact re_inner_le_norm (𝕜 := ℂ) _ _98  have he : D ≤ 2*s := by99    have hn := norm_sub_sq x (trajectory P x n) (𝕜 := ℂ)100    have hn0 := sq_nonneg ‖x-trajectory P x n‖101    have hid : (⟪x, x-trajectory P x n⟫_ℂ).re =102        ‖x‖^2-(⟪x, trajectory P x n⟫_ℂ).re := by103      rw [inner_sub_right, Complex.sub_re]104      congr 1105      exact inner_self_eq_norm_sq (𝕜 := ℂ) x106    simp only [RCLike.re_eq_complex_re] at hn107    rw [hid] at ho108    dsimp [D]109    linarith110  have hsq : D^2≤4*B*D := by111    have hh := mul_self_le_mul_self hD0 he112    nlinarith113  change D ≤ 4*B114  by_contra h115  have hpos : 0 < D*(D-4*B) := mul_pos (by linarith) (by linarith)116  nlinarith117118end Projection119end Nonadditivity.QuantumCoding