Let $\left( {{X_t}:t \in \left[ 0 \right.\left. {, + \infty } \right\rangle } \right)$ be a continuous time Markov chain on a probability space $\left( {\Omega ,\mathcal{F},\mathbb{P}} \right)$ with a finite state space $S$, defined by jump chain/holding times definition. Suppose $A,B \in \sigma \left( {{X_0}} \right)$ and $f\left( t \right) = \mathbb{E}\left[ {\mathbb{P}\left( {A|{X_t}} \right)|B} \right]$ is a decreasing function. Suppose I want to calculate $f'\left( t \right)$. We can assume that $f'\left( t \right)$ is always finite.
There are two ways to go about this, and the other one is probably wrong, but I want to know why.
1) Since $S$ is finite,
$\mathbb{E}\left[ {\mathbb{P}\left( {A|{X_t}} \right)|B} \right] = \sum\limits_{x \in S} {\mathbb{P}\left( {A|{X_t} = x} \right)\mathbb{P}\left( {{X_t} = x|B} \right)} \Rightarrow f'\left( t \right) = \sum\limits_{x \in S} {\frac{d}{{dt}}\left( {\mathbb{P}\left( {A|{X_t} = x} \right)\mathbb{P}\left( {{X_t} = x|B} \right)} \right)} $.
2) Since ${f'}$ is finite, $\frac{d}{{dt}}\mathbb{E}\left[ {\mathbb{P}\left( {A|{X_t}} \right)|B} \right]$ is finite so $\frac{d}{{dt}}\mathbb{P}\left( {A|{X_t}} \right)$ is finite $\mathbb{P}\left( { \cdot |B} \right)$-almost surely. Lebesgue dominated convergence theorem then implies $f'\left( t \right) = \mathbb{E}\left[ {\frac{d}{{dt}}\mathbb{P}\left( {A|{X_t}} \right)|B} \right] = \sum\limits_{x \in S} {\frac{d}{{dt}}\left( {\mathbb{P}\left( {A|{X_t} = x} \right)} \right)\mathbb{P}\left( {{X_t} = x|B} \right)} $.
Suppose 1) and 2) are both true. That would imply $\sum\limits_{x \in S} {\mathbb{P}\left( {A|{X_t} = x} \right)\frac{d}{{dt}}\left( {\mathbb{P}\left( {{X_t} = x|B} \right)} \right)} = 0$, which I have strong reasons to believe is wrong.
Suppose that my line of reasoning is wrong when I conclude that differentiation and expectation commute. Does 2) hold when they do commute? Under what (usual) applicable assumptions do they commute?
EDIT: The following holds for a discrete random variable $X$: $\mathbb{E}\left[ {g\left( X \right)} \right] = \sum\limits_x {g\left( x \right)\mathbb{P}\left( {g\left( X \right) = g\left( x \right)} \right)} = \sum\limits_x {g\left( x \right)\mathbb{P}\left( {X = x} \right)} $, where the first equality follows from definition, and the second is the law of unconscious statistician.
Let $g\left( x \right) = \frac{d}{{dt}}\mathbb{P}\left( {A|{X^{\left( t \right)}} = x} \right)$, then $\mathbb{E}\left[ {\frac{d}{{dt}}\mathbb{P}\left( {A|{X^{\left( t \right)}}} \right)|B} \right] = \mathbb{E}\left[ {g\left( {{X^{\left( t \right)}}} \right)|B} \right] = \sum\limits_x {g\left( x \right)\mathbb{P}\left( {{X^{\left( t \right)}} = x|B} \right)} = \sum\limits_x {\left( {\frac{d}{{dt}}\mathbb{P}\left( {A|{X^{\left( t \right)}} = x} \right)} \right)\mathbb{P}\left( {{X^{\left( t \right)}} = x|B} \right)} $.