Definitions for A New Proof of the Channel Coding Theorem via Hypothesis Testing in Quantum Information Theory
DefinitionQAlgorithms_Papers_Independent_Intakethird100_P05The objects the formalized statements of A New Proof of the Channel Coding Theorem via Hypothesis Testing in Quantum Information Theory (arXiv:quant-ph/0208139) are stated in. Each was checked against the paper by a blind read-back and a moderator.
DensityOutputChannel: PDF p.1, (1): a classical-input channel with normalized PSD output matrices.channelAverage: PDF p.2, (4): the average output operator, constructed from the channel and law.outputEntropyNats: PDF p.2, (4): entropy in nats; zero eigenvalues contribute 0 log 0 = 0.channelInformationNats: PDF p.2, (4): Holevo mutual information for the given input law, in nats.DistinctWordCode: PDF pp.1–2: a nonempty codebook of distinct words and a sub-POVM decoder. The remaining effect 1 - sum decoder is the failure outcome.uniformMessageError: PDF p.1, (2): error averaged over the uniformly distributed messages, computed on the original output states, without pinching.pinchedWord: PDF pp.3–5: pinching onto full distinct-eigenvalue eigenspaces of sigma^n.pinchedLowerTail: PDF pp.4–5, (16),(21): iid pinched lower tail. The complement of the STRICT positive projector includes the zero eigenspace; BOTH rho occurrences in the trace/projection are pinched.goodMass: PDF p.4, (17): one-shot mass of the strictly positive pinched likelihood test.matrixOfHS: PDF p.8, (42): reshaping Hilbert–Schmidt coordinates into a matrix. The Euclidean inner product on these coordinates is Tr(A* B).commutantHS: PDF pp.7–8, (40)–(41): commutant of the generated unital -algebra. For an arbitrary C it requires commuting with C AND C, not just C. Reshaping equips this subspace with the Hilbert–Schmidt inner product.algebraPinch: PDF p.8, (41): Hilbert–Schmidt orthogonal projection onto the commutant. This supplies the literal arbitrary-reference domain of Lemma 3. For Hermitian references it is the spectral pinching (43), preserving degenerate eigenspaces.
import Mathlib
import Definitions.Def_QAlgorithms_Defs_MatrixDistances
import Definitions.Def_QAlgorithms_Defs_ExtendedQuantumEntropy
import Definitions.Def_QAlgorithms_Papers_Independent_Claimed50_P45
import Definitions.Def_QAlgorithms_Papers_Independent_Dependency50_P07
import Definitions.Def_QAlgorithms_Papers_Independent_Dependency50_P35
import Definitions.Def_QAlgorithms_Papers_Independent_Renew46_P44
/-! Ogawa–Nagaoka, arXiv:quant-ph/0208139v1. Natural logarithms.
Only accepted frozen modules are imported. Paper-local operational definitions
adapt the accepted finite laws, averages and ordered iid products to (1)–(4),
(16)–(21), and the general projection (41). Distinct local names preserve the
cq word-code model and natural-log information rather than unrelated frozen
objects sharing old short names; see ASSESSMENT.json.
Lemma 4 is deferred because its negative powers are unpinned for singular states.
Compilation is pending the batch mechanical handoff. -/
noncomputable section
namespace QAlgorithms.Papers.Independent.Intakethird100.P05
open scoped Matrix ComplexConjugate ComplexOrder BigOperators
open Filter Topology QAlgorithms
open QAlgorithms.Papers.Independent.Information100.P60 (Mat copies)
open QAlgorithms.Papers.Independent.Information100.P07 (positiveProjection)
open QAlgorithms.Papers.Independent.Dependency50.P28 (tr pinch typeI accept)
open QAlgorithms.Papers.Independent.Claimed50.P45 (pinchedTest)
open QAlgorithms.Papers.Independent.Information100.P58 (Distribution)
open QAlgorithms.Papers.Independent.Information100.P27 (average)
open QAlgorithms.Papers.Independent.Dependency50.P07 (wordProb)
open QAlgorithms.Papers.Independent.Dependency50.P35 (directSum)
open QAlgorithms.Papers.Independent.Renew46.P44 (wordOutput)
attribute [local instance] Classical.propDecidable Classical.decEq
variable {X I : Type} [Fintype X] [DecidableEq X] [Fintype I] [DecidableEq I]
/-- PDF p.1, (1): a classical-input channel with normalized PSD output matrices. -/
structure DensityOutputChannel (X I : Type) [Fintype I] where
state : X → Mat I
normalized : ∀ x, IsDensityMatrix (state x)
/-- PDF p.2, (4): the average output operator, constructed from the channel and law. -/
def channelAverage (W : DensityOutputChannel X I) (p : Distribution X) : Mat I :=
average p.val W.state
/-- PDF p.2, (4): entropy in nats; zero eigenvalues contribute 0 log 0 = 0. -/
def outputEntropyNats (rho : Mat I) : ℝ :=
-(cfc (fun x : ℝ => x * Real.log x) rho).trace.re
/-- PDF p.2, (4): Holevo mutual information for the given input law, in nats. -/
def channelInformationNats (W : DensityOutputChannel X I) (p : Distribution X) : ℝ :=
outputEntropyNats (channelAverage W p) - ∑ x, p.val x * outputEntropyNats (W.state x)
/-- PDF pp.1–2: a nonempty codebook of distinct words and a sub-POVM decoder.
The remaining effect 1 - sum decoder is the failure outcome. -/
structure DistinctWordCode (A J : Type) [Fintype J] [DecidableEq J] where
size : ℕ
positive_size : 0 < size
word : Fin size → A
distinct : Function.Injective word
decoder : Fin size → Mat J
positive_decoder : ∀ k, (decoder k).PosSemidef
failure_positive : (1 - ∑ k, decoder k).PosSemidef
/-- PDF p.1, (2): error averaged over the uniformly distributed messages,
computed on the original output states, without pinching. -/
def uniformMessageError {A J : Type} [Fintype J] [DecidableEq J]
(rho : A → Mat J) (C : DistinctWordCode A J) : ℝ :=
(C.size : ℝ)⁻¹ * ∑ k, (1 - tr (rho (C.word k) * C.decoder k))
/-- PDF pp.3–5: pinching onto full distinct-eigenvalue eigenspaces of sigma^n. -/
def pinchedWord (W : DensityOutputChannel X I) (p : Distribution X) (n : ℕ)
(u : Fin n → X) : Mat (Fin n → I) :=
pinch (copies n (channelAverage W p)) (wordOutput W.state u)
/-- PDF pp.4–5, (16),(21): iid pinched lower tail. The complement of the
STRICT positive projector includes the zero eigenspace; BOTH rho occurrences
in the trace/projection are pinched. -/
def pinchedLowerTail (W : DensityOutputChannel X I) (p : Distribution X) (n : ℕ) (a : ℝ) : ℝ :=
∑ u : Fin n → X, wordProb p.val n u *
tr (pinchedWord W p n u *
(1 - positiveProjection (pinchedWord W p n u -
(Real.exp ((n : ℝ) * a) : ℂ) • copies n (channelAverage W p))))
/-- PDF p.4, (17): one-shot mass of the strictly positive pinched likelihood test. -/
def goodMass (W : DensityOutputChannel X I) (p : Distribution X) (c : ℝ) : ℝ :=
∑ x, p.val x *
tr (pinch (channelAverage W p) (W.state x) *
positiveProjection (pinch (channelAverage W p) (W.state x) -
(c : ℂ) • channelAverage W p))
/-- PDF p.8, (42): reshaping Hilbert–Schmidt coordinates into a matrix.
The Euclidean inner product on these coordinates is Tr(A* B). -/
def matrixOfHS : EuclideanSpace ℂ (I × I) →ₗ[ℂ] Mat I where
toFun v := Matrix.of fun i j => v (i, j)
map_add' v w := by ext i j; rfl
map_smul' c v := by ext i j; rfl
/-- PDF pp.7–8, (40)–(41): commutant of the generated unital *-algebra.
For an arbitrary C it requires commuting with C AND C*, not just C.
Reshaping equips this subspace with the Hilbert–Schmidt inner product. -/
def commutantHS (C : Mat I) : Submodule ℂ (EuclideanSpace ℂ (I × I)) :=
(Subalgebra.centralizer ℂ ({C, Cᴴ} : Set (Mat I))).toSubmodule.comap matrixOfHS
/-- PDF p.8, (41): Hilbert–Schmidt orthogonal projection onto the commutant.
This supplies the literal arbitrary-reference domain of Lemma 3. For Hermitian
references it is the spectral pinching (43), preserving degenerate eigenspaces. -/
def algebraPinch (C A : Mat I) : Mat I :=
matrixOfHS ((commutantHS C).starProjection
(WithLp.toLp 2 (fun ij : I × I => A ij.1 ij.2)))
/-- Sanity: every law, including laws with zero weights, has total mass one. -/
example (p : Distribution X) : ∑ x, p.val x = 1 := p.property.2
/-- Sanity: the channel carries normalization rather than an unnormalized state. -/
example (W : DensityOutputChannel X I) (x : X) : (W.state x).trace = 1 :=
(W.normalized x).2
/-- Sanity: the empty product is 1, but all rates below use positive lengths. -/
example (p : Distribution X) (u : Fin 0 → X) : wordProb p.val 0 u = 1 := by
simp [wordProb]
/-- Sanity: at a fixed one-use word the output is exactly its single factor. -/
example (W : DensityOutputChannel X I) (u : Fin 1 → X) (i j : Fin 1 → I) :
wordOutput W.state u i j = W.state (u 0) (i 0) (j 0) := by
simp [wordOutput]
/-- Sanity: the zero density candidate has zero entropy in the total definition. -/
example : outputEntropyNats (0 : Mat I) = 0 := by
simp [outputEntropyNats, cfc_zero]
/-- Sanity: the general pinching maps the zero operator to zero for EVERY reference. -/
example (C : Mat I) : algebraPinch C 0 = 0 := by
change matrixOfHS ((commutantHS C).starProjection
(0 : EuclideanSpace ℂ (I × I))) = 0
rw [map_zero, map_zero]
/-- Sanity: a direct sum has zero off-diagonal blocks. -/
example (A B : Mat I) (i j : I) : directSum A B (Sum.inl i) (Sum.inr j) = 0 := by
rfl
end QAlgorithms.Papers.Independent.Intakethird100.P05
Read-back
What the Lean code literally says, in plain math · gpt-6.1-sol
QAlgorithms.Papers.Independent.Intakethird100.P05.DensityOutputChannel
For a type and a finite type , a density-output channel consists of a family of complex matrices indexed by , together with the requirement that every is positive semidefinite and has complex trace . There is no finiteness assumption on in this structure. If is empty, the normalization requirement is vacuous; if is empty and is nonempty, it cannot be satisfied.
QAlgorithms.Papers.Independent.Intakethird100.P05.DistinctWordCode
For an arbitrary type and a finite type with decidable equality, a distinct-word code consists of a natural number , an injective function , and complex matrices such that every is positive semidefinite and is positive semidefinite. Thus the decoder matrices may sum to less than the identity, and individual decoder matrices may be zero. No states or channel are part of this structure. The condition excludes an empty message set and makes the structure impossible when is empty.
QAlgorithms.Papers.Independent.Intakethird100.P05.algebraPinch
For a finite index type with decidable equality and arbitrary complex matrices , this defines a matrix by viewing the entries of as the Euclidean vector , orthogonally projecting onto the complex subspace whose associated matrices commute with both and , and converting the resulting vector back into a matrix. Orthogonality uses the Euclidean inner product . Neither input is required to be Hermitian or positive semidefinite; for empty , the result is the unique empty matrix.
QAlgorithms.Papers.Independent.Intakethird100.P05.channelAverage
For finite types and , a family of positive semidefinite complex matrices with trace , and a distribution satisfying and , the channel average is the matrix . Zero weights are allowed. An empty admits no such distribution.
QAlgorithms.Papers.Independent.Intakethird100.P05.channelInformationNats
For finite types and , with decidable equality on , a family of positive semidefinite complex matrices of trace , and real weights summing to , this defines
where the matrix function uses real continuous functional calculus and the logarithm is natural. Zero weights are permitted; an empty cannot support the required distribution.
QAlgorithms.Papers.Independent.Intakethird100.P05.commutantHS
For a finite index type with decidable equality and any complex matrix , this defines the complex subspace of Euclidean coordinate vectors whose associated matrix commutes with both and its conjugate transpose:
No Hermiticity or normality assumption on is required. If is empty, this is the unique zero-dimensional subspace.
QAlgorithms.Papers.Independent.Intakethird100.P05.goodMass
For finite types , with decidable equality on , density matrices , a distribution summing to , and any real , put and , where are the spectral projections of , summed over its distinct eigenvalues. This defines the real number
where is the orthogonal projection onto the range of , evaluated by continuous functional calculus. Thus the projection selects strictly positive eigenvalues and excludes zero eigenvalues. The parameter may be zero or negative, and zero distribution weights are allowed.
QAlgorithms.Papers.Independent.Intakethird100.P05.matrixOfHS
For an index type , this defines the complex-linear map from the coordinate space , represented as a Euclidean space, to complex matrices that sends to the matrix with entries . The structure includes proofs that this assignment preserves addition and multiplication by every complex scalar. It imposes no condition on ; for empty , it maps the unique coordinate vector to the unique empty matrix.
QAlgorithms.Papers.Independent.Intakethird100.P05.outputEntropyNats
For a finite index type with decidable equality and any complex matrix , this defines the real number , where , is the real natural logarithm, and is evaluated by the real continuous functional calculus. No positivity, Hermiticity, or trace normalization is assumed. The real logarithm is total, with ; the value is for the zero matrix, including the matrix on an empty index type.
QAlgorithms.Papers.Independent.Intakethird100.P05.pinchedLowerTail
For finite types , with decidable equality on , density matrices , a distribution summing to , a natural number , and any real , let , let , and, for each word , let , where are the spectral projections of , summed over its distinct eigenvalues. This defines
Here is the orthogonal projection onto the range of the matrix obtained by applying to by continuous functional calculus; for these Hermitian matrices it selects the strictly positive eigenspaces, so its complement includes the zero eigenspace. There is no restriction on , and is allowed and gives value .
QAlgorithms.Papers.Independent.Intakethird100.P05.pinchedWord
For finite types , with decidable equality on , density matrices , a distribution with , any natural number , and a word , put and define matrices indexed by functions by and . The pinched word is , where the sum runs once over each distinct eigenvalue of and is the continuous-functional-calculus matrix for the function equal to at and elsewhere. Here is Hermitian; the underlying pinching definition returns zero for a non-Hermitian pinching matrix. The case is included and gives the one-by-one matrix with entry , since all coordinate products are empty.
QAlgorithms.Papers.Independent.Intakethird100.P05.uniformMessageError
For an arbitrary type , a finite type with decidable equality, any matrix-valued function , and a code having distinct words and positive semidefinite decoder matrices with positive semidefinite, this defines
The function is not required to consist of density matrices, so the definition imposes no probability-range guarantee on this real number. The denominator is nonzero because the code requires .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.