Professional Documents
Culture Documents
Types 3
Types 3
Types 3
t → t ′ =⇒ erase(t) → erase(t ′ ).
But also
erase(t) → m′ =⇒ ∃t ′ | t → t ′ ∧ erase(t ′ ) = m′
Proved by induction on evaluation derivations.
i.e., we can remove the typing and still have a functional system.
(λx : A.x) : A ⇒ A
Grammar:
⟨t⟩ ::= ...
| ⟨t⟩ ; ⟨t⟩
Evaluation rules:
t1 → t1′
(E-Seq)
t1 ; t2 → t1′ ; t2
unit; t2 → t2 (E-SeqNext)
Typing rule
Γ ⊢ t1 : Unit Γ ⊢ t2 : T2
Γ ⊢ (t1 ; t2 ) : T2
def
t1 ; t2 = (λx : Unit.t2 ) t1 (1)
Definition
λE as the simply typed λ-Calculus, enriched with Unit, unit, t1 ; t2 , E-Seq,
E-SeqNext, and T-Seq.
Definition
λI as the simply typed λ-Calculus, Unit type and unit term only.
Define e ∈ λE → λI as a meta-level elaboration function. It replaces all
instances of t1 ; t2 with (λx : Unit.t2 ) t1 .
Intuitively, we want:
def
let x = t1 in t2 = (λx : T1 .t2 ) t1