In the distributionally robust optimization problem \begin{aligned} \min_{x\in X}\sup_{P\in\mathfrak{P}}\mathbb{E}_P[f(x,\xi)], \end{aligned} where $f:\mathbb{R}^n\to\mathbb{R}$ and $P$ is a distribution function over the measurable set $\mathfrak{P}$, and $\mathbb{E}_P$ denotes the expected value with respect to the distribution $P$.
For a differentiable function $f$, if we define $g(x):=\sup_{P\in\mathfrak{P}} \mathbb{E}_P[f(x,\xi)]$, is the function $g$ differentiable for the variable $x$ like $\nabla g(x)=\sup_{P\in\mathfrak{P}}\mathbb{E}_P[\nabla_x f(x,\xi)]$?
In general, I guess it is not true because the interchangeability of the differentiation and expectation operators cannot hold. But I am curious what is the condition that the following equation holds? \begin{aligned} \nabla g(x)=\sup_{P\in\mathfrak{P}}\mathbb{E}_P[\nabla_x f(x,\xi)]. \end{aligned}