Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Explicit Hadamard example, Eqs.13–15: Bell flags and preparation

Open
QAlgorithms.Papers.Independent.Intakenext100.P37.hadamard_bellFlag_preparation

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

prove2quantum

Use the normalized Bell vectors ψ0=(∣00⟩+∣11⟩)/2\psi_0=(|00\rangle+|11\rangle)/\sqrt2ψ0​=(∣00⟩+∣11⟩)/2​, ψ1=(∣00⟩−∣11⟩)/2\psi_1=(|00\rangle-|11\rangle)/\sqrt2ψ1​=(∣00⟩−∣11⟩)/2​, ψ2=(∣01⟩+∣10⟩)/2\psi_2=(|01\rangle+|10\rangle)/\sqrt2ψ2​=(∣01⟩+∣10⟩)/2​, and ψ3=(∣01⟩−∣10⟩)/2\psi_3=(|01\rangle-|10\rangle)/\sqrt2ψ3​=(∣01⟩−∣10⟩)/2​. Write Pv=∣v⟩⟨v∣P_v=|v\rangle\langle v|Pv​=∣v⟩⟨v∣ and set

χ±=2±2∣00⟩ ±2∓2∣11⟩2,τ0=P00+Pψ22,τ1=P11+Pψ32,τ2=Pχ+,τ3=Pχ−.\chi_\pm=\frac{\sqrt{2\pm\sqrt2}|00\rangle\ \pm\sqrt{2\mp\sqrt2}|11\rangle}{2},\qquad \tau_0=\frac{P_{00}+P_{\psi_2}}2,\quad\tau_1=\frac{P_{11}+P_{\psi_3}}2,\quad\tau_2=P_{\chi_+},\quad\tau_3=P_{\chi_-}.χ±​=22±2​​∣00⟩ ±2∓2​​∣11⟩​,τ0​=2P00​+Pψ2​​​,τ1​=2P11​+Pψ3​​​,τ2​=Pχ+​​,τ3​=Pχ−​​.

For p1=2/(1+2)p_1=\sqrt2/(1+\sqrt2)p1​=2​/(1+2​), p2=1/(1+2)p_2=1/(1+\sqrt2)p2​=1/(1+2​), and q=(p1/2,p1/2,p2/2,p2/2)q=(p_1/2,p_1/2,p_2/2,p_2/2)q=(p1​/2,p1​/2,p2​/2,p2​/2), all qiq_iqi​ are nonnegative, their sum is one, all ψi\psi_iψi​ are unit vectors, all τi\tau_iτi​ are density matrices, and

ρH=∑i=03qiPψiAB⊗τiA′B′.\rho_H=\sum_{i=0}^{3}q_i P_{\psi_i}^{AB}\otimes\tau_i^{A'B'}.ρH​=i=0∑3​qi​Pψi​AB​⊗τiA′B′​.

Randomly selecting iii and separately preparing these two factors therefore prepares ρH\rho_HρH​. The product cut here is AB:A′B′AB:A'B'AB:A′B′, and does not assert physical Alice–Bob separability. Eq. (5)'s repeated ket is corrected according to Eqs. (7) and (14).

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intakenext100_P37
Formal statement
noncomputable section

open scoped Matrix BigOperators ComplexConjugate ComplexOrder ENNReal

namespace QAlgorithms.Papers.Independent.Intakenext100.P37

attribute [local instance] Classical.propDecidable Classical.decEq

open QAlgorithms.Papers.Independent.Information100.P21 (Op)

open QAlgorithms.Papers.Independent.Dependency50.P24
  (Key IsPrivate xForm twist twistingMatrix associatedCCQ transposeSecond transposeBob partyCut)

/-- PDF p.3, Eqs.(13)--(15): the exact Bell-flag mixture and normalized
preparation law. Separate preparation refers to AB versus A'B', not Alice versus Bob.
Eq.(5)'s repeated |01> is corrected to |10>, as Eqs.(7),(14) require. -/
theorem hadamard_bellFlag_preparation :
    rhoHadamard = ∑ i : Fin 4, (hadamardWeight i : ℂ) •
      Matrix.kronecker (pureDensity (((![pairKet false 1, pairKet false (-1), pairKet true 1, pairKet true (-1)]) i))) (hadamardFlag i) ∧
    (∀ i, 0 ≤ hadamardWeight i) ∧ (∑ i, hadamardWeight i) = 1 ∧
    (∀ i, ‖((![pairKet false 1, pairKet false (-1), pairKet true 1, pairKet true (-1)]) i)‖ = 1 ∧ IsDensityMatrix (hadamardFlag i)) := by sorry

end QAlgorithms.Papers.Independent.Intakenext100.P37

end
Source
Low dimensional bound entanglement with one-way distillable cryptographic key, arXiv:quant-ph/0506203v1, PDF p. 3, Explicit Hadamard example, Eqs.13–15: Bell flags and preparation
Read-back

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

Use the basis ∣00⟩,∣01⟩,∣10⟩,∣11⟩|00\rangle,|01\rangle,|10\rangle,|11\rangle∣00⟩,∣01⟩,∣10⟩,∣11⟩ on each of two four-dimensional registers, called key and shield, and write Πv=vv†\Pi_v=vv^\daggerΠv​=vv†. Define H=2−1/2(111−1)H=2^{-1/2}\begin{pmatrix}1&1\\1&-1\end{pmatrix}H=2−1/2(11​1−1​), W(i,j),(k,l)=HijW_{(i,j),(k,l)}=H_{ij}W(i,j),(k,l)​=Hij​ when i=li=li=l and j=kj=kj=k, and zero otherwise, and V(i,j),(k,l)=W(i,l),(k,j)V_{(i,j),(k,l)}=W_{(i,l),(k,j)}V(i,j),(k,l)​=W(i,l),(k,j)​, where all four indices range over {0,1}\{0,1\}{0,1}. For a shield matrix XXX, define X(X)\mathcal X(X)X(X) to have key blocks

X(X)00,00=12XX†,X(X)00,11=12X,X(X)11,00=12X†,X(X)11,11=12X†X,\mathcal X(X)_{00,00}=\tfrac12\sqrt{XX^\dagger},\quad \mathcal X(X)_{00,11}=\tfrac12X,\quad \mathcal X(X)_{11,00}=\tfrac12X^\dagger,\quad \mathcal X(X)_{11,11}=\tfrac12\sqrt{X^\dagger X},X(X)00,00​=21​XX†​,X(X)00,11​=21​X,X(X)11,00​=21​X†,X(X)11,11​=21​X†X​,

with all other key blocks zero. Let F∣i,j⟩=∣1−i,j⟩F|i,j\rangle=|1-i,j\rangleF∣i,j⟩=∣1−i,j⟩, acting on the key register, set r=2/(1+2)r=\sqrt2/(1+\sqrt2)r=2​/(1+2​) and s=1/(1+2)s=1/(1+\sqrt2)s=1/(1+2​), and define

R=r X ⁣(W22)+s(F⊗I)X ⁣(V2)(F⊗I)†.R=r\,\mathcal X\!\left(\frac{W}{2\sqrt2}\right) +s(F\otimes I)\mathcal X\!\left(\frac V2\right)(F\otimes I)^\dagger.R=rX(22​W​)+s(F⊗I)X(2V​)(F⊗I)†.

Let Φ±=(∣00⟩±∣11⟩)/2\Phi_\pm=(|00\rangle\pm|11\rangle)/\sqrt2Φ±​=(∣00⟩±∣11⟩)/2​, Ψ±=(∣01⟩±∣10⟩)/2\Psi_\pm=(|01\rangle\pm|10\rangle)/\sqrt2Ψ±​=(∣01⟩±∣10⟩)/2​,

χ+=2+22∣00⟩+2−22∣11⟩,χ−=2−22∣00⟩−2+22∣11⟩,\chi_+=\frac{\sqrt{2+\sqrt2}}2|00\rangle+\frac{\sqrt{2-\sqrt2}}2|11\rangle,\qquad \chi_-=\frac{\sqrt{2-\sqrt2}}2|00\rangle-\frac{\sqrt{2+\sqrt2}}2|11\rangle,χ+​=22+2​​​∣00⟩+22−2​​​∣11⟩,χ−​=22−2​​​∣00⟩−22+2​​​∣11⟩,

and let v0=Φ+v_0=\Phi_+v0​=Φ+​, v1=Φ−v_1=\Phi_-v1​=Φ−​, v2=Ψ+v_2=\Psi_+v2​=Ψ+​, v3=Ψ−v_3=\Psi_-v3​=Ψ−​, with shield matrices

G0=12(Π∣00⟩+ΠΨ+),G1=12(Π∣11⟩+ΠΨ−),G2=Πχ+,G3=Πχ−,G_0=\tfrac12(\Pi_{|00\rangle}+\Pi_{\Psi_+}),\quad G_1=\tfrac12(\Pi_{|11\rangle}+\Pi_{\Psi_-}),\quad G_2=\Pi_{\chi_+},\quad G_3=\Pi_{\chi_-},G0​=21​(Π∣00⟩​+ΠΨ+​​),G1​=21​(Π∣11⟩​+ΠΨ−​​),G2​=Πχ+​​,G3​=Πχ−​​,

and weights (w0,w1,w2,w3)=(r/2,r/2,s/2,s/2)(w_0,w_1,w_2,w_3)=(r/2,r/2,s/2,s/2)(w0​,w1​,w2​,w3​)=(r/2,r/2,s/2,s/2). The assertion is that R=∑i=03wi Πvi⊗GiR=\sum_{i=0}^3w_i\,\Pi_{v_i}\otimes G_iR=∑i=03​wi​Πvi​​⊗Gi​, that every wiw_iwi​ is nonnegative and their sum is one, and that, for each of the four indices, ∥vi∥=1\|v_i\|=1∥vi​∥=1 and GiG_iGi​ is positive semidefinite with trace one.

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

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 31, 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