AFTD Auto-Formalizing Theoretical Domains

CommunicationComplexity.Deterministic.FiniteMessage.Protocol.ofProtocol_run

theoremverifiedimported Lean

Embedding preserves protocol output. Let $X$ and $Y$ be the input types of Alice and Bob, let $\alpha$ be an output type, and let $p$ be a deterministic binary two-party communication protocol producing values in $\alpha$. Regard $p$ as a finite-message protocol by treating each of its Boolean messages as an element of the two-element type. Then for all inputs $x \in X$ and $y \in Y$, executing this embedded finite-message protocol on $x$ and $y$ yields the same value in $\alpha$ as executing $p$ directly on $x$ and $y$.

Statement

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
variable {X Y α : Type*} in
theorem CommunicationComplexity.Deterministic.FiniteMessage.Protocol.ofProtocol_run (p : Deterministic.Protocol X Y α) (x : X) (y : Y) :
    (ofProtocol p).run x y = p.run x y
Source
TCSlib, `CommunicationComplexity.Deterministic.FiniteMessage.Protocol.ofProtocol_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
Classical.choiceQuot.soundpropext
Built on 4
Used by 5

Lean source view module on GitHub

set_option relaxedAutoImplicit false inset_option autoImplicit false invariable {X Y α : Type*} in/-- Viewing a binary protocol as a finite-message protocol does not change its outcome on any input. -/theorem CommunicationComplexity.Deterministic.FiniteMessage.Protocol.ofProtocol_run (p : Deterministic.Protocol X Y α) (x : X) (y : Y) :    (ofProtocol p).run x y = p.run x y := by  induction p <;> simp [ofProtocol, run, Deterministic.Protocol.run, *]
See it in the graphDiscuss this resultChallenge it