Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Definitions for Vanishing quantum discord is necessary and sufficient for completely positive maps

Definition
QAlgorithms_Papers_Independent_Advance50_P40

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

prove2quantum

The objects the formalized statements of Vanishing quantum discord is necessary and sufficient for completely positive maps (arXiv:0808.0175) are stated in. Each was checked against the paper by a blind read-back and a moderator.

  • SystemMatrix: System operators in the fixed basis of Eq. (4), PDF p. 2.
  • JointMatrix: Joint operators, system first, in Eq. (1), PDF p. 1.
  • BathFamily: The fixed bath coefficient operators of Eq. (4), PDF p. 2.
  • IsSLFamily: Definition 1 and the adjoint symmetry stated before it, PDF p. 2. This imposes no positivity on individual bath coefficients.
  • sourceAssignment: Eq. (4), PDF p. 2, extended to every system matrix as in Eqs. (14)-(15), PDF p. 4: the (i,j) bath block is X_ij phi_ij. Zero coefficient operators annihilate the corresponding matrix units, independently of the scalar input.
  • IsSLAdmissibleInput: The admissible scalar data of Eq. (4) and its normalization, PDF p. 2. Positivity means positive semidefinite; rank-deficient joint states are included.
  • qdp: Eq. (1), PDF p. 1: conjugate by the joint unitary and trace out the bath.
  • specifiedReducedMap: The specific matrix-unit extension in Eqs. (14)-(15), PDF p. 4. The fixed phi and U precede the varying system input.
  • AllUnitaryCP: The all-unitary CP hypothesis of the Introduction, PDF p. 1, and the necessary-direction proof, PDF p. 3. The linear map agrees with the specified extension on the entire matrix space. CP does not include trace preservation.
  • operatorComponent: Definition 2, PDF pp. 2-3: components are generated by nonzero operator entries. Reflexivity retains isolated indices, including wholly zero singleton blocks.
  • bathBlock: The actual (i,j) bath block of a joint operator, Eq. (4), PDF p. 2.
  • IsSLState: Intrinsic SL membership in the specified system basis, Definition 1 and Discussion, PDF pp. 2,4. On density matrices this is equivalent to existence of an SL expansion: a nonzero bath block must have nonzero trace.
Definition code
import Mathlib
import Definitions.Def_QAlgorithms_Defs_Information
import Definitions.Def_QAlgorithms_Defs_Measurement
import Definitions.Def_QAlgorithms_Defs_MatrixMapPositivity

/-!
Statements from Shabani and Lidar, arXiv:0808.0175v2.
All matrices use fixed orthonormal coordinates, with the system first and bath second.
Theorem 3, Lemma 1, and the arbitrary-state claim are deferred in HARD.md.
Theorem 1 records its minimal rectangular typing correction explicitly.
No CP sufficiency assertion is made for the matrix-unit extension below.
-/

noncomputable section

namespace QAlgorithms.Papers.Independent.Advance50.P40

/-- System operators in the fixed basis of Eq. (4), PDF p. 2. -/
abbrev SystemMatrix (n : ℕ) := Matrix (Fin n) (Fin n) ℂ

/-- Joint operators, system first, in Eq. (1), PDF p. 1. -/
abbrev JointMatrix (n m : ℕ) := Matrix (Fin n × Fin m) (Fin n × Fin m) ℂ

/-- The fixed bath coefficient operators of Eq. (4), PDF p. 2. -/
abbrev BathFamily (n m : ℕ) := Fin n → Fin n → SystemMatrix m

/-- Definition 1 and the adjoint symmetry stated before it, PDF p. 2.
This imposes no positivity on individual bath coefficients. -/
def IsSLFamily {n m : ℕ} (phi : BathFamily n m) : Prop :=
  (∀ i j, phi i j = 0 ∨ Matrix.trace (phi i j) = 1) ∧
    ∀ i j, phi j i = (phi i j).conjTranspose

/-- Eq. (4), PDF p. 2, extended to every system matrix as in Eqs. (14)-(15),
PDF p. 4: the (i,j) bath block is X_ij phi_ij. Zero coefficient operators
annihilate the corresponding matrix units, independently of the scalar input. -/
def sourceAssignment {n m : ℕ} (phi : BathFamily n m) (X : SystemMatrix n) :
    JointMatrix n m :=
  Matrix.of fun p q => X p.1 q.1 * phi p.1 q.1 p.2 q.2

/-- The admissible scalar data of Eq. (4) and its normalization, PDF p. 2.
Positivity means positive semidefinite; rank-deficient joint states are included. -/
def IsSLAdmissibleInput {n m : ℕ} (phi : BathFamily n m) (R : SystemMatrix n) : Prop :=
  R.IsHermitian ∧ (∑ i, R i i) = 1 ∧
    QAlgorithms.IsDensityMatrix (sourceAssignment phi R)

/-- Eq. (1), PDF p. 1: conjugate by the joint unitary and trace out the bath. -/
def qdp {n m : ℕ} (U : Matrix.unitaryGroup (Fin n × Fin m) ℂ)
    (rho : JointMatrix n m) : SystemMatrix n :=
  QAlgorithms.traceRight ((U : JointMatrix n m) * rho *
    (U : JointMatrix n m).conjTranspose)

/-- The specific matrix-unit extension in Eqs. (14)-(15), PDF p. 4.
The fixed phi and U precede the varying system input. -/
def specifiedReducedMap {n m : ℕ} (phi : BathFamily n m)
    (U : Matrix.unitaryGroup (Fin n × Fin m) ℂ) (X : SystemMatrix n) : SystemMatrix n :=
  qdp U (sourceAssignment phi X)

/-- The all-unitary CP hypothesis of the Introduction, PDF p. 1, and the
necessary-direction proof, PDF p. 3. The linear map agrees with the specified
extension on the entire matrix space. CP does not include trace preservation. -/
def AllUnitaryCP {n m : ℕ} (phi : BathFamily n m) : Prop :=
  ∀ U : Matrix.unitaryGroup (Fin n × Fin m) ℂ,
    ∃ F : SystemMatrix n →ₗ[ℂ] SystemMatrix n,
      (∀ X, F X = specifiedReducedMap phi U X) ∧
        QAlgorithms.Entanglement.IsCompletelyPositive F

/-- Definition 2, PDF pp. 2-3: components are generated by nonzero operator
entries. Reflexivity retains isolated indices, including wholly zero singleton blocks. -/
def operatorComponent {n m : ℕ} (phi : BathFamily n m) : Setoid (Fin n) :=
  Relation.EqvGen.setoid (fun i j => phi i j ≠ 0)

/-- The actual (i,j) bath block of a joint operator, Eq. (4), PDF p. 2. -/
def bathBlock {n m : ℕ} (rho : JointMatrix n m) (i j : Fin n) : SystemMatrix m :=
  Matrix.of fun a b => rho (i, a) (j, b)

/-- Intrinsic SL membership in the specified system basis, Definition 1 and
Discussion, PDF pp. 2,4. On density matrices this is equivalent to existence
of an SL expansion: a nonzero bath block must have nonzero trace. -/
def IsSLState {n m : ℕ} (rho : JointMatrix n m) : Prop :=
  ∀ i j, bathBlock rho i j = 0 ∨ Matrix.trace (bathBlock rho i j) ≠ 0

/-- Sanity: Eq. (4) retains each scalar coefficient and the tensor-factor order. -/
example {n m : ℕ} (phi : BathFamily n m) (X : SystemMatrix n)
    (i j : Fin n) (a b : Fin m) :
    sourceAssignment phi X (i, a) (j, b) = X i j * phi i j a b := rfl

/-- Sanity: a zero bath family gives the zero joint operator on every input. -/
example {n m : ℕ} (X : SystemMatrix n) :
    sourceAssignment (fun _ _ => (0 : SystemMatrix m)) X = 0 := by
  ext p q
  simp [sourceAssignment]

/-- Sanity: the one-dimensional normalized coefficient family is SL. -/
example : IsSLFamily (fun _ _ : Fin 1 => (1 : SystemMatrix 1)) := by
  constructor
  · intro i j
    right
    simp [Matrix.trace]
  · intro i j
    simp

/-- Sanity: identity joint evolution and a one-dimensional bath keep the entry. -/
example (rho : JointMatrix 1 1) :
    qdp (1 : Matrix.unitaryGroup (Fin 1 × Fin 1) ℂ) rho 0 0 = rho (0, 0) (0, 0) := by
  simp [qdp, QAlgorithms.traceRight]

/-- Sanity: isolated indices are still in their own component. -/
example {n m : ℕ} (phi : BathFamily n m) (i : Fin n) :
    (operatorComponent phi).r i i := Relation.EqvGen.refl i

/-- Sanity: zero bath blocks satisfy the intrinsic SL condition; zero trace
alone does not make a block non-SL. Density is required separately. -/
example {n m : ℕ} : IsSLState (0 : JointMatrix n m) := by
  intro i j
  left
  rfl

/-- Sanity: the physical one-dimensional trace-one state is SL. -/
example : IsSLState (1 : JointMatrix 1 1) := by
  intro i j
  right
  have hij : i = j := Subsingleton.elim _ _
  subst j
  simp [bathBlock, Matrix.trace]

open scoped Matrix.Norms.Frobenius

end QAlgorithms.Papers.Independent.Advance50.P40
Source
Vanishing quantum discord is necessary and sufficient for completely positive maps, arXiv:0808.0175v2, https://arxiv.org/abs/0808.0175v2
Read-back

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

QAlgorithms.Papers.Independent.Advance50.P40.AllUnitaryCP

For all natural numbers n,mn,mn,m and every family ϕ=(ϕij)0≤i,j<n\phi=(\phi_{ij})_{0\le i,j<n}ϕ=(ϕij​)0≤i,j<n​ of complex m×mm\times mm×m matrices, this predicate holds exactly when, for every unitary complex matrix UUU on the index set {0,…,n−1}×{0,…,m−1}\{0,\ldots,n-1\}\times\{0,\ldots,m-1\}{0,…,n−1}×{0,…,m−1}, there exists a complex-linear map FFF from complex n×nn\times nn×n matrices to complex n×nn\times nn×n matrices such that, for every matrix XXX, F(X)ij=∑a=0m−1(USϕ(X)U†)(i,a),(j,a)F(X)_{ij}=\sum_{a=0}^{m-1}(U S_\phi(X)U^\dagger)_{(i,a),(j,a)}F(X)ij​=∑a=0m−1​(USϕ​(X)U†)(i,a),(j,a)​, where Sϕ(X)(i,a),(j,b)=Xij(ϕij)abS_\phi(X)_{(i,a),(j,b)}=X_{ij}(\phi_{ij})_{ab}Sϕ​(X)(i,a),(j,b)​=Xij​(ϕij​)ab​, and such that the following positivity requirement holds: for every natural number rrr and every positive semidefinite complex matrix ZZZ indexed by {0,…,r−1}×{0,…,n−1}\{0,\ldots,r-1\}\times\{0,\ldots,n-1\}{0,…,r−1}×{0,…,n−1}, the matrix with entries F(Zab)ijF(Z_{ab})_{ij}F(Zab​)ij​ at ((a,i),(b,j))((a,i),(b,j))((a,i),(b,j)) is positive semidefinite, where (Zab)kℓ=Z(a,k),(b,ℓ)(Z_{ab})_{k\ell}=Z_{(a,k),(b,\ell)}(Zab​)kℓ​=Z(a,k),(b,ℓ)​. The equality is required for all XXX, including those that are not admissible, and no SL-family condition is assumed. The case r=0r=0r=0 is included; if n=0n=0n=0 or m=0m=0m=0, the predicate holds using the zero linear map.

QAlgorithms.Papers.Independent.Advance50.P40.BathFamily

For all natural numbers n,mn,mn,m, a bath family is an assignment ϕ\phiϕ sending every ordered pair i,j∈{0,…,n−1}i,j\in\{0,\ldots,n-1\}i,j∈{0,…,n−1} to a complex m×mm\times mm×m matrix ϕij\phi_{ij}ϕij​. No conditions are imposed on these matrices. When n=0n=0n=0 the assignment has no arguments; when m=0m=0m=0 every assigned matrix is the unique empty matrix.

QAlgorithms.Papers.Independent.Advance50.P40.IsSLAdmissibleInput

For all natural numbers n,mn,mn,m, every family ϕ=(ϕij)0≤i,j<n\phi=(\phi_{ij})_{0\le i,j<n}ϕ=(ϕij​)0≤i,j<n​ of complex m×mm\times mm×m matrices, and every complex n×nn\times nn×n matrix RRR, the input is admissible exactly when RRR is Hermitian, ∑i=0n−1Rii=1\sum_{i=0}^{n-1}R_{ii}=1∑i=0n−1​Rii​=1, and the joint matrix with entries Rij(ϕij)abR_{ij}(\phi_{ij})_{ab}Rij​(ϕij​)ab​ is positive semidefinite and has trace 111. No separate assumption that ϕ\phiϕ satisfies the SL-family predicate is included. If either nnn or mmm is zero, these requirements cannot all hold because the joint matrix has trace zero.

QAlgorithms.Papers.Independent.Advance50.P40.IsSLFamily

For all natural numbers n,mn,mn,m and every family ϕ=(ϕij)0≤i,j<n\phi=(\phi_{ij})_{0\le i,j<n}ϕ=(ϕij​)0≤i,j<n​ of complex m×mm\times mm×m matrices, the family satisfies this predicate exactly when every block ϕij\phi_{ij}ϕij​ is either the zero matrix or has complex trace equal to 111, and ϕji=ϕij†\phi_{ji}=\phi_{ij}^{\dagger}ϕji​=ϕij†​ for every i,ji,ji,j, where †\dagger† denotes conjugate transpose. For n=0n=0n=0 both requirements are vacuous; for m=0m=0m=0 every block is zero and the predicate holds.

QAlgorithms.Papers.Independent.Advance50.P40.IsSLState

For all natural numbers n,mn,mn,m and every complex matrix ρ\rhoρ indexed by {0,…,n−1}×{0,…,m−1}\{0,\ldots,n-1\}\times\{0,\ldots,m-1\}{0,…,n−1}×{0,…,m−1}, this predicate holds exactly when, for every i,j∈{0,…,n−1}i,j\in\{0,\ldots,n-1\}i,j∈{0,…,n−1}, the complex m×mm\times mm×m block BijB_{ij}Bij​ defined by (Bij)ab=ρ(i,a),(j,b)(B_{ij})_{ab}=\rho_{(i,a),(j,b)}(Bij​)ab​=ρ(i,a),(j,b)​ is either the zero matrix or has nonzero complex trace ∑a=0m−1ρ(i,a),(j,a)\sum_{a=0}^{m-1}\rho_{(i,a),(j,a)}∑a=0m−1​ρ(i,a),(j,a)​. Hermiticity, positivity, and trace-one normalization of ρ\rhoρ are not required. For n=0n=0n=0 the condition is vacuous, and for m=0m=0m=0 every block is zero, so the predicate holds.

QAlgorithms.Papers.Independent.Advance50.P40.JointMatrix

For every pair of natural numbers n,mn,mn,m, a joint matrix of sizes n,mn,mn,m is a complex matrix whose rows and columns are indexed by pairs (i,a)(i,a)(i,a) with 0≤i<n0\le i<n0≤i<n and 0≤a<m0\le a<m0≤a<m. If either size is zero, the index set is empty and there is a unique such matrix.

QAlgorithms.Papers.Independent.Advance50.P40.SystemMatrix

For every natural number nnn, a system matrix of size nnn is a complex matrix whose rows and columns are indexed by {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1}. The case n=0n=0n=0 is included and gives the unique matrix with no entries.

QAlgorithms.Papers.Independent.Advance50.P40.bathBlock

For all natural numbers n,mn,mn,m, every complex matrix ρ\rhoρ indexed by {0,…,n−1}×{0,…,m−1}\{0,\ldots,n-1\}\times\{0,\ldots,m-1\}{0,…,n−1}×{0,…,m−1}, and every i,j∈{0,…,n−1}i,j\in\{0,\ldots,n-1\}i,j∈{0,…,n−1}, the bath block at (i,j)(i,j)(i,j) is the complex m×mm\times mm×m matrix BijB_{ij}Bij​ with entries (Bij)ab=ρ(i,a),(j,b)(B_{ij})_{ab}=\rho_{(i,a),(j,b)}(Bij​)ab​=ρ(i,a),(j,b)​. No conditions on ρ\rhoρ are required. If m=0m=0m=0, the block is the unique empty matrix; if n=0n=0n=0, there are no choices of i,ji,ji,j.

QAlgorithms.Papers.Independent.Advance50.P40.operatorComponent

For all natural numbers n,mn,mn,m and every family ϕ=(ϕij)0≤i,j<n\phi=(\phi_{ij})_{0\le i,j<n}ϕ=(ϕij​)0≤i,j<n​ of complex m×mm\times mm×m matrices, this definition equips {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1} with the smallest equivalence relation containing every pair (i,j)(i,j)(i,j) for which ϕij≠0\phi_{ij}\ne0ϕij​=0. Explicitly, iii and jjj are equivalent exactly when there is a finite chain i=i0,…,iℓ=ji=i_0,\ldots,i_\ell=ji=i0​,…,iℓ​=j such that each consecutive pair satisfies ϕitit+1≠0\phi_{i_t i_{t+1}}\ne0ϕit​it+1​​=0 or ϕit+1it≠0\phi_{i_{t+1}i_t}\ne0ϕit+1​it​​=0; a chain of length zero is allowed. No symmetry condition on ϕ\phiϕ is assumed. When n=0n=0n=0 there are no elements, and when m=0m=0m=0 this equivalence relation is equality.

QAlgorithms.Papers.Independent.Advance50.P40.qdp

For all natural numbers n,mn,mn,m, every unitary complex matrix UUU indexed by pairs (i,a)(i,a)(i,a) with 0≤i<n0\le i<n0≤i<n and 0≤a<m0\le a<m0≤a<m, and every complex matrix ρ\rhoρ on the same index set, this definition returns the complex n×nn\times nn×n matrix QU(ρ)Q_U(\rho)QU​(ρ) whose entries are QU(ρ)ij=∑a=0m−1(UρU†)(i,a),(j,a)Q_U(\rho)_{ij}=\sum_{a=0}^{m-1}(U\rho U^\dagger)_{(i,a),(j,a)}QU​(ρ)ij​=∑a=0m−1​(UρU†)(i,a),(j,a)​. No density-matrix assumption is imposed on ρ\rhoρ. When m=0m=0m=0, the empty sum gives the zero n×nn\times nn×n matrix; when n=0n=0n=0, the result is the unique empty matrix.

QAlgorithms.Papers.Independent.Advance50.P40.sourceAssignment

For all natural numbers n,mn,mn,m, every family ϕ=(ϕij)0≤i,j<n\phi=(\phi_{ij})_{0\le i,j<n}ϕ=(ϕij​)0≤i,j<n​ of complex m×mm\times mm×m matrices, and every complex n×nn\times nn×n matrix XXX, the source assignment is the complex matrix Sϕ(X)S_\phi(X)Sϕ​(X) indexed by pairs (i,a)(i,a)(i,a), with entries Sϕ(X)(i,a),(j,b)=Xij(ϕij)abS_\phi(X)_{(i,a),(j,b)}=X_{ij}(\phi_{ij})_{ab}Sϕ​(X)(i,a),(j,b)​=Xij​(ϕij​)ab​ for 0≤i,j<n0\le i,j<n0≤i,j<n and 0≤a,b<m0\le a,b<m0≤a,b<m. There are no positivity, normalization, or symmetry assumptions on ϕ\phiϕ or XXX. If n=0n=0n=0 or m=0m=0m=0, the result is the unique empty matrix.

QAlgorithms.Papers.Independent.Advance50.P40.specifiedReducedMap

For all natural numbers n,mn,mn,m, every family ϕ=(ϕij)0≤i,j<n\phi=(\phi_{ij})_{0\le i,j<n}ϕ=(ϕij​)0≤i,j<n​ of complex m×mm\times mm×m matrices, every unitary complex matrix UUU indexed by {0,…,n−1}×{0,…,m−1}\{0,\ldots,n-1\}\times\{0,\ldots,m-1\}{0,…,n−1}×{0,…,m−1}, and every complex n×nn\times nn×n matrix XXX, the specified reduced map returns the matrix with entries ∑a=0m−1(USϕ(X)U†)(i,a),(j,a)\sum_{a=0}^{m-1}(U S_\phi(X)U^\dagger)_{(i,a),(j,a)}∑a=0m−1​(USϕ​(X)U†)(i,a),(j,a)​, where Sϕ(X)(i,a),(j,b)=Xij(ϕij)abS_\phi(X)_{(i,a),(j,b)}=X_{ij}(\phi_{ij})_{ab}Sϕ​(X)(i,a),(j,b)​=Xij​(ϕij​)ab​. No SL-family or admissibility conditions are required. When m=0m=0m=0 this map is zero, and when n=0n=0n=0 its value is the unique empty matrix.

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