Science1 min read

Constructing a Quine from Kleene's Second Recursion Theorem

By · Published by Everything Blog

In short

Classical proofs rely on effective numberings of partial recursive functions, which obscure key structural details behind arbitrary numerical reductions and hand-wavy treatments. Setting the identity function within the traditional recursion theorem technically generates an index that outputs itself, but lambda calculus offers a clearer, proof-theoretic alternative. This refined technique draws on functional programming principles by conceptualizing a self-reflective language that quotes terms into abstract syntax trees. Incorporating typed perspectives further illuminates hidden conceptual connections, even while conducting the underlying proof in an untyped environment.

Key points

  • Untyped lambda calculus serves as an alternative model that prioritizes underlying system…: Untyped lambda calculus serves as an alternative model that prioritizes underlying system structure over low-level numerical encodings.
  • The updated construction uses functional programming concepts to model self-reflection by…: The updated construction uses functional programming concepts to model self-reflection by quoting terms into abstract syntax trees.
  • Informal perspectives from type systems help expose valuable theoretical connections thro…: Informal perspectives from type systems help expose valuable theoretical connections throughout the untyped formalization process.

Sources checked by our analysis pipeline: 1

Table of contents

- Introduction

- Kleene, Classical Perspective

- Models of Computation

- Kleene, Functional Programming Perspective

- Building a Quine in Untyped Lambda Calculus

- Putting It All Together

- References

Introduction

It is a well-known fact that the existence of Quines are a consequence of Kleene’s 2nd recursion theorem. I was curious about how easy or difficult it was to use this construction in practice, so I decided to try to formalize it.

One of the virtues of formalization is that it naturally motivates the mathematician to structure their definitions and proofs in a clearer and more concise fashion. The pain of a clunky definition or ill-structured argument is actually felt, and so the goals of expedient proofs and well-structured proofs often align. Far from being a mechanical chore, the act of formalization can actually be a source of insight and creativity (incidentally, this is why I think the popular view of formal verification as a mere exercise in transcription misses the mark).

With this in mind, I hoped that I could find or develop a clean…

Science