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 #
Nat.RecursiveIn.Code.fixed_point: the relativized recursion theorem, uniform in the oracle.Nat.RecursiveIn.Code.fixed_point₂: its parameterized form.
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.
- Semantics. Codes are evaluated relative to a partial oracle
gin the library's sequential oracle-code semanticsCode.eval g, in which a query wheregis undefined diverges. The universal code used in the proof isCode.exists_universal_partial. - Quantifier order. The fixed point
cis chosen before the oracle: onecworks for every partial oracleg. InCode.fixed_pointthe mapfis computable in the ordinary sense (Computable f, no oracle); inCode.fixed_point₂the codecfis evaluated relative to the samegasc.
References #
- Y. N. Moschovakis, Kleene's amazing second recursion theorem, pp. 189–190 (checked): the statement and proof of the (second) recursion theorem, and its attribution to §2 of [Kle38].
- S. C. Kleene, On notation for ordinal numbers, §2, p. 153 (checked): the last
two sentences of §2 state and prove the theorem — for any partial recursive
ψ(z, 𝔵)there is a numberfwhich definesψ(f, 𝔵)recursively; takeedefiningψ(S¹ₙ(y, y), 𝔵)andf = S¹ₙ(e, e).
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].
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.