Documentation

SampCert.DifferentialPrivacy.Abstract

Differential Privacy #

This file defines an abstract system of differentially private operators.

@[reducible, inline]
abbrev SLang.Query (T : Type) (U : Type) :
Equations
Instances For
    @[reducible, inline]
    abbrev SLang.Mechanism (T : Type) (U : Type) :
    Equations
    Instances For
      def SLang.privComposeAdaptive {T : Type} {U : Type} {V : Type} (nq1 : SLang.Mechanism T U) (nq2 : USLang.Mechanism T V) (l : List T) :
      PMF (U × V)

      General (value-dependent) composition of mechanisms

      Equations
      Instances For
        theorem SLang.compose_sum_rw_adaptive {T : Type u_1} {U : Type u_2} {V : Type u_3} (nq1 : List TPMF U) (nq2 : UList TPMF V) (u : U) (v : V) (l : List T) :
        (∑' (a : U), (nq1 l) a * ∑' (a_1 : V), if u = a v = a_1 then (nq2 a l) a_1 else 0) = (nq1 l) u * (nq2 u l) v
        theorem SLang.privComposeChainRule {T : Type} {U : Type} {V : Type} (nq1 : SLang.Mechanism T U) (nq2 : USLang.Mechanism T V) (l : List T) (u : U) (v : V) :
        (SLang.privComposeAdaptive nq1 nq2 l) (u, v) = (nq1 l) u * (nq2 u l) v

        Chain rule relating the adaptive composition definitions

        The joint distribution decomposes into the conditional and marginal (ie, nq1 l) distributions

        def SLang.privCompose {T : Type} {U : Type} {V : Type} (nq1 : SLang.Mechanism T U) (nq2 : SLang.Mechanism T V) (l : List T) :
        PMF (U × V)

        Product of mechanisms.

        Equations
        Instances For
          def SLang.privPostProcess {T : Type} {U : Type} {V : Type} (nq : SLang.Mechanism T U) (pp : UV) (l : List T) :
          PMF V

          Mechanism obtained by applying a post-processing function to a mechanism.

          Equations
          Instances For
            def SLang.privConst {U : Type} {T : Type} (u : U) :

            Constant mechanism

            Equations
            Instances For
              class SLang.DPSystem (T : Type) :

              Abstract definition of a differentially private systemm.

              Instances
                theorem SLang.DPSystem.prop_mono {T : Type} [self : SLang.DPSystem T] {Z : Type} {m : SLang.Mechanism T Z} {ε₁ : NNReal} {ε₂ : NNReal} (Hε : ε₁ ε₂) (H : SLang.DPSystem.prop m ε₁) :

                DP is monotonic

                theorem SLang.DPSystem.noise_prop {T : Type} [self : SLang.DPSystem T] (q : List T) (Δ : ℕ+) (εn : ℕ+) (εd : ℕ+) :
                sensitivity q ΔSLang.DPSystem.prop (SLang.DPSystem.noise q Δ εn εd) (εn / εd)

                Adding noise to a query makes it private.

                theorem SLang.DPSystem.compose_prop {T : Type} [self : SLang.DPSystem T] {U : Type} {V : Type} [MeasurableSpace U] [Countable U] [DiscreteMeasurableSpace U] [Inhabited U] [MeasurableSpace V] [Countable V] [DiscreteMeasurableSpace V] [Inhabited V] (m₁ : SLang.Mechanism T U) (m₂ : SLang.Mechanism T V) (ε₁ : NNReal) (ε₂ : NNReal) :
                SLang.DPSystem.prop m₁ ε₁SLang.DPSystem.prop m₂ ε₂SLang.DPSystem.prop (SLang.privCompose m₁ m₂) (ε₁ + ε₂)

                Privacy composes by addition.

                theorem SLang.DPSystem.adaptive_compose_prop {T : Type} [self : SLang.DPSystem T] {U : Type} {V : Type} [MeasurableSpace U] [Countable U] [DiscreteMeasurableSpace U] [Inhabited U] [MeasurableSpace V] [Countable V] [DiscreteMeasurableSpace V] [Inhabited V] (m₁ : SLang.Mechanism T U) (m₂ : USLang.Mechanism T V) (ε₁ : NNReal) (ε₂ : NNReal) :
                SLang.DPSystem.prop m₁ ε₁(∀ (u : U), SLang.DPSystem.prop (m₂ u) ε₂)SLang.DPSystem.prop (SLang.privComposeAdaptive m₁ m₂) (ε₁ + ε₂)

                Privacy adaptively composes by addition.

                Privacy is invariant under post-processing.

                theorem SLang.DPSystem_prop_ext {T : Type} {U : Type} [dps : SLang.DPSystem T] {ε₁ : NNReal} {ε₂ : NNReal} (m : SLang.Mechanism T U) (Hε : ε₁ = ε₂) (H : SLang.DPSystem.prop m ε₁) :
                @[simp]
                theorem SLang.bind_bind_indep {T : Type} {U : Type} {V : Type} {A : Type} (p : SLang.Mechanism T U) (q : SLang.Mechanism T V) (h : UVPMF A) :
                (fun (l : List T) => do let ap l let bq l h a b) = fun (l : List T) => do let zSLang.privCompose p q l h z.1 z.2
                theorem SLang.compose_sum_rw {U : Type u_1} {V : Type u_2} (nq1 : UENNReal) (nq2 : VENNReal) (b : U) (c : V) :
                (∑' (a : U), nq1 a * ∑' (a_1 : V), if b = a c = a_1 then nq2 a_1 else 0) = nq1 b * nq2 c
                theorem SLang.ENNReal.HasSum_fiberwise {T : Type u_1} {V : Type u_2} {f : TENNReal} {a : ENNReal} (hf : HasSum f a) (g : TV) :
                HasSum (fun (c : V) => ∑' (b : (g ⁻¹' {c})), f b) a

                Partition series into fibers. g maps an element to its fiber.

                theorem SLang.ENNReal.tsum_fiberwise {T : Type u_1} {V : Type u_2} (p : TENNReal) (f : TV) :
                ∑' (x : V) (b : (f ⁻¹' {x})), p b = ∑' (i : T), p i

                Partition series into fibers. g maps an element to its fiber.

                theorem SLang.fiberwisation {T : Type u_1} {V : Type u_2} (p : TENNReal) (f : TV) :
                ∑' (i : T), p i = ∑' (x : V), if {a : T | x = f a} = then 0 else ∑' (i : {a : T | x = f a}), p i

                Rewrite a series into a sum over fibers. f maps an element into its fiber.

                theorem SLang.condition_to_subset {U : Type u_1} {V : Sort u_2} (f : UV) (g : UENNReal) (x : V) :
                (∑' (a : U), if x = f a then g a else 0) = ∑' (a : {a : U | x = f a}), g a