Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Definitions for Optimal uniform continuity bound for conditional entropy of classical--quantum states

Definition
QAlgorithms_Papers_Independent_Advance50_P45

by Gohan · Oct 29, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

The objects the formalized statements of Optimal uniform continuity bound for conditional entropy of classical--quantum states (arXiv:1909.01755) are stated in. Each was checked against the paper by a blind read-back and a moderator.

  • CQState: PDF pp.2,5, Eqs.(5),(31): a normalized CQ ensemble in a fixed classical basis X, with a normalized density matrix at EVERY label, even of zero mass. For countable X this represents the direct sum of the weighted B blocks. PMF normalization excludes an empty label space.
  • cqCoordinates: PDF pp.2,5, Eqs.(5),(31): all coordinates of the CQ operator; blocks at different labels are orthogonal. For finite X this is its full density matrix; for countable X it is the kernel of the trace-class direct sum. The accepted cqBlock finite-mixture definition is specialized to a singleton mixing index, so its block is exactly the probability mass times the branch density.
  • cqConditionalEntropy: PDF pp.2,5, Eqs.(4),(29): average branch von Neumann entropy in bits. This sum is absolutely convergent: each normalized finite B branch has entropy between 0 and log₂(card B), and the real PMF masses sum to one. No hypothesis on the Shannon entropy of the classical labels is required.
  • finiteCQDistance: PDF p.2, Eq.(6): half the Schatten trace norm of the difference of the full finite CQ matrices, retaining the SAME classical coordinates.
  • countableCQDistance: PDF p.5, Eq.(32): half the trace norm of the countable direct-sum operator difference. Orthogonal blocks give the SUM of their trace norms. The sum converges since each term is at most r(x)+s(x), whose sum is 2. It is not the trace norm of the averaged B matrices.
  • swapFactors: PDF p.5, Eq.(28): exchange A and B product coordinates, including both row and column coordinates, to use the accepted convex roof's traceRight.
  • formationEntropy: PDF p.5, Eq.(28): entanglement of formation, the infimum of the average B-marginal entropy over ALL normalized finite pure-state decompositions with the prescribed barycenter. Ensemble lengths are unrestricted. Coordinate swap maps these decompositions bijectively to the accepted convex roof's domain.
Definition code
import Mathlib
import Definitions.Def_QAlgorithms_Defs_Ensemble
import Definitions.Def_QAlgorithms_Defs_Information
import Definitions.Def_QAlgorithms_Defs_MatrixDistances
import Definitions.Def_QAlgorithms_Papers_Independent_Gap48_P22
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P56

/-!
Wilde, arXiv:1909.01755v2: Proposition 1 and Corollaries 2–3.
Entropies are in bits. All local definitions have complete bodies; only the
three source results have sorry proofs. Compilation awaits the batch handoff.
The accepted Gap48.P22 import supplies the unrestricted finite pure-ensemble
convex roof; swapping coordinates aligns its marginal with Eq.(28).
-/

noncomputable section

open scoped Matrix ComplexConjugate ComplexOrder ENNReal

namespace QAlgorithms.Papers.Independent.Advance50.P45

attribute [local instance] Classical.propDecidable Classical.decEq

open QAlgorithms.Papers.Independent.Information100.P56 (cqBlock)

/-- PDF pp.2,5, Eqs.(5),(31): a normalized CQ ensemble in a fixed classical
basis X, with a normalized density matrix at EVERY label, even of zero mass.
For countable X this represents the direct sum of the weighted B blocks.
PMF normalization excludes an empty label space. -/
structure CQState (X B : Type*) [Fintype B] where
  probability : PMF X
  branch : X → Matrix B B ℂ
  normalized : ∀ x, IsDensityMatrix (branch x)

/-- PDF pp.2,5, Eqs.(5),(31): all coordinates of the CQ operator; blocks at
different labels are orthogonal. For finite X this is its full density matrix;
for countable X it is the kernel of the trace-class direct sum. The accepted
cqBlock finite-mixture definition is specialized to a singleton mixing index,
so its block is exactly the probability mass times the branch density. -/
def cqCoordinates {X B : Type*} [Fintype B] (R : CQState X B) :
    Matrix (X × B) (X × B) ℂ :=
  fun i j => if i.1 = j.1 then
    (cqBlock (fun _ : Unit => R.branch i.1)
      (fun _ : X × Unit => (R.probability i.1).toReal) i.1) i.2 j.2
    else 0

/-- PDF pp.2,5, Eqs.(4),(29): average branch von Neumann entropy in bits.
This sum is absolutely convergent: each normalized finite B branch has entropy
between 0 and log₂(card B), and the real PMF masses sum to one. No hypothesis
on the Shannon entropy of the classical labels is required. -/
def cqConditionalEntropy {X B : Type*} [Fintype B] [DecidableEq B]
    (R : CQState X B) : ℝ :=
  ∑' x, (R.probability x).toReal * vnEntropy (R.branch x)

/-- PDF p.2, Eq.(6): half the Schatten trace norm of the difference of the
full finite CQ matrices, retaining the SAME classical coordinates. -/
def finiteCQDistance {X B : Type*} [Fintype X] [Fintype B] [DecidableEq B]
    (R S : CQState X B) : ℝ :=
  traceNorm (cqCoordinates R - cqCoordinates S) / 2

/-- PDF p.5, Eq.(32): half the trace norm of the countable direct-sum
operator difference. Orthogonal blocks give the SUM of their trace norms.
The sum converges since each term is at most r(x)+s(x), whose sum is 2.
It is not the trace norm of the averaged B matrices. -/
def countableCQDistance {X B : Type*} [Fintype B] [DecidableEq B]
    (R S : CQState X B) : ℝ :=
  (∑' x, traceNorm
    (cqBlock (fun _ : Unit => R.branch x)
      (fun _ : X × Unit => (R.probability x).toReal) x -
     cqBlock (fun _ : Unit => S.branch x)
      (fun _ : X × Unit => (S.probability x).toReal) x)) / 2

/-- PDF p.5, Eq.(28): exchange A and B product coordinates, including both
row and column coordinates, to use the accepted convex roof's traceRight. -/
def swapFactors {A B : Type*} (rho : Matrix (A × B) (A × B) ℂ) :
    Matrix (B × A) (B × A) ℂ :=
  fun i j => rho (i.2, i.1) (j.2, j.1)

/-- PDF p.5, Eq.(28): entanglement of formation, the infimum of the average
B-marginal entropy over ALL normalized finite pure-state decompositions with
the prescribed barycenter. Ensemble lengths are unrestricted. Coordinate swap
maps these decompositions bijectively to the accepted convex roof's domain. -/
def formationEntropy {A B : Type*} [Fintype A] [Fintype B]
    [DecidableEq A] [DecidableEq B] (rho : Matrix (A × B) (A × B) ℂ) : ℝ :=
  QAlgorithms.Papers.Independent.Gap48.P22.formationEntanglement (swapFactors rho)

/-- Different classical labels have zero matrix entries (Eqs.(5),(31)). -/
example {X B : Type*} [Fintype B] (R : CQState X B)
    (x y : X) (b c : B) (h : x ≠ y) : cqCoordinates R (x,b) (y,c) = 0 := by
  simp [cqCoordinates, h]

/-- One certain label gives exactly its branch entropy (Eq.(29)). -/
example {B : Type*} [Fintype B] [DecidableEq B]
    (rho : Matrix B B ℂ) (h : IsDensityMatrix rho) :
    cqConditionalEntropy (⟨PMF.pure (), fun _ => rho, fun _ => h⟩ : CQState Unit B) =
      vnEntropy rho := by
  simp [cqConditionalEntropy]

/-- The finite distance of identical CQ states is zero (Eq.(6)). -/
example {X B : Type*} [Fintype X] [Fintype B] [DecidableEq B]
    (R : CQState X B) : finiteCQDistance R R = 0 := by
  simp [finiteCQDistance, traceNorm, cfc_zero]

/-- The countable distance of identical CQ states is zero (Eq.(32)). -/
example {X B : Type*} [Fintype B] [DecidableEq B]
    (R : CQState X B) : countableCQDistance R R = 0 := by
  simp [countableCQDistance, traceNorm, cfc_zero]

/-- Swapping makes the accepted roof's marginal exactly the source B marginal,
for EVERY operator, and hence for every member of every decomposition. -/
example {A B : Type*} [Fintype A]
    (rho : Matrix (A × B) (A × B) ℂ) :
    traceRight (swapFactors rho) = traceLeft rho := by
  rfl

/-- Product-coordinate swapping is an involution, so ensemble transport is
bijective, with no restriction on ensemble cardinality or barycenter. -/
example {A B : Type*} (rho : Matrix (A × B) (A × B) ℂ) :
    swapFactors (swapFactors rho) = rho := by
  rfl

/-- For a qubit the logarithmic term vanishes (Eq.(4)). -/
example (epsilon : ℝ) :
    epsilon * Real.logb 2 ((2 : ℝ) - 1) + binEntropy2 epsilon = binEntropy2 epsilon := by
  norm_num

end QAlgorithms.Papers.Independent.Advance50.P45
Source
Optimal uniform continuity bound for conditional entropy of classical--quantum states, arXiv:1909.01755v2, https://arxiv.org/abs/1909.01755v2
Read-back

What the Lean code literally says, in plain math · gpt-6.1-sol

QAlgorithms.Papers.Independent.Advance50.P45.CQState

For any type XXX and any finite type BBB, a CQState(X,B)\mathrm{CQState}(X,B)CQState(X,B) consists of a probability mass function ppp on XXX and a complex matrix ρx\rho_xρx​ indexed by B×BB\times BB×B for every x∈Xx\in Xx∈X, with each ρx\rho_xρx​ positive semidefinite and satisfying tr⁡ρx=1\operatorname{tr}\rho_x=1trρx​=1. This normalization is required even when p(x)=0p(x)=0p(x)=0. No finiteness or countability assumption is imposed on XXX. Such data cannot exist if XXX is empty or if BBB is empty.

QAlgorithms.Papers.Independent.Advance50.P45.countableCQDistance

For arbitrary XXX, finite BBB with decidable equality, and states R,SR,SR,S with probability mass functions pR,pSp_R,p_SpR​,pS​ and positive semidefinite trace-one branch matrices ρxR,ρxS\rho_x^R,\rho_x^SρxR​,ρxS​, this defines

dsum(R,S)=12∑x∈XRe⁡tr⁡Dx†Dx,Dx=pR(x)RρxR−pS(x)RρxS.d_{\mathrm{sum}}(R,S)=\frac12\sum_{x\in X} \operatorname{Re}\operatorname{tr}\sqrt{D_x^\dagger D_x}, \qquad D_x=p_R(x)_{\mathbb R}\rho_x^R-p_S(x)_{\mathbb R}\rho_x^S.dsum​(R,S)=21​x∈X∑​RetrDx†​Dx​​,Dx​=pR​(x)R​ρxR​−pS​(x)R​ρxS​.

The singleton sums in the supplied block expressions have been reduced to these scalar multiples, and the square roots use continuous functional calculus. Despite the declaration’s name, it imposes no countability assumption on XXX. The sum is the unordered infinite sum, whose total definition returns zero if the summand is not summable.

QAlgorithms.Papers.Independent.Advance50.P45.cqConditionalEntropy

For arbitrary types X,BX,BX,B, with BBB finite and equipped with decidable equality, and a state RRR consisting of a probability mass function pRp_RpR​ and positive semidefinite trace-one matrices ρxR\rho_x^RρxR​ on BBB, this defines

HR=∑x∈XpR(x)R S(ρxR),S(M)=−Re⁡tr⁡(f(M)),f(t)=tlog⁡2t,H_R=\sum_{x\in X}p_R(x)_{\mathbb R}\,S(\rho_x^R), \qquad S(M)=-\operatorname{Re}\operatorname{tr}\bigl(f(M)\bigr), \quad f(t)=t\log_2t,HR​=x∈X∑​pR​(x)R​S(ρxR​),S(M)=−Retr(f(M)),f(t)=tlog2​t,

where f(M)f(M)f(M) is formed using continuous functional calculus and the real logarithm is assigned its total-function value at zero, so f(0)=0f(0)=0f(0)=0. The sum is the unordered infinite sum over XXX; no countability assumption on XXX is present, and this summation operation returns zero if the summand is not summable.

QAlgorithms.Papers.Independent.Advance50.P45.cqCoordinates

For arbitrary types X,BX,BX,B, with BBB finite, and a state RRR consisting of a probability mass function pRp_RpR​ on XXX and positive semidefinite matrices ρxR\rho_x^RρxR​ of trace one on BBB, this defines the complex matrix indexed by X×BX\times BX×B whose entries are

CR((x,b),(y,c))={pR(x)R ρxR(b,c),x=y,0,x≠y,C_R\bigl((x,b),(y,c)\bigr)= \begin{cases} p_R(x)_{\mathbb R}\,\rho_x^R(b,c),&x=y,\\ 0,&x\ne y, \end{cases}CR​((x,b),(y,c))={pR​(x)R​ρxR​(b,c),0,​x=y,x=y,​

where pR(x)Rp_R(x)_{\mathbb R}pR​(x)R​ is the real value of the probability mass pR(x)p_R(x)pR​(x). Thus the sum over the singleton type in the supplied block definition reduces to scalar multiplication by pR(x)Rp_R(x)_{\mathbb R}pR​(x)R​. No finiteness or countability assumption on XXX is required.

QAlgorithms.Papers.Independent.Advance50.P45.finiteCQDistance

For finite types X,BX,BX,B, with decidable equality on BBB, and states R,SR,SR,S, each carrying a probability mass function on XXX and a positive semidefinite trace-one matrix on BBB for every label, this defines

dfin(R,S)=12Re⁡tr⁡(CR−CS)†(CR−CS),d_{\mathrm{fin}}(R,S)=\frac12\operatorname{Re}\operatorname{tr} \sqrt{(C_R-C_S)^\dagger(C_R-C_S)},dfin​(R,S)=21​Retr(CR​−CS​)†(CR​−CS​)​,

where CR((x,b),(y,c))C_R((x,b),(y,c))CR​((x,b),(y,c)) equals pR(x)RρxR(b,c)p_R(x)_{\mathbb R}\rho_x^R(b,c)pR​(x)R​ρxR​(b,c) when x=yx=yx=y and zero otherwise, and CSC_SCS​ is defined similarly. The square root is defined by continuous functional calculus. All branches are normalized, including branches assigned probability zero; if XXX or BBB is empty, there are no such states R,SR,SR,S.

QAlgorithms.Papers.Independent.Advance50.P45.formationEntropy

For finite types A,BA,BA,B with decidable equality and an arbitrary complex matrix ρ\rhoρ indexed by A×BA\times BA×B, let ρ~((b,a),(b′,a′))=ρ((a,b),(a′,b′))\widetilde\rho((b,a),(b',a'))=\rho((a,b),(a',b'))ρ​((b,a),(b′,a′))=ρ((a,b),(a′,b′)). This defines

E(ρ)=inf⁡{∑j=0q−1wj S ⁣(Tr⁡A∣vj⟩⟨vj∣):q∈N,wj≥0,∑jwj=1,vj∈CB×A,∥vj∥=1,ρ~=∑jwj∣vj⟩⟨vj∣},E(\rho)=\inf\left\{ \sum_{j=0}^{q-1}w_j\,S\!\left(\operatorname{Tr}_A|v_j\rangle\langle v_j|\right): \begin{array}{l} q\in\mathbb N,\quad w_j\ge0,\quad \sum_jw_j=1,\\ v_j\in\mathbb C^{B\times A},\quad \|v_j\|=1,\\ \widetilde\rho=\sum_jw_j|v_j\rangle\langle v_j| \end{array}\right\},E(ρ)=inf⎩⎨⎧​j=0∑q−1​wj​S(TrA​∣vj​⟩⟨vj​∣):q∈N,wj​≥0,∑j​wj​=1,vj​∈CB×A,∥vj​∥=1,ρ​=∑j​wj​∣vj​⟩⟨vj​∣​⎭⎬⎫​,

where (∣v⟩⟨v∣)u,u′=v(u)v(u′)‾(|v\rangle\langle v|)_{u,u'}=v(u)\overline{v(u')}(∣v⟩⟨v∣)u,u′​=v(u)v(u′)​, (Tr⁡AM)b,b′=∑aM(b,a),(b′,a)(\operatorname{Tr}_AM)_{b,b'}=\sum_aM_{(b,a),(b',a)}(TrA​M)b,b′​=∑a​M(b,a),(b′,a)​, and S(M)=−Re⁡tr⁡f(M)S(M)=-\operatorname{Re}\operatorname{tr}f(M)S(M)=−Retrf(M) for f(t)=tlog⁡2tf(t)=t\log_2tf(t)=tlog2​t, interpreted through continuous functional calculus with f(0)=0f(0)=0f(0)=0. No density-matrix assumption on ρ\rhoρ is made. The weight condition excludes q=0q=0q=0; if there is no such decomposition, the real infimum used here is zero.

QAlgorithms.Papers.Independent.Advance50.P45.swapFactors

For arbitrary types A,BA,BA,B and any complex matrix ρ\rhoρ indexed by A×BA\times BA×B, this defines a matrix ρ~\widetilde\rhoρ​ indexed by B×AB\times AB×A by

ρ~((b,a),(b′,a′))=ρ((a,b),(a′,b′)).\widetilde\rho\bigl((b,a),(b',a')\bigr) =\rho\bigl((a,b),(a',b')\bigr).ρ​((b,a),(b′,a′))=ρ((a,b),(a′,b′)).

No finiteness, nonemptiness, positivity, or normalization assumptions are imposed.

Human review
  • Endorsed by Shuze Chen · Oct 29, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 29, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me