Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Claim 2.2 — composition and post-processing of differentially private algorithms

Proved
PrivLearn.Parity.claim_2_2

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

compositiondifferential-privacyp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1

Let A1,…,AkA_1,\dots,A_kA1​,…,Ak​ be randomized algorithms on databases in DnD^nDn, where AiA_iAi​ is εi\varepsilon_iεi​-differentially private, and let ggg be a probabilistic algorithm applied to their results. Run the AiA_iAi​ on the same database with independent coins and output g(A1(z),…,Ak(z))g(A_1(z),\dots,A_k(z))g(A1​(z),…,Ak​(z)). Then this algorithm is

(∑i=1kεi)-differentially private.\Big(\sum_{i=1}^k \varepsilon_i\Big)\text{-differentially private.}(i=1∑k​εi​)-differentially private.

Composition and post-processing are the two closure properties used to build private algorithms from private pieces; Lemma 4.5 applies them to the amplified learner.

Formalization Note The output of AiA_iAi​ on zzz is a probability measure Ai(z)A_i(z)Ai​(z) on a measurable space OiO_iOi​; independence of the coins makes the joint law the product measure ⨂iAi(z)\bigotimes_i A_i(z)⨂i​Ai​(z); the probabilistic algorithm ggg is a Markov kernel from ∏iOi\prod_i O_i∏i​Oi​ to the output space, and the output law is the product measure bound to ggg.

Preamble
import Mathlib
import Definitions.Def_PrivLearn_Generic_Privacy

open MeasureTheory ProbabilityTheory
Formal statement
namespace PrivLearn.Parity

/-- Claim 2.2 (Composition and Post-processing), p. 8. If the algorithms `A_1, …, A_k` are
`ε_i`-differentially private and run on the same database with independent coins, and `g` is a
probabilistic algorithm (a Markov kernel) applied to their results, then the algorithm
`z ↦ g(A_1(z), …, A_k(z))` is `(∑ ε_i)`-differentially private. -/
theorem claim_2_2 {D : Type*} {n k : ℕ} {O : Fin k → Type*} [∀ i, MeasurableSpace (O i)]
    {O' : Type*} [MeasurableSpace O'] (A : ∀ i, (Fin n → D) → Measure (O i))
    [∀ i z, IsProbabilityMeasure (A i z)] (ε : Fin k → ℝ) (hA : ∀ i, PrivLearn.Generic.IsDP (A i) (ε i))
    (g : Kernel (∀ i, O i) O') [IsMarkovKernel g] :
    PrivLearn.Generic.IsDP (fun z => (Measure.pi fun i => A i z).bind g) (∑ i, ε i) := by sorry

end PrivLearn.Parity
Source
Kasiviswanathan, Lee, Nissim, Raskhodnikova and Smith, What Can We Learn Privately?, arXiv:0803.0924v3, p. 8, Claim 2.2
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