Documentation

Cslib.Languages.CombinatoryLogic.Defs

SKI Combinatory Logic #

This file defines the syntax and operational semantics (reduction rules) of combinatory logic, using the SKI basis.

Main definitions #

Notation #

References #

The setup of SKI combinatory logic is standard, see for example:

inductive Cslib.SKI :

An SKI expression is built from the primitive combinators S, K and I, and application.

  • S : SKI

    S-combinator, with semantics $λxyz.xz(yz)

  • K : SKI

    K-combinator, with semantics $λxy.x$

  • I : SKI

    I-combinator, with semantics $λx.x$

  • app : SKISKISKI

    Application $x y ↦ xy$

Instances For
    @[implicit_reducible]
    Equations
    Equations
    Instances For

      Application $x y ↦ xy$

      Equations
      Instances For
        def Cslib.SKI.applyList (f : SKI) (xs : List SKI) :

        Apply a term to a list of terms

        Equations
        Instances For
          theorem Cslib.SKI.applyList_concat (f : SKI) (ys : List SKI) (z : SKI) :
          f.applyList (ys ++ [z]) = (f.applyList ys).app z

          The size of an SKI term is its number of combinators.

          Equations
          Instances For

            Reduction relations between SKI terms #

            inductive Cslib.SKI.Red :
            SKISKIProp

            Single-step reduction of SKI terms

            Instances For
              theorem Cslib.SKI.Red.ne {x y : SKI} :
              x.Red yx y
              theorem Cslib.SKI.MRed.S (x y z : SKI) :
              Relation.ReflTransGen Red (((SKI.S.app x).app y).app z) ((x.app z).app (y.app z))
              theorem Cslib.SKI.parallel_red {a a' b b' : SKI} (ha : a.Red a') (hb : b.Red b') :
              theorem Cslib.SKI.mJoin_red_head {x x' : SKI} (y : SKI) :
              Relation.MJoin Red x x'Relation.MJoin Red (x.app y) (x'.app y)
              theorem Cslib.SKI.mJoin_red_tail (x : SKI) {y y' : SKI} :
              Relation.MJoin Red y y'Relation.MJoin Red (x.app y) (x.app y')