All proofs
Project-declaredLean 4.32.0 · mathlib@81a5d257

Log entry in cache and mono

OracleComp.log_entry_in_cache_and_mono

Plain-language statement

When running loggingOracle inside cachingOracle, every log entry ends up in the cache. We prove two properties simultaneously by induction: 1. Every log entry is in the final cache. 2. The initial cache is a subset of the final cache (monotonicity). The proof works by induction on oa. The pure case is trivial (empty log). For query t >>= mx: the...

Exact Lean statement

theorem log_entry_in_cache_and_mono {α : Type}
    (oa : OracleComp spec α)
    (cache₀ : QueryCache spec)
    (z : (α × QueryLog spec) × QueryCache spec)
    (hmem : z ∈ support ((simulateQ cachingOracle
        ((simulateQ loggingOracle oa).run)).run cache₀)) :
    (∀ entry ∈ z.1.2, z.2 entry.1 = some entry.2) ∧ cache₀ ≤ z.2

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
theorem log_entry_in_cache_and_mono {α : Type}    (oa : OracleComp spec α)    (cache₀ : QueryCache spec)    (z : (α × QueryLog spec) × QueryCache spec)    (hmem : z  support ((simulateQ cachingOracle        ((simulateQ loggingOracle oa).run)).run cache₀)) :    ( entry  z.1.2, z.2 entry.1 = some entry.2)  cache₀  z.2 := by  induction oa using OracleComp.inductionOn generalizing cache₀ z with  | pure a =>    simp only [simulateQ_pure] at hmem    change z  support (pure ((a, ([] : QueryLog spec)), cache₀)) at hmem    rw [support_pure, Set.mem_singleton_iff] at hmem    subst hmem    exact by simp, le_refl _  | query_bind t mx ih =>    obtain u, cache_mid, ⟨⟨x', log', cache_final,      hcache₀_le_mid, hcache_mid_entry, _, hmem_cont, rfl :=      exists_cont_of_run_simulateQ_query_bind t mx cache₀ z hmem    obtain ih_entries, ih_mono := ih u cache_mid ((x', log'), cache_final) hmem_cont    exact fun entry hentry => by      cases hentry with      | head => exact ih_mono hcache_mid_entry      | tail _ hentry' => exact ih_entries entry hentry',      le_trans hcache₀_le_mid ih_mono
Project
VCVio
License
Apache-2.0
Commit
2ceb2d825ee3
Source
VCVio/OracleComp/QueryTracking/Collision.lean:183-206

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