simplifying $\min(\max(A,B),C) $ In a larger problem, I have to make use of the following
$$\min(\max(A,\ B),\ C)$$  
Please how do I simplify?
 A: This does not simplify for arbitrary $A,B,C$, but a scenario where this often comes up is when $A<C$ and $B \in \mathbb{R}$, then $\min(\max(A,B),C)$ has the conceptual simplification of reducing to $B$ unless $B$ is too high or low.
E.g. $f(x) := \min(\max(0,x),1) = x$ if $0\leq x  \leq 1$, otherwise it takes the extreme value it is closest to.
A: If you wanna use the notation in stochastic caculus I saw sometimes, $max(A,B) = B + (A-B)_+$, then $$min(B+(A-B)_+, C) = C - (C - B - (A-B)_+)_+$$
A: For $a, b ∈ \Bbb R:$
$$\max\left(a,b\right) = \frac{a+b+\left|a-b\right|}{2}$$
$$\min\left(a,b\right) = \frac{a+b-\left|a-b\right|}{2}$$
Therefore, if  $a,b,c ∈ \Bbb R:$
$$\min\left(\max\left(a,b\right),c\right) =
 \min\left(\frac{a+b+\left| a-b\right|}{2},c\right)  = $$
$$=\frac{\frac{a+b+\left| a-b\right|}{2}+c-\left|\frac{a+b+\left|a-b\right|}{2}-c\right|}{2}=
\frac{a+b+\lvert a-b\rvert}{4}+\frac{c}{2}-\left|\frac{a+b+|a-b|}{4}-\frac{c}{2}\right|=$$
$$=\frac{a+b+\left|a-b\right|+2c}{4}-\left|\frac{a+b+|a-b|-2c}{4}\right|=$$
$$=\frac{a+b+\left|a-b\right|+2c-\Big|a+b+\left|a-b\right|-2c\Big|}{4}$$
