AFTD Auto-Formalizing Theoretical Domains

CommunicationComplexity.Deterministic.Protocol.comap_run

theoremverifiedimported Lean

Pull-back commutes with protocol execution. Let $p$ be a deterministic two-party communication protocol with Alice's inputs drawn from $X$ and Bob's from $Y$, producing values in $\alpha$, and let $f_X : X' \to X$ and $f_Y : Y' \to Y$ be arbitrary maps of input types. Then for all $x' \in X'$ and $y' \in Y'$, running the pull-back of $p$ along $f_X$ and $f_Y$ on the inputs $x'$ and $y'$ yields the same output as running $p$ itself on the transported inputs $f_X(x')$ and $f_Y(y')$.

Statement

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
variable {X Y α : Type*} in
@[simp]
theorem CommunicationComplexity.Deterministic.Protocol.comap_run {X' Y' : Type*} (p : Protocol X Y α) (fX : X' → X) (fY : Y' → Y)
    (x' : X') (y' : Y') :
    (p.comap fX fY).run x' y' = p.run (fX x') (fY y')
Source
TCSlib, `CommunicationComplexity.Deterministic.Protocol.comap_run`
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 6
Used by 35

Lean source view module on GitHub

set_option relaxedAutoImplicit false inset_option autoImplicit false invariable {X Y α : Type*} in/-- Running the pulled-back protocol on `(x', y')` gives the same output as running the original protocol on `(fX x', fY y')`. -/@[simp]theorem CommunicationComplexity.Deterministic.Protocol.comap_run {X' Y' : Type*} (p : Protocol X Y α) (fX : X' → X) (fY : Y' → Y)    (x' : X') (y' : Y') :    (p.comap fX fY).run x' y' = p.run (fX x') (fY y') := by  induction p <;> simp [comap, run, *]
See it in the graphDiscuss this resultChallenge it