Prove or disprove the existence of a function $f:[0,1] \rightarrow[0,1]$ with the following property:
for any interval $\,(a,b)\subset[0,1]\,$ with $\,a\!<\!b,f\big((a,b)\big)\!=\![0,1]\,.$
It turns out that such a function does not exist. The proof is a consequence of the Baire Category Theorem.
Proof by Contradiction: Assume that such a function $f$ does exist.
Consider the set $A=\{x \in[0,1]: f(x)=1\}$. The set $A$ is non-empty because $f((0,1))=[0,1]$ by assumption. That is, there must exist some $x \in(0,1)$ such that $f(x)=1$.
Now, let's use the Baire Category Theorem. For each $x \in A$, consider the preimage of an open interval $(1-\epsilon, 1]$ under $f$, where $0<\epsilon<1$. The preimage $f^{-1}((1-\epsilon, 1])$ must contain an interval around $x$ because $f(x)=1$. Let this interval be $\left(a_x, b_x\right)$.
The set $A$ can thus be expressed as a countable union of open intervals $\left(a_x, b_x\right)$ around each $x \in A$. According to the Baire Category Theorem, a complete metric space cannot be represented as a countable union of nowhere-dense sets. However, each $\left(a_x, b_x\right)$ has an image under $f$ that is the entire $[0,1]$, making it nowhere-dense in $[0,1]$.
Thus, our assumption that such a function $f$ exists leads to a contradiction with the Baire Category Theorem. Therefore, such a function $f$ does not exist.
Note: The proof utilizes the Baire Category Theorem and the completeness of $[0,1]$ in the metric of real numbers.
Can anyone check whether there are no mistakes in the above solution?