TCSLib

78 Boolean Analysis — Zk Fourier

78.1 Overview

This module develops the Fourier analysis of complex-valued functions on the domain \(\mathbb {Z}_k^n = (\mathbb {Z}/k\mathbb {Z})^n\), the natural generalization of the Boolean hypercube \(\{ 0,1\} ^n\). It establishes the primitive \(k\)-th root of unity \(\omega _k = e^{2\pi i/k}\), the associated group homomorphism \(a \mapsto \omega _k^a\), the Fourier characters \(\chi _s(x) = \omega _k^{s \cdot x}\), and the core identities: orthonormality of characters, the Fourier expansion, Parseval’s identity, and the convolution theorem.

78.2 Declarations

Definition 78.1 Vectors over \(\mathbb {Z}/k\mathbb {Z}\)
#

\(\texttt{ZkFourier.ZkVec}\ k\ n\) is the \(n\)-dimensional vector space over \(\mathbb {Z}/k\mathbb {Z}\), defined as the function type \(\mathrm{Fin}\, n \to \mathbb {Z}/k\mathbb {Z}\). It carries the pointwise additive group structure of \((\mathbb {Z}/k\mathbb {Z})^n\).

Lemma 78.2 Cardinality of \(\mathbb {Z}_k^n\)
#

For \(k \geq 1\), the finite type \(\texttt{ZkFourier.ZkVec}\ k\ n\) has \(|\mathbb {Z}_k^n| = k^n\) elements.

Definition 78.3 Primitive \(k\)-th root of unity
#

\(\texttt{ZkFourier.rootOfUnity}\ k\) is the complex number \(\omega _k = e^{2\pi i / k}\), the primitive \(k\)-th root of unity used as the base of the Fourier characters on \(\mathbb {Z}_k^n\).

Definition 78.4 Embedding of \(\mathbb {Z}/k\mathbb {Z}\) into \(\mathbb {C}^\times \)
#

For \(a : \mathbb {Z}/k\mathbb {Z}\), \(\texttt{ZkFourier.toOmega}\ a = \omega _k^{a}\), where \(a\) is lifted to its canonical representative in \(\{ 0, \ldots , k-1\} \subset \mathbb {N}\). This is the group homomorphism \((\mathbb {Z}/k\mathbb {Z}, +) \to (\mathbb {C}^\times , \cdot )\).

Lemma 78.5 \(\omega _k\) is a primitive \(k\)-th root
#

\(\omega _k = e^{2\pi i/k}\) is a primitive \(k\)-th root of unity in \(\mathbb {C}\), i.e. \(\omega _k^k = 1\) and \(\omega _k^j \neq 1\) for \(0 \lt j \lt k\).

Lemma 78.6 \(\omega _k^k = 1\)
#

The \(k\)-th power of the root of unity satisfies \(\omega _k^k = 1\).

Lemma 78.7 \(\omega _k^0 = 1\)
#

The embedding sends zero to one: \(\texttt{ZkFourier.toOmega}\ (0 : \mathbb {Z}/k\mathbb {Z}) = 1\).

Lemma 78.8 Additivity of the embedding
#

For \(a, b : \mathbb {Z}/k\mathbb {Z}\), \(\omega _k^{a+b} = \omega _k^a \cdot \omega _k^b\). That is, \(\texttt{ZkFourier.toOmega}\) is a group homomorphism from \((\mathbb {Z}/k\mathbb {Z}, +)\) to \((\mathbb {C}^\times , \cdot )\).

Lemma 78.9 Negation and complex conjugation
#

For \(a : \mathbb {Z}/k\mathbb {Z}\), \(\omega _k^{-a} = \overline{\omega _k^a}\), i.e. \(\texttt{ZkFourier.toOmega}\ (-a) = \overline{\texttt{ZkFourier.toOmega}\ a}\).

Lemma 78.10 Unit norm of the embedding
#

For every \(a : \mathbb {Z}/k\mathbb {Z}\), \(\| \omega _k^a\| = 1\); the image of \(\texttt{ZkFourier.toOmega}\) lies on the complex unit circle.

Lemma 78.11 Multiplicativity of the embedding

For \(j, a : \mathbb {Z}/k\mathbb {Z}\), \(\omega _k^{j \cdot a} = (\omega _k^j)^a\), i.e. \(\texttt{ZkFourier.toOmega}\ (j \cdot a) = (\omega _k^{j.\mathrm{val}})^{a.\mathrm{val}}\).

Lemma 78.12 Geometric sum orthogonality

For \(j : \mathbb {Z}/k\mathbb {Z}\),

\[ \sum _{a \in \mathbb {Z}/k\mathbb {Z}} \omega _k^{j \cdot a} = \begin{cases} k & \text{if } j = 0, \\ 0 & \text{if } j \neq 0. \end{cases} \]

This is the fundamental character-orthogonality identity for \(\mathbb {Z}/k\mathbb {Z}\).

Definition 78.13 Functions on \(\mathbb {Z}_k^n\)
#

\(\texttt{ZkFourier.ZkFun}\ k\ n\) is the type of complex-valued functions on \(\mathbb {Z}_k^n\), defined as \(\mathbb {Z}_k^n \to \mathbb {C}\). These are the objects whose Fourier transforms are studied.

Definition 78.14 Expectation
#

The expectation of \(f : \mathbb {Z}_k^n \to \mathbb {C}\) is the uniform average

\[ \mathbb {E}[f] = \frac{1}{k^n} \sum _{x \in \mathbb {Z}_k^n} f(x). \]
Definition 78.15 Hermitian inner product

The Hermitian inner product of \(f, g : \mathbb {Z}_k^n \to \mathbb {C}\) is

\[ \langle f, g \rangle = \mathbb {E}\! \left[f(x)\, \overline{g(x)}\right]. \]
Definition 78.16 Squared \(L^2\) norm
#

The squared \(L^2\) norm of \(f : \mathbb {Z}_k^n \to \mathbb {C}\) is the real-valued quantity

\[ \| f\| _2^2 = \frac{1}{k^n} \sum _{x \in \mathbb {Z}_k^n} |f(x)|^2. \]
Definition 78.17 Convolution
#

The convolution of \(f, g : \mathbb {Z}_k^n \to \mathbb {C}\) is

\[ (f * g)(x) = \mathbb {E}_{y}\! \left[f(y)\, g(x - y)\right]. \]
Definition 78.18 Dot product on \(\mathbb {Z}_k^n\)
#

For \(s, x \in \mathbb {Z}_k^n\), the dot product is \(s \cdot x = \sum _{i=0}^{n-1} s_i \, x_i \in \mathbb {Z}/k\mathbb {Z}\), computed componentwise modulo \(k\).

Definition 78.19 Fourier character

For \(s \in \mathbb {Z}_k^n\), the Fourier character indexed by \(s\) is \(\chi _s : \mathbb {Z}_k^n \to \mathbb {C}\) defined by \(\chi _s(x) = \omega _k^{s \cdot x}\). The \(k^n\) characters \(\{ \chi _s\} _{s \in \mathbb {Z}_k^n}\) form an orthonormal basis of \(L^2(\mathbb {Z}_k^n)\).

Lemma 78.20 Dot product is additive in the right argument

For \(s, x, y \in \mathbb {Z}_k^n\), \(s \cdot (x + y) = s \cdot x + s \cdot y\).

Lemma 78.21 Zero vector on the left

For any \(x \in \mathbb {Z}_k^n\), \(0 \cdot x = 0\).

Lemma 78.22 Zero vector on the right

For any \(s \in \mathbb {Z}_k^n\), \(s \cdot 0 = 0\).

Lemma 78.23 Negation on the left argument of the dot product

For \(s, x \in \mathbb {Z}_k^n\), \((-s) \cdot x = -(s \cdot x)\).

Lemma 78.24 Subtraction on the left argument of the dot product
#

For \(s, t, x \in \mathbb {Z}_k^n\), \((s - t) \cdot x = s \cdot x - t \cdot x\).

Lemma 78.25 Characters are multiplicative in the input

For \(s, x, y \in \mathbb {Z}_k^n\), \(\chi _s(x + y) = \chi _s(x) \cdot \chi _s(y)\). Each character is a group homomorphism from \((\mathbb {Z}_k^n, +)\) to \((\mathbb {C}^\times , \cdot )\).

Lemma 78.26 Character at zero input

For any \(s \in \mathbb {Z}_k^n\), \(\chi _s(0) = 1\).

Lemma 78.27 Trivial character equals one

For any \(x \in \mathbb {Z}_k^n\), \(\chi _0(x) = 1\); the character indexed by the zero frequency is identically one.

Lemma 78.28 Characters have unit norm

For all \(s, x \in \mathbb {Z}_k^n\), \(\| \chi _s(x)\| = 1\).

Lemma 78.29 Characters are nonzero

For all \(s, x \in \mathbb {Z}_k^n\), \(\chi _s(x) \neq 0\).

Lemma 78.30 Conjugate of a character

For \(s, x \in \mathbb {Z}_k^n\), \(\overline{\chi _s(x)} = \chi _{-s}(x)\). Complex conjugation of a character corresponds to negating its index.

Lemma 78.31 Product of two characters

For \(s, t, x \in \mathbb {Z}_k^n\), \(\chi _s(x) \cdot \chi _t(x) = \chi _{s+t}(x)\). Pointwise multiplication of characters corresponds to addition of their frequency indices.

Lemma 78.32 Expectation of a nontrivial character is zero

If \(s \neq 0\), then \(\mathbb {E}[\chi _s] = 0\). This follows from the geometric sum identity: when some coordinate \(s_i \neq 0\), the sum over that coordinate vanishes.

Lemma 78.33 Expectation of the trivial character is one

\(\mathbb {E}[\chi _0] = 1\), since \(\chi _0 \equiv 1\) and the sum of \(k^n\) ones divided by \(k^n\) equals one.

Lemma 78.34 Self-inner-product of a character

For any \(s \in \mathbb {Z}_k^n\), \(\langle \chi _s, \chi _s \rangle = 1\). Every character is a unit-norm vector in \(L^2(\mathbb {Z}_k^n)\).

Lemma 78.35 Orthogonality of distinct characters

If \(s \neq t\), then \(\langle \chi _s, \chi _t \rangle = 0\). Together with \(\texttt{ZkFourier.inner\_ product\_ char\_ self}\), this shows that the characters form an orthonormal system.

Definition 78.36 Fourier coefficient

The Fourier coefficient of \(f : \mathbb {Z}_k^n \to \mathbb {C}\) at frequency \(s\) is

\[ \hat{f}(s) = \langle f, \chi _s \rangle = \mathbb {E}_{x}\! \left[f(x)\, \overline{\chi _s(x)}\right]. \]
Lemma 78.37 Fourier coefficient of a character at its own frequency

For any \(s \in \mathbb {Z}_k^n\), \(\widehat{\chi _s}(s) = \langle \chi _s, \chi _s \rangle = 1\).

Lemma 78.38 Fourier coefficient of a character at a different frequency

If \(s \neq t\), then \(\widehat{\chi _s}(t) = \langle \chi _s, \chi _t \rangle = 0\).

Every function \(f : \mathbb {Z}_k^n \to \mathbb {C}\) admits the Fourier expansion

\[ f(x) = \sum _{s \in \mathbb {Z}_k^n} \hat{f}(s)\, \chi _s(x). \]

The characters form a complete orthonormal basis of \(L^2(\mathbb {Z}_k^n)\).

Lemma 78.40 Parseval’s identity

For any \(f : \mathbb {Z}_k^n \to \mathbb {C}\),

\[ \sum _{s \in \mathbb {Z}_k^n} |\hat{f}(s)|^2 = \| f\| _2^2. \]

Parseval’s identity expresses the conservation of \(L^2\) energy under the Fourier transform.

For \(f, g : \mathbb {Z}_k^n \to \mathbb {C}\) and \(s \in \mathbb {Z}_k^n\),

\[ \widehat{f * g}(s) = \hat{f}(s)\, \hat{g}(s). \]

Convolution in the spatial domain corresponds to pointwise multiplication in the frequency domain.