All proofs
Project-declaredLean 4.32.0 · mathlib@81a5d257

With Query Log self log eq

OracleComp.withQueryLog_self_log_eq

Plain-language statement

Self-log fixed point. The two log layers produced by oa.withQueryLog.withQueryLog agree on every support point: simulating the logging oracle over oa.withQueryLog records exactly the queries that the inner withQueryLog already recorded, since withQueryLog does not add new queries to the underlying OracleComp.

Exact Lean statement

theorem withQueryLog_self_log_eq
    {ι : Type} {spec : OracleSpec.{0, 0} ι} {α : Type}
    (oa : OracleComp spec α) {v : α} {l₁ l₂ : spec.QueryLog}
    (hmem : ((v, l₁), l₂) ∈ support oa.withQueryLog.withQueryLog) :
    l₁ = l₂

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
theorem withQueryLog_self_log_eq    {ι : Type} {spec : OracleSpec.{0, 0} ι} {α : Type}    (oa : OracleComp spec α) {v : α} {l₁ l₂ : spec.QueryLog}    (hmem : ((v, l₁), l₂)  support oa.withQueryLog.withQueryLog) :    l₁ = l₂ := by  induction oa using OracleComp.inductionOn generalizing v l₁ l₂ with  | pure x =>      rw [withQueryLog_pure, withQueryLog_pure, mem_support_pure_iff] at hmem      grind  | query_bind t mx ih =>      -- `grind` is slow / crashes on the fully-unfolded support membership; the      -- staged destructuring below keeps the search space small.      rw [withQueryLog_bind, withQueryLog_bind, mem_support_bind_iff] at hmem      obtain ⟨⟨⟨u₁, log_q1, log_q2, h₁, hmem := hmem      rw [withQueryLog_query, withQueryLog_bind, mem_support_bind_iff] at h₁      obtain ⟨⟨u₂, log_qa, h₁a, h₁b := h₁      simp only [withQueryLog_query, mem_support_bind_iff,        mem_support_pure_iff, Prod.mk.injEq] at h₁a      obtain u, _, rfl, rfl := h₁a      rw [support_map, Set.mem_image] at h₁b      obtain ⟨⟨⟨u', l_inner, l_outer, h_pure, h_eq_b := h₁b      simp only [withQueryLog_pure, mem_support_pure_iff, Prod.mk.injEq] at h_pure      obtain ⟨⟨rfl, rfl, rfl := h_pure      simp only [Prod.map_apply, id_eq, Prod.mk.injEq, List.append_nil] at h_eq_b      obtain ⟨⟨rfl, rfl, rfl := h_eq_b      rw [support_map, Set.mem_image] at hmem      obtain ⟨⟨⟨v', l₁', l₂', h_inner_outer, h_eq := hmem      simp only [Prod.map_apply, id_eq, Prod.mk.injEq] at h_eq      obtain ⟨⟨rfl, rfl, rfl := h_eq      simp only [map_eq_pure_bind, withQueryLog_bind, mem_support_bind_iff] at h_inner_outer      obtain ⟨⟨⟨v', l₁', l₂', h_inner, pX, lX, h_pX, h_eq_X := h_inner_outer      simp only [withQueryLog_pure, mem_support_pure_iff, Prod.map_apply, id_eq,        Prod.mk.injEq] at h_pX h_eq_X      obtain ⟨⟨rfl, rfl, rfl := h_pX      obtain ⟨⟨rfl, rfl, rfl := h_eq_X      simp [ih u' h_inner]
Project
VCVio
License
Apache-2.0
Commit
2ceb2d825ee3
Source
VCVio/OracleComp/QueryTracking/LoggingOracle.lean:473-508

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