Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Definitions for Continuity bounds for entanglement

Definition
QAlgorithms_Papers_Independent_Bridge50_P34

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

prove2quantum

The objects the formalized statements of Continuity bounds for entanglement (arXiv:quant-ph/9908086) are stated in. Each was checked against the paper by a blind read-back and a moderator.

  • fullTraceDistance: PDF p.1: the full trace distance Tr|rho-sigma|.
  • purificationDistance: PDF pp.2–3, (13),(16),(17): the PROOF-INTENDED minimum full trace norm distance of purifications, explicitly different from printed (10).
  • printedBures: PDF p.2, literal (10). Used only in the uniform hypothesis (24).
  • outcomeVector: PDF pp.2–3: unnormalized AB vector for reference outcome m. Columns of U are the measured orthonormal basis; conjugation is on the basis coordinate.
  • measuredAR: PDF p.3, (11)–(12): postmeasurement A:Rprime state as unnormalized outcome blocks. No division by a possibly zero outcome probability occurs.
  • outcomeProbability: PDF p.3: the classical outcome probabilities, with null outcomes allowed.
  • uniformMatrix: PDF p.3, (20)–(23): completely mixed matrix, used only at d>0.
  • perturbedMatrix: PDF p.3: the source's actual diagonal perturbation, physical for 0<epsilon*d<=1. The chosen basis vector is explicit.
  • EntanglementFamily: PDF p.4: one functional family across ALL finite local dimensions. Values at non-density inputs are immaterial and never constrained or used.
  • groupedTensor: PDF p.4: tensor product regrouped as (A,C):(B,D), with the explicit standard finite product indexing from Mathlib's finProdFinEquiv.
  • IsAdditive: PDF pp.3–4: full tensor additivity, with the correct grouped local cut.
Definition code
import Mathlib
import Definitions.Def_QAlgorithms_Defs_Ensemble
import Definitions.Def_QAlgorithms_Defs_MatrixDistances
import Definitions.Def_QAlgorithms_Defs_QuantumInformation
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P08
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P21
import Definitions.Def_QAlgorithms_Papers_Independent_Support50_P42

/-!
Nielsen, Continuity bounds for entanglement, quant-ph/9908086v2, PDF pp.1–4.
All distances called fullTraceDistance have no factor 1/2; entropies are in bits.
SOURCE CORRECTION: (10) prints 2 sqrt(1-F) for ROOT fidelity F, but the identity
used in (16)–(18) requires 2 sqrt(1-F^2). The formation statements below expressly
use purificationDistance. They do not certify (18)/(19) with the printed scale.
The false literal pure-state identity is deferred in HARD.md.
Compilation and independent moderation are pending the batch handoff.
-/

noncomputable section

open scoped BigOperators Matrix ComplexConjugate ComplexOrder

namespace QAlgorithms.Papers.Independent.Bridge50.P34

attribute [local instance] Classical.propDecidable Classical.decEq

-- Accepted definition providers, authorized by the independent-paper workflow.
open QAlgorithms.Papers.Independent.Information100.P08 (formation bellVector)
open QAlgorithms.Papers.Independent.Information100.P21 (FiniteLOCC)
open QAlgorithms.Papers.Independent.Support50.P42 (outcomeEntropy)

-- The supplied diagnostic timed out while elaborating the remote-control statement.
set_option maxHeartbeats 800000

/-- PDF p.1: the full trace distance Tr|rho-sigma|. -/
def fullTraceDistance {I : Type*} [Fintype I] [DecidableEq I]
    (rho sigma : Matrix I I ℂ) : ℝ := traceNorm (rho - sigma)

/-- PDF pp.2–3, (13),(16),(17): the PROOF-INTENDED minimum full trace
norm distance of purifications, explicitly different from printed (10). -/
def purificationDistance {I : Type*} [Fintype I] [DecidableEq I]
    (rho sigma : Matrix I I ℂ) : ℝ :=
  2 * Real.sqrt (1 - rootFidelity rho sigma ^ 2)

/-- PDF p.2, literal (10). Used only in the uniform hypothesis (24). -/
def printedBures {I : Type*} [Fintype I] [DecidableEq I]
    (rho sigma : Matrix I I ℂ) : ℝ :=
  2 * Real.sqrt (1 - rootFidelity rho sigma)

/-- PDF pp.2–3: unnormalized AB vector for reference outcome m. Columns of U
are the measured orthonormal basis; conjugation is on the basis coordinate. -/
def outcomeVector {A B R : Type*} [Fintype R] [DecidableEq R]
    (psi : EuclideanSpace ℂ ((A × B) × R)) (U : Matrix.unitaryGroup R ℂ)
    (m : R) : EuclideanSpace ℂ (A × B) :=
  WithLp.toLp 2 fun ab => ∑ r, star ((U : Matrix R R ℂ) r m) * psi (ab, r)

/-- PDF p.3, (11)–(12): postmeasurement A:Rprime state as unnormalized
outcome blocks. No division by a possibly zero outcome probability occurs. -/
def measuredAR {A B R : Type*} [Fintype B] [Fintype R] [DecidableEq R]
    (psi : EuclideanSpace ℂ ((A × B) × R)) (U : Matrix.unitaryGroup R ℂ) :
    Matrix (A × R) (A × R) ℂ :=
  fun x y => if x.2 = y.2 then
    traceRight (pureDensity (outcomeVector psi U x.2)) x.1 y.1 else 0

/-- PDF p.3: the classical outcome probabilities, with null outcomes allowed. -/
def outcomeProbability {A B R : Type*} [Fintype A] [Fintype B] [Fintype R]
    [DecidableEq R]
    (psi : EuclideanSpace ℂ ((A × B) × R)) (U : Matrix.unitaryGroup R ℂ)
    (m : R) : ℝ := (pureDensity (outcomeVector psi U m)).trace.re

/-- PDF p.3, (20)–(23): completely mixed matrix, used only at d>0. -/
def uniformMatrix (d : ℕ) : Matrix (Fin d) (Fin d) ℂ := (1 / (d : ℂ)) • 1

/-- PDF p.3: the source's actual diagonal perturbation, physical for
0<epsilon*d<=1. The chosen basis vector is explicit. -/
def perturbedMatrix {d : ℕ} (i : Fin d) (epsilon : ℝ) : Matrix (Fin d) (Fin d) ℂ :=
  ((epsilon * d : ℝ) : ℂ) • pureDensity (ket i) +
    ((1 / (d : ℝ) - epsilon : ℝ) : ℂ) • 1

/-- PDF p.4: one functional family across ALL finite local dimensions.
Values at non-density inputs are immaterial and never constrained or used. -/
abbrev EntanglementFamily := (a b : ℕ) →
  Matrix (Fin a × Fin b) (Fin a × Fin b) ℂ → ℝ

/-- PDF p.4: tensor product regrouped as (A,C):(B,D), with the explicit
standard finite product indexing from Mathlib's finProdFinEquiv. -/
def groupedTensor {a b c d : ℕ}
    (rho : Matrix (Fin a × Fin b) (Fin a × Fin b) ℂ)
    (sigma : Matrix (Fin c × Fin d) (Fin c × Fin d) ℂ) :
    Matrix (Fin (a*c) × Fin (b*d)) (Fin (a*c) × Fin (b*d)) ℂ :=
  fun x y =>
    let xa : Fin a × Fin c := finProdFinEquiv.symm x.1
    let xb : Fin b × Fin d := finProdFinEquiv.symm x.2
    let ya : Fin a × Fin c := finProdFinEquiv.symm y.1
    let yb : Fin b × Fin d := finProdFinEquiv.symm y.2
    rho (xa.1,xb.1) (ya.1,yb.1) * sigma (xa.2,xb.2) (ya.2,yb.2)

/-- PDF pp.3–4: full tensor additivity, with the correct grouped local cut. -/
def IsAdditive (M : EntanglementFamily) : Prop :=
  ∀ a b c d : ℕ, 0 < a → 0 < b → 0 < c → 0 < d →
  ∀ (rho : Matrix (Fin a × Fin b) (Fin a × Fin b) ℂ)
    (sigma : Matrix (Fin c × Fin d) (Fin c × Fin d) ℂ),
    IsDensityMatrix rho → IsDensityMatrix sigma →
    M (a*c) (b*d) (groupedTensor rho sigma) = M a b rho + M c d sigma

/-! Sanity checks for the retained local interfaces; no source theorem is proved here. -/

example {I : Type*} [Fintype I] [DecidableEq I] (rho : Matrix I I ℂ) :
    fullTraceDistance rho rho = 0 := by simp [fullTraceDistance, traceNorm, cfc_zero]

example {A B R : Type*} [Fintype B] [Fintype R] [DecidableEq R]
    (U : Matrix.unitaryGroup R ℂ) :
    measuredAR (0 : EuclideanSpace ℂ ((A × B) × R)) U = 0 := by
  ext x y
  simp [measuredAR, outcomeVector, pureDensity, traceRight]

example : uniformMatrix 1 = 1 := by simp [uniformMatrix]

example (i : Fin 1) : perturbedMatrix i 1 = pureDensity (ket i) := by
  simp [perturbedMatrix]

example {I : Type*} [Fintype I] [DecidableEq I] (rho sigma : Matrix I I ℂ)
    (h : rootFidelity rho sigma = 1) :
    purificationDistance rho sigma = 0 ∧ printedBures rho sigma = 0 := by
  simp [purificationDistance, printedBures, h]

example {A B R : Type*} [Fintype R] [DecidableEq R]
    (psi : EuclideanSpace ℂ ((A × B) × R)) (m : R) :
    outcomeVector psi 1 m = WithLp.toLp 2 (fun ab => psi (ab,m)) := by
  ext ab
  simp [outcomeVector, Matrix.one_apply]

example {A B R : Type*} [Fintype A] [Fintype B] [Fintype R]
    [DecidableEq R]
    (U : Matrix.unitaryGroup R ℂ) :
    outcomeEntropy (outcomeProbability (0 : EuclideanSpace ℂ ((A × B) × R)) U) = 0 := by
  simp [outcomeEntropy, outcomeProbability, outcomeVector, pureDensity, Matrix.trace]

example : IsAdditive (fun _ _ _ => 0) := by simp [IsAdditive]

end QAlgorithms.Papers.Independent.Bridge50.P34
Source
Continuity bounds for entanglement, arXiv:quant-ph/9908086v2, https://arxiv.org/abs/quant-ph/9908086v2
Read-back

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

QAlgorithms.Papers.Independent.Bridge50.P34.EntanglementFamily

This abbreviates the type of families MMM that, for every pair of natural numbers a,ba,ba,b, assign a real number Ma,b(ρ)M_{a,b}(\rho)Ma,b​(ρ) to every complex matrix ρ\rhoρ indexed by ({0,…,a−1}×{0,…,b−1})2(\{0,\ldots,a-1\}\times\{0,\ldots,b-1\})^2({0,…,a−1}×{0,…,b−1})2. Zero dimensions and arbitrary matrices are included. No positivity, normalization, continuity, or other condition is part of this type.

QAlgorithms.Papers.Independent.Bridge50.P34.IsAdditive

For a family MMM assigning a real number Ma,b(ρ)M_{a,b}(\rho)Ma,b​(ρ) to each complex matrix on Fin(a)×Fin(b)\mathrm{Fin}(a)\times\mathrm{Fin}(b)Fin(a)×Fin(b), this defines additivity to mean that, for every four strictly positive natural numbers a,b,c,da,b,c,da,b,c,d and every positive semidefinite pair ρ,σ\rho,\sigmaρ,σ on Fin(a)×Fin(b)\mathrm{Fin}(a)\times\mathrm{Fin}(b)Fin(a)×Fin(b) and Fin(c)×Fin(d)\mathrm{Fin}(c)\times\mathrm{Fin}(d)Fin(c)×Fin(d), respectively, each having trace 111,

Mac,bd(T)=Ma,b(ρ)+Mc,d(σ),T(cu+v, ds+t),(cu′+v′, ds′+t′)=ρ(u,s),(u′,s′)σ(v,t),(v′,t′).M_{ac,bd}(T)=M_{a,b}(\rho)+M_{c,d}(\sigma), \qquad T_{(cu+v,\,ds+t),(cu'+v',\,ds'+t')} =\rho_{(u,s),(u',s')}\sigma_{(v,t),(v',t')}.Mac,bd​(T)=Ma,b​(ρ)+Mc,d​(σ),T(cu+v,ds+t),(cu′+v′,ds′+t′)​=ρ(u,s),(u′,s′)​σ(v,t),(v′,t′)​.

Here all component indices range over their corresponding finite dimensions. The predicate imposes no condition at zero dimensions or on matrices that fail the density hypotheses.

QAlgorithms.Papers.Independent.Bridge50.P34.fullTraceDistance

For any finite type III with decidable equality and any complex matrices ρ,σ\rho,\sigmaρ,σ indexed by I×II\times II×I, this defines

Dfull(ρ,σ)=Re⁡tr⁡(ρ−σ)†(ρ−σ),D_{\mathrm{full}}(\rho,\sigma) =\operatorname{Re}\operatorname{tr}\sqrt{(\rho-\sigma)^\dagger(\rho-\sigma)},Dfull​(ρ,σ)=Retr(ρ−σ)†(ρ−σ)​,

where the square root is given by continuous functional calculus. Neither matrix is required to be positive or have trace 111. The definition includes empty III, when its value is 000.

QAlgorithms.Papers.Independent.Bridge50.P34.groupedTensor

For arbitrary natural numbers a,b,c,da,b,c,da,b,c,d, a complex matrix ρ\rhoρ indexed by (Fin(a)×Fin(b))2(\mathrm{Fin}(a)\times\mathrm{Fin}(b))^2(Fin(a)×Fin(b))2, and a complex matrix σ\sigmaσ indexed by (Fin(c)×Fin(d))2(\mathrm{Fin}(c)\times\mathrm{Fin}(d))^2(Fin(c)×Fin(d))2, this defines the matrix TTT indexed by (Fin(ac)×Fin(bd))2(\mathrm{Fin}(ac)\times\mathrm{Fin}(bd))^2(Fin(ac)×Fin(bd))2 whose entries satisfy

T(cu+v, ds+t),(cu′+v′, ds′+t′)=ρ(u,s),(u′,s′) σ(v,t),(v′,t′)T_{(cu+v,\,ds+t),(cu'+v',\,ds'+t')} =\rho_{(u,s),(u',s')}\,\sigma_{(v,t),(v',t')}T(cu+v,ds+t),(cu′+v′,ds′+t′)​=ρ(u,s),(u′,s′)​σ(v,t),(v′,t′)​

for u,u′∈Fin(a)u,u'\in\mathrm{Fin}(a)u,u′∈Fin(a), v,v′∈Fin(c)v,v'\in\mathrm{Fin}(c)v,v′∈Fin(c), s,s′∈Fin(b)s,s'\in\mathrm{Fin}(b)s,s′∈Fin(b), and t,t′∈Fin(d)t,t'\in\mathrm{Fin}(d)t,t′∈Fin(d). These coordinates use the standard finite-product indexing equivalences. No density-matrix assumptions are required, and if any dimension is zero, the output index set is empty.

QAlgorithms.Papers.Independent.Bridge50.P34.measuredAR

For an arbitrary type AAA, finite types B,RB,RB,R, decidable equality on RRR, a complex vector ψ\psiψ indexed by (A×B)×R(A\times B)\times R(A×B)×R, and a unitary matrix UUU on RRR, this defines a matrix MMM indexed by A×RA\times RA×R through

M(a,m),(a′,m′)={∑b∈B(∑r∈RUrm‾ψ((a,b),r))(∑r∈RUrm‾ψ((a′,b),r))‾,m=m′,0,m≠m′.M_{(a,m),(a',m')}= \begin{cases} \displaystyle\sum_{b\in B} \left(\sum_{r\in R}\overline{U_{rm}}\psi((a,b),r)\right) \overline{\left(\sum_{r\in R}\overline{U_{rm}}\psi((a',b),r)\right)}, & m=m',\\ 0,&m\ne m'. \end{cases}M(a,m),(a′,m′)​=⎩⎨⎧​b∈B∑​(r∈R∑​Urm​​ψ((a,b),r))(r∈R∑​Urm​​ψ((a′,b),r))​,0,​m=m′,m=m′.​

There is no normalization assumption on ψ\psiψ. Empty BBB gives the zero matrix; empty AAA or RRR gives an empty index set.

QAlgorithms.Papers.Independent.Bridge50.P34.outcomeProbability

For finite types A,B,RA,B,RA,B,R, with decidable equality on RRR, a complex vector ψ\psiψ indexed by (A×B)×R(A\times B)\times R(A×B)×R, a unitary matrix UUU on RRR, and m∈Rm\in Rm∈R, this defines

pm=∑a∈A∑b∈B∣∑r∈RUrm‾ψ((a,b),r)∣2.p_m=\sum_{a\in A}\sum_{b\in B} \left|\sum_{r\in R}\overline{U_{rm}}\psi((a,b),r)\right|^2.pm​=a∈A∑​b∈B∑​​r∈R∑​Urm​​ψ((a,b),r)​2.

This is the real part of the trace of the matrix vmvm†v_mv_m^\daggervm​vm†​, where the displayed inner sum defines vm(a,b)v_m(a,b)vm​(a,b). The vector ψ\psiψ need not be normalized, so no upper bound of 111 is imposed. Empty AAA or BBB gives pm=0p_m=0pm​=0, while mmm requires nonempty RRR.

QAlgorithms.Papers.Independent.Bridge50.P34.outcomeVector

For arbitrary types A,BA,BA,B, a finite type RRR with decidable equality, a complex vector ψ\psiψ indexed by (A×B)×R(A\times B)\times R(A×B)×R, a unitary matrix UUU indexed by R×RR\times RR×R, and m∈Rm\in Rm∈R, this defines the vector vmv_mvm​ indexed by A×BA\times BA×B by

vm(a,b)=∑r∈RUrm‾ ψ((a,b),r).v_m(a,b)=\sum_{r\in R}\overline{U_{rm}}\,\psi((a,b),r).vm​(a,b)=r∈R∑​Urm​​ψ((a,b),r).

The types A,BA,BA,B need not be finite or nonempty, and ψ\psiψ need not be normalized. Supplying mmm requires RRR to be nonempty; no normalization of vmv_mvm​ is performed.

QAlgorithms.Papers.Independent.Bridge50.P34.perturbedMatrix

For every natural number ddd, index i∈{0,…,d−1}i\in\{0,\ldots,d-1\}i∈{0,…,d−1}, and arbitrary real ϵ\epsilonϵ, this defines

Pi,ϵ=ϵd eiei†+(d−1−ϵ)Id,P_{i,\epsilon}=\epsilon d\,e_ie_i^\dagger+(d^{-1}-\epsilon)I_d,Pi,ϵ​=ϵdei​ei†​+(d−1−ϵ)Id​,

where eie_iei​ has coordinate 111 at iii and 000 elsewhere. Thus its iii-th diagonal entry is d−1+(d−1)ϵd^{-1}+(d-1)\epsilond−1+(d−1)ϵ, every other diagonal entry is d−1−ϵd^{-1}-\epsilond−1−ϵ, and all off-diagonal entries vanish. The supplied index forces d>0d>0d>0; no restriction ensuring positive semidefiniteness is imposed on ϵ\epsilonϵ.

QAlgorithms.Papers.Independent.Bridge50.P34.printedBures

For any finite type III with decidable equality and any complex matrices ρ,σ\rho,\sigmaρ,σ indexed by I×II\times II×I, this defines

DB(ρ,σ)=21−Re⁡tr⁡ρ σρ.D_{\mathrm B}(\rho,\sigma) =2\sqrt{1-\operatorname{Re}\operatorname{tr}\sqrt{\sqrt{\rho}\,\sigma\sqrt{\rho}}}.DB​(ρ,σ)=21−Retrρ​σρ​​​.

Matrix square roots use continuous functional calculus, and the outer real square root returns 000 when its argument is negative. Neither positivity nor trace normalization is required. Empty III is included, giving the value 222.

QAlgorithms.Papers.Independent.Bridge50.P34.purificationDistance

For any finite type III with decidable equality and any complex matrices ρ,σ\rho,\sigmaρ,σ indexed by I×II\times II×I, define

Fr(ρ,σ)=Re⁡tr⁡ρ σρ.F_{\mathrm r}(\rho,\sigma) =\operatorname{Re}\operatorname{tr}\sqrt{\sqrt{\rho}\,\sigma\sqrt{\rho}}.Fr​(ρ,σ)=Retrρ​σρ​​.

This declaration defines Dp(ρ,σ)=21−Fr(ρ,σ)2D_{\mathrm p}(\rho,\sigma)=2\sqrt{1-F_{\mathrm r}(\rho,\sigma)^2}Dp​(ρ,σ)=21−Fr​(ρ,σ)2​, with matrix square roots interpreted through continuous functional calculus and scalar square roots through the real square-root function, which returns 000 on negative arguments. No positivity or normalization assumptions are imposed on ρ,σ\rho,\sigmaρ,σ; for empty III, the value is 222.

QAlgorithms.Papers.Independent.Bridge50.P34.uniformMatrix

For every natural number ddd, this defines the complex d×dd\times dd×d matrix d−1Idd^{-1}I_dd−1Id​: each diagonal entry is 1/d1/d1/d, and each off-diagonal entry is 000. The case d=0d=0d=0 is included; division by zero is interpreted as 000, and the resulting matrix is the unique matrix with empty row and column index sets.

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