Documentation

CslibFrontier.Probability.Guessing.Leakage

Guessing after finite leakage #

A finite observation multiplies the largest input mass by at most the number of possible observations. The guessing strategy may be randomized and its output type may be infinite.

Main results #

theorem Cslib.Probability.PMF.bind_le_card_mul_of_fiber_subsingleton {X : Type u_1} {Y : Type u_2} {Z : Type u_3} [Finite X] [Fintype Y] (source : PMF X) (leak : X → Y) (kernel : Y → PMF Z) (event : X → Z → Prop) [(x : X) → (z : Z) → Decidable (event x z)] {mass : ENNReal} (hmass : ∀ (x : X), source x ≤ mass) (hunique : ∀ (y : Y) (z : Z), {x : X | leak x = y ∧ event x z}.Subsingleton) :
(source.bind fun (x : X) => PMF.map (fun (z : Z) => decide (event x z)) (kernel (leak x))) true ≤ ↑(Fintype.card Y) * mass

A randomized test after finite leakage succeeds with probability at most the number of observations times the largest source mass, when each observation and test output identifies at most one successful source value.

theorem Cslib.Probability.PMF.tsum_mul_apply_le_card_mul {X : Type u_1} (source : PMF X) {mass : ENNReal} (hmass : ∀ (x : X), source x ≤ mass) {Y : Type u_2} (hint : X → Y) (T : Finset Y) (hT : ∀ (x : X), hint x ∈ T) (guess : Y → PMF X) :
∑' (x : X), source x * (guess (hint x)) x ≤ ↑T.card * mass

A guess that depends on a sample only through a hint taking values in a finite set T equals the sample with probability at most T.card times the largest source mass. Unlike bind_le_card_mul_of_fiber_subsingleton, the source may live on an infinite type.

theorem Cslib.Probability.PMF.uniform_bind_le_div_of_coordinate_subsingleton {ι : Type u_1} {X : Type u_2} {Y : Type u_3} {Z : Type u_4} [Fintype ι] [DecidableEq ι] [Fintype X] [Nonempty X] [Fintype Y] (observe : X → Y) (kernel : (ι → Y) → PMF Z) (event : (ι → X) → Z → Prop) [(values : ι → X) → (z : Z) → Decidable (event values z)] (j : ι) (hunique : ∀ (values : ι → X) (z : Z), {x : X | event (Function.update values j x) z}.Subsingleton) :
((uniformOfFintype (ι → X)).bind fun (values : ι → X) => PMF.map (fun (z : Z) => decide (event values z)) (kernel (observe ∘ values))) true ≤ ↑(Fintype.card Y) / ↑(Fintype.card X)

A coordinate of independent uniform inputs cannot be predicted from their coordinatewise finite observations except with probability |Y| / |X|. The successful event may depend on all coordinates and on an arbitrary randomized output, but fixes that coordinate once the other coordinates and output are fixed.