AFTD Auto-Formalizing Theoretical Domains

CommunicationComplexity.PublicCoin.FiniteMessage.Protocol.toDeterministic_run

theoremverifiedimported Lean

Fixing randomness commutes with execution. Let $p$ be a public-coin finite-message protocol over a shared-randomness space $\Omega$, private input sets $X$ and $Y$, and output type $\alpha$. Fix a randomness sample $\omega \in \Omega$ and private inputs $x \in X$ and $y \in Y$, and let $p_\omega$ denote the deterministic finite-message protocol obtained from $p$ by substituting $\omega$ for the shared randomness. Then executing $p_\omega$ on $x$ and $y$ yields the same output as the randomized execution of $p$ on $x$ and $y$ with shared randomness $\omega$: \[ p_\omega.\mathrm{run}(x, y) \;=\; \mathrm{rrun}(p, x, y, \omega). \]

Statement

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
open MeasureTheory ProbabilityTheory in
@[simp]
theorem CommunicationComplexity.PublicCoin.FiniteMessage.Protocol.toDeterministic_run
    {Ω X Y α : Type*}
    (p : PublicCoin.FiniteMessage.Protocol Ω X Y α) (ω : Ω)
    (x : X) (y : Y) :
    (p.toDeterministic ω).run x y = p.rrun x y ω
Source
TCSlib, `CommunicationComplexity.PublicCoin.FiniteMessage.Protocol.toDeterministic_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
16 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 23
Used by 5

Lean source view module on GitHub

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
open MeasureTheory ProbabilityTheory in
/-- Running the deterministic finite-message protocol obtained by fixing the randomness `ω` on `(x, y)` gives the same output as running the public-coin finite-message protocol on `(x, y)` with randomness `ω`. -/
@[simp]
theorem CommunicationComplexity.PublicCoin.FiniteMessage.Protocol.toDeterministic_run
    {Ω X Y α : Type*}
    (p : PublicCoin.FiniteMessage.Protocol Ω X Y α) (ω : Ω)
    (x : X) (y : Y) :
    (p.toDeterministic ω).run x y = p.rrun x y ω := by
  simp [toDeterministic, rrun,
    Deterministic.FiniteMessage.Protocol.comap_run]
See it in the graphDiscuss this resultChallenge it