AFTD Auto-Formalizing Theoretical Domains

CommunicationComplexity.Functions.Equality.communicationComplexity_le

theoremverifiedimported Lean

Deterministic complexity upper bound for equality. For every natural number $n$, the deterministic communication complexity of the $n$-bit equality function satisfies \[ D(\mathrm{equality}_n) \;\le\; n+1, \] where $\mathrm{equality}_n : \mathrm{BoolInput}\,n \times \mathrm{BoolInput}\,n \to \mathrm{Bool}$ is the function that returns $\mathtt{true}$ exactly when Alice's input equals Bob's, and the bound is an inequality in $\bbn_\infty$.

Statement

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
open MeasureTheory in
theorem CommunicationComplexity.Functions.Equality.communicationComplexity_le (n : ℕ) :
    Deterministic.communicationComplexity (equality n) ≤ n + 1
Source
TCSlib, `CommunicationComplexity.Functions.Equality.communicationComplexity_le`
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
Classical.choiceQuot.soundpropext
Built on 4
Used by 1

Lean source view module on GitHub

set_option relaxedAutoImplicit false inset_option autoImplicit false inopen MeasureTheory in/-- The deterministic communication complexity of equality on `n`-bit strings is at most `n + 1`: Alice sends her `n`-bit input, Bob computes equality and sends one bit [RY20, Ch. 1, §Equality: 'Alice sending her input yields an (n+1)-bit protocol']. -/theorem CommunicationComplexity.Functions.Equality.communicationComplexity_le (n : ℕ) :    Deterministic.communicationComplexity (equality n) ≤ n + 1 := by  calc Deterministic.communicationComplexity (equality n)      ≤ Nat.clog 2 (Nat.card (Fin n → Bool)) + Nat.clog 2 (Nat.card Bool) :=        Deterministic.communicationComplexity_le_clog_card_X_alpha (equality n)    _ = n + 1 := by        simp only [Nat.card_eq_fintype_card, Fintype.card_pi, Fintype.card_bool,          Finset.prod_const, Finset.card_univ, Fintype.card_fin, Nat.one_lt_ofNat,          Nat.clog_pow, clog_two_two]        norm_cast
See it in the graphDiscuss this resultChallenge it