Documentation

CslibFrontier.Crypto.Game.CloseTo

Bridging Boolean game advantage and all-events statistical closeness #

Cslib.Probability.CloseTo measures total variation distance in ℝ≥0∞ on an arbitrary discrete type α : Type without Fintype or measurability assumptions, while Cslib.Crypto.Game.advantage measures the distinguishing advantage in ℝ≥0 between two Boolean experiments (Game = PMF Bool).

This module connects the two interfaces in both directions:

Unlike CslibFrontier.Crypto.Game.Statistical, which identifies Game.advantage with the finite-PMF metric nndist, these bridges require no Fintype instance on α and apply directly to word ensembles PMF (List Bool) and protocol transcripts.

Main results #

References #

In ℝ≥0∞, the success probability of a game is the probability it assigns to true.

theorem Cslib.Crypto.Game.closeTo_iff_coe_advantage_le {game1 game2 : Game} {ε : ENNReal} :
Probability.CloseTo game1 game2 ε ↔ ↑(game1.advantage game2) ≤ ε

On Boolean experiments, ε-closeness in ℝ≥0∞ is equivalent to (advantage : ℝ≥0∞) ≤ ε.

theorem Cslib.Crypto.Game.closeTo_iff_advantage_le {game1 game2 : Game} {ε : NNReal} :
Probability.CloseTo game1 game2 ↑ε ↔ game1.advantage game2 ≤ ε

On Boolean experiments, ε-closeness for ε : ℝ≥0 is equivalent to advantage ≤ ε.

theorem Cslib.Crypto.Game.coe_advantage_map_le_of_closeTo {α : Type} {μ ν : PMF α} {ε : ENNReal} (h : Probability.CloseTo μ ν ε) (f : α → Bool) :
↑(advantage (PMF.map f μ) (PMF.map f ν)) ≤ ε

Deterministic Boolean postprocessing of ε-close distributions has (advantage : ℝ≥0∞) ≤ ε.

theorem Cslib.Crypto.Game.advantage_map_le_of_closeTo {α : Type} {μ ν : PMF α} {ε : NNReal} (h : Probability.CloseTo μ ν ↑ε) (f : α → Bool) :
advantage (PMF.map f μ) (PMF.map f ν) ≤ ε

Deterministic Boolean postprocessing of ε-close distributions has advantage ≤ ε.

theorem Cslib.Crypto.Game.coe_advantage_bind_le_of_closeTo {α : Type} {μ ν : PMF α} {ε : ENNReal} (h : Probability.CloseTo μ ν ε) (test : α → Game) :
↑(advantage (μ.bind test) (ν.bind test)) ≤ ε

Running any randomized Boolean distinguisher test : α → Game on ε-close distributions has (advantage : ℝ≥0∞) ≤ ε, without finiteness assumptions on α.

theorem Cslib.Crypto.Game.advantage_bind_le_of_closeTo {α : Type} {μ ν : PMF α} {ε : NNReal} (h : Probability.CloseTo μ ν ↑ε) (test : α → Game) :
advantage (μ.bind test) (ν.bind test) ≤ ε

Running any randomized Boolean distinguisher test : α → Game on ε-close distributions has advantage ≤ ε, without finiteness assumptions on α.

theorem Cslib.Crypto.Game.closeTo_advantage_map_decide_lt {α : Type} (μ ν : PMF α) :
Probability.CloseTo μ ν ↑(advantage (PMF.map (fun (a : α) => decide (ν a < μ a)) μ) (PMF.map (fun (a : α) => decide (ν a < μ a)) ν))

A best test. The deterministic test asking whether a point is more likely under μ than under ν gives an advantage that bounds the statistical distance ([BS23], Theorem 3.10, p. 83); with Game.advantage_map_le_of_closeTo, it is the least such bound. No finiteness is assumed.

theorem Cslib.Crypto.Game.closeTo_of_coe_advantage_decide_le {α : Type} {μ ν : PMF α} {ε : ENNReal} (h : ∀ (E : Set α), ↑(advantage (PMF.map (fun (a : α) => decide (a ∈ E)) μ) (PMF.map (fun (a : α) => decide (a ∈ E)) ν)) ≤ ε) :

A bound in ℝ≥0∞ on the advantage of every indicator test gives CloseTo.

theorem Cslib.Crypto.Game.closeTo_of_advantage_decide_le {α : Type} {μ ν : PMF α} {ε : NNReal} (h : ∀ (E : Set α), advantage (PMF.map (fun (a : α) => decide (a ∈ E)) μ) (PMF.map (fun (a : α) => decide (a ∈ E)) ν) ≤ ε) :

A bound in ℝ≥0 on the advantage of every indicator test gives CloseTo.

theorem Cslib.Crypto.Game.closeTo_iff_forall_coe_advantage_map_le {α : Type} {μ ν : PMF α} {ε : ENNReal} :
Probability.CloseTo μ ν ε ↔ ∀ (f : α → Bool), ↑(advantage (PMF.map f μ) (PMF.map f ν)) ≤ ε

Variational characterization of CloseTo in ℝ≥0∞ via deterministic Boolean tests.

theorem Cslib.Crypto.Game.closeTo_iff_forall_advantage_map_le {α : Type} {μ ν : PMF α} {ε : NNReal} :
Probability.CloseTo μ ν ↑ε ↔ ∀ (f : α → Bool), advantage (PMF.map f μ) (PMF.map f ν) ≤ ε

Variational characterization of CloseTo for ε : ℝ≥0 via deterministic Boolean tests.

theorem Cslib.Crypto.Game.closeTo_iff_forall_coe_advantage_bind_le {α : Type} {μ ν : PMF α} {ε : ENNReal} :
Probability.CloseTo μ ν ε ↔ ∀ (test : α → Game), ↑(advantage (μ.bind test) (ν.bind test)) ≤ ε

Variational characterization of CloseTo in ℝ≥0∞ via randomized Boolean distinguishers.

theorem Cslib.Crypto.Game.closeTo_iff_forall_advantage_bind_le {α : Type} {μ ν : PMF α} {ε : NNReal} :
Probability.CloseTo μ ν ↑ε ↔ ∀ (test : α → Game), advantage (μ.bind test) (ν.bind test) ≤ ε

Variational characterization of CloseTo for ε : ℝ≥0 via randomized Boolean distinguishers.

theorem Cslib.Probability.CloseTo.bind_right_tsum {α β : Type} (μ : PMF α) {f g : α → PMF β} {err : α → ENNReal} (h : ∀ a ∈ μ.support, CloseTo (f a) (g a) (err a)) :
CloseTo (μ.bind f) (μ.bind g) (∑' (a : α), μ a * err a)

Pointwise statistical closeness of continuations on μ.support with input-dependent error err : α → ℝ≥0∞ bounds the mixture distance by ∑' a, μ a * err a.