AFTD Auto-Formalizing Theoretical Domains

CommunicationComplexity.PrivateCoin.communicationComplexity_le_of_finiteMessage

theoremverifiedimported Lean

Finite-probability protocols bound private-coin complexity. Let $X$, $Y$, and $\alpha$ be types, let $f : X \to Y \to \alpha$ be the function to be computed, and let $\Omega_X$ and $\Omega_Y$ be finite probability spaces serving as the two players' private randomness. Fix real numbers $\varepsilon'$ and $\varepsilon$ with $\varepsilon' < \varepsilon$, and let $p$ be a finite-message private-coin protocol with randomness spaces $\Omega_X$ and $\Omega_Y$, input types $X$ and $Y$, and output type $\alpha$, and suppose that $p$ computes $f$ with error at most $\varepsilon'$, i.e.\ for every input pair $(x,y)$ the probability that $p$ returns a value other than $f(x,y)$ is at most $\varepsilon'$. Then the $\varepsilon$-error private-coin randomized communication complexity of $f$ satisfies $R_\varepsilon(f) \le \mathrm{complexity}(p)$, where the right-hand side is the worst-case number of bits exchanged by $p$.

Statement

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
open MeasureTheory ProbabilityTheory in
theorem CommunicationComplexity.PrivateCoin.communicationComplexity_le_of_finiteMessage
    {X Y α} {Ω_X Ω_Y : Type*}
    [FiniteProbabilitySpace Ω_X] [FiniteProbabilitySpace Ω_Y]
    (f : X → Y → α) (ε ε' : ℝ) (hε : ε' < ε)
    (p : FiniteMessage.Protocol Ω_X Ω_Y X Y α)
    (hp : p.ApproxComputes f ε') :
    PrivateCoin.communicationComplexity f ε ≤ p.complexity
Source
TCSlib, `CommunicationComplexity.PrivateCoin.communicationComplexity_le_of_finiteMessage`
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 32
Used by 1

Lean source view module on GitHub

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
open MeasureTheory ProbabilityTheory in
/-- If a private-coin finite-message protocol over arbitrary finite probability spaces `ε'`-computes `f` with `ε' < ε`, then the private-coin communication complexity at error `ε` is at most the protocol's complexity. The strict inequality pays for replacing the two given probability spaces by coin tapes via `toCoinTape`, which approximates the distributions to within the slack `ε - ε'` at no cost in communication. -/
theorem CommunicationComplexity.PrivateCoin.communicationComplexity_le_of_finiteMessage
    {X Y α} {Ω_X Ω_Y : Type*}
    [FiniteProbabilitySpace Ω_X] [FiniteProbabilitySpace Ω_Y]
    (f : X → Y → α) (ε ε' : ℝ) (hε : ε' < ε)
    (p : FiniteMessage.Protocol Ω_X Ω_Y X Y α)
    (hp : p.ApproxComputes f ε') :
    PrivateCoin.communicationComplexity f ε ≤ p.complexity := by
  rw [communicationComplexity_le_iff_finiteMessage]
  -- Convert ApproxComputes to ApproxSatisfies
  rw [FiniteMessage.Protocol.ApproxComputes_eq_ApproxSatisfies] at hp
  -- Use toCoinTape to get a CoinTape-based protocol
  have hδ : 0 < ε - ε' := sub_pos.mpr hε
  let tc := p.toCoinTape (ε - ε') hδ
  refine ⟨tc.1, tc.2.1, tc.2.2, ?_, le_of_eq ?_⟩
  · -- ApproxComputes at error ε
    rw [FiniteMessage.Protocol.ApproxComputes_eq_ApproxSatisfies]
    -- toCoinTape_approxSatisfies gives error ε' + (ε - ε') = ε
    have h := p.toCoinTape_approxSatisfies _ ε' (ε - ε') hδ hp
    convert h using 1; ring
  · exact p.toCoinTape_complexity (ε - ε') hδ
See it in the graphDiscuss this resultChallenge it