Documentation

MIPRE.Background.Repetition.CommutingRepetition.Prerounding.Sampler

Rounding a law to a common denominator #

noncomputable def CommutingRepetition.RoundedSampler.ceilNum {H : Type} (dens : ) (ρ : ) (q : H) (h : H) :

Ceiling numerators ⌈dens (1−ρ) q(h)⌉.

Equations
Instances For
    noncomputable def CommutingRepetition.RoundedSampler.roundedNum {H : Type} [Fintype H] [DecidableEq H] (dens : ) (ρ : ) (q : H) (h₀ h : H) :

    The rounded numerators: the ceilings, with the leftover on a base point.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      theorem CommutingRepetition.RoundedSampler.sum_ceilNum_le {H : Type} [Fintype H] [DecidableEq H] (dens : ) {ρ : } (hρ1 : ρ 1) (q : H) (hq0 : ∀ (h : H), 0 q h) (hq1 : h : H, q h 1) (hcard : (Fintype.card H) dens * ρ) :
      h : H, ceilNum dens ρ q h dens
      theorem CommutingRepetition.RoundedSampler.sum_roundedNum {H : Type} [Fintype H] [DecidableEq H] (dens : ) {ρ : } (hρ1 : ρ 1) (q : H) (hq0 : ∀ (h : H), 0 q h) (hq1 : h : H, q h 1) (hcard : (Fintype.card H) dens * ρ) (h₀ : H) :
      h : H, roundedNum dens ρ q h₀ h = dens
      theorem CommutingRepetition.RoundedSampler.le_roundedNum {H : Type} [Fintype H] [DecidableEq H] (dens : ) (ρ : ) (q : H) (h₀ h : H) :
      dens * (1 - ρ) * q h (roundedNum dens ρ q h₀ h)
      theorem CommutingRepetition.RoundedSampler.roundedNum_eq_zero {H : Type} [Fintype H] [DecidableEq H] (dens : ) (ρ : ) (q : H) (h₀ h : H) (hq : q h = 0) (hne : h h₀) :
      roundedNum dens ρ q h₀ h = 0

      The shared seed and the output #

      theorem CommutingRepetition.RoundedSampler.rationalMarked_nonempty {H : Type} [Fintype H] [DecidableEq H] (dens : ) (hdens : 0 < dens) (num : H) (hsum : h : H, num h = dens) :
      @[reducible, inline]

      The shared seed: a live coordinate and a permutation of H × Fin dens.

      Equations
      Instances For
        noncomputable def CommutingRepetition.RoundedSampler.ν {H ι : Type} [Fintype H] [DecidableEq H] [Fintype ι] (dens : ) ( : Seed H ι dens) :

        The uniform seed law.

        Equations
        Instances For
          theorem CommutingRepetition.RoundedSampler.ν_nonneg {H ι : Type} [Fintype H] [DecidableEq H] [Fintype ι] [DecidableEq ι] (dens : ) (ω : Seed H ι dens) :
          0 ν dens ω
          theorem CommutingRepetition.RoundedSampler.ν_sum {H ι : Type} [Fintype H] [DecidableEq H] [Fintype ι] [DecidableEq ι] [Nonempty ι] (dens : ) :
          ω : Seed H ι dens, ν dens ω = 1
          noncomputable def CommutingRepetition.RoundedSampler.output {H ι : Type} [Fintype H] [DecidableEq H] (dens : ) (hdens : 0 < dens) (num : ιH) (hsum : ∀ (i : ι), h : H, num i h = dens) (ω : Seed H ι dens) :
          H

          The output of the shared-permutation sampler at seed ω for the numerators of live coordinate ω.1.

          Equations
          Instances For

            The uniform permutation probability as an indicator sum.

            theorem CommutingRepetition.RoundedSampler.sum_ite_ne_eq_uniform {H : Type} [Fintype H] [DecidableEq H] (dens : ) (f g : Equiv.Perm (H × Fin dens)H) :
            (∑ π : Equiv.Perm (H × Fin dens), if f π = g π then 0 else 1) = (ClassicalSampling.uniformPermutationProbability fun (π : Equiv.Perm (H × Fin dens)) => f π g π) * (Fintype.card (Equiv.Perm (H × Fin dens)))

            The disagreement probability as an indicator sum.

            theorem CommutingRepetition.RoundedSampler.sum_ν_output {H ι : Type} [Fintype H] [DecidableEq H] [Fintype ι] [DecidableEq ι] (dens : ) (hdens : 0 < dens) (num : ιH) (hsum : ∀ (i : ι), h : H, num i h = dens) (h : H) :
            (∑ ω : Seed H ι dens, ν dens ω * if output dens hdens num hsum ω = h then 1 else 0) = (↑(Fintype.card ι))⁻¹ * i : ι, (num i h) / dens

            The output law: Pr[output = h] = (1/|ι|) ∑_i num(i, h)/dens.

            theorem CommutingRepetition.RoundedSampler.sum_num_eq {H ι : Type} [Fintype H] [DecidableEq H] [Fintype ι] [DecidableEq ι] (dens : ) (num : ιH) (lc : Hι) (hsupp : ∀ (i : ι) (h : H), lc h inum i h = 0) (h : H) :
            i : ι, (num i h) / dens = (num (lc h) h) / dens

            Numerators supported on the live coordinate collapse the coordinate sum.

            Relative entropy against a dominating law #

            theorem CommutingRepetition.RoundedSampler.finiteRelativeEntropy_le_of_dominates {κ : Type} [Fintype κ] (Q J₀ J' : κ) (hQ0 : ∀ (u : κ), 0 Q u) (hQ1 : u : κ, Q u = 1) (hJ₀ : ∀ (u : κ), 0 J₀ u) (habs : ∀ (u : κ), J₀ u = 0Q u = 0) (hJ'0 : ∀ (u : κ), 0 J' u) (hJ'1 : u : κ, J' u 1) {ρ : } ( : ρ < 1) (hdom : ∀ (u : κ), (1 - ρ) * J₀ u J' u) :
            Pinsker.finiteRelativeEntropy Q J' u : κ, Q u * Real.log (Q u / J₀ u) + Real.log (1 / (1 - ρ))

            If J' ≥ (1−ρ) J₀ pointwise, the relative entropy against J' is at most the log-sum against J₀ plus log(1/(1−ρ)).

            Total variation #

            theorem CommutingRepetition.RoundedSampler.sum_comm3' {α β γ : Type} [Fintype α] [Fintype β] [Fintype γ] (F : αβγ) :
            a : α, b : β, c : γ, F a b c = b : β, c : γ, a : α, F a b c

            Moving the first of three finite sums to the back.

            theorem CommutingRepetition.RoundedSampler.sum_ν_disagree_le {H ι X Y : Type} [Fintype H] [DecidableEq H] [Fintype ι] [DecidableEq ι] [Fintype X] [Fintype Y] (dens : ) (hdens : 0 < dens) (numA : ιXH) (numB : ιYH) (hA : ∀ (i : ι) (x : X), h : H, numA i x h = dens) (hB : ∀ (i : ι) (y : Y), h : H, numB i y h = dens) (lc : Hι) (hsA : ∀ (i : ι) (x : X) (h : H), lc h inumA i x h = 0) (hsB : ∀ (i : ι) (y : Y) (h : H), lc h inumB i y h = 0) (μ : XY) ( : ∀ (x : X) (y : Y), 0 μ x y) :
            (∑ ω : Seed H ι dens, x : X, y : Y, ν dens ω * μ x y * if output dens hdens (fun (i : ι) => numA i x) ω = output dens hdens (fun (i : ι) => numB i y) ω then 0 else 1) 2 * Pinsker.finiteTotalVariation (fun (u : H × X × Y) => (↑(Fintype.card ι))⁻¹ * μ u.2.1 u.2.2 * ((numA (lc u.1) u.2.1 u.1) / dens)) fun (u : H × X × Y) => (↑(Fintype.card ι))⁻¹ * μ u.2.1 u.2.2 * ((numB (lc u.1) u.2.2 u.1) / dens)

            The mismatch bound: the shared seed makes the two outputs disagree with probability at most twice the total variation of the two output tuple laws.

            Sum reorderings and the normalization of the output tuple laws #

            theorem CommutingRepetition.RoundedSampler.sum_triple {H X Y : Type} [Fintype H] [Fintype X] [Fintype Y] (F : H × X × Y) :
            u : H × X × Y, F u = h : H, x : X, y : Y, F (h, x, y)
            theorem CommutingRepetition.RoundedSampler.sum_comm_hxyω {H X Y S : Type} [Fintype H] [Fintype X] [Fintype Y] [Fintype S] (F : HXYS) :
            h : H, x : X, y : Y, ω : S, F h x y ω = ω : S, x : X, y : Y, h : H, F h x y ω
            theorem CommutingRepetition.RoundedSampler.sum_law_A {H ι X Y : Type} [Fintype H] [DecidableEq H] [Fintype ι] [DecidableEq ι] [Fintype X] [Fintype Y] [Nonempty ι] (dens : ) (hdens : 0 < dens) (num : XιH) (hsum : ∀ (x : X) (i : ι), h : H, num x i h = dens) (μ : XY) (hμsum : x : X, y : Y, μ x y = 1) :
            u : H × X × Y, (∑ ω : Seed H ι dens, ν dens ω * if output dens hdens (num u.2.1) ω = u.1 then 1 else 0) * μ u.2.1 u.2.2 = 1

            The Alice-side output tuple law (∑_ω ν(ω) [r_A(ω,x) = h]) μ(x,y) is a probability law.

            theorem CommutingRepetition.RoundedSampler.sum_law_B {H ι X Y : Type} [Fintype H] [DecidableEq H] [Fintype ι] [DecidableEq ι] [Fintype X] [Fintype Y] [Nonempty ι] (dens : ) (hdens : 0 < dens) (num : YιH) (hsum : ∀ (y : Y) (i : ι), h : H, num y i h = dens) (μ : XY) (hμsum : x : X, y : Y, μ x y = 1) :
            u : H × X × Y, (∑ ω : Seed H ι dens, ν dens ω * if output dens hdens (num u.2.2) ω = u.1 then 1 else 0) * μ u.2.1 u.2.2 = 1

            The Bob-side output tuple law is a probability law.