Consider this function
def foo():a=0.0for i in range(10**100)a=a+1/ireturn a>2
This is valid code that returns True.
Note that you can tell it returns true without doing 10100 operations, and a good compiler could too.
Shouldn’t this also be valid code?
def foo():a=0.0for i in range(∞)a=a+1/(i**2)return a>1
There are a whole space of “programs” that cant be computed directly, but can still be reasoned about. Computing directly is a subset of reasoning.
Consider this function
def foo():a=0.0for i in range(10**100)a=a+1/ireturn a>2
This is valid code that returns True.
Note that you can tell it returns true without doing 10100 operations, and a good compiler could too.
Shouldn’t this also be valid code?
def foo():a=0.0for i in range(∞)a=a+1/(i**2)return a>1
There are a whole space of “programs” that cant be computed directly, but can still be reasoned about. Computing directly is a subset of reasoning.