Documentation

CslibFrontier.Computability.Communication.DagProtocol

Dag-like protocols #

A dag-like protocol for a search problem R : X → Y → O → Prop is a directed acyclic graph through which Alice, holding x : X, and Bob, holding y : Y, walk from a source to a leaf labelled by an answer. At each inner node the players run a deterministic tree protocol (Cslib.Communication.Protocol) that decides whether the node is consistent with their inputs and, if it is, names the next node. A protocol solves R on A × B when, for inputs from A × B, the source is consistent and consistent nodes lead only to consistent nodes, where a leaf is consistent when its answer is related to the inputs (DagProtocol.Solves). The walk from the source then ends at a related answer (DagProtocol.Solves.exists_run_eq). Its communication complexity is the largest depth of the tree protocols at the inner nodes (DagProtocol.depth).

This is Krajíček's notion of a protocol for the Karchmer–Wigderson game Krajíček, Definition 2.2, for the relation DiffersAt (or ExceedsAt for monotone protocols), which he describes as a variant of Razborov's formulation with PLS problems [Raz95b]. Tree protocols for this game correspond to formulas (Cslib.Communication.KWProtocol); dag-like protocols, whose nodes can be reached along many paths, correspond to circuits: one with k inner nodes and communication complexity t gives a separating circuit with k · 2 ^ O(t) gates (CslibFrontier.Computability.Circuit.DagProtocol). The representation differs from Definition 2.2 in inessential ways:

Main definitions #

Main results #

References #

structure Cslib.Communication.DagProtocol (X : Type u_1) (Y : Type u_2) (O : Type u_3) (k : ℕ) :
Type (max (max u_1 u_2) u_3)

A dag-like protocol with k inner nodes between Alice, holding x : X, and Bob, holding y : Y, with answers in O Krajíček, Definition 2.2. The inner nodes are 0, …, k - 1 and the leaves are labelled by answers. At inner node j the players run the tree protocol step j: it answers none if j is not consistent with the inputs, and otherwise names the next node, an earlier inner node i < j or a leaf labelled by an answer.

  • step (j : Fin k) : Protocol X Y (Option (Fin ↑j ⊕ O))

    The tree protocol at inner node j, which answers none if j is inconsistent with the inputs and otherwise names the next node: an earlier inner node or an answer.

  • root : Fin k ⊕ O

    The source: an inner node or an answer.

def Cslib.Communication.DagProtocol.node {O : Type u_3} {k : ℕ} (j : Fin k) :
Fin ↑j ⊕ O → Fin k ⊕ O

The node named by an answer of the tree protocol at inner node j, among all nodes.

@[simp]
theorem Cslib.Communication.DagProtocol.node_inl {O : Type u_3} {k : ℕ} (j : Fin k) (i : Fin ↑j) :
@[simp]
theorem Cslib.Communication.DagProtocol.node_inr {O : Type u_3} {k : ℕ} (j : Fin k) (o : O) :
def Cslib.Communication.DagProtocol.Consistent {X : Type u_1} {Y : Type u_2} {O : Type u_3} {k : ℕ} (P : DagProtocol X Y O k) (R : X → Y → O → Prop) :
Fin k ⊕ O → X → Y → Prop

Node s is consistent with Alice's input x and Bob's input y for the relation R: an inner node when its tree protocol does not answer none, and a leaf when its answer is related to x and y. This is Krajíček's consistency condition F(x, y).

@[simp]
theorem Cslib.Communication.DagProtocol.consistent_inl {X : Type u_1} {Y : Type u_2} {O : Type u_3} {k : ℕ} (P : DagProtocol X Y O k) (R : X → Y → O → Prop) (j : Fin k) (x : X) (y : Y) :
P.Consistent R (Sum.inl j) x y ↔ (P.step j).run x y ≠ none
@[simp]
theorem Cslib.Communication.DagProtocol.consistent_inr {X : Type u_1} {Y : Type u_2} {O : Type u_3} {k : ℕ} (P : DagProtocol X Y O k) (R : X → Y → O → Prop) (o : O) (x : X) (y : Y) :
P.Consistent R (Sum.inr o) x y ↔ R x y o
def Cslib.Communication.DagProtocol.Solves {X : Type u_1} {Y : Type u_2} {O : Type u_3} {k : ℕ} (P : DagProtocol X Y O k) (R : X → Y → O → Prop) (A : Set X) (B : Set Y) :

A dag-like protocol solves the relation R on A × B when, for every pair of inputs from A × B, the source is consistent, and every node named by the tree protocol at an inner node is consistent Krajíček, Definition 2.2 (4). The tree protocol names a node only when its own node is consistent, so consistency is closed under the steps of the walk, and the walk from the source ends at a related answer (DagProtocol.Solves.exists_run_eq).

def Cslib.Communication.DagProtocol.depth {X : Type u_1} {Y : Type u_2} {O : Type u_3} {k : ℕ} (P : DagProtocol X Y O k) :

The communication complexity of a dag-like protocol: the largest depth of the tree protocols at its inner nodes.

theorem Cslib.Communication.DagProtocol.depth_step_le {X : Type u_1} {Y : Type u_2} {O : Type u_3} {k : ℕ} (P : DagProtocol X Y O k) (j : Fin k) :
@[irreducible]
def Cslib.Communication.DagProtocol.runFrom {X : Type u_1} {Y : Type u_2} {O : Type u_3} {k : ℕ} (P : DagProtocol X Y O k) (x : X) (y : Y) :
Fin k ⊕ O → Option O

The walk from node s on Alice's input x and Bob's input y: the answer at the leaf it reaches, or none if it meets an inner node whose tree protocol answers none.

def Cslib.Communication.DagProtocol.run {X : Type u_1} {Y : Type u_2} {O : Type u_3} {k : ℕ} (P : DagProtocol X Y O k) (x : X) (y : Y) :

The answer at the end of the walk from the source, or none if the walk meets an inconsistent inner node.

theorem Cslib.Communication.DagProtocol.Solves.exists_runFrom_eq {X : Type u_1} {Y : Type u_2} {O : Type u_3} {k : ℕ} {P : DagProtocol X Y O k} {R : X → Y → O → Prop} {A : Set X} {B : Set Y} (hP : P.Solves R A B) {x : X} (hx : x ∈ A) {y : Y} (hy : y ∈ B) (s : Fin k ⊕ O) (hs : P.Consistent R s x y) :
∃ (o : O), P.runFrom x y s = some o ∧ R x y o

From a consistent node, the walk of a protocol solving R ends at a related answer.

theorem Cslib.Communication.DagProtocol.Solves.exists_run_eq {X : Type u_1} {Y : Type u_2} {O : Type u_3} {k : ℕ} {P : DagProtocol X Y O k} {R : X → Y → O → Prop} {A : Set X} {B : Set Y} (hP : P.Solves R A B) {x : X} (hx : x ∈ A) {y : Y} (hy : y ∈ B) :
∃ (o : O), P.run x y = some o ∧ R x y o

A dag-like protocol solving R on A × B solves the search problem: on every pair of inputs from A × B, the walk from the source ends at an answer related to them.

theorem Cslib.Communication.DagProtocol.Solves.mono {X : Type u_1} {Y : Type u_2} {O : Type u_3} {k : ℕ} {P : DagProtocol X Y O k} {R : X → Y → O → Prop} {A : Set X} {B : Set Y} (hP : P.Solves R A B) {A' : Set X} {B' : Set Y} (hA : A' ⊆ A) (hB : B' ⊆ B) :
P.Solves R A' B'

A protocol solving a relation on A × B solves it on smaller sets.