We present an extension to the mathlib library of the Lean theorem prover formalizing the foundations of computability theory. We use primitive recursive functions and partial recursive functions as the main objects of study, and we use a constructive encoding of partial functions such that they are executable when the programs in question provably halt. Main theorems include the construction of a universal partial recursive function and a proof of the undecidability of the halting problem. Type class inference provides a transparent way to supply Gödel numberings where needed and encapsulate the encoding details.
@InProceedings{carneiro:LIPIcs.ITP.2019.12, author = {Carneiro, Mario}, title = {{Formalizing Computability Theory via Partial Recursive Functions}}, booktitle = {10th International Conference on Interactive Theorem Proving (ITP 2019)}, pages = {12:1--12:17}, series = {Leibniz International Proceedings in Informatics (LIPIcs)}, ISBN = {978-3-95977-122-1}, ISSN = {1868-8969}, year = {2019}, volume = {141}, editor = {Harrison, John and O'Leary, John and Tolmach, Andrew}, publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik}, address = {Dagstuhl, Germany}, URL = {https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ITP.2019.12}, URN = {urn:nbn:de:0030-drops-110671}, doi = {10.4230/LIPIcs.ITP.2019.12}, annote = {Keywords: Lean, computability, halting problem, primitive recursion} }
Feedback for Dagstuhl Publishing