Consider the halting problem $HALT_{TM} = \{\langle M, w\rangle: M \text{ is a TM that halts on input } w\}$,
and some undecidable Language $L$ of the form $L = \{\langle M\rangle: M \text{ does a thing} \}$.
If I want to reduce the halting problem to $L$, from what I understand, I have to construct a Turing Machine $M'$ which takes the input $\langle M, w\rangle$, and if $M$ halts on $w$, $M'$ does the thing, otherwise, $M'$ does not do the thing.
Now, I want to reduce the complement of the halting problem to $L$. Meaning, I need to construct a Turing Machine $M''$ with the following:
- If $M$ halts on $w$, then $M''$ does not do the thing.
- If $M$ does not halt on $w$, then $M''$ does the thing.
The first part seems simple to implement, if $M$ halts on $w$, then $M''$ can be forced to enter into an infinite loop. But then, I need $M''$ to do the thing whenever $M$ does not halt on $w$, which from my understanding is the very definition of the halting problem - since I don’t know whether $M$ will ever halt on $w$, I cannot ever do the thing. Does that mean a reduction is not possible, or is my approach/understanding wrong?