CommunicationComplexity.Deterministic.FiniteMessage.Protocol
inductiveimported Lean
A generalized deterministic two-party communication protocol over input types $X$, $Y$ and
output type $\alpha$. At each step a player sends an element of an arbitrary finite nonempty
type $\beta$: the alice constructor takes a function $f : X \to \beta$ and a
continuation $P : \beta \to \mathrm{Protocol}\,X\,Y\,\alpha$, and dually for bob.
The output constructor terminates the protocol with a value in $\alpha$. This
inductive type is equivalent to the binary Deterministic.Protocol up to complexity,
where a $\beta$-valued message costs $\lceil \log_2 |\beta| \rceil$ bits.
Statement
set_option relaxedAutoImplicit false in set_option autoImplicit false in inductive CommunicationComplexity.Deterministic.FiniteMessage.Protocol (X Y α : Type*)
- Defined in
- TCSlib, `CommunicationComplexity.Deterministic.FiniteMessage.Protocol`
- 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← CommunicationComplexity.Deterministic.FiniteMessage.Protocol (TCSlib/CommunicationComplexity/DeterministicCC/FiniteMessage.lean:76): verbatim
- Verified
- 07 Oct 2026
- Axioms
- none listed
- Used by 22
- 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.Deterministic.FiniteMessage.Protocol.comapGiven maps $f_X : X' \to X$ and $f_Y : Y' \to Y$, the pullback $p.\mathrm{comap}\,f_X\,f_Y$ is the finite-message protocol over $X'$, $Y'$…
- 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.Deterministic.FiniteMessage.Protocol.toPrivateCoinGiven a deterministic finite-message protocol $p$, the operation…
- CommunicationComplexity.Deterministic.FiniteMessage.Protocol.runGiven a finite-message protocol $p$ and inputs $x : X$, $y : Y$,
runexecutes $p$ recursively: at analicenode it… - CommunicationComplexity.Deterministic.FiniteMessage.Protocol.toProtocolA noncomputable function that converts a finite-message protocol $p$ into a binary protocol…
- 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.toPrivateCoin_complexityComplexity is preserved by passage to the private-coin model. Let $p$ be a deterministic finite-message protocol over input types $X$, $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.Deterministic.FiniteMessage.Protocol.complexityThe worst-case communication cost of a finite-message protocol, measured in bits. An
outputnode costs $0$; analiceor… - 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.ProtocolA public-coin finite-message protocol over shared-randomness space $\Omega$, private input sets $X$ and $Y$, and output type $\alpha$ is a…
- CommunicationComplexity.PrivateCoin.FiniteMessage.ProtocolA private-coin finite-message protocol over input types $X$, $Y$ with private randomness types $\Omega_X$, $\Omega_Y$ and output type…
- CommunicationComplexity.Deterministic.FiniteMessage.Protocol.comap_complexityPullback preserves communication complexity. Let $p$ be a finite-message deterministic communication protocol over input types $X$ and $Y$…
- 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.newmanProtocol_complexityCommunication cost of the Newman protocol. Let $X$ and $Y$ be finite types, let $\Omega$ be a finite probability space, and let $p$ be a…
- CommunicationComplexity.Deterministic.FiniteMessage.Protocol.ofProtocolEmbeds a binary protocol into the generalized finite-message framework by treating each Boolean message as an element of…
- CommunicationComplexity.PrivateCoin.FiniteMessage.Protocol.aliceGiven a function $f : X \to \Omega_X \to \beta$ (Alice's message function depending on her public input and private randomness) and a…
- 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.PublicCoin.FiniteMessage.Protocol.toDeterministicGiven a public-coin finite-message protocol $p$ and a fixed randomness sample $\omega : \Omega$,…
- 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 /-- A generalized deterministic two-party communication protocol where at each step, a player sends an element of an arbitrary finite type `β` (rather than just a `Bool`). [RY20, Ch. 1, Definition (2-party deterministic protocol)]. Deviation: messages come from an arbitrary nonempty finite alphabet `β` (which may vary from node to node) instead of bits. Equivalent to `Deterministic.Protocol` up to complexity (see `toProtocol`) where sending a `β`-valued message costs `⌈log₂ |β|⌉` bits. -/ inductive CommunicationComplexity.Deterministic.FiniteMessage.Protocol (X Y α : Type*) where | output (val : α) : Protocol X Y α | alice {β : Type} [Fintype β] [Nonempty β] (f : X → β) (P : β → Protocol X Y α) : Protocol X Y α | bob {β : Type} [Fintype β] [Nonempty β] (f : Y → β) (P : β → Protocol X Y α) : Protocol X Y α