Eager Random Oracle eval Dist generate Seed bind
eagerRandomOracle_evalDist_generateSeed_bind
Plain-language statement
The eager random oracle, averaged over a uniformly sampled seed, matches the fresh independent-query semantics of evalDist. This is because the pre-sampled seed values are i.i.d. uniform, exactly matching fresh oracle queries. This is the analog of seededOracle.evalDist_liftComp_generateSeed_bind_simulateQ_run' but for eagerRandomOracle (which falls...
Exact Lean statement
theorem eagerRandomOracle_evalDist_generateSeed_bind {ι₀ : Type} [DecidableEq ι₀]
{spec₀ : OracleSpec.{0, 0} ι₀}
[∀ t : spec₀.Domain, SampleableType (spec₀.Range t)]
[IsUniformSpec spec₀]
{α : Type} (oa : OracleComp spec₀ α) (qc : ι₀ → ℕ) (js : List ι₀) :
𝒟[do
let seed ← generateSeed spec₀ qc js
(simulateQ (eagerRandomOracle (spec := spec₀)) oa).run' seed] = 𝒟[oa]Formal artifact
Lean source
theorem eagerRandomOracle_evalDist_generateSeed_bind {ι₀ : Type} [DecidableEq ι₀] {spec₀ : OracleSpec.{0, 0} ι₀} [∀ t : spec₀.Domain, SampleableType (spec₀.Range t)] [IsUniformSpec spec₀] {α : Type} (oa : OracleComp spec₀ α) (qc : ι₀ → ℕ) (js : List ι₀) : 𝒟[do let seed ← generateSeed spec₀ qc js (simulateQ (eagerRandomOracle (spec := spec₀)) oa).run' seed] = 𝒟[oa] := by classical revert qc js induction oa using OracleComp.inductionOn with | pure a => intro qc js; apply evalDist_ext; intro; simp | query_bind t f ih => intro qc js; apply evalDist_ext; intro x have hsimQ : ∀ seed : QuerySeed spec₀, (simulateQ eagerRandomOracle (liftM (query t) >>= f)).run' seed = (eagerRandomOracle t >>= fun u => simulateQ eagerRandomOracle (f u)).run' seed := fun _ => by congr 1 simp_rw [hsimQ] rw [probOutput_bind_eq_tsum (liftM (query t)) f x] simp_rw [probOutput_query t] rw [probOutput_bind_eq_tsum] by_cases hcount : qc t * js.count t = 0 · exact eagerRandomOracle_evalDist_generateSeed_bind_step_zero t f qc js x ih hcount · exact eagerRandomOracle_evalDist_generateSeed_bind_step_pos t f qc js x ih (Nat.pos_of_ne_zero hcount)- Project
- VCVio
- License
- Apache-2.0
- Commit
- 2ceb2d825ee3
- Source
- VCVio/OracleComp/QueryTracking/RandomOracle/Eager.lean:219-244
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.