Documentation

Cslib.Languages.LambdaCalculus.LocallyNameless.Fsub.Basic

λ-calculus #

The λ-calculus with polymorphism and subtyping, with a locally nameless representation of syntax.

References #

Types of the polymorphic lambda calculus.

  • top {Var : Type u_2} : Ty Var

    The type ⊤, with a single inhabitant.

  • bvar {Var : Type u_2} : Ty Var

    Bound variables that appear in a type, using a de-Bruijn index.

  • fvar {Var : Type u_2} : VarTy Var

    Free type variables.

  • arrow {Var : Type u_2} : Ty VarTy VarTy Var

    A function type.

  • all {Var : Type u_2} : Ty VarTy VarTy Var

    A universal quantification.

  • sum {Var : Type u_2} : Ty VarTy VarTy Var

    A sum type.

Instances For

    Syntax of locally nameless lambda terms, with free variables over Var.

    • bvar {Var : Type u_2} : Term Var

      Bound term variables that appear under a lambda abstraction, using a de-Bruijn index.

    • fvar {Var : Type u_2} : VarTerm Var

      Free term variables.

    • abs {Var : Type u_2} : Ty VarTerm VarTerm Var

      Lambda abstraction, introducing a new bound term variable.

    • app {Var : Type u_2} : Term VarTerm VarTerm Var

      Function application.

    • tabs {Var : Type u_2} : Ty VarTerm VarTerm Var

      Type abstraction, introducing a new bound type variable.

    • tapp {Var : Type u_2} : Term VarTy VarTerm Var

      Type application.

    • let' {Var : Type u_2} : Term VarTerm VarTerm Var

      Binding of a term.

    • inl {Var : Type u_2} : Term VarTerm Var

      Left constructor of a sum.

    • inr {Var : Type u_2} : Term VarTerm Var

      Right constructor of a sum.

    • case {Var : Type u_2} : Term VarTerm VarTerm VarTerm Var

      Case matching on a sum.

    Instances For

      A context binding.

      Instances For
        def Cslib.LambdaCalculus.LocallyNameless.Fsub.Ty.fv {Var : Type u_1} [DecidableEq Var] :
        Ty VarFinset Var

        Free variables of a type.

        Equations
        Instances For
          def Cslib.LambdaCalculus.LocallyNameless.Fsub.Binding.fv {Var : Type u_1} [DecidableEq Var] :
          Binding VarFinset Var

          Free variables of a binding.

          Equations
          Instances For
            def Cslib.LambdaCalculus.LocallyNameless.Fsub.Term.fv_ty {Var : Type u_1} [DecidableEq Var] :
            Term VarFinset Var

            Free type variables of a term.

            Equations
            Instances For
              def Cslib.LambdaCalculus.LocallyNameless.Fsub.Term.fv_tm {Var : Type u_1} [DecidableEq Var] :
              Term VarFinset Var

              Free term variables of a term.

              Equations
              Instances For