def M(f,inp):
def g():
y = f(inp) # run f on inp
return 42 # this line is not really important
return zinph(g)
Note that M is a haltchecker! There are two cases
to consider: either f(inp) halts or it does not. (1) If f(inp)
does halt, then so does the zero-input function g. By assumption,
zinph detects this and returns True. Thus, if f(inp) halts, M
returns True. (2) If f(inp) runs forever, then so does g().
Again, zinph would detect this and return False. Thus, if f(inp)
runs forever, M returns false. Since M returns True iff f(inp)
halts, M is a haltchecker, which is a contradiction. Since
everything in M is standard except zinph, it must be that zinph
can not exist (as a program). Thus, zinph is uncomputable.
def M(f,inp):
def g(x):
y = f(inp) # run f on inp
return 42 # this line is not really important
return ainph(g)
Note that M is a haltchecker! There are two cases
to consider: either f(inp) halts or it does not. (1) If f(inp)
does halt, then note that g will halt on all possible inputs x,
since g ignores x! By assumption,
ainph detects this and returns True. Thus, if f(inp) halts, M
returns True. (2) If f(inp) runs forever, then so does g(x) for
all possible inputs x -- again, because x does not influence
the behavior of g.
As before, ainph would detect this and return False.
Thus, if f(inp)
runs forever, M returns false. Since M returns True iff f(inp)
halts, M is a haltchecker, which is a contradiction. Since
everything in M is standard except ainph, it must be that ainph
can not exist (as a program). Thus, ainph is uncomputable.
def M(f,inp):
def g1(x):
y = f(inp) # run f on inp
return 42 # this line now IS important
def g2(x):
return 42 # this line is also important
return autograder(g1,g2)
Note that M is a haltchecker! There are two cases
to consider: either f(inp) halts or it does not. (1) If f(inp)
does halt, then notice that g1(x) does the
same thing as g2(x) for all inputs x.
By assumption,
autograder detects this and returns True. Thus, if f(inp) halts, M
returns True. (2) If f(inp) runs forever, then g1(x)
runs forever when g2(x) halts.
Again, autograder would detect this and return False.
Thus, if f(inp)
runs forever, M returns false. Since M returns True iff f(inp)
halts, M is a haltchecker, which is a contradiction. Since
everything in M is standard except autograder, it must be that
autograder can not exist (as a program). Thus,
autograder is uncomputable.