Documentation

CslibFrontier.Computability.Communication.Partition

Arbitrary labelled rectangle partitions and monochromatic tilings #

A RectanglePartition X Y Z is a finite family of labelled Cartesian rectangles covering X × Y exactly once. It need not arise from a protocol tree. Its run function is constant on each rectangle; conversely, p.run = f says that it is a monochromatic tiling of f. Empty pieces are allowed and count toward size, but cannot improve the minimum.

The minimum tilingNumber f is the infimum of all such sizes in ℕ∞, with value ⊤ if there is no finite tiling. For finite input types, singleton rectangles supply a tiling, including the zero-piece tiling of an empty input domain, and the minimum is attained. This is the partition notion of [AroraBarak07, Definition 12.6].

Main definitions #

Main results #

structure Cslib.Communication.RectanglePartition (X : Type u_4) (Y : Type u_5) (Z : Type u_6) :
Type (max (max u_4 u_5) u_6)

A finite labelled partition into Cartesian rectangles, independently of protocol trees.

  • size : ℕ

    Number of pieces, including any empty rectangles.

  • alice : Fin self.size → Set X

    Alice's side of each rectangle.

  • bob : Fin self.size → Set Y

    Bob's side of each rectangle.

  • output : Fin self.size → Z

    Output label of each rectangle.

  • partition (x : X) (y : Y) : ∃! i : Fin self.size, x ∈ self.alice i ∧ y ∈ self.bob i

    Each input pair belongs to exactly one rectangle.

noncomputable def Cslib.Communication.RectanglePartition.part {X : Type u_1} {Y : Type u_2} {Z : Type u_3} (p : RectanglePartition X Y Z) (x : X) (y : Y) :

The unique rectangle containing a pair of inputs.

theorem Cslib.Communication.RectanglePartition.part_mem {X : Type u_1} {Y : Type u_2} {Z : Type u_3} (p : RectanglePartition X Y Z) (x : X) (y : Y) :
x ∈ p.alice (p.part x y) ∧ y ∈ p.bob (p.part x y)

Each input pair belongs to the rectangle selected by part.

theorem Cslib.Communication.RectanglePartition.part_eq_iff {X : Type u_1} {Y : Type u_2} {Z : Type u_3} {p : RectanglePartition X Y Z} {x : X} {y : Y} {i : Fin p.size} :
p.part x y = i ↔ x ∈ p.alice i ∧ y ∈ p.bob i

Membership in a rectangle characterizes the selected piece.

noncomputable def Cslib.Communication.RectanglePartition.run {X : Type u_1} {Y : Type u_2} {Z : Type u_3} (p : RectanglePartition X Y Z) (x : X) (y : Y) :
Z

The function computed by the labels of a rectangle partition.

theorem Cslib.Communication.RectanglePartition.run_eq_output_part {X : Type u_1} {Y : Type u_2} {Z : Type u_3} (p : RectanglePartition X Y Z) (x : X) (y : Y) :
p.run x y = p.output (p.part x y)

The value is the label of the unique containing rectangle.

theorem Cslib.Communication.RectanglePartition.run_eq_output {X : Type u_1} {Y : Type u_2} {Z : Type u_3} {p : RectanglePartition X Y Z} {x : X} {y : Y} {i : Fin p.size} (hx : x ∈ p.alice i) (hy : y ∈ p.bob i) :
p.run x y = p.output i

The function is constant on each rectangle.

theorem Cslib.Communication.RectanglePartition.sum_eq_sum_rectangles {X : Type u_1} {Y : Type u_2} {Z : Type u_3} [Fintype X] [Fintype Y] {M : Type u_4} [AddCommMonoid M] (p : RectanglePartition X Y Z) (g : X → Y → M) :
∑ x : X, ∑ y : Y, g x y = ∑ i : Fin p.size, ∑ x : X with x ∈ p.alice i, ∑ y : Y with y ∈ p.bob i, g x y

Sums over the input domain split exactly over all rectangle pieces.

def Cslib.Communication.RectanglePartition.constant {Z : Type u_3} (X : Type u_4) (Y : Type u_5) (z : Z) :

A constant function has a one-rectangle tiling, also when the input domain is empty.

theorem Cslib.Communication.RectanglePartition.run_constant {Z : Type u_3} (X : Type u_4) (Y : Type u_5) (z : Z) :
(constant X Y z).run = fun (x : X) (x_1 : Y) => z

The whole-domain rectangle computes its constant label.

noncomputable def Cslib.Communication.RectanglePartition.singletons {X : Type u_1} {Y : Type u_2} {Z : Type u_3} [Fintype X] [Fintype Y] (f : X → Y → Z) :

Singleton rectangles give a tiling of any function on finite inputs.

theorem Cslib.Communication.RectanglePartition.run_singletons {X : Type u_1} {Y : Type u_2} {Z : Type u_3} [Fintype X] [Fintype Y] (f : X → Y → Z) :

The singleton tiling computes the original function, even on an empty input domain.

noncomputable def Cslib.Communication.tilingNumber {X : Type u_1} {Y : Type u_2} {Z : Type u_3} (f : X → Y → Z) :

The minimum number of rectangles in a monochromatic tiling of f, or ⊤ if there is no finite tiling. Empty pieces are counted, so including them cannot lower the infimum.

theorem Cslib.Communication.RectanglePartition.tilingNumber_le {X : Type u_1} {Y : Type u_2} {Z : Type u_3} (p : RectanglePartition X Y Z) {f : X → Y → Z} (hp : p.run = f) :

Any monochromatic tiling bounds the minimum tiling number.

theorem Cslib.Communication.le_tilingNumber_iff {X : Type u_1} {Y : Type u_2} {Z : Type u_3} {f : X → Y → Z} {c : ℕ∞} :
c ≤ tilingNumber f ↔ ∀ (p : RectanglePartition X Y Z), p.run = f → c ≤ ↑p.size

Lower bounds on the tiling number are exactly bounds on every monochromatic tiling.

theorem Cslib.Communication.tilingNumber_le_iff {X : Type u_1} {Y : Type u_2} {Z : Type u_3} {f : X → Y → Z} {n : ℕ} :
tilingNumber f ≤ ↑n ↔ ∃ (p : RectanglePartition X Y Z), p.run = f ∧ p.size ≤ n

A finite bound on the tiling number is witnessed by a tiling of at most that size.

theorem Cslib.Communication.exists_minimal_tiling {X : Type u_1} {Y : Type u_2} {Z : Type u_3} [Finite X] [Finite Y] (f : X → Y → Z) :
∃ (p : RectanglePartition X Y Z), p.run = f ∧ ↑p.size = tilingNumber f

On finite input types the minimum is attained; no protocol realization is assumed.