Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

C.1: closure implies distinguishing contractivity

Open
QAlgorithms.Papers.Independent.Bridge50.P44.distinguishing_contractivity

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

prove2quantum

Let a nonempty class of abstract binary-output tests act on compatible resources, and let D(R)D(R)D(R) denote each test's actual binary execution law. Define the signed distinguishing advantage

d(R,S)=sup⁡D(Pr⁡[D(R)=1]−Pr⁡[D(S)=1]).d(R,S)=\sup_D\bigl(\Pr[D(R)=1]-\Pr[D(S)=1]\bigr).d(R,S)=Dsup​(Pr[D(R)=1]−Pr[D(S)=1]).

If the class is closed under precomposition with every converter α\alphaα and with every parallel resource context TTT, preserving those execution laws on every input resource, then

d(αR,αS)≤d(R,S),d(R∥T,S∥T)≤d(R,S).d(\alpha R,\alpha S)\le d(R,S),\qquad d(R\parallel T,S\parallel T)\le d(R,S).d(αR,αS)≤d(R,S),d(R∥T,S∥T)≤d(R,S).

The supremum is bounded because the execution laws are probability laws. This abstract closure theorem neither assumes optimal-test attainment nor infers symmetry of an arbitrary restricted test class.

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 pp.45--46, Appendix C.1: closure under precomposition gives both
converter and parallel-context contractivity for the signed supremum. No
symmetry or complement closure of a restricted distinguisher class is inferred. -/
theorem distinguishing_contractivity {R D C : Type} [Nonempty D]
    (run : D → R → PMF Bool) (attach : C → R → R) (parallel : R → R → R)
    (hattach : ∀ c, ClosedTests run (attach c))
    (hparallel : ∀ t, ClosedTests run (fun r => parallel r t)) (r s : R) :
    (∀ c, distinguishingAdvantage run (attach c r) (attach c s) ≤ distinguishingAdvantage run r s) ∧
    (∀ t, distinguishingAdvantage run (parallel r t) (parallel s t) ≤ distinguishingAdvantage run r s) := by sorry

end QAlgorithms.Papers.Independent.Bridge50.P44

end
Source
Cryptographic security of quantum key distribution, arXiv:1409.3525v1, PDF p. 46, C.1: closure implies distinguishing contractivity
Read-back

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

Let R,D,CR,D,CR,D,C be types, with DDD nonempty. Let run⁡(d,r)\operatorname{run}(d,r)run(d,r) be a probability mass function on Boolean outcomes for every test d∈Dd\in Dd∈D and resource r∈Rr\in Rr∈R, let attach⁡:C×R→R\operatorname{attach}:C\times R\to Rattach:C×R→R, and let parallel⁡:R×R→R\operatorname{parallel}:R\times R\to Rparallel:R×R→R. Assume that for every c∈Cc\in Cc∈C and d∈Dd\in Dd∈D there is a test d′∈Dd'\in Dd′∈D such that run⁡(d′,x)=run⁡(d,attach⁡(c,x))\operatorname{run}(d',x)=\operatorname{run}(d,\operatorname{attach}(c,x))run(d′,x)=run(d,attach(c,x)) for every x∈Rx\in Rx∈R, and that for every t∈Rt\in Rt∈R and d∈Dd\in Dd∈D there is a test d′∈Dd'\in Dd′∈D such that run⁡(d′,x)=run⁡(d,parallel⁡(x,t))\operatorname{run}(d',x)=\operatorname{run}(d,\operatorname{parallel}(x,t))run(d′,x)=run(d,parallel(x,t)) for every x∈Rx\in Rx∈R. Define

Δ(x,y)=sup⁡d∈D(Pr⁡[run⁡(d,x)=true]−Pr⁡[run⁡(d,y)=true]).\Delta(x,y)=\sup_{d\in D} \bigl(\Pr[\operatorname{run}(d,x)=\mathrm{true}] -\Pr[\operatorname{run}(d,y)=\mathrm{true}]\bigr).Δ(x,y)=d∈Dsup​(Pr[run(d,x)=true]−Pr[run(d,y)=true]).

For every r,s∈Rr,s\in Rr,s∈R, one has Δ(attach⁡(c,r),attach⁡(c,s))≤Δ(r,s)\Delta(\operatorname{attach}(c,r),\operatorname{attach}(c,s))\le\Delta(r,s)Δ(attach(c,r),attach(c,s))≤Δ(r,s) for every c∈Cc\in Cc∈C, and Δ(parallel⁡(r,t),parallel⁡(s,t))≤Δ(r,s)\Delta(\operatorname{parallel}(r,t),\operatorname{parallel}(s,t))\le\Delta(r,s)Δ(parallel(r,t),parallel(s,t))≤Δ(r,s) for every t∈Rt\in Rt∈R. The supremum uses the signed probability difference displayed above. The type CCC may be empty, in which case its universally quantified conclusion is vacuous.

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