All proofs
Project-declaredLean 4.32.0 · mathlib@81a5d257

Advantage le expected Query Slack plus prob Event bad

QueryImpl.Stateful.advantage_le_expectedQuerySlack_plus_probEvent_bad

Plain-language statement

State-dependent ε-perturbed identical-until-bad with output bad flag.

Exact Lean statement

theorem advantage_le_expectedQuerySlack_plus_probEvent_bad
    (h₀ h₁ : QueryImpl.Stateful unifSpec E (σ × Bool))
    (s_init : σ)
    (chargedQuery : E.Domain → Prop) [DecidablePred chargedQuery]
    (querySlack : σ → ℝ≥0∞)
    (h_step_tv_charged : ∀ (t : E.Domain), chargedQuery t → ∀ (s : σ),
      ENNReal.ofReal (tvDist ((h₀ t).run (s, false)) ((h₁ t).run (s, false))) ≤
        querySlack s)
    (h_step_eq_uncharged : ∀ (t : E.Domain), ¬ chargedQuery t → ∀ (p : σ × Bool),
      (h₀ t).run p = (h₁ t).run p)
    (h_mono₀ : ∀ (t : E.Domain) (p : σ × Bool), p.2 = true →
      ∀ z ∈ support ((h₀ t).run p), z.2.2 = true)
    (A : OracleComp E Bool) {queryBudget : ℕ}
    (h_bound : OracleComp.IsQueryBoundP A chargedQuery queryBudget) :
    ENNReal.ofReal (h₀.advantage (s_init, false) h₁ (s_init, false) A)
      ≤ expectedQuerySlack h₀ chargedQuery querySlack A queryBudget (s_init, false)
        + Pr[fun z : Bool × σ × Bool => z.2.2 = true |
            (simulateQ h₀ A).run (s_init, false)]

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
theorem advantage_le_expectedQuerySlack_plus_probEvent_bad    (h₀ h₁ : QueryImpl.Stateful unifSpec E (σ × Bool))    (s_init : σ)    (chargedQuery : E.Domain  Prop) [DecidablePred chargedQuery]    (querySlack : σ  0∞)    (h_step_tv_charged :  (t : E.Domain), chargedQuery t   (s : σ),      ENNReal.ofReal (tvDist ((h₀ t).run (s, false)) ((h₁ t).run (s, false)))         querySlack s)    (h_step_eq_uncharged :  (t : E.Domain), ¬ chargedQuery t   (p : σ × Bool),      (h₀ t).run p = (h₁ t).run p)    (h_mono₀ :  (t : E.Domain) (p : σ × Bool), p.2 = true        z  support ((h₀ t).run p), z.2.2 = true)    (A : OracleComp E Bool) {queryBudget : }    (h_bound : OracleComp.IsQueryBoundP A chargedQuery queryBudget) :    ENNReal.ofReal (h₀.advantage (s_init, false) h₁ (s_init, false) A)       expectedQuerySlack h₀ chargedQuery querySlack A queryBudget (s_init, false)        + Pr[fun z : Bool × σ × Bool => z.2.2 = true |            (simulateQ h₀ A).run (s_init, false)] := by  set sim₀ : ProbComp Bool := (simulateQ h₀ A).run' (s_init, false) with hsim₀_def  set sim₁ : ProbComp Bool := (simulateQ h₁ A).run' (s_init, false) with hsim₁_def  have hrun₀ : h₀.runProb (s_init, false) A = sim₀ := by    simp [runProb, run, hsim₀_def]  have hrun₁ : h₁.runProb (s_init, false) A = sim₁ := by    simp [runProb, run, hsim₁_def]  have h_adv_le_tv :      h₀.advantage (s_init, false) h₁ (s_init, false) A  tvDist sim₀ sim₁ := by    rw [QueryImpl.Stateful.advantage, ProbComp.boolDistAdvantage, hrun₀, hrun₁]    exact abs_probOutput_toReal_sub_le_tvDist sim₀ sim₁  have h_bridge :      ENNReal.ofReal (tvDist sim₀ sim₁)         expectedQuerySlack h₀ chargedQuery querySlack A queryBudget (s_init, false)          + Pr[fun z : Bool × σ × Bool => z.2.2 = true |              (simulateQ h₀ A).run (s_init, false)] := by    rw [hsim₀_def, hsim₁_def]    exact ofReal_tvDist_simulateQ_le_expectedQuerySlack_plus_probEvent_output_bad      h₀ h₁ chargedQuery querySlack h_step_tv_charged h_step_eq_uncharged        h_mono₀ A h_bound s_init  exact (ENNReal.ofReal_le_ofReal h_adv_le_tv).trans h_bridge
Project
VCVio
License
Apache-2.0
Commit
2ceb2d825ee3
Source
VCVio/StateSeparating/IdenticalUntilBad.lean:31-68

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