Skip to content

Instantly share code, notes, and snippets.

@andrcmdr
Forked from brendanzab/λcube.md
Last active February 21, 2025 12:28
Show Gist options
  • Select an option

  • Save andrcmdr/7121c3d9eb83f06785d8055a5c3604a3 to your computer and use it in GitHub Desktop.

Select an option

Save andrcmdr/7121c3d9eb83f06785d8055a5c3604a3 to your computer and use it in GitHub Desktop.
Lambda λ Cube (by Hendrik 'Henk' Pieter Barendregt)

System λ

The untyped lambda calculus

e ::=
  x
  e e
  λ x. e

System λ→

  • Terms depending on terms
t ::=
  x
  t → t

e ::=
  x
  e e
  λ x : t . e

System λ2

  • Terms depending on terms
  • Terms depending on types
k :: =
  *

t ::=
  x
  t → t
  ∀ a . t

e ::=
  x
  e e
  λ x : t . e
  Λ a : k . e
id : ∀ a . a → a
id = Λ a : * . λ x : a . x

System λω_

  • Terms depending on terms
  • Types depending on types
k :: =
  *
  k → k

t ::=
  x
  t → t
  ∀ a : k . t

e ::=
  x
  e e
  λ x : t . e
  Λ a : k . e

System λω

  • Terms depending on terms
  • Terms depending on types
  • Types depending on types
k ::= *

t ::=
  a
  ∀ a : k . t

e ::=
  x
  e e
  λ x : t . e
  Λ a : k . e

System λΠ

  • Terms depending on terms
  • Types depending on terms
e ::=
  x
  *
  e e
  ∀ x : e . e
  λ x : e . e

System λΠω

  • Terms depending on terms
  • Terms depending on types
  • Types depending on types
  • Types depending on terms
e ::=
  x
  *
  e e
  ∀ x : e . e
  λ x : e . e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment