Documentation

Cslib.Languages.CombinatoryLogic.Confluence

SKI reduction is confluent #

This file proves the Church-Rosser theorem for the SKI calculus, that is, if a ↠ b and a ↠ c, b ↠ d and c ↠ d for some term d. More strongly (though equivalently), we show that the relation of having a common reduct is transitive — in the above situation, a and b, and a and c have common reducts, so the result implies the same of b and c. Note that CommonReduct is symmetric (trivially) and reflexive (since is), so we in fact show that CommonReduct is an equivalence.

Our proof follows the method of Tait and Martin-Löf for the lambda calculus, as presented for instance in Chapter 4 of Peter Selinger's notes: https://www.mscs.dal.ca/~selinger/papers/papers/lambdanotes.pdf.

Main definitions #

Main results #

A reduction step allowing simultaneous reduction of disjoint redexes

Instances For

    Notation for parallel reduction

    Equations
    Instances For

      The inclusion ⇒ₚ ⊆ ↠

      The inclusion ⇒ ⊆ ⇒ₚ

      The inclusions of mRed_of_parallelReduction and parallelReduction_of_red imply that and ⇒ₚ have the same reflexive-transitive closure.

      Irreducibility for the (partially applied) primitive combinators.

      TODO: possibly these should be proven more generally (in another file) for .

      theorem Cslib.SKI.parallelReduction_diamond (a a₁ a₂ : SKI) (h₁ : a.ParallelReduction a₁) (h₂ : a.ParallelReduction a₂) :

      The key result: the Church-Rosser property holds for ⇒ₚ. The proof is a lengthy case analysis on the reductions a ⇒ₚ a₁ and a ⇒ₚ a₂, but is entirely mechanical.

      The Church-Rosser theorem in its general form.

      theorem Cslib.SKI.MRed.diamond (a b c : SKI) (hab : RedSKI.MRed a b) (hac : RedSKI.MRed a c) :

      The Church-Rosser theorem in the form it is usually stated.