AFTD Auto-Formalizing Theoretical Domains

CommunicationComplexity.PublicCoin.FiniteMessage.Protocol.ApproxComputes

defimported Lean

A protocol $p$ $\varepsilon$-computes a function $f : X \to Y \to \alpha$ if for every input pair $(x, y)$, \[ \Pr_{\omega}\bigl[p.\mathrm{rrun}\,x\,y\,\omega \ne f\,x\,y\bigr] \;\le\; \varepsilon. \]

Statement

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
open MeasureTheory in
variable {Ω : Type*} {X Y α : Type*} in
noncomputable def CommunicationComplexity.PublicCoin.FiniteMessage.Protocol.ApproxComputes
    [MeasureSpace Ω]
    (p : Protocol Ω X Y α) (f : X → Y → α) (ε : ℝ) : Prop
Defined in
TCSlib, `CommunicationComplexity.PublicCoin.FiniteMessage.Protocol.ApproxComputes`
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
none listed
Built on 2
Used by 5

Lean source view module on GitHub

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
open MeasureTheory in
variable {Ω : Type*} {X Y α : Type*} in
/-- A public-coin finite-message protocol `ε`-computes a function `f` if for every input `(x, y)`, the probability (over the shared randomness) of producing an incorrect answer is at most `ε`; this is worst-case error `ε` [RY20, Ch. 3, §Variants of Randomized Protocols]. Deviation: messages come from arbitrary finite types rather than being single bits. -/
noncomputable def CommunicationComplexity.PublicCoin.FiniteMessage.Protocol.ApproxComputes
    [MeasureSpace Ω]
    (p : Protocol Ω X Y α) (f : X → Y → α) (ε : ℝ) : Prop :=
  ∀ x y,
    volume.real {ω : Ω |
      p.rrun x y ω ≠ f x y} ≤ ε
See it in the graphDiscuss this resultChallenge it