Documentation

Linglib.Semantics.Composition.Combinator

Combinatory logic primitives #

The basis combinators B, T, S, I, K, C of combinatory logic, with the standard identities relating them (I = S K K, B = S (K _) _, T = C I).

These are the substrate of variable-free / combinatory semantics: CCG's combinatory rules correspond to them (forward composition to B, type-raising to T, the substitution rule to S; [Ste00a]), and continuation/applicative composition and Jacobson-style binding use the same algebra. They live here in Semantics/Composition/ alongside the other composition primitives rather than inside the CCG files.

Main definitions #

Main statements #

References #

def Combinator.B {α : Type u_1} {β : Type u_2} {γ : Type u_3} (f : βγ) (g : αβ) :
αγ

B (composition): B f g x = f (g x).

Equations
Instances For
    def Combinator.T {α : Type u_1} {β : Type u_2} (x : α) :
    (αβ)β

    T (type-raising): T x f = f x.

    Equations
    Instances For
      def Combinator.S {α : Type u_1} {β : Type u_2} {γ : Type u_3} (f : αβγ) (g : αβ) :
      αγ

      S (substitution): S f g x = f x (g x).

      Equations
      Instances For
        def Combinator.I {α : Type u_1} :
        αα

        I (identity): I x = x.

        Equations
        Instances For
          def Combinator.K {α : Type u_1} {β : Type u_2} (x : α) :
          βα

          K (constant): K x y = x.

          Equations
          Instances For
            def Combinator.C {α : Type u_1} {β : Type u_2} {γ : Type u_3} (f : αβγ) (x : β) (y : α) :
            γ

            C (commutation): C f x y = f y x.

            Equations
            Instances For
              @[simp]
              theorem Combinator.B_apply {α : Type u_1} {β : Type u_2} {γ : Type u_3} (f : βγ) (g : αβ) (x : α) :
              B f g x = f (g x)
              @[simp]
              theorem Combinator.T_apply {α : Type u_1} {β : Type u_2} (x : α) (f : αβ) :
              T x f = f x
              @[simp]
              theorem Combinator.S_apply {α : Type u_1} {β : Type u_2} {γ : Type u_3} (f : αβγ) (g : αβ) (x : α) :
              S f g x = f x (g x)
              @[simp]
              theorem Combinator.I_apply {α : Type u_1} (x : α) :
              I x = x
              @[simp]
              theorem Combinator.K_apply {α : Type u_1} {β : Type u_2} (x : α) (y : β) :
              K x y = x
              @[simp]
              theorem Combinator.C_apply {α : Type u_1} {β : Type u_2} {γ : Type u_3} (f : αβγ) (x : β) (y : α) :
              C f x y = f y x
              theorem Combinator.B_comp {α : Type u_1} {β : Type u_2} {γ : Type u_3} (f : βγ) (g : αβ) :
              B f g = f g

              B is function composition.

              theorem Combinator.I_eq_SKK {α : Type u_1} :
              I = S K K

              I = S K K: identity is derivable from S and K.

              theorem Combinator.B_eq_S_K {α : Type u_1} {β : Type u_2} {γ : Type u_3} (f : βγ) (g : αβ) :
              B f g = S (K f) g

              B = S (K _) _: composition is derivable from S and K.

              theorem Combinator.T_eq_CI {α : Type u_1} {β : Type u_2} (x : α) :
              T x = C I x

              T = C I: type-raising is C applied to the identity.

              theorem Combinator.C_eq_B_T {α : Type u_1} {β : Type u_2} {γ : Type u_3} (f : αβγ) (x : β) (y : α) :
              C f x y = B (T x) f y

              C f x y = B (T x) f y: C is derivable from B and T.