Dirichlet function
In mathematics, the Dirichlet function is the indicator function 1 Q {\displaystyle \mathbf {1} _{\mathbb {Q} }} of the set of rational numbers Q {\displaystyle \mathbb {Q} } over the set of real numbers R {\displaystyle \mathbb {R} } , i.e. 1 Q ( x ) = 1 {\displaystyle \mathbf {1} _{\mathbb {Q} }(x)=1} for a real number x if x is a rational number and 1 Q ( x ) = 0 {\displaystyle \mathbf {1} _{\mathbb {Q} }(x)=0} if x is not a rational number (i.e.