CommunicationComplexity.Deterministic.FiniteMessage.Protocol.run
defimported Lean
Given a finite-message protocol $p$ and inputs $x : X$, $y : Y$, run executes $p$
recursively: at an alice node it evaluates $f(x)$ and follows the corresponding
continuation, at a bob node it evaluates $f(y)$, and at an output node it
returns the stored value.
Statement
set_option relaxedAutoImplicit false in set_option autoImplicit false in variable {X Y α : Type*} in def CommunicationComplexity.Deterministic.FiniteMessage.Protocol.run (p : Protocol X Y α) (x : X) (y : Y) : α
- Defined in
- TCSlib, `CommunicationComplexity.Deterministic.FiniteMessage.Protocol.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.CommunicationComplexity.Deterministic.FiniteMessage.Protocol.run← CommunicationComplexity.Deterministic.FiniteMessage.Protocol.run (TCSlib/CommunicationComplexity/DeterministicCC/FiniteMessage.lean:92): verbatim
- Verified
- 07 Oct 2026
- Axioms
- none listed
- Built on 1
- CommunicationComplexity.Deterministic.FiniteMessage.ProtocolA generalized deterministic two-party communication protocol over input types $X$, $Y$ and output type $\alpha$. At each step a player…
- Used by 21
- CommunicationComplexity.Deterministic.FiniteMessage.Protocol.ofProtocol_runEmbedding 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…
- CommunicationComplexity.Deterministic.communicationComplexity_le_clog_card_X_alphaTrivial upper bound on deterministic communication complexity. Let $X$ and $\alpha$ be finite nonempty types, let $Y$ be an arbitrary…
- CommunicationComplexity.PrivateCoin.FiniteMessage.Protocol.toProtocol_rrunExecution is preserved under conversion to a binary private-coin protocol. Let $p$ be a private-coin finite-message protocol with…
- CommunicationComplexity.PublicCoin.FiniteMessage.Protocol.rrun_eqRandomized execution unfolds to deterministic execution. Let $p$ be a public-coin finite-message protocol over shared-randomness space…
- CommunicationComplexity.PublicCoin.FiniteMessage.Protocol.exists_good_randomnessExistence of good randomness for derandomization. Let $\Omega$ be a finite probability space and let $X$ and $Y$ be finite input sets. Let…
- CommunicationComplexity.PublicCoin.FiniteMessage.Protocol.rrun$\mathrm{rrun}(p, x, y, \omega)$ executes the protocol $p$ on private inputs $x$ and $y$ with shared randomness $\omega$, defined as…
- CommunicationComplexity.Deterministic.FiniteMessage.Protocol.toProtocolA noncomputable function that converts a finite-message protocol $p$ into a binary protocol…
- CommunicationComplexity.PrivateCoin.FiniteMessage.Protocol.rrun_eqExplicit-coin execution as paired-input execution. Let $p$ be a private-coin finite-message protocol over input types $X$, $Y$, with…
- CommunicationComplexity.Deterministic.FiniteMessage.Protocol.toPrivateCoin_rrunIgnoring private coins recovers the deterministic output. Let $p$ be a deterministic finite-message protocol over input types $X$ and $Y$…
- CommunicationComplexity.Deterministic.FiniteMessage.Protocol.toProtocol_runConversion to binary protocol preserves output. Let $p$ be a finite-message deterministic two-party protocol over input types $X$ and $Y$…
- CommunicationComplexity.Deterministic.FiniteMessage.Protocol.toProtocol_existsBinary simulation of a finite-message protocol. Let $X$, $Y$, and $\alpha$ be types, and let $p$ be a finite-message two-party protocol…
- CommunicationComplexity.Functions.Indexing.le_oneWayCommunicationComplexityOne-way complexity of Index is at least $n$. Every correct deterministic one-way protocol for $\mathrm{IND}_n$ has cost at least $n$; that…
- CommunicationComplexity.PrivateCoin.FiniteMessage.Protocol.toCoinTape_approxSatisfiesCoin-tape conversion preserves approximate correctness. Let $p$ be a private-coin finite-message protocol over input types $X$, $Y$ and…
- CommunicationComplexity.PublicCoin.FiniteMessage.Protocol.newmanProtocol_ApproxComputesNewman's reduction preserves approximate correctness. Let $\Omega$ be a finite probability space, let $X$ and $Y$ be finite types, and let…
- CommunicationComplexity.PublicCoin.FiniteMessage.Protocol.toProtocol_rrunBinary conversion preserves randomized execution. Let $p$ be a public-coin finite-message protocol with shared-randomness space $\Omega$,…
- CommunicationComplexity.PrivateCoin.communicationComplexity_le_iff_finiteMessageFinite-message characterization of private-coin complexity. Let $f : X \to Y \to \alpha$ be a function, let $\varepsilon \in \bbr$ be an…
- CommunicationComplexity.Deterministic.communicationComplexity_le_of_finiteMessage_protocolUpper bound witnessed by a finite-message protocol. Let $f : X \to Y \to \alpha$ and let $p$ be a finite-message protocol over $X$, $Y$,…
- CommunicationComplexity.PublicCoin.FiniteMessage.Protocol.toDeterministic_runFixing randomness commutes with execution. Let $p$ be a public-coin finite-message protocol over a shared-randomness space $\Omega$,…
- CommunicationComplexity.Deterministic.FiniteMessage.Protocol.comap_runExecution commutes with pullback. Let $p$ be a finite-message deterministic communication protocol over input types $X$, $Y$ with output…
- CommunicationComplexity.PrivateCoin.FiniteMessage.Protocol.rrun$\texttt{rrun}\,p\,x\,y\,\omega_x\,\omega_y$ executes the protocol $p$ on public inputs $x : X$, $y : Y$ with Alice's private coin…
- CommunicationComplexity.Deterministic.FiniteMessage.Protocol.toProtocol_complexityConversion to a binary protocol preserves complexity. Let $p$ be a finite-message deterministic two-party communication protocol over…
Lean source view module on GitHub
set_option relaxedAutoImplicit false in set_option autoImplicit false in variable {X Y α : Type*} in /-- Executes the generalized protocol on inputs `x` and `y`, returning the output value: the owner of the current node evaluates its message function on its own input and both parties descend to the child indexed by that message, until a leaf is reached. -/ def CommunicationComplexity.Deterministic.FiniteMessage.Protocol.run (p : Protocol X Y α) (x : X) (y : Y) : α := match p with | Deterministic.FiniteMessage.Protocol.output val => val | Deterministic.FiniteMessage.Protocol.alice f P => (P (f x)).run x y | Deterministic.FiniteMessage.Protocol.bob f P => (P (f y)).run x y