Definition:Dirichlet Function

Definition
A Dirichlet function $D: \R \to \R$ is a real function defined as:
 * $\forall x \in \R: \map D x = \begin {cases} c & : x \in \Q \\ d & : x \notin \Q \end {cases}$

for $c, d \in \R$ such that $c \ne d$.

The canonical example of this has $c = 1$ and $d = 0$.