More Undecidability/Halting Results + Induction
Continuation
M-x blackbox
Left off
http://www.lel.ed.ac.uk/~gpullum/loopsnoop.html
A Third View:
What else can we not decide?
So What?
It gets worse!
Rice’s theorem:
Decision problem for any non-trivial extensional property of Turing machines is undecidable.
- Non-trivial – not “all of them” or “none of them”
- Extensional – not about “does it have 3 “0”s in its source code, about how it behaves
You can’t tell much of anything about every program.
Although ACL2 cannot do it for us!
Induction begins.
What is an induction Scheme?
Every terminating function gives rise to an induction Scheme
EDIT: Do list induction
(definec nat-ind (n :nat) :nat
(if (zp n)
0
(nat-ind (1- n))))
1. (not (natp n)) ⇒ φ
2. (natp n) ∧ (zp n) ⇒ φ
3. (natp n) ∧ (not (zp n)) ∧ φ|((n n-1)) ⇒ φ
Separate /induction/ cases from /base cases/.
- Expand out all the macros
- Find the terminals (doesn’t have ifs, not (subexpr of) the test), no casing. Undconditional code execution.
- Maximal non-terminals are the biggest ones. the return calls.
- Every terminals has the conditions required to reach it. (how you get down to it)
- Set of recursive calls are the ones that have to be executed to execute the terminal.
-
Let t1 … tk be the maximal terminals with corresponding conditions each with its corresponding sequence of recursive calls to f under a subst.
¬ic⇒φ For alltithat are basic terminals:ic∧ci⇒φ For alltithat are recursive terminals:(ic∧ci∧∧1≤j≤|ri|φ|σji)⇒φ