Documentation

CslibFrontier.Probability.CorrelatedSampling.Embeddability

Local embeddings #

A distribution P₀ of pairs (x, y) is ε-embeddable in a distribution P₁ of ((x, y), (s, t)) Holenstein, Definition 5.1 if Alice, who holds x, and Bob, who holds y, can use shared randomness, but no communication, to produce s and t so that ((x, y), (s, t)) is within statistical distance ε of P₁ (Cslib.Probability.CorrelatedSampling.IsEmbeddable).

Embeddings compose, adding their errors (IsEmbeddable.trans); the parties may post-process their outputs locally (IsEmbeddable.map); and the error may be weakened (IsEmbeddable.mono). Shared randomness from any type, in any universe, witnesses an embedding (IsEmbeddable.of_dist_le).

Main definitions #

Main results #

References #

def Cslib.Probability.CorrelatedSampling.IsEmbeddable {X : Type u₁} {Y : Type u₂} {S : Type u₃} {T : Type u₄} [Fintype X] [Fintype Y] [Fintype S] [Fintype T] (P₀ : PMF (X × Y)) (P₁ : PMF ((X × Y) × S × T)) (ε : ℝ) :

Local embeddability Holenstein, Definition 5.1: from (x, y) drawn from P₀, Alice and Bob produce s = fA x r and t = fB y r from shared randomness r ~ ρ so that ((x, y), (s, t)) is within statistical distance ε of P₁. The randomness ranges over a type in the universe of X, Y, S and T; IsEmbeddable.of_dist_le accepts randomness from any type.

theorem Cslib.Probability.CorrelatedSampling.IsEmbeddable.of_dist_le {X : Type u₁} {Y : Type u₂} {S : Type u₃} {T : Type u₄} [Fintype X] [Fintype Y] [Fintype S] [Fintype T] {R : Type u_1} {P₀ : PMF (X × Y)} {P₁ : PMF ((X × Y) × S × T)} {ε : ℝ} (ρ : PMF R) (fA : X → R → S) (fB : Y → R → T) (h : dist (P₀.bind fun (xy : X × Y) => PMF.map (fun (r : R) => (xy, fA xy.1 r, fB xy.2 r)) ρ) P₁ ≤ ε) :
IsEmbeddable P₀ P₁ ε

Shared randomness from any type, in any universe, witnesses local embeddability: it can be replaced by the pair of strategies (fA · r, fB · r) that it selects.

theorem Cslib.Probability.CorrelatedSampling.IsEmbeddable.mono {X : Type u₁} {Y : Type u₂} {S : Type u₃} {T : Type u₄} [Fintype X] [Fintype Y] [Fintype S] [Fintype T] {P₀ : PMF (X × Y)} {P₁ : PMF ((X × Y) × S × T)} {ε ε' : ℝ} (h : IsEmbeddable P₀ P₁ ε) (hε : ε ≤ ε') :
IsEmbeddable P₀ P₁ ε'

Local embeddability is monotone in the error.

theorem Cslib.Probability.CorrelatedSampling.IsEmbeddable.map {X : Type u₁} {Y : Type u₂} {S : Type u₃} {T : Type u₄} [Fintype X] [Fintype Y] [Fintype S] [Fintype T] {S' : Type u_1} {T' : Type u_2} [Fintype S'] [Fintype T'] {P₀ : PMF (X × Y)} {P₁ : PMF ((X × Y) × S × T)} {ε : ℝ} (h : IsEmbeddable P₀ P₁ ε) (gA : X → S → S') (gB : Y → T → T') :
IsEmbeddable P₀ (PMF.map (fun (x : (X × Y) × S × T) => match x with | ((x, y), s, t) => ((x, y), gA x s, gB y t)) P₁) ε

Local post-processing. If P₀ embeds in P₁, Alice and Bob can apply local maps gA and gB to their outputs, for instance to forget part of them, with the same error.

theorem Cslib.Probability.CorrelatedSampling.IsEmbeddable.trans {X : Type u₁} {Y : Type u₂} {S : Type u₃} {T : Type u₄} [Fintype X] [Fintype Y] [Fintype S] [Fintype T] {U : Type u_1} {V : Type u_2} [Fintype U] [Fintype V] {P₀ : PMF (X × Y)} {P₁ : PMF ((X × Y) × S × T)} {P₂ : PMF (((X × S) × Y × T) × U × V)} {ε₁ ε₂ : ℝ} (h₁ : IsEmbeddable P₀ P₁ ε₁) (h₂ : IsEmbeddable (PMF.map (fun (x : (X × Y) × S × T) => match x with | ((x, y), s, t) => ((x, s), y, t)) P₁) P₂ ε₂) :
IsEmbeddable P₀ (PMF.map (fun (x : ((X × S) × Y × T) × U × V) => match x with | (((x, s), y, t), u, v) => ((x, y), (s, u), t, v)) P₂) (ε₁ + ε₂)

Composition of local embeddings. Suppose P₀ embeds in a law P₁ of ((x, y), (s, t)) with error ε₁, and the law of ((x, s), (y, t)) under P₁ embeds in P₂ with error ε₂. Then P₀ embeds in P₂, regrouped as ((x, y), ((s, u), (t, v))), with error ε₁ + ε₂: Alice runs both protocols on her side, and the shared randomness is a pair of independent strings.

noncomputable def Cslib.Probability.CorrelatedSampling.condX {X : Type u₁} {Y : Type u₂} {S : Type u₃} (J : PMF ((X × Y) × S)) :
X → PMF S

The conditional law of s given x under a joint law J of ((x, y), s).

noncomputable def Cslib.Probability.CorrelatedSampling.condY {X : Type u₁} {Y : Type u₂} {S : Type u₃} (J : PMF ((X × Y) × S)) :
Y → PMF S

The conditional law of s given y under a joint law J of ((x, y), s).

@[reducible, inline]
noncomputable abbrev Cslib.Probability.CorrelatedSampling.withKernel {X : Type u₁} {Y : Type u₂} {S : Type u₃} (P : PMF (X × Y)) (K : X × Y → PMF S) :
PMF ((X × Y) × S)

The joint law P ⊗ K of ((x, y), s) with (x, y) ~ P and s ~ K (x, y).

theorem Cslib.Probability.CorrelatedSampling.isEmbeddable_withKernel {X : Type u₁} {Y : Type u₂} {S : Type u₃} [Fintype X] [Fintype Y] [Fintype S] (P₀ : PMF (X × Y)) (KX : X → PMF S) (KY : Y → PMF S) (K : X × Y → PMF S) :
IsEmbeddable P₀ (P₀.bind fun (xy : X × Y) => PMF.map (fun (x : S × S) => (xy, x)) (PMF.map (fun (s : S) => (s, s)) (K xy))) (2 * dist (withKernel P₀ fun (xy : X × Y) => KX xy.1) (withKernel P₀ K) + 2 * dist (withKernel P₀ fun (xy : X × Y) => KY xy.2) (withKernel P₀ K))

The local embedding protocol on inputs from any P₀: its output is within 2 d(P₀ ⊗ KX, P₀ ⊗ K) + 2 d(P₀ ⊗ KY, P₀ ⊗ K) of P₀ ⊗ (K, K).

theorem Cslib.Probability.CorrelatedSampling.isEmbeddable_diag {X : Type u₁} {Y : Type u₂} {S : Type u₃} [Fintype X] [Fintype Y] [Fintype S] (J : PMF ((X × Y) × S)) :
IsEmbeddable (PMF.map Prod.fst J) (PMF.map (fun (z : (X × Y) × S) => (z.1, z.2, z.2)) J) (2 * dist J (withKernel (PMF.map Prod.fst J) fun (xy : X × Y) => condX J xy.1) + 2 * dist J (withKernel (PMF.map Prod.fst J) fun (xy : X × Y) => condY J xy.2))

Holenstein's Lemma 5.2 Holenstein, Lemma 5.2: a joint law J of ((x, y), s) embeds its marginal in ((x, y), (s, s)) with error 2 ε₁ + 2 ε₂, where ε₁ and ε₂ are the distances of J from P_{XY} P_{S | X} and P_{XY} P_{S | Y}.

theorem Cslib.Probability.CorrelatedSampling.isEmbeddable_diag_of_dist_le {X : Type u₁} {Y : Type u₂} {S : Type u₃} [Fintype X] [Fintype Y] [Fintype S] (J : PMF ((X × Y) × S)) (P₀ : PMF (X × Y)) {ε₁ ε₂ : ℝ} (h₁ : dist J (withKernel P₀ fun (xy : X × Y) => condX J xy.1) ≤ ε₁) (h₂ : dist J (withKernel P₀ fun (xy : X × Y) => condY J xy.2) ≤ ε₂) :
IsEmbeddable P₀ (PMF.map (fun (z : (X × Y) × S) => (z.1, z.2, z.2)) J) (7 * ε₁ + 2 * ε₂)

Holenstein's Corollary 5.3 Holenstein, Corollary 5.3, with the constant 7 ε₁ + 2 ε₂ of this proof: if J is within ε₁ of P₀ P_{S | X} and within ε₂ of P₀ P_{S | Y}, then P₀ embeds in ((x, y), (s, s)) under J with error 7 ε₁ + 2 ε₂.

theorem Cslib.Probability.CorrelatedSampling.isEmbeddable_bind_prod {X : Type u₁} {Y : Type u₂} {S : Type u₃} {T : Type u₄} [Fintype X] [Fintype Y] [Fintype S] [Fintype T] (P₀ : PMF (X × Y)) (KS : X → PMF S) (KT : Y → PMF T) :
IsEmbeddable P₀ (P₀.bind fun (xy : X × Y) => (KS xy.1).bind fun (s : S) => PMF.map (fun (t : T) => (xy, s, t)) (KT xy.2)) 0

Holenstein's Lemma 5.4 Holenstein, Lemma 5.4, for the factorized law it characterizes: if s is drawn from KS x and t from KT y, independently, then P₀ embeds exactly. Shared randomness simulates the private coins: it draws a random function for each party.

theorem Cslib.Probability.CorrelatedSampling.isEmbeddable_map_fst_of_apply_eq_mul {X : Type u₁} {Y : Type u₂} {S : Type u₃} {T : Type u₄} [Fintype X] [Fintype Y] [Fintype S] [Fintype T] (J : PMF ((X × Y) × S × T)) (c : X → Y → ENNReal) (f : X → S → ENNReal) (g : Y → T → ENNReal) (hf : ∀ (x : X) (s : S), f x s ≠ ⊤) (hg : ∀ (y : Y) (t : T), g y t ≠ ⊤) (hJ : ∀ (x : X) (y : Y) (s : S) (t : T), J ((x, y), s, t) = c x y * f x s * g y t) :

Holenstein's Lemma 5.4 Holenstein, Lemma 5.4 for a law J of ((x, y), (s, t)) whose masses factor as c x y · f x s · g y t. Such a law has the form (5.5) of the proof of Lemma 5.4, P_{XY} P_{S | X} P_{T | Y}, so its input marginal embeds in it exactly.

theorem Cslib.Probability.CorrelatedSampling.dist_filter_le_two_mul {Z : Type u_1} [Fintype Z] (p q : PMF Z) (E : Set Z) (hp : (p.toOuterMeasure E).toReal = 1 / 2) (hq : (q.toOuterMeasure E).toReal = 1 / 2) (hpE : ∃ a ∈ E, a ∈ p.support) (hqE : ∃ a ∈ E, a ∈ q.support) :
dist (p.filter E hpE) (q.filter E hqE) ≤ 2 * dist p q

Holenstein's Claim 6.1 Holenstein, Claim 6.1: conditioning two distributions on an event of probability 1 / 2 under both at most doubles their statistical distance.

The hypotheses of Corollary 5.3 from a redrawn input #

theorem Cslib.Probability.CorrelatedSampling.dist_withKernel_condY_le {X : Type u₁} {Y : Type u₂} {S : Type u₃} [Fintype X] [Fintype Y] [Fintype S] (J : PMF ((X × Y) × S)) (P₀ : PMF (X × Y)) (K : Y → PMF X) (hK : ((PMF.map Prod.snd P₀).bind fun (y : Y) => PMF.map (fun (x : X) => (x, y)) (K y)) = P₀) :
dist J (withKernel P₀ fun (xy : X × Y) => condY J xy.2) ≤ dist J ((PMF.map (Prod.map Prod.snd id) J).bind fun (x : Y × S) => match x with | (y, s) => PMF.map (fun (x : X) => ((x, y), s)) (K y)) + dist (PMF.map Prod.snd (PMF.map Prod.fst J)) (PMF.map Prod.snd P₀)

The triangle step of Holenstein's (6.13)–(6.15) Holenstein, proof of Lemma 6.4, (6.13)–(6.15). Let K draw x given y under P₀, so that P₀ = P_Y K. A joint law J of ((x, y), s) is within ε₁ + ε₂ of P₀ P_{S | Y}, the left side of the second hypothesis of Corollary 5.3, if it is within ε₁ of the law that keeps (y, s) from J and redraws x from K y, and its y-marginal is within ε₂ of that of P₀.

theorem Cslib.Probability.CorrelatedSampling.dist_withKernel_condX_le {X : Type u₁} {Y : Type u₂} {S : Type u₃} [Fintype X] [Fintype Y] [Fintype S] (J : PMF ((X × Y) × S)) (P₀ : PMF (X × Y)) (K : X → PMF Y) (hK : ((PMF.map Prod.fst P₀).bind fun (x : X) => PMF.map (fun (x_1 : Y) => (x, x_1)) (K x)) = P₀) :
dist J (withKernel P₀ fun (xy : X × Y) => condX J xy.1) ≤ dist J ((PMF.map (Prod.map Prod.fst id) J).bind fun (x : X × S) => match x with | (x, s) => PMF.map (fun (y : Y) => ((x, y), s)) (K x)) + dist (PMF.map Prod.fst (PMF.map Prod.fst J)) (PMF.map Prod.fst P₀)

The triangle step of Holenstein's (6.16) Holenstein, proof of Lemma 6.4, (6.16), the mirror image of dist_withKernel_condY_le. Let K draw y given x under P₀. A joint law J of ((x, y), s) is within ε₁ + ε₂ of P₀ P_{S | X}, the left side of the first hypothesis of Corollary 5.3, if it is within ε₁ of the law that keeps (x, s) from J and redraws y from K x, and its x-marginal is within ε₂ of that of P₀.