AFTD Auto-Formalizing Theoretical Domains

CommunicationComplexity.Deterministic.Protocol.comap_complexity

theoremverifiedimported Lean

Pull-back preserves communication complexity. Let $p$ be a deterministic two-party communication protocol with Alice's inputs drawn from $X$, Bob's inputs from $Y$, and outputs in $\alpha$, and let $f_X : X' \to X$ and $f_Y : Y' \to Y$ be maps re-indexing the two input types. Then the pull-back protocol over $X'$ and $Y'$ obtained by pre-composing each of Alice's message functions with $f_X$ and each of Bob's message functions with $f_Y$ has the same communication complexity as $p$.

Statement

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
variable {X Y α : Type*} in
@[simp]
theorem CommunicationComplexity.Deterministic.Protocol.comap_complexity {X' Y' : Type*} (p : Protocol X Y α) (fX : X' → X) (fY : Y' → Y) :
    (p.comap fX fY).complexity = p.complexity
Source
TCSlib, `CommunicationComplexity.Deterministic.Protocol.comap_complexity`
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
propext
Built on 4
Used by 36

Lean source view module on GitHub

set_option relaxedAutoImplicit false inset_option autoImplicit false invariable {X Y α : Type*} in/-- Pulling a protocol back along input maps does not change its complexity. -/@[simp]theorem CommunicationComplexity.Deterministic.Protocol.comap_complexity {X' Y' : Type*} (p : Protocol X Y α) (fX : X' → X) (fY : Y' → Y) :    (p.comap fX fY).complexity = p.complexity := by  induction p <;> simp [comap, complexity, *]
See it in the graphDiscuss this resultChallenge it