Documentation

CslibFrontier.Tactic.Negligible

Closing cryptographic negligibility bounds #

negligible proves Cslib.Crypto.Negligible f by combining the fun_prop closure rules for Negligible, PolynomiallyBounded, PolynomiallyBoundedNNReal, and PolynomiallyLowerBounded with comparison against explicit pointwise or eventual upper bounds in ℝ≥0 or ℝ.

Main definitions #

Bound Real.toNNReal x by u when (u : ℝ) = x.

theorem Cslib.Tactic.Negligible.toNNReal_add_le_of_le {a b : ℝ} {u₁ u₂ : NNReal} (h₁ : a.toNNReal ≤ u₁) (h₂ : b.toNNReal ≤ u₂) :
(a + b).toNNReal ≤ u₁ + u₂

Monotonicity of Real.toNNReal across addition without nonnegativity hypotheses.

Monotonicity of Real.toNNReal across Real.sqrt without nonnegativity hypotheses.

theorem Cslib.Tactic.Negligible.natCast_add_one_eq (m : ℕ) :
↑m + 1 = ↑(m + 1)

Pull Nat.cast out across + 1 in ℝ≥0.

theorem Cslib.Tactic.Negligible.one_add_natCast_eq (m : ℕ) :
1 + ↑m = ↑(1 + m)

Pull Nat.cast out across 1 + in ℝ≥0.

Pull Nat.cast out across + ofNat(k) in ℝ≥0.

Pull Nat.cast out across ofNat(k) + in ℝ≥0.

Pull Nat.cast out across ofNat(k) * in ℝ≥0.

Pull Nat.cast out across * ofNat(k) in ℝ≥0.

Optional bracketed identifier list [f₁, f₂, …] for negligible.

Pointwise bound clause using hle for negligible.

Eventual bound clause eventually hle for negligible.

negligible proves Cslib.Crypto.Negligible f using fun_prop closure rules for polynomial losses, dyadic reciprocals ((2 : ℝ≥0) ^ n)⁻¹ and 1 / 2 ^ n, birthday bounds, square roots, geometric decay, parameter shifts/scalings, and finite range sums.

  • negligible [f, g] unfolds named wrapper definitions in the Negligible goal before normalization (combinable with using hle or eventually hle).
  • negligible using hle first reduces the goal along hle, where hle proves either ∀ n, f n ≤ B n in ℝ≥0 or ∀ n, (f n : ℝ) ≤ B n in ℝ.
  • negligible eventually hle first reduces the goal along hle, where hle proves either ∀ᶠ n in Filter.atTop, f n ≤ B n in ℝ≥0 or ∀ᶠ n in Filter.atTop, (f n : ℝ) ≤ B n in ℝ.

Elaborate negligible, negligible [defs], negligible using hle, and negligible eventually hle.