Let $X$ be a set of elements $x\in X$ and suppose that there are $S$ random states $s$ each happening with probability $\pi_s$.
Consider a function $$ f(x,A_s(x),P_s) $$ where $A_s(x)$ is a random variable (since it depends on $s$) that depends on $x$, and $P_s$ is a random variable.
Denote by $x_P$ the $x\in X$ that minimizes the expectation of $f$ for a given $P$, i.e.: $$ x_P=\arg\min_x \sum_{s=1}^S f(x,A_s(x),P_s) $$
Denote by $V$ the optimized value of $f$ without the expectation: $$ V(P_s) = f(x_P,A_s(x_P),P_s). $$
I am interested in the derivative of $V$. In particular, is there an envelope theorem that applies such that $$ \frac{dV}{dP_s}=\frac{\partial f}{\partial P_s} $$ where the $\partial$ notation implies that the derivative is taken only with respect to the third argument of $f$ (taken the first two as constant). My expectation is that this does not work but I'm not certain either way. Note that the situation is a bit unusual since $x_P$ maximizes the expectation of $f$, not $f$ itself at each $s$.
I know that there are envelope theorems that apply with arbitrary choice sets like we have here ($X$) but I don't know if one of these theorems would also apply with the minimum applied to the expectation. Note that a use a discrete random variable here but if there is a result with a continuous variable that would also be useful. Thanks!
If $x$ is decided after observing $s$, the decision problem is $$ V(p_s) = \min_x f(x,A_s,P_s) $$ and the expected value is $$ \mathbb{E}_s[V(p_s)] = \mathbb{E}_s[\min_x f(x,A_s,P_s)]. $$ In that case, you can't differentiate the lhs of the expected value wrt to $P_s$, but in the decision problem, $$ \nabla_{P_s} V(P_s) = \nabla_{P_s} f(x^*(A_s,P_s),A_s,P_s). $$ I suppose you could then integrate over $s$ to get some kind of "average envelope" term, but I don't know what that would mean.
If you pick $x$ before observing the state $s$, you are solving $$ \min_{x} \mathbb{E}_s \left[ f(x,A_s,P_s) \right] $$ and you can only make sense of the parametric envelope theorem if $P_s$ is not a function of $s$, or if the distribution of $P$ is determined by $x$ and $s$, and you are really thinking about the density $f[P|x,s]$, and shifting $f$ in terms of a Gateau or Frechet derivative or something. If $p$ were instead fixed, you'd have $$ V(p) = \min_{x} \mathbb{E}_s \left[ f(x,A_s,p) \right] $$ and $$ \nabla_p V(p) = \mathbb{E}_s \left[ \nabla_p f(x^*(p),A_s,p) \right]. $$