Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 10: conditional-mean upper tail from joint-tail bounds

Open
QAlgorithms.Papers.Independent.Intake100.P61.conditionalMean_upper_tail

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

prove2quantum

Let (X,Y)(X,Y)(X,Y) have a measurable nonnegative probability density ppp on [0,∞)2[0,\infty)^2[0,∞)2. Define m(x)=∫0∞y p(y∣x) dym(x)=\int_0^\infty y\,p(y\mid x)\,dym(x)=∫0∞​yp(y∣x)dy as an extended nonnegative integral from this same joint law, choosing zero on null marginal fibers. Let a,b≥0a,b\ge0a,b≥0, δ>0\delta>0δ>0, and let (bk)k≥0(b_k)_{k\ge0}(bk​)k≥0​ be nonnegative, nondecreasing, with b0=bb_0=bb0​=b and bk→∞b_k\to\inftybk​→∞. Suppose Pr⁡[X≤a,Y≥bk]≤η(bk)\Pr[X\le a,Y\ge b_k]\le\eta(b_k)Pr[X≤a,Y≥bk​]≤η(bk​) for every k≥0k\ge0k≥0, where η\etaη is nonnegative and may take value +∞+\infty+∞. Then

Pr⁡[X≤a, m(X)≥b+δ]≤1δ∑k=0∞bk+1η(bk).\Pr[X\le a,\ m(X)\ge b+\delta]\le\frac1\delta\sum_{k=0}^{\infty}b_{k+1}\eta(b_k).Pr[X≤a, m(X)≥b+δ]≤δ1​k=0∑∞​bk+1​η(bk​).

The series is interpreted in the extended nonnegative reals, preserving infinite conditional means. Source correction: the printed sum starts at one despite b0=bb_0=bb0​=b; starting at zero includes the missing first interval. Independent moderation remains pending.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intake100_P61
Formal statement
noncomputable section

open MeasureTheory Filter

open scoped BigOperators ENNReal Topology

namespace QAlgorithms.Papers.Independent.Intake100.P61

attribute [local instance] Classical.propDecidable Classical.decEq

-- The frozen frequency formula specializes exactly to the source alphabet Fin (2 ^ d).

open QAlgorithms.Papers.Independent.Advance50.P30 (empiricalFrequency)

/-- PDF pp.22–23, Lemma 10 (E20–E27), corrected indexing: E22 prints k=1
with b_0=b and omits [b_0,b_1). The sum starts at k=0 as E23's partition requires.
See the source-discrepancy ledger. Integrals and the series are extended. -/
theorem conditionalMean_upper_tail
    (p : ℝ × ℝ → ℝ≥0∞) (hp : Measurable p) [IsProbabilityMeasure (quadrantLaw p)]
    (a b delta : ℝ) (ha : 0 ≤ a) (hb : 0 ≤ b) (hdelta : 0 < delta)
    (threshold : ℕ → ℝ) (hthreshold : ∀ k, 0 ≤ threshold k)
    (hmono : Monotone threshold) (hzero : threshold 0 = b)
    (hlim : Tendsto threshold atTop atTop) (eta : ℝ → ℝ≥0∞)
    (htail : ∀ k, quadrantLaw p {v | v.1 ≤ a ∧ threshold k ≤ v.2} ≤ eta (threshold k)) :
    quadrantLaw p {v | v.1 ≤ a ∧ ENNReal.ofReal (b + delta) ≤ densityConditionalMean p v.1} ≤
      (∑' k : ℕ, ENNReal.ofReal (threshold (k + 1)) * eta (threshold k)) /
        ENNReal.ofReal delta := by sorry

end QAlgorithms.Papers.Independent.Intake100.P61

end
Source
Composable security proof for continuous-variable quantum key distribution with coherent states, arXiv:1408.5689v3, PDF p. 23, Lemma 10, E20–E27
Read-back

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

Let p:R2→[0,∞]p:\mathbb R^2\to[0,\infty]p:R2→[0,∞] be measurable, and suppose the measure νp\nu_pνp​ with density ppp relative to the product of Lebesgue measures restricted to [0,∞)[0,\infty)[0,∞) is a probability measure. Define p1(x)=∫[0,∞)p(x,y) dyp_1(x)=\int_{[0,\infty)}p(x,y)\,dyp1​(x)=∫[0,∞)​p(x,y)dy, and define mp(x)=0m_p(x)=0mp​(x)=0 when p1(x)p_1(x)p1​(x) is zero or infinite, and otherwise mp(x)=∫[0,∞)y p(x,y)/p1(x) dym_p(x)=\int_{[0,\infty)}y\,p(x,y)/p_1(x)\,dymp​(x)=∫[0,∞)​yp(x,y)/p1​(x)dy. For any real a,b≥0a,b\ge0a,b≥0, any δ>0\delta>0δ>0, any nondecreasing sequence t:N→Rt:\mathbb N\to\mathbb Rt:N→R satisfying tk≥0t_k\ge0tk​≥0, t0=bt_0=bt0​=b, and tk→+∞t_k\to+\inftytk​→+∞, and any function η:R→[0,∞]\eta:\mathbb R\to[0,\infty]η:R→[0,∞], assume that for every k∈Nk\in\mathbb Nk∈N,

νp{(x,y):x≤a, tk≤y}≤η(tk).\nu_p\{(x,y):x\le a,\ t_k\le y\}\le\eta(t_k).νp​{(x,y):x≤a, tk​≤y}≤η(tk​).

Then

νp{(x,y):x≤a, b+δ≤mp(x)}≤∑k=0∞tk+1η(tk)δ.\nu_p\{(x,y):x\le a,\ b+\delta\le m_p(x)\} \le \frac{\displaystyle\sum_{k=0}^{\infty}t_{k+1}\eta(t_k)}{\delta}.νp​{(x,y):x≤a, b+δ≤mp​(x)}≤δk=0∑∞​tk+1​η(tk​)​.

The sum, products, division, and comparisons involving mpm_pmp​ are in the nonnegative extended reals; no finiteness assumption is made on η\etaη or the sum. The sequence may have repeated values, and aaa and bbb may be zero.

Human review
  • Endorsed by Shuze Chen · Oct 30, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 30, 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