Collision and length bounds for independently sampled paths

Lax263307.PathSampling · concepts/Lax263307/PathSampling.lean · lax-263307

proven

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Natural Language Statement

    Lemma

    Let QQ be a random vertex set and let qv=Pr⁡[v∈Q]q_v=\Pr[v\in Q]. Two independent samples intersect with probability at most ∑vqv2\sum_v q_v^2. The probability that an edge joins their vertex sets is at most the ordered adjacency mass ∑uv∈E(G)2quqv\sum_{uv\in E(G)}2q_uq_v. Also E[∣Q∣]=∑vqv\mathbb E[|Q|]=\sum_vq_v.

    Consequently, if qv≤ℓxv/kq_v\le\ell x_v/k, 0≤xv≤10\le x_v\le1, ∑vxv≤k\sum_vx_v\le k with k>0k>0, and eG(x)≤k2/pe_G(x)\le k^2/p with p>0p>0, these bounds are respectively ℓ2/k\ell^2/k, 2ℓ2/p2\ell^2/p, and ℓ\ell.

    Concept map
    2 concepts
    100%
    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on ADescendants are omitted for concepts with more than 10 descendants.
    Evidence

    This concept declares 4 statements. Each proof establishes one of them relative to its assumptions.

    1 adjacency_union_bound proven

    2 collision_union_bound proven

    3 expected_size_identity proven

    Lean source view on GitHub

    1import Lax263307.Entropy
    2import Mathlib.Data.Finset.Card
    3
    4/-!
    5---
    6title: Collision and length bounds for independently sampled paths
    7type: lemma
    8---
    9Let QQ be a random vertex set and let qv=Pr⁡[v∈Q]q_v=\Pr[v\in Q]. Two independent
    10samples intersect with probability at most ∑vqv2\sum_v q_v^2. The probability
    11that an edge joins their vertex sets is at most the ordered adjacency mass
    12∑uv∈E(G)2quqv\sum_{uv\in E(G)}2q_uq_v. Also E[∣Q∣]=∑vqv\mathbb E[|Q|]=\sum_vq_v.
    13
    14Consequently, if qv≤ℓxv/kq_v\le\ell x_v/k, 0≤xv≤10\le x_v\le1, ∑vxv≤k\sum_vx_v\le k with k>0k>0,
    15and eG(x)≤k2/pe_G(x)\le k^2/p with p>0p>0, these bounds are respectively
    16ℓ2/k\ell^2/k, 2ℓ2/p2\ell^2/p, and ℓ\ell.
    17
    18# Formalization notes
    19
    20A finite distribution is given explicitly by its outcome probabilities.
    21The pair probabilities are products, expressing independent sampling.
    22The estimates depend only on the vertex sets of the sampled paths, so the
    23definitions allow arbitrary finite vertex sets.
    24-/
    25
    26namespace Lax263307.PathSampling
    27
    28open Entropy (adjacencyMass edgeCost)
    29/-- Finite outcome probabilities and their associated vertex sets. -/
    30structure Distribution (n q : ℕ) where
    31 /-- Probability of each outcome. -/
    32 probability : Fin q → ℝ
    33 /-- Probabilities are nonnegative. -/
    34 nonnegative : ∀ i, 0 ≤ probability i
    35 /-- Total probability is one. -/
    36 normalized : (∑ i, probability i) = 1
    37 /-- The vertices used by each outcome. -/
    38 vertices : Fin q → Finset (Fin n)
    39
    40/-- Probability of using a particular vertex. -/
    41noncomputable def load {n q : ℕ} (P : Distribution n q) (v : Fin n) : ℝ :=
    42 ∑ i, if v ∈ P.vertices i then P.probability i else 0
    43
    44/-- Expected number of used vertices. -/
    45noncomputable def expectedSize {n q : ℕ} (P : Distribution n q) : ℝ :=
    46 ∑ i, P.probability i * ((P.vertices i).card : ℝ)
    47
    48/-- Probability that independent outcomes have a common vertex. -/
    49noncomputable def collisionProbability {n q : ℕ} (P : Distribution n q) : ℝ :=
    50 ∑ i, ∑ j, if ¬Disjoint (P.vertices i) (P.vertices j) then
    51 P.probability i * P.probability j else 0
    52
    53/-- Probability that a graph edge joins independent outcomes. -/
    54noncomputable def adjacencyProbability {n q : ℕ} (G : SimpleGraph (Fin n))
    55 [DecidableRel G.Adj] (P : Distribution n q) : ℝ :=
    56 ∑ i, ∑ j, if ∃ u ∈ P.vertices i, ∃ v ∈ P.vertices j, G.Adj u v then
    57 P.probability i * P.probability j else 0
    58
    59/-- Sum of vertex-use probabilities equals expected size. -/
    60axiom expected_size_identity {n q : ℕ} (P : Distribution n q) :
    61 expectedSize P = ∑ v, load P v
    62
    63/-- The union bound for intersection of two independent samples. -/
    64axiom collision_union_bound {n q : ℕ} (P : Distribution n q) :
    65 collisionProbability P ≤ ∑ v, (load P v) ^ 2
    66
    67/-- The union bound for edges joining two independent samples. -/
    68axiom adjacency_union_bound {n q : ℕ} (G : SimpleGraph (Fin n))
    69 [DecidableRel G.Adj] (P : Distribution n q) :
    70 adjacencyProbability G P ≤ adjacencyMass G (load P)
    71
    72/-- The load hypotheses imply the three estimates used in sampling. -/
    73axiom sampling_bounds {n q : ℕ} (G : SimpleGraph (Fin n))
    74 [DecidableRel G.Adj] (P : Distribution n q) (x : Fin n → ℝ) (k ℓ p : ℝ)
    75 (k_positive : 0 < k) (ℓ_nonnegative : 0 ≤ ℓ) (p_positive : 0 < p)
    76 (cost_bounds : ∀ v, 0 ≤ x v ∧ x v ≤ 1) (mass : (∑ v, x v) ≤ k)
    77 (load_bound : ∀ v, load P v ≤ ℓ * x v / k)
    78 (edge_bound : edgeCost G x ≤ k ^ 2 / p) :
    79 collisionProbability P ≤ ℓ ^ 2 / k ∧
    80 adjacencyProbability G P ≤ 2 * ℓ ^ 2 / p ∧ expectedSize P ≤ ℓ
    81
    82end Lax263307.PathSampling
    83
    Show ProofShow ProofShow ProofShow Proof
    Formalization notes

    A finite distribution is given explicitly by its outcome probabilities. The pair probabilities are products, expressing independent sampling. The estimates depend only on the vertex sets of the sampled paths, so the definitions allow arbitrary finite vertex sets.

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above.

    Loading discussion…