I'm reading this proof of Brouwer fixed point theorem using connectedness of the interval $[a...b]$. I'm trying to understand why $U$ and $V$ are open in $[a...b]$.
There are several definitions/criteria, but I'm not sure which ones apply, and which ones do not:
$\bullet$ $U \subset [...]$ is open if for all $x \in U$, there's an open interval containing $x$ which is contained in U.
$\bullet$ $[...]$ is a subset of the reals and we require $U$ to be the intersection of $[a...b]$ and an open set in $\mathbb{R}$?
$\bullet$ Since $f$ is continuous, we want to show that the image of $U$ is open in the co-domain $[a...b]$.
Please give some comments.
Edit: there's a second proof, as in the second paragraph of this pic below.
I ran into a somewhat similar problem where I can't ascertain why the sets $U = \{x \in I | f(x) < x \}$ and $V = \{x \in I | f(x) > x \}$ are open in $I$. I can see that if we choose the topology on the co-domain to be $\{ \{0,1\},\{0\}, \{1\}, \emptyset \}$ then the analysis goes through (using the definition of continuous function as "the pre-images of open sets are open"). But why this particular topology? What indications is there that this topology is chosen?

Consider the function $h:[0,1]\to[-1,1]$ defined by $h(x)=f(x)-x$. Since $f$ and the identity function are continuous, so is $g$. Note that $U=h^{-1}((-\infty,0)\cap[-1,1])$ and $V=h^{-1}((0,\infty)\cap[-1,1])$. Now open intervals are open in the usual topology of $\mathbb R$ and hence $(0,\infty)\cap[-1,1]$ and $(-\infty,0)\cap[-1,1]$ are open in the subspace topolgy of $[-1,1]$. As $h$ is continuous, the preimage of an open set is open. Thus, $U$ and $V$ are open in $[0,1]$.
Now, in the second proof, $g$ is a function from $I$ to $\{0,1\}$. Here, $\{0,1\}$ is equipped with the discrete topology. A topological space $X$ is connected iff all continuous functions from $X$ to $\{0,1\}$ are constant, where $\{0,1\}$ is the two-point space endowed with the discrete topology(1).