Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

A.2: classical discrimination identity

Open
QAlgorithms.Papers.Independent.Bridge50.P44.classical_discrimination

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

prove2quantum

Let P,QP,QP,Q be normalized discrete laws on one alphabet. A single sample is drawn from one of them, with prior probability 1/21/21/2 each. Optimizing over all decision rules, including randomized rules, gives

pdistinguish(P,Q)=12+12D(P,Q).p_{\mathrm{distinguish}}(P,Q)=\tfrac12+\tfrac12D(P,Q).pdistinguish​(P,Q)=21​+21​D(P,Q).

The optimum is attained. All sums are absolutely convergent. This is a one-sample, equal-prior operational interpretation of total variation.

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.38--39, Appendix A.2: optimal classical one-sample discrimination,
with equal priors and unrestricted randomized rules. A rule attains the optimum. -/
theorem classical_discrimination {Z : Type*} (p q : Z → ℝ)
    (hp : IsDiscreteLaw p) (hq : IsDiscreteLaw q) :
    optimalBinaryTestSuccess p q = 1 / 2 + (1 / 2 : ℝ) * discreteTV p q ∧
    ∃ g, binaryTestSuccess p q g = optimalBinaryTestSuccess p q := by sorry

end QAlgorithms.Papers.Independent.Bridge50.P44

end
Source
Cryptographic security of quantum key distribution, arXiv:1409.3525v1, PDF p. 39, A.2: classical discrimination identity
Read-back

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

For every arbitrary index type ZZZ and nonnegative summable functions p,q:Z→Rp,q:Z\to\mathbb Rp,q:Z→R, each with sum 111, define S(g)=12∑z∈Z(p(z)g(z)+q(z)(1−g(z)))S(g)=\frac12\sum_{z\in Z}\bigl(p(z)g(z)+q(z)(1-g(z))\bigr)S(g)=21​∑z∈Z​(p(z)g(z)+q(z)(1−g(z))) for every function g:Z→[0,1]g:Z\to[0,1]g:Z→[0,1], and define Sopt=sup⁡gS(g)S_{\mathrm{opt}}=\sup_gS(g)Sopt​=supg​S(g) in R\mathbb RR. Then Sopt=12+12(12∑z∣p(z)−q(z)∣)S_{\mathrm{opt}}=\frac12+\frac12\bigl(\frac12\sum_z|p(z)-q(z)|\bigr)Sopt​=21​+21​(21​∑z​∣p(z)−q(z)∣), and there exists a function g:Z→[0,1]g:Z\to[0,1]g:Z→[0,1] with S(g)=SoptS(g)=S_{\mathrm{opt}}S(g)=Sopt​. No finiteness or countability assumption is imposed on ZZZ; empty ZZZ cannot satisfy the normalization hypotheses.

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