Prob Event pair collision le
OracleComp.probEvent_pair_collision_le
Plain-language statement
Per-pair collision bound: For any two positions in a loggingOracle trace with distinct inputs, the probability that their outputs are HEq-equal is ≤ 1/|C|. This is the core ROM property: distinct oracle inputs yield independent uniform outputs. The hrange hypothesis ensures |Range default| is minimal across all oracle indices, so the bound holds...
Exact Lean statement
theorem probEvent_pair_collision_le {α : Type}
[Inhabited ι]
(oa : OracleComp spec α)
(n : ℕ)
(hrange : ∀ t, Fintype.card (spec.Range default) ≤ Fintype.card (spec.Range t))
(i j : Fin n) (hij : i ≠ j) :
Pr[fun z => z.2.length > i.val ∧ z.2.length > j.val ∧
z.2[i]?.bind (fun ei => z.2[j]?.map (fun ej =>
ei.1 ≠ ej.1 ∧ HEq ei.2 ej.2)) = some true |
(simulateQ loggingOracle oa).run] ≤
(Fintype.card (spec.Range default) : ℝ≥0∞)⁻¹Formal artifact
Lean source
theorem probEvent_pair_collision_le {α : Type} [Inhabited ι] (oa : OracleComp spec α) (n : ℕ) (hrange : ∀ t, Fintype.card (spec.Range default) ≤ Fintype.card (spec.Range t)) (i j : Fin n) (hij : i ≠ j) : Pr[fun z => z.2.length > i.val ∧ z.2.length > j.val ∧ z.2[i]?.bind (fun ei => z.2[j]?.map (fun ej => ei.1 ≠ ej.1 ∧ HEq ei.2 ej.2)) = some true | (simulateQ loggingOracle oa).run] ≤ (Fintype.card (spec.Range default) : ℝ≥0∞)⁻¹ := by apply le_trans (probEvent_mono fun z _ h => h.2.2) suffices h : ∀ (β : Type) (ob : OracleComp spec β) (i j : ℕ) (_ : i ≠ j), Pr[fun z => z.2[i]?.bind (fun ei => z.2[j]?.map (fun ej => ei.1 ≠ ej.1 ∧ HEq ei.2 ej.2)) = some true | (simulateQ loggingOracle ob).run] ≤ (Fintype.card (spec.Range default) : ℝ≥0∞)⁻¹ from h α oa i.val j.val (Fin.val_ne_of_ne hij) intro β ob induction ob using OracleComp.inductionOn with | pure x => intro i j _; simp [simulateQ_pure] | query_bind t mx ih => intro i j hij rw [run_simulateQ_loggingOracle_query_bind, probEvent_bind_eq_tsum] simp_rw [probEvent_map, Function.comp_def] -- The matched output lives at position `k` in the log; both end cases reduce to -- `probEvent_log_output_match_le` after extracting the sigma entry. have key : ∀ (u : spec.Range t) (k : ℕ) (e : β × QueryLog spec → Prop), (∀ z, e z → ∃ s v, z.2[k]? = some ⟨s, v⟩ ∧ HEq u v) → Pr[e | (simulateQ loggingOracle (mx u)).run] ≤ (Fintype.card (spec.Range default) : ℝ≥0∞)⁻¹ := fun u k e he => (probEvent_mono fun z _ => he z).trans (probEvent_log_output_match_le hrange (mx u) k t u) match i, j, hij with | 0, 0, hij => exact absurd rfl hij | 0, j' + 1, _ => simp only [List.getElem?_cons_zero, List.getElem?_cons_succ, Option.bind_some] refine tsum_query_mul_probEvent_le_aux t mx _ _ fun u => key u j' _ fun z hev => ?_ match hz : z.2[j']? with | none => simp [hz] at hev | some ⟨s, v⟩ => exact ⟨s, v, rfl, by simp_all⟩ | i' + 1, 0, _ => simp only [List.getElem?_cons_zero, List.getElem?_cons_succ] refine tsum_query_mul_probEvent_le_aux t mx _ _ fun u => key u i' _ fun z hev => ?_ match hz : z.2[i']? with | none => simp [hz] at hev | some ⟨s, v⟩ => exact ⟨s, v, rfl, (by simp_all : v ≍ u).symm⟩ | i' + 1, j' + 1, hij => simp only [List.getElem?_cons_succ] exact tsum_query_mul_probEvent_le_aux t mx _ _ fun u => ih u i' j' (by lia)- Project
- VCVio
- License
- Apache-2.0
- Commit
- 2ceb2d825ee3
- Source
- VCVio/OracleComp/QueryTracking/Birthday.lean:151-199
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.