Prob Event log output match le
OracleComp.probEvent_log_output_match_le
Plain-language statement
Probability that the k-th log entry's output is HEq to a fixed value u₀ : spec.Range t₀. Unlike probEvent_log_entry_eq_le which matches the full sigma entry, this only constrains the output component. The bound uses hrange to get 1/|Range default|.
Exact Lean statement
theorem probEvent_log_output_match_le {α : Type}
[Inhabited ι]
(hrange : ∀ t, Fintype.card (spec.Range default) ≤ Fintype.card (spec.Range t))
(oa : OracleComp spec α)
(k : ℕ) (t₀ : spec.Domain) (u₀ : spec.Range t₀) :
Pr[fun z => ∃ (s : spec.Domain) (v : spec.Range s),
z.2[k]? = some ⟨s, v⟩ ∧ HEq u₀ v |
(simulateQ loggingOracle oa).run] ≤
(Fintype.card (spec.Range default) : ℝ≥0∞)⁻¹Formal artifact
Lean source
theorem probEvent_log_output_match_le {α : Type} [Inhabited ι] (hrange : ∀ t, Fintype.card (spec.Range default) ≤ Fintype.card (spec.Range t)) (oa : OracleComp spec α) (k : ℕ) (t₀ : spec.Domain) (u₀ : spec.Range t₀) : Pr[fun z => ∃ (s : spec.Domain) (v : spec.Range s), z.2[k]? = some ⟨s, v⟩ ∧ HEq u₀ v | (simulateQ loggingOracle oa).run] ≤ (Fintype.card (spec.Range default) : ℝ≥0∞)⁻¹ := by classical induction oa using OracleComp.inductionOn generalizing k with | pure _ => refine le_of_eq_of_le (probEvent_eq_zero fun z hmem h => ?_) zero_le simp only [simulateQ_pure, WriterT.run_pure', List.empty_eq, support_pure, Set.mem_singleton_iff] at hmem obtain ⟨_, rfl⟩ := hmem obtain ⟨s, v, hlog, _⟩ := h; simp at hlog | query_bind t mx ih => rw [run_simulateQ_loggingOracle_query_bind, probEvent_bind_eq_tsum] simp_rw [probEvent_map, Function.comp_def] cases k with | zero => have hpred : ∀ u' : spec.Range t, (fun z : α × QueryLog spec => ∃ (s : spec.Domain) (v : spec.Range s), ((⟨t, u'⟩ : (i : spec.Domain) × spec.Range i) :: z.2)[0]? = some ⟨s, v⟩ ∧ HEq u₀ v) = (fun _ => HEq u₀ u') := by intro u'; ext z simp only [List.getElem?_cons_zero, Option.some.injEq] exact ⟨fun ⟨s, v, heq, hheq⟩ => by cases heq; exact hheq, fun h => ⟨t, u', rfl, h⟩⟩ simp_rw [hpred, probEvent_const, probFailure_of_liftM_PMF, tsub_zero, probOutput_query] rw [ENNReal.tsum_mul_left] have hind_le : ∑' (u' : spec.Range t), (if HEq u₀ u' then (1 : ℝ≥0∞) else 0) ≤ 1 := by rw [tsum_eq_sum (s := Finset.univ) (by simp), Finset.sum_ite, Finset.sum_const_zero, add_zero, Finset.sum_const, nsmul_eq_mul, mul_one] exact_mod_cast Finset.card_le_one.mpr fun a ha b hb => by simp only [Finset.mem_filter, Finset.mem_univ, true_and] at ha hb exact eq_of_heq (ha.symm.trans hb) exact le_trans (mul_le_of_le_one_right' hind_le) (ENNReal.inv_le_inv.mpr (by exact_mod_cast hrange t)) | succ k' => simp_rw [List.getElem?_cons_succ] exact tsum_query_mul_probEvent_le_aux t mx _ _ fun u => ih u k'- Project
- VCVio
- License
- Apache-2.0
- Commit
- 2ceb2d825ee3
- Source
- VCVio/OracleComp/QueryTracking/Birthday.lean:99-142
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.