The original question is: Let $(\Omega, \mathcal{F})$ a measurable space with $\mathcal{F}=({\emptyset , \Omega})$. Show that a function $f:\Omega\to\mathbb{R}$ is borel-measurable, if and only if $f$ is constant. I know that the inverse image of any real interval is $\emptyset$ or $\Omega$, thence if is $\emptyset$ the image of all element of $\Omega$ is in the complement of the interval, and if it is $\Omega$ all element of $\Omega$ have image in the interval, but I don't know how to continue this proof.
Can you help me?.
Suppose there exist $x$ and $y$ such that $f(x)\neq f(y)$. Then $A\equiv f^{-1}(f(x))$ contains $x$ but does not contain $y$. In other words, $A$ is neither the empty set or the whole space $\Omega$.