Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 2.3 — the Laplace mechanism f(z)+Lap(Δ/ε)f(z) + \mathrm{Lap}(\Delta/\varepsilon)f(z)+Lap(Δ/ε) is ε-differentially private

Proved
PrivLearn.Parity.theorem_2_3

by mikedeng1 · Oct 7, 2026 · Mathlib 0df444a (Lean v4.33.1)

differential-privacylaplace-mechanismp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1

Let f:Dn→Rf : D^n \to \mathbb Rf:Dn→R and let Δ>0\Delta > 0Δ>0 bound its global sensitivity: ∣f(z)−f(z′)∣≤Δ|f(z) - f(z')| \le \Delta∣f(z)−f(z′)∣≤Δ for all neighboring databases z,z′z, z'z,z′. Let ε>0\varepsilon > 0ε>0. Then the algorithm that on input zzz returns

f(z)+η,η∼Lap(Δ/ε),f(z) + \eta, \qquad \eta \sim \mathrm{Lap}(\Delta/\varepsilon),f(z)+η,η∼Lap(Δ/ε),

is ε\varepsilonε-differentially private.

This is the Laplace mechanism of Dwork, McSherry, Nissim and Smith; in §4 it makes the training errors of the candidate hypotheses private (Lemma 4.5).

Formalization Note The paper states the result for Δ=GSf=max⁡z,z′∣f(z)−f(z′)∣\Delta = GS_f = \max_{z,z'} |f(z) - f(z')|Δ=GSf​=maxz,z′​∣f(z)−f(z′)∣. Here Δ\DeltaΔ is any positive upper bound on the sensitivity, which covers GSfGS_fGSf​ whenever it is positive: the maximum need not exist for an infinite domain DDD, and GSf=0GS_f = 0GSf​=0 would give the degenerate scale Lap(0)\mathrm{Lap}(0)Lap(0), which is not a probability measure.

Preamble
import Mathlib
import Definitions.Def_PrivLearn_Generic_Privacy

open MeasureTheory
Formal statement
namespace PrivLearn.Parity

/-- Theorem 2.3 (Dwork et al.), p. 8 — the Laplace mechanism. If `Δ > 0` bounds the global
sensitivity of `f : Dⁿ → ℝ` (`|f(z) − f(z′)| ≤ Δ` for all neighbors `z, z′`), then the algorithm
that on input `z` returns `f(z) + η` with `η ∼ Lap(Δ/ε)` is ε-differentially private. -/
theorem theorem_2_3 {D : Type*} {n : ℕ} (f : (Fin n → D) → ℝ) (Δ ε : ℝ) (hΔ : 0 < Δ)
    (hε : 0 < ε) (hf : ∀ z z' : Fin n → D, PrivLearn.Generic.Neighbors z z' → |f z - f z'| ≤ Δ) :
    PrivLearn.Generic.IsDP (fun z => (PrivLearn.Generic.laplace (Δ / ε)).map (fun η => f z + η)) ε := by sorry

end PrivLearn.Parity
Source
Kasiviswanathan, Lee, Nissim, Raskhodnikova and Smith, What Can We Learn Privately?, arXiv:0803.0924v3, p. 8, Theorem 2.3
Human review
  • Endorsed by Shuze Chen · Oct 7, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 7, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me