For convex functions $f_i: \mathbb{R}^n \to \mathbb{R}$, $1 \le i \le m$, let $f:\mathbb{R}^n \to \mathbb{R}$ be defined via $f(x) = \max_{i \in [m]} f_i(x)$.
I want to prove that the directional derivative of $f$ satisfies $f'(x,s) = \max_{i \in \mathcal{A}(x)} f_i'(x,s)$, with the set of active indices $\mathcal{A}(x) = \{i \in [m]: f_i(x)=f(x)\}$
We can obtain (by using the fact that convex functions are continuous on open domains), $$ \frac{f(x+ts)-f(x)}{t} = \max_{i \in \mathcal{A}(x)} \frac{f_i(x+ts) - f(x)}{t} = \max_{i \in \mathcal{A}} \frac{f_i(x+ts) - f_i(x)}{t}. $$
Now in order to get to the desired result, one needs to apply $\lim_{t\to 0^+}$ to both sides of the equation and needs to argue, that the interchange of limit and maximum is possible.
But why can we interchange it? Why is it not possible to interchange the limit and maximum when maximizing over $[m]$ (the equation above would still be valid in this case)?