AFTD Auto-Formalizing Theoretical Domains

CommunicationComplexity.Deterministic.Protocol.leafRectangles_mono

theoremverifiedimported Lean

Leaf rectangles of a protocol are monochromatic. Let $p$ be a deterministic two-party communication protocol over input types $X$ and $Y$ with output type $\alpha$, and let $g : X \to Y \to \alpha$ be a function that $p$ computes, meaning that running $p$ on any pair of inputs $(x, y)$ returns $g\,x\,y$. Then every leaf rectangle $R$ of $p$ is monochromatic for $g$: the value $g\,x\,y$ is the same for all $(x, y) \in R$.

Statement

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
variable {X Y α : Type*} in
lemma CommunicationComplexity.Deterministic.Protocol.leafRectangles_mono (p : Protocol X Y α)
    (g : X → Y → α) (h_comp : Computes p g)
    (R : Set (X × Y)) (hR : R ∈ leafRectangles p) : Rectangle.IsMonochromatic R g
Source
TCSlib, `CommunicationComplexity.Deterministic.Protocol.leafRectangles_mono`
Lean proof
By Lucy Horowitz, Timothe Kasriel, Mihir Singhal, from github.com/Shilun-Allan-Li/tcslib at c8a02591b1e5 (Copyright (c) 2026 Lucy Horowitz, Timothe Kasriel, and Mihir Singhal. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.25.0.
Verified
07 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 5
Used by 2

Lean source view module on GitHub

set_option relaxedAutoImplicit false inset_option autoImplicit false invariable {X Y α : Type*} in/-- If `p` computes `g`, then every leaf rectangle of `p` is monochromatic for `g`, i.e. `g` takes a single value on it [RY20, Lemma 1.6]: two inputs in the same leaf rectangle reach the same leaf, hence produce the same output. -/lemma CommunicationComplexity.Deterministic.Protocol.leafRectangles_mono (p : Protocol X Y α)    (g : X → Y → α) (h_comp : Computes p g)    (R : Set (X × Y)) (hR : R ∈ leafRectangles p) : Rectangle.IsMonochromatic R g := by  intro x x' y y' hxy hxy'  have := aux_mono p Set.univ Set.univ R hR x x' y y' hxy hxy'  simp only [Computes, funext_iff] at h_comp  rw [← h_comp x y, ← h_comp x' y']; exact this
See it in the graphDiscuss this resultChallenge it