October 27, 2025



# This can be found in the "What Can Be Computed?" book.
# returns: If P(I) is 'yes', returns 'yes'. If P(I) terminates but
# does not return 'yes', then 'no' is returned. If P(I) enters an
# infinite loop, this program also enters an infinite loop.
import utils; from utils import rf
from universal import universal
def recYesOnString(inString):
(progString, newInString) = utils.DESS(inString)
val = universal(progString, newInString)
if val == 'yes':
return 'yes'
else:
return 'no' Proofgrammers