3 ms·
Your comment helped me get this: function HALT(program, input): # This is a "magic" function for our proof - we assume it exists for all programs # I
by influx 2y ago
Your comment helped me get this:
function HALT(program, input):
# This is a "magic" function for our proof - we assume it exists for all programs
# In reality, this function cannot exist because of the paradox we're about to create
# Returns True if `program(input)` halts, False if it runs forever
...
# Program D: Creates the paradox
function D(self):
if HALT(D, self) == True:
loop_forever()
else:
halt()