An abstract acceptable indexing of Turing machines, stronger than the
language-level version used in SelfReference.lean because it records the full
behavior (accept/reject/diverge) of each machine on each input rather
than just the language. Provides the standard ingredients needed to prove the
Recursion Theorem: encoding/decoding, a pairing function, an smn function with
the usual specification, a notion of computable index transformations,
representability of computable transformations, and closure of IsComputable
under composition and the diagonal x ↦ smn x x.
- TMIndex : Type
- isComputable_smn_diag : self.IsComputable fun (x : self.TMIndex) => self.smn x x
- isComputable_comp (f g : self.TMIndex → self.TMIndex) : self.IsComputable f → self.IsComputable g → self.IsComputable (f ∘ g)
- isComputable_smn_apply (e : self.TMIndex) : self.IsComputable (self.smn e)
Instances For
Recursion Theorem (Sipser, Lecture 11). For any computable
transformation t : TMIndex → TMIndex of TM indices there exists R such that
for every input w, R and t R produce the same behavior — R operates
the same as t R. In particular, R has access to its own description via t.
Proof sketch: let h x = t (smn x x); by representability of computable
transformations there is e₀ with behavior (smn e₀ x) w = behavior (h x) w;
take R = smn e₀ e₀.
Language-level corollary of the Recursion Theorem: for any computable
t : TMIndex → TMIndex there exists R with L(R) = L(t R). Follows from
recursion_theorem by taking accepting inputs on both sides.