##
###
Intersection Type Systems and Explicit Substitutions Calculi
[chapter]

Daniel Lima Ventura, Mauricio Ayala-Rincón, Fairouz Kamareddine

2010
*
Lecture Notes in Computer Science
*

The λ-calculus with de Bruijn indices, called λ dB , assembles each α-class of λ-terms into a unique term, using indices instead of variable names. Intersection types provide finitary type polymorphism satisfying important properties like principal typing, which allows the type system to include features such as data abstraction (modularity) and separate compilation. To be closer to computation and to simplify the formalisation of the atomic operations involved in β-contractions, several
## more »

... t substitution calculi were developed most of which are written with de Bruijn indices. Although untyped and simply types versions of explicit substitution calculi are well investigated, versions with more elaborate type systems (e.g., with intersection types) are not. In previous work, we presented a version for λ dB of an intersection type system originally introduced to characterise principal typings for β-normal forms and provided the characterisation for this version. In this work we introduce intersection type systems for two explicit substitution calculi: the λσ and the λse. These type system are based on a type system for λ dB and satisfy the basic property of subject reduction, which guarantees the preservation of types during computations. Introduction The λ-calculusà la de Bruijn [deBruijn72], λ dB for short, was introduced by the Dutch mathematician N.G. de Bruijn in the context of the project Automath [NGdV94] and has been adopted for several calculi of explicit substitutions ever since, e.g. [deBruijn78,ACCL91,KR97]). Term variables are represented by indices instead of names in λ dB , assembling each α-class of terms in the λ-calculus [Barendregt84] into a unique term with de Bruijn indices, thus making it more "machine-friendly" than its counterparts. The λσ-[ACCL91] and the λs e -[KR97] calculi have applications in higher order unification, HOU for short [DHK2000,AK01]. These explicit substitution calculi with de Bruijn ⋆ Supported by a PhD scholarship at the Universidade de Brasília. ⋆⋆ Supported by the Fundação de Apoioà Pesquisa do Distrito Federal [FAPDF 8-004/2007] Despite the fact that the type system is relevant, we have SR for the full s-calculus. Theorem 2 (SR for s in λs SM ). Let M : Γ ⊢ λs SM τ . If M → s M ′ , then M ′ : Γ ⊢ λs SM τ . Proof. By the verification of SR for each rewriting rule of the s-calculus. Observe that the type information associated to the empty application disappears when it becomes an empty substitution, since the rules (nil-σ) and (ω-σ) discard the corresponding contexts. Therefore, we need a restriction notion similar to the one introduced in Definition 12, which is related to the available indices, to have an SR statement for the simulation of β-contraction. Theorem 3 (SR for simulation of β-contraction in λs SM ). If (λ.M M ′ ) : Γ ⊢ λs SM τ , then { 1/M ′ }M : Γ↾ { 1/M ′ }M ⊢ λs SM τ , for any (λ.M M ′ ) ∈ Λ dB . Proof. The proof consists in the verification of SR with context restriction for (λ.M M ′ ) : Γ ⊢ λs SM τ when the rule (σ-generation) is applied and then of SR for the s-calculus.

doi:10.1007/978-3-642-13824-9_19
fatcat:54q5wjrprbb5pgzsviuku2njj4