Documentation

CslibFrontier.Computability.Communication.NOF.Discrepancy

Cylinder intersections and the multiparty discrepancy bound #

A set of inputs is a cylinder in the i-th dimension when membership does not depend on the i-th part of the input, and a cylinder intersection is an intersection of cylinders, one in each dimension (NOF.IsCylinder, NOF.IsCylinderIntersection) Jukna, Section 5.4, p. 140. A cylinder in the i-th dimension is a set of inputs determined by what player i sees, so a cylinder intersection is the set NOF.cylinderIntersection φ of inputs x that pass a test φ i (view i x) of every player i (NOF.isCylinderIntersection_iff). After a player writes a bit, the inputs consistent with the blackboard so far still form a cylinder intersection, so the inputs reaching a leaf of a protocol form a cylinder intersection, on which the output is constant.

The discrepancy of f : (∀ i, X i) → Bool under a distribution ν on inputs is the largest imbalance |ν(C ∩ f⁻¹ false) - ν(C ∩ f⁻¹ true)| over cylinder intersections C (NOF.discrepancy) Jukna, Section 5.5, p. 143; discrepancy lower bounds for NOF protocols go back to Babai, Nisan and Szegedy [BNS92]. Splitting a cylinder intersection at each node of the protocol, the correlation under ν of f with the output of a protocol of depth c on a cylinder intersection is at most 2 ^ c times the discrepancy (NOF.Protocol.abs_sum_mul_signVal_le). This correlation is 1 - 2 ε on all inputs, for a protocol erring with probability ε on inputs drawn from ν (NOF.Protocol.sum_mul_signVal_eq). Hence a protocol sending c bits with error 1 / 2 - γ under ν has 2 γ ≤ 2 ^ c disc_ν(f) (NOF.Protocol.two_mul_le_two_pow_mul_discrepancy), and by averaging the same holds for public-coin protocols with error 1 / 2 - γ on every input (NOF.PublicCoin.two_mul_le_two_pow_mul_discrepancy). For protocols computing f exactly this is c ≥ log₂ (1 / disc_ν(f)) (NOF.Protocol.one_le_two_pow_mul_discrepancy).

Main definitions #

Main results #

References #

Cylinder intersections #

def Cslib.Communication.NOF.IsCylinder {ι : Type u} {X : ι → Type v} [DecidableEq ι] (i : ι) (C : Set ((j : ι) → X j)) :

A set of inputs is a cylinder in the i-th dimension when membership does not depend on the i-th part of the input.

def Cslib.Communication.NOF.IsCylinderIntersection {ι : Type u} {X : ι → Type v} [DecidableEq ι] (C : Set ((j : ι) → X j)) :

A cylinder intersection is an intersection of cylinders, one in each dimension.

def Cslib.Communication.NOF.cylinderIntersection {ι : Type u} {X : ι → Type v} (φ : (i : ι) → View X i → Bool) :
Set ((j : ι) → X j)

The cylinder intersection of the tests φ i: the inputs x such that every player i accepts what they see, φ i (view i x) = true.

@[simp]
theorem Cslib.Communication.NOF.mem_cylinderIntersection {ι : Type u} {X : ι → Type v} {φ : (i : ι) → View X i → Bool} {x : (j : ι) → X j} :
x ∈ cylinderIntersection φ ↔ ∀ (i : ι), φ i (view i x) = true
@[instance_reducible]
instance Cslib.Communication.NOF.decidableMemCylinderIntersection {ι : Type u} {X : ι → Type v} [Fintype ι] (φ : (i : ι) → View X i → Bool) :
DecidablePred fun (x : (j : ι) → X j) => x ∈ cylinderIntersection φ

With finitely many players, membership in a cylinder intersection is decidable. Sums over cylinder intersections use this instance for every index type, including Fin k.

@[simp]
theorem Cslib.Communication.NOF.cylinderIntersection_true {ι : Type u} {X : ι → Type v} :
(cylinderIntersection fun (x : ι) (x_1 : View X x) => true) = Set.univ
theorem Cslib.Communication.NOF.isCylinderIntersection_iff {ι : Type u} {X : ι → Type v} [DecidableEq ι] {C : Set ((j : ι) → X j)} :
IsCylinderIntersection C ↔ ∃ (φ : (i : ι) → View X i → Bool), C = cylinderIntersection φ

Cylinder intersections are the sets of inputs passing a test of every player: membership in a cylinder in the i-th dimension is determined by what player i sees.

theorem Cslib.Communication.NOF.Protocol.isCylinderIntersection_leaf {ι : Type u} {X : ι → Type v} [DecidableEq ι] {Z : Type u_1} (p : Protocol X Z) (l : Fin p.leafCount) :
IsCylinderIntersection {x : (j : ι) → X j | p.leaf x = l}

Leaves are cylinder intersections: the inputs reaching a given leaf form a cylinder intersection.

Discrepancy #

noncomputable def Cslib.Communication.NOF.discrepancy {ι : Type u} {X : ι → Type v} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (X i)] (ν : PMF ((i : ι) → X i)) (f : ((i : ι) → X i) → Bool) :

The discrepancy of f : (∀ i, X i) → Bool under a distribution ν on inputs: the largest imbalance |ν(C ∩ f⁻¹ false) - ν(C ∩ f⁻¹ true)| of f on a cylinder intersection C = cylinderIntersection φ, written as the signed sum |∑_{x ∈ C} ν(x) (-1)^{f x}|.

theorem Cslib.Communication.NOF.abs_sum_mul_signVal_le_one {α : Type u_1} [Finite α] (ν : PMF α) (f : α → Bool) (s : Finset α) :
|∑ x ∈ s, (ν x).toReal * BitString.signVal (f x)| ≤ 1

The signed sum of f under ν over any set of inputs has absolute value at most one.

theorem Cslib.Communication.NOF.abs_sum_le_discrepancy {ι : Type u} {X : ι → Type v} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (X i)] (ν : PMF ((i : ι) → X i)) (f : ((i : ι) → X i) → Bool) (φ : (i : ι) → View X i → Bool) :
|∑ x : (j : ι) → X j with x ∈ cylinderIntersection φ, (ν x).toReal * BitString.signVal (f x)| ≤ discrepancy ν f
theorem Cslib.Communication.NOF.discrepancy_nonneg {ι : Type u} {X : ι → Type v} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (X i)] {ν : PMF ((i : ι) → X i)} {f : ((i : ι) → X i) → Bool} :
theorem Cslib.Communication.NOF.discrepancy_le_one {ι : Type u} {X : ι → Type v} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (X i)] {ν : PMF ((i : ι) → X i)} {f : ((i : ι) → X i) → Bool} :
theorem Cslib.Communication.NOF.exists_abs_sum_eq_discrepancy {ι : Type u} {X : ι → Type v} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (X i)] (ν : PMF ((i : ι) → X i)) (f : ((i : ι) → X i) → Bool) :
∃ (φ : (i : ι) → View X i → Bool), |∑ x : (j : ι) → X j with x ∈ cylinderIntersection φ, (ν x).toReal * BitString.signVal (f x)| = discrepancy ν f

The discrepancy is attained on some cylinder intersection.

The discrepancy bound #

theorem Cslib.Communication.NOF.Protocol.abs_sum_mul_signVal_le {ι : Type u} {X : ι → Type v} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (X i)] (p : Protocol X Bool) (ν : PMF ((i : ι) → X i)) (f : ((i : ι) → X i) → Bool) (φ : (i : ι) → View X i → Bool) :
|∑ x : (j : ι) → X j with x ∈ cylinderIntersection φ, (ν x).toReal * BitString.signVal (f x) * BitString.signVal (p.run x)| ≤ 2 ^ p.depth * discrepancy ν f

Correlation with a protocol on a cylinder intersection: on the cylinder intersection of the tests φ, the correlation under ν of f with the output of a protocol is at most 2 ^ depth times the discrepancy of f under ν. The bit written at each node splits the cylinder intersection into two.

theorem Cslib.Communication.NOF.Protocol.sum_mul_signVal_eq {ι : Type u} {X : ι → Type v} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (X i)] (p : Protocol X Bool) (ν : PMF ((i : ι) → X i)) (f : ((i : ι) → X i) → Bool) :
∑ x : (i : ι) → X i, (ν x).toReal * BitString.signVal (f x) * BitString.signVal (p.run x) = 1 - 2 * p.distributionalError ν fun (x : (i : ι) → X i) (b : Bool) => f x = b

The correlation under ν of f with the output of a protocol is 1 - 2 ε, where ε is the probability that the protocol errs on inputs drawn from ν.

theorem Cslib.Communication.NOF.Protocol.two_mul_le_two_pow_mul_discrepancy {ι : Type u} {X : ι → Type v} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (X i)] {ν : PMF ((i : ι) → X i)} {f : ((i : ι) → X i) → Bool} (p : Protocol X Bool) {γ : ℝ} (hp : (p.distributionalError ν fun (x : (i : ι) → X i) (b : Bool) => f x = b) ≤ 1 / 2 - γ) :
2 * γ ≤ 2 ^ p.depth * discrepancy ν f

The discrepancy bound for deterministic protocols, generalising Jukna, Section 5.5, p. 143 (stated there for the uniform distribution and exact protocols) to any distribution and advantage, as in [BNS92]: a protocol erring with probability at most 1 / 2 - γ on inputs drawn from ν has 2 γ ≤ 2 ^ depth · disc_ν(f).

theorem Cslib.Communication.NOF.Protocol.one_le_two_pow_mul_discrepancy {ι : Type u} {X : ι → Type v} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (X i)] {f : ((i : ι) → X i) → Bool} {p : Protocol X Bool} (hp : p.run = f) (ν : PMF ((i : ι) → X i)) :
1 ≤ 2 ^ p.depth * discrepancy ν f

The discrepancy bound for exact protocols: a protocol computing f has 1 ≤ 2 ^ depth · disc_ν(f), that is, it sends at least log₂ (1 / disc_ν(f)) bits.

theorem Cslib.Communication.NOF.Protocol.one_le_two_pow_mul_discrepancy_of_ecomplexityFun_le {ι : Type u} {X : ι → Type v} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (X i)] {f : ((i : ι) → X i) → Bool} {c : ℕ} (h : ecomplexityFun f ≤ ↑c) (ν : PMF ((i : ι) → X i)) :
1 ≤ 2 ^ c * discrepancy ν f

The discrepancy bound for exact protocols: if f has communication complexity at most c, then 1 ≤ 2 ^ c · disc_ν(f) for every distribution ν.

theorem Cslib.Communication.NOF.PublicCoin.Solves.two_mul_le_two_pow_mul_discrepancy {ι : Type u} {X : ι → Type v} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (X i)] {f : ((i : ι) → X i) → Bool} {μ : PublicCoin X Bool} {γ : ℝ} {c : ℕ} (hμ : μ.Solves (1 / 2 - γ) (fun (x : (i : ι) → X i) (b : Bool) => f x = b) Set.univ) (hc : μ.depth ≤ ↑c) (ν : PMF ((i : ι) → X i)) :
2 * γ ≤ 2 ^ c * discrepancy ν f

The discrepancy bound for public-coin protocols: a public-coin protocol sending at most c bits and computing f with error at most 1 / 2 - γ on every input has 2 γ ≤ 2 ^ c · disc_ν(f) for every distribution ν.

theorem Cslib.Communication.NOF.PublicCoin.two_mul_le_two_pow_mul_discrepancy {ι : Type u} {X : ι → Type v} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (X i)] {f : ((i : ι) → X i) → Bool} {γ : ℝ} {c : ℕ} (h : ecomplexityFun (1 / 2 - γ) f ≤ ↑c) (ν : PMF ((i : ι) → X i)) :
2 * γ ≤ 2 ^ c * discrepancy ν f

The discrepancy bound, generalising Jukna, Section 5.5, p. 143 (stated there for the uniform distribution) [BNS92]: if f has public-coin communication complexity at most c with error 1 / 2 - γ, then 2 γ ≤ 2 ^ c · disc_ν(f) for every distribution ν.