scispace - formally typeset
Search or ask a question
Proceedings ArticleDOI

Explicit substitutions

TL;DR: The λ&sgr;-calculus is a refinement of the λ-Calculus where substitutions are manipulated explicitly, and provides a setting for studying the theory of substitutions, with pleasant mathematical properties.
Abstract: The ls-calculus is a refinement of the l-calculus where substitutions are manipulated explicitly. The ls-calculus provides a setting for studying the theory of substitutions, with pleasant mathematical properties. It is also a useful bridge between the classical l-calculus and concrete implementations.

Summary (2 min read)

Introduction

  • Knowledge management (KM) represents the process of effectively capturing, documenting, assimilating, sharing, and deploying organizational knowledge [13,16].
  • Focused aggregation of such knowledge to maximize the organizational objectives is critical for the efficient and effective functioning of any enterprise [16].
  • A main challenge for companies is the reluctance of their knowledge experts to share their intellectual capital [13,21].
  • While KM systems provide the information technology to store, retrieve, and share knowledge, users often lack the motivation to engage with them [30].

CLEVER: A gameful KM system

  • CLEVER is an online KMS that incorporates game elements.
  • The system is composed of two parts: (1) an online knowledge repository, where employees can provide important knowledge to the company, and (2) a trivia strategy game that motivates players to interact with content from the knowledge repository.
  • Next, the authors describe this game, its implementation, and the exploratory study they conducted to test the prototype of the learning game component.

Game Description

  • Inspired by traditional board games such as Risk [22], Antike II [24], and Diplomacy [12], CLEVER is a strategic, turn-based trivia game in a digital play space.
  • The game can be played by a minimum of two and a maximum of four players who compete against each other on a single digital map, constructed from tiles (see Figure 1).
  • The collected energy is used to perform an action on a unit as part of the action phase which follows the trivia phase.
  • Units represented as a token on the map are present as different types of units – archer, fighter, and tank.
  • CLEVER’s game interface (see Figure 3) features panels for each player showing the player’s username, race, stars, energy, domination points, a number of units, and available actions.

Motivational Elements

  • Trivia questions trigger player interaction with knowledge from the repository, which fosters learning.
  • CLEVER facilitates the players’ intrinsic and extrinsic motivation, as suggested by self-determination theory [26,28] in the following manner: Competence: Players receive immediate feedback after answering a question correctly, in the form of energy and stars, which helps them feel competent.
  • Players can freely choose which units they will use as well as the category of questions they will answer on each round, also known as Autonomy.
  • Players can play together with peers from their company, to establish a social connection which provides the feeling of relatedness, also known as Relatedness.
  • Additionally, performing actions can be seen as a reward for answering questions during the trivia phase.

Evaluation

  • The authors conducted an exploratory focus group study to gather players’ thoughts, experiences, and motivations to use CLEVER.
  • While interest-enjoyment, perceived competence, perceived choice, and pressure-tension are the main categories of the Task Evaluation Questionnaire from the Intrinsic Motivation Inventory (IMI) [27], due to the nature of playing the game in groups and the learning objective of their system, the authors also added questions for the following categories: relatedness, perceived learning, and extrinsic motivation.
  • Nine participants (four females, five males), aged 22– 46 years (M=28 years), who were employees of neusta software development GmbH, played the game in a conference room arranged as shown in Figure 4.
  • The authors then conducted a deductive analysis of the focus group sessions using a standardized form with the categories of the IMI.
  • Finally, the authors compared the clustered items from the three researchers for reliability and collated the results into a single document.

Results

  • The authors analyzed the focus groups’ answers to identify insights related to participants’ motivation to interact with knowledge through the game.
  • Experimental setup for the exploratory focus group study.
  • Participants felt that the game would be better to learn smaller things or to recap content they already knew rather than to learn something new and complex (G1 P2; G2 P3; G3 P3; G3 P2), also known as Perceived Learning.

Did you find this useful? Give us your feedback

Content maybe subject to copyright    Report

Explicit Substitutions
M. Abadi
L. Cardelli
P.-L. Curien
J.-J. L´evy
September 18, 1996
Abstract
The λσ-calculus is a refinement of the λ-calculus where substitu-
tions are manipulated explicitly. The λσ-calculus provides a setting
for studying the theory of s ubstitutions, with pleasant mathematical
properties. It is also a useful bridge between the classical λ-calculus
and concrete implementations.
Digital Equipment Corporation, Systems Research Center.
Ecole Normale Sup´erieure; part of this work was completed while at Digital Equipment
Corporation, Systems Research Center.
INRIA Rocquencourt; part of this work was completed while at Digital Equipment
Corporation, Systems Research Center and Paris Research Laboratory.
1

1 Introduction
Substitution is the ´eminence grise of the λ-calculus. The classical β rule,
(λx.a)b
β
a{b/x}
uses substitution crucially though informally. Here a and b denote two
terms, and a{b/x} represents the term a where all free occurrences of x are
replaced with b. This substitution does not belong in the calculus proper,
but rather in an informal meta-level. Similar situations arise in dealing with
all binding constructs, fr om universal quantifiers to type abstractions.
A naive reading of the β rule suggests that the substitution of b for
x should happen at once, when the rule is applied. In implementations,
substitutions invariably happen in a more controlled way. This is due to
practical considerations, relevant in the implementation of both logics and
programming languages. The term a{b/x} may contain many copies of b
(for instance, if a = xxxx); without sophisticated structure-sharing mecha-
nisms [15], perf orming sub stitutions immediately causes a size exp losion.
Therefore, in practice, substitutions are delayed and explicitly recorded;
the application of s ubstitutions is independent, an d not coupled with th e
β rule. The correspondence between the theory and its implementations
becomes highly nontrivial, and the correctness of the implementations can
be compromised.
In th is paper we study the λσ-calculus, a refinement of the λ-calculus [1]
where substitutions are manipulated explicitly. Substitutions have syntactic
representations, and if a is a term and s is a substitution then the term a[s]
represents a with the substitution s. We can now express a β rule with
delayed su bstitution, called Be ta:
(λx.a)b
Beta
a[(b/x) · id]
where (b/x) · id is syntax for the substitution that replaces x with b and
affects no other variable (“· represents extension and id the identity substi-
tution). Of course, additional rules are needed to distribute the substitution
later on.
The λσ-calculus is a suitable setting for s tudying the theory of substi-
tutions, where we can express and prove desirable mathematical pr operties.
For example, the calculus is Church-Rosser and is a conservative extension
of the λ-calculus. Moreover, the λσ-calculus is strongly connected with the
1

categorical understanding of the λ-calculus, where a substitution is inter-
preted as a composition [5].
We propose the λσ-calculus as a step in closing the gap between the
classical λ-calculus and concrete implementations. The calculus is a vehi-
cle in designing, un derstanding, verifying, and comparing implementations
of the λ-calculus, from interpreters to machines. Other applications are
in the analysis of typechecking algorithms for higher-order languages and,
potentially, in the m echanization of logical systems.
When one considers weak reduction strategies, th e treatment of substi-
tutions can remain quite simple—and then our approach may seem overly
general. Weak reduction strategies do not compute in the scope of λ’s.
Then, there arise neither nested substitutions nor substitutions in the scope
of λ’s. All substitutions are at the top level, as simple environments. An
ancestor of the λσ-calculus, the λρ-calculus, suffices in this setting [5].
However, strong reduction strategies are useful in general, both in log-
ics and in the typechecking of higher-order programming languages. In fact,
strong reduction strategies are useful in all situations where symbolic match-
ing has to be conducted in the scope of binders. Thus, a general treatment
of substitutions is required, where substitutions may occur at the top level
and deep inside terms.
In some respects, the λσ-calculus resembles the calculi of combinators,
including those of categorical combinators [4]. The λσ-calculus and the
combinator calculi all give full formal accounts of the process of computation,
without suffering from unpleasant complications in the (informal) handling
of variables. They all make it easy to derive machines for the λ-calculus
and to show the correctness of these machines. ¿From our perspective, the
advantage of the λσ-calculus over combinator calculi is that it remains closer
to the original λ-calculus.
There are actually several versions of the calculus of substitutions. We
start out by discussing an untyped calculus. The main value of the untyped
calculus is for studying evaluation method s . We give reduction rules that
extend those of the classical λ-calculus and investigate th eir confluence. We
concentrate on a presentation that relies on De Bruijn’s numb ering for vari-
ables [2], and briefly discuss presentations with more traditional variable
names.
Then we proceed to consider typ ed calculi of su bstitutions, in De Bruijn
notation. We discuss typing rules for a first-order system and for a higher-
order system; we prove some of their central properties. The typing rules
2

are meant to s erve in designing typechecking algorithms. In particular, their
study has been of help for both soundness and efficiency in the design of the
Quest typechecking algorithm [3].
We postpone discussion of the untyped calculi to section 3 and of the
typed calculi to sections 4 and 5. We now proceed with a general technical
overview.
2 Overview
The technical details of the λσ-calculus can be quite intricate, and hence a
gentle informal introduction seems in order. We start with a brief review of
De Bruijn notation, since most of our calculi rely on it. Then we preview
untyped, first-order, and second-order calculi of substitutions.
2.1 De Bruijn notation
In De Bruijn notation, variable occurrences are replaced with positive in-
tegers (called De Bruijn indices); binding occurrences of variables become
unnecessary. The positive integer n refers to the variable bound by the n-th
surrounding λ binder, for example:
λx.λy.xy becomes λλ2 1
In first-order typed systems, the binder types must be preserved, for exam-
ple:
λx:A.λy:B.xy becomes λA.λB. 2 1
In second-order systems, typ e variables too are replaced with De Bruijn
indices:
ΛA.λx:A.x becomes Λλ1.1
Although De Bruijn notation is unreadable, it leads to simple formal sys-
tems. Therefore, we use indices in inference rules, but variable names in
examples.
Classical β reduction and substitution must be adapted for De Bruijn
notation. In order to reduce (λa)b, it does not suffice to substitute b into
a in the appropriate places. If there are occurrences of 2, 3, 4, . . . in a,
these become “one off,” since one of the λ binders surroun ding a has been
3

removed. Hence, all the remaining free indices in a must be decremented;
the desired effect is obtained with an infinite substitution:
(λx.a)b
β
a{b/x} becomes (λa)b
β
a{b/1, 1/2, 2/3, . . .}
When p ushing this substitution inside a, we may come across a λ term
(λc){b/1, 1/2, 2/3, . . .}. In th is case, we must be careful to avoid replacing
the occurrences of 1 in c with b, since these occurrences correspond to a
bound variable and the substitution shou ld not affect them. Hence, we
must “shift” the sub stitution. Thus, we may try:
(λc){b/1, 1/2, 2/3, . . .}
?
= λc{1/1, b/2, 2/3, 3/4, . . .}
But this is not yet correct: now b has an additional surroun ding binder, and
we must prevent capture of free indices of b. Suppose b contains the index
1, for example. We do not want the λ of (λc) to capture this index. Hence
we must “lift” all the indices of b:
(λc){b/1, 1/2, 2/3, . . .} = λc{1/1, b{2/1, 3/2, . . .}/2, 2/3, . . .}
This informal introduction to De Bruijn notation should suffice to give
the flavor of things to come.
2.2 An untyped calculus
We shall study a simple set of algebraic operators that perform all these
index manipulations—without . . .’s, even though we treat infinite sub s ti-
tutions that replace all indexes. If s represents the infinite substitution
{a
1
/1, a
2
/2, a
3
/3, . . . }, we write a[s] for a with the substitution s . A term
of the form a[s] is called a closure. The change from { }’s to [ ]’s emph asizes
that the substitution is no longer a meta-level operation.
The syntax of the untyped λσ-calculus is:
Terms a ::= 1 | ab | λa | a[s]
Substitutions s ::= id | | a · s | s t
This syntax corresponds to the index manipulations described in the
previous section, as follows:
id is the identity substitution {1/1, 2/2, . . .}, which we may write
{i/i}.
4

Citations
More filters
Book
01 Jan 2002
TL;DR: This text provides a comprehensive introduction both to type systems in computer science and to the basic theory of programming languages, with a variety of approaches to modeling the features of object-oriented languages.
Abstract: A type system is a syntactic method for automatically checking the absence of certain erroneous behaviors by classifying program phrases according to the kinds of values they compute. The study of type systems -- and of programming languages from a type-theoretic perspective -- has important applications in software engineering, language design, high-performance compilers, and security.This text provides a comprehensive introduction both to type systems in computer science and to the basic theory of programming languages. The approach is pragmatic and operational; each new concept is motivated by programming examples and the more theoretical sections are driven by the needs of implementations. Each chapter is accompanied by numerous exercises and solutions, as well as a running implementation, available via the Web. Dependencies between chapters are explicitly identified, allowing readers to choose a variety of paths through the material.The core topics include the untyped lambda-calculus, simple type systems, type reconstruction, universal and existential polymorphism, subtyping, bounded quantification, recursive types, kinds, and type operators. Extended case studies develop a variety of approaches to modeling the features of object-oriented languages.

2,391 citations

Journal ArticleDOI
TL;DR: Maude as discussed by the authors is a programming language whose modules are rewriting logic theories, which is defined and given denotational and operational semantics, and it provides a simple unification of concurrent programming with functional and object-oriented programming and supports high level declarative programming of concurrent systems.
Abstract: Rewriting with conditional rewrite rules modulo a set E of structural axioms provides a general framework for unifying a wide variety of models of concurrency. Concurrent rewriting coincides with logical deduction in conditional rewriting logic , a logic of actions whose models are concurrent systems. This logic is sound and complete and has initial models. In addition to general models interpreted as concurrent systems which provide a more operational style of semantics, more restricted semantics with an incresingly denotational flavor such as preorder, poset, cpo, and standard algebraic models appear as special cases of the model theory. This permits dealing with operational and denotational issues within the same model theory and logic. A programming language called Maude whose modules are rewriting logic theories is defined and given denotational and operational semantics. Maude provides a simple unification of concurrent programming with functional and object-oriented programming and supports high level declarative programming of concurrent systems.

1,345 citations

Proceedings ArticleDOI
01 Dec 1989
TL;DR: A new kind of abstract machine based on the chemical metaphor used in the Γ language of Banâtre & al. is introduced, which shows how to extract a higher-order concurrent λ-calculus out of the basic concepts of the chemical abstract machine.
Abstract: We introduce a new kind of abstract machine based on the chemical metaphor used in the G language of Banâtre & al. States of a machine are chemical solutions where floating molecules can interact according to reaction rules. Solutions can be stratified by encapsulating subsolutions within membranes that force reactions to occur locally. We illustrate the use of this model by describing the operational semantics of the TCCS and CCS process calculi. We also show how to extract a higher-order concurrent l-calculus out of the basic concepts of the chemical abstract machine.

853 citations

Journal ArticleDOI
TL;DR: A new kind of abstract machine based on the chemical metaphor used in the Γ language of Banâtre and Le Metayer is introduced, using the operational semantics of the TCCS and CCS process calculi and of the fragment of Milner, Parrow and Walker's Calculus of Mobile Processes used by Milner to encode the lambda-calculus.
Abstract: We introduce a new kind of abstract machine based on the chemical metaphor used in the Γ language of Banâtre and Le Metayer. States of a machine are chemical solutions where floating molecules can interact according to reaction rules. Solutions can be stratified by encapsulating subsolutions within membranes that force reactions to occur locally. We illustrate the use of this model by describing the operational semantics of the TCCS and CCS process calculi and of the fragment of Milner, Parrow and Walker's Calculus of Mobile Processes used by Milner to encode the lambda-calculus. We also give ideas on how to extract a higher-order concurrent λ-calculus out of the basic concepts of the chemical abstract machine.

780 citations

Book
01 Jan 1980
TL;DR: This proof is a direct generalization of Aczel's original proof, which is close to the well-known confluence proof for λ-calculus by Tait and Martin-Lof and gives an outline of a short proof of confluence.
Abstract: Combinatory reduction systems, or CRSs for short, were designed to combine the usual first-order format of term rewriting with the presence of bound variables as in pure λ-calculus and various typed λ-calculi. Bound variables are also present in many other rewrite systems, such as systems with simplification rules for proof normalization. The original idea of CRSs is due to Aczel, who introduced a restricted class of CRSs and, under the assumption of orthogonality, proved confluence. Orthogonality means that the rules are nonambiguous (no overlap leading to a critical pair) and left-linear (no global comparison of terms necessary). We introduce the class of orthogonal CRSs, illustrated with many examples, discuss its expressive power and give an outline of a short proof of confluence. This proof is a direct generalization of Aczel's original proof, which is close to the well-known confluence proof for λ-calculus by Tait and Martin-Lof. There is a well-known connection between the parallel reduction featuring in the latter proof and the concept of “developments”, and a classical lemma in the theory of λ-calculus is that of “finite developments”, a strong normalization result. It turns out that the notion of “parallel reduction” used in Aczel's proof gives rise to a generalized form of developments which we call “superdevelopments” and on which we will briefly comment.

662 citations

References
More filters
Book
30 Apr 2012
TL;DR: In this article, the Lambda-Calculus has been studied as a theory of composition and reduction, and the theory of reduction has been used to construct models of Lambda Theories.
Abstract: Towards the Theory. Introduction. Conversion. Reduction. Theories. Models. Conversion. Classical Lambda Calculus. The Theory of Combinators. Classical Lambda Calculus (Continued). The Lambda-Calculus. Bohm Trees. Reduction. Fundamental Theorems. Strongly Equivalent Reductions. Reduction Strategies. Labelled Reduction. Other Notions of Reduction. Theories. Sensible Theories. Other Lambda Theories. Models. Construction of Models. Local Structure of Models. Global Structure of Models. Combinatory Groups. Appendices: Typed Lambda Calculus. Illative Combinatory Logic. Variables. References.

2,632 citations

Book
01 Jan 1984
TL;DR: These lectures were given in Padova and Munich later in the same year as part of the meeting on Konstruktive Mengenlehre und Typentheorie which was organized in Munich by Prof. Helmut Schwichtenberg.
Abstract: Preface These lectures were given in Padova at the Laboratorio per Ricerche di Di-namica dei Sistemi e di Elettronica Biomedica of the Consiglio Nazionale delle Ricerche during the month of June 1980. I am indebted to Dr. Enrico Pagello of that laboratory for the opportunity of so doing. The audience was made up by philosophers, mathematicians and computer scientists. Accordingly, I tried to say something which might be of interest to each of these three categories. Essentially the same lectures, albeit in a somewhat improved and more advanced form, were given later in the same year as part of the meeting on Konstruktive Mengenlehre und Typentheorie which was organized in Munich by Prof. Dr. Helmut Schwichtenberg, to whom I am indebted for the invitation, during the week 29 September – 3 October 1980. The main improvement of the Munich lectures, as compared with those given in Padova, was the adoption of a systematic higher level (Ger. Stufe) notation which allows me to write simply respectively. Moreover, the use of higher level variables and constants makes it possible to formulate the elimination and equality rules for the cartesian product in such a way that they follow the same pattern as the elimination and equality rules for all the other type forming operations. In their new formulation, these rules read Π-elimination c ∈ Π(A, B) (y(x) ∈ B(x) (x ∈ A)) d(y) ∈ C(λ(y)) F(c, d) ∈ C(c) and Π-equality (x ∈ A) b(x) ∈ B(x) (y(x) ∈ B(x) (x ∈ A)) d(y) ∈ C(λ(y)) F(λ(b), d) = d(b) ∈ C(λ(b)) respectively. Here y is a bound function variable, F is a new non-canonical (eliminatory) operator by means of which the binary application operation can be defined, putting Ap(c, a) ≡ F(c, (y) y(a)), and y(x) ∈ B(x) (x ∈ A) is an assumption, itself hypothetical, which has been put within parentheses to indicate that it is being discharged. A program of the new form F(c, d) has value e provided c has value λ(b) and d(b) has value e. This rule for evaluating F(c, d) reduces to the lazy evaluation rule for Ap(c, a) when the above definition is being made. Choosing C(z) to be B(a), thus independent of z, and d(y) to be y(a), the new elimination rule reduces to the old one and the new equality rule to the first of the two old equality rules. Moreover, the second …

1,291 citations


"Explicit substitutions" refers background in this paper

  • ...(The problem arises in full generality with dependent types [14], and some readers may find it helpful to think about calculi of substitutions with dependent types....

    [...]

Journal ArticleDOI
01 Jan 1972
TL;DR: In this paper, a notational system for lambda calculus is developed, where occurrences of variables are indicated by integers giving the "distance" to the binding λ instead of a name attached to that λ. This convention is known to cause considerable trouble in cases of substitution.
Abstract: In ordinary lambda calculus the occurrences of a bound variable are made recognizable by the use of one and the same (otherwise irrelevant) name at all occurrences. This convention is known to cause considerable trouble in cases of substitution. In the present paper a different notational system is developed, where occurrences of variables are indicated by integers giving the “distance” to the binding λ instead of a name attached to that λ. The system is claimed to be efficient for automatic formula manipulation as well as for metalingual discussion. As an example the most essential part of a proof of the Church-Rosser theorem is presented in this namefree calculus.

919 citations

Book ChapterDOI
01 Jan 1980
TL;DR: The problem of "solving" equations, the problem of proving termination of sets of rewrite rules, and the decidability and complexity of word problems and of combinations of equational theories are discussed.
Abstract: Equations occur frequently in mathematics, logic and computer science. In this paper, we survey the main results concerning equations, and the methods available for reasoning about them and computing with them. The survey is self-contained and unified, using traditional abstract algebra. Reasoning about equations may involve deciding if an equation follows from a given set of equations (axioms), or if an equation is true in a given theory. When used in this manner, equations state properties that hold between objects. Equations may also be used as definitions; this use is well known in computer science: programs written in applicative languages, abstract interpreter definitions, and algebraic data type definitions are clearly of this nature. When these equations are regarded as oriented "rewrite rules," we may actually use them to compute. In addition to covering these topics, we discuss the problem of "solving" equations (the "unification" problem), the problem of proving termination of sets of rewrite rules, and the decidability and complexity of word problems and of combinations of equational theories. We restrict ourselves to first-order equations, and do not treat equations which define non-terminating computations or recent work on rewrite rules applied to equational congruence classes.

772 citations


"Explicit substitutions" refers methods in this paper

  • ...By a well-known lemma, local confluence suffices [11]; it can be checked by examining critical pairs, according to the Knuth-Bendix test....

    [...]

Book
01 Jan 1980
TL;DR: This proof is a direct generalization of Aczel's original proof, which is close to the well-known confluence proof for λ-calculus by Tait and Martin-Lof and gives an outline of a short proof of confluence.
Abstract: Combinatory reduction systems, or CRSs for short, were designed to combine the usual first-order format of term rewriting with the presence of bound variables as in pure λ-calculus and various typed λ-calculi. Bound variables are also present in many other rewrite systems, such as systems with simplification rules for proof normalization. The original idea of CRSs is due to Aczel, who introduced a restricted class of CRSs and, under the assumption of orthogonality, proved confluence. Orthogonality means that the rules are nonambiguous (no overlap leading to a critical pair) and left-linear (no global comparison of terms necessary). We introduce the class of orthogonal CRSs, illustrated with many examples, discuss its expressive power and give an outline of a short proof of confluence. This proof is a direct generalization of Aczel's original proof, which is close to the well-known confluence proof for λ-calculus by Tait and Martin-Lof. There is a well-known connection between the parallel reduction featuring in the latter proof and the concept of “developments”, and a classical lemma in the theory of λ-calculus is that of “finite developments”, a strong normalization result. It turns out that the notion of “parallel reduction” used in Aczel's proof gives rise to a generalized form of developments which we call “superdevelopments” and on which we will briefly comment.

662 citations

Frequently Asked Questions (15)
Q1. What are the contributions in "Explicit substitutions" ?

The λσ-calculus provides a setting for studying the theory of substitutions, with pleasant mathematical properties. Ecole Normale Supérieure ; part of this work was completed while at Digital Equipment Corporation, Systems Research Center. INRIA Rocquencourt ; part of this work was completed while at Digital Equipment Corporation, Systems Research Center and Paris Research Laboratory. 

If s represents the infinite substitution {a1/1, a2/2, a3/3, . . .}, the authors write a[s] for a with the substitution s. A term of the form a[s] is called a closure. 

In order to typecheck a term a[s], the basic strategy is to analyze simpler and simpler components of a while accumulating more and more complex substitutions in s. 

all the remaining free indices in a must be decremented; the desired effect is obtained with an infinite substitution:(λx.a)b →β a{b/x} becomes (λa)b →β a{b/1, 1/2, 2/3, . . . 

The inference rules = s′ t = t′s ◦ t = s′ ◦ t′can be removed, and the inference rule for the closure operator can be restricted tos = s′1[s] = 1[s′] 

The calculus is a vehicle in designing, understanding, verifying, and comparing implementations of the λ-calculus, from interpreters to machines. 

Other applications are in the analysis of typechecking algorithms for higher-order languages and, potentially, in the mechanization of logical systems. 

¿From their perspective, the advantage of the λσ-calculus over combinator calculi is that it remains closer to the original λ-calculus. 

An alternative (but heavy) solution would be to have separate index sets for ordinary term variables and for type variables, and to manipulate separate term and type environments as well. 

The theory S2 is formulated with equivalence judgments, for example judgments of the form E ` a ∼ b : A. This judgment means that in the environment E the terms a and b both have type A and are equivalent. 

In their setting, weak head normal forms are defined as follows:Definition 3.7 A weak head normal form (whnf for short) is a λσ term of the form λa or na1 · · · am. 

(The precise relation between environment lengths, and substitutions sizes, as defined in section 2, obeys the invariant: if E ` s substp and | s | = (m,n) then p = m + | E | − n ≥ 0.) 

For the typed first-order λσ-calculus, the syntax becomes:Types A ::= K |A → B Environments E ::= nil |A,E Terms a ::= 1 | ab |λA.a | a[s] 

The first-order λσ-calculus has the following syntax:Types A ::= K |A → B Environments E ::= nil |A,E Terms a ::= 1 | ab |λA.a | a[s] 

The rule for application takes this into account; a substitution is applied to B to “unshift” its indices:E ` b : A → B E ` a : AE ` b(a) : B[a:A · id ]The B[a:A · id ] part is reminiscent of the rule found in calculi for dependent types, and this is the correct technique for the version of such calculi with explicit substitutions.