Documentation

CslibFrontier.Probability.KWiseIndependent.Restriction

Restriction-Fiber Cardinalities and Conditioning for k-Wise Independent Hash Families #

This module provides exact natural-number fiber-cardinality identities for restrictions T.restrict (h i) = y (#T ≤ k) and full evaluations h i = y (Fintype.card X ≤ k) of a k-wise independent hash family h : ι → X → Y, together with fiber conditioning of a (k + 1)-wise independent hash family on a single evaluation h θ x = v₀.

Main results #

theorem Cslib.Probability.IsKWiseIndependentHash.card_filter_restrict_eq {ι : Type u_1} {X : Type u_2} {Y : Type u_3} [Fintype ι] [Fintype Y] [DecidableEq Y] [Nonempty Y] {k : ℕ} {h : ι → X → Y} (hh : IsKWiseIndependentHash k h) {T : Finset X} (hT : T.card ≤ k) (y : ↥T → Y) :
Fintype.card Y ^ T.card * {i : ι | T.restrict (h i) = y}.card = Fintype.card ι

Exact natural-number fiber cardinality of T.restrict (h i) = y under a k-wise independent hash family h : ι → X → Y over a nonempty codomain Y.

theorem Cslib.Probability.IsKWiseIndependentHash.card_filter_eq_of_card_le {ι : Type u_1} {X : Type u_2} {Y : Type u_3} [Fintype ι] [Fintype Y] [DecidableEq Y] [Nonempty Y] [Fintype X] {k : ℕ} {h : ι → X → Y} (hh : IsKWiseIndependentHash k h) (hX : Fintype.card X ≤ k) (y : X → Y) :
{i : ι | h i = y}.card * Fintype.card Y ^ Fintype.card X = Fintype.card ι

Exact natural-number fiber cardinality of h i = y on a finite domain X with Fintype.card X ≤ k under a k-wise independent hash family h : ι → X → Y.

theorem Cslib.Probability.IsKWiseIndependentHash.card_fiber_eq {ι : Type u_1} {X : Type u_2} {Y : Type u_3} [Fintype ι] [Fintype Y] [DecidableEq Y] [Nonempty Y] {k : ℕ} {h : ι → X → Y} (hh : IsKWiseIndependentHash (k + 1) h) (x : X) (v₀ : Y) :
Fintype.card Y * Fintype.card { θ : ι // h θ x = v₀ } = Fintype.card ι

Exact single-point fiber cardinality |Y| * |{θ // h θ x = v₀}| = |ι| under (k + 1)-wise independence.

theorem Cslib.Probability.IsKWiseIndependentHash.fiber {ι : Type u_1} {X : Type u_2} {Y : Type u_3} [Fintype ι] [Fintype Y] [DecidableEq Y] [Nonempty Y] {k : ℕ} {h : ι → X → Y} (hh : IsKWiseIndependentHash (k + 1) h) (x : X) (v₀ : Y) :
Nonempty { θ : ι // h θ x = v₀ } ∧ IsKWiseIndependentHash k fun (θ : { θ : ι // h θ x = v₀ }) (z : { z : X // z ≠ x }) => h ↑θ ↑z

Conditioning a (k + 1)-wise independent hash family h : ι → X → Y on h θ x = v₀ yields a nonempty seed fiber {θ : ι // h θ x = v₀} carrying a k-wise independent hash family on {z : X // z ≠ x}.

theorem Cslib.Probability.dens_le_of_hash_fiber {ι : Type u_1} {α : Type u_2} {Y : Type u_3} [Fintype ι] [Fintype Y] [DecidableEq Y] [Nonempty Y] {k : ℕ} {h : ι → α → Y} (hh : IsKWiseIndependentHash (k + 1) h) (x : α) (Bad : ι → Prop) [DecidablePred Bad] {B : ℝ} (hfib : ∀ (v₀ : Y), Nonempty { θ : ι // h θ x = v₀ } → (IsKWiseIndependentHash k fun (θ : { θ : ι // h θ x = v₀ }) (y : { y : α // y ≠ x }) => h ↑θ ↑y) → ↑{θ : { θ : ι // h θ x = v₀ } | Bad ↑θ}.dens ≤ B) :
↑{θ : ι | Bad θ}.dens ≤ B

Conditioning a (k + 1)-wise independent hash family h on h θ x = v₀ yields a k-wise independent family on {y // y ≠ x} (IsKWiseIndependentHash.fiber), bounding any seed event uniformly across fibers.