Definition.Boolean function [boolean/def/boolean-function]

A Boolean function is a real-valued function on the Boolean cube,

𝑓:{−1,1}𝑛→ℝ.

When the codomain is a single bit,

𝑓:{−1,1}𝑛→{−1,1},

we call 𝑓 a Boolean-valued function.

Classically the name “Boolean function” means the Boolean-valued kind, but the Fourier-analytic machinery works at the relaxed generality, so we take that as the default and specialize to Boolean-valued functions when the extra structure matters.

The two-element set can be any set of 2 things. Other natural choices are {0,1}, {True,False}, or the two elements of the field 𝔽2 (which makes the domain 𝔽2𝑛).