It's not hard to implement the construction in the proof. Generally you'll encounter problems in the wild in any interpreter. Similarly you can encode many open mathematical problems into simple programs where finding runtime bounds is equal to solving the problem. The Collatz Conjecture for example.
Humans can't tell you whether this program will run forever on any particular (positive integer) input, or whether all inputs terminate.
I think your indentation needs to be adjusted? Like so:
Otherwise, n = 1 terminates, and n != 1 gets stuck looping at lines 2-3.
Thank you!
It's not hard to implement the construction in the proof. Generally you'll encounter problems in the wild in any interpreter. Similarly you can encode many open mathematical problems into simple programs where finding runtime bounds is equal to solving the problem. The Collatz Conjecture for example.
Once you leave primitive recursive functions[0], reasoning quickly becomes very non-trivial.
[0]: https://en.wikipedia.org/wiki/Primitive_recursive_function