How to prove the language of all Turing Machines that accept an undecidable language is undecidable?


I want to prove that $ L=\{\langle M \rangle |L(M)\text{ is undecidable}\}$ is undecidable

I am not sure about this. This is my try :

Suppose L is decidable. Let $ E$ be the decider from $ L$ . Let $ A$ be a TM which is recognizing $ A_{TM}$ . Let $ S$ be a TM which works on input $ \langle M,w \rangle$ in the following way:

  1. Construct a TM $ N$ which works on Input $ x$ as follows: Run $ M$ on $ w$ . If $ M$ $ accepts$ run $ A$ on $ x$ and accept $ x$ if $ A$ accepts.(In this case is $ L(N)=A_{TM}$ ). If $ M$ $ rejects$ $ w$ , $ accept$ $ x$ .(In this case is $ L(N)=\Sigma^*$ )
  2. Run $ E$ on $ N$ and accept if N accepts. Otherwise reject

I am not sure if my reduction is the right way or not. Maybe someone can help to finish the reduction 🙂