Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.ObservableDimension

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

Direct imports

Imported by project modules

3 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

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

32 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.FiniteRealization7import Nonadditivity.QuantitativeNet8import Mathlib.LinearAlgebra.Complex.Module9import Mathlib.LinearAlgebra.Dimension.Constructions10import Mathlib.LinearAlgebra.FiniteDimensional.Lemmas1112/-! # Exact real dimension of traceless Hermitian observables1314The imaginary-part map and real trace give two rank-nullity identities.15No explicit choice of a Hermitian basis is required.16-/1718noncomputable section19set_option backward.isDefEq.respectTransparency false2021namespace Nonadditivity.ObservableDimension2223open scoped BigOperators24open FiniteRealization2526variable {ι : Type*} [Fintype ι] [DecidableEq ι]2728omit [DecidableEq ι] in29/-- Hermitian matrices have exactly one real parameter per complex matrix entry. -/30theorem selfAdjoint_matrix_finrank :31    Module.finrank ℝ (selfAdjoint (Matrix ι ι ℂ)) = Fintype.card ι ^ 2 := by32  have h := (imaginaryPart (A := Matrix ι ι ℂ)).finrank_range_add_finrank_ker33  rw [LinearMap.range_eq_top.mpr imaginaryPart_surjective, finrank_top,34    ker_imaginaryPart] at h35  change Module.finrank ℝ (selfAdjoint (Matrix ι ι ℂ)) +36    Module.finrank ℝ (selfAdjoint (Matrix ι ι ℂ)) = _ at h37  rw [Module.finrank_matrix, Complex.finrank_real_complex] at h38  simp only [pow_two]39  omega4041instance selfAdjoint_matrix_finiteDimensional :42    FiniteDimensional ℝ (selfAdjoint (Matrix ι ι ℂ)) :=43  FiniteDimensional.of_surjective (imaginaryPart (A := Matrix ι ι ℂ))44    imaginaryPart_surjective4546/-- Real trace restricted to actual self-adjoint matrices. -/47def hermitianTrace : selfAdjoint (Matrix ι ι ℂ) →ₗ[ℝ] ℝ where48  toFun A := (Matrix.trace (A : Matrix ι ι ℂ)).re49  map_add' A B := by simp [Matrix.trace_add]50  map_smul' r A := by simp [Matrix.trace_smul]5152omit [DecidableEq ι] in53@[simp] theorem hermitianTrace_apply (A : selfAdjoint (Matrix ι ι ℂ)) :54    hermitianTrace A = (Matrix.trace (A : Matrix ι ι ℂ)).re := rfl5556omit [DecidableEq ι] in57theorem hermitian_trace_im (A : selfAdjoint (Matrix ι ι ℂ)) :58    (Matrix.trace (A : Matrix ι ι ℂ)).im = 0 := by59  apply Complex.conj_eq_iff_im.mp60  change star (Matrix.trace (A : Matrix ι ι ℂ)) = _61  rw [← Matrix.trace_conjTranspose, ← Matrix.star_eq_conjTranspose]62  exact congrArg Matrix.trace A.property6364/-- A single real diagonal entry realizes any prescribed trace. -/65theorem hermitianTrace_surjective [Nonempty ι] :66    Function.Surjective (hermitianTrace (ι := ι)) := by67  classical68  intro r69  let i : ι := Classical.arbitrary ι70  let A : Matrix ι ι ℂ := Matrix.diagonal (fun j => if j = i then (r : ℂ) else 0)71  have hA : IsSelfAdjoint A := by72    change (Matrix.diagonal (fun j => if j = i then (r : ℂ) else 0)).IsHermitian73    apply Matrix.isHermitian_diagonal_iff.mpr74    intro j75    split_ifs <;> simp [IsSelfAdjoint]76  refine ⟨⟨A, hA⟩, ?_⟩77  simp [hermitianTrace, A, Matrix.trace, Matrix.diag, apply_ite]7879/-- The Euclidean entry model of observables is exactly the kernel of real80trace on the Hermitian matrices. -/81def observableEquivTraceKernel : ObservableSpace ι ≃ₗ[ℝ]82    LinearMap.ker (hermitianTrace (ι := ι)) where83  toFun x := ⟨⟨entriesToMatrix x.val, x.property.1⟩, by84    change (Matrix.trace (entriesToMatrix x.val)).re = 085    rw [x.property.2]86    rfl⟩87  invFun x := ⟨matrixToEntries (x.val : Matrix ι ι ℂ), by88    constructor89    · exact x.val.property90    · apply Complex.ext91      · exact x.property92      · exact hermitian_trace_im x.val⟩93  left_inv x := by ext i; rfl94  right_inv x := by ext i j; rfl95  map_add' x y := by ext i j; rfl96  map_smul' r x := by ext i j; rfl9798/-- The manuscript's exact exponent: a nonempty `d×d` traceless Hermitian99observable space has real dimension `d²−1`. -/100theorem observableSpace_finrank [Nonempty ι] :101    Module.finrank ℝ (ObservableSpace ι) = Fintype.card ι ^ 2 - 1 := by102  rw [observableEquivTraceKernel.finrank_eq]103  have h := (hermitianTrace (ι := ι)).finrank_range_add_finrank_ker104  rw [LinearMap.range_eq_top.mpr hermitianTrace_surjective, finrank_top,105    Module.finrank_self, selfAdjoint_matrix_finrank] at h106  omega107108/-- The sharp inverse-natural-radius net in the actual Hilbert--Schmidt109observable sphere, including any prescribed test and its negative. -/110theorem exists_symmetric_observable_net [Nonempty ι]111    (a : ObservableSpace ι) (ha : ‖a‖ = 1) (n : ℕ) (hn : 1 ≤ n) :112    ∃ tests : Finset (ObservableSpace ι), a ∈ tests ∧ -a ∈ tests ∧113      (∀ x ∈ tests, ‖x‖ = 1) ∧ (∀ x ∈ tests, -x ∈ tests) ∧114      (∀ x ∈ tests, ∀ y ∈ tests, x ≠ y → 1 / (n : ℝ) < dist x y) ∧115      UnitSphereNet tests (1 / (n : ℝ)) ∧116      (tests.card : ℝ) ≤ (1 + 2 * (n : ℝ)) ^ (Fintype.card ι ^ 2 - 1) := by117  simpa only [observableSpace_finrank] using118    QuantitativeNet.exists_symmetric_inverse_nat_net a ha n hn119120/-- Matrix-form entry point: Hermiticity, zero trace and unit HS length121produce the exact-cardinality net with this matrix included. -/122theorem exists_symmetric_observable_net_for_matrix [Nonempty ι]123    (A : Matrix ι ι ℂ) (hA : A.IsHermitian) (htrace : A.trace = 0)124    (hhs : AdjointPurity.hsLength A = 1) (n : ℕ) (hn : 1 ≤ n) :125    ∃ tests : Finset (ObservableSpace ι), matrixObservable A hA htrace ∈ tests ∧126      -matrixObservable A hA htrace ∈ tests ∧127      (∀ x ∈ tests, ‖x‖ = 1) ∧ (∀ x ∈ tests, -x ∈ tests) ∧128      (∀ x ∈ tests, ∀ y ∈ tests, x ≠ y → 1 / (n : ℝ) < dist x y) ∧129      UnitSphereNet tests (1 / (n : ℝ)) ∧130      (tests.card : ℝ) ≤ (1 + 2 * (n : ℝ)) ^ (Fintype.card ι ^ 2 - 1) := by131  apply exists_symmetric_observable_net _ _ n hn132  rw [observable_norm_eq_hsLength, observableMatrix_matrixObservable]133  exact hhs134135end Nonadditivity.ObservableDimension