Documentation

CslibFrontier.Foundations.Computability.RecursiveInRecursion

The relativized recursion theorem, uniform in the oracle #

Kleene's recursion theorem for oracle codes Nat.RecursiveIn.Code: for every computable map f on codes there is a code c such that f c and c compute the same function relative to every oracle g, partial oracles included (Code.fixed_point). The map f is computable without an oracle, and the fixed point is chosen before the oracle, so one fixed point serves all oracles. The parameterized form (Code.fixed_point₂) gives, for every oracle code cf, a code c that computes relative to every g what cf computes on its own index paired with the input.

The proofs follow Mathlib's Nat.Partrec.Code.fixed_point and Nat.Partrec.Code.fixed_point₂. Where Mathlib uses that Nat.Partrec.Code.eval is partial recursive, these proofs use one oracle code that evaluates every oracle code relative to every partial oracle (Code.exists_universal_partial), and Mathlib's curry is replaced by the oracle-uniform Code.curry.

Main results #

Relation to the unrelativized recursion theorem #

Moschovakis states the theorem as follows [Mos10] (p. 190): for a recursive partial function f(e, x⃗) there is a number z̃ with {z̃}(x⃗) = f(z̃, x⃗), relative to universal functions and S-functions that Kleene takes from his enumeration theorem. He reports (p. 189) that Kleene stated and proved it in §2 of [Kle38]. Code.fixed_point₂ is this form with f computed by an oracle code cf, and Code.fixed_point is the form for a computable map on codes. Both extend the source in two ways.

References #

theorem Nat.RecursiveIn.Code.fixed_point {f : Code → Code} (hf : Computable f) :
∃ (c : Code), ∀ (g : ℕ →. ℕ), eval g (f c) = eval g c

The relativized recursion theorem, uniform in the oracle. For every computable map f on oracle codes there is a code c such that f c and c compute the same function relative to every oracle g, including partial ones. The fixed point does not depend on the oracle. This is the oracle analogue of Mathlib's Nat.Partrec.Code.fixed_point and the relativized form of Kleene's recursion theorem [Kle38].

theorem Nat.RecursiveIn.Code.fixed_point₂ (cf : Code) :
∃ (c : Code), ∀ (g : ℕ →. ℕ) (n : ℕ), eval g c n = eval g cf (Nat.pair (Encodable.encode c) n)

The parameterized relativized recursion theorem. For every oracle code cf there is a code c that computes, relative to every oracle g, what cf computes on its own index paired with the input: Φ^g_c(n) ≃ Φ^g_{cf}(⟨c, n⟩). The fixed point does not depend on the oracle. This is the oracle analogue of Mathlib's Nat.Partrec.Code.fixed_point₂, with the uniform family of partial functions given by the code cf.