Consider the following language: $$ L = \{ \langle M \rangle \ |\ M \text { accepts } w \text { whenever it accepts } w^R \}$$
I am trying to understand the following proof that this language $L$ is undecidable.
The proof proceeds by contradiction, by reducing to $L$ the language $A_{TM}=\{\langle M,w \rangle\mid M\text{ accepts }w\}$ known to be undecidable. It goes as follows:
Suppose that $L$ is decidable, then there's a TM $M_L$, that decides $L$
Thus we can build $M_{ATM}$ to decide $A_{TM}$ as follows:
- Let $\langle M, w \rangle$ be an input for $M_{ATM}$.
- Construct a machine, $M_1$ which on input $x$: Simulate $M$ on $w$; if $M$ rejects $w$, $reject$. If $M$ accepts $w$, $accept$ if $x=01$, $reject$ otherwise.
- Simulate $M_L$ on input $\langle M_1 \rangle$.
- $accept$ if $M_L$ rejects. $reject$ otherwise.
Since $A_{TM}$ is not decidable, we have a contradiction, which implies that $L$ cannot be decidable.
However there is a point of the proof I do not understand.
My question is: What happens if $M$ gets into a loop on some $w$?