TCSLib

49 Communication Complexity — Helper

49.1 Overview

This module provides Boolean helper definitions used throughout the communication complexity library: the type of \(n\)-bit Boolean inputs, the \(\pm 1\) sign encoding of Boolean values, and coordinate-flipping operations, together with their basic algebraic identities.

49.2 Declarations

Definition 49.1 \(n\)-bit Boolean input type
#

\(\texttt{BoolInput}(n)\) is the type of \(n\)-bit Boolean inputs, defined as the function type \(\mathrm{Fin}\, n \to \mathrm{Bool}\).

Definition 49.2 All-zero Boolean input
#

\(\texttt{zeroInput}(n) : \texttt{BoolInput}(n)\) is the constant \(\mathrm{false}\) function, i.e. the \(n\)-bit string consisting entirely of zeros.

Lemma 49.3 Nonzero input has a true coordinate

If \(x : \texttt{BoolInput}(n)\) satisfies \(x \ne \texttt{zeroInput}(n)\), then there exists some index \(i \in \mathrm{Fin}\, n\) such that \(x\, i = \mathrm{true}\).

Definition 49.4 Boolean sign
#

\(\texttt{boolSign} : \mathrm{Bool} \to \mathbb {R}\) assigns the real value \(1\) to \(\mathrm{false}\) and \(-1\) to \(\mathrm{true}\), embedding Boolean values into the multiplicative group \(\{ \pm 1\} \subset \mathbb {R}\).

Lemma 49.5 Boolean sign converts xor to multiplication
#

For all \(a, b : \mathrm{Bool}\),

\[ \texttt{CommunicationComplexity.boolSign}(a \oplus b) \; =\; \texttt{CommunicationComplexity.boolSign}(a) \cdot \texttt{CommunicationComplexity.boolSign}(b). \]

That is, \(\texttt{boolSign}\) is a group homomorphism from \((\mathrm{Bool}, \oplus )\) to \((\{ \pm 1\} , \cdot )\).

Lemma 49.6 Boolean sign of a finite sum

For a finite type \(\alpha \), a finite set \(s : \mathrm{Finset}\, \alpha \), and a function \(f : \alpha \to \mathrm{Bool}\),

\[ \texttt{CommunicationComplexity.boolSign}\! \left(\sum _{i \in s} f(i)\right) \; =\; \prod _{i \in s} \texttt{boolSign}(f(i)). \]
Lemma 49.7 Product of two Boolean signs

For all \(a, b : \mathrm{Bool}\),

\[ \texttt{CommunicationComplexity.boolSign}(a) \cdot \texttt{CommunicationComplexity.boolSign}(b) \; =\; 1 - 2 \cdot \mathbf{1}[a \ne b]. \]

In other words, the product of two \(\pm 1\) signs equals \(1\) when the bits agree and \(-1\) when they disagree.

Definition 49.8 Single-coordinate flip
#

Given \(i : \mathrm{Fin}\, n\) and \(x : \texttt{BoolInput}(n)\), \(\texttt{flipAt}\, i\, x\) is the Boolean input obtained from \(x\) by negating the \(i\)-th coordinate and leaving all other coordinates unchanged.

Lemma 49.9 Flip applies at the flipped coordinate

For \(i : \mathrm{Fin}\, n\) and \(x : \texttt{BoolInput}(n)\), \((\texttt{flipAt}\, i\, x)\, i = \neg (x\, i)\).

Lemma 49.10 Flip leaves other coordinates unchanged

For \(i, j : \mathrm{Fin}\, n\) with \(j \ne i\) and \(x : \texttt{BoolInput}(n)\), \((\texttt{flipAt}\, i\, x)\, j = x\, j\).

Lemma 49.11 Flip is an involution

For \(i : \mathrm{Fin}\, n\) and \(x : \texttt{BoolInput}(n)\), \(\texttt{flipAt}\, i\, (\texttt{flipAt}\, i\, x) = x\). That is, applying \(\texttt{flipAt}\, i\) twice recovers the original input.

Lemma 49.12 Flip is bijective

For every \(i : \mathrm{Fin}\, n\), the map \(\texttt{flipAt}\, i : \texttt{BoolInput}(n) \to \texttt{BoolInput}(n)\) is bijective; its two-sided inverse is itself.