1. The “willHalt” program halts for any input.
2. The return value of “willHalt” answers the question “Will the input program halt when run on the input data?”
Now, let us run “willHalt” by dragging onto it a program and a data file. The program is our new program, and the data file is *also* our new program.
If the “willHalt” program does what is claimed, then it will halt (by claim 1) and its return value (by claim 2) will answer the question “Will our program halt when run with itself as input data?”
So let us consider every possible outcome:
If “willHalt” runs forever with these inputs, then claim 1 was false.
If “willHalt” returns “true”, then we know, by looking at how our program is written, that our program will loop forever, so claim 2 is false.
If “willHalt” returns “false”, then we know, by looking at how our program is written, that our program will exit quickly, so claim 2 is false.
If “willHalt” returns something other than “true” or “false”, then claim 2 is false.
I am working through your example with pen and paper, and I'm comfortable with treating the willHalt program as a black box that does only the two things you've described (i.e., willHalt always halts and willHalt always correctly tell us whether a given program, with a particular set of input data, will halt or not).
What I don't get is how the program that's fed to willHalt works. Can you help with that?