All proofs
Project-declaredLean 4.32.0 · mathlib@81a5d257

Simulate Q run preserves Inv

OracleComp.simulateQ_run_preservesInv

Plain-language statement

If impl preserves Inv, then simulating any oracle computation with simulateQ impl preserves Inv on the final state (support-wise).

Exact Lean statement

theorem simulateQ_run_preservesInv
    {ι : Type} {spec : OracleSpec ι} {σ α : Type}
    (impl : QueryImpl spec (StateT σ ProbComp)) (Inv : σ → Prop)
    (himpl : QueryImpl.PreservesInv impl Inv) :
    ∀ oa : OracleComp spec α,
    ∀ σ0, Inv σ0 →
      ∀ z ∈ support ((simulateQ impl oa).run σ0), Inv z.2

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
theorem simulateQ_run_preservesInv    {ι : Type} {spec : OracleSpec ι} {σ α : Type}    (impl : QueryImpl spec (StateT σ ProbComp)) (Inv : σ  Prop)    (himpl : QueryImpl.PreservesInv impl Inv) :     oa : OracleComp spec α,     σ0, Inv σ0        z  support ((simulateQ impl oa).run σ0), Inv z.2 := by  intro oa  induction oa using OracleComp.inductionOn with  | pure a =>      intro σ0 hσ0 z hz      simp_all  | query_bind t oa ih =>      intro σ0 hσ0 z hz      have hz' :          z  support            (((simulateQ impl                  (OracleSpec.query t : OracleComp spec (spec.Range t))).run σ0) >>=              fun us => (simulateQ impl (oa us.1)).run us.2) := by        simpa [simulateQ_bind, OracleComp.liftM_def] using hz      rcases (mem_support_bind_iff _ _ _).1 hz' with us, hus, hzcont      have hus' : us  support ((impl t).run σ0) := by        simpa [simulateQ_spec_query] using hus      exact ih us.1 us.2 (himpl t σ0 hσ0 us hus') z hzcont
Project
VCVio
License
Apache-2.0
Commit
2ceb2d825ee3
Source
VCVio/OracleComp/SimSemantics/StateT/PreservesInv.lean:79-102

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