Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Hardy success probability of the constructed state

Open
QAlgorithms.Papers.Independent.Intakethird100.P47.hardy_success_probability

by Gohan · Nov 1, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

For each party P∈{A,B}P\in\{A,B\}P∈{A,B}, let αP,βP∈C\alpha_P,\beta_P\in\mathbb CαP​,βP​∈C satisfy ∣αP∣2+∣βP∣2=1|\alpha_P|^2+|\beta_P|^2=1∣αP​∣2+∣βP​∣2=1 and 0<∣αP∣<10<|\alpha_P|<10<∣αP​∣<1. The unprimed measurement basis is ∣0⟩,∣1⟩|0\rangle,|1\rangle∣0⟩,∣1⟩, and the primed basis is ∣0′⟩P=αP∣0⟩+βP∣1⟩|0'\rangle_P=\alpha_P|0\rangle+\beta_P|1\rangle∣0′⟩P​=αP​∣0⟩+βP​∣1⟩, ∣1′⟩P=βP‾∣0⟩−αP‾∣1⟩|1'\rangle_P=\overline{\beta_P}|0\rangle-\overline{\alpha_P}|1\rangle∣1′⟩P​=βP​​∣0⟩−αP​​∣1⟩. Write ∣ψH⟩|\psi_H\rangle∣ψH​⟩ for the last vector obtained by the ordered Gram–Schmidt construction (2)–(4), and pH(a,b∣A,B)p_H(a,b\mid A,B)pH​(a,b∣A,B) for its Born probabilities.

Order the product vectors as ϕ0=∣1′1′⟩\phi_0=|1'1'\rangleϕ0​=∣1′1′⟩, ϕ1=∣00′⟩\phi_1=|00'\rangleϕ1​=∣00′⟩, ϕ2=∣0′0⟩\phi_2=|0'0\rangleϕ2​=∣0′0⟩, ϕ3=∣00⟩\phi_3=|00\rangleϕ3​=∣00⟩, and denote their Gram–Schmidt vectors by ϕi′\phi_i'ϕi′​. Then

q:=pH(00∣00)=∣⟨ψH∣ϕ3⟩∣2=1−∑i=02∣⟨ϕi′∣ϕ3⟩∣2=∣αAαB∣2∣βAβB∣21−∣αAαB∣2.q:=p_H(00\mid00)=|\langle\psi_H|\phi_3\rangle|^2 =1-\sum_{i=0}^{2}|\langle\phi_i'|\phi_3\rangle|^2 =\frac{|\alpha_A\alpha_B|^2|\beta_A\beta_B|^2}{1-|\alpha_A\alpha_B|^2}.q:=pH​(00∣00)=∣⟨ψH​∣ϕ3​⟩∣2=1−i=0∑2​∣⟨ϕi′​∣ϕ3​⟩∣2=1−∣αA​αB​∣2∣αA​αB​∣2∣βA​βB​∣2​.

The denominator is strictly positive. This evaluates the success probability of the source's explicitly constructed state.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intakethird100_P47
Formal statement
namespace QAlgorithms.Papers.Independent.Intakethird100.P47

open scoped ComplexConjugate

open scoped BigOperators

/-- II A, PDF p.3: all equalities in the displayed Hardy success formula following (4).
Strict alpha bounds in HardyParameters exclude the zero denominator. -/
theorem hardy_success_probability (d : HardyParameters) :
    let q := hardyBehavior d (pureDensity (psiH d)) false false false false
    q = ‖inner ℂ (psiH d) (hardyPhi d 3)‖ ^ 2 ∧
    q = 1 - ∑ i : Fin 3, ‖inner ℂ (hardyGS d (Fin.castSucc i)) (hardyPhi d 3)‖ ^ 2 ∧
    q = (‖d.alpha false * d.alpha true‖ ^ 2 * ‖d.beta false * d.beta true‖ ^ 2) /
      (1 - ‖d.alpha false * d.alpha true‖ ^ 2) ∧
    0 < 1 - ‖d.alpha false * d.alpha true‖ ^ 2 := by sorry

end QAlgorithms.Papers.Independent.Intakethird100.P47
Source
Device-independent quantum key distribution based on measurement inputs, arXiv:1308.6447v3, PDF p. 3, II A: Hardy success probability
Read-back

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

For every parameter record ddd consisting of complex functions α,β\alpha,\betaα,β on the Booleans with ∣αP∣2+∣βP∣2=1|\alpha_P|^2+|\beta_P|^2=1∣αP​∣2+∣βP​∣2=1 and 0<∣αP∣<10<|\alpha_P|<10<∣αP​∣<1 for each Boolean PPP, write false as 000 and true as 111, let e0,e1e_0,e_1e0​,e1​ be the standard basis of C2\mathbb C^2C2, and set aP=αPe0+βPe1a_P=\alpha_Pe_0+\beta_Pe_1aP​=αP​e0​+βP​e1​, bP=βP‾e0−αP‾e1b_P=\overline{\beta_P}e_0-\overline{\alpha_P}e_1bP​=βP​​e0​−αP​​e1​. Define ϕ0=b0⊗b1\phi_0=b_0\otimes b_1ϕ0​=b0​⊗b1​, ϕ1=e0⊗a1\phi_1=e_0\otimes a_1ϕ1​=e0​⊗a1​, ϕ2=a0⊗e0\phi_2=a_0\otimes e_0ϕ2​=a0​⊗e0​, and ϕ3=e0⊗e0\phi_3=e_0\otimes e_0ϕ3​=e0​⊗e0​, where tensor coordinates are products of the corresponding coordinates. Set v0=ϕ0v_0=\phi_0v0​=ϕ0​ and, for r=1,2,3r=1,2,3r=1,2,3, set

vr=(1−∑s<r∣⟨vs,ϕr⟩∣2)−1(ϕr−∑s<r⟨vs,ϕr⟩vs),ψ=v3.v_r= \left(\sqrt{1-\sum_{s<r}|\langle v_s,\phi_r\rangle|^2}\right)^{-1} \left(\phi_r-\sum_{s<r}\langle v_s,\phi_r\rangle v_s\right), \qquad \psi=v_3.vr​=​1−s<r∑​∣⟨vs​,ϕr​⟩∣2​​−1(ϕr​−s<r∑​⟨vs​,ϕr​⟩vs​),ψ=v3​.

For any vector uuu, let Ru(x,y)=u(x)u(y)‾R_u(x,y)=u(x)\overline{u(y)}Ru​(x,y)=u(x)u(y)​, and define q=Re⁡tr⁡(Rϕ3Rψ)q=\operatorname{Re}\operatorname{tr}(R_{\phi_3}R_\psi)q=Retr(Rϕ3​​Rψ​). Then all three equalities and the strict inequality below hold:

q=∣⟨ψ,ϕ3⟩∣2,q=1−∑i=02∣⟨vi,ϕ3⟩∣2,q=∣α0α1∣2 ∣β0β1∣21−∣α0α1∣2,0<1−∣α0α1∣2.q=|\langle\psi,\phi_3\rangle|^2,\qquad q=1-\sum_{i=0}^{2}|\langle v_i,\phi_3\rangle|^2,\qquad q=\frac{|\alpha_0\alpha_1|^2\,|\beta_0\beta_1|^2} {1-|\alpha_0\alpha_1|^2},\qquad 0<1-|\alpha_0\alpha_1|^2.q=∣⟨ψ,ϕ3​⟩∣2,q=1−i=0∑2​∣⟨vi​,ϕ3​⟩∣2,q=1−∣α0​α1​∣2∣α0​α1​∣2∣β0​β1​∣2​,0<1−∣α0​α1​∣2.
Human review
  • Endorsed by Shuze Chen · Nov 1, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Nov 1, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me