Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

C.2.2: generic parallel composition

Open
QAlgorithms.Papers.Independent.Bridge50.P44.parallel_composition

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

prove2quantum

In an abstract three-interface AC model with the source's converter wiring and contractive pseudometric axioms, suppose honest protocols π,π′\pi,\pi'π,π′ construct S⋄,S′□S^\diamond,S'^\squareS⋄,S′□ from R♯,R′♭R^\sharp,R'^\flatR♯,R′♭ within nonnegative errors ε,ε′\varepsilon,\varepsilon'ε,ε′, respectively, in both clauses of Definition 2.1. Then

R♯∥R′♭→π∥π′, ε+ε′S⋄∥S′□.R^\sharp\parallel R'^\flat\xrightarrow{\pi\parallel\pi',\,\varepsilon+\varepsilon'}S^\diamond\parallel S'^\square.R♯∥R′♭π∥π′,ε+ε′​S⋄∥S′□.

The parallel filtered resource contains both honest filters, and the conclusion retains both availability and existence of a simulator. Resource distance permits joint attacks and distinguishers; independence is not imposed. This is the generic abstract parallel construction theorem.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Bridge50_P44
Formal statement
noncomputable section

open scoped BigOperators Matrix ComplexOrder

namespace QAlgorithms.Papers.Independent.Bridge50.P44

open QAlgorithms

open QAlgorithms.RealRegisters (Hilbert)

open QAlgorithms.Papers.Independent.Dependency50.P33 (State traceSize)

open QAlgorithms.Papers.Independent.Dependency50.P24 (cqState)

open QAlgorithms.Papers.Independent.Frontier18.P08 (partialTraceFirst)

open QAlgorithms.Papers.Independent.Information100.P76 (maximallyMixed)

open QAlgorithms.Papers.Independent.Frontier18.P08 (conditionalEntropyNats)

attribute [local instance] Classical.propDecidable

attribute [local instance] Classical.decEq

/-- PDF p.47, Appendix C.2.2: generic parallel AC composition. The resource
metric permits joint distinguishers; independence of attacks is not assumed. -/
theorem parallel_composition (M : ACModel) (p q : M.Converter × M.Converter)
    (r s rprime sprime : Filtered M) (epsilon eta : ℝ)
    (hepsilon : 0 ≤ epsilon) (heta : 0 ≤ eta)
    (hp : Constructs M p r s epsilon) (hq : Constructs M q rprime sprime eta) :
    Constructs M (parallelProtocol M p q) (parallelFiltered M r rprime)
      (parallelFiltered M s sprime) (epsilon + eta) := by sorry

end QAlgorithms.Papers.Independent.Bridge50.P44

end
Source
Cryptographic security of quantum key distribution, arXiv:1409.3525v1, PDF p. 47, C.2.2: generic parallel composition
Read-back

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

Let MMM consist of types of resources and converters, resource parallel composition R∥SR\parallel SR∥S, converter serial composition ser⁡(a,b)\operatorname{ser}(a,b)ser(a,b), converter tensor composition a⊗ba\otimes ba⊗b, an identity converter, attachment operations Ai(a,R)A_i(a,R)Ai​(a,R) for Alice, Bob, and Eve, and a real-valued distance DDD. Assume that serial attachment obeys Ai(ser⁡(a,b),R)=Ai(a,Ai(b,R))A_i(\operatorname{ser}(a,b),R)=A_i(a,A_i(b,R))Ai​(ser(a,b),R)=Ai​(a,Ai​(b,R)), identity attachment fixes every resource, attachments at distinct interfaces commute, tensor attachment distributes as Ai(a⊗b,R∥S)=Ai(a,R)∥Ai(b,S)A_i(a\otimes b,R\parallel S)=A_i(a,R)\parallel A_i(b,S)Ai​(a⊗b,R∥S)=Ai​(a,R)∥Ai​(b,S), and DDD is nonnegative, symmetric, zero on equal arguments, satisfies the triangle inequality, and is contractive under common attachments and under parallel composition with a common resource on either side. Write Hv(R)=AA(vA,AB(vB,R))H_v(R)=A_A(v_A,A_B(v_B,R))Hv​(R)=AA​(vA​,AB​(vB​,R)) for any converter pair v=(vA,vB)v=(v_A,v_B)v=(vA​,vB​). Let p,qp,qp,q be converter pairs, let r=(Rr,fr)r=(R_r,f_r)r=(Rr​,fr​), s=(Rs,fs)s=(R_s,f_s)s=(Rs​,fs​), r′=(Rr′,fr′)r'=(R_{r'},f_{r'})r′=(Rr′​,fr′​), and s′=(Rs′,fs′)s'=(R_{s'},f_{s'})s′=(Rs′​,fs′​) be filtered resources, and let ϵ,η≥0\epsilon,\eta\ge0ϵ,η≥0. Assume

D(Hp(AE(fr,Rr)),AE(fs,Rs))≤ϵ,∃a, D(Hp(Rr),AE(a,Rs))≤ϵ,D(H_p(A_E(f_r,R_r)),A_E(f_s,R_s))\le\epsilon, \qquad \exists a,\ D(H_p(R_r),A_E(a,R_s))\le\epsilon,D(Hp​(AE​(fr​,Rr​)),AE​(fs​,Rs​))≤ϵ,∃a, D(Hp​(Rr​),AE​(a,Rs​))≤ϵ,

and

D(Hq(AE(fr′,Rr′)),AE(fs′,Rs′))≤η,∃b, D(Hq(Rr′),AE(b,Rs′))≤η.D(H_q(A_E(f_{r'},R_{r'})),A_E(f_{s'},R_{s'}))\le\eta, \qquad \exists b,\ D(H_q(R_{r'}),A_E(b,R_{s'}))\le\eta.D(Hq​(AE​(fr′​,Rr′​)),AE​(fs′​,Rs′​))≤η,∃b, D(Hq​(Rr′​),AE​(b,Rs′​))≤η.

Then, for v=(pA⊗qA,pB⊗qB)v=(p_A\otimes q_A,p_B\otimes q_B)v=(pA​⊗qA​,pB​⊗qB​),

D ⁣(Hv(AE(fr⊗fr′,Rr∥Rr′)),AE(fs⊗fs′,Rs∥Rs′))≤ϵ+η,D\!\left(H_v(A_E(f_r\otimes f_{r'},R_r\parallel R_{r'})), A_E(f_s\otimes f_{s'},R_s\parallel R_{s'})\right)\le\epsilon+\eta,D(Hv​(AE​(fr​⊗fr′​,Rr​∥Rr′​)),AE​(fs​⊗fs′​,Rs​∥Rs′​))≤ϵ+η,

and there exists a converter ccc such that

D(Hv(Rr∥Rr′),AE(c,Rs∥Rs′))≤ϵ+η.D(H_v(R_r\parallel R_{r'}),A_E(c,R_s\parallel R_{s'})) \le\epsilon+\eta.D(Hv​(Rr​∥Rr′​),AE​(c,Rs​∥Rs′​))≤ϵ+η.

The statement includes either or both error bounds being zero.

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