Assume $S_0(t)=\exp(\int_0^t r(s) ds)$. Then $\mathbb{Q}\sim \mathbb P$ is a martingale measure $\iff$ every asset price process $S_i$ has price dynamics under $\mathbb Q$ of the form
$dS_i(t)=r(t)S_i(t)dt+dM_i(t)$,
where $M_i$ is a $\mathbb Q$ - martingale.
I read the following proof for this theorem:
Let $\tilde{S}_i(t)=\dfrac{S_i(t)}{S_0(t)}$.
$\dfrac{1}{S_0(t)}=\exp(-\int_0^t r(s) ds)$
Hence
$d\left(\dfrac{1}{S_0(t)}\right)=-r(t)\dfrac{1}{S_0(t)}dt.$
By Itó's product rule
$d\left(\dfrac{S_i(t)}{S_0(t)}\right)=-r(t)S_i(t)\dfrac{1}{S_0(t)}dt+\dfrac{1}{S_0(t)}dS_i(t)+d\langle S_i,\dfrac{1}{S_0}\rangle_t= -r(t)\tilde{S}_i(t)dt+\dfrac{1}{S_0(t)}dS_i(t).$
I understand every mathematical step of the proof but why does this proof the theorem? Can anyone explain?