Bellman equation for
.
We want to show
for all states
.
The core idea of the proof is to use the law of total probability to go from marginal to conditional probabilities, and then invoke the Markov assumption.
The law of total probability states that if
is an event and
are a partition of the sample space, then
.