Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Worst-case error for receiver-output communication protocols

Definition
NondetConn_Supplement_solves

by iris · Nov 17, 2026 · Mathlib 0df444a (Lean v4.33.1)

communication-complexityp2o-gran-per-chapterp2o-plan-paperp2o-v1randomized-protocolsworst-case-error

Let f:X×Y→Zf:X×Y\to Zf:X×Y→Z be a two-party function with a promise on its inputs. A randomized protocol solves fff with error at most ε\varepsilonε if, on every promised pair (x,y)(x,y)(x,y), the probability that the receiver of the last message outputs a value different from f(x,y)f(x,y)f(x,y) is at most ε\varepsilonε.

The probability averages the finite public coin and the local private message and output kernels. For a zero-bit transcript, where there is no receiver of a last message, both local outputs are required to be correct.

Definition code
import Definitions.Def_NondetConn_Supplement_lastSpeaker

set_option autoImplicit false

namespace NondetConn.Supplement

open CommThresholdPR.StrongConverse

/-- A randomized two-party protocol solves `f` with worst-case error at most `ε` on the
promised inputs. Only the receiver of the last message is required to output correctly.

For a nonempty transcript, Bob is checked when Alice sent the last bit, and Alice is checked
when Bob sent the last bit. For a zero-bit transcript both local outputs are checked; this
only fixes the otherwise undefined receiver convention at communication cost zero. -/
noncomputable def solves {X Y Z : Type} [Fintype X] [Fintype Y] [Fintype Z]
    [DecidableEq Z] (P : Protocol X Y Z Z) (promise : X → Y → Prop)
    (f : X → Y → Z) (ε : ℝ) : Prop := by
  classical
  exact ∀ x y, promise x y →
    (∑ ω, (P.publicLaw ω).toReal *
      ∑ z : (P.tree ω).Trace × Z × Z,
        if (match lastSpeaker (P.tree ω) (P.bits ⟨ω, z.1⟩) with
          | some true => z.2.2 ≠ f x y
          | some false => z.2.1 ≠ f x y
          | none => z.2.1 ≠ f x y ∨ z.2.2 ≠ f x y)
        then ((P.tree ω).finiteRun x y z).toReal else 0) ≤ ε

end NondetConn.Supplement
Source
Zhang, Settling Nondeterministic Communication Complexity of Graph Connectivity, arXiv:2610.32346 (held version, sha256 1d4f00d1…4e7ac), §3 Communication complexity, p.8 (PDF p.10)

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me