Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

C.2.1: generic sequential composition

Open
QAlgorithms.Papers.Independent.Bridge50.P44.sequential_composition

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

prove2quantum

In an abstract three-interface AC resource model satisfying the converter wiring laws and the nonnegative contractive pseudometric axioms, let R♯,S⋄,T□R^\sharp,S^\diamond,T^\squareR♯,S⋄,T□ be filtered resources. Suppose honest protocols π\piπ and π′\pi'π′ construct S⋄S^\diamondS⋄ from R♯R^\sharpR♯ within ε≥0\varepsilon\ge0ε≥0, and T□T^\squareT□ from that same S⋄S^\diamondS⋄ within ε′≥0\varepsilon'\ge0ε′≥0, in both clauses of Definition 2.1. Then

R♯→π′π, ε+ε′T□.R^\sharp\xrightarrow{\pi'\pi,\,\varepsilon+\varepsilon'}T^\square.R♯π′π,ε+ε′​T□.

The conclusion includes honest availability and existence of one simulator for the adversarial resource comparison. There is no restriction ε+ε′≤1\varepsilon+\varepsilon'\le1ε+ε′≤1. This is the generic AC composition result attributed to [MR11, Mau12], without specializing the abstract resources to an unimplemented QKD model.

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.46, Appendix C.2.1: generic sequential AC composition. Both honest
availability and adversarial simulation are retained, with the same intermediate
resource and filter. Errors are nonnegative and need not sum to at most one. -/
theorem sequential_composition (M : ACModel) (p q : M.Converter × M.Converter)
    (r s t : Filtered M) (epsilon eta : ℝ) (hepsilon : 0 ≤ epsilon) (heta : 0 ≤ eta)
    (hp : Constructs M p r s epsilon) (hq : Constructs M q s t eta) :
    Constructs M (serialProtocol M q p) r t (epsilon + eta) := by sorry

end QAlgorithms.Papers.Independent.Bridge50.P44

end
Source
Cryptographic security of quantum key distribution, arXiv:1409.3525v1, PDF p. 46, C.2.1: generic sequential 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, operations R∥SR\parallel SR∥S, ser⁡(a,b)\operatorname{ser}(a,b)ser(a,b), a⊗ba\otimes ba⊗b, an identity converter, attachment operations Ai(a,R)A_i(a,R)Ai​(a,R) for the three interfaces Alice, Bob, and Eve, and a real-valued distance DDD. Assume all the model axioms: 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)); attaching the identity leaves a resource fixed; attachments at distinct interfaces commute; 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 does not increase under a common attachment or under adjoining a common resource on either side of ∥\parallel∥. For a converter pair v=(vA,vB)v=(v_A,v_B)v=(vA​,vB​), put 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)). 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​), and t=(Rt,ft)t=(R_t,f_t)t=(Rt​,ft​) be resources equipped with Eve-filter converters, and let ϵ,η≥0\epsilon,\eta\ge0ϵ,η≥0. Suppose

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(fs,Rs)),AE(ft,Rt))≤η,∃b, D(Hq(Rs),AE(b,Rt))≤η.D(H_q(A_E(f_s,R_s)),A_E(f_t,R_t))\le\eta, \qquad \exists b,\ D(H_q(R_s),A_E(b,R_t))\le\eta.D(Hq​(AE​(fs​,Rs​)),AE​(ft​,Rt​))≤η,∃b, D(Hq​(Rs​),AE​(b,Rt​))≤η.

For v=(ser⁡(qA,pA),ser⁡(qB,pB))v=(\operatorname{ser}(q_A,p_A),\operatorname{ser}(q_B,p_B))v=(ser(qA​,pA​),ser(qB​,pB​)), the conclusion is

D(Hv(AE(fr,Rr)),AE(ft,Rt))≤ϵ+η,∃c, D(Hv(Rr),AE(c,Rt))≤ϵ+η.D(H_v(A_E(f_r,R_r)),A_E(f_t,R_t))\le\epsilon+\eta, \qquad \exists c,\ D(H_v(R_r),A_E(c,R_t))\le\epsilon+\eta.D(Hv​(AE​(fr​,Rr​)),AE​(ft​,Rt​))≤ϵ+η,∃c, D(Hv​(Rr​),AE​(c,Rt​))≤ϵ+η.

Zero error bounds are included.

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