How to show the following process is a local martingale but not a martingale? I am confronted with the same problem in this thread, which hasn't had a complete answer yet.
In the sequel, we denote by $Y^T$ the stopped process $Y^T_t = Y_{T \wedge t}$. Consider the following process:
$$
 X_t = \begin{cases}
  W_{t/(1-t)}^T &\text{for } 0 \le t < 1,\\
  -1 &\text{for } 1 \le t < \infty.
 \end{cases}
$$
where $W$ is a Brownian motion and $T = \inf\{t: W_t = -1\}$. It's easy to tell that $X$ is not a martingale. Now on wikipedia, it claims that the sequence of stopping times $\{\tau_k\}$ localizes $X$, where $\tau_k = \inf\{t: X_t = k\} \wedge k$.
I am confused about how to prove such claim. The "details" on the webpage seem a bit obscure to me.
On the other hand I found in the book "Stochastic calculus and applications" (page 133, Example 5.6.9) a similar example. The authors consider the process $X_t+1$ (where $X_t$ is defined as in our problem) and for uniformity in symbols I slightly change their proof. Unlike the example on wikipedia, they explicitly specify the filtration $\{\tilde{\mathscr{F}}_t = \mathscr{F}_{t/(1-t)}\}$ to which, as they assert, $X_t$ is local martingale. They construct the following stopping times:
$$
S_n = \frac{n}{n+1}I(T \geq n) + \Big(\frac{T}{T+1}+n\Big)I(T<n)
$$
Then, they say that the following equation can be established:
$$
X^{S_n}_t = W^{T \wedge n}_{t/(1-t)},
$$
which entails that $X^{S_n}$ is a $\{\tilde{\mathscr{F}_t}\}$-martingale.
To me the second approach isn't clear either. Indeed, I can't see how in their proof $\tilde{\mathscr{F}_t}$ can be defined for $t \geq 1$. Also, $X^{S_n}_t = W^{T \wedge n}_{t/(1-t)}$ seems to hold only for $t<1$. After doing some algebra I get
$$
X^{S_n}_t = W^{T \wedge n}_{t/(1-t)} I(t<1) + W_{T \wedge n} I(t \geq 1),
$$
instead. The rightmost term in the above equation, namely $W_{T \wedge n} I(t \geq 1)$, frustrates me in attempt to show martingale property of $X^{S_n}$.
I also considered an alternative approach: to show that for any bounded stopping time $S$, $E[X^{S_n}_S] = 0$. Still I failed to complete the proof.
Can anyone help me with this problem?
 A: We have to show that $(X_t^{S_n})_{t \geq 0}$ is a martingale. Since $$X_t^{S_n} = W_{t/(1-t)}^{T \wedge n} 1_{\{t<1\}} + W_{T \wedge n} 1_{\{t \geq 1\}}$$ this follows if we can prove the following proposition.

Proposition Let $(W_t)_{t \geq 0}$ be a Brownian motion. Then $$Y_t := W_{t/(1-t)}^{T \wedge n} 1_{\{t<1\}} + W_{T \wedge n} 1_{\{t \geq 1\}}$$ is a martingale with respect to $$\tilde{\mathcal{F}}_t := \begin{cases} \sigma(W_u; u \leq t/(1-t)) & t \in [0,1) \\ \sigma(W_u; u \geq 0), & t \geq 1. \end{cases}$$

Proof: Since $(W_t)_{t \geq 0}$ is a martingale with respect to the canonical filtration $(\mathcal{F}_t)_{t \geq 0}$, it follows from the optional stopping theorem that $(W_t^{T \wedge n})_{t \geq 0}$ is a martingale, i.e.
$$\mathbb{E}(W_v^{T \wedge n} \mid \mathcal{F}_u) = W_u^{T \wedge n} \qquad \text{for all $u \leq v$}. \tag{1}$$
For $v=n$ this shows, in particular,
$$\mathbb{E}(W_{T \wedge n} \mid \mathcal{F}_u) = W_u^{T \wedge n} \tag{2}.$$
Now fix $s \leq t <1$. Then $$u := \frac{s}{1-s} \leq \frac{t}{1-t} =: v$$ and therefore $(1)$ gives $$\mathbb{E}(Y_t \mid \tilde{\mathcal{F}}_s) = Y_s, \qquad s \leq t <1. \tag{3}$$
For $t=1$ we can use $(2)$ to conclude that $$\mathbb{E}(Y_1 \mid \tilde{\mathcal{F}}_s) = Y_s, \qquad s \leq 1. \tag{4}$$
Finally, if $t>1$ then $Y_t = W_{T \wedge n}$ is $\tilde{\mathcal{F}}_s$-measurable for any $s \geq 1$, and therefore
$$\mathbb{E}(Y_t \mid \tilde{\mathcal{F}}_s) = Y_t = Y_s \qquad \text{for all $1 \leq s \leq t$}. \tag{5}$$
If $s \in (0,1)$, then it follows from the tower property and $(4)$, $(5)$ that
$$\mathbb{E}(Y_t \mid \tilde{\mathcal{F}}_s) = Y_s \qquad \text{for all $s < 1 \leq t$.}$$
Combining the above considerations, we find that $(Y_t, \tilde{\mathcal{F}}_t)_{t \geq 0}$ is a martingale.
