TeX source:
p(x)=\left\{\begin{array}{cl}3-x & \text { if } x \text { is a rational number } \\1 & \text { if } x \text { is an irrational number }\end{array}\right.