Having defined the notion of HOC, we now give another technique to prove ter- mination: theRecursive Path Orderings (RPO) [Der82]. In this section we define the concepts for first-order terms only, i.e. those terms built with constructors whose syntactic categories are of order1(in other word, there is no variable bind- ing). The technique of RPO will still be relevant for HOC in general, which can all be turned into first-order calculi by erasing all bindings and replacing every bound variable by a common constructor of arity 0, say ? (pronouncedblob).
Such an encoding loses the information about the higher-order features of the calculus but will work for our purposes. The RPO technique could equivalently be defined forHOC in general, by embedding the erasure of bound variables into the definitions,20 but the literature usually makes the encoding explicit, as we shall do as well.
Definition 52 (Path Orderings) Consider a terminating and transitive re- duction relation  on term constructors of the HOC. In the context of path orderings this will be called the precedence relation.
• Suppose that each term constructor is labelled with a status lex ormul. The Recursive Path Ordering (RPO) [Der82], noted >>, is the relation on terms defined inductively21 by the following rules:
c(M1, . . . , Mn)>>Mi Mi>>M c(M1, . . . , Mn)>>M (c(M1, . . . , Mn)>>Ni)1≤i≤n cÂd c(M1, . . . , Mn)>>d(N1, . . . , Nm)
if c has status lex
(M1, . . . , Mn)>>lexx(N1, . . . , Nn) (c(M1, . . . , Mn)>>Ni)1≤i≤n
c(M1, . . . , Mn)>>c(N1, . . . , Nn)
if chas status mul
{{M1, . . . , Mn}}>>mull{{N1, . . . , Nm}}
c(M1, . . . , Mn)>>c(N1, . . . , Nm)
20This is clearly quite different from (and much weaker than) Jouannaud and Rubio’s higher-
order RPO [JR99], which takes the higher-order features into account, by including in the technique the termination of the simply-typedλ-calculus.
21Note that because of the reference to the multi-set reduction and the lexicographic reduc-
tion, the above rules do not form a proper inductive definition. However, we can label>>with integers and define>>kby induction onkusing the rules. Then it suffices to take>>=
S
k>>k.
whered andcare term constructors with aritiesmand n, respectively, and M, the Mi, and the Nj are terms.
• The Lexicographic Path Ordering (LPO) [KL80] is the RPO obtained by giving the label lex to all term constructors.
• The Multi-set Path Ordering (MPO) is the RPO obtained by giving the label mul to all term constructors.
Remark 48
1. If sAt then s>>t, which we call the sub-term property of >>. 2. The relation >> is transitive and context-closed.
Theorem 49 (Termination of RPO) If Âterminates on the set of term con- structors, then>> terminates on the set of terms.
Proof: See e.g. [Ter03] for a classical proof. 2
Conclusion
In this chapter we have established the notations, the terminology and the basic concepts that are used in the rest of this dissertation. We have presented a constructive theory of normalisation and induction based on an approach that relies on second-order quantification rather than classical logic. We have re- established a few normalisation results in this framework, including the simulation technique and a few variants.
We have presented higher-order calculi (HOC), i.e. calculi involving variable binding. Variable capture an liberation is avoided by the use of side-conditions that we often not write explicitly, but instead we described how they can be recovered mechanically from the expressions that we use to denote terms, building on the principles behind Barendregt’s convention. For that we needed to formalise the meta-level. This step back could be avoided by encoding parts of the meta- level into the object-level, such as introducing meta-variables in the syntax of higher-order calculi. This is the approach of CRS, ERS and IS. However, the extent of meta-level encoded in the object-level might not feature any notions of variable binding other than the object-level bindings (and possibly the bindings of implicit substitutions). Here we wanted to define a notion of expression that can feature any object-level and meta-level bindings.
Proof-terms for Intuitionistic
Implicational Logic
Natural deduction & sequent
calculus
In this chapter we introduce the concepts common to all chapters of Part I, which investigates intuitionistic implicational logic, i.e. intuitionistic logic with implication as the only logical connective. We start by formalising, in a more generic framework, a generalisation of the aforementioned concepts (also used in Part III which tackles classical logic), such as the notions of logical systems and typing systems, proof-terms, etc.
The paradigm of the Curry-Howard correspondence, which relates logical sys- tems and typing systems, is then illustrated not only by (intuitionistic implica- tional) natural deduction and the simply-typed λ-calculus [How80], but also by a typedHOC corresponding to the (intuitionistic implicational) sequent calculus
G3ii [Kle52]. We conclude the chapter by recalling traditional encodings from one to the other, originating from works by Gentzen [Gen35] and Prawitz [Pra65] but here presented by type-preserving translations of proof-terms (as in e.g. [Zuc74, DP99b]).
The main purpose of this chapter is to make the dissertation self-contained, but most concepts formalised therein correspond, in each particular framework treated in this dissertation, to the standard ones, so the reader may safely skip them (note however some notions that are new, such as being logically principal
—Definition 57, andterm-irrelevant admissibility —Definition 65).
2.1
Logical systems & implicational intuitionistic
logic
We first introduce general notions related to logical systems. The syntax of logical systems is based on HOC as described in Chapter 1.
Definition 53 (Logical sequent) Given two index sets J ⊆ I and basic syn- tactic categories (Ti)i∈I, a logical sequent is an object of the form
(Mk)k∈J `p S
where
• p∈ I, allowing the distinction of different kinds of logical sequents, • for all k ∈ J, Mk is a multi-set of terms of Tk, and
• So Tp.
Definition 54 (Logical rule, system & derivation)
• Alogical system (resp.logical rule) for anHOCis an inference system (resp. inference rule) whose judgements are logical sequents.
• A logical derivation is a derivation in an inference structure given by a logical system.
We now consider an HOC with one basic syntactic category, namely that of
implicational formulae:
Definition 55 (Implicational formulae and logical sequents)
• LetY be a denumerable set, the element of which are called atomic formu- lae, and denoted p, q, . . .
The set of implicational formulae1 is defined by the grammar: A, B ::=p|A→B
The constructor→is called theimplication.
• An (implicational intuitionistic)2 logical sequent is a logical sequent as de- fined in Definition 53 with index sets J = I being a singleton, so it is simply of the form Γ ` A, where Γ is a multi-set of formulae. Γ is called the antecedent and the singleton multi-set {{A}} is called the succedent of the logical sequent.
• Derivations of logical sequents in a particular inference system are called
proof-trees or sometimes just proofs.
The intuitive meaning of such a logical sequent is “Acan be inferred from the hypotheses Γ”.
Notice 1 For logical sequents we now use the notation Γ,∆ for the union of multi-sets Γ + ∆. We sometimes also write A for {{A}}.
1In the chapters of this part we sometimes sayformula for implicational formula.
2Again in the chapters of this part we say logical sequent for implicational intuitionistic
Natural deduction is a logical system introduced by Gentzen [Gen35]. Its implicational fragment in intuitionistic logic, calledNJi, is given in Fig. 2.1.
ax Γ, A ` A Γ, A` B →right Γ ` A→B Γ ` A→B Γ ` A →elim Γ ` B
Figure 2.1: Logical NJi
Of the sequent calculus LJ for intuitionistic logic, also introduced by Gentzen [Gen35], we present two versions (here for implication only): systemsG1ii
and G3ii (with i for intuitionistic and i for implicational), which are respectively presented in Fig. 2.2 and Fig. 2.3.
axm A ` A Γ ` A ∆, A ` B cutm Γ,∆` B Γ, A ` B →right Γ ` A→B Γ ` A ∆, B ` C →leftm Γ,∆, A→B ` C Γ` B weak Γ, A ` B Γ, A, A ` B cont Γ, A ` B
Figure 2.2: Logical G1ii
ax Γ, A ` A Γ ` A Γ, A ` B cut Γ ` B Γ, A ` B →right Γ ` A→B Γ, A→B ` A Γ, A→B, B ` C →left Γ, A→B ` C
Figure 2.3: Logical G3ii
Definition 56 (Derivability in NJi, G1ii, G3ii) We writeΓ `NJ AifΓ` Ais derivable in NJi, Γ `G1ii A if it is derivable in G1ii (Γ `G1iicf A if it is derivable without the cutm-rule), and Γ `G3ii A if it is derivable in G3ii (Γ`G3iicf A if it is
Rules ax and axm are called axiom rules, cut and cutm are called cut-rules,
weakandcontarestructural rules, respectively called theweakening rule andcon- traction rule. Rules →left and →leftm are the left-introduction rules for implica-
tion,→rightis theright-introduction rule for implication, and →elimis theelimina-
tion rule for implication. Axioms are considered both left- and right-introduction rules.3 On the contrary, cut, cut
m are neither left- nor right-introduction rules.
On the one hand, sequent calculus has left- and right-introduction rules, cuts and possibly structural rules. On the other hand, natural deduction never modi- fies the antecedent; only the axiom is a left-introduction rule, otherwise the rules are either right-introduction rules or elimination rules.
Definition 57 (Principal formula)
• In some rules of the above three systems, there is a formula that we dis- tinguish and call principal formula of the inference step: A→B in →left,
→leftm and →right, and A in ax, axm, weak and cont,
• A formula A is not used in a derivation in G3ii if the tree obtained from this derivation by changing the labelΓ ` B of each node intoΓ\ {{A}} ` B is still a derivation inG3ii.
• In G3ii, a formula A is logically principal if it is either principal in the succedent or both principal in the antecedent and not used in strict sub- derivations.
The definitions of (logically) principal formula, left- and right-introduction rules can clearly be adapted to other rules dealing e.g. with connectives other than implication. However, while it is very easy and natural to adapt the definition on a case by case basis, it seems much more difficult to give an abstract definition whose genericity would apply to all cases, e.g. in the general framework of logical systems.
Definition 58 (Context) In all the above rules, the formulae of the antecedent that are not principal are called the context.4
Note that G1ii is made of context-splitting rules, in that the context of the conclusion is split into the contexts of the premisses (and this holds for the axiom, which has no premiss: only the empty context can be split between 0
premisses). System G3ii is made of context-sharing rules, in that the context of
3This could be inherited from variants of the axioms where the formula A is necessarily
atomic, in which case they do introduce atomic formulae, just like →left, →leftm and →right
introduce the implication. But we shall see later that considering axioms as introduction rules has more profound reasons connected to the notions ofvalue andcovalue, as we shall see from Section 2.3 onwards.
the conclusion is shared between all the premisses, being duplicated in rules with at least two premisses, and being erased in rules with no premisses such as the axiom. For rules with exactly one premiss, the notions of context-splitting and context-sharing is the same.
Sometimes, context-splitting rules are said to be multiplicative (hence the subscript m in the name of the rules), while context-sharing rules are said to be
additive. Note that NJiis a context-sharing/additive system, like G3ii.
SystemG1iiandG3iialready illustrate the diversity of systems that exist in the literature for sequent calculus (includingG4ii, which we investigate in Chapter 7), with quite a bewildering nomenclature.
Our G1ii-system here matches the implicational fragment of both the G1i- system of [TS00] and theG0i-system of [NvP01]. These slightly differ from earlier work by Kleene [Kle52] whose intuitionisticG1-system sticks to Gentzen’s original presentation ofLJwhere the antecedent is a list of formulae instead of a multi-set, with an inference rule calledexchange:
Γ, A, B,∆` C
Γ, B, A,∆` C
The terminology G1, G2, G3 originates from the sequent calculi presented in [Kle52], which differ from each other in the way they treatstructural rules, i.e. weakening, contraction and exchange. G1-systems make them explicit as rules, whilstG3-systems incorporate them into the other rules.
Our system G3ii is exactly the implicational fragment Kleene’s intuitionistic
G3, from which both [TS00] and [NvP01] differ (ax is restricted to A being an atomic formula, and the antecedent formula A→B is systematically dropped in the second premiss of →left, building on Kleene’s variant G3a where arbitrary
omissions of formulae are allowed in the premisses of the rules).
Remark 50 In G3-systems such as G3ii, weakenings are hidden in the ax-rule and contractions are hidden in the context-sharing rules and in the fact that principal formulae of the antecedent are already in the premisses.
The following lemma holds:
Lemma 51 Weakening and contraction are height-preserving admissible in G3ii
and in NJi.
Proof: Straightforward induction on derivations. 2
This is used to establish the following equivalence:
Theorem 52 (Logical equivalence of G1ii, G3ii & NJi)
Proof:
• We obtain thatΓ `G1ii AimpliesΓ`G3ii Aby a straightforward induction on derivations, using Lemma 51. The converse is also obtained by an induction, which formally reveals the ideas of Remark 50.
• The second equivalence is proved in the rest of this chapter by using the proof-terms approach.
2
SystemG1iiillustrates how the notions of weakening and contraction (together with that of cut) traditionally come from sequent calculus. Our approach of using them in natural deduction in Chapter 5 is thus an example of how fruitful the connection between sequent calculus and natural deduction can be made.