CommunicationComplexity.PublicCoin.FiniteMessage.Protocol.newmanProtocol_ApproxComputes
Newman's reduction preserves approximate correctness. Let $\Omega$ be a finite probability space, let $X$ and $Y$ be finite types, and let $p$ be a public-coin finite-message protocol over shared randomness $\Omega$ with inputs in $X$ and $Y$ and outputs in a type $\alpha$. Fix a target function $f : X \times Y \to \alpha$, a real error bound $\varepsilon$, and a real constant $c > 1$, and suppose that $p$ $\varepsilon$-computes $f$, meaning that for every input pair $(x,y)$ the probability over the shared randomness that $p$ outputs something other than $f(x,y)$ is at most $\varepsilon$. Then the associated Newman protocol — the private-coin protocol in which Alice draws an index into the fixed table of good random seeds, sends it to Bob, and both run $p$ deterministically on that seed — $(c\varepsilon)$-computes $f$: for every input pair $(x,y)$ the probability over the private randomness that its output differs from $f(x,y)$ is at most $c\varepsilon$.
Statement
set_option relaxedAutoImplicit false in set_option autoImplicit false in open MeasureTheory ProbabilityTheory in theorem CommunicationComplexity.PublicCoin.FiniteMessage.Protocol.newmanProtocol_ApproxComputes {Ω X Y α : Type*} [FiniteProbabilitySpace Ω] [Fintype X] [Fintype Y] (p : FiniteMessage.Protocol Ω X Y α) (f : X → Y → α) (ε c : ℝ) (hc : 1 < c) (hp : p.ApproxComputes f ε) : (p.newmanProtocol f ε c hc hp).ApproxComputes f (c * ε)
- Source
- TCSlib, `CommunicationComplexity.PublicCoin.FiniteMessage.Protocol.newmanProtocol_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.CommunicationComplexity.PublicCoin.FiniteMessage.Protocol.newmanProtocol_ApproxComputes← CommunicationComplexity.PublicCoin.FiniteMessage.Protocol.newmanProtocol_ApproxComputes (TCSlib/CommunicationComplexity/NewmanTheorem/Newman.lean:145): adapted
What was changed in
CommunicationComplexity.PublicCoin.FiniteMessage.Protocol.newmanProtocol_ApproxComputes--- TCSlib/CommunicationComplexity/NewmanTheorem/Newman.lean:145 (CommunicationComplexity.PublicCoin.FiniteMessage.Protocol.newmanProtocol_ApproxComputes) +++ as compiled here @@ -1,15 +1,5 @@ -/-- The Newman protocol built from a public-coin protocol `p` that ε-computes `f` -computes `f` with error at most `c · ε` on every input: for all `x`, `y`, the probability -over Alice's random index that the protocol's output differs from `f x y` is at most -`c · ε`. [RY20, Thm 3.5 proof]. - -**Proof sketch.** Fix an input `(x, y)` and let `ωs` be the table of good seeds. After -unfolding, the protocol's output on private randomness `(i, ())` is the output of `p` on -seed `ωs i`. Step 1: the error event on the product space `newmanIndexSpace × Unit` is -the product of the set of bad indices (those `i` for which `p` errs on seed `ωs i`) with -the whole of `Unit`. Step 2: by the product formula for the measure and since `Unit` has -total mass one, the error probability equals the uniform measure of the bad-index set. -Step 3: the uniform measure of a set of indices is its cardinality divided by `t`, which -is at most `c · ε` by the defining property of the good table. -/ -theorem FiniteMessage.Protocol.newmanProtocol_ApproxComputes +set_option relaxedAutoImplicit false in +set_option autoImplicit false in +open MeasureTheory ProbabilityTheory in +theorem CommunicationComplexity.PublicCoin.FiniteMessage.Protocol.newmanProtocol_ApproxComputes {Ω X Y α : Type*} [FiniteProbabilitySpace Ω] @@ -39,4 +29,4 @@ -- index set. - rw [FiniteProbabilitySpace.measureReal_prod] - rw [measureReal_univ_eq_one, mul_one] + erw [FiniteProbabilitySpace.measureReal_prod] + rw [probReal_univ, mul_one] let BadIdx : Set (newmanIndexSpace X Y ε c) := - Verified
- 16 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 50
- CommunicationComplexity.PublicCoin.FiniteMessage.Protocol.newmanProtocolGiven a public-coin finite-message protocol $p$ over a probability space $\Omega$ that $\varepsilon$-computes $f : X \to Y \to \alpha$,…
- 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.PublicCoin.FiniteMessage.Protocol.toCoinTape_complexityCoin-tape conversion preserves complexity. Let $\Omega$ be a finite probability space, and let $p$ be a public-coin finite-message…
- CommunicationComplexity.PublicCoin.FiniteMessage.Protocol.toDeterministic_complexityFixing shared randomness preserves communication complexity. Let $p$ be a public-coin finite-message protocol over a shared-randomness…
- CommunicationComplexity.Unit.measureSpaceUnit with the Dirac probability measure.
- CommunicationComplexity.Unit.finiteProbabilitySpaceCommunicationComplexity.Unit.finiteProbabilitySpace
- CommunicationComplexity.PublicCoin.FiniteMessage.Protocol.toDeterministic_runFixing randomness commutes with execution. Let $p$ be a public-coin finite-message protocol over a shared-randomness space $\Omega$,…
- CommunicationComplexity.PrivateCoin.FiniteMessage.Protocol.toCoinTape_complexityCoin-tape conversion preserves communication complexity. Let $\Omega_X$ and $\Omega_Y$ be finite probability spaces, let $X$, $Y$ be input…
- CommunicationComplexity.PublicCoin.newmanIndexSpace.finiteProbabilitySpaceCommunicationComplexity.PublicCoin.newmanIndexSpace.finiteProbabilitySpace
- 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.Deterministic.FiniteMessage.Protocol.runGiven a finite-message protocol $p$ and inputs $x : X$, $y : Y$,
runexecutes $p$ recursively: at analicenode it… - CommunicationComplexity.FiniteProbabilitySpaceA typeclass bundling a
MeasureSpacestructure on $\Omega$ together with aCommunicationComplexity.FiniteMeasureSpace… - CommunicationComplexity.FiniteProbabilitySpace.measureReal_prodProduct measure of a rectangle. Let $\Omega_1$ and $\Omega_2$ be finite probability spaces, with respective probability measures $\bbP_1$…
- CommunicationComplexity.uniformOn_univ_measureReal_eq_card_filterUniform measure of a set equals its relative cardinality. Let $\Omega$ be a nonempty finite set, equipped with the uniform probability…
- CommunicationComplexity.PublicCoin.newmanIndexSpaceGiven finite input types $X$ and $Y$ and parameters $\varepsilon, c \in \mathbb{R}$, the Newman index space is…
- CommunicationComplexity.PrivateCoin.FiniteMessage.Protocol.ApproxComputesA protocol $p$ $\varepsilon$-computes a function $f : X \to Y \to \alpha$ if for every input pair $(x, y)$,…
- 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.PrivateCoin.FiniteMessage.Protocol.rrun$\texttt{rrun}\,p\,x\,y\,\omega_x\,\omega_y$ executes the protocol $p$ on public inputs $x : X$, $y : Y$ with Alice's private coin…
- 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.PublicCoin.FiniteMessage.Protocol.ApproxComputesA protocol $p$ $\varepsilon$-computes a function $f : X \to Y \to \alpha$ if for every input pair $(x, y)$,…
- CommunicationComplexity.Deterministic.Protocol.swap_runRole swap preserves protocol output. Let $p$ be a deterministic two-party communication protocol with Alice's inputs drawn from $X$, Bob's…
- CommunicationComplexity.Deterministic.Protocol.swap_complexityRole swap preserves communication complexity. Let $p$ be a deterministic two-party communication protocol with Alice's inputs drawn from a…
- CommunicationComplexity.Deterministic.Protocol.swap_swapRole swap is an involution. Let $p$ be a deterministic two-party communication protocol with Alice's inputs drawn from a type $X$, Bob's…
- CommunicationComplexity.Deterministic.Protocol.comap_runPull-back commutes with protocol execution. Let $p$ be a deterministic two-party communication protocol with Alice's inputs drawn from $X$…
- CommunicationComplexity.Deterministic.Protocol.comap_complexityPull-back preserves communication complexity. Let $p$ be a deterministic two-party communication protocol with Alice's inputs drawn from…
- 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.toProtocol_complexityConversion to a binary protocol preserves complexity. Let $p$ be a finite-message deterministic two-party communication protocol over…
- 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.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.PrivateCoin.Protocol.rrun_eqRandomized execution as deterministic run on paired inputs. Let $p$ be a private-coin protocol with randomness spaces $\Omega_X$ and…
- CommunicationComplexity.PrivateCoin.FiniteMessage.Protocol.rrun_eqExplicit-coin execution as paired-input execution. Let $p$ be a private-coin finite-message protocol over input types $X$, $Y$, with…
- CommunicationComplexity.PrivateCoin.FiniteMessage.Protocol.toProtocol_rrunExecution is preserved under conversion to a binary private-coin protocol. Let $p$ be a private-coin finite-message protocol with…
- CommunicationComplexity.PrivateCoin.FiniteMessage.Protocol.toProtocol_complexityComplexity is preserved by the binary conversion. Let $p$ be a private-coin finite-message protocol with private randomness spaces…
- CommunicationComplexity.PublicCoin.Protocol.rrun_eqRandomized execution as deterministic execution on paired inputs. Let $p$ be a public-coin protocol with shared randomness in $\Omega$,…
- CommunicationComplexity.PublicCoin.FiniteMessage.Protocol.rrun_eqRandomized execution unfolds to deterministic execution. Let $p$ be a public-coin finite-message protocol over shared-randomness space…
- CommunicationComplexity.PublicCoin.FiniteMessage.Protocol.toProtocol_rrunBinary conversion preserves randomized execution. Let $p$ be a public-coin finite-message protocol with shared-randomness space $\Omega$,…
- CommunicationComplexity.PublicCoin.FiniteMessage.Protocol.toProtocol_complexityConversion to a binary public-coin protocol preserves communication complexity. Let $\Omega$ be a shared-randomness space and let $p$ be a…
- CommunicationComplexity.coinTapeFiniteProbabilitySpaceCommunicationComplexity.coinTapeFiniteProbabilitySpace
- CommunicationComplexity.instProdCommunicationComplexity.instProd
- CommunicationComplexity.instPiCommunicationComplexity.instPi
- CommunicationComplexity.PublicCoin.newmanIndexSpace.fintypeCommunicationComplexity.PublicCoin.newmanIndexSpace.fintype
- CommunicationComplexity.PublicCoin.newmanIndexSpace.nonemptyCommunicationComplexity.PublicCoin.newmanIndexSpace.nonempty
- CommunicationComplexity.PublicCoin.newmanIndexSpace.measureSpaceCommunicationComplexity.PublicCoin.newmanIndexSpace.measureSpace
- CommunicationComplexity.PublicCoin.newmanIndexSpace.isProbabilityMeasureCommunicationComplexity.PublicCoin.newmanIndexSpace.isProbabilityMeasure
- CommunicationComplexity.PublicCoin.FiniteMessage.Protocol.toDeterministicGiven a public-coin finite-message protocol $p$ and a fixed randomness sample $\omega : \Omega$,…
- CommunicationComplexity.Deterministic.FiniteMessage.ProtocolA generalized deterministic two-party communication protocol over input types $X$, $Y$ and output type $\alpha$. At each step a player…
- 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.Deterministic.FiniteMessage.Protocol.toPrivateCoinGiven a deterministic finite-message protocol $p$, the operation…
- CommunicationComplexity.PublicCoin.FiniteMessage.Protocol.derandomizationSamplesGiven finite types $X$ and $Y$ and real parameters $\varepsilon, c$, the number of random samples required for derandomization via…
- CommunicationComplexity.PublicCoin.FiniteMessage.Protocol.rrun$\mathrm{rrun}(p, x, y, \omega)$ executes the protocol $p$ on private inputs $x$ and $y$ with shared randomness $\omega$, defined as…
- Used by 1
- CommunicationComplexity.PublicCoin.newmanNewman's theorem for communication complexity. Let $X$ and $Y$ be finite types, let $f : X \to Y \to \alpha$, and let…
Lean source view module on GitHub
set_option relaxedAutoImplicit false in set_option autoImplicit false in open MeasureTheory ProbabilityTheory in /-- The Newman protocol built from a public-coin protocol `p` that ε-computes `f` computes `f` with error at most `c · ε` on every input: for all `x`, `y`, the probability over Alice's random index that the protocol's output differs from `f x y` is at most `c · ε`. [RY20, Thm 3.5 proof]. **Proof sketch.** Fix an input `(x, y)` and let `ωs` be the table of good seeds. After unfolding, the protocol's output on private randomness `(i, ())` is the output of `p` on seed `ωs i`. Step 1: the error event on the product space `newmanIndexSpace × Unit` is the product of the set of bad indices (those `i` for which `p` errs on seed `ωs i`) with the whole of `Unit`. Step 2: by the product formula for the measure and since `Unit` has total mass one, the error probability equals the uniform measure of the bad-index set. Step 3: the uniform measure of a set of indices is its cardinality divided by `t`, which is at most `c · ε` by the defining property of the good table. -/ theorem CommunicationComplexity.PublicCoin.FiniteMessage.Protocol.newmanProtocol_ApproxComputes {Ω X Y α : Type*} [FiniteProbabilitySpace Ω] [Fintype X] [Fintype Y] (p : FiniteMessage.Protocol Ω X Y α) (f : X → Y → α) (ε c : ℝ) (hc : 1 < c) (hp : p.ApproxComputes f ε) : (p.newmanProtocol f ε c hc hp).ApproxComputes f (c * ε) := by -- ApproxComputes means: for all x y, P[rrun ≠ f x y] ≤ c * ε -- on the product space newmanIndexSpace × Unit intro x y -- Unfold the protocol definition to get at the run behavior unfold newmanProtocol PrivateCoin.FiniteMessage.Protocol.alice simp only [PrivateCoin.FiniteMessage.Protocol.rrun, Deterministic.FiniteMessage.Protocol.run, Deterministic.FiniteMessage.Protocol.comap_run] set ωs := (exists_good_randomness p f ε c hc hp).choose have hωs := (exists_good_randomness p f ε c hc hp).choose_spec -- Step 1: the error set only depends on ω.1 (the index) have hset : {ω : newmanIndexSpace X Y ε c × Unit | p.run (ωs ω.1, x) (ωs ω.1, y) ≠ f x y} = {i | p.run (ωs i, x) (ωs i, y) ≠ f x y} ×ˢ Set.univ := by ext ⟨i, u⟩; simp rw [hset] -- Step 2: identify the product-space error probability with the measure of the bad -- index set. erw [FiniteProbabilitySpace.measureReal_prod] rw [probReal_univ, mul_one] let BadIdx : Set (newmanIndexSpace X Y ε c) := {i | p.run (ωs i, x) (ωs i, y) ≠ f x y} -- Step 3: compute that measure in the uniform index space by cardinality and apply -- the good-table bound. rw [Measure.real] change (((ProbabilityTheory.uniformOn Set.univ : Measure (newmanIndexSpace X Y ε c)) BadIdx).toReal ≤ c * ε) rw [uniformOn_univ_measureReal_eq_card_filter (Ω := newmanIndexSpace X Y ε c) BadIdx] simp only [ne_eq, Set.mem_setOf_eq, Fintype.card_fin, BadIdx] convert hωs x y using 1 congr 1 simp [ωs] congr