I am currently reading lecture notes which aim to show that if $$ S_t = S_0 \exp (\mu t + \sigma W_t) $$ then, under the probability measure $\tilde{\mathbb{P}}$ with density $$ \gamma_T = \exp (c W_T - \frac{c^2 T}{2}) $$ $e^{-rt} S_t$ ($0 \leq t \leq T$) is a martingale under $\tilde{\mathbb{P}}$ if $$ c = - \frac{\mu - r - \frac{\sigma^2}{2}}{\sigma} $$
To prove this, they start by stating that
$$ d \left( e^{-rt} S_t \right) = S_t \left[ (\mu + \sigma c - r + \frac{\sigma^2}{2}) dt + \sigma d \tilde{W}_t \right] $$
This is where my confusion arises, since I have tried using Ito's formula to deduce the above differential, but have instead arrived at the following result: $$ d \left( e^{-rt} S_t \right) = S_t e^{-rt} \cdot \left[ (\mu + \sigma c - r + \frac{\sigma^2}{2}) dt + \sigma d \tilde{W}_t \right] $$ (I can add my explicit workings for this if neccessary).
Can anyone help me to understand how they have derived their stochastic differential?
Also, what would the definition of a martingale be in this specific context? My understanding of a martingale currently stands as being a stochastic process $X$ for which $\mathbb{E} [X_{t+\delta} | \mathcal{F}_t] = X_t$. I ask because they conclude their proof by saying
... Therefore, since $d \left( e^{-rt} S_t \right) = S_t \sigma d \tilde{W}_t$, we deduce that $e^{-rt} S_t$ is a martingale under the implied measure $\tilde{\mathbb{P}}$.
And I don't see how this conclusion proves the desired result.