Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Exact honest correctness of Q-ID on the ideal channel

Open
QAlgorithms.Papers.Independent.Intakenext100.P14.qid_honest_correctness

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

prove2quantum

Fix the Q-ID parameters: a public injective binary basis code ccc of length nnn on mmm passwords, with minimum distance at least ddd, and finite nonempty strongly universal-2 hash families F,GF,GF,G with ℓ\ellℓ-bit outputs. Let both honest parties use the same password www. The user independently samples uniform x,θx,\thetax,θ, sends ∣x⟩θ|x\rangle_\theta∣x⟩θ​, and reveals independently sampled fff. The server measures in c(w)c(w)c(w), obtaining x′x'x′, and returns independently sampled ggg. Let Iw={i:θi=c(w)i}I_w=\{i:\theta_i=c(w)_i\}Iw​={i:θi​=c(w)i​} and let restriction pack the selected bits in increasing order, followed by zero padding. The server tests equality of f(x∣Iw)⊕g(w)f(x|_{I_w})\oplus g(w)f(x∣Iw​​)⊕g(w) and f(x′∣Iw)⊕g(w)f(x'|_{I_w})\oplus g(w)f(x′∣Iw​​)⊕g(w). On the ideal channel,

Pr⁡[server accepts]=1.\Pr[\text{server accepts}]=1.Pr[server accepts]=1.

The probability is computed from the actual BB84 Born rule and the four independent uniform choices. This exact acceptance property on the ideal channel implies Definition 3.1.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intakenext100_P14
Formal statement
noncomputable section

namespace QAlgorithms.Papers.Independent.Intakenext100.P14

open scoped Matrix ComplexConjugate

open QAlgorithms.Papers.Independent.Dependency50.P47 (Law)

open QAlgorithms.Papers.Independent.Gap48.P11 (blockMatrix cqDistance)

open QAlgorithms.Papers.Independent.Claimed50.P31 (bb84Vector)

open QAlgorithms.Papers.Independent.Advance50.P05 (RectangularInstrument)

attribute [local instance] Classical.propDecidable

attribute [local instance] Classical.decEq

/-- Positive list length and inhabited fibers supply the tagged union's inhabitant.
This derived instance adds no hypothesis to Lemma 2.2. -/
local instance {m : ℕ} [NeZero m] {A : Fin m → Type*}
    [∀ i, Nonempty (A i)] : Nonempty (Sigma A) :=
  ⟨⟨0, Classical.choice (inferInstance : Nonempty (A 0))⟩⟩

/-- PDF p.10 (Definition 3.1 on p.8): Q-ID accepts honest equal passwords
with probability exactly one on the ideal channel. -/
theorem qid_honest_correctness
    {n ell m d : ℕ} {F G : Type*} [Fintype F] [Nonempty F]
    [Fintype G] [Nonempty G] (P : QIDParameters n ell m d F G) (w : Fin m) :
    honestAcceptance P w = 1 := by sorry

end QAlgorithms.Papers.Independent.Intakenext100.P14

end
Source
Secure Identification and QKD in the Bounded-Quantum-Storage Model, arXiv:0708.2557v3, PDF p. 10, §3.3, unnumbered honest Q-ID correctness
Read-back

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

For all natural numbers n,ℓ,m,dn,\ell,m,dn,ℓ,m,d, finite nonempty key types F,GF,GF,G, and parameter records PPP, assume that PPP consists of an injective code C:{0,…,m−1}→BnC:\{0,\ldots,m-1\}\to\mathcal B_nC:{0,…,m−1}→Bn​ with distinct codewords at Hamming distance at least ddd, and hash families HF:F→Bn→BℓH_F:F\to\mathcal B_n\to\mathcal B_\ellHF​:F→Bn​→Bℓ​, HG:G→{0,…,m−1}→BℓH_G:G\to\{0,\ldots,m-1\}\to\mathcal B_\ellHG​:G→{0,…,m−1}→Bℓ​, each having fraction 2−2ℓ2^{-2\ell}2−2ℓ of keys for every prescribed output pair on distinct inputs. For every w<mw<mw<m, form Rx,θ,wR_{x,\theta,w}Rx,θ,w​ by packing the xix_ixi​ with θi=C(w)i\theta_i=C(w)_iθi​=C(w)i​ in increasing order and padding with false, and put Tw(x,θ,f,g)=HF(f,Rx,θ,w)⊕HG(g,w)T_w(x,\theta,f,g)=H_F(f,R_{x,\theta,w})\oplus H_G(g,w)Tw​(x,θ,f,g)=HF​(f,Rx,θ,w​)⊕HG​(g,w). With

ψx,θ(t)=∏i{(−1)tixi/2,θi=true,1ti=xi,θi=false,\psi_{x,\theta}(t)=\prod_i \begin{cases} (-1)^{t_ix_i}/\sqrt2,&\theta_i=\mathrm{true},\\ \mathbf1_{t_i=x_i},&\theta_i=\mathrm{false}, \end{cases}ψx,θ​(t)=i∏​{(−1)ti​xi​/2​,1ti​=xi​​,​θi​=true,θi​=false,​

the theorem asserts

122n∣F∣∣G∣∑x,θ∈Bn∑f∈F∑g∈G∑y∈Bn∣∑t∈Bnψy,C(w)(t)‾ψx,θ(t)∣21Tw(x,θ,f,g)=Tw(y,θ,f,g)=1.\frac1{2^{2n}|F||G|} \sum_{x,\theta\in\mathcal B_n}\sum_{f\in F}\sum_{g\in G}\sum_{y\in\mathcal B_n} \left|\sum_{t\in\mathcal B_n}\overline{\psi_{y,C(w)}(t)}\psi_{x,\theta}(t)\right|^2 \mathbf1_{T_w(x,\theta,f,g)=T_w(y,\theta,f,g)} =1.22n∣F∣∣G∣1​x,θ∈Bn​∑​f∈F∑​g∈G∑​y∈Bn​∑​​t∈Bn​∑​ψy,C(w)​(t)​ψx,θ​(t)​21Tw​(x,θ,f,g)=Tw​(y,θ,f,g)​=1.

The key types are explicitly nonempty. No positivity assumptions on the natural parameters are imposed; the conclusion includes zero string and tag lengths whenever such a record and www exist, while m=0m=0m=0 supplies no www and hence no instance of the conclusion.

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