Definition Suppose $X$ and $Y$ are sets and $f:X\to Y$ is a function. Then $f$ is a constant function if $f(a) = f(b)$ for all $a,b$ in $X$ .