Documentation

CslibFrontier.Computability.Communication.NOF.TwoParty

Two-player number-on-forehead protocols #

With two players, the player with x 0 on their forehead sees exactly x 1 and the other player sees exactly x 0, so a two-party protocol (Cslib.Communication.Protocol) can be played by players Fin 2, with player 1 as Alice, who holds x 0, and player 0 as Bob. A two-party protocol runs as a two-player NOF protocol with the same depth (NOF.Protocol.ofTwoParty), so two-party upper bounds are NOF upper bounds (NOF.Protocol.ecomplexityFun_le_twoParty). Cylinder intersections for two players are rectangles, and the NOF discrepancy is the two-party discrepancy of Cslib.Communication.discrepancy (NOF.discrepancy_fin_two), so with two players the NOF discrepancy bound of Cslib.Communication.NOF.Protocol.two_mul_le_two_pow_mul_discrepancy is the two-party one.

Main definitions #

Main results #

References #

theorem Cslib.Communication.NOF.view_zero_apply_one {X : Fin 2 → Type v} (x : (i : Fin 2) → X i) :
view 0 x ⟨1, ⋯⟩ = x 1
theorem Cslib.Communication.NOF.view_one_apply_zero {X : Fin 2 → Type v} (x : (i : Fin 2) → X i) :
view 1 x ⟨0, ⋯⟩ = x 0
theorem Cslib.Communication.NOF.view_zero_eq_iff {X : Fin 2 → Type v} {x y : (i : Fin 2) → X i} :
view 0 x = view 0 y ↔ x 1 = y 1

With two players, player 0 sees x 1 and nothing else.

theorem Cslib.Communication.NOF.view_one_eq_iff {X : Fin 2 → Type v} {x y : (i : Fin 2) → X i} :
view 1 x = view 1 y ↔ x 0 = y 0

With two players, player 1 sees x 0 and nothing else.

A two-party protocol as a two-player number-on-forehead protocol: Alice, who holds x 0, is player 1, who sees x 0, and Bob, who holds x 1, is player 0.

@[simp]
theorem Cslib.Communication.NOF.Protocol.run_ofTwoParty {X : Fin 2 → Type v} {Z : Type w} (p : Communication.Protocol (X 0) (X 1) Z) (x : (i : Fin 2) → X i) :
(ofTwoParty p).run x = p.run (x 0) (x 1)
theorem Cslib.Communication.NOF.Protocol.ecomplexityFun_le_twoParty {X : Fin 2 → Type v} {Z : Type w} (f : ((i : Fin 2) → X i) → Z) :

Two-party protocols are two-player NOF protocols: computing f with two players costs at most the two-party communication complexity of f read as a function of x 0 and x 1.

Discrepancy #

theorem Cslib.Communication.NOF.discrepancy_fin_two {X : Fin 2 → Type v} [(i : Fin 2) → Fintype (X i)] (ν : PMF ((i : Fin 2) → X i)) (f : ((i : Fin 2) → X i) → Bool) :
discrepancy ν f = Communication.discrepancy (PMF.map (⇑(piFinTwoEquiv X)) ν) fun (a : X 0) (b : X 1) => f ((piFinTwoEquiv X).symm (a, b))

With two players the NOF discrepancy is the two-party discrepancy: the cylinder intersections of two players are the rectangles.