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.
Exact Lean statement
theorem IND_CPA_advantage_toReal_le_sum_step_signedAdvantageReal_abs
[Inhabited M] [Finite C] [Inhabited C]
(adversary : encAlg'.IND_CPA_adversary) (q : ℕ)
(hq : adversary.MakesAtMostQueries q) :
(IND_CPA_advantage (encAlg := encAlg') adversary).toReal ≤
Finset.sum (Finset.range q) (fun k =>
|IND_CPA_OneTime_signedAdvantageReal (encAlg := encAlg')
(IND_CPA_stepAdversary (encAlg' := encAlg') adversary k)|)Formal artifact
Lean source
theorem IND_CPA_advantage_toReal_le_sum_step_signedAdvantageReal_abs [Inhabited M] [Finite C] [Inhabited C] (adversary : encAlg'.IND_CPA_adversary) (q : ℕ) (hq : adversary.MakesAtMostQueries q) : (IND_CPA_advantage (encAlg := encAlg') adversary).toReal ≤ Finset.sum (Finset.range q) (fun k => |IND_CPA_OneTime_signedAdvantageReal (encAlg := encAlg') (IND_CPA_stepAdversary (encAlg' := encAlg') adversary k)|) := by let H : ℕ → ℝ := fun i ↦ (Pr[= true | encAlg'.IND_CPA_LR_hybridGame adversary i]).toReal have hleft : (Pr[= true | encAlg'.IND_CPA_LR_experiment adversary true]).toReal = H q := congrArg ENNReal.toReal (encAlg'.IND_CPA_LR_hybridGame_q_probOutput_eq_left_of_MakesAtMostQueries adversary q hq).symm have hright : (Pr[= true | encAlg'.IND_CPA_LR_experiment adversary false]).toReal = H 0 := congrArg ENNReal.toReal (encAlg'.IND_CPA_LR_hybridGame_zero_probOutput_eq_right adversary).symm have htri : |H q - H 0| ≤ Finset.sum (Finset.range q) (fun i ↦ |H (i + 1) - H i|) := by rw [← Finset.sum_range_sub H q] exact Finset.abs_sum_le_sum_abs _ _ have hsteps : ∀ i ∈ Finset.range q, |(H (i + 1) - H i) / 2| = |IND_CPA_OneTime_signedAdvantageReal (encAlg := encAlg') (IND_CPA_stepAdversary (encAlg' := encAlg') adversary i)| := fun i _ ↦ congrArg abs (IND_CPA_stepAdversary_signedAdvantageReal_eq_hybridDiff_half (encAlg' := encAlg') adversary i).symm refine le_trans (IND_CPA_advantage_toReal_le_abs_signedAdvantageReal (encAlg' := encAlg') adversary) ?_ rw [IND_CPA_signedAdvantageReal_eq_lrDiff_half (encAlg' := encAlg') adversary, hleft, hright, ← Finset.sum_congr rfl hsteps] simp only [abs_div, ← Finset.sum_div] gcongr- Project
- VCVio
- License
- Apache-2.0
- Commit
- 2ceb2d825ee3
- Source
- VCVio/CryptoFoundations/AsymmEncAlg/INDCPA/GenericLift.lean:382-409
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 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.
IND CPA run' eval Dist eq query Impl' of bounded eq
AsymmEncAlg.IND_CPA_run'_evalDist_eq_queryImpl'_of_bounded_eq
Plain-language statement
If a counted IND-CPA hybrid implementation agrees with the counted real implementation through the first q fresh LR queries, then any adversary making at most q LR queries sees the same output distribution as in the real IND-CPA game.
Source project: VCVio
Person-level attribution pending.