Sum prob Event option map eq some le is Some
sum_probEvent_option_map_eq_some_le_isSome
Plain-language statement
Selector fibers inside an optional output are disjoint, so their finite sum is bounded by the probability of returning any some value.
Exact Lean statement
lemma sum_probEvent_option_map_eq_some_le_isSome
[Fintype γ] (select : α → Option γ) :
∑ k : γ, Pr[fun r => r.map select = some (some k) | mx] ≤
Pr[fun r => r.isSome | mx]Formal artifact
Lean source
lemma sum_probEvent_option_map_eq_some_le_isSome [Fintype γ] (select : α → Option γ) : ∑ k : γ, Pr[fun r => r.map select = some (some k) | mx] ≤ Pr[fun r => r.isSome | mx] := by classical calc ∑ k : γ, Pr[fun r => r.map select = some (some k) | mx] ≤ ∑' x : α, Pr[= some x | mx] := by simp_rw [probEvent_eq_tsum_ite] have hsplit : ∀ k : γ, (∑' r : Option α, if r.map select = some (some k) then Pr[= r | mx] else 0) = ∑' x : α, if select x = some k then Pr[= some x | mx] else 0 := by intro k simpa only [Option.map, reduceCtorEq, ite_false, zero_add, Option.some.injEq] using tsum_option (fun r : Option α => if r.map select = some (some k) then Pr[= r | mx] else 0) ENNReal.summable simp_rw [hsplit] rw [← tsum_fintype (L := .unconditional _), ENNReal.tsum_comm] refine ENNReal.tsum_le_tsum fun x => ?_ rw [tsum_fintype (L := .unconditional _)] rcases hselect : select x with _ | k₀ · simp · rw [Finset.sum_eq_single k₀ (by intro k _ hne; simp [Ne.symm hne]) (by simp)] simp _ = Pr[fun r => r.isSome | mx] := (probEvent_isSome_eq_tsum_probOutput_some mx).symm- Project
- VCVio
- License
- Apache-2.0
- Commit
- 2ceb2d825ee3
- Source
- VCVio/EvalDist/Option.lean:56-83
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
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.
Source project: VCVio
Person-level attribution pending.
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.
Source project: VCVio
Person-level attribution pending.
IND CPA LR hybrid Game q eval Dist eq left of Makes At Most Queries
AsymmEncAlg.IND_CPA_LR_hybridGame_q_evalDist_eq_left_of_MakesAtMostQueries
Plain-language statement
If an adversary makes at most q fresh LR queries, then the leftUntil = q LR-hybrid is the all-left endpoint game.
Source project: VCVio
Person-level attribution pending.