Documentation

Cslib.Computability.LambdaCalculus.LocallyNameless.Stlc.Safety

λ-calculus #

Type safety of the simply typed λ-calculus, with a locally nameless representation of syntax. Theorems in this file are namespaced by their respective reductions.

References #

Equations
  • One or more equations did not get rendered due to their size.
Instances For

    If a reduction preserves types, so does its reflexive transitive closure.

    theorem LambdaCalculus.LocallyNameless.Stlc.confluence_preservesTyping {Var : Type u} {Base : Type v} {R : Untyped.Term VarUntyped.Term VarProp} {Γ : Context Var (Ty Base)} {a b c : Untyped.Term Var} {τ : Ty Base} (con : Confluence R) (p : PreservesTyping R Base) (der : Typing Γ a τ) (ab : Relation.ReflTransGen R a b) (ac : Relation.ReflTransGen R a c) :

    Confluence preserves type preservation.

    theorem LambdaCalculus.LocallyNameless.Stlc.FullBeta.preservation {Var : Type u} {Base : Type v} [HasFresh Var] [DecidableEq Var] {Γ : Context Var (Ty Base)} {t : Untyped.Term Var} {τ : Ty Base} {t' : Untyped.Term Var} (der : Typing Γ t τ) (step : t βᶠ t') :
    Typing Γ t' τ

    Typing preservation for full beta reduction.

    theorem LambdaCalculus.LocallyNameless.Stlc.FullBeta.progress {Var : Type u} {Base : Type v} {t : Untyped.Term Var} {τ : Ty Base} (ht : Typing [] t τ) :
    t.Value ∃ (t' : Untyped.Term Var), t βᶠ t'

    A typed term either full beta reduces or is a value.