Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 2: conditional misclassification identity

Proved
QAlgorithms.Papers.Independent.Advance50.P50.lemma2

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

prove2quantum

Let μ0,μ1\mu_0,\mu_1μ0​,μ1​ be the conditional probability laws of a measurable exact model output XXX in the two classes, sampled with equal prior probabilities. Suppose X=cX=cX=c almost surely in class 1 and X∈[b1,b2]X\in[b_1,b_2]X∈[b1​,b2​] almost surely in class 0. Set p=μ0{X=c}p=\mu_0\{X=c\}p=μ0​{X=c}. Then

Pr⁡(0∣X=c)=p1+p.\Pr(0\mid X=c)=\frac{p}{1+p}.Pr(0∣X=c)=1+pp​.

The posterior is defined by the actual atom probabilities under the equal-prior mixture. Its conditioning event has mixture probability at least 1/21/21/2, so no conditional density or null-event convention is used.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Advance50_P50
Formal statement
noncomputable section

namespace QAlgorithms.Papers.Independent.Advance50.P50

open MeasureTheory ProbabilityTheory

open scoped ComplexConjugate ENNReal

-- Exact accepted primitives; no paper-local redeclarations.

open QAlgorithms.Papers.Independent.Information100.P63 (Mat tensorPower)

open QAlgorithms.Papers.Independent.Gap48.P20 (Copies)

open QAlgorithms.Papers.Independent.Gap48.P38 (subsystemReduction)

open QAlgorithms.Papers.Independent.Information100.P32 (purity)

open QAlgorithms.Papers.Independent.Information100.P08 (IsPure)

-- Matrices carry the associative commutator bracket X*Y-Y*X.

attribute [local instance 100] LieRing.ofAssociativeRing

/-- PDF pp.26–27, Lemma 2, Eq.(E2): the omitted short-statement premise
that every class-1 output is c is retained from Eq.(E1). -/
theorem lemma2 {Omega : Type*} [MeasurableSpace Omega]
    (mu0 mu1 : Measure Omega) [IsProbabilityMeasure mu0] [IsProbabilityMeasure mu1]
    (X : Omega → ℝ) (hX : Measurable X) (c b1 b2 : ℝ)
    (hclass1 : ∀ᵐ w ∂mu1, X w = c)
    (hclass0 : ∀ᵐ w ∂mu0, X w ∈ Set.Icc b1 b2) :
    posteriorAt mu0 mu1 X c =
      (mu0 {w | X w = c}).toReal / (1 + (mu0 {w | X w = c}).toReal) := by sorry

end QAlgorithms.Papers.Independent.Advance50.P50

end
Source
Group-Invariant Quantum Machine Learning, arXiv:2205.02261v2, PDF p. 26, Lemma 2: conditional misclassification identity
Read-back

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

For every measurable space Ω\OmegaΩ, probability measures μ0,μ1\mu_0,\mu_1μ0​,μ1​, measurable function X:Ω→RX:\Omega\to\mathbb RX:Ω→R, and real numbers c,b1,b2c,b_1,b_2c,b1​,b2​, assume that X=cX=cX=c almost everywhere under μ1\mu_1μ1​ and that b1≤X≤b2b_1\le X\le b_2b1​≤X≤b2​ almost everywhere under μ0\mu_0μ0​. Then, putting a=μ0{w:X(w)=c}a=\mu_0\{w:X(w)=c\}a=μ0​{w:X(w)=c}, regarded as a real number, the defined ratio satisfies

μ0{X=c}μ0{X=c}+μ1{X=c}=a1+a.\frac{\mu_0\{X=c\}}{\mu_0\{X=c\}+\mu_1\{X=c\}} =\frac{a}{1+a}.μ0​{X=c}+μ1​{X=c}μ0​{X=c}​=1+aa​.

All masses in this formula are real conversions of measure values; they are finite because both measures are probabilities. The case a=0a=0a=0 is included. No separate assumption b1≤b2b_1\le b_2b1​≤b2​ is made; if b1>b2b_1>b_2b1​>b2​, the almost-everywhere interval hypothesis cannot hold for a probability measure.

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