Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.OperationalNaimark

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

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

46 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.OperationalConverse7import Nonadditivity.EntropyProducts89/-! # Concrete Naimark dilation of finite POVMs1011The dilation matrix consists of the positive square roots of the actual12effects. Its Gram matrix is the identity, and its induced state map preserves13von Neumann entropy. Each diagonal label block has exactly the original Born14probability, without assuming a measurement representation theorem.15-/1617noncomputable section1819namespace Nonadditivity.Operational.POVM2021open Entropy Channels22open scoped BigOperators Matrix ComplexOrder MatrixOrder Matrix.Norms.L2Operator2324set_option backward.isDefEq.respectTransparency false2526variable {ο μ : Type*} [Fintype ο] [DecidableEq ο] [Fintype μ] [DecidableEq μ]2728def sqrtEffect (P : POVM ο μ) (m : μ) : Matrix ο ο ℂ := CFC.sqrt (P.effect m)2930omit [DecidableEq μ] in31theorem sqrtEffect_hermitian (P : POVM ο μ) (m : μ) :32    (P.sqrtEffect m).IsHermitian :=33  (Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg (P.effect m))).isHermitian3435omit [DecidableEq μ] in36@[simp] theorem sqrtEffect_square (P : POVM ο μ) (m : μ) :37    P.sqrtEffect m * P.sqrtEffect m = P.effect m :=38  CFC.sqrt_mul_sqrt_self _ (P.positive m).nonneg3940omit [DecidableEq μ] in41@[simp] theorem sqrtEffect_gram (P : POVM ο μ) (m : μ) :42    (P.sqrtEffect m).conjTranspose * P.sqrtEffect m = P.effect m := by43  rw [(P.sqrtEffect_hermitian m).eq, P.sqrtEffect_square]4445/-- The rectangular isometry `v ↦ (sqrt(E_m) v)_m`. -/46def dilationMatrix (P : POVM ο μ) : Matrix (μ × ο) ο ℂ :=47  fun p i => P.sqrtEffect p.1 p.2 i4849omit [DecidableEq μ] in50@[simp] theorem dilationMatrix_gram (P : POVM ο μ) :51    P.dilationMatrix.conjTranspose * P.dilationMatrix = 1 := by52  have he : P.dilationMatrix.conjTranspose * P.dilationMatrix =53      ∑ m, (P.sqrtEffect m).conjTranspose * P.sqrtEffect m := by54    ext i j55    simp only [Matrix.sum_apply, Matrix.mul_apply, Matrix.conjTranspose_apply, dilationMatrix,56      Fintype.sum_prod_type]57  rw [he]58  simp only [sqrtEffect_gram, P.complete]5960/-- A single rectangular Kraus operator realizes the isometric embedding. -/61def dilationChannel (P : POVM ο μ) : KrausChannel ο (μ × ο) Unit where62  kraus := fun _ => P.dilationMatrix63  complete := by simp6465/-- Actual density matrix after adjoining the coherent measurement label. -/66def dilate (P : POVM ο μ) (ρ : DensityMatrix ο) : DensityMatrix (μ × ο) :=67  P.dilationChannel.output ρ6869@[simp] theorem dilate_matrix (P : POVM ο μ) (ρ : DensityMatrix ο) :70    (P.dilate ρ).matrix = P.dilationMatrix * ρ.matrix * P.dilationMatrix.conjTranspose := by71  simp [dilate, KrausChannel.output_matrix, dilationChannel, KrausChannel.map]7273/-- Entropy is preserved by the literal rectangular dilation. -/74@[simp] theorem dilate_entropy (P : POVM ο μ) (ρ : DensityMatrix ο) :75    (P.dilate ρ).vonNeumann = ρ.vonNeumann := by76  apply DensityMatrix.entropy_eq_of_padded_charpoly _ _ (Fintype.card ο)77    (Fintype.card (μ × ο))78  have h := Matrix.charpoly_mul_comm' (P.dilationMatrix * ρ.matrix)79    P.dilationMatrix.conjTranspose80  simpa only [← Matrix.mul_assoc, dilationMatrix_gram, Matrix.one_mul,81    ← dilate_matrix] using h8283/-- The diagonal block associated with outcome `m`. -/84def labelBlock (P : POVM ο μ) (ρ : DensityMatrix ο) (m : μ) : Matrix ο ο ℂ :=85  (P.dilate ρ).matrix.submatrix (fun i => (m, i)) (fun i => (m, i))8687theorem labelBlock_eq (P : POVM ο μ) (ρ : DensityMatrix ο) (m : μ) :88    P.labelBlock ρ m = P.sqrtEffect m * ρ.matrix * (P.sqrtEffect m).conjTranspose := by89  ext i j90  simp only [labelBlock, Matrix.submatrix_apply, dilate_matrix, Matrix.mul_apply,91    Matrix.conjTranspose_apply, dilationMatrix]9293theorem labelBlock_positive (P : POVM ο μ) (ρ : DensityMatrix ο) (m : μ) :94    (P.labelBlock ρ m).PosSemidef := by95  rw [labelBlock_eq]96  exact ρ.positive.mul_mul_conjTranspose_same _9798/-- Measuring the new label reproduces exactly the original POVM statistics. -/99@[simp] theorem labelBlock_trace (P : POVM ο μ) (ρ : DensityMatrix ο) (m : μ) :100    (P.labelBlock ρ m).trace.re = P.probability ρ m := by101  rw [labelBlock_eq, Matrix.trace_mul_cycle, sqrtEffect_gram, Matrix.trace_mul_comm]102  rfl103104/-- Dilation commutes with every actual finite ensemble average. -/105theorem dilate_mixture {ν : Type*} [Fintype ν] (P : POVM ο μ)106    (p : ν → ℝ) (hp : ∀ i, 0 ≤ p i) (hsum : ∑ i, p i = 1)107    (ρ : ν → DensityMatrix ο) :108    P.dilate (DensityMatrix.mixture p hp hsum ρ) =109      DensityMatrix.mixture p hp hsum (fun i => P.dilate (ρ i)) := by110  apply Entropy.DensityMatrix.ext111  simp only [dilate_matrix, DensityMatrix.mixture_matrix, Matrix.mul_sum,112    Matrix.sum_mul, Matrix.mul_smul, Matrix.smul_mul]113114/-- Orthogonal projection onto a specified measurement label. -/115def labelProjection (m : μ) : Matrix (μ × ο) (μ × ο) ℂ :=116  Matrix.diagonal (fun p => if p.1 = m then 1 else 0)117118omit [Fintype ο] [Fintype μ] in119theorem labelProjection_positive (m : μ) : (labelProjection (ο := ο) m).PosSemidef := by120  apply Matrix.PosSemidef.diagonal121  intro p122  change (0 : ℂ) ≤ if p.1 = m then 1 else 0123  split_ifs <;> norm_num124125omit [Fintype ο] [Fintype μ] in126theorem labelProjection_hermitian (m : μ) :127    (labelProjection (ο := ο) m).IsHermitian := (labelProjection_positive m).isHermitian128129@[simp] theorem labelProjection_idempotent (m : μ) :130    labelProjection (ο := ο) m * labelProjection m = labelProjection m := by131  unfold labelProjection132  rw [Matrix.diagonal_mul_diagonal]133  congr 1134  funext p135  split_ifs <;> norm_num136137/-- Projecting on a label simply zeros every other row and column. -/138theorem labelProjection_compress_apply (A : Matrix (μ × ο) (μ × ο) ℂ)139    (m : μ) (p q : μ × ο) :140    (labelProjection (ο := ο) m * A * labelProjection (ο := ο) m :141      Matrix (μ × ο) (μ × ο) ℂ) p q =142      if p.1 = m ∧ q.1 = m then A p q else 0 := by143  simp only [labelProjection, Matrix.diagonal_mul, Matrix.mul_diagonal]144  by_cases hp : p.1 = m <;> by_cases hq : q.1 = m <;> simp [hp, hq]145146/-- The probability of the label projection is exactly the original Born147probability of the POVM effect. -/148theorem labelProjection_probability (P : POVM ο μ) (ρ : DensityMatrix ο) (m : μ) :149    ((P.dilate ρ).matrix * labelProjection m).trace.re = P.probability ρ m := by150  rw [← labelBlock_trace P ρ m]151  congr 1152  unfold Matrix.trace153  simp only [Matrix.diag_apply, labelProjection, Matrix.mul_diagonal,154    Fintype.sum_prod_type, labelBlock, Matrix.submatrix_apply]155  simp156157theorem labelProjection_compress_trace (P : POVM ο μ) (ρ : DensityMatrix ο) (m : μ) :158    (labelProjection m * (P.dilate ρ).matrix * labelProjection m).trace.re =159      P.probability ρ m := by160  rw [Matrix.trace_mul_cycle, labelProjection_idempotent, Matrix.trace_mul_comm]161  exact P.labelProjection_probability ρ m162163theorem labelBlock_trace_complex (P : POVM ο μ) (ρ : DensityMatrix ο) (m : μ) :164    (P.labelBlock ρ m).trace = (P.probability ρ m : ℂ) := by165  apply Complex.ext166  · exact P.labelBlock_trace ρ m167  · have hreal := (RCLike.nonneg_iff.mp (P.labelBlock_positive ρ m).trace_nonneg).2168    simpa using hreal169170/-- The normalized state inside the successful label block, with an explicit171state chosen when that label has zero probability. -/172def normalizedBlockState [Nonempty ο] (P : POVM ο μ) (ρ : DensityMatrix ο) (m : μ) :173    DensityMatrix ο :=174  if h : 0 < P.probability ρ m then {175    matrix := ((P.probability ρ m)⁻¹ : ℂ) • P.labelBlock ρ m176    positive := (P.labelBlock_positive ρ m).smul (by177      exact_mod_cast inv_nonneg.mpr h.le)178    normalized := by179      rw [Matrix.trace_smul, labelBlock_trace_complex]180      simp [h.ne'] }181  else maximallyMixed ο182183theorem normalizedBlockState_matrix_of_pos [Nonempty ο] (P : POVM ο μ)184    (ρ : DensityMatrix ο) (m : μ) (h : 0 < P.probability ρ m) :185    (P.normalizedBlockState ρ m).matrix =186      ((P.probability ρ m)⁻¹ : ℂ) • P.labelBlock ρ m := by187  simp [normalizedBlockState, h]188189theorem probability_smul_normalizedBlockState [Nonempty ο] (P : POVM ο μ)190    (ρ : DensityMatrix ο) (m : μ) :191    (P.probability ρ m : ℂ) • (P.normalizedBlockState ρ m).matrix = P.labelBlock ρ m := by192  by_cases h : 0 < P.probability ρ m193  · rw [normalizedBlockState_matrix_of_pos P ρ m h, smul_smul]194    simp [h.ne']195  · have hz : P.probability ρ m = 0 := le_antisymm (le_of_not_gt h) (P.probability_nonneg ρ m)196    have hB : P.labelBlock ρ m = 0 := (P.labelBlock_positive ρ m).trace_eq_zero_iff.mp197      (by rw [labelBlock_trace_complex, hz, Complex.ofReal_zero])198    simp [hz, hB]199200end Nonadditivity.Operational.POVM