Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.FiniteRealization

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

Direct imports

Imported by project modules

4 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

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.Net7import Nonadditivity.QuantumHolevo8import Mathlib.Analysis.InnerProductSpace.PiL29import Mathlib.Analysis.Normed.Module.FiniteDimension1011/-!12# Concrete Hilbert--Schmidt observable space and channel realizations1314Observables are represented by their entries in a genuine Euclidean space,15whose norm is proved equal to the trace-defined Hilbert--Schmidt length.16The channel adjoint's output uses the Euclidean operator norm on matrices.17These distinct norms are never selected through competing matrix instances.18-/1920noncomputable section2122namespace Nonadditivity.FiniteRealization2324open Nonadditivity.Entropy Nonadditivity.Channels Nonadditivity.AdjointPurity25open scoped Matrix MatrixOrder ComplexOrder Matrix.Norms.L2Operator BigOperators2627set_option backward.isDefEq.respectTransparency false2829variable {ι D η : Type*} [Fintype ι] [DecidableEq ι]30  [Fintype D] [DecidableEq D] [Fintype η]3132/-- Matrices stored as Euclidean vectors of entries, with the HS norm. -/33abbrev EntrySpace (ι : Type*) := EuclideanSpace ℂ (ι × ι)3435def entriesToMatrix (x : EntrySpace ι) : Matrix ι ι ℂ := fun i j => x (i, j)3637def matrixToEntries (A : Matrix ι ι ℂ) : EntrySpace ι :=38  WithLp.toLp 2 (fun ij => A ij.1 ij.2)3940omit [Fintype ι] [DecidableEq ι] in41@[simp] theorem entriesToMatrix_matrixToEntries (A : Matrix ι ι ℂ) :42    entriesToMatrix (matrixToEntries A) = A := rfl4344omit [Fintype ι] [DecidableEq ι] in45@[simp] theorem matrixToEntries_entriesToMatrix (x : EntrySpace ι) :46    matrixToEntries (entriesToMatrix x) = x := rfl4748omit [DecidableEq ι] in49/-- The Euclidean norm of the entry vector is exactly the trace HS length. -/50theorem norm_matrixToEntries_eq_hsLength (A : Matrix ι ι ℂ) :51    ‖matrixToEntries A‖ = hsLength A := by52  have htrace : (A.conjTranspose * A).trace.re = ∑ ij : ι × ι, ‖A ij.1 ij.2‖ ^ 2 := by53    simp only [Matrix.trace, Matrix.diag, Matrix.mul_apply, Matrix.conjTranspose_apply,54      Complex.re_sum, Complex.star_def, ← Complex.normSq_eq_conj_mul_self,55      Complex.ofReal_re, Complex.normSq_eq_norm_sq]56    rw [Fintype.sum_prod_type, Finset.sum_comm]57  have hnorm := EuclideanSpace.norm_sq_eq (matrixToEntries A)58  have hsq := hsLength_sq A59  rw [htrace] at hsq60  change ‖matrixToEntries A‖ ^ 2 = ∑ ij : ι × ι, ‖A ij.1 ij.2‖ ^ 2 at hnorm61  nlinarith [norm_nonneg (matrixToEntries A), hsLength_nonneg A]6263/-- Real-linear conversion is required because Hermitian matrices form a64real vector space. -/65def entriesToMatrixLinear : EntrySpace ι →ₗ[ℝ] Matrix ι ι ℂ where66  toFun := entriesToMatrix67  map_add' _ _ := rfl68  map_smul' _ _ := rfl6970/-- The concrete real subspace of traceless Hermitian HS observables. -/71def observableSubmodule (ι : Type*) [Fintype ι] [DecidableEq ι] :72    Submodule ℝ (EntrySpace ι) where73  carrier := {x | (entriesToMatrix x).IsHermitian ∧ (entriesToMatrix x).trace = 0}74  zero_mem' := by75    change (entriesToMatrix (0 : EntrySpace ι)).IsHermitian ∧76      (entriesToMatrix (0 : EntrySpace ι)).trace = 077    change (0 : Matrix ι ι ℂ).IsHermitian ∧ (0 : Matrix ι ι ℂ).trace = 078    simp79  add_mem' := by80    intro x y hx hy81    constructor82    · change (entriesToMatrix x + entriesToMatrix y).IsHermitian83      exact hx.1.add hy.184    · change (entriesToMatrix x + entriesToMatrix y).trace = 085      simp [Matrix.trace_add, hx.2, hy.2]86  smul_mem' := by87    intro r x hx88    have hsmul : entriesToMatrix (r • x) = (r : ℂ) • entriesToMatrix x := rfl89    change (entriesToMatrix (r • x)).IsHermitian ∧ (entriesToMatrix (r • x)).trace = 090    rw [hsmul]91    constructor92    · unfold Matrix.IsHermitian93      rw [Matrix.conjTranspose_smul, hx.1.eq]94      simp95    · simp [Matrix.trace_smul, hx.2]9697abbrev ObservableSpace (ι : Type*) [Fintype ι] [DecidableEq ι] := observableSubmodule ι9899def observableMatrix (x : ObservableSpace ι) : Matrix ι ι ℂ := entriesToMatrix x.val100101theorem observableMatrix_isHermitian (x : ObservableSpace ι) :102    (observableMatrix x).IsHermitian := x.property.1103104theorem observableMatrix_trace_zero (x : ObservableSpace ι) :105    (observableMatrix x).trace = 0 := x.property.2106107theorem observable_norm_eq_hsLength (x : ObservableSpace ι) :108    ‖x‖ = hsLength (observableMatrix x) := by109  change ‖x.val‖ = hsLength (entriesToMatrix x.val)110  simpa using norm_matrixToEntries_eq_hsLength (entriesToMatrix x.val)111112/-- The channel adjoint restricted to actual HS observables, with operator113norm in its codomain. Continuity follows from the concrete finite dimension. -/114def adjointOnObservables (T : KrausChannel D ι η) :115    ObservableSpace ι →L[ℝ] Matrix D D ℂ :=116  ((T.adjointLinearMap.restrictScalars ℝ).comp117    (entriesToMatrixLinear.comp (observableSubmodule ι).subtype)).toContinuousLinearMap118119@[simp] theorem adjointOnObservables_apply (T : KrausChannel D ι η)120    (x : ObservableSpace ι) :121    adjointOnObservables T x = T.adjointMap (observableMatrix x) := rfl122123/-- Turn a matrix satisfying the manuscript's test conditions into an actual124element of the finite-dimensional real observable space. -/125def matrixObservable (A : Matrix ι ι ℂ) (hA : A.IsHermitian) (htrace : A.trace = 0) :126    ObservableSpace ι :=127  ⟨matrixToEntries A, by128    change (entriesToMatrix (matrixToEntries A)).IsHermitian ∧129      (entriesToMatrix (matrixToEntries A)).trace = 0130    simpa only [entriesToMatrix_matrixToEntries] using And.intro hA htrace⟩131132@[simp] theorem observableMatrix_matrixObservable (A : Matrix ι ι ℂ)133    (hA : A.IsHermitian) (htrace : A.trace = 0) :134    observableMatrix (matrixObservable A hA htrace) = A := rfl135136/-- A norm certificate for the actual restricted continuous map implies137the precise matrix certificate used by the channel entropy theorem. -/138theorem matrix_certificate_of_observable_bound (T : KrausChannel D ι η) (C : ℝ)139    (hbound : ∀ x : ObservableSpace ι, ‖adjointOnObservables T x‖ ≤ C * ‖x‖) :140    ∀ A : Matrix ι ι ℂ, A.IsHermitian → A.trace = 0 →141      ‖T.adjointMap A‖ ≤ C * hsLength A := by142  intro A hA htrace143  have h := hbound (matrixObservable A hA htrace)144  simpa only [adjointOnObservables_apply, observable_norm_eq_hsLength,145    observableMatrix_matrixObservable] using h146147/-- The generic finite-net theorem instantiated with concrete Kraus channels,148concrete HS observables, and the actual matrix operator norm. -/149theorem eventually_exists_kraus_certificate150    {ν : Type*} {Ω : ν → Type*} [∀ i, MeasurableSpace (Ω i)]151    {D : ν → Type*} [∀ i, Fintype (D i)] [∀ i, DecidableEq (D i)]152    {η : ν → Type*} [∀ i, Fintype (η i)]153    (μ : (i : ν) → MeasureTheory.Measure (Ω i))154    [∀ i, MeasureTheory.IsProbabilityMeasure (μ i)]155    (T : (i : ν) → Ω i → KrausChannel (D i) ι (η i)) (l : Filter ν)156    (limitNorm : Matrix ι ι ℂ → ℝ) {κ c : ℝ} (hκ : 1 < κ) (hc : 0 < c)157    (hlimit : ∀ A, A.IsHermitian → A.trace = 0 → hsLength A = 1 → limitNorm A ≤ c)158    (hconvergence : ∀ A, A.IsHermitian → A.trace = 0 → hsLength A = 1 →159      ∀ ε : ℝ, 0 < ε → Filter.Tendsto160      (fun i => μ i {ω | ε ≤ |‖(T i ω).adjointMap A‖ - limitNorm A|}) l (nhds 0)) :161    Filter.Eventually (fun i => ∃ ω, ∀ A : Matrix ι ι ℂ, A.IsHermitian → A.trace = 0 →162      ‖(T i ω).adjointMap A‖ ≤ κ * c * hsLength A) l := by163  have hcertificate := eventually_exists_kappa_norm_certificate μ164    (fun i ω => adjointOnObservables (T i ω)) l165    (fun x => limitNorm (observableMatrix x)) hκ hc166    (fun x hx => hlimit (observableMatrix x) (observableMatrix_isHermitian x)167      (observableMatrix_trace_zero x) (by rwa [← observable_norm_eq_hsLength]))168    (fun x hx ε hε => by169      simpa only [adjointOnObservables_apply] using hconvergence (observableMatrix x)170        (observableMatrix_isHermitian x) (observableMatrix_trace_zero x)171        (by rwa [← observable_norm_eq_hsLength]) ε hε)172  exact hcertificate.mono fun i ⟨ω, hω⟩ =>173    ⟨ω, matrix_certificate_of_observable_bound (T i ω) (κ * c) hω⟩174175/-- The actual operator norm of the adjoint from traceless Hermitian HS176observables controls the actual channel Holevo information. -/177theorem holevo_le_of_restricted_adjoint_opNorm [Nonempty D] [Nonempty ι]178    (T : KrausChannel D ι η) {t : ℝ} (ht : 0 ≤ t)179    (hbound : ‖adjointOnObservables T‖ ≤ t) :180    T.holevo ≤ Real.log (1 + (Fintype.card ι : ℝ) * t ^ 2) := by181  apply T.holevo_le_of_adjoint_certificate ht182  apply matrix_certificate_of_observable_bound T t183  intro x184  exact ((adjointOnObservables T).le_opNorm x).trans185    (mul_le_mul_of_nonneg_right hbound (norm_nonneg x))186187/-- Complete finite realization step: the external free bound and strong188convergence produce concrete Kraus channels satisfying uniform output189purity/entropy estimates and the actual single-use Holevo upper bound. -/190theorem eventually_exists_kraus_entropy_and_holevo [Nonempty ι]191    {ν : Type*} {Ω : ν → Type*} [∀ i, MeasurableSpace (Ω i)]192    {D : ν → Type*} [∀ i, Fintype (D i)] [∀ i, DecidableEq (D i)] [∀ i, Nonempty (D i)]193    {η : ν → Type*} [∀ i, Fintype (η i)]194    (μ : (i : ν) → MeasureTheory.Measure (Ω i))195    [∀ i, MeasureTheory.IsProbabilityMeasure (μ i)]196    (T : (i : ν) → Ω i → KrausChannel (D i) ι (η i)) (l : Filter ν)197    (limitNorm : Matrix ι ι ℂ → ℝ) {κ c : ℝ} (hκ : 1 < κ) (hc : 0 < c)198    (hlimit : ∀ A, A.IsHermitian → A.trace = 0 → hsLength A = 1 → limitNorm A ≤ c)199    (hconvergence : ∀ A, A.IsHermitian → A.trace = 0 → hsLength A = 1 →200      ∀ ε : ℝ, 0 < ε → Filter.Tendsto201      (fun i => μ i {ω | ε ≤ |‖(T i ω).adjointMap A‖ - limitNorm A|}) l (nhds 0)) :202    Filter.Eventually (fun i => ∃ ω,203      (∀ ρ : DensityMatrix (D i),204        ((T i ω).output ρ).purity ≤ 1 / (Fintype.card ι : ℝ) + (κ * c) ^ 2 ∧205        Real.log (Fintype.card ι) - Real.log (1 + (Fintype.card ι : ℝ) * (κ * c) ^ 2) ≤206          ((T i ω).output ρ).vonNeumann) ∧207      (T i ω).holevo ≤ Real.log (1 + (Fintype.card ι : ℝ) * (κ * c) ^ 2)) l := by208  have hcertificate := eventually_exists_kraus_certificate μ T l limitNorm hκ hc209    hlimit hconvergence210  have ht : 0 ≤ κ * c := mul_nonneg (by linarith) (le_of_lt hc)211  exact hcertificate.mono fun i ⟨ω, hω⟩ => ⟨ω,212    (fun ρ => (T i ω).output_purity_and_entropy_of_certificate ht hω ρ),213    (T i ω).holevo_le_of_adjoint_certificate ht hω⟩214215end Nonadditivity.FiniteRealization