I have the following expectation to calculate :
$$ \mathbf{E}\left[ e^{\int_{t_0}^{\tau} r_s ds} \mathbf{1}_{\{\tau < T\}}\right] $$
More precisely, I want to show that :
$$ \mathbf{E}\left[ e^{\int_{t_0}^{\tau} r_s ds} \mathbf{1}_{\{\tau < T\}}\right] = \int_{t_0}^T P(s) dQ(s)$$
where $P(s) \equiv \mathbf{E}\left[ e^{\int_{t_0}^{s} r_u du} \right]$ and $Q(s) \equiv \mathbf{E}\left[ e^{\int_{t_0}^{s} \lambda_u du} \right]$, $\tau$ is the first jump of a Poisson process with default intensity $(\lambda_t)_t$.
The only hypothesis I have is that rates and default are independent $-$ rates don't follow a special process.