All proofs
Project-declaredLean 4.32.0 · mathlib@81a5d257

Prob Event bind le prob Event convex

probEvent_bind_le_probEvent_convex

Plain-language statement

Convex prefix-event split for a bind. The off-prefix tail bound ε is charged only on the mass outside p, giving Pr[p] + (1 - Pr[p]) * ε.

Exact Lean statement

lemma probEvent_bind_le_probEvent_convex [MonadLiftT m SPMF] [LawfulMonadLiftT m SPMF]
    [MonadLiftT m SetM] [EvalDistCompatible m]
    {mx : m α} {my : α → m β} {q : β → Prop} {p : α → Prop} {ε : ENNReal}
    (h : ∀ x ∈ support mx, ¬ p x → Pr[ q | my x] ≤ ε) :
    Pr[ q | mx >>= my] ≤ Pr[ p | mx] + (1 - Pr[ p | mx]) * ε

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
lemma probEvent_bind_le_probEvent_convex [MonadLiftT m SPMF] [LawfulMonadLiftT m SPMF]    [MonadLiftT m SetM] [EvalDistCompatible m]    {mx : m α} {my : α  m β} {q : β  Prop} {p : α  Prop} {ε : ENNReal}    (h :  x  support mx, ¬ p x  Pr[ q | my x]  ε) :    Pr[ q | mx >>= my]  Pr[ p | mx] + (1 - Pr[ p | mx]) * ε := by  classical  have hsplit : Pr[ q | mx >>= my]  Pr[ p | mx] + Pr[ fun x  ¬ p x | mx] * ε := by    rw [probEvent_bind_eq_tsum, probEvent_eq_tsum_indicator (p := p),      probEvent_eq_tsum_indicator (p := fun x  ¬ p x)]    calc ∑' x, Pr[= x | mx] * Pr[ q | my x]         ∑' x, ({x | p x}.indicator (Pr[= · | mx]) x            + {x | ¬ p x}.indicator (fun x  Pr[= x | mx] * ε) x) := by          refine ENNReal.tsum_le_tsum fun x  ?_          by_cases hp : p x          · refine le_trans (mul_le_mul' le_rfl probEvent_le_one) ?_            simp [hp]          · by_cases hx : x  support mx            · refine le_trans (mul_le_mul' le_rfl (h x hx hp)) ?_              simp [hp]            · simp [probOutput_eq_zero_of_not_mem_support hx]      _ = (∑' x, {x | p x}.indicator (Pr[= · | mx]) x)            + ∑' x, {x | ¬ p x}.indicator (fun x  Pr[= x | mx] * ε) x :=          ENNReal.tsum_add      _ = (∑' x, {x | p x}.indicator (Pr[= · | mx]) x)            + (∑' x, {x | ¬ p x}.indicator (Pr[= · | mx]) x) * ε := by          rw [ ENNReal.tsum_mul_right]          refine congrArg _ (tsum_congr fun x  ?_)          by_cases hp : p x <;> simp [Set.indicator, hp]  have hle_one : Pr[ p | mx] + Pr[ fun x  ¬ p x | mx]  1 := by    rw [probEvent_eq_tsum_indicator (p := p), probEvent_eq_tsum_indicator (p := fun x  ¬ p x),       ENNReal.tsum_add]    refine le_trans (ENNReal.tsum_le_tsum fun x  ?_) (tsum_probOutput_le_one (mx := mx))    by_cases hp : p x <;> simp [Set.indicator, hp]  refine le_trans hsplit (add_le_add le_rfl (mul_le_mul' ?_ le_rfl))  exact ENNReal.le_sub_of_add_le_left probEvent_ne_top hle_one
Project
VCVio
License
Apache-2.0
Commit
2ceb2d825ee3
Source
VCVio/EvalDist/Monad/Basic.lean:345-379

Reuse this declaration

Bring the exact result into your workflow

The import identifies the source module. Your project still needs the pinned package dependency shown on this page.

What this badge means

This completion status comes from the project or community source. It has not yet been represented here as an independent rebuild and axiom audit.

Continue in this project

Related declarations

Project-declaredLean 4.32.0

Expected Cost Nat eq sum tail probs of pathwise Cost At Most

AddWriterT.expectedCostNat_eq_sum_tail_probs_of_pathwiseCostAtMost

Plain-language statement

Finite tail-sum formula for natural-valued writer cost under a pathwise upper bound. If every execution path of oa incurs cost at most n, then the tail probabilities vanish above n, so the infinite tail sum truncates to Finset.range n.

program verificationseparation logiccryptography

Source project: VCVio

Person-level attribution pending.

View proof record
Project-declaredLean 4.32.0

IND CPA advantage to Real le sum step signed Advantage Real abs

AsymmEncAlg.IND_CPA_advantage_toReal_le_sum_step_signedAdvantageReal_abs

Plain-language statement

Planned generic one-time-to-many-time lift: bounded multi-query IND-CPA advantage is at most the sum of the extracted one-time signed advantages over the first q fresh LR queries.

program verificationseparation logiccryptography

Source project: VCVio

Person-level attribution pending.

View proof record