by constantcrying · 4y ago · 0 comments
function haltWithAdd(code) { var a = 1 + 2; return halt(code); }
This clearly solves the halting problem (we assumed the existence of halt as the first step of our proof by contradiction). And it clearly uses addition (surely you can find where it does). By the logic (as written) of the article the implication is that '+' does not exist.
In general: Let P be a statement. Lets assume that the Turing Machine T solves the halting problem - let's call this assumption H.
Now we assume P is false. Now we have a contradiction - H says that T solves the halting problem, but we know that there is not Turing machine that can solve the halting problem! Thus P must be true!
Notice that P is arbitrary.
Plainly speaking: If you assume that the halting problem can be solved, I can formally prove you that addition does not exist (i.e. there is no operation +, such that it forms a group on Z)
> By the logic (as written) of the article the implication is that '+' does not exist.
This is actually true. With that strong assumption, + does not exist.
Why are you pretending I do not understand the basics of logic while missing the actual argument by a mile?
In the article the author says: "If you implement halts using canBeRegex, you’ve got a proof by contradiction that canBeRegex can’t exist."
Which is plainly a false statement. What he means is the following statement: "If you show that if canBeRegex is computable then halts is computable, you’ve got a proof by contradiction that canBeRegex can’t exist."
Those two statements are clearly not equivalent. And only the second one is true.
Implementing the halting problem using addition does not assume the existence of halt. It assumes the existence of addition, and you use that to show that halt must also exist. And that's not possible to do.
To implement halts using addition, you need to:
- Take the input to halts, namely the source code to a program.
- Convert that into an input to addition, namely two numbers.
- Call into addition, which adds the numbers.
- Use the result of that addition to infer whether the original program halts or not.
The code very clearly:
- is an implementation of the halting problem. If halt existed it would undoubtly solve the halting problem
- it uses '+'
You are prentending I didn't know what the author meant. The point is that what the author says is simply not true, if you take the statement as written. What he wants to show is that if canBeRegex is computable then halt is computable, but that isn't what he is saying.
I know what the author wants to say, but it isn't what he actually says.