This project formalizes oracle-relative computability and the theory of Turing degrees in Lean. We define a model of relative computability via partial recursive functions, building a framework for expressing and proving properties of Turing reducibility, Turing equivalence, jump operators, and recursively enumerable sets.
The project contains two parallel approaches to oracle computability:
Computability/: Oracle computability with sets of oracles (Set (ℕ →. ℕ))Computability/SingleOracle/: Oracle computability with single oracles (ℕ →. ℕ)
Defines our model of relative computability:
RecursiveIn O f: the functionfis computable relative to oracles in the setO.- Generalizations:
RecursiveIn',RecursiveIn₂,ComputableIn,ComputableIn₂for functions betweenPrimcodabletypes. - Basic lemmas showing that partial recursive functions are recursive in any oracle.
- Universal oracle machine
evaloand related functions.
Provides Gödel numbering for partial recursive functions:
- Defines
codeotype for representing oracle programs - Implements
encodeCodeo,decodeCodeofor universal simulation - Defines
evalofunction for evaluating encoded programs with oracles
Builds basic Turing reducibility and degree structure:
f ≤ᵀ g:fis Turing reducible togf ≡ᵀ g: Turing equivalenceTuringDegree: equivalence classes ofℕ →. ℕunder≡ᵀ- Partial order instance for
TuringDegree - Join operations (
turingJoin,f ⊕ g) for combining degrees
Defines the jump operator and related concepts:
jump f(f⌜): the jump of functionfjumpSet A: Halting problem relative to a decidable setA- Various definitions of recursively enumerable sets
- Core jump theorems including non-reducibility and characterizations
Basic structure for the automorphism group of Turing degrees:
TuringDegree.automorphismGroup := OrderAut TuringDegree- Group structure via
OrderIso - Countability properties
Defines the classical arithmetical hierarchy:
arithJumpBase n: then-fold jump of the empty oraclearithJumpSet n: the set∅⁽ⁿ⁾decidableIn O A:Ais decidable relative to oracle setOSigma0 n A,Pi0 n A,Delta0 n A: hierarchy levels- Notations
Σ⁰_,Π⁰_,Δ⁰_ - Defines
K := arithJumpSet 1as the halting set
- Mario Carneiro. Formalizing Computability Theory via Partial Recursive Functions, arXiv:1810.08380, 2018.
- Piergiorgio Odifreddi. Classical Recursion Theory, Vol. I. PDF