Let $Y$ be a random variable and $A$ an event, such that $g(q):= E(e^{-qY} ; A)$ exists for all $q \geq 0$. (Here $E(X ; A) := \int_{A} X \hspace{3pt} dP$ for a random variable $X$).
I want to check that indeed $E(Y; A) = -g'(0)$.
I know this result is true if $A$ is the whole sample space.
Many thanks for your help.
I am not a measure-theoretic experts so I try with the elementary terms.
Note that $$ g(q) = \int_\mathcal{A} e^{-qy}dF_Y(y) $$
where $F_Y$ is the CDF of $Y$, and $\mathcal{A} = \{Y(\omega): \omega \in A\}$. As you said you know the result is true if $A = \Omega$, or equivalently $\mathcal{A} = \mathbb{R}$. Here we also need to assume the integral itself satisfy some regularity conditions such that it permits the interchange of differentiation and integration.
Then it is almost the same: $$ g'(q) = \int_\mathcal{A} \frac {\partial} {\partial q} e^{-qy}dF_Y(y) = \int_\mathcal{A} -ye^{-qy}dF_Y(y) $$
Here we just note that the set $\mathcal{A}$ is independent of $q$, so when we differentiating we do not have all the terms in fundamental theorem of calculus.
Not sure if the above arguments satisfy your requirement.