I have to study pretty hard theorem about convex functions.
First i am given a definition:
Definition: Let $I\subseteq \mathbb{R}$ be open interval and $f:I\rightarrow \mathbb{R}$. We say that $f$ has left derivative at point $c\in I$ if there exists $f_{-}^{'}(c)=\lim_{x\to c-} \frac{f(x)-f(c)}{x-c}$, and respectively right derivative if there exists $f_{+}^{'}=\lim_{x\to c+} \frac{f(x)-f(c)}{x-c}$.
Now i am given a theorem:
Theorem: Let $I\subseteq \mathbb{R}$ be open interval and $f:I\rightarrow \mathbb{R}$ convex and continuous function on $I$.
1. At every point $x\in I$ function $f$ has left $f_{-}^{'}(x)$ and right $f_{+}^{'}(x)$ derivative, and $f_{-}^{'}(x)\le f_{+}^{'}(x)$.
2. Function $x \mapsto f_{-}^{'}(x)$ is increasing and left-continuous on $I$, and function $x \mapsto f_{+}^{'}(x)$ is increasing and right-continuous on $I$.
3. Function $f$ has derivative on $I \setminus J$, where $J \subset I$ is at most countable set.
Proof:
If function $f:I \rightarrow \mathbb{R}$ is continuous and convex on $I$, then for $\forall x_1,x_2,x_3 \in I$, $x_1\lt x_3\lt x_2$ we have $$ \frac{f(x_3)-f(x_1)}{x_3-x_1} \le \frac{f(x_2)-f(x_1)}{x_2-x_1} \le \frac{f(x_2)-f(x_3)}{x_2-x_3} \qquad \qquad (1) $$
We proved this in theorem called Jensen's inequality. I understand that.
1. Let $c\in I$ be any point. For $x_2=c, x_1=c-s$ and $x_3=c-t$ right inequality in $(1)$ gives $$ \frac{f(c)-f(c-s)}{s} \le \frac{f(c)-f(c-t)}{t} \qquad (0\lt t\lt s) \qquad (2)$$
For $x_2=c+s, x_1=c$ and $x_3=c+t$ left inequality in $(1)$ gives $$ \frac{f(c+t)-f(c)}{t} \le \frac{f(c+s)-f(c)}{s} \qquad (0\lt t\lt s) \qquad (3)$$
Because $$f(c) = f[\frac{(c+t)+(c-t)}{2}]\le \frac{1}{2}[f(c+t)+f(c-t)] \Rightarrow f(c)-f(c-t)\le f(c+t)-f(c)$$
Dividing by $t$ and using $(2)$ and $(3)$ we have $$\frac{f(c)-f(c-t)}{t}\le \frac{f(c+s)-f(c)}{s} \qquad (0\lt t\lt s) \qquad (4)$$
(Here comes the part that i don't understand)
From $(2)$ we have that function defined by $F(t)=\frac{f(c)-f(c-t)}{t}$ decreases on interval $\langle 0,\epsilon \rangle$ for some $\epsilon \gt 0$ (Why?). According to theorem (?) decreasing function has right-limit in $0$. Hence, there exists $F(0+)$ and $$F(0+)=\lim_{t\to 0+} F(t)=\lim_{t\to 0+} \frac{f(c)-f(c-t)}{t}=\lim_{-t\rightarrow 0-} \frac{f(c-t)-f(c)}{-t}=f_{-}^{'}(c)$$
How did numerator terms switch in pre-last equation?
Analogically, from $(3)$ we prove existence of $f_{+}^{'}(c)$. For $t\rightarrow 0+$ in $(4)$ and then $s\rightarrow 0+$ we get $f_{-}^{'}(c)\le f_{+}^{'}(c)$
I will be posting 2. and 3. proofs soon, but i want to understand this part first.
In general, if $f$ is increasing, the left and right hand limits exist: fix $a\in \mathbb R$. The set $S=\left \{ f(x):a<x \right \}$ is bounded below, because $f$ is increasing. Let $z$ be the greatest lower bound of $S$.
Let $\epsilon >0$. and consider $(z,z+\epsilon)$.Then by definition of $z$, there is an $x_0>a$ such that $z<f(x_0)<z+\epsilon$. But then $f((a,x_0))\subseteq (z,f(x_0))\subseteq (z,z+\epsilon)$ so $f$ is right continuous at $a$ and the limit is $z$. Similarly, $f$ is left continuous at $a$.
$1).$ If $F(t)=\frac{f(c)-f(c-t)}{t}$, then $F$ is increasing on $(0,\epsilon)$ so $F_+(0)$ exists and
$F_+(0)=\lim_{t\to 0+} F(t)=\lim_{t\to 0+} \frac{f(c)-f(c-t)}{t}=-\lim_{t\to 0+}\frac{f(c)-f(c+(-t))}{(-t)}=$
$-\lim_{(-s)\to 0+} \frac{f(c)-f(c+s)}{s}=-\lim_{s\to 0-} \frac{f(c)-f(c+s)}{s}=\lim_{s\to 0-} \frac{f(c+s)-f(c)}{s}=f_{-}'(c)$
Similarly, the right-hand derivative exists.
$2).$ This follows immediately from the inequality $(1)$, noting that $x_1\lt x_3\lt x_2$. For instance, letting $x_3\to x_1$ and $x_2\to x_3$ we have the result for $f'_+$.
$3).$ An increasing function $f$ can have at most countably many discontinuities: if $f$ is discontinuous at $a\neq b$, then choose disjoint intervals $I$ and $J$,containing $a$ and $b$,respectively. But then $f(I)$ and $f(J)$ contain $f(a)$ and $f(b)$, respectively, and are disjoint, since $f$ is increasing. Now pick rational numbers $r_I\in f(I)$ and $s_J\in f(J)$. Clearly, $r_I\neq s_J$. Thus, the map $r_I\mapsto a$ is a bijection.
Therefore, $f'_+$ and $f'_-$ can have at most countably many discontinuities so the union of the sets on which either one is discontinuous is countable as well.
Pick a point $a$, at which $f'_+$ and $f'_-\ are$ continuous. The inequality $(1)$ shows that if $x<a$ then $f'_-(x)\leq f_+'(x)\leq f'_-(a)$, so letting $x\to a^{-}$ we get $f_+'(x)\to f_-'(a)$ so $f_+'(x)= f_-'(a).$