Let $(T,\mathcal T,\tau)$ be a measure space, $a,b\ge0$, $s,t\in T$ and $$f(x):=a\min(x(s),bx(t))\;\;\;\text{for }x\in L^2(\tau).$$
How can we calculate the generalized gradient $\partial_Cf(x)$ of $f$ at $x\in L^2(\tau)$?
We may note that $2\min(u,v)=u+v-|u-v|$ for all $u,v\in\mathbb R$. Now the only point on which $\mathbb R\ni u\mapsto|u|$ is not differentiable (in the classical sense) is $0$, but the generalized gradient at $0$ is easily seen to be $[-1,1]$. Moreover, $\mathbb R\setminus\{0\}\ni u\mapsto|u|$ is continuously differentiable and the generalized gradient at $x\in\mathbb R\setminus\{0\}$ is simply $\{x/|x|\}$. This knowledge should be helpful. However, I'm new to this topic and have no idea how to tackle the problem.
EDIT: As Iosif Pinelis pointed out, we need to assume that the singletons in $(T,\mathcal T,\tau)$ are measurable and admit positive measure to ensure that $f$ is locally Lipschitz continuous.