Documentation

CslibFrontier.Probability.UniformEmbedding

Uniform random embeddings, collision distance, and random-permutation kernels #

General finite-domain probability bounds for uniform random injections T ↪ α, uniform product functions, and coordinatewise random-permutation Markov kernels:

  1. Stationarity and t-round contraction of random-permutation tuple kernels: Applying a random permutation π ← ρ coordinatewise via (Equiv.refl T).embeddingCongr π defines a Markov kernel permTupleKernel ρ on T ↪ α whose stationary law is PMF.uniformOfFintype (T ↪ α) (isStationary_permTupleKernel). Composing t ≥ 1 independent random permutations within δ of uniform on T ↪ α contracts statistical distance to at most (1 / 2) * (2 * δ) ^ t (dist_permTupleKernel_composePermDist_le, [ANS10], Section 5.3, Theorem 5.6).
  2. Negative correlation and collision distance of uniform embeddings: Under e ← PMF.uniformOfFintype (T ↪ α), hitting a shared target set Q : Finset α on every coordinate has probability at most (#Q / |α|) ^ |T| (prob_uniformOfFintype_embedding_forall_mem_le, [BFCK+22], Section 5.3), hitting per-coordinate target sets Q i when 2 * |T| ^ 2 ≤ |α| has probability at most 2 * ∏ i, (#(Q i) / |α|) (prob_uniformOfFintype_embedding_forall_mem_perKey_le), and forgetting injectivity into T → α is within |T| * (|T| - 1) / (2 * |α|) of PMF.uniformOfFintype (T → α) (dist_uniform_embedding_to_fun).

Main definitions #

Main results #

References #

Section 1: Random-permutation kernels on T ↪ α and t-round contraction #

noncomputable def Cslib.Probability.permTupleKernel {T : Type u_1} {α : Type u_2} (ρ : PMF (Equiv.Perm α)) (x : T ↪ α) :
PMF (T ↪ α)

Markov kernel on T ↪ α induced by applying π ← ρ coordinatewise via (Equiv.refl T).embeddingCongr π.

theorem Cslib.Probability.permTupleKernel_eq {T : Type u_1} {α : Type u_2} (ρ : PMF (Equiv.Perm α)) (x : T ↪ α) :
permTupleKernel ρ x = PMF.map (fun (π : α ≃ α) => ((Equiv.refl T).embeddingCongr π) x) ρ

The uniform distribution on T ↪ α is stationary under permTupleKernel ρ for every ρ : PMF (Equiv.Perm α).

noncomputable def Cslib.Probability.composePermDist {α : Type u_1} (t : ℕ) :
(Fin t → PMF (Equiv.Perm α)) → PMF (Equiv.Perm α)

Left-to-right composition π₀.trans (π₁.trans ⋯) of t independent random permutations.

@[simp]
theorem Cslib.Probability.composePermDist_succ {α : Type u_1} (t : ℕ) (ρs : Fin (t + 1) → PMF (Equiv.Perm α)) :
composePermDist (t + 1) ρs = (composePermDist t fun (i : Fin t) => ρs i.castSucc).bind fun (π₁ : Equiv.Perm α) => PMF.map (fun (π₂ : α ≃ α) => Equiv.trans π₁ π₂) (ρs (Fin.last t))
theorem Cslib.Probability.permTupleKernel_composePermDist_succ {T : Type u_1} {α : Type u_2} (t : ℕ) (ρs : Fin (t + 1) → PMF (Equiv.Perm α)) (x : T ↪ α) :
theorem Cslib.Probability.dist_permTupleKernel_composePermDist_le {T : Type u_1} {α : Type u_2} [Fintype T] [Fintype α] [Nonempty (T ↪ α)] {t : ℕ} (ht : 1 ≤ t) (ρs : Fin t → PMF (Equiv.Perm α)) {δ : ℝ} (hδ : ∀ (i : Fin t) (x : T ↪ α), dist (permTupleKernel (ρs i) x) (PMF.uniformOfFintype (T ↪ α)) ≤ δ) (x : T ↪ α) :
dist (permTupleKernel (composePermDist t ρs) x) (PMF.uniformOfFintype (T ↪ α)) ≤ 1 / 2 * (2 * δ) ^ t

t-round stationary statistical-distance contraction ([ANS10], arXiv:0912.5424v3, Section 5.3, Theorem 5.6, PDF p. 25 / printed p. 24): composing t ≥ 1 independent random permutations, each within statistical distance δ of uniform on T ↪ α, yields a random permutation within (1 / 2) * (2 * δ) ^ t of uniform on T ↪ α.

Section 2: Without-replacement negative correlation, collisions, and product sets #

theorem Cslib.Probability.prob_uniformOfFintype_embedding_mem_range {ι : Type u_1} {α : Type u_2} [Fintype ι] [Fintype α] [Nonempty (ι ↪ α)] (x : α) :

The range of a uniform injection of a finite type contains each fixed target with probability equal to the domain size divided by the codomain size.

theorem Cslib.Probability.prob_uniformOfFintype_embedding_forall_mem_le {T : Type u_1} {α : Type u_2} [Fintype T] [Fintype α] [Nonempty α] (hT : Fintype.card T ≤ Fintype.card α) (Q : Finset α) :
((PMF.uniformOfFintype (T ↪ α)).toOuterMeasure {e : T ↪ α | ∀ (i : T), e i ∈ Q}).toReal ≤ (↑Q.card / ↑(Fintype.card α)) ^ Fintype.card T

Without-replacement multiplicative upper bound ([BFCK+22], arXiv:2111.00602v2, Section 5.3, PDF p. 36 / printed p. 35): for a uniform random injection e ← PMF.uniformOfFintype (T ↪ α) (Fintype.card T ≤ Fintype.card α, Nonempty α) and any target set Q : Finset α, the probability that e i ∈ Q for all i : T is at most (#Q / |α|) ^ |T|.

theorem Cslib.Probability.prob_uniformOfFintype_embedding_forall_mem_perKey_le {T : Type u_1} {α : Type u_2} [Fintype T] [Fintype α] [Nonempty α] (hcard2 : 2 * Fintype.card T ^ 2 ≤ Fintype.card α) (Q : T → Finset α) :
((PMF.uniformOfFintype (T ↪ α)).toOuterMeasure {e : T ↪ α | ∀ (i : T), e i ∈ Q i}).toReal ≤ 2 * ∏ i : T, ↑(Q i).card / ↑(Fintype.card α)

Per-coordinate without-replacement upper bound: for any per-coordinate target sets Q : T → Finset α and 2 * |T| ^ 2 ≤ |α|, a uniform injection e ← PMF.uniformOfFintype (T ↪ α) lands in ∏ᵢ Q i with probability at most 2 * ∏ᵢ (#(Q i) / |α|).

Birthday collision bound for a uniform random function f ← PMF.uniformOfFintype (T → α).

theorem Cslib.Probability.dist_uniform_embedding_to_fun {T : Type u_1} {α : Type u_2} [Fintype T] [DecidableEq T] [Fintype α] [Nonempty α] (hcard : Fintype.card T ≤ Fintype.card α) :
dist (PMF.map (fun (e : T ↪ α) => ⇑e) (PMF.uniformOfFintype (T ↪ α))) (PMF.uniformOfFintype (T → α)) ≤ ↑(Fintype.card T * (Fintype.card T - 1)) / (2 * ↑(Fintype.card α))

Statistical distance between a uniform random injection T ↪ α (coerced to T → α) and a uniform random function T → α is at most |T| * (|T| - 1) / (2 * |α|).

theorem Cslib.Probability.prob_uniformOfFintype_pi_prod_forall_mem {T : Type u_1} {α : Type u_2} {β : Type u_3} [Fintype T] [DecidableEq T] [Fintype α] [Nonempty α] [Fintype β] [Nonempty β] (B : T → Finset α) (A : T → Finset β) :
((PMF.uniformOfFintype (T → α × β)).toOuterMeasure {f : T → α × β | ∀ (i : T), (f i).1 ∈ B i ∧ (f i).2 ∈ A i}).toReal = ∏ i : T, ↑(B i).card / ↑(Fintype.card α) * (↑(A i).card / ↑(Fintype.card β))

Exact product-event probability under PMF.uniformOfFintype (T → α × β).