$f$ is monotone on D and $f(D)$ is an interval then $f$ is continuous
Is my proof right?
pf) First, suppose it is monotone increasing
Since $f(D)$ is an interval there is $[c,d]$ such that
$f(x)\in [c,d]\subset(f(x)-\epsilon,f(x)+\epsilon)\cap f(D)$
(Because there are 4 cases that $(f(x)-\epsilon,f(x)+\epsilon)\cap f(D)$ = (a,b) or (a,b] or [a,b) or [a,b] since it is an interval)
Also , $[c,d]\subset f(D)$ tell us that $[c,d]=[f(a),f(b)]$ for some $a<b$ since it is monotone increasing
Hence if we set $\delta=\frac12$min{|$x-a$|,|$x-b$|} then we get continuity of $f$
|$t-x$|$<\delta\Rightarrow t\in(a,b) \Rightarrow f(t)\in[c,d]\subset (f(x)-\epsilon,f(x)+\epsilon)$