Documentation

CslibFrontier.Crypto.Game.Order

Comparing success probabilities #

A bound on the mass of true in one experiment transfers to its success probability, without unfolding succProbability or discharging the finiteness of a probability mass by hand. A bound on the distinguishing advantage of two experiments bounds one success probability by the other.

Main results #

Success probability is monotone in the mass of true.

theorem Cslib.Crypto.Game.succProbability_bind_pure_le_add {α : Type} (p : PMF α) {f g₁ g₂ : α → Bool} (h : ∀ a ∈ p.support, f a = true → g₁ a = true ∨ g₂ a = true) :
succProbability (p.bind fun (a : α) => PMF.pure (f a)) ≤ succProbability (p.bind fun (a : α) => PMF.pure (g₁ a)) + succProbability (p.bind fun (a : α) => PMF.pure (g₂ a))

Union bound for Boolean tests of one distribution: if f a implies g₁ a ∨ g₂ a on the support of p, then testing f succeeds with probability at most the sum for g₁ and g₂.

Bounding advantage g₀ g₁ ≤ B bounds succProbability g₀ ≤ succProbability g₁ + B.

theorem Cslib.Crypto.Game.apply_true_le_of_advantage_le {g₁ g₂ : Game} {c : NNReal} (h : g₁.advantage g₂ ≤ c) :
g₁ true ≤ g₂ true + ↑c ∧ g₂ true ≤ g₁ true + ↑c

An ℝ≥0 advantage bound between two games implies mutual ℝ≥0∞ upper bounds on their acceptance probabilities.

theorem Cslib.Crypto.Game.sq_sub_mul_le_bind {α : Type u_1} (ν : PMF α) (G H : α → Game) {κ : ℝ} (h : ∀ a ∈ ν.support, ↑(G a).succProbability ^ 2 - κ * ↑(G a).succProbability ≤ ↑(H a).succProbability) :
↑(succProbability (ν.bind G)) ^ 2 - κ * ↑(succProbability (ν.bind G)) ≤ ↑(succProbability (ν.bind H))

Pointwise quadratic bounds ε(a) ^ 2 - κ * ε(a) ≤ ε'(a) on game success probabilities survive averaging over a ← ν by Jensen's inequality (Probability.PMF.sq_tsum_le_tsum_sq).