Documentation

CslibFrontier.Probability.CorrelatedSampling.SharedSeed

Correlated sampling from a distribution-independent seed #

Two parties hold distributions P and Q on a finite set S and share randomness, but do not communicate. Holenstein's protocol Holenstein, §5, Figure 1 and the proof of Lemma 5.2, pp. 152–153 gives them a shared sequence of independent uniform points (x_n, u_n) of S × [0, 1] (seed). Each party outputs the first x_n with u_n < P (x_n), the first point under the graph of its own distribution (seedSample). The law of the seed depends only on S, not on P or Q, and each party computes its output from the seed and its own distribution alone.

The first point of an i.i.d. sequence that lies in a set R of positive probability is distributed as one point conditioned on R (map_firstHit). For the region under the graph of P, that point's first coordinate has law P (map_seedSample). If the first point under the graph of max P Q lies under the graph of min P Q, it is also the first point under each graph, and both parties output it. The two regions have areas (1 + δ) / |S| and (1 - δ) / |S|, where δ is the statistical distance, so the outputs differ with probability at most 2δ / (1 + δ) ≤ 2δ (seedSample_disagree_le).

The library's finite correlated sampling (Cslib.Probability.CorrelatedSampling.shared) proves the same bounds from a seed whose law is built from the whole family of distributions. This file is Holenstein's protocol itself, with the seed fixed in advance.

The statement of the seed's independence and of both bounds follows Holenstein: the infinite product and the strict acceptance predicate are his sampling step (Figure 1), and conditioning the first hit in the union gives his min/max ratio (proof of Lemma 5.2) before weakening to 2δ. The formal proof route through firstHit is original (cslib-frontier issue #6718). The results here concern two finite-alphabet distributions; they do not assert Holenstein's full embedding lemma.

Main definitions #

Main results #

Implementation notes #

The seed is an infinite sequence, so it is a Measure on ℕ → S × unitInterval, not a PMF. When no point of the sequence lies under the graph of its distribution, a party outputs a fixed default element. Both parties use the same default, so they agree when neither has a hit. If only one party has no hit, it returns the default while the other may return a different element. For each fixed distribution the no-hit event has measure zero (infinitePi_forall_notMem), and the disagreement bound accounts for it: it bounds the event that the first point under the graph of max P Q is not under the graph of min P Q, which contains every disagreement.

The alphabet carries a measurable structure with measurable singletons (MeasurableSingletonClass), so that the graph regions are measurable.

References #

The first entry of a sequence in a set #

noncomputable def Cslib.Probability.CorrelatedSampling.firstHit {β : Type u_1} (R : Set β) (d : β) (ω : ℕ → β) :
β

The first entry of ω in R, or d if no entry lies in R.

theorem Cslib.Probability.CorrelatedSampling.firstHit_of_forall_notMem {β : Type u_1} {R : Set β} {d : β} {ω : ℕ → β} (h : ∀ (n : ℕ), ω n ∉ R) :
firstHit R d ω = d
theorem Cslib.Probability.CorrelatedSampling.firstHit_eq_of_subset {β : Type u_1} {R R' : Set β} (hRR' : R ⊆ R') {d : β} {ω : ℕ → β} (h' : ∃ (n : ℕ), ω n ∈ R') (hR : firstHit R' d ω ∈ R) :
firstHit R d ω = firstHit R' d ω

If the first entry in R' lies in a subset R, it is also the first entry in R.

theorem Cslib.Probability.CorrelatedSampling.infinitePi_forall_notMem {β : Type u_1} [MeasurableSpace β] (μ : MeasureTheory.Measure β) [MeasureTheory.IsProbabilityMeasure μ] {R : Set β} (hR : MeasurableSet R) (h0 : μ R ≠ 0) :
(MeasureTheory.Measure.infinitePi fun (x : ℕ) => μ) {ω : ℕ → β | ∀ (n : ℕ), ω n ∉ R} = 0

Almost surely some entry of an i.i.d. sequence lies in a set of positive probability.

The first entry in a set. In an i.i.d. sequence with law μ, the first entry in a set R of positive probability is distributed as μ conditioned on R.

Holenstein's protocol #

One point of Holenstein's shared sequence: a uniform point of S × [0, 1].

Instances For

    Holenstein's shared seed: a sequence of independent uniform points of S × [0, 1]. Its law depends only on S, not on the parties' distributions.

    Instances For

      The points of S × [0, 1] strictly under the graph of t.

      noncomputable def Cslib.Probability.CorrelatedSampling.seedSample {S : Type u_1} [Nonempty S] (P : PMF S) (ω : ℕ → S × ↑unitInterval) :
      S

      A party's output in Holenstein's protocol: the first point of the seed under the graph of its own distribution P, or a fixed default when there is none.

      theorem Cslib.Probability.CorrelatedSampling.seedPoint_underGraph {S : Type u_1} [Fintype S] [Nonempty S] [MeasurableSpace S] [MeasurableSingletonClass S] {t : S → ℝ} (h0 : ∀ (s : S), 0 ≤ t s) (h1 : ∀ (s : S), t s ≤ 1) :
      (seedPoint S) (underGraph t) = (∑ s : S, ENNReal.ofReal (t s)) * (↑(Fintype.card S))⁻¹

      The region under the graph of t has area (∑ s, t s) / |S|.

      Holenstein's protocol, marginals Holenstein, §5, Figure 1 and the proof of Lemma 5.2, pp. 152–153. A party reading the shared seed with its own distribution P outputs a sample of P.

      Holenstein's protocol, disagreement Holenstein, §5, Figure 1 and the proof of Lemma 5.2, pp. 152–153. Two parties reading the same shared seed with their own distributions P and Q output different elements with probability at most 2δ, where δ is the statistical distance between P and Q. Conditioning the first point under the graph of max P Q gives the disagreement bound 2δ / (1 + δ), the complement of Holenstein's agreement ratio (1 - δ) / (1 + δ) (p. 153), which is then weakened to 2δ. A disagreement in which only one party finds no point under its graph is included in the bounded event.