Prob. 15, Chap. 4 in Baby Rudin: Every continuous open mapping of $\mathbb{R}$ into $\mathbb{R}$ is monotonic Here is Prob. 15, Chap. 4 in the book Principles of Mathematical Analysis by Walter Rudin, 3rd edition:


  Call a mapping of $X$ into $Y$ open if $f(V)$ is an open set in $Y$ whenever $V$ is an open set in $X$. 
  
  Prove that every continuous open mapping of $\mathbb{R}^1$ into $\mathbb{R}^1$ is monotonic.


My effort: 


  Suppose $f$ is a continuous open mapping of $\mathbb{R}^1$ into $\mathbb{R}^1$. If $f$ is not monotonic, then there exist real numbers $x$, $y$, and $z$ such that 
  $$x &lt; y &lt; z,$$
  and 
  $$\mbox{ either } f(x) &lt; f(y) \ \mbox{ and } \ f(y) &gt;  f(z), \ \ \mbox{ or } \ \ f(x) &gt;  f(y) \ \mbox{ and } \ f(y) &lt; f(z). $$
  
  Now as $f$ is continuous on the closed interval $[x, z]$ and as $[x, z]$ is a compact subset of $\mathbb{R}$, so the image $f\left( [x, z] \right)$ is also a compact --- and hence closed and bounded --- subset of $\mathbb{R}$. 
  
  Thus the set $f\left( [x, z] \right)$ has a maximum element $M$ and a minimum element $m$. 
  
  First, assume that $$x &lt; y &lt; z, \  \ f(x) &lt;  f(y), \ \mbox{ and } \ f(y) &gt; f(z). $$
  Then $$ f(y) &gt;  \max \left\{ f(x), f(z) \right\}. \ \tag{1}$$
  
  But in view of (1) above, we can conclude that the maximum $M$ of $f\left( [x, z] \right)$ is attained at some interior point $p$, say, of $[x, z]$. 
  
  Then we can conclude that the image set $f\left( (x, z ) \right)$ of the open set $(x, z)$ in the domain space $\mathbb{R}^1$ has a maximum element $M$ and therefore cannot be open in the codomain space $\mathbb{R}^1$; for no $\delta &gt; 0$ can the open interval $( M-\delta, M+\delta)$ be contained in $f\left( (x, z ) \right)$, which gives rise to a contradiction.  
  
  So we assume that $$ x &lt; y &lt; z, \ \ f(x) &gt; f(y), \ \mbox{ and } \ f(y) &lt; f(z). $$
  Then 
  $$f(y) &lt; \min \left\{ f(x), f(z) \right\}. \ \tag{2}$$
  Then the minimum $m$ of the set $f \left( [x, z] \right)$ is attained at some interior point $q$, say, of $[x, z]$, which implies that the image under $f$ of the open set $(x, z)$ fails to be open because this image set contains $m$ but fails to contain the open interval $(m-\delta, m+\delta)$ for any real number $\delta &gt; 0$, which is a contradiction. 
  
  Hence every continuous open mapping $f$ of $\mathbb{R}^1$ into $\mathbb{R}^1$ is monotonic. 


Is this proof correct? If so, then what about the presentation? Is the presentation lucid enough too? If not, then where does the problem lie?
Hint: Let $a&lt;b$. Since $f(x)$ is continuous and open, then 
$$ f((a,b))=(c,d) $$
for some $c&lt;d$. Try to show $f({a,b})={c,d}$. From this, either $f(a)=c,f(b)=d$ or $f(a)=d,f(b)=c$. Namely $f(a)&lt;f(b)$ or $f(a)&gt;f(b)$.
I think it has a minor problem, since this problems wants you to prove that f is strictly monotomic. If f is not strictly monotonic, we can find three points x