Proof check of a problem in the exercise of T.Tao's analysis I (Continuity) 
Let $f:[a,b]\to \mathbb R$ be a continuous, injective function. Then $f$ is strictly monotone.

My attempt : 

Assume $f(a)<f(b)$ (other case is similar and $f(a)=f(b)$ is trivial). Suppose that $f$ is bounded by $[m,M]$ and $f(x_1)=m$ and $f(x_2)=M$. We will show that $m=f(a)$ and $M=f(b)$. Assume not, then $[\min(x_1,x_2), \max(x_1,x_2)] \subset [a,b]$ and thus $f$ is continuous on this interval as well, and hence $f([\min(x_1,x_2), \max(x_1,x_2)])=[m,M]$. Pick any $c : a<c<\min (x_1,x_2)$. Say $f(c)=y_1\in [m,M]$. But by IVT on $[x_1,x_2]$, we find $\exists z\in [x_1,x_2]$ as well such that $f(z)=y_1$, contradicting injectiviy, hence we have proved our claim.Let $c_1 \in [a,b] : f(a) <f(c_1)<f(b)$. Assume $\exists c_2 \in [a,b] : c_2>c_1$ but $f(c_2)<f(c_1)$ (FTSOC).By IVT on $[c_1,c_2] \subset [a,b]$ we find some $k : f(c_1)<k <f(c_2) : \exists k \in [c_1,c_2] \wedge f(k_1)=k$. Next apply IVT on $[a,c_1]\subset [a,b]$ to obtain some $k_2\in [a,c_1]:f(k_2)=k$, contradicting injectivity. We are done.

I would be thankful if you double-check my proof as this is the first time i wrote a rigorous proof on a continuity problem, also i would be glad to see any shorter and beter proof, so that i can understand the art of writing proofs like this. Many thanks!
 A: I like your approach, a couple of things:
-You say that "the case $f(a) = f(b)$ is trivial" but this cannot even happen because $f$ is injective.
-You may want to invoke the extreme value theorem to conclude that there are $x_1,x_2$ in $f(x_1) = m$ and $f(x_2) = M$. 
-You can omit the statement "let $c_1 \in [a,b]: f(a) < f(c_1) < f(b)$"
-There should be a $k_1$ where you put $k$ in the second to last line (likely a typo). Also, it should be $f(c_2) < k < f(c_1)$
-Maybe remind the reader how you are using the IVT in the last sentence. Maybe something like "Since $[a,c_1] \subset [a,b]$ and $f(a)= m < k < f(c_1)$ we have by the IVT that there exists $k_2 \in [a,c_1]$ such that $f(k_2) = k$. Therefore, $f(k_2) = f(k_1)$ and $k_1 \neq k_2$ which contradicts the injectivity of $f$."
Another thing that may be worth mentioning is your use of quantifiers. It is okay to express ideas and thoughts, but in a formal proof you really want to write out words like "there exists" and what not.
Nevertheless, you have the right ideas. Keep up the good work!
