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

A Boolean function is a function

𝑓:{1,1}𝑛{1,1}.

Though we tend to relax the codomain and simply consider functions from the Boolean cube

𝑓:{1,1}𝑛

(and call the first type Boolean-valued functions).

We can make this work with 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𝑛).