The characteristic function of $x$ is the function1
\[ \chi _{x}\colon X\to \{ \mathsf{t},\mathsf{f}\} \]
defined by
\[ \chi _{x} \mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}\chi _{\left\{ x\right\} }, \]
i.e. by
\[ \chi _{x}(y) \mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}\begin{cases} \mathsf{true}& \text{if $x=y$,}\\ \mathsf{false}& \text{if $x\neq y$} \end{cases} \]
for each $y\in X$.
- 1Further Notation: Also written $\chi ^{x}$, $\chi _{X}(x,-)$, or $\chi _{X}(-,x)$.