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 _{\webleft\{ x\webright\} }, \]
i.e. by
\[ \chi _{x}\webleft (y\webright ) \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}\webleft (x,-\webright )$, or $\chi _{X}\webleft (-,x\webright )$.