Documentation

LeanPool.PartialCombinatoryAlgebras

Partial Combinatory Algebras #

Source: url:https://doi.org/10.1016/S0049-237X(08)80003-1 Authors: Andrej Bauer Status: verified Main declarations: LeanPool.PartialCombinatoryAlgebras.PCA Tags: combinatory-algebra, lambda-calculus, computability MSC: 03B40, 03D75

Mathematical overview #

A partial combinatory algebra (PCA) is a set A equipped with a partial binary operation · : A → A ⇀ A together with distinguished combinators K and S satisfying the usual equations K · a · b = a and S · a · b · c = (a · c) · (b · c). Such a structure is enough to model untyped λ-calculus and witnesses Turing-completeness in an algebraic form.

This formalisation develops the basic theory:

Provenance #

Imported from https://github.com/andrejbauer/partial-combinatory-algebras; a Lean 4 model project for Andrej Bauer's 2024 course "Formalized mathematics and proof assistants" at the University of Ljubljana. Ported from Lean v4.15.0-rc1 to Lean Pool's v4.30.0-rc2. The upstream FirstKleeneAlgebra.lean, which is incomplete in the source (contains sorry placeholders for the S-combinator construction via Gödel numbers of partial recursive functions), is not vendored. Equation lemmas for the Curry-numeral predecessor (eq_pred, eq_pred_succ) and primitive recursion (eq_primrec, eq_primrec_zero, eq_primrec_succ) are also omitted in this port.