Extensions of System F by Iteration and Primitive Recursion on Monotone Inductive Types

Dissertation

an der Fakultät für Mathematik und Informatik der Ludwig-Maximilians-Universität München

vorgelegt von Ralph Matthes

eingereicht am 20. Mai 1998

1. Berichterstatter: Prof. Dr. H. Schwichtenberg 2. Berichterstatter: Prof. Dr. W. Buchholz Tag der mündlichen Prüfung: 2. Februar 1999

In memoriam Gerhard Schieferstein 1923–1992

Der mich ernstgenommen hat als Kind von elf Jahren. Der mich die Querflöte spielen lehrte. Der so meine Begeisterung für die klassische Musik entfachte. Der mich aufschloß für die Welt der Technik, der Wissenschaft und ganz allgemein für alles das, wofür das Ringen um Einsicht und Erkenntnis sich lohnt.

Contents

1 Introduction 1 1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Outline of results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2 The basic framework 9

2.1 System F . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.1.1 Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.1.2 Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.1.3 Head form and normal forms . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.1.4 Reduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

2.2 The term rewrite system eF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 2.2.1 Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 2.2.2 Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 2.2.3 Head form and normal forms . . . . . . . . . . . . . . . . . . . . . . . . . 27 2.2.4 Reduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 2.2.5 Embeddings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 2.2.6 Embedding eF in F . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

2.3 Extension by infimum types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 2.3.1 Extension of the type system by infimum types . . . . . . . . . . . . . . . 34 2.3.2 The term rewrite system IT of infimum types . . . . . . . . . . . . . . . . 35 2.3.3 Embedding IT in eF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

2.4 Extension by the existential quantifier . . . . . . . . . . . . . . . . . . . . . . . . 38 2.4.1 Extension of the type system by existential types . . . . . . . . . . . . . . 38 2.4.2 The term rewrite system eF+ex . . . . . . . . . . . . . . . . . . . . . . . . 39 2.4.3 Embedding eF+ex in eF . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

3 Extension of the type system by inductive types 43 3.1 Inductive types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 3.2 Strictly positive and positive types . . . . . . . . . . . . . . . . . . . . . . . . . . 45 3.3 Height and depth for inductive types . . . . . . . . . . . . . . . . . . . . . . . . . 47 3.4 Extension by the existential quantifier . . . . . . . . . . . . . . . . . . . . . . . . 49 3.5 Non-interleaving positive inductive types . . . . . . . . . . . . . . . . . . . . . . . 49

4 Systems with monotone inductive types 51

4.1 The term rewrite system EMIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 4.1.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 4.1.2 Monotonicity without positivity . . . . . . . . . . . . . . . . . . . . . . . . 55

4.2 The term rewrite systems ESMIT . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 4.2.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 4.2.2 Embedding the systems ESMIT in EMIT . . . . . . . . . . . . . . . . . . . 59 4.2.3 The term rewrite systems ESMITit and ESMITrec . . . . . . . . . . . . . . 61 4.2.4 The term rewrite systems ESMIT+ex . . . . . . . . . . . . . . . . . . . . . 61

4.3 The term rewrite system varEMIT . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 4.3.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 4.3.2 Embedding EMIT in varEMIT . . . . . . . . . . . . . . . . . . . . . . . . . 62 4.3.3 Embedding varEMIT–rec in IT . . . . . . . . . . . . . . . . . . . . . . . . . 63

4.4 The term rewrite system IMIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 4.5 Relating iteration and primitive recursion . . . . . . . . . . . . . . . . . . . . . . 65

4.5.1 Coding IMIT in IMIT–rec . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 4.5.2 Coding IMIT in IMIT–it . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

4.6 The term rewrite systems ISMIT . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 4.6.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 4.6.2 Embedding ISMIT in IMIT . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

4.7 The term rewrite system varIMIT . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 4.7.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 4.7.2 Embedding IMIT in varIMIT . . . . . . . . . . . . . . . . . . . . . . . . . . 72

5 Systems with positive inductive types 73

5.1 The term rewrite systems PITit and PITrec . . . . . . . . . . . . . . . . . . . . . 73 5.1.1 Definition of PITit (also called PIT) . . . . . . . . . . . . . . . . . . . . . 73 5.1.2 Examples of term rewriting in PIT . . . . . . . . . . . . . . . . . . . . . . 76 5.1.3 Definition of PITrec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

5.2 The term rewrite systems SPIT, PIT+ex and SPIT+ex . . . . . . . . . . . . . . . 79 5.3 The term rewrite systems NIPIT, NISPIT and NISPIT+ex . . . . . . . . . . . . . 80 5.4 The term rewrite systems MePIT and coMePIT . . . . . . . . . . . . . . . . . . . 81

6 Systems with inductive types à la Mendler 83

6.1 The term rewrite system MeIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 6.1.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 6.1.2 Embedding varIMIT in MeIT . . . . . . . . . . . . . . . . . . . . . . . . . 88 6.1.3 Embedding MeIT in MeIT–it . . . . . . . . . . . . . . . . . . . . . . . . . 89 6.1.4 Embedding MeIT–rec in eF . . . . . . . . . . . . . . . . . . . . . . . . . . 89

6.2 The term rewrite system UVIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 6.2.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 6.2.2 Embedding MeIT in UVIT . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 6.2.3 Embedding UVIT in MePIT . . . . . . . . . . . . . . . . . . . . . . . . . . 91

6.3 The term rewrite system coMeIT . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 6.3.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 6.3.2 Embedding varEMIT in coMeIT . . . . . . . . . . . . . . . . . . . . . . . . 94 6.3.3 Embedding coMeIT in coMePIT . . . . . . . . . . . . . . . . . . . . . . . . 95 6.3.4 Embedding coMeIT in coMeIT–it . . . . . . . . . . . . . . . . . . . . . . . 96 6.3.5 Embedding coMeIT–rec in eF . . . . . . . . . . . . . . . . . . . . . . . . . 96

7 Composing the embeddings 99

8 Confluence 103 8.1 Confluence of system F . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 8.2 Confluence of the other systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 9 Strong normalization 111

9.1 Strong normalization of system F . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 9.1.1 Terms in SN are strongly normalizing . . . . . . . . . . . . . . . . . . . . 111 9.1.2 Saturated sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114

9.2 Strong normalization of system eF+ex . . . . . . . . . . . . . . . . . . . . . . . . 121 9.2.1 Terms in SN are strongly normalizing . . . . . . . . . . . . . . . . . . . . 121 9.2.2 Saturated sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

9.3 Extracting embeddings from normalization proofs . . . . . . . . . . . . . . . . . . 126 9.4 Strong normalization of MeIT–it and coMeIT–it . . . . . . . . . . . . . . . . . . . 127

9.4.1 Strong normalization of MeIT–it . . . . . . . . . . . . . . . . . . . . . . . 127 9.4.2 Strong normalization of coMeIT–it . . . . . . . . . . . . . . . . . . . . . . 133

9.5 Strong normalization of EMIT, varEMIT, IMIT and varIMIT . . . . . . . . . . . . 138 9.5.1 Strong normalization of EMIT . . . . . . . . . . . . . . . . . . . . . . . . . 138 9.5.2 Strong normalization of varEMIT . . . . . . . . . . . . . . . . . . . . . . . 145 9.5.3 Strong normalization of IMIT . . . . . . . . . . . . . . . . . . . . . . . . . 146 9.5.4 Strong normalization of varIMIT . . . . . . . . . . . . . . . . . . . . . . . 147

9.6 Strong normalization of the other systems . . . . . . . . . . . . . . . . . . . . . . 148

A Other proofs of strong normalization 151

A.1 Proof of strong normalization for varEMIT . . . . . . . . . . . . . . . . . . . . . . 151 A.1.1 Saturated sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 A.1.2 Calculating with saturated sets . . . . . . . . . . . . . . . . . . . . . . . . 152 A.1.3 Computability predicates . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

A.2 Proof of strong normalization for IMIT . . . . . . . . . . . . . . . . . . . . . . . . 158 A.2.1 Saturated sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 A.2.2 Calculating with saturated sets . . . . . . . . . . . . . . . . . . . . . . . . 159 A.2.3 Computability predicates . . . . . . . . . . . . . . . . . . . . . . . . . . . 164

A.3 Proof of strong normalization for varIMIT . . . . . . . . . . . . . . . . . . . . . . 165 A.3.1 Saturated sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 A.3.2 Calculating with saturated sets . . . . . . . . . . . . . . . . . . . . . . . . 166 A.3.3 Computability predicates . . . . . . . . . . . . . . . . . . . . . . . . . . . 172

A.4 Concluding remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173

B Directions for future research 175

Please refer to the index only in case the above table does not show the concept sought after. x CONTENTS

Acknowledgements

Prof. Dr. Helmut Schwichtenberg was the man to introduce me to mathematical logic in 1990 and to direct my interest to natural deduction and to proofs of strong normalization for typed lambda calculi. He made me share his^{1} fascination for the idea of program extraction from constructive proofs. It seems that he never became tired of the ever-evolving proofs of strong normalization of systems with inductive types I presented to him over the last years. I am grateful to him for the group of researchers he has formed in Munich, the guests he has attracted and generally the inspiring environment he has provided for me. I thank all those who were part of this environment. There are three colleagues who have been most important for me: Ulrich Berger, Thorsten Altenkirch and Felix Joachimski. I am very much indebted to the first two for all their invaluable suggestions, their comments and their unpublished manuscripts whereas I gratefully acknowledge the wonderful symbiosis which I enjoyed several times with Felix. Although Prof. Dr. Wilfried Buchholz did not succeed in making me write my thesis in the field of classical proof theory (= ordinal analysis) I had the chance to learn from him that unconditional commitment to mathematical precision eventually pays off. Nearly all of the thesis was written at my new “scientific home” at the chair for theoretical computer science of Prof. Dr. Peter Clote. It is my feeling that without his decision for me and the continual gentle pressure which followed I would have further delayed writing down my thesis. I like the new environment very much and therefore thank him and all the people at the chair (including Thorsten Altenkirch whom I mentioned above). I would like to thank my parents, my sister and my friends for their strong support and constant encouragement. It was amazing how they reacted to my periods of mathematical joy and inspiration and to the times of stagnancy and mathematical infertility. I challenged their emotional capabilities—all the more as my mathematical activity kept being a secret to most of them—and I was rewarded a lot, sometimes unpleasant, sometimes surprising, but always interesting.

This research was partially supported by the Graduiertenkolleg “Sprache, Information, Logik” at the Ludwig-Maximilians-Universität München (financed by the Deutsche Forschungsgemeinschaft). I am also very thankful for support by the Volkswagenstiftung. xii CONTENTS

1See e. g. [BBS^{+}98].

Chapter 1

Introduction

We study systems of typed terms extending system F [Gir72, Rey74] with notions of β-reduction for every type construction. We focus on types of the form μαρ whose intended interpretation is least pre-fixed-points of monotone operators. There are always two associated β-rules: The rule modelling iteration and the rule which models primitive recursion on the data structure. It is well known that data types such as the natural numbers may be represented in system F. This works very well for the definition of functions by iteration. But even the defined predecessor on natural numbers inside system F does not behave very well: The predecessor of the successor of n can be reduced to n only for numerals n and this process needs O(n) steps. I do not know whether there is a proof that no reduction preserving embedding of primitive recursion on positive inductive types into system F is possible. But nobody seems to know such an embedding. Therefore, I decided to compare extensions of F allowing for primitive recursion on inductive types.

1.1 Motivation

This work is in some sense a chapter of the theory of complete lattices. But without the magnifying glasses of proof theory it would be quite short a chapter and moreover it would not contain any new result—new relative to Tarski’s fixed-point theorem [Tar55]^{1}. First we use the magnifier of intuitionism to explore whether the classical results may also be proved constructively or whether they may be turned into statements (“constructivizations”) permitting a constructive proof. Along this line we may define the term systems which are typed lambda calculi and also the encodings between them. But this thesis is dominated by the question of the behaviour of term rewrite rules^{2} of the systems and of their relation between systems. And this question may be turned into a problem of proof theory by using the Curry-Howard isomorphism [How80] in its most trivial reading^{3}: The types of the extensions of system F are the formulas of an intuitionistic second-order propositional logic and the typed terms are simply proof terms in a natural deduction formulation of this intuitionistic logic. A term proves its type and its free typed term variables are the assumptions used in the proof. The term rewrite rules become proof transformations and they are justified if they do not change the type (formula) of the term (proof) and have as free term variables (assumptions) at most those which were present in the original term (proof). We continue by adopting the proof-theoretic language. The analysis of proofs is greatly simplified if the proof transformation system is normalizing and confluent because then one may only consider proofs in normal form. The comparison of the head forms of proofs (e. g. Lemma 2.24) and the set of normal forms (e. g. the inductively defined set NF on p. 18) shows what is gained by normalization. Consistency is a typical problem which is solved by studying the normal forms. Since [Tai75] it has been common to establish strong normalization if possible. Although already normalization furnishes consistency and hence needs means of proof going beyond the logical system (which is an extension of pure second-order propositional logic) it is a challenge also to prove strong normalization. There are numerous published variations on that proof. Nevertheless I present another proof of strong normalization for system F which in my view separates the difficulties even more—most prominently the absence of reduct analysis in any reasoning with saturated sets which are a variant of the reducibility candidates (see e. g. [GLT89]). Up to now I only spoke about system F. Although I present it in great detail it is only the basis on which to build the extensions by inductive types. Proof theorists might lose their interest in this work because system F is already fully impredicative and an extension by inductive types seems to give only “sugar” to the system. This would in fact be true if we only studied iteration on these inductive types. But we also study (full) primitive recursion. This time it is an algorithmic motivation: Functions defined by primitive recursion may be more efficient than functions defined by iteration. I alluded to it at the very beginning of this chapter by giving the example of the predecessor on the naturals (which in that encoding works iteratively). This algorithmic motivation is intimately connected to a proof-theoretic question: What is the appropriate logical system allowing to extract efficient programs out of existence proofs^{4}? Extraction of typed lambda terms^{5} (viewed as programs) from intuitionistic proofs may be done via the modified realizability interpretation (due to G. Kreisel; see the citations in [Ber95]). I mention two examples where modified realizability is used for the extraction of programs out of normalization proofs: In [Ber93] a normalization algorithm is extracted from a proof of strong normalization of simply typed lambda calculus following Tait’s computability predicate method [Tai67]. [vdP96b] builds on [Ber93] and extracts bounds on reduction lengths for Gödel’s T from a variant of the normalization proof by the Tait method. In [Ber95] a modified realizability interpretation is given for a system of interleaving positive inductive types with iteration only. The main insight I got from it was the motivation of the reduction rules for positive inductive types from it: The soundness of modified realizability only holds up to some equational theory on the terms and the attempt to prove soundness shows which equational axioms have to be postulated. All these efforts are in vain if the resulting equality theory is not effective but fortunately the axioms may be turned into term rewrite rules which form a strongly normalizing and confluent term rewrite system having hence decidable intensional equality. Hence, we may indeed interpret the extracted terms as programs. Although I believe that a modified realizability interpretation could be given for the systems presented in this thesis I decided to be very informal about program extraction. But one should see the study of the term systems as the first part of a project aiming at the constructive interpretation of monotone inductive definitions. And it is a big part because the proof of soundness of the realizability interpretation is not so much different from the proof of strong normalization. Most of the difference is the extension from propositional logic (the term system) to full predicate logic. And this extension is quite easy: As long as there are no dependent types in the framework one can only use the objects in a uniform way in the proofs.

1We read: “Most of the results contained in this paper were obtained in 1939.”

2We only consider β-rules for all the type constructs.

3Many subtleties concerning Curry-Howard isomorphisms may be found in [Geu93].

4More precisely: Proofs of Π_{2}^{0}-formulas.

5In [Par92] (system TTR) untyped lambda terms are extracted and only the reduction of untyped lambda calculus exhibits the algorithmic content. Correctness is expressed by typing rules which also include positive recursive types. In contrast to that I add reduction rules for every new type construct.

Perhaps the second part would become big if not only soundness (which guarantees that the extracted program meets the specification expressed in the existential statement) were the goal. A project going beyond the soundness theorem for modified realizability would be to formalize the normalization proofs and not only extract embeddings between systems out of them but also have a meta-theorem assuring that these encodings are always respecting β-reduction, hence that the extracted encodings are indeed embeddings (cf. section 9.3). What are monotone inductive types? They are motivated by Tarski’s theorem from which I only use the following: Let (U, ≤) be a complete lattice and Φ : U → U be monotone. Then Φ has a least fixed point^{6} lfp(Φ) which is given by

lfp(Φ) = ⋀{M ∈ U|Φ(M) ≤ M}.

The minimality of lfp(Φ) gives a principle of induction:

(lfp-E) Φ(M) ≤ M ⇒ lfp(Φ) ≤ M.

This will motivate iteration. As a derived rule we get

(lfp-E^{+}) Φ(lfp(Φ) ∧ M) ≤ M ⇒ lfp(Φ) ≤ M.

I call this rule the principle of extended induction^{7}. It motivates primitive recursion. The idea is as follows: We depart from the explicit representation of lfp(Φ) as an infimum (which for pedagogic reasons is studied in a system of infimum types) because its reduction behaviour is not satisfactory. Instead we directly represent lfp(Φ) by a type μαρ in a system with iteration and primitive recursion. We may now give an answer to the question on an appropriate logical system allowing to extract “efficient” programs out of existence proofs: It has extended induction as a primitive notion. Monotone inductive definitions also draw attention in classical proof theory. The content of [Fef82, Rat96, GRS97, Rat98, Rat99] is orthogonal to the topics of this thesis, though. Their results are mainly based on classical logic, and they are very much concerned about measuring the strength of the theories at hand which clearly forbids the use of full impredicativity as expressed by system F. In this thesis, we exclusively study intuitionistic systems extending system F. The problems solved all have to do with reduction behaviour which does not play a role in the cited papers. Due to the different positions concerning impredicativity they focus on the possibility of getting least fixed points via transfinite iteration of a monotone operator starting with the empty set (hence being an approach from below) whereas we build on Tarski’s theorem guaranteeing that the impredicatively justified infimum of the pre-fixed-points (hence being an approach from above) is also a pre-fixed-point and hence that a least pre-fixed-point exists. Even the focus on primitive recursion instead of iteration (especially in the case of non-strictly positive inductive types) itself seems to be a quest for more impredicativity because the step term in the recursive definition may refer to the inductively defined set (modelled by the inductive type) in its entirety. How do we model monotone inductive types? We allow μαρ to be a type for any type ρ and any type variable α but we only may form terms of this type if we know monotonicity. How do we know that λαρ is monotone? By having already constructed a term of type ∀α∀β.(α → β) → ρ → ρ[α := β]. This term is called monotonicity witness and may arbitrarily use term formation rules for inductive types, hence permitting any interleaving of inductive types. Interleaving inductive types are those where a free parameter of a subexpression of the type of the form μαρ is bound by μ. Nesting would only mean that a type of the form μαρ may be a subexpression of a type μα′ρ′ with α′ not free in μαρ. One could also call the interleaving inductive types inductive types with essential use of parameters. Most presentations (for me important are [Lei90, Geu92]) restrict to positive inductive types, hence to a restriction already enforcing monotonicity on the level of types^{8}. Mendler’s typetheoretic system (with dependent types and subset types) in [Men87b] has the notion of monotone inductive types, i. e., μ-types are introduced under the assumption that the monotonicity statement (expressed via subset types) has already been derived. Surprisingly, the monotonicity proof is not used in the reduction rule. But this becomes clear when recognizing that the elimination rule does not express definition by primitive recursion. It corresponds to a definition by primitive recursion on a set inductively defined via a “positivization” of the monotone operator expressed by the monotone inductive type. And this positivization even works for non-monotone operators explaining why the monotonicity proof could be left out. Why monotone inductive types?

6In fact we only use that we have a least pre-fixed-point. The fact that this least pre-fixed-point is also a fixed point is never used in the systems of this thesis because it does not fit with β-reduction.

7In mathematical practice it is quite common to make unconcious use of “extended induction” instead of the original induction principle. Take e. g. the squaring function on the reals and try to prove that it has only natural numbers as values for natural number arguments. (One may already assume that addition does not leave ℕ.)

• We try to prove as general results as possible.

• Monotone inductive types have a meta-theory where proofs may be done by structural recursion. In the case of positive inductive types we have the phenomenon that syntactic material pertaining to the canonical monotonicity witnesses necessary for formulating the rules of iteration and primitive recursion “pops up” during reduction. Therefore e. g. in the final soundness theorem in the proof of strong normalization one has to use quite complicated measures of induction. Compare [JO97] in the case of “abstract data type systems” where on p. 380 we find a tremendously complicated induction measure which is needed because the syntactic material is not carried around^{9}.

• It is nice to have an apparatus with expressive means which allow to formulate theorems which are only true after imposing some restrictions. In section 4.7.1 I present a slight variation of a very reasonable system for which normalization fails.

• And there is a nice inductive type which is monotone but not positive (due to U. Berger).

However, a large part of this thesis is concerned with showing how to embed systems of monotone inductive types into systems of non-interleaving positive inductive types while preserving reduction.^{10} The main idea is to define “positivizations” of an arbitrary operator. Let us give an example: In calculus the limit inferior lim inf of a sequence (a_{k})_{k∈ℕ} of real numbers is formed by setting

lim inf_{k→∞} a_{k} := lim_{n→∞} inf{a_{k}|k ≥ n}.

The limit to the right always exists (it may be infinite) because the sequence (inf{a_{k}|k ≥ n})_{n∈ℕ} is monotonically increasing. And for this work it is most important that the monotonicity may be read off syntactically: The argument n occurs positively in the expression inf{a_{k}|k ≥ n}.

8Those systems nicely embed into the proposed systems of monotone inductive types.

9No doubt, this is more user-friendly but the user interface may be built up after having shown normalization and confluence.

10Let henceforth an embedding be an encoding which preserves reduction, i. e., for any reduction step in the source system one can do at least one reduction step in the target system to get from the encoding of a term to the encoding of its reduct.

In a similar fashion we get the lower and the upper monotonization of any operator. The upper monotonization gives rise to an embedding of monotone inductive types into non-interleaving strictly positive inductive types including the existential quantifier. The lower monotonization motivates embeddings into non-interleaving positive inductive types without the existential quantifier. The embeddings work because the monotonization of a monotone operator is the operator itself, but the reflection of this fact joins the monotonicity via a monotonicity witness to the monotonicity via positivity. Two other notions of monotonicity enter the proofs of strong normalization. They are the semantic requirement that a monotonicity witness is element of the saturated set

∀P∀Q.(P → Q) → Φ(P) → Φ(Q)

for Φ a family of operators on saturated sets which is a strong monotonicity requirement for Φ and finally the standard notion of monotonicity for such a family of operators. Unfortunately, I have no intuition how to reason by mere monotonicity of such operators in order to establish strong normalization. The good news is: I never had to reason in this way because always monotonizations could be found which were syntactically monotone (i. e., positive) and had properties good enough to let the proofs of strong normalization go through.

1.2 Outline of results

Most of the work is done in order to establish the following

Theorem Define four classes of systems as follows.

I Systems without primitive recursion.

• F: the basic impredicative system with → and ∀.

• eF: F extended by 0, 1, × and +.

• IT: eF extended by infimum types iαρ.

• eF+ex: eF extended by ∃.

• varEMIT–rec: the variant of the system of elimination-based (elimination rules without monotonicity witness) monotone inductive types with no primitive recursion but iteration.

• IMIT–rec: the system of introduction-based (introduction rule without monotonicity witness) monotone inductive types with no primitive recursion but iteration.

• MeIT–rec: the system in the spirit of Mendler with no primitive recursion but iteration.

• coMeIT–rec: the dual to MeIT–rec.

• Any other system of inductive types with iteration but no primitive recursion.

II The systems in IIa and in IIb to be defined next.

IIa Strictly positive systems without ∃.

• SPIT: the system of (interleaving) strictly positive inductive types (with iteration and primitive recursion and map terms built without primitive recursion but iteration).

• NISPIT: the system of non-interleaving strictly positive inductive types (with iteration and primitive recursion and map terms built with neither iteration nor recursion).

IIb Classes of systems with selected monotone inductive types.

• ESMIT: systems of elimination-based (unrestricted use of μ^{(+)}-elimination in map terms) selected monotone inductive types.

• ESMITit: those of ESMIT without primitive recursion in the definitions of map terms.

• ESMITrec: those of ESMIT without iteration in the definitions of map terms.

• ESMIT+ex: systems like ESMIT but including ∃.

• ISMIT: systems of introduction-based (unrestricted use of μ-introduction in map terms) selected monotone inductive types.

• ISMIT+ex: systems like ISMIT but including ∃.

III 20 other systems of inductive types.

• PIT=PITit: the system of positive inductive types with iteration and primitive recursion where interleaving and non-strict positivity are allowed and the map terms do not use primitive recursion but only iteration.

• PITrec: like PITit but the map terms use primitive recursion and no iteration.

• PIT+ex: PIT extended by ∃.

• SPIT+ex: SPIT extended by ∃.

• NIPIT: the system of non-interleaving (but including non-strictly) positive inductive types with iteration and primitive recursion and map terms built with neither iteration nor recursion.

• NISPIT+ex: NISPIT extended by ∃.

• EMIT: the system of elimination-based (elimination rules without monotonicity witness) monotone inductive types with primitive recursion and iteration.

• EMIT–it: EMIT without iteration.

• varEMIT: a variant of EMIT with a slightly weaker requirement of monotonicity for the monotonicity witnesses.

• IMIT: the system of introduction-based (introduction rule without monotonicity witness) monotone inductive types with primitive recursion and iteration.

• IMIT–it: IMIT without iteration.

• varIMIT: a variant of IMIT with a slightly weaker requirement of monotonicity for the monotonicity witnesses.

• IMIT+ex: IMIT extended by ∃.

• MeIT: the system in the spirit of Mendler (“Mendler’s Inductive Types”) with iteration and primitive recursion.

• MeIT–it: MeIT without iteration (nearer to Mendler’s [Men87a] system).

• coMeIT: the dual (the explanation via “monotonizations” of operators is dual) to MeIT.

• coMeIT–it: coMeIT without iteration.

• UVIT: “Uustalu’s and Vene’s Inductive Types”, a slight generalization of MeIT (which serves for clarifying the embedding of MeIT into NISPIT+ex) also with iteration and primitive recursion.

• MePIT: the subsystem of NISPIT+ex which is actually needed for embedding MeIT into NISPIT+ex. It also has iteration and primitive recursion.

• coMePIT: the subsystem of NIPIT which is actually needed for embedding coMeIT into NIPIT; with iteration and primitive recursion.

Let an embedding be an encoding which preserves reduction, i. e., for any reduction step in the source system one can do at least one reduction step in the target system to get from the encoding of a term to the encoding of its reduct. Then the following holds: There are embeddings of each system in I into any other. There are embeddings of each system in II into any of III and each system of III embeds into any other system of III. Hence, the systems in I are embedding equivalent to each other, and the same holds for the systems in III. Every system in I, II and III is strongly normalizing and confluent.

All of the above systems are motivated and defined carefully. Examples are given and a lot of additional information is taken out of the proofs, among them naïve reduction-free normalization, consistency, the impossibility of proving the Peirce formula, an insight how much easier weak normalization is than strong normalization and even embeddings into systems of fixed-point types.

In chapter 2 the systems without inductive types are formulated and analyzed very carefully. Starting from system F with arrow types and universal types only, we subsequently add 0, 1, product types, sum types, existential types and infimum types. Chapter 3 shows the different notions of inductive types (including strictly positive and positive and non-interleaving positive inductive types) and measures for them. Examples are considered. Term systems for monotone inductive types are studied in chapter 4. The two possibilities of fixing a monotonicity witness to the term rules are presented. There is a non-trivial example of monotonicity which does not come from positivity. Also the systems with selected monotone inductive types having a specified monotonicity witness for every inductive type are defined and embedded into the systems with monotone inductive types by using a notion of stratified term. An elaborate discussion on the relation of iteration and recursion is included. The iterative fragment of varEMIT is embedded into the system of infimum types by simply reflecting the proof of Tarski’s theorem. In chapter 5 systems with positive inductive types are defined which means to define the canonical monotonicity witnesses whose stratification and uniformity alone guarantee strong normalization. It is presented how much easier the definitions are for subsystems like that of strictly positive inductive types or of non-interleaving positive inductive types. Very special instances are MePIT and coMePIT which may be seen as examples for the calculation of canonical monotonicity witnesses. Chapter 6 is the heart of this thesis: The junction between monotone inductive types and noninterleaving positive inductive is introduced in form of MeIT and coMeIT the first of which is a variant of Mendler’s [Men87a] system and the second a dual to it. The introductory sections to that chapter are essential for understanding why the embeddings work. In chapter 7 we collect the embeddings established so far and prove the statements on embeddings in the theorem above. Confluence is proved by a variant to Takahashi’s [Tak95] method in chapter 8.

Chapter 9 and appendix A contain the most technical part: The proofs of strong normalization for several systems. Again much effort has been invested to make the proofs as clear and as modular as possible. The variations on the proof for EMIT are put in the appendix although they show a wealth of subtleties. A final discussion explains how the embeddings of monotone inductive types into MePIT and coMePIT could have been found. Appendix B discusses possible extensions which came to my mind during the writing of this thesis mostly concerning fixed-point types, η-reduction, functoriality of the monotonicity witnesses and permutative conversions for inductive types. A list of open problems is given.

As central points of this thesis I consider:

• Monotone inductive types formulated^{11} and proved to be strongly normalizing and confluent.

• Selected monotone inductive types formulated (as abstraction from the canonical monotonicity witnesses for positive inductive types) and embedded into monotone inductive types via an inductively defined set of stratified terms.

• Mendler’s system proved to be strongly normalizing without any restriction to forming inductive types.

• Formulation of a dual (coMeIT) to Mendler’s system.

• Embedding of monotone inductive types into non-interleaving positive inductive types. The main step: varEMIT embeds into coMeIT and varIMIT embeds into MeIT. Explanation why such easy embeddings exist.

• Reduction of iteration to primitive recursion even for introduction-based monotone inductive types.

• A measure of height (h) for abstracted types which allows to define the canonical monotonicity witnesses for interleaving positive inductive types.

• A technical device: The vector notation for multiple eliminations.

• The separation of reduct analysis from any reasoning on saturated sets.

• The definition of infimum types to clarify the encoding of iteration on elimination-based monotone inductive types inside system F.

• The organization of the proof of strong normalization such that always an introductionbased and an elimination-based definition of computability predicates is possible and that embeddings may be read off the proof.

• The equivalence with respect to embeddings of the 20 systems of class III in the above theorem.

11The very idea of considering primitive recursion in the presence of some arbitrary term of “functorial strength”

already occurs in [Alt93c] together with a sketch of an elimination-based normalization proof.

The basic framework

System F and its extension by 0, 1, product and sum types are defined in all details. An extension by types expressing infima is proposed. Finally, the extension by existentially quantified types is studied.

2.1 System F

The following definitions define a variant of the historical system F (invented independently by Girard [Gir72] and Reynolds [Rey74]), which will be my starting point to investigate impredicative systems. A presentation which focuses more on the main ideas is to be found in [GLT89].

[Mit96] also contains an extensive discussion of polymorphism. Good references (among numerous other good presentations) are also [Bar93] and [Gal90].

2.1.1 Types

Assume a countably infinite set Typevars of symbols which are considered as type variables. By induction define the set Types of types as follows:

(V) If α ∈ Typevars, then α ∈ Types.

(→) If ρ ∈ Types and σ ∈ Types, then ρ → σ ∈ Types.

(∀) If α ∈ Typevars and ρ ∈ Types, then ∀αρ ∈ Types.

The variable α in ∀αρ is considered to be bound by ∀—more precisely, every occurrence of α in ρ which is not bound deeper inside ρ is bound by ∀α. We adopt the convention not to distinguish between types which only differ in the names of their bound variables, e. g. we simply identify the types ∀α.γ → (∀β.α → β) and ∀δ.γ → (∀α.δ → α), assuming α, β, γ, δ ∈ Typevars. As in this example parentheses are used to indicate the inductive build-up of the types which was suppressed in the inductive definition because it will be understood in all the inductive definitions of concepts that the defining rules freely generate the structure^{1}. The dot notation hides a pair of parentheses, which opens at the dot and closes as far to the right as is syntactically possible. Moreover, ∀ is assumed to bind stronger than →, and iterated → is associated to the right (i. e., ρ → σ → τ means ρ → (σ → τ)). For every type ρ we define the finite set FV(ρ) of type variables occurring free in ρ by recursion on the inductive definition of the types ρ as follows:

1Not only on the meta-level every inductive definition is considered to be deterministic but also the inductive types studied in this thesis exclusively model deterministic inductive definitions which therefore allow (transfinite)

recursion (see e. g. [Acz77, p. 744]).

10 CHAPTER 2. THE BASIC FRAMEWORK

(V) FV(α) := {α}.
(→) FV(ρ → σ) := FV(ρ) ∪ FV(σ).
(∀) FV(∀αρ) := FV(ρ) \ {α}.

This definition is compatible with the renaming convention. Define the resulting^{2} type ρ[α⃗ := σ⃗] of simultaneously substituting the finite list of types σ⃗ for the (equally long) list of type variables α⃗ in a type ρ by recursion on ρ as follows:

(V) α[α⃗ := σ⃗] := α, if α does not occur in the list α⃗. α[α⃗ := σ⃗] := σ_{i}, if i is the smallest index such that α_{i} = α. (Subscripts indicate the respective elements in the list.) (→) (ρ → σ)[α⃗ := σ⃗] := ρ[α⃗ := σ⃗] → σ[α⃗ := σ⃗]. (∀) (∀αρ)[α⃗ := σ⃗] := ∀α.ρ[α⃗ := σ⃗], where according to the renaming convention we assume that α is different from the α⃗ and does not occur free in any of the σ⃗ (thanks to the infinite supply of type variables).

This definition is again compatible with the renaming convention. Due to the assumption in the rule (∀) which will be written as α ∉ α⃗ ∪ FV(σ⃗) we have for α ≠ β

• (∀αα)[α := β] ≠ ∀αβ

• (∀αβ)[β := α] ≠ ∀αα We adopt the naming convention that α, β, γ and δ (even if decorated e. g. with subscripts) always denote type variables, and ρ, σ and τ (also with decoration) denote types. Lemma 2.1 If α ∉ FV(ρ), then ρ[α⃗, α := σ⃗, σ] = ρ[α⃗ := σ⃗]. Proof Induction on ρ. _{□} Corollary 2.2 If α⃗ ∩ FV(ρ) = ∅ then ρ[α⃗ := σ⃗] = ρ. _{□} Lemma 2.3 FV(ρ[α⃗ := σ⃗]) = (FV(ρ) \ α⃗) ∪ ⋃{FV(σ_{i})|α_{i} ∈ FV(ρ) ∧ α_{i} ≠ α_{j} for j < i}, which trivially implies FV(ρ[α⃗ := σ⃗]) ⊆ (FV(ρ) \ α⃗) ∪ FV(σ⃗). Proof Induction on ρ. _{□} Corollary 2.4 If α ∉ α⃗ ∪ FV(σ⃗) then α ∈ FV(ρ) ⟺ α ∈ FV(ρ[α⃗ := σ⃗]). _{□} Lemma 2.5 If α ∉ α⃗ ∪ FV(σ⃗) then (ρ[α := σ])[α⃗ := σ⃗] = (ρ[α⃗ := σ⃗])[α := σ[α⃗ := σ⃗]]. Proof Induction on ρ using Corollary 2.2. _{□} Lemma 2.6 If α ∉ α⃗ ∪ FV(σ⃗) then ρ[α⃗, α := σ⃗, σ] = (ρ[α⃗ := σ⃗])[α := σ]. Proof Induction on ρ using Corollary 2.2. _{□} More on the renaming convention can be found in Barendregt’s [Bar84, pp. 25–27, 577–581]. The convention there is to “identify α-congruent terms on a syntactic level” (p. 26) as is done here with types. The “variable convention” says that for finitely many objects which have bound variables and occur together in some mathematical context, it is always assumed that the bound variables are different from all of the free variables. In this thesis, I do not follow Barendregt’s variable convention but always make the comment about what we have to assume on the bound variables in order to have a concept correctly defined. The reason for this cautious approach is that in many cases it is not clear (to me) whether the mathematical context at hand contains finitely or infinitely many such objects. Moreover, sometimes it is useful to have the same variable free and bound in a clause of a definition (see e. g. the clause (β_{μ}^{+}) in section 4.1.1). Finally, I do not completely understand what the variable convention really says about a definition clause such as

2Note that only the effect of substituting types for type variables in types is studied and not the type substitution itself as a finitely presented function (giving rise to a substitution calculus).

(∀) FV(∀αρ) := FV(ρ) \ {α}.

Therefore my convention merely means that I consider types only up to α-equivalence. In loc. cit. also the approach by de Bruijn [dB72] (and some approach by Curry) is presented. Another truly accurate treatment of the renaming convention would be to define α-equivalence and type substitution simultaneously by recursion on the complexity of the types as was e. g. carried out in [Rei96]. Note that the Curry-Howard isomorphism means on the type level that we see the type variables as propositional variables and the types as propositions. The types of system F “are” hence the formulas of second-order propositional logic with only universal quantification over propositions and implication.

2.1.2 Terms

A slightly erroneous term system is defined and then—by changing the variables to be more polymorphic—the system forming the core of all the extensions considered in this thesis.

A first attempt to define the terms and a variable convention

Assume for every type ρ pairwise disjoint countably infinite sets Vars(ρ) of symbols which are considered as term variables of type ρ. By simultaneous induction define the sets Λ_{ρ} of typed terms of system F of type ρ and simultaneously define for every term r in any Λ_{ρ} the finite set FV(r) of term variables occurring free in r (overloading the previously defined FV for types) as follows:

(V) If x ∈ Vars(ρ), then x ∈ Λ_{ρ}. FV(x) := {x}.
(→-I) If x ∈ Vars(ρ) and r ∈ Λ_{σ}, then λxr ∈ Λ_{ρ→σ}. FV(λxr) := FV(r) \ {x}.
(→-E) If r ∈ Λ_{ρ→σ} and s ∈ Λ_{ρ}, then rs ∈ Λ_{σ}. FV(rs) := FV(r) ∪ FV(s).

(∀-I) If r ∈ Λ_{ρ} and α ∈ Typevars, then Λαr ∈ Λ_{∀αρ}, provided that α ∉ FV(σ) for any σ with FV(r) ∩ Vars(σ) ≠ ∅. FV(Λαr) := FV(r).

(∀-E) If r ∈ Λ_{∀αρ} and σ ∈ Types, then rσ ∈ Λ_{ρ[α:=σ]}. FV(rσ) := FV(r).

It should be noted that the proviso in the rule (∀-I) is usually called the eigenvariable condition which becomes clear in the discussion of the Curry-Howard isomorphism at the end of this section.

This definition is again compatible with the renaming convention for bound type variables (the only critical case being (∀-E)). The term variable x in λxr is considered to be bound by λ, and the type variable α in Λαr is considered to be bound by Λ. We again do not want to distinguish between terms which only differ in the names of bound variables (term and type variables). E. g. if α and β are different type variables and x ∈ Vars(α) and y ∈ Vars(β), then λxx ∈ Λ_{α→α} and λyy ∈ Λ_{β→β}. Therefore Λαλxx ∈ Λ_{∀α.α→α} and Λβλyy ∈ Λ_{∀β.β→β}. Because of the convention on identifying bound type variables in types, we have ∀α.α → α = ∀β.β → β which by compatibility implies Λ_{∀α.α→α} = Λ_{∀β.β→β}. How can one rename the bound type variable α in Λαλxx to β? This would be possible if one were allowed to also rename x ∈ Vars(α) to y ∈ Vars(β). I think this would be quite hard to justify. But we do want to identify Λαλxx and Λβλyy. Therefore we abandon this definition.

The correct definition of terms which allows for a variable convention

Assume a countably infinite set Vars of symbols which are considered as term variables without a type. By simultaneous induction define the sets Λ_{ρ} of typed terms of system F of type ρ and simultaneously define for every term r in any Λ_{ρ} the finite set FV(r) of typed term variables occurring free in r (overloading the previously defined FV for types) as follows:

(V) If x ∈ Vars, then (x, ρ) ∈ Λ_{ρ}. FV((x, ρ)) := {(x, ρ)}.
(→-I) If x ∈ Vars and r ∈ Λ_{σ}, then λ(x, ρ)r ∈ Λ_{ρ→σ}. FV(λ(x, ρ)r) := FV(r) \ {(x, ρ)}.
(→-E) If r ∈ Λ_{ρ→σ} and s ∈ Λ_{ρ}, then rs ∈ Λ_{σ}. FV(rs) := FV(r) ∪ FV(s).

(∀-I) If r ∈ Λ_{ρ} and α ∈ Typevars, then Λαr ∈ Λ_{∀αρ}, provided that α ∉ FV(σ) for any σ for which there is an x ∈ Vars such that (x, σ) ∈ FV(r). FV(Λαr) := FV(r).

(∀-E) If r ∈ Λ_{∀αρ} and σ ∈ Types, then rσ ∈ Λ_{ρ[α:=σ]}. FV(rσ) := FV(r).

This definition is again compatible with the renaming convention for bound type variables (the only critical case again being (∀-E)). The untyped term variable x in λ(x, ρ)r is considered to be bound by λ, and the type variable α in Λαr is considered to be bound by Λ. (Again we mean every occurrence inside r which is not bound deeper inside r.) We again do not distinguish between terms which only differ in the names of bound variables (term and type variables). This will be referred to as the variable convention (which of course relies on the renaming convention for bound type variables in types). E. g. if α and β are different type variables and x ∈ Vars and y ∈ Vars, then λ(x, α)(x, α) ∈ Λ_{α→α} and λ(y, β)(y, β) ∈ Λ_{β→β}. Therefore Λαλ(x, α)(x, α) ∈ Λ_{∀α.α→α} and Λβλ(y, β)(y, β) ∈ Λ_{∀β.β→β}. Because of the convention on identifying bound type variables in types, we have ∀α.α → α = ∀β.β → β which by compatibility implies Λ_{∀α.α→α} = Λ_{∀β.β→β}. The variable convention for term variables without types allows us to identify λ(x, α)(x, α) and λ(y, α)(y, α) and then the type variable convention identifies Λαλ(x, α)(x, α) and Λβλ(y, β)(y, β). Therefore we keep this definition. The simultaneous definition of FV on terms is compatible with the variable convention thanks to the proviso in the rule (∀-I), which is called the eigenvariable condition (as mentioned before).

Lemma 2.7 For every term r there is a unique type ρ with r ∈ Λ_{ρ}.

Proof Induction on r. _{□} As is usual we will use type superscripts for variables instead of the pair notation (x, ρ) and we also use them for terms instead of type subscripts as in Λ_{ρ}: From now on x^{ρ} is written instead of (x, ρ), and r^{ρ} ∈ Λ is written instead of r ∈ Λ_{ρ}. If r happens to be a variable we further abbreviate to r ∈ Λ thus avoiding twice the same superscript. Using these conventions we can restate the definition of terms (this time leaving out the definition of FV) as follows:

(V) If x ∈ Vars, then x^{ρ} ∈ Λ.

(→-I) If x ∈ Vars and r^{σ} ∈ Λ, then (λx^{ρ}r)^{ρ→σ} ∈ Λ.

(→-E) If r^{ρ→σ} ∈ Λ and s^{ρ} ∈ Λ, then (rs)^{σ} ∈ Λ.

(∀-I) If r^{ρ} ∈ Λ, then (Λαr)^{∀αρ} ∈ Λ, provided that α ∉ FV(σ) for any σ such that there is an x^{σ} in FV(r).

(∀-E) If r^{∀αρ} ∈ Λ, then (rσ)^{ρ[α:=σ]} ∈ Λ.

Unfortunately “Λ” is used as the name of the set of terms and also as the symbol for type abstraction. Nevertheless ambiguities cannot arise. If r is a term then r : ρ is defined to be the statement r ∈ Λ_{ρ}. r^{ρ} may either be used as synonymous to r : ρ or in place of r but implicitly introducing the unique ρ with r : ρ or imposing a restriction on r if ρ has previously been introduced. As for types we freely use parentheses to indicate the build-up of a term which again was not made explicit in the definition (as was promised in the section on types). The dot notation is also employed. Λ and λ are assumed to bind stronger than application, iterated term application (that is nested use of (→-E)) is associated to the left (i. e., rst means (rs)t) which fits perfectly with the right-associative → for types. If r : ρ → σ, we say that r is of arrow type. If r : ∀αρ, we speak of r as of universal type. We adopt the naming convention that x, y and z (also with decoration) always denote untyped term variables, and r, s and t denote terms. For every term r we define the finite set FTV(r) of type variables occurring free in r by recursion on r as follows:

(V) FTV(x^{ρ}) := FV(ρ).
(→-I) FTV(λx^{ρ}r) := FV(ρ) ∪ FTV(r).
(→-E) FTV(rs) := FTV(r) ∪ FTV(s).
(∀-I) FTV(Λαr) := FTV(r) \ {α}.
(∀-E) FTV(rσ) := FTV(r) ∪ FV(σ).

This definition is compatible with the variable convention.

Lemma 2.8 FV(ρ) ⊆ FTV(r^{ρ}).

Proof Induction on r. For the rule (∀-E) we need Lemma 2.3. _{□}

Lemma 2.9 x^{ρ} ∈ FV(r) ⇒ FV(ρ) ⊆ FTV(r).

Proof Induction on r. For the rule (∀-I) we use the proviso. _{□} Define the resulting term r[xρ⃗ := s⃗] of simultaneously substituting the finite list of terms sρ⃗ (i. e., s_{i} : ρ_{i}) for the (equally long) list of typed variables xρ⃗ (i. e., x_{i} : ρ_{i}) in r by recursion on r and simultaneously prove that r^{ρ}[xρ⃗ := s⃗] : ρ and that (compare Lemma 2.3) FV(r[xρ⃗ := s⃗]) = (FV(r) \ xρ⃗) ∪ ⋃{FV(s_{i})|x_{i}^{ρ_{i}} ∈ FV(r) ∧ x_{i}^{ρ_{i}} ≠ x_{j}^{ρ_{j}} for j < i} as follows:

(V) x^{ρ}[xρ⃗ := s⃗] := x^{ρ}, if x^{ρ} does not occur in the list xρ⃗.

x^{ρ}[xρ⃗ := s⃗] := s_{i}, if i is the smallest index such that x_{i}^{ρ_{i}} = x^{ρ}. Proof trivial. (→-I) (λx^{ρ}r)[xρ⃗ := s⃗] := λx^{ρ}.r[xρ⃗ := s⃗] where according to the variable convention and

the infinite supply of untyped term variables we assume that x^{ρ} is different from the xρ⃗ and does not occur free in any of the s⃗. The proof of the second claim uses the assumption.

(→-E) (rs)[xρ⃗ := s⃗] := r[xρ⃗ := s⃗]s[xρ⃗ := s⃗]. Proof obvious.

(∀-I) (Λαr)[xρ⃗ := s⃗] := Λα.r[xρ⃗ := s⃗], where we assume that α does not occur free in any of the terms s⃗. Λα.r[xρ⃗ := s⃗] is a term because of the assumption, Lemma 2.9, the second claim for r and the well-formedness of Λαr.

(∀-E) (rσ)[xρ⃗ := s⃗] := r[xρ⃗ := s⃗]σ. Proof obvious. This definition is compatible with the variable convention. The assumption in the rule (→-I) will be written as x^{ρ} ∉ xρ⃗ ∪ FV(s⃗) and gives us for x ≠ y

• (λx^{α}x^{α})[x^{α} := y^{α}] ≠ λx^{α}y^{α}

• (λx^{α}y^{α})[y^{α} := x^{α}] ≠ λx^{α}x^{α} The assumption in the rule (∀-I) will be written as α ∉ FTV(s⃗) and gives us for α ≠ β

• (Λαx^{β})[x^{β} := y^{∀αβ}α] ≠ Λα.y^{∀αβ}α

• (Λαx^{β})[x^{β} := y^{α→β}z^{α}] ≠ Λα.y^{α→β}z^{α}, where the object on the right is not even a term. For ease of reference we state Lemma 2.10 FV(r[xρ⃗ := s⃗]) = (FV(r) \ xρ⃗) ∪ ⋃{FV(s_{i})|x_{i}^{ρ_{i}} ∈ FV(r) ∧ x_{i}^{ρ_{i}} ≠ x_{j}^{ρ_{j}} for j < i}, which trivially implies FV(r[xρ⃗ := s⃗]) ⊆ (FV(r) \ xρ⃗) ∪ FV(s⃗). Proof Inside the definition. _{□} Lemma 2.11 If xρ⃗ ∩ FV(r) = ∅ then r[xρ⃗ := s⃗] = r. Proof Induction on r. _{□} Lemma 2.12 FTV(r[xρ⃗ := s⃗]) = FTV(r) ∪ ⋃{FTV(s_{i})|x_{i}^{ρ_{i}} ∈ FV(r) ∧ x_{i}^{ρ_{i}} ≠ x_{j}^{ρ_{j}} for j < i} Proof Induction on r. The proof is easy but tedious. The case (V) makes use of Lemma 2.8._{□} Lemma 2.13 If x^{ρ} ∉ xρ⃗ ∪ FV(s⃗), then (r[x^{ρ} := s])[xρ⃗ := s⃗] = (r[xρ⃗ := s⃗])[x^{ρ} := s[xρ⃗ := s⃗]]. Proof Induction on r. Note the similarity to Lemma 2.5. _{□} Lemma 2.14 If x^{ρ} ∉ xρ⃗ ∪ FV(s⃗), then r[xρ⃗, x^{ρ} := s⃗, s] = (r[xρ⃗ := s⃗])[x^{ρ} := s].

Proof Induction on r. Note the similarity to Lemma 2.6. _{□}

Define the resulting term r[α⃗ := σ⃗] of simultaneously substituting the finite list of types σ⃗ for the (equally long) list of type variables α⃗ in r by recursion on r and simultaneously prove that r^{ρ}[α⃗ := σ⃗] : ρ[α⃗ := σ⃗] and FV(r[α⃗ := σ⃗]) = {y^{τ[α⃗:=σ⃗]}|y^{τ} ∈ FV(r)} as follows:

(V) x^{ρ}[α⃗ := σ⃗] := x^{ρ[α⃗:=σ⃗]}. Proof trivial.

(→-I) (λx^{ρ}r)[α⃗ := σ⃗] := λx^{ρ[α⃗:=σ⃗]}.r[α⃗ := σ⃗], where we assume that for every x^{σ} ∈ FV(r) we have σ = ρ. Proof obvious for the first claim, the assumption is needed for the second claim when proving “⊇”.

(→-E) (rs)[α⃗ := σ⃗] := r[α⃗ := σ⃗]s[α⃗ := σ⃗]. Proof obvious.

(∀-I) (Λαr)[α⃗ := σ⃗] := Λα.r[α⃗ := σ⃗], where we assume that α is different from the α⃗ and does not occur free in any of the σ⃗ (as in the definition of (∀αρ)[α⃗ := σ⃗]). The proof of the first claim rests on this assumption, the other is obvious. Λα.r[α⃗ := σ⃗] is a term because of this assumption, the second claim for r, Lemma 2.3 and the well-formedness of Λαr.

(∀-E) (rσ)[α⃗ := σ⃗] := r[α⃗ := σ⃗]σ[α⃗ := σ⃗]. The proof of the first claim is easy by using Lemma 2.5, the other is obvious.

This definition is again compatible with the variable convention. Due to the assumption in the rule (→-I) we have for α ≠ β that (λx^{α}x^{β})[β := α] ≠ λx^{α}x^{α}. The assumption in (∀-I) gives for α ≠ β

• (Λαλx^{α}x^{α})[α := β] ≠ Λαλx^{β}x^{β}

• (Λαx^{β})[β := α] ≠ Λαx^{α}, where the object to the right is not even a term.

For ease of reference we state

Lemma 2.15 FV(r[α⃗ := σ⃗]) = {y^{τ[α⃗:=σ⃗]}|y^{τ} ∈ FV(r)}.

Proof Inside the definition. _{□}

Let “x ∉ FV(r)” be an abbreviation for “there is no x^{ρ} in FV(r)”. Hence, the lemma implies: x ∉ FV(r) ⇒ x ∉ FV(r[α⃗ := σ⃗]).

Lemma 2.16 If α⃗ ∩ FTV(r) = ∅ then r[α⃗ := σ⃗] = r.

Proof Induction on r. _{□}

Lemma 2.17 FTV(r[α⃗ := σ⃗]) = (FTV(r) \ α⃗) ∪ ⋃{FV(σ_{i})|α_{i} ∈ FTV(r) ∧ α_{i} ≠ α_{j} for j < i}.

Proof Induction on r. The proof is tedious but routine. The case (V) makes use of Lemma 2.3. _{□}

Lemma 2.18 If α ∉ α⃗ ∪ FV(σ⃗), then (r[α := σ])[α⃗ := σ⃗] = (r[α⃗ := σ⃗])[α := σ[α⃗ := σ⃗]].

Proof Induction on r. The proof makes use of Lemma 2.5 several times. _{□}

Lemma 2.19 If α ∉ α⃗ ∪ FV(σ⃗), then r[α⃗, α := σ⃗, σ] = (r[α⃗ := σ⃗])[α := σ].

Proof Induction on r. The proof makes use of Lemma 2.6 several times. _{□}

The following lemma allows to interchange type substitution and term substitution. The formulation is as general as possible. The only cases which are needed in the sequel are encapsulated in the two corollaries to the lemma. Readers who are not so much interested in substitution should simply check whether they can accept the statements made in the corollaries.

Lemma 2.20 (Interchange law for substitution) If for every x^{ρ} ∈ FV(r) and every i such that i is the minimal index with x^{ρ[α⃗:=σ⃗]} = x_{i}^{ρ_{i}[α⃗:=σ⃗]}, ρ = ρ_{i} holds, then

r[xρ⃗ := s⃗][α⃗ := σ⃗] = r[α⃗ := σ⃗][x^{ρ⃗[α⃗:=σ⃗]} := s⃗[α⃗ := σ⃗]].

Proof Induction on r. (V) Case x^{ρ}. If x^{ρ} ∈ xρ⃗, let i be the minimal index with x^{ρ} = x_{i}^{ρ_{i}}. Then x^{ρ}[xρ⃗ := s⃗][α⃗ := σ⃗] = s_{i}[α⃗ := σ⃗]. Due to the assumption on free variables, i is also the minimal index such that x^{ρ[α⃗:=σ⃗]} = x_{i}^{ρ_{i}[α⃗:=σ⃗]}. Therefore x^{ρ}[α⃗ := σ⃗][x^{ρ⃗[α⃗:=σ⃗]} := s⃗[α⃗ := σ⃗]] = s_{i}[α⃗ := σ⃗]. If x^{ρ} ∉ xρ⃗, then due to the assumption, x^{ρ[α⃗:=σ⃗]} ∉ x^{ρ⃗[α⃗:=σ⃗]}. The claim then follows from Lemma 2.11. (→-I) Case λx^{ρ}r. We may assume x^{ρ[α⃗:=σ⃗]} ∉ x^{ρ⃗[α⃗:=σ⃗]} ∪ FV(s⃗[α⃗ := σ⃗]) and that the following implication holds: x^{σ} ∈ FV(r) ∪ FV(s⃗) ⇒ σ = ρ. By using Lemma 2.15 and Lemma 2.10 we get

(λx^{ρ}r)[xρ⃗ := s⃗][α⃗ := σ⃗] = λx^{ρ[α⃗:=σ⃗]}.r[xρ⃗ := s⃗][α⃗ := σ⃗] and
(λx^{ρ}r)[α⃗ := σ⃗][x^{ρ⃗[α⃗:=σ⃗]} := s⃗[α⃗ := σ⃗]] = λx^{ρ[α⃗:=σ⃗]}.r[α⃗ := σ⃗][x^{ρ⃗[α⃗:=σ⃗]} := s⃗[α⃗ := σ⃗]].

Due to x^{ρ[α⃗:=σ⃗]} ∉ x^{ρ⃗[α⃗:=σ⃗]}, the induction hypothesis applies to r. (→-E) Case rs. Use the induction hypothesis. (∀-I) Case Λαr. We may assume that α ∉ α⃗ ∪ FV(σ⃗) ∪ FTV(s⃗). Using Lemma 2.17 we get

(Λαr)[xρ⃗ := s⃗][α⃗ := σ⃗] = Λα.r[xρ⃗ := s⃗][α⃗ := σ⃗] and
(Λαr)[α⃗ := σ⃗][x^{ρ⃗[α⃗:=σ⃗]} := s⃗[α⃗ := σ⃗]] = Λα.r[α⃗ := σ⃗][x^{ρ⃗[α⃗:=σ⃗]} := s⃗[α⃗ := σ⃗]].

The claim follows by the induction hypothesis. (∀-E) Case rσ. Use the induction hypothesis. _{□}

The condition in the lemma would be trivially satisfied if xρ⃗ ∪ FV(r) were compatible in the sense that if x^{ρ}, x^{σ} ∈ xρ⃗ ∪ FV(r) then ρ = σ. Call such a term r regular. Obviously, regularity is not closed under application of terms. If one wanted to enforce regularity everwhere application would have to be guarded by some compatibility requirement which would be nothing else than assuming the existence of a common variable context of x⃗ and the terms put together via application. Instead of having implicit contexts, one could then go one step further and have a type assignment system which in my view would give a one-sided sequent calculus instead of natural deduction^{3}.

Corollary 2.21 If α⃗ ∩ FV(ρ⃗) = ∅ and for every x^{ρ} ∈ FV(r), α⃗ ∩ FV(ρ) = ∅, then

r[xρ⃗ := s⃗][α⃗ := σ⃗] = r[α⃗ := σ⃗][xρ⃗ := s⃗[α⃗ := σ⃗]].

Proof Immediate from Corollary 2.2. _{□} Corollary 2.22 If for every σ, x^{σ} ∈ FV(r) implies σ = ρ, then

3The reader may decide whether is it worth having unrestricted application in the later chapters on inductive types at the price of unintuitive conditions in lemmas on substitution.

r[x^{ρ} := s][α⃗ := σ⃗] = r[α⃗ := σ⃗][x^{ρ[α⃗:=σ⃗]} := s[α⃗ := σ⃗]].

Proof Immediate from Lemma 2.20. _{□}

Terms r with FV(r) = ∅ are called closed terms. They may contain free type variables, i. e., FTV(r) ≠ ∅ is allowed for closed terms. Terms without free type variables have no special name. From now on we will use the names “variable convention” and “renaming convention” as synonyms. An immediate subterm of a term r is any term r′ which is explicitly mentioned as a term (by requiring r′ ∈ Λ) in the definition clause by which the term r is introduced in Λ, i. e., x^{ρ} has no immediate subterm, λx^{ρ}r has only the immediate subterm r, rs has exactly the immediate subterms r and s, Λαr has only the immediate subterm r and rσ also has only the immediate subterm r. The relation “is a subterm of” is defined as the transitive reflexive closure of “is an immediate subterm of”. As expected, the relation “is a proper subterm of” is defined as the transitive closure of “is an immediate subterm of”. The Curry-Howard isomorphism means on the term level that we see the term variables as symbols for proof assumptions, the typed term variables as assumptions of formulas and the typed terms as intuitionistic natural deduction proofs of their types seen as formulas. Hence, the term system of F “is” a proof system for intuitionistic (even minimal) second-order propositional logic (based on universal quantification over propositions and implication). The eigenvariable condition of (∀-I) is hence the standard condition of second-order propositional logic: In order to deduce ∀αρ from ρ we have to know that no assumption in the proof of ρ is dependent on α in the sense that α occurs free in the assumed formula.

2.1.3 Head form and normal forms

For terms r and finite lists s⃗ of typed terms and types we define when rs⃗ is defined and in that case a term it denotes by recursion on the length of the list as follows: If the list s⃗ is empty, rs⃗:=r. Otherwise s⃗ decomposes into the list s⃗_{−} and the last element of s⃗. rs⃗ is only defined if rs⃗_{−} is a term with type ρ → σ or ∀αρ. In the first case rs⃗ is defined iff the last element of s⃗ is a term s of type ρ, and set to (rs⃗_{−})s of type σ. In the second case rs⃗ is defined iff the last element of s⃗ is a type σ, and set to (rs⃗_{−})σ of type ρ[α := σ]. In case rs⃗ is defined, it is nothing but (⋯ (rs_{1}) ⋯ s_{n}), assuming s⃗ has n elements. It is trivial to see that this definition is compatible with the renaming convention. Whenever rs⃗ will be used as a term it is understood that r is a term and s⃗ is a finite list of typed terms and types such that rs⃗ is defined.

Lemma 2.23 If rs⃗ is a term and r′ is a term of the same type as r, r′s⃗ is a term of the same type as rs⃗.

Proof By induction on the definition. _{□}

Lemma 2.24 (Head form) Every term has exactly one of the following forms:

(V) x^{ρ}s⃗ (Terms of this form are called neutral.)

(→-I) λx^{ρ}r

(→-R) (λx^{ρ}r)ss⃗

(∀-I) Λαr
(∀-R) (Λαr)σs⃗

Proof Induction on terms (unicity is obvious). Consider e. g. the case (→-E): If r^{ρ→σ} has one of the forms (V), (→-R) or (∀-R), rs has the same form. Otherwise, by induction hypothesis and because r is of arrow type, r is of form (→-I), hence rs of form (→-R). _{□}

Define the set of terms in normal form NF as a subset of Λ by induction as follows:

(V) If x^{ρ}s⃗ is a term and the terms in s⃗ are in NF, then x^{ρ}s⃗ ∈ NF.

(→-I) If r ∈ NF, then λx^{ρ}r ∈ NF.

(∀-I) If Λαr is a term and r ∈ NF, then Λαr ∈ NF.

Most of the work in this thesis is concerned with proving strong normalization of β-reduction. The β-reduction relation of the next section is specifically aimed at allowing to transform any term of system F to a term in NF. The preceding lemma shows exactly what is gained by this transformation.

Lemma 2.25 If r ∈ NF and sρ⃗ ⊂ NF and s⃗ are neutral, then r[xρ⃗ := s⃗] ∈ NF.

Proof Induction on r ∈ NF. _{□}

Lemma 2.26 If r ∈ NF, then r[α⃗ := σ⃗] ∈ NF.

Proof Induction on r ∈ NF. _{□}

Lemma 2.27 If r ∈ NF and r′ is a subterm of r, then r′ ∈ NF.

Proof By induction on r ∈ NF (never using the induction hypothesis) show the statement for immediate subterms. _{□}

In order to facilitate extensions to the system we give an equivalent definition of rs⃗ as an inductive definition as follows:

(∅) r∅ := r.
(→-E) If rs⃗ : ρ → σ and s : ρ, then r(s⃗, s) := (rs⃗)s.
(∀-E) If rs⃗ : ∀αρ, then r(s⃗, σ) := (rs⃗)σ.

Of course, ∅ means the empty list and (s⃗, object) means the “consed” list. The inductive definition seems to be more natural than the recursive one, and it is obviously equivalent. (The well-definedness rests on the fact that the rules are mutually exclusive.) If s⃗ : ρ⃗ and rs⃗ : ρ it is convenient to write the type of r as ρ⃗ → ρ. More formally, we (inductively) define ∅ → ρ := ρ and (ρ⃗, ρ) → σ := ρ⃗ → (ρ → σ).

2.1.4 Reduction

Define a binary relation ↦ on terms by giving the only cases where it holds as follows:

\begin{matrix}(β_{→}) & (λx^{ρ}r)s ↦ & r[x^{ρ} := s] \\ (β_{∀}) & (Λαr)σ ↦ & r[α := σ] \end{matrix}

Of course, we assume that the objects in the rules are terms. It is an important property of the rules that if the object to the left is a term then the object to the right is also a term, and moreover that it has the same type. If r ↦ r′ we say that r reduces to r′ by one outer application of one of the β reduction rules. The terms on the left are called β-redices, the terms on the right their contracta. Define a binary relation →_{whd} on terms by the following rule: If r ↦ r′ and rs⃗ is a term, then rs⃗ →_{whd} r′s⃗. The relation →_{whd} is called weak head reduction. Due to Lemma 2.23 r′s⃗ is also a term and of the same type as rs⃗. Notice that exactly those terms allow weak head reduction which are listed in rules with an “R” in the name in the lemma on the head form. Inductively define a binary relation → on terms^{4} (and prove that if r → r′, then r and r′ have the same type and FV(r′) ⊆ FV(r)) by the following rules:

(β) If r ↦ r′, then r → r′.
(→-I) If r → r′, then λx^{ρ}r → λx^{ρ}r′.
(→-E) If r → r′, then rs → r′s. If s → s′, then rs → rs′.
(∀-I) If r → r′, then Λαr → Λαr′.
(∀-E) If r → r′, then rσ → r′σ.

(The proof for the clause (β) uses Lemma 2.10, Lemma 2.15 and the eigenvariable condition. The other proofs are obvious.) If r → r′ we say that r reduces to r′ by one application of one of the β reduction rules. We also describe this situation by saying that r reduces to r′ in one step. The fact that r′ has type ρ if r has type ρ is often (especially in type assignment systems) called the subject reduction property. From the proof-theoretic perspective (via the Curry-Howard isomorphism) the reduction relation is completely justified by type-preservation and the fact that the set of free variables is (weakly) decreasing: The reduction transforms proofs of a fixed formula without introducing new assumptions and without changing the assumed formulas (more precisely, without changing the assumption formulas of the assumptions remaining in the proof). In the formulation above one should have been more careful in order to express that if r → r′ the well-formedness of r′ follows from the well-formedness of r. In the case (∀-I) the additional claim FV(r′) ⊆ FV(r) is used to guarantee this implication. This gives a better operational reading to the reduction relation: We may actually calculate with terms by applying β-reduction and do not have to check well-formedness over and over again. Routinely we observe that the relations ↦, →_{whd} and → are compatible with the renaming convention.

Lemma 2.28 If r → r′, then FTV(r′) ⊆ FTV(r).

Proof Induction on the definition of →. The proof for clause (β) needs Lemma 2.12 and Lemma 2.17. _{□} Define the reducing eliminations Ê_{→} and Ê_{∀} by setting

4This shall mean that every clause has the implicit condition that every expression is in fact a term. Therefore, in (→-E) we do not explicitly require that the types of r and s fit together, in (∀-I) we do not explicitly impose the proviso and in (∀-E) we do not state that r is of universal type.

r^{ρ→σ}Ê_{→}s^{ρ} := \{ \begin{matrix}t[x^{ρ} := s] & , if r = λx^{ρ}t^{σ} \\ rs & , else \end{matrix}
r^{∀αρ}Ê_{∀}σ := \{ \begin{matrix}t[α := σ] & , if r = Λαt^{ρ} \\ rσ & , else \end{matrix}

Hence, rs(= ∪ ↦)rÊ_{→}s and rσ(= ∪ ↦)rÊ_{∀}σ.

Lemma 2.29 If r ∈ NF and s neutral and s ∈ NF and rÊ_{→}s is defined, then rÊ_{→}s ∈ NF. If r ∈ NF and rÊ_{∀}σ is defined, then rÊ_{∀}σ ∈ NF.

Proof Use case distinction on r ∈ NF and Lemma 2.25 and Lemma 2.26. _{□}

Define the relation →^{∗} as the reflexive transitive closure of → and the relation →^{+} as the transitive closure of →. If r →^{∗} r′ holds we say that r reduces in finitely many steps to r′, and if r →^{+} r′ holds we say that r reduces in at least one step to r′.

Lemma 2.30 If r →^{∗} r′, then FV(r′) ⊆ FV(r), FTV(r′) ⊆ FTV(r) and r and r′ have the same type.

Proof Trivial consequence of the respective statements for →. _{□}

Lemma 2.31 If r → r′, then r[xρ⃗ := s⃗] → r′[xρ⃗ := s⃗] and r[α⃗ := σ⃗] → r′[α⃗ := σ⃗]. If s → s′, then r[x^{ρ} := s] →^{∗} r[x^{ρ} := s′] (the number of steps is the number of free occurrences of x^{ρ} in r).

Proof Induction on the definition of → for the first two statements using Corollary 2.21, Corollary 2.22, Lemma 2.13 and Lemma 2.18 (nearly everything we know on interchange of substitutions) for the initial cases of the definition of →. The last statement is easily proved by induction on r. _{□}

Define nf := {r ∈ Λ|∀r′.r ↛ r′} as the set of normal terms with respect to →. Define the set of weakly normalizing terms wn := {r ∈ Λ|∃r′ ∈ nf.r →^{∗} r′}. Inductively define the set sn of strongly normalizing terms (with respect to →) by the following clause:

If for every term r′ with r → r′ we have r′ ∈ sn, then r ∈ sn.

This is a strictly positive inductive definition because in the premise of the clause a reference to sn is only made on the right side of a nonnested implication. The definition of sn even is an accessibility inductive definition [BFPS81, p. 22] and hence sn the accessible part of →.

Lemma 2.32 sn is the set of terms r for which there is no infinite reduction sequence

r → r_{1} → r_{2} → …

Proof ⊆: By induction on r ∈ sn show that r has no infinite reduction sequence. Assume an infinite reduction sequence r → r_{1} → r_{2} → r_{3} → … This gives an infinite reduction sequence r_{1} → r_{2} → r_{3} → … which is impossible by induction hypothesis. ⊇: This is an instance of the principle of bar induction [Fef77, p. 942] which says that wellfoundedness of a relation implies the principle of (transfinite) induction over this relation: Simply show that {r′|r →^{∗} r′} ⊆ sn by induction over → which is wellfounded on {r′|r →^{∗} r′} by assumption. (The principle itself is very easily proved in classical set theory.) _{□} It will turn out that the use of the inductively defined set sn via induction makes proofs more elegant than those which directly refer to the non-existence of infinite reduction sequences^{5}. These definitions will be used for any reduction relation → on terms. If every term of a system is strongly normalizing w.r.t. →, then the system is called strongly normalizing w.r.t. →. If → is the canonical reduction relation for that system then we say that the system is strongly normalizing. In this thesis → is always reserved for the reduction relation generated from βreduction and every system which gets a name is strongly normalizing (cf. chapter 9).

Lemma 2.33 If r ∈ nf and r′ is a subterm of r, then r′ ∈ nf.

Proof By induction on r show the statement for immediate subterms. _{□}

Lemma 2.34 nf = NF, i. e., the normal terms are the terms in normal form.

Proof ⊆: Induction on r using Lemma 2.33 and making case analysis according to the head form. ⊇: Induction on r ∈ NF. _{□}

Define the set WN ⊆ Λ inductively as follows:

(V) If x^{ρ}s⃗ is a term and the terms in s⃗ are in WN, then x^{ρ}s⃗ ∈ WN.

(→-I) If r ∈ WN, then λx^{ρ}r ∈ WN.

(β_{→}) If (λx^{ρ}r)ss⃗ is a term and r[x^{ρ} := s]s⃗ ∈ WN, then (λx^{ρ}r)ss⃗ ∈ WN.

(∀-I) If Λαr is a term and r ∈ WN, then Λαr ∈ WN.

(β_{∀}) If (Λαr)σs⃗ is a term and r[α := σ]s⃗ ∈ WN, then (Λαr)σs⃗ ∈ WN.

Lemma 2.35 WN ⊆ wn.

Proof Induction on WN using Lemma 2.34. _{□}

Note that due to the unicity statement in the lemma on the head form, the definition of WN is well-parsed in the sense, that any term can only enter WN by using a uniquely determined clause with uniquely determined ingredients earlier entered into WN. Therefore, we may define functions on WN by recursion on the definition. Define the normalizing function Ω as a function from WN to Λ by recursion on WN and simultaneously prove that r →^{∗} Ω(r) ∈ NF for r ∈ WN (thus ensuring type coincidence and compatibility with the variable convention) as follows:

(V) Ω(x^{ρ}s⃗) := x^{ρ}Ω(s⃗), where Ω(s⃗) is the list of elements Ω(s_{i}) (setting Ω(σ) := σ).

(→-I) Ω(λx^{ρ}r) := λx^{ρ}Ω(r).

(β_{→}) Ω((λx^{ρ}r)ss⃗) := Ω(r[x^{ρ} := s]s⃗).
(∀-I) Ω(Λαr) := ΛαΩ(r).
(β_{∀}) Ω((Λαr)σs⃗) := Ω(r[α := σ]s⃗).

5In [Alt93b] the use of sn is seen as “one of the main technical contributions which simplify the formalization of the proof” (p. 18) of strong normalization of system F. Note that it would be quite cumbersome to formalize the notion of infinite reduction sequences and the height of a reduction tree in a system of computer-assisted proof development such as LEGO (see the citations in [Alt93b]).

The proofs are always obvious. For reference purposes we formulate

Lemma 2.36 For every r ∈ WN, r →^{∗} Ω(r) ∈ NF.

Proof Inside the definition. _{□}

The function Ω may be seen as providing a “big step semantics” for the terms.

Lemma 2.37 There is no closed term of type ∀αα in WN.

Proof Assume a closed term r^{∀αα} ∈ WN. Then Ω(r) ∈ NF, and Ω(r) is also a closed term of type ∀αα (due to Lemma 2.30). It is immediate from the definition of NF that therefore Ω(r) = Λαs for a closed term s^{α} ∈ NF. Such a term s does not exist (again due to the definition of NF). _{□}

Define the set SN ⊆ Λ inductively as follows:

(V) If x^{ρ}s⃗ is a term and the terms in s⃗ are in SN, then x^{ρ}s⃗ ∈ SN.

(→-I) If r ∈ SN, then λx^{ρ}r ∈ SN.

(β_{→}) If (λx^{ρ}r)ss⃗ is a term, s ∈ SN and r[x^{ρ} := s]s⃗ ∈ SN, then (λx^{ρ}r)ss⃗ ∈ SN.

(∀-I) If Λαr is a term and r ∈ SN, then Λαr ∈ SN.

(β_{∀}) If (Λαr)σs⃗ is a term and r[α := σ]s⃗ ∈ SN, then (Λαr)σs⃗ ∈ SN.

Lemma 2.38 SN ⊆ WN.

Proof Trivial induction on SN. _{□}

Lemma 2.39 sn ⊆ wn.

Proof Induction on sn: Let r ∈ sn. Assume the induction hypothesis that for all r′ with r → r′ we already have r′ ∈ wn. Either r ∈ nf ⊆ wn or there is an r′ with r → r′. By assumption we have an r′′ ∈ nf with r′ →^{∗} r′′, hence r →^{∗} r′′ ∈ nf and therefore r ∈ wn. (Note that this proof does not at all inspect the relation →.) _{□}

In chapter 9 we show that SN ⊆ sn and that SN = Λ, implying that sn = WN = wn = Λ and making the function Ω to a normalizing function for every term. (I like to call this naïve reduction-free normalization because the definition of Ω does not depend on the notion of reduction, but clearly models head reduction. Compare also [CV97].) Without this knowledge a standardization theorem (see e. g. [Bar84]) would be needed in order to prove WN = wn. We show that also without this knowledge we get sn ⊆ SN. We need a further definition. For every term r ∈ sn define the height ν(r) ∈ ℕ by induction on r ∈ sn as follows:

ν(r) := max{1 + ν(r′)|r → r′},

where max ∅ := 0. This is well-defined because there are always only finitely many terms to which r reduces in one step.

Lemma 2.40 If r ∈ sn and r′ is a subterm of r, we have r′ ∈ sn and ν(r′) ≤ ν(r).

Proof By induction on r ∈ sn show the statement for immediate subterms (doing case analysis according to the definition of immediate subterms). _{□}

Lemma 2.41 r ∈ sn implies r ∈ SN.

Proof Main induction on ν(r) and side induction on r employing case analysis according to the head form of r using Lemma 2.40 everywhere: (V) Case x^{ρ}s⃗. For every term s_{i}, we have ν(s_{i}) ≤ ν(x^{ρ}s⃗). By the side induction hypothesis, s_{i} ∈ SN, hence x^{ρ}s⃗ ∈ SN. (→-I) Case λx^{ρ}r. ν(r) ≤ ν(λx^{ρ}r). By the side induction hypothesis, r ∈ SN, hence λx^{ρ}r ∈ SN. (→-R) Case (λx^{ρ}r)ss⃗. ν(r[x^{ρ} := s]s⃗) < ν((λx^{ρ}r)ss⃗). By the main induction hypothesis, we get r[x^{ρ} := s]s⃗ ∈ SN. ν(s) ≤ ν((λx^{ρ}r)ss⃗). By the side induction hypothesis, s ∈ SN. Altogether (λx^{ρ}r)ss⃗ ∈ SN. (∀-I) and (∀-R) are somewhat easier to prove. _{□}

It should be remarked that sn ⊆ SN is true irrespective of types and hence could also be proved in a type-free version of the system. It will later (cf. chapter 9) turn out that the same is true for SN ⊆ sn. (Of course, one has to distinguish the ∀-elimination by some device as e. g. a constant symbol expressing any type.) It should also be remarked that ν is only used for ease of presentation. If → were infinitely branching a more careful analysis would also allow to prove the preceding lemma. We conclude this section by giving a typical application of normalization, i. e., of the fact that WN = Λ to be proved in chapter 9. The proof of the following lemma does not use it, but its corollary does.

Lemma 2.42 If there is a closed term of type peirce(ρ)^{6} := ((α → ρ) → α) → α in NF, then there is a closed term of type α → ρ.

Proof Let r^{peirce(ρ)} ∈ NF be closed. r is not of the form x^{σ}s⃗ because it is closed. Hence, r = λx^{(α→ρ)→α}s^{α} with s ∈ NF and FV(s) ⊆ {x^{(α→ρ)→α}}. Because α is not composed, s = y^{σ}s⃗. Because FV(s) ⊆ {x^{(α→ρ)→α}}, y^{σ} = x^{(α→ρ)→α} and hence s = x^{(α→ρ)→α}t^{α→ρ} for t ∈ NF with FV(t) ⊆ {x^{(α→ρ)→α}}. If t = z^{τ} t⃗, then z^{τ} = x^{(α→ρ)→α} and hence t = x^{(α→ρ)→α}t_{1} which is not type-correct. Therefore t = λz^{α}u^{ρ} with u ∈ NF and FV(u) ⊆ {x^{(α→ρ)→α}, z^{α}}. Consider u′ := u[x^{(α→ρ)→α} := λh^{α→ρ}.z^{α}]. u′ : ρ and FV(u′) ⊆ {z^{α}}. Hence, λz^{α}u′ is a closed term of type α → ρ. _{□}

Corollary 2.43 If Λ = WN, then there is no closed term of type peirce(β) for β ≠ α.

Proof If there were a closed r^{peirce(ρ)} ∈ Λ = WN, then Ω(r) ∈ NF closed and of the same type. By the preceding lemma, there would be a closed term s^{α→β}. Then by Λ = WN, (Ω(s))^{α→β} ∈ NF and closed. Therefore, Ω(s) cannot have the form x^{ρ}s⃗ and hence Ω(s) = λx^{α}t with t^{β} ∈ NF and FV(t) ⊆ {x^{α}}. Because the type of t is not composed, t has to be of the form y^{ρ}t⃗ and due to FV(t) ⊆ {x^{α}}, y^{ρ} = x^{α}. But this is incompatible with t : β ≠ α. Contradiction. _{□}

Acknowledgement: The idea of using such a characterization of the set of strongly normalizing terms (at least for the untyped λ-calculus) was brought to my attention by [vRS95] and [Loa95]. The idea of using WN and Ω came from an attempt to “re-engineer” the typed operational semantics in [Gog94] for the case of simply-typed lambda calculus^{7}.

6The name stems from the Peirce formula ((p → q) → p) → p in first-order propositional logic where p and q are atoms. Although classically true it is not provable in intuitionistic logic.

7In dependent type theory as studied in [Gog94] one cannot separate the definitions of WN and Ω which makes typed operational semantics much more interesting. The essence of typed operational semantics is also shown in [Gog95] for the case of simply-typed lambda calculus.

2.2 The system eF which extends F by the types 0, 1, pairs and sums

We introduce some standard type constructs although they may be encoded in F even preserving reduction (section 2.2.6). In later extensions this is not always possible (even not in PIT). Moreover, the encoding is essentially impredicative (not only does it use the universal quantifier but it also destroys strict positivity as defined in section 3.2). Finally, η-reduction would not be preserved by the embedding, and + gives rise to additional rewrite rules such as permutative conversions^{8} (called commuting conversions in [GLT89] and studied at length in [Pra71]; an alternative normalization proof is given in [Lei75] and yet another in [Joa97]).

2.2.1 Types

The type system of eF is defined by adding the following clauses to the inductive definition of Types for F:

(0) 0 ∈ Types.

(1) 1 ∈ Types.

(×) If ρ ∈ Types and σ ∈ Types, then ρ × σ ∈ Types.

(+) If ρ ∈ Types and σ ∈ Types, then ρ + σ ∈ Types.

The renaming convention will be followed as for system F as well as the dot notation. We assume that ∀ binds stronger than all the binary connectives and that + and × bind stronger than →. The definition of free variables of a type is extended in the expected way by the following clauses:

(0) FV(0) := ∅.
(1) FV(1) := ∅.
(×) FV(ρ × σ) := FV(ρ) ∪ FV(σ).
(+) FV(ρ + σ) := FV(ρ) ∪ FV(σ).

The definition remains compatible with the renaming convention. The definition of ρ[α⃗ := σ⃗] is extended by the following clauses (as expected):

(0) 0[α⃗ := σ⃗] := 0.
(1) 1[α⃗ := σ⃗] := 1.
(×) (ρ × σ)[α⃗ := σ⃗] := ρ[α⃗ := σ⃗] × σ[α⃗ := σ⃗].
(+) (ρ + σ)[α⃗ := σ⃗] := ρ[α⃗ := σ⃗] + σ[α⃗ := σ⃗].

It is again compatible with the renaming convention. We adopt the same naming convention. It is very easy to see that the statements on types given for system F are also true for eF.

8It is possible to extend the normalization proofs as presented in this thesis to also cover permutative conversions in a modular fashion.

2.2.2 Terms

The definition of typed terms and their free variables for system F is extended by the following clauses:

(0-E) If r ∈ Λ_{0}, then rρ ∈ Λ_{ρ}. FV(rρ) := FV(r).
(1-I) IN1 ∈ Λ_{1}. FV(IN1) := ∅.
(×-I) If r ∈ Λ_{ρ} and s ∈ Λ_{σ}, then ⟨r, s⟩ ∈ Λ_{ρ×σ}. FV(⟨r, s⟩) := FV(r) ∪ FV(s).

(×-E) If r ∈ Λ_{ρ×σ}, then rL ∈ Λ_{ρ} and rR ∈ Λ_{σ}. FV(rL) := FV(r) and FV(rR) := FV(r).

(+-I) If r ∈ Λ_{ρ}, then INL_{σ}r ∈ Λ_{ρ+σ}. FV(INL_{σ}r) := FV(r). If r ∈ Λ_{σ}, then INR_{ρ}r ∈ Λ_{ρ+σ}.

FV(INR_{ρ}r) := FV(r).

(+-E) If r ∈ Λ_{ρ+σ}, s ∈ Λ_{ρ→τ} and t ∈ Λ_{σ→τ}, then rst ∈ Λ_{τ}. FV(rst) := FV(r) ∪ FV(s) ∪

FV(t).

We will adopt all the conventions which were introduced for system F. If r : ρ × σ, we say that r is of product type. If r : ρ + σ, we say that r is of sum type. Notice that without typing information on the subterms we cannot see which elimination rule (a rule which has an “E” in the name) is used. Ambiguities would e. g. arise with x^{∀αα}α and x^{0}α (both in Λ_{α}) or with x^{(α→γ)→(β→γ)→γ}y^{α→γ}z^{β→γ} and x^{α+β}y^{α→γ}z^{β→γ} (both in Λ_{γ}) if the type of x is not shown. This phenomenon becomes a problem when one wants to speak about a term of the form rρ or of the form rst. In definitions by recursion on the definition of terms the problem is avoided by stating the name of the rule. As there are other ways of using terms we introduce a notation for eliminations. The definition of terms may as for system F be rewritten as follows (again leaving out the simultaneous definition of FV for terms):

(V) If x ∈ Vars, then x^{ρ} ∈ Λ.

(→-I) If x ∈ Vars and r^{σ} ∈ Λ, then (λx^{ρ}r)^{ρ→σ} ∈ Λ.

(→-E) If r^{ρ→σ} ∈ Λ and s^{ρ} ∈ Λ, then (rs)^{σ} ∈ Λ; also written as rE_{→}s.

(∀-I) If r^{ρ} ∈ Λ, then (Λαr)^{∀αρ} ∈ Λ, provided that α ∉ FV(σ) for any σ such that there is an x^{σ} in FV(r).

(∀-E) If r^{∀αρ} ∈ Λ, then (rσ)^{ρ[α:=σ]} ∈ Λ; also written as rE_{∀}σ.

(0-E) If r^{0} ∈ Λ, then (rρ)^{ρ} ∈ Λ; also written as rE_{0}ρ.

(1-I) IN1^{1} ∈ Λ.

(×-I) If r^{ρ} ∈ Λ and s^{σ} ∈ Λ, then ⟨r, s⟩^{ρ×σ} ∈ Λ.

(×-E) If r^{ρ×σ} ∈ Λ, then (rL)^{ρ} ∈ Λ and (rR)^{σ} ∈ Λ; also written as rE_{×}L and E_{×}R.

(+-I) If r^{ρ} ∈ Λ, then (INL_{σ}r)^{ρ+σ} ∈ Λ. If r^{σ} ∈ Λ, then (INR_{ρ}r)^{ρ+σ} ∈ Λ.

(+-E) If r^{ρ+σ} ∈ Λ, s^{ρ→τ} ∈ Λ and t^{σ→τ} ∈ Λ, then (rst)^{τ} ∈ Λ; also written as rE_{+}τst or

shorter rE_{+}st.

Extend the recursive definition of FTV(r) by the following clauses (as expected):

(0-E) FTV(rρ) := FTV(r) ∪ FV(ρ).

(1-I) FTV(IN1) := ∅.

(×-I) FTV(⟨r, s⟩) := FTV(r) ∪ FTV(s).

(×-E) FTV(rL) := FTV(r). FTV(rR) := FTV(r).

(+-I) FTV(INL_{σ}r) := FV(σ) ∪ FTV(r). FTV(INR_{ρ}r) := FV(ρ) ∪ FTV(r).

(+-E) FTV(rst) := FTV(r) ∪ FTV(s) ∪ FTV(t).

The definition of r[xρ⃗ := s⃗] together with the proof of r^{ρ}[xρ⃗ := s⃗] : ρ and FV(r[xρ⃗ := s⃗]) = (FV(r) \ xρ⃗) ∪ ⋃{FV(s_{i})|x_{i}^{ρ_{i}} ∈ FV(r) ∧ x_{i}^{ρ_{i}} ≠ x_{j}^{ρ_{j}} for j < i} (i. e., the statement of Lemma 2.10) is extended by the following clauses:

(0-E) (rρ)[xρ⃗ := s⃗] := r[xρ⃗ := s⃗]E_{0}ρ. Proof obvious.

(1-I) IN1[xρ⃗ := s⃗] := IN1. Proof trivial.

(×-I) ⟨r, s⟩[xρ⃗ := s⃗] := ⟨r[xρ⃗ := s⃗], s[xρ⃗ := s⃗]⟩. Proof obvious.

(×-E) (rL)[xρ⃗ := s⃗] := r[xρ⃗ := s⃗]L, (rR)[xρ⃗ := s⃗] := r[xρ⃗ := s⃗]R. Proof obvious.

(+-I) (INL_{σ}r)[xρ⃗ := s⃗] := INL_{σ}r[xρ⃗ := s⃗], (INR_{ρ}r)[xρ⃗ := s⃗] := INR_{ρ}r[xρ⃗ := s⃗]. Proof obvious.

(+-E) (rst)[xρ⃗ := s⃗] := r[xρ⃗ := s⃗]E_{+}s[xρ⃗ := s⃗]t[xρ⃗ := s⃗]. Proof obvious.

Note that the new rules are in itself unproblematic but that the above statements have to be proved simultaneously in order to deal with the rules of system F not shown again. The definition of r[α⃗ := σ⃗] together with the proof of r^{ρ}[α⃗ := σ⃗] : ρ[α⃗ := σ⃗] and FV(r[α⃗ := σ⃗]) = {y^{τ[α⃗:=σ⃗]}|y^{τ} ∈ FV(r)} is extended by the following clauses:

(0-E) (rρ)[α⃗ := σ⃗] := r[α⃗ := σ⃗]E_{0}ρ[α⃗ := σ⃗]. Proof obvious.

(1-I) IN1[α⃗ := σ⃗] := IN1. Proof trivial.

(×-I) ⟨r, s⟩[α⃗ := σ⃗] := ⟨r[α⃗ := σ⃗], s[α⃗ := σ⃗]⟩. Proof obvious.

(×-E) (rL)[α⃗ := σ⃗] := r[α⃗ := σ⃗]L, (rR)[α⃗ := σ⃗] := r[α⃗ := σ⃗]R. Proof obvious.

(+-I) (INL_{σ}r)[α⃗ := σ⃗] := INL_{σ[α⃗:=σ⃗]}r[α⃗ := σ⃗], (INR_{ρ}r)[α⃗ := σ⃗] := INR_{ρ[α⃗:=σ⃗]}r[α⃗ := σ⃗]. Proof obvious.

(+-E) (rst)[α⃗ := σ⃗] := r[α⃗ := σ⃗]E_{+}s[α⃗ := σ⃗]t[α⃗ := σ⃗]. Proof obvious.

Note that the families of term-forming constructs (INL_{ρ})_{ρ} and (INR_{ρ})_{ρ} are polymorphic in the sense that type substitution on terms also affects those indices. The statements made in section 2.1.2 are valid in eF, too. The general definition of immediate subterms of a term gives the following extension for system eF: IN1 has no immediate subterm, rE_{0}ρ, rL, rR, INL_{σ}r and INR_{ρ}r have only the immediate subterm r, ⟨r, s⟩ has exactly the immediate subterms s and t and rE_{+}st has exactly the immediate subterms r, s and t. Let us interpret eF via the Curry-Howard isomorphism: The type 0 represents ⊥, 1 stands for ⊤, × for ∧ and + for ∨. The term formation rules are all valid in intuitionistic second-order propositional logic and give a natural deduction proof system. The reading as a proof system hopefully makes it easier to accept my decision to write eliminations as application: The main premise is written to the left, the side premisses are written to the right. And the terms are simply a linear notation for the deduction trees.

2.2.3 Head form and normal forms

For terms r and finite lists s⃗ of typed terms and types and symbols L and R we define when rs⃗ is defined and in that case a term it denotes by adding the following clauses to the inductive definition given for system F:

(0-E) If rs⃗ : 0, then r(s⃗, ρ) := (rs⃗)ρ.
(×-E) If rs⃗ : ρ × σ, then r(s⃗, L) := (rs⃗)L and r(s⃗, R) := (rs⃗)R.
(+-E) If rs⃗ : ρ + σ, s : ρ → τ and t : σ → τ, then r(s⃗, s, t) := (rs⃗)st.

We will use the same convention for rs⃗ as before. The statement of Lemma 2.23 hold also true for eF. Lemma 2.24 has to be extended to:

Lemma 2.44 (Head form) Every term has exactly one of the following forms:

(V) x^{ρ}s⃗
(→-I) λx^{ρ}r
(→-R) (λx^{ρ}r)ss⃗
(∀-I) Λαr
(∀-R) (Λαr)σs⃗
(1-I) IN1
(×-I) ⟨r, s⟩
(×-R) ⟨r, s⟩Ls⃗, ⟨r, s⟩Rs⃗
(+-I) INL_{ρ}r, INR_{ρ}r
(+-R) INL_{ρ}rsts⃗, INR_{ρ}rsts⃗

Proof Induction on terms (unicity again being obvious). Consider e. g. the case (→-E): If r^{ρ→σ} has one of the forms (V), (→-R), (∀-R), (×-R) or (+-R), rs has the same form. Otherwise, by induction hypothesis and because r is of arrow type, r is of form (→-I), hence rs of form (→-R). _{□}

Extend the inductive definition of the set NF for system F by the following clauses:

(1-I) IN1 ∈ NF.
(×-I) If r ∈ NF and s ∈ NF, then ⟨r, s⟩ ∈ NF.
(+-I) If r ∈ NF, then INL_{ρ}r ∈ NF and INR_{ρ}r ∈ NF.

The statements made in section 2.1.3 are valid in eF, too. A general remark concerning the proofs of statements which are interpreted in an extended system is in order. If e. g. the statement of Lemma 2.25 is proved for system eF also by induction on r ∈ NF, one has to consider all the defining clauses for NF in eF. The clauses for NF of system F appear verbatim in the definition of NF for eF, but they have a different interpretation simply because their variables are ranging over a larger domain. This does no harm to the validity of the respective clauses in the proof as they also can simply be reinterpreted as ranging over this larger domain. But this reinterpretation is not always possible, e. g. if in the original proof clauses a case analysis on the terms is carried out. Then a “quadratic effect” on the proof urges us to extend the proof clauses to the new system and add completely new clauses. In my presentation there is hardly any such “quadratic reasoning” because embedded analyses are normally carried out beforehand and encapsulated in a lemma which has to be extended to the larger system before extending the lemma in consideration. Lemma 2.44 shows a different phenomenon. The statement of Lemma 2.24 had to be extended to cover eF. Its proof by induction on terms has the additional clauses of the extended term definition, and the proof clauses corresponding to the term definition of system F have to be redone in order to capture the new statement. But as was shown in the proof in the case of (→-E), this extension did not need any new arguments. If one used the expression “of any of the forms with an R in the name” the original proof clause would not have needed any change. Therefore, I consider this extension not to be “quadratic” in the following

Meta-Convention on Extensions: If a proof of a statement in the extension of a system is not explicitly given and the statement is the same as that for the original system or an extension of a statement in the original system, only “non-quadratic reasoning” will be needed for the proof. (This is nothing but a promise by the author clarifying the words “analogous” and “similar” which are thus avoided for system extensions.)

2.2.4 Reduction

Define the binary relation ↦ on terms by giving the only cases where it holds as follows:

(β_{→})  (λx^{ρ}r)s ↦ r[x^{ρ} := s]
(β_{∀})  (Λαr)σ ↦ r[α := σ]
(β_{×})  ⟨r, s⟩L ↦ r
⟨r, s⟩R ↦ s
(β_{+})  INL_{ρ}rst ↦ sr
INR_{ρ}rst ↦ tr

As for system F the objects on the right side are automatically terms if the respective object on the left is a term, and the types are equal. The relation →_{whd} is defined as for system F and has the same properties as stated there. Extend the inductive definition of the relation → for system F by the following clauses (and prove that if r → r′, then r and r′ have the same type and FV(r′) ⊆ FV(r)):

(0-E) If r → r′, then rρ → r′ρ.
(×-I) If r → r′, then ⟨r, s⟩ → ⟨r′, s⟩. If s → s′, then ⟨r, s⟩ → ⟨r, s′⟩.
(×-E) If r → r′, then rL → r′L and rR → r′R.
(+-I) If r → r′, then INL_{ρ}r → INL_{ρ}r′ and INR_{ρ}r → INR_{ρ}r′.

(+-E) If r → r′, then rst → r′st. If s → s′, then rst → rs′t. If t → t′, then rst → rst′.

(The proofs were trivial. See also footnote 4 concerning well-formedness.) In the light of the Curry-Howard isomorphism the reduction rules are again completely justified by the two properties which we just proved simultaneously with the definition: They are valid proof transformation rules.

Define the reducing eliminations Ê_{→} and Ê_{∀} as before and set

r^{ρ×σ}Ê_{×}L := \{ \begin{matrix}s & , if r = ⟨s^{ρ}, t^{σ}⟩ \\ rE_{×}L & , else \end{matrix}
r^{ρ×σ}Ê_{×}R := \{ \begin{matrix}t & , if r = ⟨s^{ρ}, t^{σ}⟩ \\ rE_{×}R & , else \end{matrix}

Hence, rE_{×}L(= ∪ ↦)rÊ_{×}L and rE_{×}R(= ∪ ↦)rÊ_{×}R. The statement of Lemma 2.29 is true for eF.

Lemma 2.45 If r^{ρ×σ} ∈ NF, then rÊ_{×}L ∈ NF and rÊ_{×}R ∈ NF.

Proof Use case distinction on r ∈ NF. _{□}

Define the reducing +-elimination Ê_{+} by

r^{ρ+σ}Ê_{+}st := \{ \begin{matrix}sr′ & , if r = INL_{σ}r′ \\ tr′ & , if r = INR_{ρ}r′ \\ rE_{+}st & , else \end{matrix}

Obviously, this reducing elimination does not preserve normal forms because s and t may be λ-abstractions^{9}. It will be used in section 8.2 for the confluence proof. Extend the inductive definition of WN for system F by the following clauses:

(1-I) IN1 ∈ WN.
(×-I) If r ∈ WN and s ∈ WN, then ⟨r, s⟩ ∈ WN.
(β_{×}) If rs⃗ ∈ WN then ⟨r, s⟩Ls⃗ ∈ WN. If ss⃗ ∈ WN then ⟨r, s⟩Rs⃗ ∈ WN.
(+-I) If r ∈ WN, then INL_{ρ}r ∈ WN and INR_{ρ}r ∈ WN.

(β_{+}) If (INL_{ρ}r)sts⃗ is a term and srs⃗ ∈ WN, then (INL_{ρ}r)sts⃗ ∈ WN. If (INR_{ρ}r)sts⃗ is a

term and trs⃗ ∈ WN, then (INR_{ρ}r)sts⃗ ∈ WN.

WN is again well-parsed and therefore definitions by recursion on WN are possible. Extend the recursive definition of the function Ω from WN to Λ and the simultaneous proof of r →^{∗} Ω(r) ∈ NF for r ∈ WN by the following clauses:

(1-I) Ω(IN1) := IN1.

(×-I) Ω(⟨r, s⟩) := ⟨Ω(r), Ω(s)⟩.

(β_{×}) Ω(⟨r, s⟩Ls⃗) := Ω(rs⃗). Ω(⟨r, s⟩Rs⃗) := Ω(ss⃗).

(+-I) Ω(INL_{ρ}r) := INL_{ρ}Ω(r) and Ω(INR_{ρ}r) := INR_{ρ}Ω(r).

(β_{+}) Ω((INL_{ρ}r)sts⃗) := Ω(srs⃗). Ω((INR_{ρ}r)sts⃗) := Ω(trs⃗).

The proofs are always obvious. Extend the inductive definition of SN for system F by the following clauses:

(1-I) IN1 ∈ SN.

9One could optimize it but unless one studies additional conversions for sum types such as the variable elimination reduction sketched in appendix B this additional effort is not needed.

(×-I) If r ∈ SN and s ∈ SN, then ⟨r, s⟩ ∈ SN.
(β_{×}) If rs⃗ ∈ SN and s ∈ SN , then ⟨r, s⟩Ls⃗ ∈ SN.
If ss⃗ ∈ SN and r ∈ SN , then ⟨r, s⟩Rs⃗ ∈ SN.
(+-I) If r ∈ SN, then INL_{ρ}r ∈ SN and INR_{ρ}r ∈ SN.
(β_{+}) If (INL_{ρ}r)sts⃗ is a term and srs⃗ ∈ SN and t ∈ SN , then (INL_{ρ}r)sts⃗ ∈ SN.
If (INR_{ρ}r)sts⃗ is a term and trs⃗ ∈ SN and s ∈ SN , then (INR_{ρ}r)sts⃗ ∈ SN.

Every statement made in section 2.1.4 for system F (on nf, NF, wn, WN, Ω, SN and sn) is also true for eF. We may formulate a more conspicuous version of Lemma 2.37:

Lemma 2.46 There is no closed term of type 0 in WN.

Proof Assume a closed term r^{0} ∈ WN. Then Ω(r) ∈ NF, and Ω(r) is also a closed term of type 0 (due to the statement of Lemma 2.30). It is immediate from the definition of NF that this is impossible. _{□}

If we can show that every term is in WN, we may infer that the logical system represented by eF (via Curry-Howard) is consistent (there is no closed proof of 0 which represents ⊥). Therefore we have to expect a logically very demanding proof of WN = Λ which uses means beyond secondorder propositional logic. Because the number-theoretic functions which are provably total in second-order arithmetic are representable in system eF, the proof has even to go beyond the means of second-order arithmetic (see [GLT89], chapter 15, for this result).

2.2.5 Embeddings

An embedding of a typed term rewrite system S into a typed term rewrite system S′ is a function −′ (the − sign represents the indefinite argument of the function ′) which assigns to every type ρ of S a type ρ′ of S′ and to every term r : ρ of S a term r′ : ρ′ of S′ such that the following implication holds: If r → s in S, then r′ →^{+} s′ in S′. The main motivation for studying such embeddings is the inference of strong normalization for the source system S from strong normalization of the target system S′. This will now be made precise. Recall that the transitive closure →^{+} of the relation → is inductively defined by^{10}:

(→) If r → s, then r →^{+} s.
(trans) If r →^{+} s and s →^{+} t, then r →^{+} t.

The reflexive transitive closure →^{∗} of the relation → is inductively defined by:

(→) If r → s, then r →^{∗} s.
(refl) r →^{∗} r.
(trans) If r →^{∗} s and s →^{∗} t, then r →^{∗} t.

Lemma 2.47 1. →^{+}⊆→^{∗}.

10In case of familiarity with this presentation one should only read the remark at the end of this section.

2. →^{∗}=→^{+} ∪ {(r, r)|r ∈ Λ}.

3. r →^{∗} s →^{+} t implies r →^{+} t.

4. r →^{+} t implies that there is an s such that r → s →^{∗} t.

Proof The first statement is trivial as the set of clauses for →^{+} is a subset of the set of clauses for →^{∗}. 2.: ⊇: by 1. and (refl). ⊆: Induction on r →^{∗} s. Cases (→) and (refl): Trivial. Case (trans): Assume r →^{∗} s →^{∗} t. By induction hypothesis r →^{+} s or r = s. Also by induction hypothesis s →^{+} t or s = t. In each of the four cases we get r →^{+} t or r = t. 3.: Follows from 2. 4.: Induction on r →^{+} t. Case (→): Set s := t. Case (trans): Assume r →^{+} t_{0} →^{+} t. By induction hypothesis there is an s such that r → s →^{∗} t_{0}. t_{0} →^{+} t implies t_{0} →^{∗} t by 1. s →^{∗} t_{0} →^{∗} t implies s →^{∗} t by transitivity. (One could also use 3. and 1.) _{□}

Let sn be the set of strongly normalizing terms with respect to → as usual. Let sn^{+} be the set of strongly normalizing terms with respect to →^{+}.

Lemma 2.48 sn^{+} = sn.

Proof ⊆: Induction on r ∈ sn^{+}: Assume that for all s with r →^{+} s we have s ∈ sn. Show r ∈ sn. Let r → s. It suffices to show s ∈ sn. This follows because →⊆→^{+}. ⊇: Induction on r ∈ sn: Assume that for all s with r → s we have s ∈ sn^{+}. Show r ∈ sn^{+}. Let r →^{+} t. It suffices to show t ∈ sn^{+}. Due to Lemma 2.47 (4) there is an s such that r → s →^{∗} t. Hence, s ∈ sn^{+}. Due to Lemma 2.47 (2), s = t or s →^{+} t. The first case is trivial, in the second t ∈ sn^{+} because of the definition of sn^{+}. _{□}

Lemma 2.49 (Main Lemma on Embeddings) Assume an embedding −′ of S in S′. Let sn be the set of strongly normalizing terms in S and sn′ be the set of strongly normalizing terms in S′. Then for every term r of S the following holds: If r′ ∈ sn′, then r ∈ sn.

Proof Induction on r′ ∈ (sn′)^{+}, where (sn′)^{+} is the set of terms in S′ which are strongly normalizing with respect to →^{+}: Lemma 2.48 shows that this set is the same as sn′. However, we use the induction principle of (sn′)^{+}: Assume that for every term t of S′ with r′ →^{+} t and every term s of S with s′ = t we have s ∈ sn. We have to show r ∈ sn. Let r → s. It suffices to show s ∈ sn. The definition of embeddings implies r′ →^{+} s′. _{□}

Another application of Lemma 2.48 is the following which will be used in section 4.7.1:

Lemma 2.50 If r →^{+} r, then r ∉ sn.

Proof Show that Λ\{r} satisfies the defining clause of sn^{+}: Assume a term s such that for all s′ with s →^{+} s′ we have s′ ≠ r. We have to show s ≠ r. This is trivial. Hence, sn = sn^{+} ⊆ Λ \ {r} and consequently r ∉ sn. _{□}

It should be noted that this lemma is trivial if sn is defined via the notion of infinite reduction sequences. The other statements of this section would have been obvious, too. Lemma 2.48 states that there is no difference between sn and sn^{+}. Nevertheless the statement “induction on r ∈ sn^{+}” shall always express that induction along the inductive definition of sn^{+} is carried out, i.e. “course-of-value induction”. For convenience define the binary relations →^{n}, n ∈ ℕ, by recursion on n as follows:

r →^{0} s :⇔ r = s and r →^{n+1} s :⇔ ∃t.r → t ∧ t →^{n} s.

2.2.6 Embedding system eF in system F

The result is essentially not new. See e. g. [GLT89, pp. 84f] for an exposition. Perhaps it is interesting to see how many details have to be checked in this section. My interest concentrates on the fact that the encoding of the types and type constructs is reduction-preserving as will be the case for most of the encodings described in this work. And because β-reduction for → and ∀ is term and type substitution it is natural that substitution issues and therefore also considerations on variables dominate the “details”. For every type ρ of system eF define the type ρ′ of system F by recursion on ρ and simultaneously prove that FV(ρ′) = FV(ρ) as follows:

(V) α′ := α.
(→) (ρ → σ)′ := ρ′ → σ′.
(∀) (∀αρ)′ := ∀αρ′.
(0) 0′ := ∀αα.
(1) 1′ := ∀α.α → α.
(×) (ρ × σ)′ := ∀α.(ρ′ → σ′ → α) → α for α ∉ FV(ρ) ∪ FV(σ).
(+) (ρ + σ)′ := ∀α.(ρ′ → α) → (σ′ → α) → α for α ∉ FV(ρ) ∪ FV(σ).

(The proofs were obvious.) This definition is compatible with the variable conventions for the systems F and eF. The rules (V), (→) and (∀) are called the homomorphic type rules for F.

Lemma 2.51 (ρ[α⃗ := σ⃗])′ = ρ′[α⃗ := σ′].

Proof Induction on ρ. _{□}

From now on we usually omit the type of a typed term variable except at binding occurrences (that is directly behind the λ) if it is the type of the innermost binding occurrence of this untyped variable, e. g. we write λx^{α}x instead of λx^{α}x^{α}, but do not change λx^{α}λx^{α→α}x^{α} because λx^{α}λx^{α→α}x would mean λx^{α}λx^{α→α}x^{α→α}. Of course, writing such a term is no good style. For every term r^{ρ} of system eF define the term r′ of system F by recursion on r and simultaneously prove that r′ : ρ′ and FTV(r′) = FTV(r) and FV(r′) = {x^{σ′}|x^{σ} ∈ FV(r)} as follows:

(V) (x^{ρ})′ := x^{ρ′}. Proof trivial.

(→-I) (λx^{ρ}r)′ := λx^{ρ′}r′, where we may assume that for every x^{σ} ∈ FV(r) we have σ = ρ. Proof obvious.

(→-E) (rs)′ := r′s′. Proof obvious.

(∀-I) (Λαr)′ := Λαr′. Proof obvious (Well-definedness follows from the claim on FV(r)).

(∀-E) (rσ)′ := r′σ′. Proof obvious.

(0-E) (rρ)′ := r′E_{∀}ρ′. Proof obvious.

(1-I) IN1′ := Λαλx^{α}x. Proof obvious.

(×-I) ⟨r^{ρ}, s^{σ}⟩′ := Λαλz^{ρ′→σ′→α}.zr′s′ for α ∉ FTV(⟨r, s⟩) and z ∉ FV(r) ∪ FV(s). Proof obvious (use Lemma 2.8).

(×-E) (r^{ρ×σ}L)′ := r′E_{∀}ρ′(λx^{ρ′}λy^{σ′}x) (for x ≠ y). (r^{ρ×σ}R)′ := r′E_{∀}σ′(λx^{ρ′}λy^{σ′}y) (again for x ≠ y). Proof obvious (use Lemma 2.8).

(+-I) (INL_{σ}r^{ρ})′ := Λαλx^{ρ′→α}λy^{σ′→α}.xr′ for α ∉ FTV(INL_{σ}r^{ρ}) and x, y ∉ FV(r) (with x ≠ y). (INR_{ρ}r^{σ})′ := Λαλx^{ρ′→α}λy^{σ′→α}.yr′ for α ∉ FTV(INR_{ρ}r^{σ}) and also x, y ∉ FV(r) (with x ≠ y). Proof obvious (use Lemma 2.8).

(+-E) (rE_{+}τst)′ := r′E_{∀}τ′s′t′. Proof obvious (use Lemma 2.8).

This definition is again compatible with the variable conventions for F and eF. The rules (V), (→-I), (→-E), (∀-I) and (∀-E) are called the homomorphic term rules for F. Note that the condition in (→-I) prevents us from setting e. g. (λx^{∀αα}x^{0})′ := λx^{∀αα}x^{∀αα}.

Lemma 2.52 (r[xρ⃗ := sρ⃗])′ = r′[x^{ρ′} := s⃗′] and (r[α⃗ := σ⃗])′ = r′[α⃗ := σ′].

Proof Induction on r. _{□}

Lemma 2.53 If r → r̂, then r′ →^{+} r̂′, i. e., −′ is an embedding of eF in F.

Proof Induction on r → r̂: The cases (β_{→}) and (β_{∀}) follow immediately from Lemma 2.52.

(β_{×}): \begin{aligned}(⟨r^{ρ}, s^{σ}⟩L)′ & = & (Λαλz^{ρ′→σ′→α}.zr′s′)ρ′(λx^{ρ′}λy^{σ′}x) \\ & → & (λz^{ρ′→σ′→ρ′}.zr′s′)(λx^{ρ′}λy^{σ′}x) \\ & → & (λx^{ρ′}λy^{σ′}x)r′s′ \\ & → & (λy^{σ′}r′)s′ \\ & → & r′ \end{aligned}

We used Lemma 2.8, Corollary 2.2 and Lemma 2.16 for the first reduction step and Lemma 2.11 and FV(r′) = {x^{σ′}|x^{σ} ∈ FV(r)} and FV(s′) = {x^{σ′}|x^{σ} ∈ FV(s)} (implying z ∉ FV(r′) ∪ FV(s′)) for the second. The case with R in place of L is treated similarly. (β_{+}): ((INL_{σ}r^{ρ})s^{ρ→τ} t^{σ→τ})′ = (Λαλx^{ρ′→α}λy^{σ′→α}.xr′)τ′s′t′ → (λx^{ρ′→τ′}λy^{σ′→τ′}.xr′)s′t′ → (λy^{σ′→τ′}.s′r′)t′ where we assume that y^{σ′→τ′} ∉ FV(s′) → s′r′ = (sr)′

We used the same lemmas as for the case (β_{×}). The case with INR in place of INL is treated similarly. The other clauses are easily proved by using the induction hypothesis. _{□}

2.3 Extension by infimum types

Infimum types are introduced to give a clear understanding of the embedding of monotone inductive types with iteration (and no recursion, more specifically: of varEMIT–rec) into eF carried out in section 4.3.3. The following motivation^{11} could be made clear by using modified realizability as indicated in the introduction. Let (U, ≤) be a complete lattice, i. e., U is a non-empty set and ≤ is a partial ordering on U (≤ is a reflexive, antisymmetric and transitive relation on U) and for every M ⊆ U there is an infimum (greatest lower bound, meet) ⋀ M and a supremum (least upper bound, join) ⋁ M in U. It is well-known that for M ⊆ U, we have

⋁ M = ⋀{M ∈ U|∀M′ ∈ M.M′ ≤ M},

11I got my motivation for this extension from reading in [Tat94] on greatest lower bound inductive definitions which in my setting would be nothing else than studying iα.ρ → α instead of μαρ. I preferred to study general iαρ and later (in section 4.3.3) embed varEMIT–rec into IT by only using infimum types of the above form.

i. e., the supremum of a set is^{12} the infimum of all upper bounds of that set. Hence, we may exclusively concentrate on infima. There are two defining properties of infima: I = ⋀ M iff ∀M ∈ M.I ≤ M (I is a lower bound of M) and ∀M ∈ U.(∀M′ ∈ M.M ≤ M′) ⇒ M ≤ I (I is maximal with respect to being lower bound of M). Hence, we have two rules for ⋀ M:

(⋀-I) ∀M ∈ U.(∀M′ ∈ M.M ≤ M′) ⇒ M ≤ ⋀ M
(⋀-E) ∀M ∈ M. ⋀ M ≤ M

Now let (U, ⊆) be a complete lattice of sets with set inclusion as partial ordering (⊆ will always denote set inclusion also in the later chapters) and let |U| := ⋀ ∅ be its underlying set of elements. Let x, y always denote elements of |U| and M, M′ elements of U. The (implicitly universally quantified) rules now read (after some rearrangement)

(⋀-I) (∀M′.M′ ∈ M ⇒ ∀y(y ∈ M ⇒ y ∈ M′)) ⇒ x ∈ M ⇒ x ∈ ⋀ M
(⋀-E) x ∈ ⋀ M ⇒ M ∈ M ⇒ x ∈ M

Note that we associate ⇒ to the right as we do for → between types. This is the motivation for the infimum types to be defined in this section. We model elements of U and also statements on elements of U by types. Model “M ∈ M” by ρ[α := τ], if M is modelled by λαρ and M by τ. We introduce a new type iαρ to model ⋀ M. It will always be the case that elements of |U| are irrelevant to the interpretation of lattice-theoretic concepts in our typed systems. We try to interpret the rule (⋀-I): Model M by τ. The quantifier over elements of U is interpreted by ∀ and hence the truth of (∀M′.M′ ∈ M ⇒ ∀y(y ∈ M ⇒ y ∈ M′)) by some term of type ∀α.ρ → τ → α (of course with α ∉ FV(τ)) and the truth of x ∈ M by a term of type τ. We infer the truth of x ∈ ⋀ M which will be modelled by some term of type iαρ constructed out of the two terms. Hence, we have the rule of infimum introduction

(i-I) If ℓ^{∀α.ρ→τ→α} ∈ Λ and t^{τ} ∈ Λ (with α ∉ FV(τ)) then (C_{iαρ}ℓt)^{iαρ} ∈ Λ.

Now interpret (⋀-E): Model M by σ. The truth of x ∈ ⋀ M is interpreted by a term of type iαρ and the truth of M ∈ M by a term of type ρ[α := σ]. We infer the truth of x ∈ M, which will be modelled by a construction of a term of type σ out of the two other terms. This gives the rule of infimum elimination

(i-E) If r^{iαρ} ∈ Λ and s^{ρ[α:=σ]} ∈ Λ, then (rs)^{σ} ∈ Λ.

2.3.1 Extension of the type system by infimum types

The type system of the extension by infimum types is defined by adding the following clause to the inductive definition of Types for eF:

(i) If α ∈ Typevars and ρ ∈ Types, then iαρ ∈ Types.

The variable α in iαρ is considered to be bound by i in exactly the same way as α is bound in ∀αρ by ∀. Hence, the renaming convention for bound type variables in types will be extended accordingly. i is assumed to syntactically bind stronger than →, × and +, as was done for ∀. The definition of FV(ρ) for system eF is extended by the following clause:

12This fact may be spelled out constructively: The system of supremum types motivated in the same fashion may be embedded into the system of infimum types and vice versa. Note that this includes preservation of β-reduction for infimum and supremum types.

(i) FV(iαρ) := FV(ρ) \ {α}.

The definition remains compatible with the renaming convention. The definition of ρ[α⃗ := σ⃗] is extended by the following clause:

(i) (iαρ)[α⃗ := σ⃗] := iα.ρ[α⃗ := σ⃗], where we assume that α ∉ α⃗ ∪ FV(σ⃗).

It is again compatible with the renaming convention. We adopt the same naming convention. The statements on types given for system F are also true in this extension as for the time being, i and ∀ are only different because of different names. If one added e. g. the existential quantifier ∃ to the system (see section 2.4.2) the same procedure would have to take place. This suggests introducing the concept of abstracting a type variable α in a type ρ the result of which is denoted by λαρ. The λ hints at our variable convention because it is traditional to adopt this convention whenever one deals with λ-abstraction. ∀, i and ∃ would then simply be constants which applied to an abstracted type give another type, e. g. ∀αρ would be replaced by ∀(λαρ). I decided not to use such a framework, but nevertheless have to introduce the concept of abstracted types for dealing with terms of positive inductive types (which are defined in section 3.2).

2.3.2 The term rewrite system IT of infimum types

The (second) definition of typed terms and their free variables for system eF is extended by the following clauses:

(i-I) If ℓ^{∀α.ρ→τ→α} ∈ Λ and t^{τ} ∈ Λ (with α ∉ FV(τ))^{13}, then (C_{iαρ}ℓt)^{iαρ} ∈ Λ and

FV(C_{iαρ}ℓt) := FV(ℓ) ∪ FV(t).

(i-E) If r^{iαρ} ∈ Λ and s^{ρ[α:=σ]} ∈ Λ, then (rs)^{σ} ∈ Λ (also written as rE_{i}σs or shorter rE_{i}s)

and FV(rs) := FV(r) ∪ FV(s).

This definition is again compatible with the renaming convention for bound type variables. If r : iαρ, we say that r is of infimum type. We extend the naming convention by assuming that ℓ always denotes a term. If α ∈ FV(ρ) then σ can be read off ρ[α := σ] and therefore the type of the term rs is determined by r and s. Otherwise rs can have any type. Because we want to have the uniqueness of the type of a term (Lemma 2.7) we have to take the notation rE_{i}σs as the “true” term. However, in theoretic studies on the system IT it is quite unusual to focus specifically on cases where α ∉ FV(ρ) and therefore the appearance of σ in the string which represents the type of s^{ρ[α:=σ]} clearly indicates the type σ of rs. Extend the recursive definition of FTV(r) by the following clauses:

(i-I) FTV(C_{iαρ}ℓt) := FV(iαρ) ∪ FTV(ℓ) ∪ FTV(t).

(i-E) FTV(rs) := FTV(r) ∪ FV(σ) ∪ FTV(s) (Recall the convention on the type σ of rs).

13Note that without this condition the renaming convention for bound type variables would fail. Therefore, conditions of this kind may be left implicit by tacitly assuming that every definition has an appropriate reading which is compatible with the variable convention and by taking this reading for the “true” definition. Nevertheless, the important side conditions will always be indicated in parentheses.

Because of α ∉ FV(τ) one could also require that ℓ : τ → ∀α.ρ → α. But then there would be no point in using this ℓ and t^{τ} and we could use the rule ℓ : ∀α.ρ → α ⇒ C_{iαρ}ℓ : iαρ instead which would result in the embedding into F becoming even more trivial. The reason for keeping to the original definition is the exact correspondence with the lattice-theoretic reasoning.

The definition of r[xρ⃗ := s⃗] together with the proof of r^{ρ}[xρ⃗ := s⃗] : ρ and FV(r[xρ⃗ := s⃗]) = (FV(r) \ xρ⃗) ∪ ⋃{FV(s_{i})|x_{i}^{ρ_{i}} ∈ FV(r) ∧ x_{i}^{ρ_{i}} ≠ x_{j}^{ρ_{j}} for j < i} (i. e., the statement of Lemma 2.10) is extended by the following clauses:

(i-I) (C_{iαρ}ℓt)[xρ⃗ := s⃗] := C_{iαρ}ℓ[xρ⃗ := s⃗]t[xρ⃗ := s⃗]. Proof obvious.
(i-E) (rs)[xρ⃗ := s⃗] := r[xρ⃗ := s⃗]E_{i}s[xρ⃗ := s⃗]. Proof obvious.

The definition of r[α⃗ := σ⃗] together with the proof of r^{ρ}[α⃗ := σ⃗] : ρ[α⃗ := σ⃗] and FV(r[α⃗ := σ⃗]) = {y^{τ[α⃗:=σ⃗]}|y^{τ} ∈ FV(r)} is extended by the following clauses:

(i-I) (C_{iαρ}ℓt)[α⃗ := σ⃗] := C_{(iαρ)[α⃗:=σ⃗]}ℓ[α⃗ := σ⃗]t[α⃗ := σ⃗]. Proof obvious.
(i-E) (rs)[α⃗ := σ⃗] := r[α⃗ := σ⃗]E_{i}(σ[α⃗ := σ⃗])s[α⃗ := σ⃗]. Proof obvious.

The statements made in section 2.1.2 are valid in IT, too. The general definition of immediate subterms of a term gives the following extension for system IT: C_{iαρ}ℓt has exactly the immediate subterms ℓ and t and rE_{i}s has exactly the immediate subterms r and s. Extend the inductive definition of rs⃗ for system eF as follows:

(i-E) If rs⃗ : iαρ and s : ρ[α := σ], then r(s⃗, s) := (rs⃗)s.

The statement of Lemma 2.23 holds also true for IT.

Lemma 2.54 (Head form) Every term has either exactly one of the forms given in Lemma 2.44 or exactly one of the following forms:

(i-I) C_{iαρ}ℓt
(i-R) (C_{iαρ}ℓt)ss⃗

Proof Induction on terms. _{□}

Extend the inductive definition of the set NF for system eF by the following clause:

(i-I) If C_{iαρ}ℓt is a term and ℓ ∈ NF and t ∈ NF, then C_{iαρ}ℓt ∈ NF.

The statements made in section 2.1.4 are all valid in IT. Define the relation ↦ as for system eF, but add the following clause:

(β_{i})  (C_{iαρ}ℓt)E_{i}σs ↦ ℓσst

As for system eF the object on the right side is automatically a term if the respective object on the left is a term (note that τ[α := σ] = τ), and the types are equal. The relation →_{whd} is defined as for system F and has the same properties as stated there. Extend the inductive definition of the relation → for system eF by the following clauses (and prove that if r → r′, then r and r′ have the same type and FV(r′) ⊆ FV(r)):

(i-I) If ℓ → ℓ′, then C_{iαρ}ℓt → C_{iαρ}ℓ′t. If t → t′, then C_{iαρ}ℓt → C_{iαρ}ℓt′.
(i-E) If r → r′, then rE_{i}s → r′E_{i}s. If s → s′, then rE_{i}s → rE_{i}s′.

(The proofs were trivial.) Extend the inductive definition of WN for system eF by the following clauses:

(i-I) If C_{iαρ}ℓt is a term and ℓ ∈ WN and t ∈ WN, then C_{iαρ}ℓt ∈ WN.

(β_{i}) If (C_{iαρ}ℓt)E_{i}σss⃗ is a term and ℓσsts⃗ ∈ WN, then (C_{iαρ}ℓt)E_{i}σss⃗ ∈ WN.

Again definition by recursion on WN is admissible. Extend the recursive definition of the function Ω from WN to Λ and the simultaneous proof of r →^{∗} Ω(r) ∈ NF for r ∈ WN by the following clauses:

(i-I) Ω(C_{iαρ}ℓt) := C_{iαρ}Ω(ℓ)Ω(t).
(β_{i}) Ω((C_{iαρ}ℓt)E_{i}σss⃗) := Ω(ℓσsts⃗).

The proofs are always obvious. Extend the definition of SN for system eF by the following clauses:

(i-I) If C_{iαρ}ℓt is a term and ℓ ∈ SN and t ∈ SN, then C_{iαρ}ℓt ∈ SN.
(β_{i}) If (C_{iαρ}ℓt)E_{i}σss⃗ is a term and ℓσsts⃗ ∈ SN, then (C_{iαρ}ℓt)E_{i}σss⃗ ∈ SN.

The only difference between the i-clauses for SN and WN is the name of the defined set. Every statement made in section 2.1.4 for system F (on nf, NF, wn, WN, Ω, SN and sn) is also true for IT.

2.3.3 The embedding of system IT in system eF

As a motivation let (U, ⊆) be a complete lattice where the infimum is always given by set intersection, i. e., for M ⊆ U, ⋀ M = ⋂ M = {x|∀M ∈ U.M ∈ M ⇒ x ∈ M}. (We use the same conventions as in the introduction to infimum types.) Hence

x ∈ ⋀ M ⇔ ∀M.(M ∈ M ⇒ x ∈ M)

We immediately read off this equivalence the interpretation of iαρ by ∀α.ρ → α. Now we have to check that the definition based on this idea is also compatible with β-reduction for all type constructs including β_{i}. For every type ρ of system IT define the type ρ′ of system eF by recursion on ρ and simultaneously prove that FV(ρ′) = FV(ρ) as follows:

(F) The homomorphic type rules for F.

(∘) (ρ ∘ σ)′ := ρ′ ∘ σ′ for ∘ ∈ {×, +}.

(0) 0′ := 0.

(1) 1′ := 1.

(i) (iαρ)′ := ∀α.ρ′ → α.

(The proofs were obvious.) This definition is compatible with the variable conventions for the systems IT and eF. The rules (F), (∘), (0) and (1) are called the homomorphic type rules for eF.

Lemma 2.55 (ρ[α⃗ := σ⃗])′ = ρ′[α⃗ := σ′].

Proof Induction on ρ. _{□}

For every term r^{ρ} of system IT define the term r′ of system eF by recursion on r and simultaneously prove that r′ : ρ′ and FTV(r′) = FTV(r) and FV(r′) = {x^{σ′}|x^{σ} ∈ FV(r)} as follows:

(F) The homomorphic term rules for F.

(0-E) (rρ)′ := r′ρ′.

(1-I) IN1′ := IN1.

(×-I) ⟨r, s⟩′ := ⟨r′, s′⟩.

(×-E) (rL)′ := r′L. (rR)′ := r′R.

(+-I) (INL_{ρ}r)′ := INL_{ρ′}r′. (INR_{ρ}r)′ := INR_{ρ′}r′.

(+-E) (rE_{+}τst)′ := r′E_{+}τ′s′t′.

(i-I) (C_{iαρ}ℓ^{∀α.ρ→τ→α}t^{τ})′ := Λαλx^{ρ′}.ℓ′αxt′, where we assume that α ∉ FTV(ℓ) ∪ FTV(t) and require x ∉ FV(ℓ) ∪ FV(t).

(i-E) (r^{iαρ}E_{i}s^{ρ[α:=σ]})′ := r′E_{∀}σ′s′.

(The proofs were always obvious. (i-E) needs the previous lemma for type correctness.) This definition is again compatible with the variable conventions for IT and eF. The rules (F), (0-E), (1-I), (×-I), (×-E), (+-I) and (+-E) are called the homomorphic term rules for eF.

Lemma 2.56 (r[xρ⃗ := sρ⃗])′ = r′[x^{ρ′} := s⃗′] and (r[α⃗ := σ⃗])′ = r′[α⃗ := σ′].

Proof Induction on r. _{□}

Lemma 2.57 If r → r̂, then r′ →^{+} r̂′.

Proof Induction on r → r̂: The cases (β_{→}) and (β_{∀}) follow immediately from Lemma 2.56, (β_{×}) and (β_{+}) are trivial.

(β_{i}): \begin{aligned}((C_{iαρ}ℓ^{∀α.ρ→τ→α}t^{τ})E_{i}s^{ρ[α:=σ]})′ & = & (Λαλx^{ρ′}.ℓ′αxt′)E_{∀}σ′s′ \\ & → & (λx^{ρ′[α:=σ′]}.ℓ′σ′xt′)s′ \\ & → & ℓ′σ′s′t′ = (ℓσst)′ \end{aligned}

We used Lemma 2.16 for the first reduction step and Lemma 2.11 for the second (and x ∉ FV(ℓ) ∪ FV(t) ⇒ x ∉ FV(ℓ′) ∪ FV(t′)). The other clauses are easily proved by using the induction hypothesis. _{□}

2.4 Extension by the existential quantifier

Types of the form ∃αρ are added to eF. It is well-known that ∃αρ may be coded via universal quantification. It is even reduction-preserving. As was the case for the extension of F to eF, this does not carry over to every extension by μ-types, does not respect η-reduction and does not allow for permutative conversions (for ∃). Strict positivity is also not preserved—already a justification for this extension.

2.4.1 Extension of the type system by existential types

The type system of the extension by existential types is defined by adding the following clause to the inductive definition of Types for eF:

(∃) If α ∈ Typevars and ρ ∈ Types, then ∃αρ ∈ Types.

As was the case for i and ∀, the variable α in ∃αρ is considered to be bound by ∃ . Hence, the renaming convention for bound type variables in types will be extended accordingly. ∃ is assumed to syntactically bind stronger than →, × and +, as was done for ∀ (and also for i). The definition of FV(ρ) for system eF is extended by the following clause:

(∃) FV(∃αρ) := FV(ρ) \ {α}.

The definition of ρ[α⃗ := σ⃗] is extended by the following clause:

(∃) (∃αρ)[α⃗ := σ⃗] := ∃α.ρ[α⃗ := σ⃗], where we assume that α ∉ α⃗ ∪ FV(σ⃗).

Again ∃ and ∀ are only different because of their different names and therefore the statements in section 2.1.1 remain true in this extension.

2.4.2 The extension eF+ex of system eF by existential types

The (second) definition of typed terms and their free variables for system eF is extended by the following clauses:

(∃-I) If t^{ρ[α:=τ]} ∈ Λ, then (C_{∃αρ,τ} t)^{∃αρ} ∈ Λ and FV(C_{∃αρ,τ} t) := FV(t).

(∃-E) If r^{∃αρ} ∈ Λ and s^{∀α.ρ→σ} ∈ Λ (with α ∉ FV(σ)), then (rs)^{σ} ∈ Λ (also written as

rE_{∃}σs or shorter rE_{∃}s) and FV(rs) := FV(r) ∪ FV(s).

This definition is again compatible with the renaming convention for bound type variables. If r : ∃αρ, we say that r is of existential type. Extend the recursive definition of FTV(r) by the following clauses:

(∃-I) FTV(C_{∃αρ,τ} t) := FV(∃αρ) ∪ FV(τ) ∪ FTV(t).
(∃-E) FTV(rs) := FTV(r) ∪ FTV(s)

The definition of r[xρ⃗ := s⃗] together with the proof of r^{ρ}[xρ⃗ := s⃗] : ρ and FV(r[xρ⃗ := s⃗]) = (FV(r) \ xρ⃗) ∪ ⋃{FV(s_{i})|x_{i}^{ρ_{i}} ∈ FV(r) ∧ x_{i}^{ρ_{i}} ≠ x_{j}^{ρ_{j}} for j < i} (i. e., the statement of Lemma 2.10) is extended by the following clauses:

(∃-I) (C_{∃αρ,τ} t)[xρ⃗ := s⃗] := C_{∃αρ,τ} t[xρ⃗ := s⃗]. Proof obivous.
(∃-E) (rs)[xρ⃗ := s⃗] := r[xρ⃗ := s⃗]E_{∃}s[xρ⃗ := s⃗]. Proof obvious.

The definition of r[α⃗ := σ⃗] together with the proof of r^{ρ}[α⃗ := σ⃗] : ρ[α⃗ := σ⃗] and FV(r[α⃗ := σ⃗]) = {y^{τ[α⃗:=σ⃗]}|y^{τ} ∈ FV(r)} is extended by the following clauses:

(∃-I) (C_{∃αρ,τ} t)[α⃗ := σ⃗] := C_{(∃αρ)[α⃗:=σ⃗],τ[α⃗:=σ⃗]}t[α⃗ := σ⃗]. Proof obvious.
(∃-E) (rs)[α⃗ := σ⃗] := r[α⃗ := σ⃗]E_{∃}s[α⃗ := σ⃗]. Proof obvious.

The statements made in section 2.1.2 are valid in eF+ex, too. The general definition of immediate subterms of a term gives the following extension for system eF+ex: C_{∃αρ,τ} t has exactly the immediate subterm t and rE_{∃}s has exactly the immediate subterms r and s. Extend the inductive definition of rs⃗ for system eF as follows:

(∃-E) If rs⃗ : ∃αρ and s : ∀α.ρ → σ (with α ∉ FV(σ)), then r(s⃗, s) := (rs⃗)s.

The statement of Lemma 2.23 holds also true for eF+ex.

Lemma 2.58 (Head form) Every term has either exactly one of the forms given in Lemma 2.44 or exactly one of the following forms:

(∃-I) C_{∃αρ,τ} t
(∃-R) (C_{∃αρ,τ} t)ss⃗

Proof Induction on terms. _{□}

Extend the inductive definition of the set NF for system eF by the following clause:

(∃-I) If C_{∃αρ,τ} t is a term and t ∈ NF, then C_{∃αρ,τ} t ∈ NF.

The statements made in section 2.1.4 are all valid in eF+ex. Define the relation ↦ as for system eF, but add the following clause:

(β_{∃})  (C_{∃αρ,τ} t)E_{∃}s ↦ sτt

As for system eF the object on the right side is automatically a term if the respective object on the left is a term (note that σ[α := τ] = σ), and the types are equal. The relation →_{whd} is defined as for system F and has the same properties as stated there. Extend the inductive definition of the relation → for system eF by the following clauses (and prove that if r → r′, then r and r′ have the same type and FV(r′) ⊆ FV(r)):

(∃-I) If t → t′, then C_{∃αρ,τ} t → C_{∃αρ,τ} t′.
(∃-E) If r → r′, then rE_{∃}s → r′E_{∃}s. If s → s′, then rE_{∃}s → rE_{∃}s′.

(The proofs were trivial.) Extend the inductive definition of WN for system eF by the following clauses:

(∃-I) If C_{∃αρ,τ} t is a term and t ∈ WN, then C_{∃αρ,τ} t ∈ WN.
(β_{∃}) If (C_{∃αρ,τ} t)E_{∃}ss⃗ is a term and sτts⃗ ∈ WN, then (C_{∃αρ,τ} t)E_{∃}ss⃗ ∈ WN.

Again definition by recursion on WN is admissible. Extend the recursive definition of the function Ω from WN to Λ and the simultaneous proof of r →^{∗} Ω(r) ∈ NF for r ∈ WN by the following clauses:

(∃-I) Ω(C_{∃αρ,τ} t) := C_{∃αρ,τ} Ω(t).
(β_{∃}) Ω((C_{∃αρ,τ} t)E_{∃}ss⃗) := Ω(sτts⃗).

The proofs are always obvious. Extend the definition of SN for system eF by the following clauses:

(∃-I) If C_{∃αρ,τ} t is a term and t ∈ SN, then C_{∃αρ,τ} t ∈ SN.
(β_{∃}) If (C_{∃αρ,τ} t)E_{∃}ss⃗ is a term and sτts⃗ ∈ SN, then (C_{∃αρ,τ} t)E_{∃}ss⃗ ∈ SN.

The only difference between the ∃-clauses for SN and WN is the name of the defined set. Every statement made in section 2.1.4 for system F (on nf, NF, wn, WN, Ω, SN and sn) is also true for eF+ex.

2.4.3 The embedding of system eF+ex in system eF

The essence^{14} of this section may be found in [GLT89, p. 86]. For every type ρ of system eF+ex define the type ρ′ of system eF by recursion on ρ and simultaneously prove that FV(ρ′) = FV(ρ) as follows:

(eF) The homomorphic type rules for eF.

(∃) (∃αρ)′ := ∀β.(∀α.ρ′ → β) → β for β ∉ {α} ∪ FV(ρ).

(The proofs were obvious.) This definition is compatible with the variable conventions for the systems eF+ex and eF.

Lemma 2.59 (ρ[α⃗ := σ⃗])′ = ρ′[α⃗ := σ′].

Proof Induction on ρ. _{□}

For every term r^{ρ} of system eF+ex define the term r′ of system eF by recursion on r and simultaneously prove that r′ : ρ′ and FTV(r′) = FTV(r) and FV(r′) = {x^{σ′}|x^{σ} ∈ FV(r)} as follows:

(eF) The homomorphic term rules for eF.

(∃-I) (C_{∃αρ,τ} t^{ρ[α:=τ]})′ := Λβλx^{∀α.ρ′→β}.xτ′t′ for β ∉ FV(τ) ∪ FTV(t) and x ∉ FV(t).

(∃-E) (r^{∃αρ}E_{∃}s^{∀α.ρ→σ})′ := r′E_{∀}σ′s′.

(The proofs were always obvious.) This definition is again compatible with the variable conventions for eF+ex and eF. Note that the classical interpretation of the existential quantifier via (∃αρ)′ := (∀α.ρ′ → 0) → 0 would be too weak because it does not allow the interpretation of the existential elimination.

Lemma 2.60 (r[xρ⃗ := sρ⃗])′ = r′[x^{ρ′} := s⃗′] and (r[α⃗ := σ⃗])′ = r′[α⃗ := σ′].

Proof Induction on r. _{□}

Lemma 2.61 If r → r̂, then r′ →^{+} r̂′.

Proof Induction on r → r̂: The cases (β_{→}) and (β_{∀}) follow immediately from Lemma 2.60, (β_{×}) and (β_{+}) are trivial.

(β_{∃}): \begin{aligned}((C_{∃αρ,τ} t^{τ})E_{∃}s^{∀α.ρ→σ})′ & = & (Λβλx^{∀α.ρ′→β}.xτ′t′)E_{∀}σ′s′ \\ & → & (λx^{∀α.ρ′→σ′}.xτ′t′)s′ \\ & → & s′τ′t′ = (sτt)′ \end{aligned}

We used Lemma 2.16 and Corollary 2.2 for the first reduction step and Lemma 2.11 for the second. The other clauses are easily proved by using the induction hypothesis. _{□} 42 CHAPTER 2. THE BASIC FRAMEWORK

14See the introductory remark to section 2.2.6.

Extension of the type system by inductive types (i. e., μ-types)

Let (U, ≤) be a complete lattice and Φ : U → U be monotone^{1}. By Tarski’s [Tar55] fixed-point theorem Φ has a least fixed point^{2} lfp(Φ) which is given by

lfp(Φ) = ⋀{M ∈ U|Φ(M) ≤ M}.

It will be important to give and analyze the proof of this theorem in section 4.3.3. M ∈ U is a pre-fixed-point of Φ is defined to mean Φ(M) ≤ M. By definition, we have that lfp(Φ) ≤ M for all pre-fixed-points M of Φ, hence

(lfp-E) Φ(M) ≤ M ⇒ lfp(Φ) ≤ M.

Let now (U, ⊆) be a complete lattice of sets and Φ a monotone operator on it. The last remark now reads:

(lfp-E) If x ∈ lfp(Φ) and Φ(M) ⊆ M, then x ∈ M.

This is simply the rule of induction on lfp(Φ) which hence is seen as the set inductively defined by Φ (see e. g. [Acz77]). In the systems of inductive types lfp(Φ) is modelled by a type μαρ where Φ is represented by some λαρ, i.e. a type ρ with a selected type variable α to indicate the argument of Φ. All the systems with exception of those in the spirit of Mendler (in chapter 6) need λαρ to be monotone in some sense. The systems of monotone inductive types need some “monotonicity witness”, i. e., a term of type ∀α∀β.(α → β) → ρ → ρ[α := β] and the systems of positive inductive types have the syntactic restriction of positivity on the formation rule for types of the form μαρ which in turn ensures the existence of canonical monotonicity witnesses. The systems à la Mendler do not have any restriction on forming μ-types but their interpretation is the least fixed point of some canonical monotone operator associated with the given arbitrary operator and hence they are also covered by Tarski’s theorem. In this chapter we only consider the type systems for inductive types, the following chapters introduce the term systems together with notions of β-reduction for μ-types which represent iteration and (full primitive) recursion.

1In the context of inductive definitions it is customary to speak of monotone operators instead of monotone (endo-)functions, see e. g. [Acz77].

2In [Tar55] it is even shown that the set of fixed points is a complete lattice and in particular there is also a greatest fixed point. Those greatest fixed points are the natural semantics for coinductive types. (Note that “coinductive” does not refer to the complement of an inductively defined set as in [Mos74, p. 17].) Note also that the existence of fixed points of every monotone operator even characterizes the completeness property of lattices [Dav55].

3.1 Inductive types

The type system of all of the extensions by inductive types which we will consider (unless some subsystem is studied) is defined by adding the following clause to the inductive definition of Types for eF:

(μ) If α ∈ Typevars and ρ ∈ Types, then μαρ ∈ Types.

As was the case for i and ∀, the variable α in μαρ is considered to be bound by μ. Hence, the renaming convention for bound type variables in types will be extended accordingly. μ is assumed to syntactically bind stronger than →, × and +, as was done for ∀ (and also for i). The definition of FV(ρ) for system eF is extended by the following clause:

(μ) FV(μαρ) := FV(ρ) \ {α}.

The definition of ρ[α⃗ := σ⃗] is extended by the following clause:

(μ) (μαρ)[α⃗ := σ⃗] := μα.ρ[α⃗ := σ⃗], where we assume that α ∉ α⃗ ∪ FV(σ⃗).

Again μ and ∀ are only different because of their different names and therefore the statements in section 2.1.1 remain true in this extension. The intuitive meaning of μαρ is the least fixed point of σ ↦ ρ[α := σ] the existence of which is guaranteed for monotone λαρ. Some examples are in order:

• nat := μα.1 + α is the type of natural numbers.

• list(ρ) := μα.1 + ρ × α for α ∉ FV(ρ) is the type of finite lists with elements of type ρ.

• tree(ρ) := μα.1 + (ρ → α) for α ∉ FV(ρ) is the type of ρ-branching well-founded trees.

• tree′(ρ) := μα.1 + α + (ρ → α) for α ∉ FV(ρ) is the type of ρ-branching well-founded trees with successor.

• tree := tree(nat) is a type representing Kleene’s O.

• fin := μα.list(α) is the type of finitely branching well-founded trees.

• cont(ρ) := μα.1 + ((α → ρ) → ρ) for α ∉ FV(ρ) is the type of “continuations for calculating results of type ρ” (which are used in an unpublished manuscript written by Martin Hofmann).

• Tree := μα.1 + (tree(α) → α) (which was first proposed by Ulrich Berger) is a type of trees with autonomously generated branching degree. It would be interesting to see in which way this type is related to autonomously iterated inductive definitions (see the theory AUT(ID) in [BFPS81]).

• μα.α → 1, which is trivially monotone but not positive (for its use see appendix B).

• bizarre(ρ) := μα.1 + ((((α → ρ) → α) → α) → α) for α ∉ FV(ρ) (an invention by Ulrich Berger of a non-trivially monotone non-positive inductive type discussed in section 4.1.2).

• pos(μαρ) := μα∀β.(α → β) → ρ[α := β] for β ∉ {α} ∪ FV(ρ) is the “positivization” of μαρ playing a prominent role in section 6.3.3.

3.2 Strictly positive and positive types

In the following we will define subsets of Types where we restrict the use of the μ-rule. Inductively define the set SPosTypes of strictly positive types (as a subset of Types) and simultaneously for every ρ ∈ SPosTypes the set SPos(ρ) of type variables which only occur free at strictly positive positions in ρ:

(V) α ∈ SPosTypes and SPos(α) := Typevars.

(→) If ρ ∈ SPosTypes and σ ∈ SPosTypes, then ρ → σ ∈ SPosTypes and SPos(ρ → σ) :=

SPos(σ) \ FV(ρ). (∀) If ρ ∈ SPosTypes, then ∀αρ ∈ SPosTypes and SPos(∀αρ) := SPos(ρ) ∪ {α}.

(0) 0 ∈ SPosTypes and SPos(0) := Typevars.

(1) 1 ∈ SPosTypes and SPos(1) := Typevars.

(×) If ρ ∈ SPosTypes and σ ∈ SPosTypes, then ρ × σ ∈ SPosTypes and SPos(ρ × σ) :=

SPos(ρ) ∩ SPos(σ). (+) If ρ ∈ SPosTypes and σ ∈ SPosTypes, then ρ + σ ∈ SPosTypes and SPos(ρ + σ) :=

SPos(ρ) ∩ SPos(σ). (μ) If ρ ∈ SPosTypes and α ∈ SPos(ρ), then μαρ ∈ SPosTypes and SPos(μαρ) := SPos(ρ).

This definition is compatible with the renaming convention: This is implied by the following lemma which in a more careful presentation would be proved simultaneously with the justification of the renaming convention. Lemma 3.1 Let ρ, σ⃗ ∈ SPosTypes. Then ρ[α⃗ := σ⃗] ∈ SPosTypes and SPos(ρ) \ FV(σ⃗) ⊆ SPos(ρ[α⃗ := σ⃗]). Moreover, if β ∉ FV(ρ) then α ∈ SPos(ρ) implies β ∈ SPos(ρ[α := β]). Proof Induction on ρ ∈ SPosTypes. For the case (V) note that every type variable which does not occur free in ρ is put in SPos(ρ) (e. g. SPos(μαρ) = SPos(ρ) ∪ {α}). In the case (μ) the induction hypothesis for the second claim is needed to prove the first claim. _{□} It follows that if μαρ ∈ SPosTypes and β ∉ FV(ρ), then μβ.ρ[α := β] ∈ SPosTypes. But μβ.ρ[α := β] = μαρ. However, this part of the lemma is only intended to show compatibility with the renaming convention. Let us look at the examples of inductive types:

• nat ∈ SPosTypes.

• If ρ ∈ SPosTypes, then list(ρ) ∈ SPosTypes. In this case SPos(list(ρ)) = SPos(ρ).

• If ρ ∈ SPosTypes, then tree(ρ) ∈ SPosTypes. In this case SPos(tree(ρ)) ∩ FV(ρ) = ∅. The same holds for tree′(ρ).

• tree and fin are strictly positive types.

• cont(ρ), Tree, bizarre and pos(μαρ) are never in SPosTypes.

It is common to view types of the form μαρ ∈ SPosTypes as the types of well-founded trees (at least if the rule (∀) is left out). But trees in this sense are not the only structures definable by induction. Our understanding of an inductive definition rests on some monotone operator described by the definition. The elements of a deterministic inductive definition may be identified with the proof trees which justify their elementhood (see e. g. [Acz77, p. 748]). In this manner we may view all of our μ-types as types of generalized well-founded trees. However, we leave the realm of predicativity if we go beyond strictly positive types. Of course, we do this anyway by basing our systems on system F, but one could try to produce predicative versions of them. However, there is no general agreement as to where the “border of predicativity” is (see [Str99] on “metapredicativity”). Clearly, system F is impredicative. Strictly positive inductive definitions (without ∀) are mostly seen as predicative. However, this work does not aim at determining the exact proof-theoretic strength of theories but investigates reduction behaviour by unrestricted use of Tarski’s fixed-point theorem (which makes use of a Π_{1}^{1}-comprehension) and by embeddings using the expressive power of system F. Hence, we simply regard strictly positive types as an instance of monotone inductive types where monotonicity already may be checked syntactically by looking at the type. And if we ask ourselves the question which types may also syntactically be checked for monotonicity, we are directly led to the positive inductive types. Because of the contravariance of → (seen as a functor) in the first argument we have to consider syntactically isotone and syntactically antitone types (seen as functions of a type variable) simultaneously: Inductively define the set PosTypes of positive types (as a subset of Types) and simultaneously for every ρ ∈ PosTypes the set Pos(ρ) of type variables which only occur free at positive positions in ρ and the set Neg(ρ) of type variables which only occur free at negative positions in ρ:

(V) α ∈ PosTypes and Pos(α) := Typevars and Neg(α) := Typevars \ {α}.

(→) If ρ ∈ PosTypes and σ ∈ PosTypes, then ρ → σ ∈ PosTypes and Pos(ρ → σ) := Neg(ρ) ∩ Pos(σ) and Neg(ρ → σ) := Pos(ρ) ∩ Neg(σ).

(∀) If ρ ∈ PosTypes, then ∀αρ ∈ PosTypes. Pos(∀αρ) := Pos(ρ) ∪ {α} and Neg(∀αρ) := Neg(ρ) ∪ {α}.

(0) 0 ∈ PosTypes and Pos(0) := Typevars and Neg(0) := Typevars.

(1) 1 ∈ PosTypes and Pos(1) := Typevars and Neg(1) := Typevars.

(×) If ρ ∈ PosTypes and σ ∈ PosTypes, then ρ × σ ∈ PosTypes and Pos(ρ × σ) := Pos(ρ) ∩ Pos(σ) and Neg(ρ × σ) := Neg(ρ) ∩ Neg(σ).

(+) If ρ ∈ PosTypes and σ ∈ PosTypes, then ρ + σ ∈ PosTypes and Pos(ρ + σ) := Pos(ρ) ∩ Pos(σ) and Neg(ρ + σ) := Neg(ρ) ∩ Neg(σ).

(μ) If ρ ∈ PosTypes and α ∈ Pos(ρ), then μαρ ∈ PosTypes and Pos(μαρ) := Pos(ρ) and Neg(μαρ) := Neg(ρ) ∪ {α}.

The definition is again compatible with the renaming convention: This is implied by the following lemma which also in a more careful presentation would be proved simultaneously with the justification of the renaming convention.

Lemma 3.2 Let ρ, σ⃗ ∈ PosTypes. Then ρ[α⃗ := σ⃗] ∈ PosTypes and

Pos(ρ) \ FV(σ⃗) ⊆ Pos(ρ[α⃗ := σ⃗]) and Neg(ρ) \ FV(σ⃗) ⊆ Neg(ρ[α⃗ := σ⃗]).

Moreover, if β ∉ FV(ρ) then α ∈ Pos(ρ) implies β ∈ Pos(ρ[α := β]) and α ∈ Neg(ρ) implies β ∈ Neg(ρ[α := β]).

Proof Induction on ρ ∈ PosTypes. For the case (V) note that every type variable which does not occur free in ρ is put in Pos(ρ) and Neg(ρ) (e. g. Pos(μαρ) = Pos(ρ) ∪ {α}). In the case (μ) the induction hypothesis for the second and third claim is needed to prove the first claim. _{□}

It follows that if μαρ ∈ PosTypes and β ∉ FV(ρ), then μβ.ρ[α := β] ∈ PosTypes. We knew that before as μβ.ρ[α := β] = μαρ. However, this part of the lemma is again only intended to show compatibility with the renaming convention.

Lemma 3.3 For ρ ∈ PosTypes, Pos(ρ) ∩ Neg(ρ) ∩ FV(ρ) = ∅.

Proof Induction on ρ. _{□}

Lemma 3.4 SPosTypes ⊂ PosTypes and for every ρ ∈ SPosTypes, we have that SPos(ρ) ⊆ Pos(ρ).

Proof Induction on the definition of SPosTypes and SPos(ρ). _{□}

We have that PosTypes ≠ SPosTypes, as e. g. μα.(α → 0) → 0 ∈ PosTypes \ SPosTypes. Concerning the examples of inductive types:

• If ρ ∈ PosTypes, then list(ρ) ∈ PosTypes. In this case Pos(list(ρ)) = Pos(ρ) and Neg(list(ρ)) = Neg(ρ).

• If ρ ∈ PosTypes, then tree(ρ) ∈ PosTypes. In this case we have the reverse situation, namely Pos(tree(ρ)) = Neg(ρ) and Neg(tree(ρ)) = Pos(ρ). (The same holds for tree′(ρ).)

• If ρ ∈ PosTypes, then cont(ρ) ∈ PosTypes. In this case Pos(cont(ρ)) ∩ FV(ρ) = ∅ and Neg(cont(ρ)) ∩ FV(ρ) = ∅.

• Tree ∈ PosTypes and bizarre ∉ PosTypes.

• If ρ ∈ PosTypes, then pos(μαρ) ∈ PosTypes. In this case Pos(pos(μαρ)) = Pos(μαρ) and Neg(pos(μαρ)) = Neg(μαρ). The crucial point is that we did not assume μαρ ∈ PosTypes, i. e., α ∈ Pos(ρ) is not required.

3.3 Height and depth for inductive types

Abstracted types are objects of the form λα⃗ρ, where α⃗ is a finite list of type variables and ρ is a type. The type variables α⃗ are assumed to be bound in the abstracted type (the priority being from the right to the left), and we will extend the renaming convention to abstracted types. If α⃗ is the list (α_{1}, α_{2}, …, α_{n}), we will also write λα_{1}λα_{2} … λα_{n}ρ for λα⃗ρ. Define (λα⃗ρ)[γ⃗ := σ⃗] := λα⃗.ρ[γ⃗ := σ⃗], where we assume that α⃗ ∩ (γ⃗ ∪ FV(σ⃗)) = ∅. For every abstracted type λα⃗ρ define its height h(λα⃗ρ) ∈ ℕ by recursion on ρ as follows:

(triv) h(λα⃗ρ) := 0 if α⃗ ∩ FV(ρ) = ∅ (e. g. ρ = 0 or 1). The following rules will be under the proviso “otherwise”.

(V) h(λα⃗α) := 0 (the proviso implies α ∈ α⃗)

(∘) h(λα⃗.ρ ∘ σ) := 1 + max(h(λα⃗ρ), h(λα⃗σ)) for ∘ ∈ {→, ×, +}

(∇) h(λα⃗∇αρ) := 1 + h(λ(α⃗, α)ρ) for ∇ ∈ {∀, μ}

This definition is compatible with the renaming convention (for abstracted types).

Lemma 3.5 1. h((λα⃗ρ)[γ⃗ := σ⃗]) = h(λα⃗ρ).

2. h(λα⃗ρ) ≥ h(λα′ρ) if α′ ⊆ α⃗.

3. h(λα⃗∇γρ) > h((λγρ)[α⃗ := σ⃗]) if α⃗ ∩ FV(∇γρ) ≠ ∅ (for ∇ ∈ {∀, μ}).

4. h(λα⃗∇γρ) > h((λα⃗ρ)[γ := σ]) if α⃗ ∩ FV(∇γρ) ≠ ∅ (for ∇ ∈ {∀, μ}).

Proof The first two statements are easily proved by induction on ρ. 3.: h(λα⃗∇γρ) =^{Def.} 1 + h(λ(α⃗, γ)ρ) ≥ 1 + h(λγρ) =^{1.} 1 + h((λγρ)[α⃗ := σ⃗]), where the ≥ uses 2. The fourth statement is proved similarly. _{□}

It is possible to show that h(λα⃗ρ) is the height (in the ordinary sense given by only counting connectives and ∀ and μ) of a maximally general generalization of λα⃗ρ. This is not done here because of the unpleasant work of defining this concept properly. Nevertheless, we do not need this characterization for our purposes. In most cases h(λα⃗ρ) will be used for abstracted types with a list α⃗ of length 1. We will now study another measure d of height for abstracted types of this kind where the definition does not use the “detour” through multiply abstracted types. Intuitively, d(λαρ) will be the maximal depth^{3} of a free occurrence of α in ρ. For every abstracted type of the form λαρ define its depth d(λαρ) ∈ ℕ by recursion on ρ and simultaneously prove that d(λαρ[α⃗ := σ⃗]) = d(λαρ) for α ∉ α⃗ ∪ FV(σ⃗) as follows:

(triv) d(λαρ) := 0 if α ∉ FV(ρ) (e. g. ρ = 0 or 1). The following rules will be under the proviso “otherwise”. By Corollary 2.4, we have the same proviso for d(λαρ[α⃗ := σ⃗]).

(V) d(λαα) := 0. Proof trivial.

(∘) d(λα.ρ ∘ σ) := 1 + max(d(λαρ), d(λασ)) for ∘ ∈ {→, ×, +}. Proof obvious.

(∇) d(λα∇γρ) := 1 + d(λαρ) for ∇ ∈ {∀, μ}. By induction hypothesis this definition is compatible with a renaming of γ. The proof of the claim for λα∇γρ is easy.

This definition is compatible with the renaming convention (for abstracted types) because of the simultaneously proved claim. For ease of reference we formulate

Lemma 3.6 1. d((λαρ)[α⃗ := σ⃗]) = d(λαρ).

2. d(λα∇γρ) = 1 + d((λαρ)[γ := σ]) if α ∈ FV(∇γρ) (for ∇ ∈ {∀, μ}).

Proof 1.: Proved in the definition (we may assume that α ∉ α⃗ ∪ FV(σ⃗)). 2.: By definition and by 1. _{□}

Lemma 3.7 d(λαρ) ≤ h(λαρ).

Proof Induction on ρ using Lemma 3.5 (2.) for the cases (∀) and (μ). _{□}

Equality does not hold: h(λα∀γ.(γ → γ) → α) = 3 and d(λα∀γ.(γ → γ) → α) = 2.

3This concept seems more intuitive than the one lying behind the definition of h. However, it is more problematic with respect to our variable convention because variables become unbound in the recursive call. Moreover, some proofs do not go through with d as induction measure instead of h.

3.4 Extension by the existential quantifier

The term systems with suffix +ex in the name will be based on the further extension by existential types. Hence, the type system they will be based on is the system of inductive types extended by the clause (∃) exactly in the same way as it was done in section 2.4.1 where the clause was added to the type system of eF. Extend the inductive definition of SPosTypes and the simultaneous recursive definition of SPos(ρ) for every ρ ∈ SPosTypes by the following clause:

(∃) If ρ ∈ SPosTypes, then ∃αρ ∈ SPosTypes and SPos(∃αρ) := SPos(ρ) ∪ {α}.

The statement of Lemma 3.1 is valid also for this extension and implies compatibility of the definition with the renaming convention for bound variables. Extend the inductive definition of PosTypes and the simultaneous recursive definition of Pos(ρ) and Neg(ρ) for every ρ ∈ PosTypes by the following clause:

(∃) If ρ ∈ PosTypes, then ∃αρ ∈ PosTypes. Pos(∃αρ) := Pos(ρ) ∪ {α}. Neg(∃αρ) :=

Neg(ρ) ∪ {α}.

The statement of Lemma 3.2 holds again for this extension and implies compatibility with the variable convention. Also the statement of Lemma 3.4 holds. All the extensions to the proofs are immediate because (∃) differs from (∀) only in the name of the binder. For this reason the extension of the definition of h and d and Lemma 3.5, Lemma 3.6 and Lemma 3.7 are also trivial: Simply allow ∇ ∈ {∀, μ, ∃}. Recall the embedding of eF+ex in eF. The only clause of interest in the definition of ρ′ was

(∃) (∃αρ)′ := ∀β.(∀α.ρ′ → β) → β for β ∉ {α} ∪ FV(ρ).

This encoding of the existential quantifier is unproblematic with respect to positive types but leads out of the strictly positive types. To be more precise: If ∃αρ ∈ PosTypes and γ ∈ Pos(∃αρ), then ∀β.(∀α.ρ → β) → β ∈ PosTypes and γ ∈ Pos(∀β.(∀α.ρ → β) → β). On the other hand, ∃αγ ∈ SPosTypes, γ ∈ SPos(∃αγ) and ∀β.(∀α.γ → β) → β ∈ SPosTypes, but we have γ ∉ SPos(∀β.(∀α.γ → β) → β) (if γ ∉ {α, β}). Hence, μγ∃αγ ∈ SPosTypes and for γ ∉ {α, β} we have μγ∀β.(∀α.γ → β) → β ∉ SPosTypes. As a further example of inductive types consider

• spos(μαρ) := μα∃β.(β → α) × ρ[α := β] for β ∉ {α} ∪ FV(ρ). This type is the “strict positivization” of μαρ which will be essential in section 6.2.3.

We note that if ρ ∈ SPosTypes, then spos(μαρ) ∈ SPosTypes and SPos(spos(μαρ)) = SPos(μαρ). Moreover, if ρ ∈ PosTypes, then spos(μαρ) ∈ PosTypes and Pos(spos(μαρ)) = Pos(μαρ) and Neg(spos(μαρ)) = Neg(μαρ).

3.5 Restriction to non-interleaving positive inductive types

The term rewrite systems whose names start with NI as NIPIT, NISPIT and NISPIT+ex, but also MePIT and coMePIT, will be based on type systems where nested applications of the μ-rule are only allowed as long as they do not interleave, i. e., types of the form μαρ are ruled out if ρ has a subexpression of the form μβσ where α occurs free. More formally: Inductively define the set NIPosTypes of non-interleaving positive types and simultaneously for every ρ ∈ NIPosTypes the set NIPos(ρ) of type variables which only occur free at positive positions in ρ and are not in the scope of an application of the μ-rule and the set NINeg(ρ) of type variables which only occur free at negative positions in ρ and are not in the scope of an application of the μ-rule as follows: Repeat the definition of PosTypes, Pos and Neg in the cases (V), (→), (∀), (0), (1), (×) and (+) by replacing the words accordingly. Case (μ): If ρ ∈ NIPosTypes and α ∈ NIPos(ρ), then μαρ ∈ NIPosTypes and NIPos(μαρ) := NIPos(ρ) \ FV(μαρ) and NINeg(μαρ) := (NINeg(ρ) \ FV(ρ)) ∪ {α}.

Lemma 3.8 NIPosTypes ⊂ PosTypes and for every ρ ∈ NIPosTypes, we have NIPos(ρ) ⊆ Pos(ρ) and NINeg(ρ) ⊆ Neg(ρ).

Proof Induction on the definition. _{□}

We have that NIPosTypes ≠ PosTypes, as e. g. fin = μαμβ.1 + α × β ∈ PosTypes \ NIPosTypes.

Lemma 3.9 If ρ ∈ NIPosTypes, then Typevars \ FV(ρ) ⊆ NIPos(ρ) ∩ NINeg(ρ).

Proof Induction on ρ. _{□}

Lemma 3.10 The statement of Lemma 3.2 is also valid if the words PosTypes, Pos and Neg are replaced by NIPosTypes, NIPos and NINeg, respectively.

Proof Induction on ρ ∈ NIPosTypes. Evidently, there are only changes in the case (μ): The proof of the first statement in Lemma 3.2 is refined by reference to Lemma 2.3, the proof of the last statement becomes very easy because w.l.o.g. α ∉ FV(ρ). _{□}

Define the set NISPosTypes and for every ρ ∈ NISPosTypes the set NISPos(ρ) of type variables which only occur free at strictly positive positions in ρ and are not bound by an application of the μ-rule in the same way: Take the definition of SPosTypes and SPos and replace the words accordingly. The case (μ) becomes: If ρ ∈ NISPosTypes and α ∈ NISPos(ρ), then μαρ ∈ NISPosTypes and NISPos(μαρ) := NISPos(ρ) \ FV(μαρ).

Lemma 3.11 If ρ ∈ NISPosTypes, then Typevars \ FV(ρ) ⊆ NISPos(ρ).

Proof Induction on ρ. _{□}

It quite obvious that NISPosTypes stands in the same relation to NIPosTypes as SPosTypes stands to PosTypes and consequently NISPosTypes is simply the intersection of SPosTypes and NIPosTypes. The extension by the existential quantifier is again trivial (because ∀ and ∃ are treated exactly the same). Let us review the examples of inductive types:

• nat ∈ NISPosTypes.

• If ρ ∈ NISPosTypes, then list(ρ) ∈ NISPosTypes and NISPos(list(ρ)) ∩ FV(ρ) = ∅. If ρ ∈ NIPosTypes, then list(ρ) ∈ NIPosTypes and NIPos(list(ρ)) ∩ FV(ρ) = ∅ and also NINeg(list(ρ)) ∩ FV(ρ) = ∅. The same holds for tree(ρ) and tree′(ρ).

• tree ∈ NISPosTypes and fin ∉ NIPosTypes, because tree is only nested but fin is interleaved.

• If ρ ∈ NIPosTypes, then cont(ρ) ∈ NIPosTypes.

• Tree ∉ NIPosTypes.

• If ρ ∈ NIPosTypes, then pos(μαρ) ∈ NIPosTypes due to Lemma 3.9.

• If ρ ∈ NISPosTypes, then spos(μαρ) ∈ NISPosTypes due to Lemma 3.11. If ρ ∈ NIPosTypes, then spos(μαρ) ∈ NIPosTypes (again due to Lemma 3.9).

Systems with monotone inductive types

Let (U, ⊆) be a complete lattice of sets and Φ a monotone operator on it. In the introduction to the preceding chapter we stated the following corollary to Tarski’s fixed-point theorem:

(lfp-E) If x ∈ lfp(Φ) and Φ(M) ⊆ M, then x ∈ M.

In our naïve realizability interpretation we interpret Φ by some λαρ, lfp(Φ) by μαρ and M by some type σ. The truth of x ∈ lfp(Φ) is modelled by some term r of type μαρ and the truth of Φ(M) ⊆ M by some term s of type ρ[α := σ] → σ. We conclude the truth of x ∈ M, which hence is to be modelled by a term of type σ constructed out of r and s. This motivates the following rule^{1} of μ-elimination for EMIT (to be defined in the next section)

(μ-E) If r^{μαρ} ∈ Λ and s^{ρ[α:=σ]→σ} ∈ Λ, then (rE_{μ}s)^{σ} ∈ Λ.

Let us now introduce the concept of “extended induction” (which will turn out to be the counterpart of full primitive recursion). Let (U, ≤) be a complete lattice and Φ a monotone operator on it and M ∈ U. We apply the minimality of lfp(Φ) to M′ := lfp(Φ) ∧ M.^{2} Therefore lfp(Φ) ≤ M′, if Φ(M′) ≤ M′. Let Φ(M′) ≤ M. Because M′ ≤ lfp(Φ) and Φ is monotone, also Φ(M′) ≤ Φ(lfp(Φ)). Because lfp(Φ) is a pre-fixed-point of Φ (it is even a fixed point) and due to transitivity Φ(M′) ≤ lfp(Φ). Hence, Φ(M′) ≤ M′. Using the trivial fact that lfp(Φ) ≤ M′ implies lfp(Φ) ≤ M, we conclude

(lfp-E^{+}) Φ(lfp(Φ) ∧ M) ≤ M ⇒ lfp(Φ) ≤ M.

Let now (U, ⊆) be even a complete lattice of sets and Φ be monotone. The preceding rule reads

(lfp-E^{+}) If x ∈ lfp(Φ) and Φ(lfp(Φ) ∧ M) ⊆ M, then x ∈ M.

This shall be called extended induction on lfp(Φ). As for (lfp-E) this directly motivates the following second rule^{3} of μ-elimination for EMIT:

1Note that it would be more traditional to assume an iterator constant I_{μαρ,σ} of type (ρ[α := σ] → σ) → μαρ → σ instead of this rule (μ-E). But the present notation allows a uniform treatment of eliminations as expressed by the vector notation already introduced for every system in “the basic framework”.

2∧ denotes the infimum of two lattice elements.

3Again it would be closer to standard presentations of e. g. Gödel’s T if instead of the rule we had a recursor constant R_{μαρ,σ} of type (ρ[α := μαρ × σ] → σ) → μαρ → σ in the system. Many thanks to Felix Joachimski for encouraging me to use the elimination notation throughout which came up in a discussion with him.

(μ-E^{+}) If r^{μαρ} ∈ Λ and s^{ρ[α:=μαρ×σ]→σ} ∈ Λ, then (rE_{μ}^{+}s)^{σ} ∈ Λ.

We come to the introduction rule which is the rule pertaining to lfp(Φ) being a pre-fixed-point of Φ:

(lfp-I) If x ∈ Φ(lfp(Φ)), then x ∈ lfp(Φ).

Note that although we always assumed Φ to be monotone, the rules (lfp-E^{(+)}) would have trivially been valid for any Φ if we had set lfp(Φ) := ⋀ U. (lfp-I) does not accord with this setting. Hence, we pursue the following approach which is typical of logic: We assume lfp(Φ) always to exist (in a formal system, we would introduce some predicate constant). We do not require the monotonicity of Φ! Then we describe lfp(Φ) axiomatically by (lfp-E^{(+)}) and the following refined

(lfp-I-mon) If x ∈ Φ(lfp(Φ)) and Φ monotone, then x ∈ lfp(Φ).

Hence, for monotone Φ we may use Tarski’s theorem to construct lfp(Φ), and the trivial ⋀ U otherwise. Φ monotone means ∀M∀M′.(∀x.x ∈ M ⇒ x ∈ M′) ⇒ ∀y(y ∈ Φ(M) ⇒ y ∈ Φ(M′)). Hence, by our usual interpretation we can motivate the rule of μ-introduction for EMIT

(μ-I) If t^{ρ[α:=μαρ]} ∈ Λ and m^{∀α∀β.(α→β)→ρ→ρ[α:=β]} ∈ Λ (with β ∉ {α} ∪ FV(ρ)), then

(C_{μαρ}mt)^{μαρ} ∈ Λ.

The term m is the witness of monotonicity for λαρ. The monotonicity witnesses are thus constructed simultaneously with the terms (they are terms) instead of being given from outside. The idea of the systems ESMIT is to free the introduction rule from the monotonicity witness but to ensure that for every μαρ in the system (those which are allowed have to be specified) there is a monotonicity witness given beforehand. This witness also has to be a term of the system and clearly, we have to restrict the use of (μ-I) (without the monotonicity witness) in the construction of those witnesses. The exact condition will be called “stratification”. A variant varEMIT of EMIT is introduced which is motivated by the observation that only special cases of the monotonicity of Φ are needed for justifying the β-rules of EMIT. The system IMIT is dual to the system EMIT in the sense that the monotonicity witnesses are tied to the elimination rules instead of the introduction rule. (The rule (lfp-I) is valid if we set lfp(Φ) := ⋀ ∅ and the monotonicity requirement in the elimination rules guarantees that Tarski’s theorem applies for the construction of lfp(Φ) validating all the rules in case Φ is monotone.) The systems ISMIT and varIMIT are derived from the same considerations as ESMIT and varEMIT are derived from EMIT. If one mimicks the construction of varEMIT directly for IMIT, then βreduction does not normalize!

4.1 The elimination-based term rewrite system EMIT of monotone inductive types

EMIT is “elimination-based” because μ-elimination is primitive in the sense that no monotonicity witness is needed there. It is a system of monotone inductive types because there is no syntactic restriction on forming μαρ but the requirement of a monotonicity witness in the μ-introduction rule. For the system IMIT defined in section 4.4 elimination and introduction change roles in this description. It seems to be better compliant with the philosophical semantics of Martin-Löf’s type theory in [ML84] if one fixes the monotonicity witness to the introduction rule because monotonicity is a part of the justification for the existence of an object in the type μαρ—it is the justification that μαρ is studied at all!

4.1.1 Definition

The (second) definition of typed terms and their free variables for system eF is extended by the following clauses:

(μ-I) If t^{ρ[α:=μαρ]} ∈ Λ and m^{∀α∀β.(α→β)→ρ→ρ[α:=β]} ∈ Λ (with β ∉ {α} ∪ FV(ρ)), then

(C_{μαρ}mt)^{μαρ} ∈ Λ and FV(C_{μαρ}mt) := FV(m) ∪ FV(t).

(μ-E) If r^{μαρ} ∈ Λ and s^{ρ[α:=σ]→σ} ∈ Λ, then (rs)^{σ} ∈ Λ (also written as rE_{μ}σs or shorter

rE_{μ}s) and FV(rs) := FV(r) ∪ FV(s).

(μ-E^{+}) If r^{μαρ} ∈ Λ and s^{ρ[α:=μαρ×σ]→σ} ∈ Λ, then (rs)^{σ} ∈ Λ (also written as rE_{μ}^{+}σs or

shorter rE_{μ}^{+}s) and FV(rs) := FV(r) ∪ FV(s).

This definition is again compatible with the renaming convention for bound type variables. We freely use all of the notational machinery previously introduced for F and eF. If r : μαρ, we say that r is of μ-type. (The use of “inductive type” is discouraged because it should be used more generally for any type of the systems which have iteration or primitive recursion.) We extend the naming convention by assuming that m always denotes a term. As was mentioned after giving the very first inductive definition of types (for system F) it is our understanding that the rules freely generate the structure. If α ∈ FV(ρ) then ρ[α := σ] ≠ ρ[α := μαρ × σ] and therefore the types of the terms s in the rules (μ-E) and (μ-E^{+}) are different. Otherwise rs can be generated by both rules. But according to our free generation assumption we have to distinguish them. Hence, the notation rE_{μ}s vs. rE_{μ}^{+}s is nearer to the “true” terms. However, in theoretic studies on the system EMIT it is quite unusual to focus specifically on cases where α ∉ FV(ρ) and therefore the appearance of μαρ in the string which represents the type of s^{ρ[α:=μαρ×σ]→σ} clearly indicates that the use of rule (μ-E^{+}) is intended. Extend the recursive definition of FTV(r) by the following clauses:

(μ-I) FTV(C_{μαρ}mt) := FV(μαρ) ∪ FTV(m) ∪ FTV(t).

(μ-E^{(+)}) FTV(rs) := FTV(r) ∪ FTV(s).

The definition of r[xρ⃗ := s⃗] together with the proof of r^{ρ}[xρ⃗ := s⃗] : ρ and FV(r[xρ⃗ := s⃗]) = (FV(r) \ xρ⃗) ∪ ⋃{FV(s_{i})|x_{i}^{ρ_{i}} ∈ FV(r) ∧ x_{i}^{ρ_{i}} ≠ x_{j}^{ρ_{j}} for j < i} (i. e., the statement of Lemma 2.10) is extended by the following clauses:

(μ-I) (C_{μαρ}mt)[xρ⃗ := s⃗] := C_{μαρ}m[xρ⃗ := s⃗]t[xρ⃗ := s⃗]. Proof obvious.
(μ-E) (rs)[xρ⃗ := s⃗] := r[xρ⃗ := s⃗]E_{μ}s[xρ⃗ := s⃗]. Proof obvious.
(μ-E^{+}) (rs)[xρ⃗ := s⃗] := r[xρ⃗ := s⃗]E_{μ}^{+}s[xρ⃗ := s⃗]. Proof obvious.

The definition of r[α⃗ := σ⃗] together with the proof of r^{ρ}[α⃗ := σ⃗] : ρ[α⃗ := σ⃗] and FV(r[α⃗ := σ⃗]) = {y^{τ[α⃗:=σ⃗]}|y^{τ} ∈ FV(r)} is extended by the following clauses:

(μ-I) (C_{μαρ}mt)[α⃗ := σ⃗] := C_{(μαρ)[α⃗:=σ⃗]}m[α⃗ := σ⃗]t[α⃗ := σ⃗]. Proof obvious.
(μ-E) (rs)[α⃗ := σ⃗] := r[α⃗ := σ⃗]E_{μ}s[α⃗ := σ⃗]. Proof obvious.
(μ-E^{+}) (rs)[α⃗ := σ⃗] := r[α⃗ := σ⃗]E_{μ}^{+}s[α⃗ := σ⃗]. Proof obvious.

The statements made in section 2.1.2 are valid in EMIT, too. The general definition of immediate subterms of a term gives the following extension for system EMIT: C_{μαρ}mt has exactly the immediate subterms m and t and rE_{μ}s and rE_{μ}^{+}s have exactly the immediate subterms r and s. Extend the inductive definition of rs⃗ for system eF as follows:

(μ-E) If rs⃗ : μαρ and s : ρ[α := σ] → σ, then r(s⃗, s) := (rs⃗)s.
(μ-E^{+}) If rs⃗ : μαρ and s : ρ[α := μαρ × σ] → σ, then r(s⃗, s) := (rs⃗)s.

The statement of Lemma 2.23 holds also true for EMIT.

Lemma 4.1 (Head form) Every term has either exactly one of the forms given in Lemma 2.44 or exactly one of the following forms:

(μ-I) C_{μαρ}mt

(μ-R^{(+)}) (C_{μαρ}mt)ss⃗, subsuming both eliminations for μ

Proof Induction on terms. _{□}

Extend the inductive definition of the set NF for system eF by the following clause:

(μ-I) If C_{μαρ}mt is a term and m ∈ NF and t ∈ NF, then C_{μαρ}mt ∈ NF.

The statements made in section 2.1.4 are all valid in EMIT. Define the relation ↦ as for system eF, but add the following clauses:

EMIT

\begin{matrix}(β_{μ}) & (C_{μαρ}mt)E_{μ}σs ↦ & s(m(μαρ)σ(λx^{μαρ}.xE_{μ}σs)t) \\ (β_{μ}^{+}) & (C_{μαρ}mt)E_{μ}^{+}σs ↦ & s(m(μαρ)(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩)t) \end{matrix}

In both rules we require that x^{μαρ} ∉ FV(s). The rule (β_{μ}) is the reduction rule associated with iteration and (β_{μ}^{+}) represents primitive recursion. As for system eF the objects on the right side are automatically terms if the respective object on the left is a term, and the types are equal (which is not as trivial as before and is the main proof-theoretic justification for these rules as was mentioned before in the discussion on the Curry-Howard isomorphism). The relation →_{whd} is defined as for system F and has the same properties as stated there. Extend the inductive definition of the relation → for system eF by the following clauses (and prove that if r → r′, then r and r′ have the same type and FV(r′) ⊆ FV(r))^{4}:

(μ-I) If m → m′, then C_{μαρ}mt → C_{μαρ}m′t. If t → t′, then C_{μαρ}mt → C_{μαρ}mt′.
(μ-E) If r → r′, then rE_{μ}s → r′E_{μ}s. If s → s′, then rE_{μ}s → rE_{μ}s′.
(μ-E^{+}) If r → r′, then rE_{μ}^{+}s → r′E_{μ}^{+}s. If s → s′, then rE_{μ}^{+}s → rE_{μ}^{+}s′.

(The proofs were trivial.) The extra β_{→}-redex on the right side of the β_{μ}^{+}-rule is useful for applications. In order to represent a function which is defined by primitive recursion on an inductively defined set represented by μαρ with values in a set represented by σ, we assume a closed term s of type ρ[α := μαρ × σ] → σ and set the representing term F := λx^{μαρ}.xE_{μ}^{+}σs which is a closed term of type μαρ → σ. We have

F (C_{μαρ}mt) ↦_{β_{→}} C_{μαρ}mtE_{μ}^{+}σs ↦_{β_{μ}^{+}} s(m(μαρ)(μαρ × σ)(λx^{μαρ}.⟨x, F x⟩)t)

and therefore the left term →^{+}-reduces to the right term which is valuable in practice. (Subscripts to ↦ indicate the rule which is used.) Extend the inductive definition of WN for system eF by the following clauses:

4See also footnote 4 on p. 19 concerning well-formedness.

(μ-I) If C_{μαρ}mt is a term and m ∈ WN and t ∈ WN, then C_{μαρ}mt ∈ WN.

(β_{μ}) If s(m(μαρ)σ(λx^{μαρ}.xE_{μ}σs)t)s⃗ ∈ WN, x^{μαρ} ∉ FV(s) and (C_{μαρ}mt)E_{μ}σss⃗ is a

term, then (C_{μαρ}mt)E_{μ}σss⃗ ∈ WN.

(β_{μ}^{+}) If s(m(μαρ)(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩)t)s⃗ ∈ WN, x^{μαρ} ∉ FV(s) and

(C_{μαρ}mt)E_{μ}^{+}σss⃗ is a term, then (C_{μαρ}mt)E_{μ}^{+}σss⃗ ∈ WN.

Again definition by recursion on WN is admissible. Extend the recursive definition of the function Ω from WN to Λ and the simultaneous proof of r →^{∗} Ω(r) ∈ NF for r ∈ WN by the following clauses:

(μ-I) Ω(C_{μαρ}mt) := C_{μαρ}Ω(m)Ω(t).
(β_{μ}) Ω((C_{μαρ}mt)E_{μ}σss⃗) := Ω(s(m(μαρ)σ(λx^{μαρ}.xE_{μ}σs)t)s⃗).

(β_{μ}^{+}) Ω((C_{μαρ}mt)E_{μ}^{+}ss⃗) := Ω(s(m(μαρ)(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩)t)s⃗).

The proofs are always obvious. Extend the definition of SN for system eF by the following clauses:

(μ-I) If C_{μαρ}mt is a term and m ∈ SN and t ∈ SN, then C_{μαρ}mt ∈ SN.

(β_{μ}) If s(m(μαρ)σ(λx^{μαρ}.xE_{μ}σs)t)s⃗ ∈ SN, x^{μαρ} ∉ FV(s) and (C_{μαρ}mt)E_{μ}σss⃗ is a term,

then (C_{μαρ}mt)E_{μ}σss⃗ ∈ SN.

(β_{μ}^{+}) If s(m(μαρ)(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩)t)s⃗ ∈ SN, x^{μαρ} ∉ FV(s) and

(C_{μαρ}mt)E_{μ}^{+}σss⃗ is a term, then (C_{μαρ}mt)E_{μ}^{+}σss⃗ ∈ SN.

The only difference between the μ-clauses for SN and WN is the name of the defined set. Every statement made in section 2.1.4 for system F (on nf, NF, wn, WN, Ω, SN and sn) is also true for EMIT.

4.1.2 Monotonicity without positivity

In this section we give evidence that monotonicity is more general than positivity. Note, however, that it is shown in this thesis that iteration on monotone inductive types may even be embedded into system F and that primitive recursion on monotone inductive types may be reduced (via impredicative encodings) to primitive recursion on positive inductive types. The following example is due to Ulrich Berger (private communication, September 25, 1997). For every type σ of system eF define ¬σ := σ → 0. Define ρ := (¬¬α → α) → α. Obviously, ρ ∈ PosTypes, but α ∉ Pos(ρ) (where we view ρ as an inductive type formed without μ in order to have the notion of positivity). Let u, v and w be term variables. Define the closed term r of system eF by

r := ΛαΛβλx^{α→β}λy^{ρ}λz^{¬¬β→β}.z(λu^{¬β}.u(x(y(λv^{¬¬α}.(v(λw^{α}.u(xw)))E_{0}α)))).

It is not hard to see that r : ∀α∀β.(α → β) → ρ → ρ[α := β]. This example should be contrasted with the following: Set ρ′ := (α → α) → α. Define the closed term r of system F by

r := ΛαΛβλx^{α→β}λy^{ρ′}λz^{β→β}.x(y(λu^{α}u)).

It is very easy to see that r : ∀α∀β.(α → β) → ρ′ → ρ′[α := β]. This second example is not convincing because there are closed terms s : ρ′ → α and t : α → ρ′ and trivially α ∈ Pos(α). (Set s := λy^{ρ′}.(y(λu^{α}u)) and t := λx^{α}λy^{α→α}x.) The first example does not have the tautology α → α in the premise of the implication but ¬¬α → α which is only a tautology in classical logic (it defines classical logic). There is no hope for a type τ ∈ PosTypes with α ∈ Pos(τ) such that there are closed terms s : ρ → τ and t : τ → ρ. The example can be streamlined (Ulrich Berger, private communication, October 1, 1997) to only use the →-fragment of minimal propositional logic, i. e., where only the type constructor → is used and not 0: ρ is replaced by (((α → σ) → α) → α) → α for an arbitrary σ with α ∉ FV(σ). With the notation for the Peirce formula of Lemma 2.42 this type is peirce(σ) → α. And by Corollary 2.43 we know that this example is essentially the same as the first one. If we set τ := μα.peirce(σ) → α, we get a type which is not inhabited: There is a closed term s of type ((((0 → σ) → 0) → 0) → 0) → 0, namely

s := λz^{((((0→σ)→0)→0)→0)}.z(λy^{(0→σ)→0}.(λw^{0}.wE_{0}σ)).

Therefore we have the closed term λx^{τ} .xE_{μ}0s : τ → 0. Because 0 is not inhabited, neither is τ. But we may define bizarre(σ) := μα.1 + (peirce(σ) → α) and get an inhabited type^{5} which is monotone and not positive. Note that λα.α → 1 is trivially monotone and not positive. The type μα.α → 1 will be dicussed in appendix B.

4.2 The term rewrite systems ESMIT of elimination-based selected monotone inductive types

These systems were invented to clarify the following observation: When trying to embed PIT (to be defined in section 5.1.1) into EMIT apparently the specific definition of map_{λαρ} (and comap_{λαρ}) does not enter the argument. Due to interleaving those map-terms also have to use the term rules for μ-types. And it is intuitively clear that the monotonicity witness used for defining the reduction behaviour of a type should not make use of this very type. A deeper analysis shows that the properties needed are exactly stratification and uniformity introduced below.

4.2.1 Definition

Let MTypes (for “monotone types”) be a subset of Types which is closed under substitution and the type-forming operations of system eF, i.e.

(V) If α ∈ Typevars, then α ∈ MTypes.

(∘) If ρ ∈ MTypes and σ ∈ MTypes, then ρ ∘ σ ∈ MTypes (for ∘ ∈ {→, ×, +}).

(∀) If α ∈ Typevars and ρ ∈ MTypes, then ∀αρ ∈ MTypes.

(0) 0 ∈ MTypes.

(1) 1 ∈ MTypes.

5Note that this type need not be trivial. The type nat = μα.1 + α is much more interesting than μαα which is also empty because 0 → 0 is inhabited.

(sub) If ρ, σ⃗ ∈ MTypes, then ρ[α⃗ := σ⃗] ∈ MTypes.

Prominent examples for MTypes are the sets SPosTypes and PosTypes of section 3.2. We set up the naming convention that in the systems ESMIT which are now being defined, the symbols ρ, σ and τ (also with decoration) denote elements of MTypes. Define a term system by extending the restriction of eF which is derived from eF by taking the types ρ, σ and τ only out of MTypes as follows: Add the clauses

(μ-I) If μαρ ∈ MTypes and t^{ρ[α:=μαρ]} ∈ Λ, then (C_{μαρ}t)^{μαρ} ∈ Λ and FV(C_{μαρ}t) := FV(t).

(μ-E) If r^{μαρ} ∈ Λ and s^{ρ[α:=σ]→σ} ∈ Λ, then (rs)^{σ} ∈ Λ (also written as rE_{μ}σs or shorter

rE_{μ}s) and FV(rs) := FV(r) ∪ FV(s).

(μ-E^{+}) If r^{μαρ} ∈ Λ and s^{ρ[α:=μαρ×σ]→σ} ∈ Λ then (rs)^{σ} ∈ Λ (also written as rE_{μ}^{+}σs or

shorter rE_{μ}^{+}s) and FV(rs) := FV(r) ∪ FV(s).

Lemma 4.2 If π ∈ Types and r^{π} ∈ Λ, then π ∈ MTypes.

Proof Obvious. Use the closure properties imposed on MTypes (and the naming convention!)._{□}

We use the notational machinery as for EMIT including the convention concerning the disambiguation of rs into rE_{μ}s and rE_{μ}^{+}s. Extend the recursive definition of FTV(r) by the following clauses:

(μ-I) FTV(C_{μαρ}t) := FV(μαρ) ∪ FTV(t).
(μ-E) FTV(rs) := FTV(r) ∪ FTV(s).
(μ-E^{+}) FTV(rs) := FTV(r) ∪ FTV(s).

The definition of r[xρ⃗ := s⃗] together with the proof of r^{ρ}[xρ⃗ := s⃗] : ρ and FV(r[xρ⃗ := s⃗]) = (FV(r) \ xρ⃗) ∪ ⋃{FV(s_{i})|x_{i}^{ρ_{i}} ∈ FV(r) ∧ x_{i}^{ρ_{i}} ≠ x_{j}^{ρ_{j}} for j < i} (i. e., the statement of Lemma 2.10) is extended by the following clauses:

(μ-I) (C_{μαρ}t)[xρ⃗ := s⃗] := C_{μαρ}t[xρ⃗ := s⃗]. Proof obvious.
(μ-E) (rs)[xρ⃗ := s⃗] := r[xρ⃗ := s⃗]E_{μ}s[xρ⃗ := s⃗]. Proof obvious.
(μ-E^{+}) (rs)[xρ⃗ := s⃗] := r[xρ⃗ := s⃗]E_{μ}^{+}s[xρ⃗ := s⃗]. Proof obvious.

The definition of r[α⃗ := σ⃗] together with the proof of r^{ρ}[α⃗ := σ⃗] : ρ[α⃗ := σ⃗] and FV(r[α⃗ := σ⃗]) = {y^{τ[α⃗:=σ⃗]}|y^{τ} ∈ FV(r)} is extended by the following clauses:

(μ-I) (C_{μαρ}t)[α⃗ := σ⃗] := C_{(μαρ)[α⃗:=σ⃗]}t[α⃗ := σ⃗]. Proof obvious. Note that we need the (sub)-rule of the restriction on MTypes.

(μ-E) (rs)[α⃗ := σ⃗] := r[α⃗ := σ⃗]E_{μ}s[α⃗ := σ⃗]. Proof obvious.
(μ-E^{+}) (rs)[α⃗ := σ⃗] := r[α⃗ := σ⃗]E_{μ}^{+}s[α⃗ := σ⃗]. Proof obvious.

The statements made in section 2.1.2 are valid in the systems ESMIT, too. The general definition of immediate subterms of a term gives the following extension for the systems ESMIT: C_{μαρ}t has exactly the immediate subterm t and rE_{μ}s and rE_{μ}^{+}s have exactly the immediate subterms r and s. Extend the inductive definition of rs⃗ for system eF as follows:

(μ-E) If rs⃗ : μαρ and s : ρ[α := σ] → σ, then r(s⃗, s) := (rs⃗)s.
(μ-E^{+}) If rs⃗ : μαρ and s : ρ[α := μαρ × σ] → σ, then r(s⃗, s) := (rs⃗)s.

The statement of Lemma 2.23 holds also true for the systems ESMIT.

Lemma 4.3 (Head form) Every term has either exactly one of the forms given in Lemma 2.44 or exactly one of the following forms:

(μ-I) C_{μαρ}t

(μ-R) (C_{μαρ}t)ss⃗, subsuming both eliminations for μ

Proof Induction on terms. _{□}

Extend the inductive definition of the set NF for system eF by the following clause:

(μ-I) If C_{μαρ}t is a term and t ∈ NF, then C_{μαρ}t ∈ NF.

The statements made in section 2.1.4 are all valid in the systems ESMIT. A term rewrite system of elimination-based selected monotone inductive types (generic name is ESMIT) is given by a set MTypes as above and a family {map_{λαρ}|μαρ ∈ MTypes} where for every μαρ ∈ MTypes the object map_{λαρ} is a closed term of type ∀α∀β.(α → β) → ρ → ρ[α := β] (with β ∉ {α} ∪ FV(ρ)) under the following conditions:

(C) Compatibility: The indexing of the family is compatible with the renaming convention for bound type variables. (This is understood, but mentioned once at this place.)

(U) Uniformity: map_{λαρ}[α⃗ := σ⃗] = map_{(λαρ)[α⃗:=σ⃗]}.

(S) Stratification: There is a well-founded relation ≻ on the types of the form μαρ such that whenever C_{μα′ρ′}t is a subterm of map_{λαρ}, then μαρ ≻ μα′ρ′.

Well-foundedness of a binary relation > on a set M shall for our purposes be defined to be the following property: If A ⊆ M and ∀x ∈ M.(∀y ∈ M.x > y → y ∈ A) → x ∈ A, then A = M. (In the language of term rewrite systems this is nothing but the assumption that > is strongly normalizing.) The existence of the family {map_{λαρ}|μαρ ∈ MTypes} ensures that the abstracted types λαρ with μαρ ∈ MTypes may be “turned into functors”. In [Loa97] this is exemplified in the special case of a predicative variant of SPIT (see section 5.2). Define the relation ↦ as for system eF (but with types restricted to MTypes and the restriction of the terms as above), but add the following clauses:

ESMIT

(β_{μ})  (C_{μαρ}t)E_{μ}σs ↦ s(map_{λαρ}(μαρ)σ(λx^{μαρ}.xE_{μ}σs)t)
(β_{μ}^{+})  (C_{μαρ}t)E_{μ}^{+}σs ↦ s(map_{λαρ}(μαρ)(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩)t)

In both rules we require that x^{μαρ} ∉ FV(s). As for system EMIT the objects on the right side are automatically terms if the respective object on the left is a term, and the types are equal (which needs the same reasoning as for EMIT). The relation →_{whd} is defined as for system F and has the same properties as stated there. Extend the inductive definition of the relation → for system eF by the following clauses (and prove that if r → r′, then r and r′ have the same type and FV(r′) ⊆ FV(r)):

(μ-I) If t → t′, then C_{μαρ}t → C_{μαρ}t′.

(μ-E) If r → r′, then rE_{μ}s → r′E_{μ}s. If s → s′, then rE_{μ}s → rE_{μ}s′.

(μ-E^{+}) If r → r′, then rE_{μ}^{+}s → r′E_{μ}^{+}s. If s → s′, then rE_{μ}^{+}s → rE_{μ}^{+}s′.

(The proofs were trivial.) The rules above are called the congruence rules for μ. Extend the inductive definition of WN for system eF by the following clauses:

(μ-I) If C_{μαρ}t is a term and t ∈ WN, then C_{μαρ}t ∈ WN.

(β_{μ}) If s(map_{λαρ}(μαρ)σ(λx^{μαρ}.xE_{μ}σs)t)s⃗ ∈ WN, x^{μαρ} ∉ FV(s) and (C_{μαρ}t)E_{μ}σss⃗ is a

term, then (C_{μαρ}t)E_{μ}σss⃗ ∈ WN.

(β_{μ}^{+}) If s(map_{λαρ}(μαρ)(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩)t)s⃗ ∈ WN, x^{μαρ} ∉ FV(s)

and (C_{μαρ}t)E_{μ}^{+}σss⃗ is a term, then (C_{μαρ}t)E_{μ}^{+}σss⃗ ∈ WN.

Again definition by recursion on WN is admissible. Extend the recursive definition of the function Ω from WN to Λ and the simultaneous proof of r →^{∗} Ω(r) ∈ NF for r ∈ WN by the following clauses:

(μ-I) Ω(C_{μαρ}t) := C_{μαρ}Ω(t).
(β_{μ}) Ω((C_{μαρ}t)E_{μ}σss⃗) := Ω(s(map_{λαρ}(μαρ)σ(λx^{μαρ}.xE_{μ}σs)t)s⃗).

(β_{μ}^{+}) Ω((C_{μαρ}t)E_{μ}^{+}ss⃗) := Ω(s(map_{λαρ}(μαρ)(μαρ × σ)(λx^{μαρ}.⟨x,(λx^{μαρ}.xE_{μ}^{+}σs)x⟩)t)s⃗).

The proofs are always obvious. Extend the definition of SN for system eF by the following clauses:

(μ-I) If C_{μαρ}t is a term and t ∈ SN, then C_{μαρ}t ∈ SN.

(β_{μ}) If s(map_{λαρ}(μαρ)σ(λx^{μαρ}.xE_{μ}σs)t)s⃗ ∈ SN, x^{μαρ} ∉ FV(s) and (C_{μαρ}t)E_{μ}σss⃗ is a

term, then (C_{μαρ}t)E_{μ}σss⃗ ∈ SN.

(β_{μ}^{+}) If s(map_{λαρ}(μαρ)(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩)t)s⃗ ∈ SN, x^{μαρ} ∉ FV(s)

and (C_{μαρ}t)E_{μ}^{+}σss⃗ is a term, then (C_{μαρ}t)E_{μ}^{+}σss⃗ ∈ SN.

The only difference between the μ-clauses for SN and WN is the name of the defined set. Every statement made in section 2.1.4 for system F (on nf, NF, wn, WN, Ω, SN and sn) is also true for the systems ESMIT. Note that the conditions (U) and (S) were not used in this section. Nevertheless to my mind they should be part of the definition.

4.2.2 Embedding the systems ESMIT in EMIT

The embedding of the types will be the trivial one, i. e., ρ′ := ρ for every type ρ ∈ MTypes. Let Λ′ be the set of terms of EMIT. Inductively define the set ST of stratified terms of the system ESMIT as a subset of Λ as follows:

(eF) All of the term generation rules of eF (where Λ is replaced by ST).

(μ-I) If t^{ρ[α:=μαρ]} ∈ ST and map_{λαρ} ∈ ST, then C_{μαρ}t ∈ ST.

(μ-E) If r^{μαρ} ∈ ST and s^{ρ[α:=σ]→σ} ∈ ST, then rs ∈ ST.
(μ-E^{+}) If r^{μαρ} ∈ ST and s^{ρ[α:=μαρ×σ]→σ} ∈ ST then rs ∈ ST.

This definition is well-parsed in the sense which was explained for the definition of WN. Hence, we may define functions on ST by recursion on the definition. Define the function −′ : ST → Λ′ by recursion on ST and simultaneously prove that for r : ρ we have r′ : ρ and FTV(r′) = FTV(r) and FV(r′) = FV(r) as follows:

(eF) The homomorphic term rules for eF. (Because of ρ′ = ρ the rule (→-I) may be simplified to (λx^{ρ}r)′ := λx^{ρ}r′ without the additional assumption.)

(μ-I) (C_{μαρ}t)′ := C_{μαρ}(map_{λαρ})′t′.
(μ-E) (rE_{μ}s)′ := r′E_{μ}s′.
(μ-E^{+}) (rE_{μ}^{+}s)′ := r′E_{μ}^{+}s′.

(The proofs are trivial.) The rules (μ-E) and (μ-E^{+}) are called the homomorphic μ-elimination rules. (μ-E) is called the homomorphic μ-elimination rule and (μ-E^{+}) is called the homomorphic μ^{+}-elimination rule.

Lemma 4.4 Every (not necessarily proper) subterm r of map_{λαρ} is in ST.

Proof Main induction on μαρ along ≻ coming from our assumption (S). Side induction on r (i. e., on the definition of Λ). All the term formation rules of eF and (μ-E) and (μ-E^{+}) are dealt with by the side induction hypothesis. E. g. (→-E): Let rE_{→}s be a subterm of map_{λαρ}. Then r and s are subterms of map_{λαρ}. By the side induction hypothesis, r and s are in ST. By the rule (eF) of the definition of ST, rs ∈ ST. We come to the crucial case (μ-I): Let C_{μα′ρ′}t be a subterm of map_{λαρ}. By assumption (S) we have μαρ ≻ μα′ρ′. By the main induction hypothesis for map_{λα′ρ′} itself, we know that map_{λα′ρ′} ∈ ST. t is a subterm of map_{λαρ}. By the side induction hypothesis, t ∈ ST. By the rule (μ-I) of the definition of ST, C_{μα′ρ′}t ∈ ST. _{□}

Corollary 4.5 If t ∈ ST and C_{μαρ}t ∈ Λ, then C_{μαρ}t ∈ ST. _{□}

Corollary 4.6 ST = Λ.

Proof ST has all the closure properties which define Λ. _{□}

Therefore, −′ is defined on all terms. Obviously, it is injective on terms. It should be mentioned that ST = Λ is not only a consequence of (S), but in fact equivalent to (S) (relative to the setting without (U) and (S)). The relation ≻ may be generated by assigning to a μαρ the least ordinal θ (which exists under the assumption ST = Λ) such that C_{μαρ}x^{ρ[α:=μαρ]} (with a fixed x ∈ Vars) is in the application of the θ-iterate of the monotone operator associated with the inductive definition of ST to the empty set, and by comparing those ordinals.

Lemma 4.7 If map_{λαρ} ∈ NF for all μαρ ∈ MTypes, then for every r ∈ NF, also r′ ∈ NF.

Proof Induction on r ∈ ST using case analysis on r ∈ NF. _{□}

Lemma 4.8 (r[xρ⃗ := sρ⃗])′ = r′[xρ⃗ := s⃗′] and (r[α⃗ := σ⃗])′ = r′[α⃗ := σ⃗].

Proof Induction on r ∈ ST: All the cases except (μ-I) are straightforward. Case (μ-I):

((C_{μαρ}t)[xρ⃗ := s⃗])′ = C_{μαρ}(map_{λαρ})′(t[xρ⃗ := s⃗])′.
(C_{μαρ}t)′[xρ⃗ := s⃗′] = C_{μαρ}(map_{λαρ})′[xρ⃗ := s⃗′]t′[xρ⃗ := s⃗′].

By induction hypothesis (t[xρ⃗ := s⃗])′ = t′[xρ⃗ := s⃗′]. By assumption map_{λαρ} is closed, hence (map_{λαρ})′ is closed as was proved simultaneously with the definition of −′. (This part of the lemma did not need the induction on ST. Induction on r ∈ Λ would have been sufficient.)

((C_{μαρ}t)[α⃗ := σ⃗])′ = C_{(μαρ)[α⃗:=σ⃗]}(map_{(λαρ)[α⃗:=σ⃗]})′(t[α⃗ := σ⃗])′.
(C_{μαρ}t)′[α⃗ := σ⃗] = C_{(μαρ)[α⃗:=σ⃗]}(map_{λαρ})′[α⃗ := σ⃗]t′[α⃗ := σ⃗].

By induction hypothesis (t[α⃗ := σ⃗])′ = t′[α⃗ := σ⃗] and (map_{λαρ}[α⃗ := σ⃗])′ = (map_{λαρ})′[α⃗ := σ⃗]. We need to show (map_{(λαρ)[α⃗:=σ⃗]})′ = (map_{λαρ}[α⃗ := σ⃗])′. Due to the injectivity of −′ this is equivalent to (U) which we assumed in the definition of ESMIT. _{□}

Lemma 4.9 If r → r̂, then r′ → r̂′.

Proof Induction on r → r̂: The cases (β_{→}) and (β_{∀}) follow immediately from Lemma 4.8. The cases (β_{×}) and (β_{+}) are obvious. The cases (β_{μ}) and (β_{μ}^{+}) are easy. Check e. g.

((C_{μαρ}t)E_{μ}σs)′ = (C_{μαρ}(map_{λαρ})′t′)E_{μ}σs′
↦ s′((map_{λαρ})′(μαρ)σ(λx^{μαρ}.xE_{μ}σs′)t′)
= (s(map_{λαρ}(μαρ)σ(λx^{μαρ}.xE_{μ}σs)t))′

The other clauses are easily proved by using the induction hypothesis. _{□}

This implies that −′ is an embedding of ESMIT in EMIT.

4.2.3 The term rewrite systems ESMITit and ESMITrec

The systems ESMITit are derived from ESMIT just by forbidding the use of the term generation rule (μ-E^{+}) in the terms map_{λαρ} (for μαρ ∈ MTypes). Consequently the systems ESMITrec are defined by ruling out the term generation rule (μ-E) for the definition of the terms map_{λαρ}.

4.2.4 The term rewrite systems ESMIT+ex

The term rewrite systems ESMIT+ex are based on the types as described in section 3.4. Let MTypes be a subset of this set of types which is closed under substitution and the type-forming operations, i. e., MTypes is supposed to satisfy the conditions described in section 4.2.1 and

(∃) If α ∈ Typevars and ρ ∈ MTypes, then ∃αρ ∈ MTypes.

The most prominent examples are the sets SPosTypes and PosTypes of section 3.4. The term system is defined by reinterpreting the term formation rules for ESMIT in the extended type system and by adding the clauses (∃-I) and (∃-E) of section 2.4.2 (also interpreted in the extended type system). A term rewrite system ESMIT+ex is given by MTypes and by a family {map_{λαρ}|μαρ ∈ MTypes} where again for every μαρ ∈ MTypes the object map_{λαρ} is a closed term (in the term system just defined) of type ∀α∀β.(α → β) → ρ → ρ[α := β] (with β ∉ {α}∪FV(ρ)) such that the conditions (C), (U) and (S) of section 4.2.1 are met. The relation ↦ is defined by adding the clauses for system eF+ex to the rules (β_{μ}) and (β_{μ}^{+}) of system ESMIT. All the statements made in section 4.2.1 are true for ESMIT+ex where the definitions are simply the sum of the clauses for eF+ex and ESMIT.

4.3 The variant varEMIT of EMIT

A slight generalization of EMIT is defined. It is not intended to cover more interesting examples of inductive types but serves as a challenge to prove strong normalization directly (see appendix A). Moreover, the embeddings of EMIT into other systems simply also work for varEMIT and therefore they are carried out in the more general system. In section 4.3.3 it is shown that monotone inductive types with iteration only are embedded into IT (and hence also in F) via an analysis of Tarski’s fixed-point theorem. This result generalizes and sharpens (because also reduction is preserved) earlier results on the impredicative encoding of data types (e. g. [BB85] where simultaneous non-interleaved strictly positive inductive types are studied, and I believe that simultaneous inductive types may easily be represented in EMIT via interleaving). Compare also with the presentation of impredicative encodings in [GLT89] and with [Lei90, p. 306] for the encoding (irrespective of reduction behaviour) in the case of positive inductive types.

4.3.1 Definition

The reduction rules of system EMIT use the term m which comes with the rule (μ-I) only with first type argument μαρ. In order to get maximal generality we define the variant varEMIT of EMIT by considering terms m of type

∀α.(μαρ → α) → ρ[α := μαρ] → ρ

instead of the type

∀α∀β.(α → β) → ρ → ρ[α := β]

(note the renaming of variables which took place). In the following only changes to EMIT are given. All the statements on EMIT hold as well in varEMIT. Changed clauses in the definition of terms:

(μ-I) If t^{ρ[α:=μαρ]} ∈ Λ and m^{∀α.(μαρ→α)→ρ[α:=μαρ]→ρ} ∈ Λ, then (C_{μαρ}mt)^{μαρ} ∈ Λ and

FV(C_{μαρ}mt) := FV(m) ∪ FV(t).

Changed clauses in the definition of reduction:

varEMIT

\begin{matrix}(β_{μ}) & (C_{μαρ}mt)E_{μ}σs ↦ & s(mσ(λx^{μαρ}.xE_{μ}σs)t) \\ (β_{μ}^{+}) & (C_{μαρ}mt)E_{μ}^{+}σs ↦ & s(m(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩)t) \end{matrix}

We again require x^{μαρ} ∉ FV(s) in both rules. All the other definitions for system EMIT may be adapted very easily.

4.3.2 Embedding EMIT in varEMIT

An embedding −′ of EMIT in varEMIT is straightforward to define: Set ρ′ := ρ and for every term r^{ρ} of system EMIT define the term r′ of system varEMIT by recursion on r and simultaneously prove that r′ : ρ and FTV(r′) = FTV(r) and FV(r′) = FV(r) as follows:

(eF) The homomorphic term rules for eF.

(μ-I) (C_{μαρ}mt)′ := C_{μαρ}(m′μαρ)t′.

(μ-E) The homomorphic μ-elimination rules.

(The proofs are obvious.) The statements of Lemma 4.8 and Lemma 4.9 are true for this definition and are proved by induction on r resp. by induction on r → r̂. Only (β_{μ}) and (β_{μ}^{+}) deserve attention. Check e. g.

(β_{μ}^{+}): \begin{aligned}((C_{μαρ}mt)E_{μ}^{+}σs)′ & = & (C_{μαρ}(m′μαρ)t′)E_{μ}^{+}σs′ \\ & ↦ & s′((m′μαρ)(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs′)x⟩)t′) \\ & = & (s(m(μαρ)(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩)t))′. \end{aligned}

4.3.3 Embedding varEMIT–rec in IT

Let us prove Tarski’s fixed-point theorem (chapter 3). M ∈ U is a post-fixed-point of Φ is defined to mean M ≤ Φ(M). Set

μ_{Φ} := ⋀{M ∈ U|Φ(M) ≤ M}.

By definition, we have that μ_{Φ} ≤ M for all pre-fixed-points M of Φ. Show that μ_{Φ} is itself a prefixed-point of Φ. Let M be a pre-fixed-point of Φ. Then μ_{Φ} ≤ M. Because Φ is monotone, this implies Φ(μ_{Φ}) ≤ Φ(M). Because M is a pre-fixed-point of Φ and ≤ is transitive, Φ(μ_{Φ}) ≤ M follows. Hence, Φ(μ_{Φ}) ≤ M for every pre-fixed-point M of Φ and therefore Φ(μ_{Φ}) ≤ μ_{Φ} by definition of μ_{Φ}. We conclude that μ_{Φ} is the least pre-fixed-point of Φ. μ_{Φ} is also a post-fixed-point^{6} of Φ (and consequently the least fixed point): We have to show that μ_{Φ} ≤ Φ(μ_{Φ}). By definition of μ_{Φ}, it suffices to show that Φ(μ_{Φ}) is a pre-fixed-point of Φ, i. e., Φ(Φ(μ_{Φ})) ≤ Φ(μ_{Φ}). This follows from the first part of the proof and the monotonicity of Φ. Let now (U, ⊆) be a complete lattice of sets. We rearrange the above proof in order to give the intuition for this section’s embedding. Firstly, by only applying (⋀-E) to the definition of μ_{Φ} we get

(μ_{Φ}-E) If x ∈ μ_{Φ} and Φ(M) ⊆ M, then x ∈ M.

Secondly, we get

(μ_{Φ}-I) If Φ is monotone and x ∈ Φ(μ_{Φ}), then x ∈ μ_{Φ}.

via the following proof: Let Φ be monotone and x ∈ Φ(μ_{Φ}). We show x ∈ μ_{Φ} using (⋀-I). Let M ∈ U, Φ(M) ⊆ M and y ∈ Φ(μ_{Φ}). We show that y ∈ M. Let z ∈ μ_{Φ}. By (⋀-E) and Φ(M) ⊆ M, z ∈ M. Hence, μ_{Φ} ⊆ M. By monotonicity of Φ and y ∈ Φ(μ_{Φ}), y ∈ Φ(M). Due to Φ(M) ⊆ M, y ∈ M. Hence we may apply (⋀-I) using x ∈ Φ(μ_{Φ}) and get x ∈ μ_{Φ}. Note that monotonicity is only used to conclude Φ(μ_{Φ}) ⊆ Φ(M) from μ_{Φ} ⊆ M and hence we may model the proof even in varEMIT instead of EMIT. The definition of μ_{Φ} and the proofs of (μ_{Φ}-E) and (μ_{Φ}-I) are reflected in the following clauses of the embedding of varEMIT–rec in IT:

(μ) (μαρ)′ := iα.ρ′ → α.

(μ-E) (r^{μαρ}s^{ρ[α:=σ]→σ})′ := r′E_{i}σ′s′.

6Unfortunately, this fact cannot be used to embed fixed-point types into IT because of bad reduction behaviour.

See the discussion in appendix B.

(μ-I) (C_{μαρ}m^{∀α.(μαρ→α)→ρ[α:=μαρ]→ρ}t^{ρ[α:=μαρ]})′ := C_{iα.ρ′→α}ℓt′ setting
ℓ := Λαλz^{ρ′→α}λy^{ρ′[α:=(μαρ)′]}.z(m′α(λx^{(μαρ)′}.xE_{i}αz)y),

where we assume that α ∉ FTV(m) and require z, y ∉ FV(m).

More formally: Let varEMIT–rec (varEMIT minus recursion) be the system which is derived from varEMIT by leaving out the term generation rule (μ-E^{+}) and the reduction rule (β_{μ}^{+}). For every type ρ of system varEMIT–rec define the type ρ′ of system IT by recursion on ρ and simultaneously prove that FV(ρ′) = FV(ρ) as follows:

(eF) The homomorphic type rules for eF.

(μ) (μαρ)′ := iα.ρ′ → α.

(The proofs were obvious.) This definition is compatible with the variable conventions for the systems varEMIT–rec and IT.

Lemma 4.10 (ρ[α⃗ := σ⃗])′ = ρ′[α⃗ := σ′].

Proof Induction on ρ. _{□}

For every term r^{ρ} of system varEMIT–rec define the term r′ of system IT by recursion on r and simultaneously prove that r′ : ρ′ and FTV(r′) = FTV(r) and FV(r′) = {x^{σ′}|x^{σ} ∈ FV(r)} as follows:

(eF) The homomorphic term rules for eF.

(μ-I) (C_{μαρ}m^{∀α.(μαρ→α)→ρ[α:=μαρ]→ρ}t^{ρ[α:=μαρ]})′ := C_{iα.ρ′→α}ℓt′ setting

ℓ := Λαλz^{ρ′→α}λy^{ρ′[α:=(μαρ)′]}.z(m′α(λx^{(μαρ)′}.xE_{i}αz)y),

where we assume that α ∉ FTV(m) and require z, y ∉ FV(m).

(μ-E) (r^{μαρ}s^{ρ[α:=σ]→σ})′ := r′E_{i}σ′s′.

(The proofs were always obvious.) This definition is again compatible with the variable conventions for varEMIT–rec and IT.

Lemma 4.11 (r[xρ⃗ := sρ⃗])′ = r′[x^{ρ′} := s⃗′] and (r[α⃗ := σ⃗])′ = r′[α⃗ := σ′].

Proof Induction on r. _{□}

Lemma 4.12 If r → r̂, then r′ →^{+} r̂′.

Proof Induction on r → r̂: The cases (β_{→}) and (β_{∀}) follow immediately from Lemma 4.11, (β_{×}) and (β_{+}) are trivial. (β_{μ}): ((C_{μαρ}mt)E_{μ}σs)′ = (C_{iα.ρ′→α}ℓt′)E_{i}σ′s′ with ℓ as defined above ↦ ℓE_{∀}σ′s′t′ → (λz^{ρ′[α:=σ′]→σ′}λy^{ρ′[α:=(μαρ)′]}.z(m′σ′(λx^{(μαρ)′}.xE_{i}σ′z)y))s′t′ → (λy^{ρ′[α:=(μαρ)′]}.s′(m′σ′(λx^{(μαρ)′}.xE_{i}σ′s′)y))t′ → s′(m′σ′(λx^{(μαρ)′}.xE_{i}σ′s′)t′) = (s(mσ(λx^{μαρ}.xE_{μ}σs)t))′

We used Lemma 2.16 and Corollary 2.2 for the second reduction step and Lemma 2.11 for the third and fourth. The other clauses are easily proved by using the induction hypothesis. _{□}

4.4 The introduction-based term rewrite system IMIT of monotone inductive types

IMIT is “introduction-based” because the introduction rule is free from the monotonicity assumption. The (second) definition of typed terms and their free variables for system eF is extended by the following clauses:

(μ-I) If t^{ρ[α:=μαρ]} ∈ Λ, then (C_{μαρ}t)^{μαρ} ∈ Λ and FV(C_{μαρ}t) := FV(t).

(μ-E) If r^{μαρ} ∈ Λ, m^{∀α∀β.(α→β)→ρ→ρ[α:=β]} ∈ Λ and s^{ρ[α:=σ]→σ} ∈ Λ, then (rms)^{σ} ∈ Λ (also

written as rE_{μ}σms or shorter rE_{μ}ms) and FV(rs) := FV(r) ∪ FV(m) ∪ FV(s).

(μ-E^{+}) If r^{μαρ} ∈ Λ, m^{∀α∀β.(α→β)→ρ→ρ[α:=β]} ∈ Λ and s^{ρ[α:=μαρ×σ]→σ} ∈ Λ then (rms)^{σ} ∈ Λ (also written as rE_{μ}^{+}σms or shorter rE_{μ}^{+}ms) and FV(rs) := FV(r) ∪ FV(m) ∪ FV(s).

In both elimination rules we require β ∉ {α} ∪ FV(ρ). Therefore, this definition is again compatible with the renaming convention for bound type variables. The only difference between the systems EMIT and IMIT is the place where the monotonicity witnesses are put in the terms. In EMIT monotonicity is needed in order to construct inhabitants of μαρ, in IMIT monotonicity is required for “using” inhabitants of μαρ, i. e., for defining functions on μαρ by iteration or primitive recursion. All the other definitions in section 4.1.1 may be simply derived from those for system EMIT by moving the term m from the position after the C_{μαρ} to the position after E_{μ}^{+} and E_{μ}. Define e. g. the relation ↦ by adding the following clauses to those for system eF:

IMIT

\begin{matrix}(β_{μ}) & (C_{μαρ}t)E_{μ}σms ↦ & s(m(μαρ)σ(λx^{μαρ}.xE_{μ}σms)t) \\ (β_{μ}^{+}) & (C_{μαρ}t)E_{μ}^{+}σms ↦ & s(m(μαρ)(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σms)x⟩)t) \end{matrix}

(In both rules we now require that x^{μαρ} ∉ FV(m) ∪ FV(s).) Every statement made in section 2.1.4 for system F (on nf, NF, wn, WN, Ω, SN and sn) is also true for IMIT.

4.5 Relating iteration and primitive recursion

In the introduction to this chapter the rule (lfp-E^{+}) was derived from (lfp-E). Therefore we might expect that also primitive recursion may be expressed by iteration. This is not the case. It is easy to derive (lfp-E) from (lfp-E^{+}). However, also iteration may not be satisfactorily expressed by primitive recursion (although there are very complicated reduction-preserving embeddings into the fragments without iteration).

4.5.1 Coding IMIT in IMIT–rec

This section shows why (μ-E^{+}) is not superfluous in IMIT (and also not in EMIT). Let again (U, ⊆) be a complete lattice of sets. We reconsider how (lfp-E^{+}) is derived from (lfp-E) for monotone Φ: Set M′ := lfp(Φ) ∧ M. Assume x ∈ lfp(Φ) and Φ(M′) ⊆ M. We first show x ∈ M′ by induction on lfp(Φ). We only have to show Φ(M′) ⊆ M′. Let y ∈ Φ(M′). Show that (1) y ∈ lfp(Φ) and (2) y ∈ M. Ad (1): Because Φ is monotone, M′ ⊆ lfp(Φ) and y ∈ Φ(M′), we get y ∈ Φ(lfp(Φ)). By (lfp-I) we get (1). Ad (2): Because y ∈ Φ(M′) and Φ(M′) ⊆ M, we have y ∈ M which is (2). Therefore x ∈ M′. Because M′ = lfp(Φ) ∧ M, also x ∈ M. Due to the use of Φ’s monotonicity in the inductive step, this is clearly best expressed in the system IMIT which has monotonicity witnesses attached to (μ-E) and (μ-E^{+}). Our informal realizability method directly motivates the following clause of an encoding of IMIT in itself.

(μ-E^{+}) (r^{μαρ}E_{μ}^{+}σms)′ := (r′E_{μ}(μαρ × σ)m′ŝ)R setting
ŝ:= λx^{ρ[α:=μαρ×σ]}.⟨C_{μαρ}(m′(μαρ × σ)(μαρ)(λz^{μαρ×σ}.zL)x), s′x⟩,

where we require that x ∉ FV(m) ∪ FV(s).

Unfortunately, this encoding is not well-behaved with respect to reduction. More formally: Let IMIT–rec (IMIT minus recursion) be the system which is derived from IMIT by leaving out the term generation rule (μ-E^{+}) and consequently the reduction rule (β_{μ}^{+}). Define for every term r^{ρ} of system IMIT the term r′ of system IMIT–rec by recursion on r and simultaneously prove that r′ : ρ and FTV(r′) = FTV(r) and FV(r′) = FV(r) as follows:

(eF) The homomorphic term rules for eF.

(μ-I) The homomorphic μ-introduction rule.

(μ-E) The homomorphic μ-elimination rule.

(μ-E^{+}) (r^{μαρ}E_{μ}^{+}σms)′ := (r′E_{μ}(μαρ × σ)m′ŝ)R setting

ŝ:= λx^{ρ[α:=μαρ×σ]}.⟨C_{μαρ}(m′(μαρ × σ)(μαρ)(λz^{μαρ×σ}.zL)x), s′x⟩,

where we require that x ∉ FV(m) ∪ FV(s).

(The proofs are obvious.) The statement of Lemma 4.8 (compatibility with substitution) also holds for −′, but we do not get an embedding:

(C_{μαρ}tE_{μ}^{+}ms)′ = (C_{μαρ}t′E_{μ}m′ŝ)R with ŝ as above
↦ ŝ(m′(μαρ)(μαρ × σ)(λx^{μαρ}.xE_{μ}m′ŝ)t′)R
→^{2} → s′(m′(μαρ)(μαρ × σ)(λx^{μαρ}.xE_{μ}m′ŝ)t′)
↛^{∗} ↛ s′(m′(μαρ)(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σm′s′)x⟩)t′)

Instead of ↛^{∗} it is in general (except trivial cases) also correct to write “not being in the symmetric closure =_{β} of →^{∗}”. There are two reasons: There is no induction hypothesis available which would give λx^{μαρ}.(xE_{μ}m′ŝ)R =_{β} λx^{μαρ}.xE_{μ}^{+}σm′s′. Moreover, we would in addition have to prove (C_{μαρ}t′E_{μ}m′ŝ)L =_{β} C_{μαρ}t′ which in turn would require functoriality properties of the term m′ and also an induction hypothesis of the above kind. The first problem can be solved by introducing extensional equality instead of =_{β} , the second is then solvable only for positive inductive types (see the remarks in appendix B). However, there is no hope for finding term rewrite rules which make −′ an embedding. For system EMIT there is even no hope for finding an encoding of (μ-E^{+}) via (μ-E) following the derivation of (lfp-E^{+}) from (lfp-E). Where should the monotonicity witness come from? In the lattice-theoretic situation this would require a rule

∀x.x ∈ lfp(Φ) ⇒ Φ monotone,

which cannot be a consequence of (lfp-I-mon), (lfp-E) and (lfp-E^{+}), because we can validate these rules interpreting lfp(Φ) by Tarski’s construction for monotone Φ and by ⋀ U otherwise. And it is of course possible to have complete lattices U of sets with ⋀ U ≠ ∅ also having nonmonotone operators. These lattices refute the above rule. (Of course, in this situation we could give a trivial proof that x ∈ lfp(Φ) and Φ(M′) ⊆ M entail x ∈ M, because lfp(Φ) ⊆ M for every M ∈ U. But such a non-uniform argument can never be expressed by means of EMIT.)

4.5.2 Coding IMIT in IMIT–it

This section shows why (μ-E) is not superfluous in IMIT(and also not in EMIT). But in principle it could be eliminated. Let (U, ≤) be a complete lattice. We derive (lfp-E) from (lfp-E^{+}) for monotone Φ: Let Φ(M) ≤ M. We have to show that Φ(lfp(Φ) ∧ M) ≤ M. But trivially, lfp(Φ) ∧ M ≤ M and by monotonicity of Φ, Φ(lfp(Φ) ∧ M) ≤ Φ(M). We are done by applying transitivity of ≤ to the last formula and Φ(M) ≤ M. Now let (U, ⊆) be a complete lattice of sets. We reformulate the above proof to allow reading off an encoding of (μ-E) by means of (μ-E^{+}): Let x ∈ lfp(Φ) and Φ(M) ⊆ M. We show that x ∈ M by extended induction on lfp(Φ): Let y ∈ Φ(lfp(Φ) ∧ M). We have to show y ∈ M. Because Φ is monotone, lfp(Φ) ∧ M ⊆ M and by the assumption on y, we get y ∈ Φ(M). Using Φ(M) ⊆ M, we conclude y ∈ M. Again the monotonicity of Φ is used in the induction step and therefore we first try to use this proof to get an encoding for IMIT. The following clause is read off the proof immediately:

(μ-E) (r^{μαρ}E_{μ}σms)′ := r′E_{μ}^{+}σ(λx^{ρ[α:=μαρ×σ]}.s′(m′(μαρ × σ)σ(λz^{μαρ×σ}.zR)x)), where we require that x ∉ FV(m) ∪ FV(s).

Unfortunately, also this encoding is not well-behaved with respect to reduction. More formally: Let IMIT–it (IMIT minus iteration) be the system which is derived from IMIT by leaving out the term generation rule (μ-E) and consequently the reduction rule (β_{μ}). Define for every term r^{ρ} of system IMIT the term r′ of system IMIT–it by recursion on r and simultaneously prove that r′ : ρ and FTV(r′) = FTV(r) and FV(r′) = FV(r) as follows:

(eF) The homomorphic term rules for eF.

(μ-I) The homomorphic μ-introduction rule.

(μ-E) (r^{μαρ}E_{μ}σms)′ := r′E_{μ}^{+}σ(λx^{ρ[α:=μαρ×σ]}.s′(m′(μαρ × σ)σ(λz^{μαρ×σ}.zR)x)), where we require that x ∉ FV(m) ∪ FV(s).

(μ-E^{+}) The homomorphic μ^{+}-elimination rule.

(The proofs are obvious.) The statement of Lemma 4.8 (compatibility with substitution) also holds for −′, but we do not get an embedding (set ŝ:= λx^{ρ[α:=μαρ×σ]}.s′(m′(μαρ × σ)σ(λz^{μαρ×σ}.zR)x)): (C_{μαρ}tE_{μ}ms)′ = (C_{μαρ}t′E_{μ}^{+}m′ŝ) ↦

ŝ(m′(μαρ)(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}m′ŝ)x⟩)t′) →

s′(m′(μαρ × σ)σ(λz^{μαρ×σ}.zR)(m′(μαρ)(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}m′ŝ)x⟩)t′)). The composition of λz^{μαρ×σ}.zR with λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}m′ŝ)x⟩ is β_{→}-equal to λx^{μαρ}.xE_{μ}^{+}m′ŝ. If m′ were “functorial” one could in some sense get to

s′(m′(μαρ)σ(λx^{μαρ}.xE_{μ}^{+}m′ŝ)t′).

At first sight it may seem that exactly the same problems arise as with embedding IMIT in IMIT–rec. But here the situation is easier: One does not need some formal induction principle but only faces the functoriality problem. This is not solvable in general (for monotone inductive types). If one introduces extensional equality (exhibiting that formal induction principle) it is possible to show functoriality for the canonical monotonicity witnesses of PIT (in the equality theory). For NIPIT without sum types this is even possible with respect to the rewrite relation after adding some η-rules which do no harm to confluence and strong normalization. (For full NIPIT also permutative conversions have to be studied.) See also appendix B. To sum up, we do not have an embedding and no hopes of finding an extension of the rewrite relation which settles the problem for IMIT. We also cannot expect to even get an encoding of iteration via recursion in EMIT. Having said all this it may seem paradoxical that there are reduction-preserving embeddings of IMIT in IMIT–it and of EMIT in EMIT–it (which is defined in the expected way). But these embeddings are very different from the above encoding. And they also affect the rule (μ-E^{+}) which will have no relation to the homomorphic μ^{+}-elimination rule. For the argument we freely use facts spread over this thesis:

• IMIT embeds into varIMIT and varIMIT into MeIT and MeIT into MeIT–it.

• MeIT embeds into UVIT and UVIT into MePIT which is a subsystem of NISPIT+ex. NISPIT+ex is one of the systems ISMIT+ex (ISMIT extended by ∃, NISPIT+ex is defined as one of the systems ESMIT+ex but clearly is also an instance of ISMIT+ex).

• ISMIT embeds into IMIT.

• Therefore by extension of the proof that ISMIT embeds into IMIT also ISMIT+ex embeds into IMIT+ex (which is defined in the expected way).

• Clearly, the proof that eF+ex embeds into eF carries over to a proof that IMIT+ex embeds into IMIT.

• By the last four items, MeIT embeds into IMIT. By inspection of the proofs we note that the rule (μ-E) is always only used to deal with (μ-E) of some other system. Note that NISPIT+ex is a subsystem of PIT+ex not making use of (μ-E) in the definition of the canonical monotonicity witnesses because it is a system of non-interleaving μ-types! Therefore, also MeIT–it embeds into IMIT–it.

• Putting together the first item and the preceding one, we conclude that IMIT embeds into IMIT–it.

We see that the elimination of iteration happens in MeIT and that an awful lot of encoding^{7} has to happen to go from IMIT to itself via MeIT. Note that the embedding of eF+ex in eF does not carry over to systems of selected monotone inductive types because the encoding of the existential quantifier is in general incompatible with the selected monotonicity witnesses. The case of the embedding of EMIT in EMIT–it is somewhat easier because no existential quantifiers come into play:

• EMIT embeds into varEMIT and varEMIT into coMeIT and coMeIT into coMeIT–it.

7Of course, one could slightly optimize the embedding coming from the composition of all those embeddings by some normalization. Because (μαρ)′ = μβ∀γ.(∀α.(α → β) × ρ′ → γ) → γ this will still be quite complicate an embedding.

• coMeIT embeds into coMePIT^{8} which is a subsystem of NIPIT. NIPIT is one of the systems ESMIT and every ESMIT embeds into EMIT.

• By inspection of the proofs we again see that the rule (μ-E) is always only used to deal with (μ-E) of some other system and that although NIPIT is a subsystem of PITit, (μ-E) is not used in the definition of the canonical monotonicity witnesses because it is a system of non-interleaving μ-types. Therefore, also coMeIT–it embeds into EMIT–it.

• We conclude that EMIT embeds into EMIT–it.

This time the elimination of iteration happens in coMeIT. Hopefully these lines of argumentation motivate the reader to go through all of the embeddings presented in this thesis. They do serve a purpose. E. g. we may now conclude that iteration may also be eliminated in favour of recursion in all the concrete systems appearing in the above proofs because they show a circle of embeddings. A similar solution to the problem of elimination of recursion by means of iteration is not in sight. Using the embedding of varEMIT–rec in IT (section 4.3.3) and some other embeddings we would arrive at embeddings of all the systems into system F which I strongly believe is impossible although I have not yet seen a proof.

4.6 The term rewrite systems ISMIT

These systems are dual to the systems ESMIT. This time one has to restrict the use of μ^{(+)}- eliminations in the monotonicity witnesses.

4.6.1 Definition

The term rewrite systems ISMIT are defined to be the same as the systems ESMIT except that condition (S) of ESMIT is replaced by the following condition (S) of ISMIT:

(S) Stratification: There is a well-founded relation ≻ on the types of the form μαρ such that whenever r^{μα′ρ′}s is a subterm of map_{λαρ}, then μαρ ≻ μα′ρ′.

As was remarked at the end of section 4.2.1, condition (S) is not used in that section and therefore all of the results therein are true for the systems ISMIT.

4.6.2 Embedding ISMIT in IMIT

The following embedding of the systems ISMIT in IMIT is derived by obvious modifications of the embedding of ESMIT in EMIT. The embedding of the types is the trivial one, i. e., ρ′ := ρ for every type ρ ∈ MTypes. Let Λ′ be the set of terms of IMIT. Inductively define the set ST of stratified terms of the system ISMIT as a subset of Λ as follows:

(eF) All of the term generation rules of eF (where Λ is replaced by ST).

(μ-I) If t^{ρ[α:=μαρ]} ∈ ST , then C_{μαρ}t ∈ ST.

(μ-E) If r^{μαρ} ∈ ST, map_{λαρ} ∈ ST and s^{ρ[α:=σ]→σ} ∈ ST, then rs ∈ ST.

(μ-E^{+}) If r^{μαρ} ∈ ST, map_{λαρ} ∈ ST and s^{ρ[α:=μαρ×σ]→σ} ∈ ST then rs ∈ ST.

8This is the only embedding in this line of embeddings where types are changed.

This definition is again well-parsed. Hence, we may define functions on ST by recursion on the definition. Define the function −′ : ST → Λ′ by recursion on ST and simultaneously prove that for r : ρ we have r′ : ρ and FTV(r′) = FTV(r) and FV(r′) = FV(r) as follows:

(eF) The homomorphic term rules for eF.

(μ-I) (C_{μαρ}t)′ := C_{μαρ}t′.

(μ-E) (r^{μαρ}E_{μ}s)′ := r′E_{μ}(map_{λαρ})′s′.

(μ-E^{+}) (r^{μαρ}E_{μ}^{+}s)′ := r′E_{μ}^{+}(map_{λαρ})′s′.

(The proofs are trivial.) The rule (μ-I) is called the homomorphic μ-introduction rule.

Lemma 4.13 Every (not necessarily proper) subterm r of map_{λαρ} is in ST.

Proof Main induction on μαρ along ≻ coming from our assumption (S). Side induction on r (i. e., on the definition of Λ). All the term formation rules of eF and (μ-I) are dealt with by the side induction hypothesis. E. g. (→-E): Let rE_{→}s be a subterm of map_{λαρ}. Then r and s are subterms of map_{λαρ}. By the side induction hypothesis, r and s are in ST. By the rule (eF) of the definition of ST, rs ∈ ST. We come to the crucial μ-elimination cases: Let r^{μα′ρ′}s be a subterm of map_{λαρ}. By assumption (S) we have μαρ ≻ μα′ρ′. By the main induction hypothesis for map_{λα′ρ′} itself, we know that map_{λα′ρ′} ∈ ST. r and s are subterms of map_{λαρ}. By the side induction hypothesis, r, s ∈ ST. By the definition of ST, r^{μα′ρ′}s ∈ ST. _{□}

Corollary 4.14 If r, s ∈ ST and r^{μαρ}s ∈ Λ, then rs ∈ ST. _{□}

Corollary 4.15 ST = Λ.

Proof ST has all the closure properties which define Λ. _{□}

Therefore, −′ is defined on all terms. Obviously, it is injective on terms. Again ST = Λ is not only a consequence of (S), but in fact equivalent to (S) (relative to the setting without (U) and (S)) as can be seen by using ordinals as was sketched for the embedding of ESMIT in EMIT. The statement of Lemma 4.7 is also true for this embedding.

Lemma 4.16 (r[xρ⃗ := sρ⃗])′ = r′[xρ⃗ := s⃗′] and (r[α⃗ := σ⃗])′ = r′[α⃗ := σ⃗].

Proof Induction on r ∈ ST: All the cases except (μ-E) and (μ-E^{+}) are straightforward. Consider e. g. (μ-E):

((rE_{μ}s)[xρ⃗ := s⃗])′ = (r[xρ⃗ := s⃗])′E_{μ}(map_{λαρ})′(s[xρ⃗ := s⃗])′.
(rE_{μ}s)′[xρ⃗ := s⃗′] = r′[xρ⃗ := s⃗′](map_{λαρ})′[xρ⃗ := s′]s′[xρ⃗ := s⃗′].

By assumption map_{λαρ} is closed, hence (map_{λαρ})′ is closed as was proved simultaneously with the definition of −′. Hence we are done by the induction hypothesis for r and s. (This part of the lemma did not need the induction on ST. Induction on r ∈ Λ would have been sufficient.)

((rE_{μ}s)[α⃗ := σ⃗])′ = (r[α⃗ := σ⃗])′E_{μ}(map_{(λαρ)[α⃗:=σ⃗]})′(s[α⃗ := σ⃗])′.
(rE_{μ}s)′[α⃗ := σ⃗] = r′[α⃗ := σ⃗]E_{μ}(map_{λαρ})′[α⃗ := σ⃗]s′[α⃗ := σ⃗].

By induction hypothesis (map_{λαρ}[α⃗ := σ⃗])′ = (map_{λαρ})′[α⃗ := σ⃗]. Because of the induction hypothesis for r and s we need to show (map_{(λαρ)[α⃗:=σ⃗]})′ = (map_{λαρ}[α⃗ := σ⃗])′. Due to the injectivity of −′ this is equivalent to (U) which we assumed in the definition of ISMIT. The case (μ-E^{+}) differs only in the name of the elimination symbol. _{□} Lemma 4.17 If r → r̂, then r′ → r̂′.

Proof Induction on r → r̂: The cases (β_{→}) and (β_{∀}) follow immediately from Lemma 4.16. The cases (β_{×}) and (β_{+}) are obvious. The cases (β_{μ}) and (β_{μ}^{+}) are easy. Check e. g.

((C_{μαρ}t)E_{μ}σs)′ = (C_{μαρ}t′)E_{μ}σ(map_{λαρ})′s′
↦ s′((map_{λαρ})′(μαρ)σ(λx^{μαρ}.xE_{μ}σ(map_{λαρ})′s′)t′)
= (s(map_{λαρ}(μαρ)σ(λx^{μαρ}.xE_{μ}σmap_{λαρ}s)t))′

The other clauses are easily proved by using the induction hypothesis. _{□}

This implies that −′ is an embedding of ISMIT in IMIT.

4.7 The variant varIMIT of IMIT

In this section two extensions of IMIT in the spirit of the extension of EMIT to varEMIT are presented. The first one shows that minor modifications may lead to non-normalizing systems. The second one will get the name varIMIT.

4.7.1 Definition

First we study the modification of IMIT following the idea of forming varEMIT. After showing that it is not normalizing we define varIMIT. The reduction rule (β_{μ}) of system IMIT uses the term m which comes with the rule (μ-E) only with first type argument μαρ and second type argument σ. For (β_{μ}^{+}) the two arguments are μαρ and μαρ × σ. In order to get more terms we define a variant of IMIT by considering terms m which are already instantiated to the first type μαρ in the same way as varEMIT was derived from EMIT. In the following only changes to IMIT are given. Changed clauses in the definition of terms:

(μ-E) If r^{μαρ} ∈ Λ, m^{∀α.(μαρ→α)→ρ[α:=μαρ]→ρ} ∈ Λ and s^{ρ[α:=σ]→σ} ∈ Λ, then (rms)^{σ} ∈ Λ (also written as rE_{μ}σms or shorter rE_{μ}ms) and FV(rs) := FV(r) ∪ FV(m) ∪ FV(s).

(μ-E^{+}) If r^{μαρ} ∈ Λ, m^{∀α.(μαρ→α)→ρ[α:=μαρ]→ρ} ∈ Λ and s^{ρ[α:=μαρ×σ]→σ} ∈ Λ then (rms)^{σ} ∈ Λ (also written as rE_{μ}^{+}σms or shorter rE_{μ}^{+}ms) and FV(rs) := FV(r) ∪ FV(m) ∪ FV(s).

Changed clauses in the definition of reduction:

a non-normalizing system

\begin{matrix}(β_{μ}) & (C_{μαρ}t)E_{μ}σms ↦ & s(mσ(λx^{μαρ}.xE_{μ}σms)t) \\ (β_{μ}^{+}) & (C_{μαρ}t)E_{μ}^{+}σms ↦ & s(m(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σms)x⟩)t) \end{matrix}

Let u ∈ Vars. Set m := Λαλz^{μαα→α}λu^{μαα}.z(C_{μαα}u). Then for every term t : μαα and every type σ we have:

(C_{μαα}t)E_{μ}σm(λy^{σ}y) ↦ (λy^{σ}y)(mσ(λx^{μαα}.xE_{μ}σm(λy^{σ}y))t)
↦ mσ(λx^{μαα}.xE_{μ}σm(λy^{σ}y))t
→ (λz^{μαα→σ}λu^{μαα}.z(C_{μαα}u))(λx^{μαα}.xE_{μ}σm(λy^{σ}y))t
→ (λu^{μαα}.(λx^{μαα}.xE_{μ}σm(λy^{σ}y))(C_{μαα}u))t
→ (λx^{μαα}.xE_{μ}σm(λy^{σ}y))(C_{μαα}t)
→ (C_{μαα}t)E_{μ}σm(λy^{σ}y)

Therefore by Lemma 2.50 (C_{μαα}t)E_{μ}σm(λy^{σ}y) ∉ sn and it is clear that the term is also not in wn. Note that this does not show the inconsistency of the system, i. e., it does not give a closed term of type μαα (which in turn would give a closed term of type 0 and hence closed terms of all types).

We pursue the other possibility of getting more terms by specializing the terms m and define the variant varIMIT of IMIT by considering terms m which are already instantiated to the second type argument. This would not make sense for EMIT because there m is part of the introduction rule. In the following only changes to IMIT are given. All the statements on IMIT hold as well in varIMIT. Changed clauses in the definition of terms (always assuming that α ∉ FV(σ)):

(μ-E) If r^{μαρ} ∈ Λ, m^{∀α.(α→σ)→ρ→ρ[α:=σ]} ∈ Λ (for α ∉ FV(σ)) and s^{ρ[α:=σ]→σ} ∈ Λ, then (rms)^{σ} ∈ Λ (also written as rE_{μ}σms or shorter rE_{μ}ms) and FV(rs) := FV(r) ∪

FV(m) ∪ FV(s).

(μ-E^{+}) If r^{μαρ} ∈ Λ, m^{∀α.(α→μαρ×σ)→ρ→ρ[α:=μαρ×σ]} ∈ Λ (for α ∉ FV(σ)) and s^{ρ[α:=μαρ×σ]→σ}∈ Λ then (rms)^{σ} ∈ Λ (also written as rE_{μ}^{+}σms or shorter rE_{μ}^{+}ms) and FV(rs) :=

FV(r) ∪ FV(m) ∪ FV(s).

Changed clauses in the definition of reduction:

varIMIT

\begin{matrix}(β_{μ}) & (C_{μαρ}t)E_{μ}σms ↦ & s(m(μαρ)(λx^{μαρ}.xE_{μ}σms)t) \\ (β_{μ}^{+}) & (C_{μαρ}t)E_{μ}^{+}σms ↦ & s(m(μαρ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σms)x⟩)t) \end{matrix}

We again require x^{μαρ} ∉ FV(m) ∪ FV(s). All the other definitions may be adapted very easily from those in section 4.1.1 on EMIT. Note that obviously the encodings of IMIT in IMIT–rec and in IMIT–it in section 4.5 cannot be extended to varIMIT because the types of m and m′ do not fit.

4.7.2 Embedding IMIT in varIMIT

An embedding −′ of IMIT in varIMIT is straightforward to define: Set ρ′ := ρ and for every term r^{ρ} of system IMIT define the term r′ of system varIMIT by recursion on r and simultaneously prove that r′ : ρ and FTV(r′) = FTV(r) and FV(r′) = FV(r) as follows:

(eF) The homomorphic term rules for eF.

(μ-I) The homomorphic μ-introduction rule.

(μ-E) (r^{μαρ}E_{μ}σms)′ := r′E_{μ}σ(Λα.m′ασ)s′.

(μ-E^{+}) (r^{μαρ}E_{μ}^{+}σms)′ := r′E_{μ}^{+}σ(Λα.m′α(μαρ × σ))s′.

In both μ-elimination rules we assume that α ∉ FV(σ) ∪ FTV(m). (The proofs are obvious.) The statements of Lemma 4.16 and Lemma 4.17 are true for this definition and are proved by induction on r resp. by induction on r → r̂ which does not make any difficulties.

Systems with positive inductive types

We define the systems of positive inductive types by constructing their monotonicity witnesses. Because we have even non-strict positivity also witnesses for antitone type dependency have to be defined. In the case of non-interleaving positive inductive types no reference to μαρ is needed in the definitions. A lot of examples (including Gödel’s system T) is given to illustrate what can be done with positive inductive types. MePIT and coMePIT are very special instances of NISPIT+ex and NIPIT which serve for purposes of embedding.

5.1 The term rewrite systems PITit and PITrec

Usually (e. g. in PIT) the canonical witnesses use only iteration. In the system PITrec we enforce the use of primitive recursion instead of iteration. Among other complications we do not get normal forms any more which is achieved in PIT due to careful definitions.

5.1.1 Definition of PITit (also called PIT)

Define the term rewrite system PITit (also called system PIT) of positive inductive types as one of the systems ESMITit. Let MTypes:=PosTypes. Lemma 3.2 and the definition itself guarantee that MTypes fulfills the required closure conditions. We have to define map_{λαρ} as a closed term of type ∀α∀β.(α → β) → ρ → ρ[α := β] for every μαρ ∈ MTypes, i.e. ρ ∈ PosTypes and α ∈ Pos(ρ). Because positivity and negativity are defined simultaneously, we define auxiliary terms comap_{λαρ} for α ∈ Neg(ρ) simultaneously: Define for every type ρ ∈ PosTypes and every α ∈ Pos(ρ) (and β ∉ {α} ∪ FV(ρ)) a closed term

map_{λαρ} : ∀α∀β.(α → β) → ρ → ρ[α := β]

and for every α ∈ Neg(ρ) (and β ∉ {α} ∪ FV(ρ)) a closed term

comap_{λαρ} : ∀α∀β.(α → β) → ρ[α := β] → ρ

by recursion on d(λαρ). In order to get terms in NF and not too much notation we will set (extending the naming convention for types by π)

map_{λαρ} := ΛαΛβλf^{α→β}λx^{ρ}\underline{map}_{λαρ,α,β}[f^{α→β}, x^{ρ}] and

comap_{λαρ} := ΛαΛβλf^{α→β}λx^{ρ[α:=β]}\underline{comap}_{λαρ,α,β}[f^{α→β}, x^{ρ[α:=β]}].

Here we assume that f ∈ Vars. Moreover, \underline{map}_{λαρ,π,σ} is a simultaneously defined term of type ρ[α := σ] with

x^{ρ[α:=π]} ∈ FV(\underline{map}_{λαρ,π,σ}) ⊆ \{f^{π→σ}, x^{ρ[α:=π]}\}

and \underline{comap}_{λαρ,π,σ} is a simultaneously defined term of type ρ[α := π] with

x^{ρ[α:=σ]} ∈ FV(\underline{comap}_{λαρ,π,σ}) ⊆ \{f^{π→σ}, x^{ρ[α:=σ]}\}

and we use as shorthands

\underline{map}_{λαρ,π,σ}[r^{π→σ}, s^{ρ[α:=π]}] := \underline{map}_{λαρ,π,σ}[f^{π→σ}, x^{ρ[α:=π]} := r, s] and
\underline{comap}_{λαρ,π,σ}[r^{π→σ}, s^{ρ[α:=σ]}] := \underline{comap}_{λαρ,π,σ}[f^{π→σ}, x^{ρ[α:=σ]} := r, s].

In the definitions we do not write the types of the variables f and x because the only allowed free variables are meant. We shorten ρ[α := σ] to ρ[σ] for every ρ and σ. (triv) Case α ∉ FV(ρ). Then α ∈ Pos(ρ) ∩ Neg(ρ). Set \underline{map}_{λαρ,π,σ} := x, \underline{comap}_{λαρ,π,σ} := x. All the other cases are under the proviso “otherwise”^{1}. (V) Case ρ = α. Then α ∈ Pos(ρ) \ Neg(ρ). Set \underline{map}_{λαρ,π,σ} := fx.^{2} (→) Case ρ = ρ_{1} → ρ_{2}. If α ∈ Pos(ρ) = Pos(ρ_{2}) ∩ Neg(ρ_{1}) then set

\underline{map}_{λαρ,π,σ} := λy^{ρ_{1}[σ]}.\underline{map}_{λαρ_{2},π,σ}[f, x(\underline{comap}_{λαρ_{1},π,σ}[f, y])].

If α ∈ Neg(ρ) = Neg(ρ_{2}) ∩ Pos(ρ_{1}) then set

\underline{comap}_{λαρ,π,σ} := λy^{ρ_{1}[π]}.\underline{comap}_{λαρ_{2},π,σ}[f, x(\underline{map}_{λαρ_{1},π,σ}[f, y])].

Because d(λαρ_{1}) and d(λαρ_{2}) are smaller than d(λαρ) this is a correct definition. (∀) Case ρ = ∀γτ. Because of α ∈ FV(ρ), α ≠ γ. Therefore, if α ∈ Pos(ρ) then α ∈ Pos(τ). Set

\underline{map}_{λαρ,π,σ} := Λγ.\underline{map}_{λατ,π,σ}[f, xγ].

If α ∈ Neg(ρ) then α ∈ Neg(τ). Set

\underline{comap}_{λαρ,π,σ} := Λγ.\underline{comap}_{λατ,π,σ}[f, xγ].

The proviso for Λ-abstraction is met as we may assume that γ ∉ FV(π) ∪ FV(σ). In order to verify type correctness we assume the same and therefore have (∀γτ)[α := σ] = ∀γ.τ[α := σ] and (∀γτ)[α := π] = ∀γ.τ[α := π]. Also note that according to the definition d(λατ) < d(λαρ). (×) Case ρ = ρ_{1} × ρ_{2}. If α ∈ Pos(ρ) = Pos(ρ_{1}) ∩ Pos(ρ_{2}) then set

\underline{map}_{λαρ,π,σ} := ⟨\underline{map}_{λαρ_{1},π,σ}[f, xL], \underline{map}_{λαρ_{2},π,σ}[f, xR]⟩.

1Typing reasons rule out this setting if α ∈ FV(ρ). Only because of this clause it is possible that f does not occur in \underline{map}_{λαρ,π,σ} or \underline{comap}_{λαρ,π,σ}, and which would otherwise be λI-terms, i. e., terms where only variables actually occurring free are abstracted.

The definition in [Lei90, p. 311] does not make this case distinction but uses (triv) only for the case where ρ is a variable different from α. It seems that the case (μ) then makes the definition unfounded. The definition in [How92, p. 27] has (triv) but no comap because it is designed for strictly positive inductive types.

2Therefore, map_{λαα} will not be η-normal (The rule λx^{α}.fx ↦_{η_{→}} f would apply).

If α ∈ Neg(ρ) = Neg(ρ_{1}) ∩ Neg(ρ_{2}) then set

\underline{comap}_{λαρ,π,σ} := ⟨\underline{comap}_{λαρ_{1},π,σ}[f, xL], \underline{comap}_{λαρ_{2},π,σ}[f, xR]⟩.

(+) Case ρ = ρ_{1} + ρ_{2}. If α ∈ Pos(ρ) = Pos(ρ_{1}) ∩ Pos(ρ_{2}) then set

\underline{map}_{λαρ,π,σ} := xE_{+}(λy_{1}^{ρ_{1}[π]}.INL_{ρ_{2}[σ]}\underline{map}_{λαρ_{1},π,σ}[f, y_{1}])(λy_{2}^{ρ_{2}[π]}.INR_{ρ_{1}[σ]}\underline{map}_{λαρ_{2},π,σ}[f, y_{2}]).

If α ∈ Neg(ρ) = Neg(ρ_{1}) ∩ Neg(ρ_{2}) then set

\underline{comap}_{λαρ,π,σ} := xE_{+}(λy_{1}^{ρ_{1}[σ]}.INL_{ρ_{2}[π]}\underline{comap}_{λαρ_{1},π,σ}[f, y_{1}])(λy_{2}^{ρ_{2}[σ]}.INR_{ρ_{1}[π]}\underline{comap}_{λαρ_{2},π,σ}[f, y_{2}]).

(μ) Case ρ = μγτ. Because of α ∈ FV(ρ), α ≠ γ. If α ∈ Pos(ρ) = Pos(τ) then set

\underline{map}_{λαρ,π,σ} := xE_{μ}ρ[σ](λy^{τ[π][γ:=μγ.τ[σ]]}.C_{μγ.τ[σ]}(\underline{map}_{λα.τ[γ:=μγ.τ[σ]],π,σ}[f, y])).

If α ∈ Neg(ρ) then α ∈ Neg(τ). Set

\underline{comap}_{λαρ,π,σ} := xE_{μ}ρ[π](λy^{τ[σ][γ:=μγ.τ[π]]}.C_{μγτ[π]}(\underline{comap}_{λα.τ[γ:=μγ.τ[π]],π,σ}[f, y])).

Let us verify that this case (μ) is a correct definition clause. We may assume that α, γ ∉ FV(π) ∪ FV(σ). Therefore ρ[π] = μγ.τ[π] and ρ[σ] = μγ.τ[σ] and

(τ[γ := μγ.τ[ρ_{1}]])[ρ_{2}] = τ[ρ_{2}][γ := μγ.τ[ρ_{1}]]

for any ρ_{1}, ρ_{2} ∈ {π, σ} (use Corollary 2.2, Lemma 2.3 and Lemma 2.5). Let ρ_{0} ∈ {π, σ}. ρ ∈ PosTypes, hence by Lemma 3.2 ρ[ρ_{0}] ∈ PosTypes. Therefore μγ.τ[ρ_{0}] ∈ PosTypes and consequently also τ[γ := μγ.τ[ρ_{0}]] ∈ PosTypes. Because α ∉ FV(μγ.τ[ρ_{0}]), Lemma 3.2 also gives us for α ∈ Pos(τ) that α ∈ Pos(τ[γ := μγ.τ[ρ_{0}]]) and for α ∈ Neg(τ) that α ∈ Neg(τ[γ := μγ.τ[ρ_{0}]]). By Lemma 3.6 (2.) d(λα.τ[γ := μγ.τ[ρ_{0}]]) < d(λαρ). Therefore the induction hypothesis applies in both cases, and the terms are well-formed. It is obvious that the term generation rule (μ-E^{+}) is not used in the definition of map and comap.

Lemma 5.1 The terms map_{λαρ} for μαρ ∈ PosTypes satisfy the conditions (C), (U) and (S) of ESMIT.

Proof Of course, we have to prove appropriate statements also for comap_{λαρ}. They are (co-C) which does not differ from (C) in the verbal representation and (co-U) which is derived from (U) by replacing “map” by “comap”. (S) has to be completely rewritten to (new-S): There is a well-founded relation ≻ on abstracted types of the form λαρ such that for every ρ ∈ PosTypes and α ∈ Pos(ρ) and every subterm C_{μα′ρ′}t of map_{λαρ} we have λαρ ≻ λα′ρ′ and for every ρ ∈ PosTypes and α ∈ Neg(ρ) and every subterm C_{μα′ρ′}t of comap_{λαρ} we also have λαρ ≻ λα′ρ′. (C) and (co-C): This is clear because in the definitions of \underline{map} and \underline{comap} the variable α always only occurs bound. (U) and (co-U): Applying the type substitution does not lead to a jump from one case in the definition to another: neither in the distinction whether α ∈ FV(ρ) nor in the analysis of the outermost type constructor nor in the cases due to positivity or negativity. (new-S): The following approach does not work. Set

λαρ ≻ λα′ρ′ :⇔ d(λαρ) > d(λα′ρ′).

In the (μ)-clause we have to check

d(λαμγτ) > d(λγ.τ[α := σ]) = d(λγτ)

(assuming γ ∉ FV(σ)). This is not true in general (e. g. for τ := α × ∀β∀δγ assuming that the variables are different). The definition of h just aimed at solving this problem. Setting

λαρ ≻ λα′ρ′ :⇔ h(λαρ) > h(λα′ρ′),

it is easy to show (new-S) by induction on d(λαρ) (or on the definition of map and comap) using Lemma 3.5. It is also easy to see that map_{λαρ} and comap_{λαρ} could have been defined by recursion on h(λαρ). _{□}

Note that it would be nearly the same proof for showing that PIT is also one of the systems ISMIT (due to the observation that in the rule (μ) of the definition of \underline{map} and \underline{comap} the μ-introduction and the μ-elimination happen with μ-types of the same height and depth).

Lemma 5.2 map and comap are always terms in NF.

Proof By induction on the definition using the statements of Lemma 2.25 and Lemma 2.26 which hold for ESMIT. _{□}

Therefore, by Lemma 4.7 for every term r of PIT in NF, the term r′ in EMIT, to which r is mapped by the canonical embedding −′ defined in section 4.2.2, is also in NF. Note that the rule (μ-E^{+}) is not used for the definition of map and comap. Note also that the first argument to \underline{map} and \underline{comap} is always the variable f.

5.1.2 Examples of term rewriting in PIT

In the following some of the examples of inductive types introduced in section 3.1 which are types in PIT are studied more carefully. The types of the variables which are bound will always be omitted except at the binder. As a first example consider nat = μα.1 + α. It is immediate that

map_{λα.1+α} = ΛαΛβλf^{α→β}λx^{1+α}.xE_{+}(λy^{1}.INL_{β}y)(λy^{α}.INR_{1}(fy)).

Define

0 := C_{nat}(INL_{nat}IN1) : nat
S := λx^{nat}.C_{nat}(INR_{1}x) : nat → nat

Given terms a : σ and b : nat → σ → σ we define F_{a,b} := λx^{nat}.xE_{μ}^{+}σs : nat → σ with

s := λx^{1+nat×σ}.xE_{+}(λy^{1}.a)(λy^{nat×σ}.b(yL)(yR)),

where x, y ∉ FV(a) ∪ FV(b). We get the following reduction behaviour: F_{a,b}0 →^{+} a and F_{a,b}(St) →^{+} bt(F_{a,b}t). Therefore we may say that Gödel’s system T (see e. g. [GLT89]) is a subsystem of PIT.

Consider tree = tree(nat) = μα.1 + (nat → α). We see that

map_{λα.1+(nat→α)} = ΛαΛβλf^{α→β}λx^{1+(nat→α)}.xE_{+}(λy^{1}.INL_{nat→β}y)(λy^{nat→α}.INR_{1}(λz^{nat}.f(yz))).

Define

nil := C_{tree}(INL_{nat→tree}IN1) : tree
lim := λx^{nat→tree}.C_{tree}(INR_{1}x) : (nat → tree) → tree

Given terms a : σ and b : (nat → tree) → (nat → σ) → σ we define the term F_{a,b} := λx^{tree}.xE_{μ}^{+}σs : tree → σ with

s := λz^{1+(nat→(tree×σ))}.zE_{+}(λy^{1}.a)(λy^{nat→(tree×σ)}.b(λu^{nat}.yuL)(λu^{nat}.yuR)),

where y, z ∉ FV(a) ∪ FV(b). The reduction behaviour is as follows: F_{a,b}nil →^{+} a and

F_{a,b}(lim t) →^{+} b(λu^{nat}.tu)(λu^{nat}.F_{a,b}(tu)).

Although there is the unpleasant λu^{nat}.tu instead of t we see that this reduction behaviour reflects our intuition of recursion on countably branching trees (and by adding η_{→}-reduction to the reduction rules we could avoid this nuisance without making the normalization proof harder).

We turn to cont(ρ) = μα.1 + ((α → ρ) → ρ) with ρ ∈ PosTypes. We get

map_{λα.1+((α→ρ)→ρ)} = ΛαΛβλf^{α→β}λx^{1+((α→ρ)→ρ)}.xE_{+}(λy^{1}.INL_{(β→ρ)→ρ}y)s

with

s := λy^{(α→ρ)→ρ}.INR_{1}(λg^{β→ρ}.y(λh^{α}.g(fh))).

Define

nil := C_{cont(ρ)}(INL_{(cont(ρ)→ρ)→ρ}IN1) : cont(ρ)
lim := λx^{(cont(ρ)→ρ)→ρ}.C_{cont(ρ)}(INR_{1}x) : ((cont(ρ) → ρ) → ρ) → cont(ρ)

Let a be a closed term of type ρ. Define a closed term E of type cont(ρ) → ρ by

E := λx^{cont(ρ)}.xE_{μ}(λz^{1+((ρ→ρ)→ρ)}.zE_{+}(λy^{1}.a)(λy^{(ρ→ρ)→ρ}.y(λu^{ρ}u))).

We get the following reduction behaviour: Enil →^{+} a and

E(lim t) →^{+} (λy^{(ρ→ρ)→ρ}.y(λu^{ρ}u))(λg^{ρ→ρ}.t(λh^{cont(ρ)}.g(Eh))) →^{+} t(λh^{cont(ρ)}.Eh).

If we ignore the difference between λh^{cont(ρ)}.Eh and E (which could again easily be removed by introducing η-reduction for →) we may say that the following definition is by iteration on cont(ρ):

\begin{aligned}Enil & := & a \\ E(lim t) & := & tE \end{aligned}

We see that the recursive call is by no means to E with some term smaller than lim t in any sense. The term E which stands for the function about to be defined is even fed in as an argument to the term t. But nevertheless in chapter 9 it will be shown that PIT is strongly normalizing and hence also the lambda calculus extended by this definition when seen as term rewrite rules. As was mentioned in section 3.1 this type was studied before by Martin Hofmann. It was brought to my attention by Ulrich Berger in the unpublished manuscript [Ber95]. The possibility of defining a function with clauses as above and having termination guaranteed because it is simply an instance of iteration on some inductively defined set caught my attention to an extent which made this thesis possible.

Finally consider Tree = μα.1 + (tree(α) → α). By unwinding the definitions we get

map_{λα.1+(tree(α)→α)} = ΛαΛβλf^{α→β}λx^{1+(tree(α)→α)}.xE_{+}(λy^{1}.INL_{tree(β)→β}y)s,

where we set

s := λy^{tree(α)→α}.INR_{1}(λz^{tree(β)}.f(y(zE_{μ}(λi^{1+(β→tree(α))}.C_{tree(α)}t)))),

where we set

t := iE_{+}(λk^{1}.INL_{α→tree(α)}k)(λk^{β→tree(α)}.INR_{1}(λm^{α}.k(fm))).

Define

nil := C_{Tree}(INL_{tree(Tree)→Tree}IN1) : Tree
lim := λx^{tree(Tree)→Tree}.C_{Tree}(INR_{1}x) : (tree(Tree) → Tree) → Tree

Given terms a : σ and b : (tree(σ) → σ) → σ we define F_{a,b} := λx^{Tree}.xE_{μ}σs : Tree → σ with

s := λx^{1+(tree(σ)→σ)}.xE_{+}(λy^{1}.a)b,

where x, y ∉ FV(a) and x ∉ FV(b). We get the following reduction behaviour: F_{a,b}nil →^{+} a and

F_{a,b}(lim t) →^{+} b(λz^{tree(σ)}.F_{a,b}(t(zE_{μ}(λi^{1+(σ→tree(Tree))}.C_{tree(Tree)}(iE_{+}s_{1}s_{2}))))) with
s_{1} := λk^{1}.INL_{Tree→tree(Tree)}k
s_{2} := λk^{σ→tree(Tree)}.INR_{1}(λm^{Tree}.k(F_{a,b}m)).

Note the occurrence of F_{a,b} in s_{2}.

5.1.3 Definition of PITrec

We define the system PITrec as one of the systems ESMITrec. As for PIT let MTypes:=PosTypes. The definition of the map-terms only introduces a reference to (μ-E) in the case (μ). As was mentioned in the proof of Lemma 5.1, the definition of map_{λαρ} and comap_{λαρ} could as well have been done by recursion on h(λαρ). For PITrec we define map_{λαρ} and comap_{λαρ} by recursion on h(λαρ) introducing the \underline{map}- and \underline{comap}-terms as for PITit and only change the clause (μ) to: (μ^{+}) Case ρ = μγτ. Because of α ∈ FV(ρ), α ≠ γ. If α ∈ Pos(ρ) = Pos(τ) then set

\underline{map}_{λαρ,π,σ} := xE_{μ}^{+}ρ[σ](λy^{τ[π][γ:=(μγ.τ[π])×(μγ.τ[σ])]}.C_{μγ.τ[σ]}(\underline{map}_{λα.τ[γ:=μγ.τ[σ]],π,σ}[f, r])) with

r := \underline{map}_{λγ.τ[π],(μγ.τ[π])×(μγ.τ[σ]),μγ.τ[σ]}[λz^{(μγ.τ[π])×(μγ.τ[σ])}.zR, y].

If α ∈ Neg(ρ) then α ∈ Neg(τ). Set

\underline{comap}_{λαρ,π,σ} := xE_{μ}^{+}ρ[π](λy^{τ[σ][γ:=(μγ.τ[σ])×(μγ.τ[π])]}.C_{μγτ[π]}(\underline{comap}_{λα.τ[γ:=μγ.τ[π]],π,σ}[f, r])) with

r := \underline{map}_{λγ.τ[σ],(μγ.τ[σ])×(μγ.τ[π]),μγ.τ[π]}[λz^{(μγ.τ[σ])×(μγ.τ[π])}.zR, y].

The justification is the same as for (μ), where d is replaced by h, and by using h(λαμγτ) > h(μγ.τ[α := ρ_{0}]) for ρ_{0} ∈ {π, σ}.

The use of recursion instead of iteration in these clauses clearly follows the idea of the first coding of IMIT in IMIT–it in section 4.5.2. It is mainly intended to show that even the definitional principle has to be improved (from d to h) in order to get the map-terms without iteration. Lemma 5.1 is also true for PITrec and proved in the same way. Note that the statement of Lemma 5.2 is no longer true:

\underline{map}_{λαα,ρ×σ,σ}[λz^{ρ×σ}.zR, x] = (λz^{ρ×σ}.zR)x ∉ NF.

Such a term will be used for the build-up of e. g. map_{λαμγ.α+γ} and by Lemma 2.27 it follows that map_{λαμγ.α+γ} ∉ NF. In some extensional theory it is possible to show that these map-terms are equal to the ones of PITit. But this is by no means easy and requires functoriality of both monotonicity witnesses (cf. appendix B).

5.2 The term rewrite systems SPIT, PIT+ex and SPIT+ex

Define the term rewrite system SPIT of strictly positive inductive types as the restriction of PITit to SPosTypes, i. e., set MTypes := SPosTypes ⊆ PosTypes (by Lemma 3.4) and check that every construction made in the definition of PITit does not lead out of MTypes. Therefore SPIT is one of the systems ESMITit. Lemma 3.1 and the definition of SPosTypes show that MTypes fulfills the required closure conditions. Therefore, it is easily shown by induction on d(λαρ) that for ρ ∈ SPosTypes and α ∈ Pos(ρ) the term map_{λαρ} of PITit is also a term of SPIT and for α ∈ Neg(ρ) the term comap_{λαρ} of PITit is also a term of SPIT. (Of course, the respective property has to be proved for \underline{map}_{λαρ,π,σ} and \underline{comap}_{λαρ,π,σ} with π, σ ∈ SPosTypes.) Note that the induction hypothesis is always applied to abstracted types of the form λατ with τ ∈ SPosTypes. The following approach gives more information:

Lemma 5.3 If ρ, π and σ ∈ SPosTypes and α ∈ SPos(ρ), then \underline{map}_{λαρ,πσ} is a term of SPIT.

Proof Induction on d(λαρ). The only cases of interest are (→) and (μ). (→): Case ρ = ρ_{1} → ρ_{2}. If α ∈ SPos(ρ) = SPos(ρ_{2}) \ FV(ρ_{1}), then α ∉ FV(ρ_{1}). Therefore \underline{comap}_{λαρ_{1},π,σ}[f, y] = y, hence \underline{map}_{λαρ,π,σ} = λy^{ρ_{1}[σ]}.\underline{map}_{λαρ_{2},π,σ}[f, xy]. (Note that xE_{→}y is well-typed because ρ_{1}[π] = ρ_{1}[σ].) Now the induction hypothesis applies. (μ): Case ρ = μγτ. If α ∈ SPos(ρ) = SPos(τ), then making the assumption that α, γ ∉ FV(σ) we only have to show that α ∈ SPos(τ[γ := μγ.τ[σ]]). This follows from Lemma 3.1 because α ∉ FV(μγ.τ[σ]). _{□}

For easy reference the following list of properties of \underline{map} is given. It could also serve as a definition (by induction on d(λαρ)). All the types are assumed to range over SPosTypes. If α ∉ FV(ρ), then \underline{map}_{λαρ,π,σ} = x. All the other cases are under the proviso α ∈ SPos(ρ)∩FV(ρ), where ρ is the type which is λ-abstracted on the left side.

\underline{map}_{λαα,π,σ}  = fx
\underline{map}_{λα.ρ_{1}→ρ_{2},π,σ} = λy^{ρ_{1}[σ]}.\underline{map}_{λαρ_{2},π,σ}[f, xy]
\underline{map}_{λα∀γτ,π,σ}  = Λγ.\underline{map}_{λατ,π,σ}[f, xγ]
\underline{map}_{λα.ρ_{1}×ρ_{2},π,σ} = ⟨\underline{map}_{λαρ_{1},π,σ}[f, xL], \underline{map}_{λαρ_{2},π,σ}[f, xR]⟩
\underline{map}_{λα.ρ_{1}+ρ_{2},π,σ} = xE_{+}(λy_{1}^{ρ_{1}[π]}.INL_{ρ_{2}[σ]}\underline{map}_{λαρ_{1},π,σ}[f, y_{1}])(λy_{2}^{ρ_{2}[π]}.INR_{ρ_{1}[σ]}\underline{map}_{λαρ_{2},π,σ}[f, y_{2}])
\underline{map}_{λαμγτ,π,σ}  = xE_{μ}ρ[σ](λy^{τ[π][γ:=μγ.τ[σ]]}.C_{μγ.τ[σ]}(\underline{map}_{λα.τ[γ:=μγ.τ[σ]],π,σ}[f, y]))

Because of Lemma 5.1 the terms map_{λαρ} for μαρ ∈ SPosTypes satisfy the conditions (C), (U) and (S) of ESMIT. If one leaves out the rule (μ-E^{+}) in the definition of terms for SPIT (and consequently also the rule for full primitive recursion) and also removes universal type quantification, one gets a system which is essentially Loader’s calculus of inductive types in [Loa97].

The systems PIT+ex and SPIT+ex are defined as systems ESMIT+ex setting MTypes:=PosTypes and MTypes:=SPosTypes, respectively. The definition of map and comap for PIT is extended by the following clause (recall that the clauses have the proviso stated in the clause (triv)): (∃) Case ρ = ∃γτ. If α ∈ Pos(ρ) then α ∈ Pos(τ) (due to the proviso α ∈ FV(ρ)). Set

\underline{map}_{λαρ,π,σ} := xE_{∃}(Λγλy^{τ[π]}.C_{∃γ.τ[σ],γ}\underline{map}_{λατ,π,σ}[f, y]).

If α ∈ Neg(ρ) then α ∈ Neg(τ). Set

\underline{comap}_{λαρ,π,σ} := xE_{∃}(Λγλy^{τ[σ]}.C_{∃γ.τ[π],γ}\underline{comap}_{λατ,π,σ}[f, y]).

The proviso for Λ-abstraction is met as we may assume that γ ∉ FV(π)∪FV(σ). The justification is the same as for the clause (∀). Obviously, these clauses may also be interpreted in SPIT+ex. Indeed, the statement of Lemma 5.3 (where SPIT is replaced by SPIT+ex) holds and may be proved in the same way. The clauses for \underline{comap} are not needed as was the case for SPIT.

5.3 The term rewrite systems NIPIT, NISPIT and NISPIT+ex

We define systems of non-interleaving positive inductive types, hence nesting is allowed but not interleaving using the parameters of a type μαρ for forming another μ-type. Define NIPIT as one of the systems ESMITit by restricting PIT to the type system defined by MTypes:=NIPosTypes. Due to Lemma 3.10 the condition (sub) is satisfied for NIPosTypes. We have to check that the terms map_{λαρ} with μαρ ∈ NIPosTypes are also terms in this restricted system.

Lemma 5.4 Let ρ, π and σ ∈ NIPosTypes. If α ∈ NIPos(ρ), then \underline{map}_{λαρ,πσ} is a term of NIPIT. If α ∈ NINeg(ρ), then \underline{comap}_{λαρ,πσ} is a term of NIPIT.

Proof Induction on ρ. The only case not being completely obvious is (μ): Let ρ = μγτ and α ∈ FV(ρ). Therefore α ∉ NIPos(τ) \ FV(ρ) = NIPos(ρ) and α ∉ (NINeg(τ) \ FV(ρ)) ∪ {γ} = NINeg(ρ). Hence, the case (μ) never applies! _{□}

The proof shows that \underline{map}_{λαρ} and \underline{comap}_{λαρ} for NIPIT could also be defined by induction on ρ by just leaving out the clause (μ) in the definition of map and comap for PIT. This definition has been given in [Geu92]. It seems that in [Lei90] the definition even in the general case of interleaved μ-types, viz. in PIT, has been given by induction on the type which unfortunately is not possible. Because map and comap are defined without the term rules (μ-I), (μ-E) and (μ-E^{+}), NIPIT is trivially also one of the systems ESMITrec. Define NISPIT by restricting SPIT to the types MTypes:=NISPosTypes. As for NIPIT and SPIT we get a system ESMITit. The definition of map_{λαρ} may be done by induction on ρ and does not contain a specific clause for (μ).

The system NISPIT+ex is defined as the restriction of SPIT+ex to MTypes:=NISPosTypes (including the existential quantifier). We get the following clauses (which are simply those of SPIT+ex without the μ-clause):

\underline{map}_{λαρ,π,σ}  = x, if α ∉ FV(ρ). The other clauses only otherwise!
\underline{map}_{λαα,π,σ}  = fx
\underline{map}_{λα.ρ_{1}→ρ_{2},π,σ} = λy^{ρ_{1}[σ]}.\underline{map}_{λαρ_{2},π,σ}[f, xy]
\underline{map}_{λα∀γτ,π,σ}  = Λγ.\underline{map}_{λατ,π,σ}[f, xγ]
\underline{map}_{λα.ρ_{1}×ρ_{2},π,σ} = ⟨\underline{map}_{λαρ_{1},π,σ}[f, xL], \underline{map}_{λαρ_{2},π,σ}[f, xR]⟩
\underline{map}_{λα.ρ_{1}+ρ_{2},π,σ} = xE_{+}(λy_{1}^{ρ_{1}[π]}.INL_{ρ_{2}[σ]}\underline{map}_{λαρ_{1},π,σ}[f, y_{1}])(λy_{2}^{ρ_{2}[π]}.INR_{ρ_{1}[σ]}\underline{map}_{λαρ_{2},π,σ}[f, y_{2}])
\underline{map}_{λαρ,π,σ}  = xE_{∃}(Λγλy^{τ[π]}.C_{∃γ.τ[σ],γ}\underline{map}_{λατ,π,σ}[f, y])

It might now be instructive to reconsider the examples discussed in 3.5.

5.4 The term rewrite systems MePIT and coMePIT

These are systems which only serve a purpose in the circles of embeddings. Their main advantages over arbitrary NISPIT+ex and NIPIT, respectively, are their well-behaved map-terms not using sum types. MePIT is defined as one of the systems ESMIT+ex. Let the underlying set MTypes be defined as the least set containing Typevars, 0 and 1 and being closed under →, ∀, ×, +, ∃ and the following clause:

(μ) If ρ ∈ MTypes and α ∉ {β} ∪ FV(ρ), then μα∃β.(β → α) × ρ ∈ MTypes.

It is very easy to see that MTypes is closed under substitution, i.e. the condition (sub) in the definition of ESMIT+ex is satisfied. It is also easy to see that MTypes is a subset of the type system of NISPIT+ex. Hence we define MePIT to be the restriction of NISPIT+ex to MTypes. The terms map do not use types outside MTypes. This is easily proved: The only case of interest is (μ). We see that for α ∉ {β} ∪ FV(ρ) the definition yields

map_{λα∃β.(β→α)×ρ} = ΛαΛγλf^{α→γ}λx^{∃β.(β→α)×ρ}.xE_{∃}(Λβλy^{(β→α)×ρ}.C_{∃β.(β→γ)×ρ,β}⟨λz^{β}.f(yLz), yR⟩),

which is clearly okay.

The term rewrite system coMePIT is defined as one of the systems ESMIT. Let the underlying set MTypes be defined as the least set containing Typevars, 0 and 1 and being closed under →, ∀, ×, + and the following clause:

(μ) If ρ ∈ MTypes and α ∉ {β} ∪ FV(ρ), then μα∀β.(α → β) → ρ ∈ MTypes.

It is again easy to see that MTypes is closed under substitution and that MTypes ⊂ NIPosTypes. Hence we define coMePIT to be the restriction of NIPIT to MTypes. Again it is easily proved that the terms map do not use types outside MTypes. Consider (μ). We see that for α ∉ {β} ∪ FV(ρ) the definition gives us

map_{λα∀β.(α→β)→ρ} = ΛαΛγλf^{α→γ}λx^{∀β.(α→β)→ρ}Λβλy^{γ→β}.xβ(λz^{α}.y(fz)),

which indeed only uses types in MTypes.

82 CHAPTER 5. SYSTEMS WITH POSITIVE INDUCTIVE TYPES

Term rewrite systems in the spirit of Mendler’s system of inductive types

The following motivation became clear to me in quite late a stage of the work on this thesis although the report in [UV97] of an embedding of Mendler’s system in [Men87a] into the system of positive inductive types suddenly clarified three mysterious facts on Mendler’s system: That I succeeded in proving strong normalization without having to restrict to positive inductive types as Mendler did. (The elimination-based proof given in section 9.4.1 is practically my original proof of December 1996 presented at a workshop in Munich^{1}.) That iteration is faithfully represented by primitive recursion (which is now section 6.1.3) and that for positive inductive types without + one can define a predecessor (which unrolls μαρ to ρ[α := μαρ]) having the right reduction behaviour only after adding some η-rules which do no harm to confluence and strong normalization. It is interesting that already in [Lei90, p. 308] the idea behind the elimination rule corresponding to iteration modelled after Mendler’s recursion rule was identified (and called M-induction) but not used to get rid of the positivity restrictions. Let (U, ≤) be a complete lattice and Φ : U → U any function. There are two canonical ways of producing a monotone function out of Φ. Define Φ^{≥} : U → U and Φ^{≤} : U → U by setting

Φ^{≥}(M) := ⋁{Φ(M′)|M′ ≤ M}

and

Φ^{≤}(M) := ⋀{Φ(M′)|M ≤ M′}.

Φ^{≥} and Φ^{≤} are monotone due to transitivity of ≤, and Φ^{≥}(M) ≥ Φ(M) and Φ^{≤}(M) ≤ Φ(M) due to reflexivity of ≤ (of course, some properties of suprema and infima enter the argument). Clearly, Φ^{≥} = Φ = Φ^{≤} for monotone Φ. And Φ is monotone, if Φ^{≥} = Φ or Φ^{≤} = Φ. Because Φ ↦ Φ^{≥} and Φ ↦ Φ^{≤} are also monotone, it is clear that Φ^{≥} is the pointwise least monotone function being pointwise greater than Φ and that Φ^{≤} is the pointwise greatest monotone function being pointwise smaller than Φ. Therefore I would like to call Φ^{≥} the upper monotonization and Φ^{≤} the lower monotonization of Φ. By Tarski, there are least fixed points of Φ^{≥} and Φ^{≤}. Let us study how their elimination and introduction rules may be expressed in terms of Φ. Set lfp^{≥}(Φ) := lfp(Φ^{≥}). The rule (lfp-E) says that Φ^{≥}(M) ≤ M ⇒ lfp^{≥}(Φ) ≤ M. This is equivalent to

1Arbeitstagung Deduktive Aspekte von Beweistheorie und Informatik, Munich, December 19–20, 1996, organized by Gerhard Jäger (Bern) and Helmut Schwichtenberg (Munich).

(lfp^{≥}-E) (∀M′.M′ ≤ M ⇒ Φ(M′) ≤ M) ⇒ lfp^{≥}(Φ) ≤ M.

The rule (lfp-E^{+}) says that Φ^{≥}(lfp^{≥}(Φ) ∧ M) ≤ M ⇒ lfp^{≥}(Φ) ≤ M. This is equivalent to

(lfp^{≥}-E^{+}) (∀M′.M′ ≤ lfp^{≥}(Φ) ⇒ M′ ≤ M ⇒ Φ(M′) ≤ M) ⇒ lfp^{≥}(Φ) ≤ M.

Set lfp^{≤}(Φ) := lfp(Φ^{≤}). The rule (lfp-E) says that Φ^{≤}(M) ≤ M ⇒ lfp^{≤}(Φ) ≤ M. Unfortunately, Φ^{≤}(M) ≤ M cannot be expressed in simpler terms in this general setting. Let now (U, ⊆) be a complete lattice of sets. The rules (lfp^{≥}-E) and (lfp^{≥}-E^{+}) may be expressed as

(lfp^{⊇}-E) If x ∈ lfp^{⊇}(Φ) and ∀M′.M′ ⊆ M ⇒ Φ(M′) ⊆ M, then x ∈ M.

(lfp^{⊇}-E^{+}) If x ∈ lfp^{⊇}(Φ) and ∀M′.M′ ⊆ lfp^{⊇}(Φ) ⇒ M′ ⊆ M ⇒ Φ(M′) ⊆ M, then x ∈ M.

This motivates the elimination rules of MeIT and UVIT whose common type system imposes no restrictions on the formation on μαρ reflecting the use of any Φ:

(μ-E) If r^{μαρ} ∈ Λ and s^{∀α.(α→σ)→ρ→σ} ∈ Λ (with α ∉ FV(σ)), then (rE_{μ}s)^{σ} ∈ Λ.

(μ-E^{+}) If r^{μαρ} ∈ Λ and s^{∀α.(α→μαρ)→(α→σ)→ρ→σ} ∈ Λ (with α ∉ FV(σ)), then (rE_{μ}^{+}s)^{σ} ∈ Λ.

MeIT and UVIT will differ in the introduction rule. Let us go back to the general situation of (U, ≤): The fact that lfp^{≥}(Φ) is a pre-fixed-point of Φ^{≥} is equivalent to

(lfp^{≥}-I) ∀M.M ≤ lfp^{≥}(Φ) ⇒ Φ(M) ≤ lfp^{≥}(Φ).

As a trivial (due to reflexivity of ≤) instance we get

(lfp^{≥}-I-wk) Φ(lfp^{≥}(Φ)) ≤ lfp^{≥}(Φ).

For (U, ⊆) a complete lattice of sets we get

(lfp^{⊇}-I) If M ⊆ lfp^{≥}(Φ) and x ∈ Φ(M), then x ∈ lfp^{⊇}(Φ).

(lfp^{⊇}-I-wk) If x ∈ Φ(lfp^{⊇}(Φ)), then x ∈ lfp^{⊇}(Φ).

This directly motivates the introduction rules for UVIT and MeIT. For UVIT we take

(μ-I) If j^{τ→μαρ} ∈ Λ and t^{ρ[α:=τ]} ∈ Λ, then (Cjt)^{μαρ} ∈ Λ and FV(Cjt) := FV(j) ∪ FV(t).

corresponding to (lfp^{⊇}-I) and for MeIT the introduction rule

(μ-I) If t^{ρ[α:=μαρ]} ∈ Λ, then (C_{μαρ}t)^{μαρ} ∈ Λ.

corresponding to (lfp^{⊇}-I-wk). The reader should be warned that the introduction rule for MeIT seems to be coming from (lfp-I) depending on a monotone Φ. Although the rule pertaining to (lfp-I) is in fact the same (e. g. in IMIT), an understanding of MeIT would be impossible^{2}. We did not yet model lfp^{≤}(Φ) in a term system. Let now (U, ⊆) be a complete lattice of sets where the infimum is always given by set intersection. Hence,

Φ^{⊆}(M) = {x|∀M′.M ⊆ M′ ⇒ x ∈ Φ(M′)}.

The rules (lfp-E) and (lfp-E^{+}) therefore give for Φ^{⊆} instead of Φ the following rules (lfp^{⊆}-E) If x ∈ lfp^{⊆}(Φ) and ∀y.(∀M′.M ⊆ M′ ⇒ y ∈ Φ(M′)) ⇒ y ∈ M, then x ∈ M.

2Presumably it is this wrong intuition which gave Mendler’s system a flavour of “mystery” (see the introductory remarks to this section).

(lfp^{⊆}-E^{+}) If x ∈ lfp^{⊆}(Φ) and ∀y.(∀M′.lfp^{⊆}(Φ) ∧ M ⊆ M′ ⇒ y ∈ Φ(M′)) ⇒ y ∈ M, then x ∈ M.

They serve as the motivation for the elimination rules of coMeIT (also without restrictions to forming μαρ):

(μ-E) If r^{μαρ} ∈ Λ and s^{(∀α.(σ→α)→ρ)→σ} ∈ Λ (with α ∉ FV(σ)), then (rE_{μ}s)^{σ} ∈ Λ.

(μ-E^{+}) If r^{μαρ} ∈ Λ and s^{(∀α.(μαρ×σ→α)→ρ)→σ} ∈ Λ (with α ∉ FV(σ)), then (rE_{μ}^{+}s)^{σ} ∈ Λ.

The fact that lfp^{⊆}(Φ) is a pre-fixed-point of Φ^{⊆} is equivalent to the following rule

(lfp^{⊆}-I) If ∀M.lfp^{⊆}(Φ) ⊆ M ⇒ x ∈ Φ(M), then x ∈ lfp^{⊆}(Φ).

This directly motivates the introduction rule of coMeIT:

(μ-I) If t^{∀α.(μαρ→α)→ρ} ∈ Λ then (C_{μαρ}t)^{μαρ} ∈ Λ.

What is the purpose of this chapter? The systems MeIT, UVIT and coMeIT are introduced to elucidate the embeddings of the systems of monotone inductive types into systems of noninterleaved positive (or—in the presence of the existential quantifier—even strictly positive) inductive types. The idea of forming Φ^{⊇} and Φ^{⊆} will later also be used in the direct proofs of strong normalization of the systems of monotone inductive types, and hence it is interesting to isolate these concepts in some formal system. The embeddings given in this chapter all draw from the lattice-theoretic intuition: The embeddings of the newly introduced systems into systems of positive inductive types are derived from analyzing the above arguments justifiying the rules, whereas the embeddings of the systems of monotone inductive types into MeIT et al come from the fact that for monotone Φ (whence Φ^{⊇} = Φ = Φ^{⊆}) the original introduction and elimination rules for least fixed points may be derived from those for lfp^{⊇} and lfp^{⊆}, respectively. The latter fact is not at all surprising but the impact it has due to the compatibility of its proof with reduction: Monotone inductive types embed into non-interleaving positive inductive types. In order to reduce notational overhead in the direct proofs of strong normalization for MeIT and coMeIT, it is shown that iteration may be easily derived from recursion in these systems (contrast this with the situation of monotone inductive types discussed in section 4.5). The picture of the systems is completed by embedding their iterative fragments into system F.

6.1 The variant MeIT of a term rewrite system proposed by Nax Mendler

The system corresponding to (lfp^{⊇}-I-wk), (lfp^{⊇}-E) and (lfp^{⊇}-E^{+}) is defined and its connection with Mendler’s system in [Men87a] discussed. The system varIMIT is embedded into it and it is embedded into its fragment without iteration and its iterative fragment embedded into eF.

6.1.1 Definition

The definition is again quite elaborate because a direct normalization proof (for MeIT–it) will be given in section 9.4.1. The (second) definition of typed terms and their free variables for system eF is extended by the following clauses:

(μ-I) If t^{ρ[α:=μαρ]} ∈ Λ, then (C_{μαρ}t)^{μαρ} ∈ Λ and FV(C_{μαρ}t) := FV(t).

(μ-E) If r^{μαρ} ∈ Λ and s^{∀α.(α→σ)→ρ→σ} ∈ Λ (with α ∉ FV(σ)), then (rs)^{σ} ∈ Λ (also written

as rE_{μ}σs or shorter rE_{μ}s) and FV(rs) := FV(r) ∪ FV(s).

(μ-E^{+}) If r^{μαρ} ∈ Λ and s^{∀α.(α→μαρ)→(α→σ)→ρ→σ} ∈ Λ (with α ∉ FV(σ)), then (rs)^{σ} ∈ Λ

(also written as rE_{μ}^{+}σs or shorter rE_{μ}^{+}s) and FV(rs) := FV(r) ∪ FV(s).

This definition is again compatible with the renaming convention for bound type variables. Extend the recursive definition of FTV(r) by the following clauses:

(μ-I) FTV(C_{μαρ}t) := FV(μαρ) ∪ FTV(t).
(μ-E) FTV(rs) := FTV(r) ∪ FTV(s).
(μ-E^{+}) FTV(rs) := FTV(r) ∪ FTV(s).

The definition of r[xρ⃗ := s⃗] together with the proof of r^{ρ}[xρ⃗ := s⃗] : ρ and FV(r[xρ⃗ := s⃗]) = (FV(r) \ xρ⃗) ∪ ⋃{FV(s_{i})|x_{i}^{ρ_{i}} ∈ FV(r) ∧ x_{i}^{ρ_{i}} ≠ x_{j}^{ρ_{j}} for j < i} (i. e., the statement of Lemma 2.10) is extended by the following clauses:

(μ-I) (C_{μαρ}t)[xρ⃗ := s⃗] := C_{μαρ}t[xρ⃗ := s⃗]. Proof obivous.
(μ-E) (rs)[xρ⃗ := s⃗] := r[xρ⃗ := s⃗]E_{μ}s[xρ⃗ := s⃗]. Proof obvious.
(μ-E^{+}) (rs)[xρ⃗ := s⃗] := r[xρ⃗ := s⃗]E_{μ}^{+}s[xρ⃗ := s⃗]. Proof obvious.

The definition of r[α⃗ := σ⃗] together with the proof of r^{ρ}[α⃗ := σ⃗] : ρ[α⃗ := σ⃗] and FV(r[α⃗ := σ⃗]) = {y^{τ[α⃗:=σ⃗]}|y^{τ} ∈ FV(r)} is extended by the following clauses:

(μ-I) (C_{μαρ}t)[α⃗ := σ⃗] := C_{(μαρ)[α⃗:=σ⃗]}t[α⃗ := σ⃗]. Proof obvious.
(μ-E) (rs)[α⃗ := σ⃗] := r[α⃗ := σ⃗]E_{μ}s[α⃗ := σ⃗]. Proof obvious.
(μ-E^{+}) (rs)[α⃗ := σ⃗] := r[α⃗ := σ⃗]E_{μ}^{+}s[α⃗ := σ⃗]. Proof obvious.

The statements made in section 2.1.2 are valid in MeIT, too. The general definition of immediate subterms of a term gives the following extension for system MeIT: C_{μαρ}t has exactly the immediate subterms t and rE_{μ}s and rE_{μ}^{+}s have exactly the immediate subterms r and s. Extend the inductive definition of rs⃗ for system eF as follows:

(μ-E) If rs⃗ : μαρ and s : ∀α.(α → σ) → ρ → σ (with α ∉ FV(σ)), then r(s⃗, s) := (rs⃗)s.

(μ-E^{+}) If rs⃗ : μαρ and s : ∀α.(α → μαρ) → (α → σ) → ρ → σ (with α ∉ FV(σ)), then

r(s⃗, s) := (rs⃗)s.

The statement of Lemma 2.23 holds also true for MeIT.

Lemma 6.1 (Head form) Every term has either exactly one of the forms given in Lemma 2.44 or exactly one of the following forms:

(μ-I) C_{μαρ}t

(μ-R) (C_{μαρ}t)ss⃗, subsuming both eliminations for μ

Proof Induction on terms. _{□}

Extend the inductive definition of the set NF for system eF by the following clause:

(μ-I) If C_{μαρ}t is a term and t ∈ NF, then C_{μαρ}t ∈ NF.

The statements made in section 2.1.3 are all valid in MeIT. Define the relation ↦ as for system eF, but add the following clauses:

MeIT

\begin{matrix}(β_{μ}) & (C_{μαρ}t)E_{μ}σs ↦ & s(μαρ)(λx^{μαρ}.xE_{μ}σs)t \\ (β_{μ}^{+}) & (C_{μαρ}t)E_{μ}^{+}σs ↦ & s(μαρ)(λy^{μαρ}y)(λx^{μαρ}.xE_{μ}^{+}σs)t \end{matrix}

In both rules we require that x^{μαρ} ∉ FV(s). As for system eF the objects on the right side are automatically terms if the respective object on the left is a term, and the types are equal. The relation →_{whd} is defined as for system F and has the same properties as stated there. Extend the inductive definition of the relation → for system eF by the congruence rules for μ and prove that if r → r′, then r and r′ have the same type and FV(r′) ⊆ FV(r). Extend the inductive definition of WN for system eF by the following clauses:

(μ-I) If C_{μαρ}t is a term and t ∈ WN, then C_{μαρ}t ∈ WN.

(β_{μ}) If s(μαρ)(λx^{μαρ}.xE_{μ}σs)ts⃗ ∈ WN, x^{μαρ} ∉ FV(s) and (C_{μαρ}t)E_{μ}σss⃗ is a term, then

(C_{μαρ}t)E_{μ}σss⃗ ∈ WN.

(β_{μ}^{+}) If s(μαρ)(λy^{μαρ}y)(λx^{μαρ}.xE_{μ}^{+}σs)ts⃗ ∈ WN, x^{μαρ} ∉ FV(s) and (C_{μαρ}t)E_{μ}^{+}σss⃗ is a

term, then (C_{μαρ}t)E_{μ}^{+}σss⃗ ∈ WN.

Again definition by recursion on WN is admissible. Extend the recursive definition of the function Ω from WN to Λ and the simultaneous proof of r →^{∗} Ω(r) ∈ NF for r ∈ WN by the following clauses:

(μ-I) Ω(C_{μαρ}t) := C_{μαρ}Ω(t).
(β_{μ}) Ω((C_{μαρ}t)E_{μ}σss⃗) := Ω(s(μαρ)(λx^{μαρ}.xE_{μ}σs)ts⃗).
(β_{μ}^{+}) Ω((C_{μαρ}m)E_{μ}^{+}σss⃗) := Ω(s(μαρ)(λy^{μαρ}y)(λx^{μαρ}.xE_{μ}σs)ts⃗).

The proofs are always obvious. Extend the definition of SN for system eF by the following clauses:

(μ-I) If C_{μαρ}t is a term and t ∈ SN, then C_{μαρ}t ∈ SN.

(β_{μ}) If s(μαρ)(λx^{μαρ}.xE_{μ}σs)ts⃗ ∈ SN, x^{μαρ} ∉ FV(s) and (C_{μαρ}t)E_{μ}σss⃗ is a term, then

(C_{μαρ}t)E_{μ}σss⃗ ∈ SN.

(β_{μ}^{+}) If s(μαρ)(λy^{μαρ}y)(λx^{μαρ}.xE_{μ}^{+}σs)ts⃗ ∈ SN, x^{μαρ} ∉ FV(s) and (C_{μαρ}t)E_{μ}^{+}σss⃗ is a

term, then (C_{μαρ}t)E_{μ}^{+}σss⃗ ∈ SN.

The only difference between the μ-clauses for SN and WN is the name of the defined set. Every statement made in section 2.1.4 for system F (on nf, NF, wn, WN, Ω, SN and sn) is also true for MeIT. MeIT is not the original system of [Men87a]: The minor differences are as follows:

• In MeIT we have no coinductive types which however could be treated analogously.

• Iteration has been added although it may be eliminated as shown in section 6.1.3.

• Recursion is not expressed via a recursion operator but by a rule.

• MeIT is defined as an extension of eF and not only of F.

In contrast to the original system we allow any μαρ without positivity requirement and have the introduction and elimination rules for any μαρ. This will be essential for the embedding of varIMIT in MeIT in the next section.

6.1.2 Embedding varIMIT in MeIT

In the introduction to this chapter it was shown that (lfp^{⊇}-E) and (lfp^{⊇}-E^{+}) are equivalent to (lfp-E) and (lfp-E^{+}) if one replaced Φ by Φ^{⊇} in the latter rules. The rule (lfp^{⊇}-I-wk) was taken as a consequence of (lfp-I) where again Φ was replaced by Φ^{⊇}. If Φ is monotone, then Φ^{⊇} = Φ and hence the replacement does not change anything^{3}. Therefore, in this case (lfp-E) and (lfp-E^{+}) are consequences of (lfp^{⊇}-E) and (lfp^{⊇}-E^{+}), respectively. Moreover, although (lfp^{⊇}-I-wk) only is an instance of (lfp-I) with Φ replaced by Φ^{⊇}, it is the same rule for Φ^{⊇} = Φ. Because of the latter fact we may take the homomorphic μ-introduction rule in the following definition. The clauses pertaining to elimination reflect the proof of the other consequences—more precisely: They reflect the proofs that for monotone Φ (lfp-E) and (lfp-E^{+}) are consequences of (lfp^{⊇}-E) and (lfp^{⊇}-E^{+}) where lfp^{⊇} has been replaced by lfp in the latter rules. And because these proofs only need monotonicity in a restricted way an embedding even for varIMIT is gained and not only for IMIT^{4}. Set ρ′ := ρ (for ρ a type in varIMIT) and for every term r^{ρ} of system varIMIT define the term r′ of system MeIT by recursion on r and simultaneously prove that r′ : ρ and FTV(r′) = FTV(r) and FV(r′) = FV(r) as follows:

(eF) The homomorphic term rules for eF.

(μ-I) The homomorphic μ-introduction rule.

(μ-E) (r^{μαρ}E_{μ}σms)′ := r′E_{μ}σŝ with ŝ:= Λαλz^{α→σ}λy^{ρ}.s′(m′αzy), where we assume that

α ∉ FTV(s) ∪ FTV(m) and require z, y ∉ FV(s) ∪ FV(m) and z ≠ y.

(μ-E^{+}) (r^{μαρ}E_{μ}^{+}σms)′ := r′E_{μ}^{+}σŝ with ŝ:= Λαλz_{1}^{α→μαρ}λz_{2}^{α→σ}λy^{ρ}.s′(m′α(λx^{α}⟨z_{1}x, z_{2}x⟩)y), where we assume that α ∉ FTV(s) ∪ FTV(m) and require z_{1}, z_{2}, y ∉ FV(s) ∪ FV(m)

and z_{1}, z_{2}, y different.

3This explains why we take ρ′ := ρ in the embedding. It is the clue to the problem of embedding term systems with monotonicity witnesses into term systems with positivity restrictions in the types which therefore guarantee monotonicity even on the level of types.

4An embedding of EMIT into MeIT cannot be constructed in this easy way because monotonicity enters the arguments for the elimination rules where EMIT does not have the monotonicity witnesses.

(The proofs are obvious.) Recall that α ∉ FV(σ) is part of the definition of the μ-rules of varIMIT, which implies that α is not free in the type of s (in both rules). Therefore the assumption α ∉ FTV(s) is admissible. The statement of Lemma 4.16 is true for this definition and is proved by induction on r. That −′ is an embedding is proved by induction on →. Only (β_{μ}) and (β_{μ}^{+}) deserve attention. Check e. g. (β_{μ}^{+}): ((C_{μαρ}t)E_{μ}^{+}σms)′ = (C_{μαρ}t′)E_{μ}^{+}σŝ with ŝ as defined above ↦ ŝ(μαρ)(λy^{μαρ}y)(λx^{μαρ}.xE_{μ}^{+}σŝ)t′ →^{4} → s′(m′(μαρ)(λx^{μαρ}.⟨(λy^{μαρ}y)x, (λx^{μαρ}.xE_{μ}^{+}σŝ)x⟩)t′) → s′(m′(μαρ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σŝ)x⟩)t′) = (s(m(μαρ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σms)x⟩)t))′.

6.1.3 Embedding MeIT in MeIT–it

The following embedding is nearly trivial. Mendler’s original system in [Men87a] does not have an iterator. This section shows that an iterator—in MeIT the rule (μ-E)—is superfluous. Note that this reduction is not directly possible for the systems of monotone inductive types (see section 4.5). Let MeIT–it be the system which is derived from MeIT by leaving out the term rule (μ-E) and the reduction rule (β_{μ}). Set ρ′ := ρ and for every term r^{ρ} of system MeIT define the term r′ of system MeIT–it by recursion on r and simultaneously prove that r′ : ρ and FTV(r′) = FTV(r) and FV(r′) = FV(r) as follows:

(eF) The homomorphic term rules for eF.

(μ-I) The homomorphic μ-introduction rule.

(μ-E) (r^{μαρ}E_{μ}σs)′ := r′E_{μ}^{+}σŝ with ŝ := Λαλz^{α→μαρ}.s′α, where we assume that α ∉ FTV(s) and require z ∉ FV(s).

(μ-E^{+}) The homomorphic μ^{+}-elimination rule.

(The proofs are obvious.) Substitutivity (the statement of Lemma 4.16) is true for this definition and is proved by induction on r. That −′ is an embedding is proved by induction on →. Only the rule (β_{μ}) deserves attention. (β_{μ}): ((C_{μαρ}t)E_{μ}σs)′ = (C_{μαρ}t′)E_{μ}^{+}σŝ with ŝ as defined above ↦ ŝ(μαρ)(λy^{μαρ}y)(λx^{μαρ}.xE_{μ}^{+}σŝ)t′ →^{2} → s′(μαρ)(λx^{μαρ}.xE_{μ}^{+}σŝ)t′ = (s(μαρ)(λx^{μαρ}.xE_{μ}σs)t)′.

6.1.4 Embedding MeIT–rec in eF

Because I have no idea for a direct embedding of IMIT–rec into IT, MeIT–rec is embedded into eF. (Via the circle of embeddings we finally get that IMIT–rec embeds into eF.) Let MeIT–rec be the system which is derived from MeIT by leaving out the term generation rule (μ-E^{+}) and the reduction rule (β_{μ}^{+}). For every type ρ of system MeIT–rec define the type ρ′ of system eF by recursion on ρ and simultaneously prove that FV(ρ′) = FV(ρ) as follows:

(eF) The homomorphic type rules for eF.

(μ) (μαρ)′ := ∀β.(∀α.(α → β) → ρ′ → β) → β for β ∉ {α} ∪ FV(ρ).

(The proofs were obvious.) This definition is compatible with the variable conventions for the systems MeIT–rec and eF.

Lemma 6.2 (ρ[α⃗ := σ⃗])′ = ρ′[α⃗ := σ′].

Proof Induction on ρ. _{□}

For every term r^{ρ} of system MeIT–rec define the term r′ of system eF by recursion on r and simultaneously prove that r′ : ρ′ and FTV(r′) = FTV(r) and FV(r′) = {x^{σ′}|x^{σ} ∈ FV(r)} as follows:

(eF) The homomorphic term rules for eF.

(μ-I) (C_{μαρ}t)′ := Λβλz^{∀α.(α→β)→ρ′→β}.z(μαρ)′(λx^{(μαρ)′}.xβz)t′ for β ∉ {α} ∪ FV(ρ) ∪ FTV(t) and z ∉ FV(t).

(μ-E) (r^{μαρ}E_{μ}σs)′ := r′E_{∀}σ′s′.

(The proofs were always obvious.) This definition is again compatible with the variable conventions for MeIT–rec and eF. The statement of Lemma 4.11 is true for −′ and proved by induction on the terms. That −′ is an embedding is proved by induction on →. Only (β_{μ}) deserves our attention:

((C_{μαρ}t)E_{μ}σs)′ = (Λβλz^{∀α.(α→β)→ρ′→β}.z(μαρ)′(λx^{(μαρ)′}.xβz)t′)σ′s′
→ (λz^{∀α.(α→σ′)→ρ′→σ′}.z(μαρ)′(λx^{(μαρ)′}.xσ′z)t′)s′
↦ s′(μαρ)′(λx^{(μαρ)′}.xσ′s′)t′
= (s(μαρ)(λx^{μαρ}.xE_{μ}σs)t)′.

6.2 The term rewrite system UVIT

The following system UVIT is a variant of MeIT which corresponds to the logical system mNIp_{r}^{μ,ν} in [UV97]. The name UVIT (system of inductive types à la Uustalu and Vene) intends to honour [UV97] because it is the true junction between IMIT and NISPIT+ex, MeIT being only some peculiar variant of UVIT on the way from IMIT to NISPIT+ex as is the variant varIMIT of IMIT.

6.2.1 Definition

In what follows only changes to MeIT are given. All the statements on MeIT hold as well in UVIT. Changed clause in the definition of terms:

(μ-I) If j^{τ→μαρ} ∈ Λ and t^{ρ[α:=τ]} ∈ Λ, then (Cjt)^{μαρ} ∈ Λ and FV(Cjt) := FV(j) ∪ FV(t).

Changed clauses in the definition of reduction:

UVIT

\begin{matrix}(β_{μ}) & (Cj^{τ→μαρ}t)E_{μ}σs ↦ & sτ(λx^{τ} .(jx)E_{μ}σs)t \\ (β_{μ}^{+}) & (Cj^{τ→μαρ}t)E_{μ}^{+}σs ↦ & sτ(λx^{τ} .jx)(λx^{τ} .(jx)E_{μ}^{+}σs)t \end{matrix}

In both cases we require that x^{τ} ∉ FV(j) ∪ FV(s). All the other definitions may be adapted very easily from MeIT.

6.2.2 Embedding MeIT in UVIT

The following trivial embedding reflects the fact that (lfp^{⊇}-I-wk) is weaker than (lfp^{⊇}-I). Set ρ′ := ρ for every type ρ of MeIT. Define for every term r of system MeIT the term r′ of UVIT by recursion on r and simultaneously prove that for r : ρ we have r′ : ρ and FTV(r′) = FTV(r) and FV(r′) = FV(r) as follows:

(eF) The homomorphic term rules for eF.

(μ-I) (C_{μαρ}t)′ := C(λy^{μαρ}y)t′.

(μ-E^{(+)}) The homomorphic μ-elimination rules.

(The proofs are trivial.) The statement of Lemma 4.16 is true for this definition and is proved by induction on r. That −′ is an embedding is proved by induction on →. Only (β_{μ}) and (β_{μ}^{+}) deserve attention. Check e. g.

(β_{μ}^{+}): \begin{aligned}((C_{μαρ}t)E_{μ}^{+}σs)′ & = & (C(λy^{μαρ}y)t′)E_{μ}^{+}σs′ \\ & ↦ & s′(μαρ)(λx^{μαρ}.(λy^{μαρ}y)x)(λx^{μαρ}.(λy^{μαρ}y)xE_{μ}^{+}σs′)t′ \\ & →^{2} → & s′(μαρ)(λy^{μαρ}y)(λx^{μαρ}.xE_{μ}^{+}σs′)t′ \\ & = & (s(μαρ)(λy^{μαρ}y)(λx^{μαρ}.xE_{μ}^{+}σs)t)′. \end{aligned}

6.2.3 Embedding UVIT in MePIT

This section is nothing but the syntactic analogue of the considerations which motivated the definition of UVIT including the verification that reduction is preserved. For every type ρ of system UVIT define the type ρ′ of system MePIT by recursion on ρ and simultaneously prove that FV(ρ′) = FV(ρ) as follows:

(eF) The homomorphic type rules for eF.

(μ) (μαρ)′ := spos(μαρ′) = μα∃β.(β → α) × ρ′[α := β] for β ∉ {α} ∪ FV(ρ) which is a type of MePIT because α ∉ {β} ∪ FV(ρ′[α := β]).

(The proofs were obvious.) This definition is compatible with the variable conventions for the systems UVIT and MePIT.

Lemma 6.3 (ρ[α⃗ := σ⃗])′ = ρ′[α⃗ := σ′].

Proof Induction on ρ. _{□}

Define for every term r of system UVIT the term r′ of MePIT by recursion on r and simultaneously prove that r′ : ρ′ and FTV(r′) = FTV(r) and FV(r′) = {x^{σ′}|x^{σ} ∈ FV(r)} as follows:

(eF) The homomorphic term rules for eF.

(μ-I) (Cj^{τ→μαρ}t^{ρ[α:=τ]})′ := C_{(μαρ)′} t̂ with t̂:= C_{∃β.(β→(μαρ)′)×ρ′[α:=β],τ′}⟨j′, t′⟩

(μ-E) (r^{μαρ}E_{μ}σs^{∀α.(α→σ)→ρ→σ})′ := r′E_{μ}σ′ŝ with

ŝ:= λz^{∃α.(α→σ′)×ρ′}.z(Λαλy^{(α→σ′)×ρ′}.s′α(yL)(yR))

(μ-E^{+}) (r^{μαρ}E_{μ}^{+}σs^{∀α.(α→μαρ)→(α→σ)→ρ→σ})′ := r′E_{μ}^{+}σ′ŝ with

ŝ:= λz^{∃α.(α→(μαρ)′×σ′)×ρ′}.z(Λαλy^{(α→(μαρ)′×σ′)×ρ′}.s′α(λx^{α}.yLxL)(λx^{α}.yLxR)(yR))

(The proofs are trivial.) The passage from s′ to ŝ in both elimination cases is nothing but uncurrying. Substitutivity (the statement of Lemma 4.11) is again true for this definition. By induction on → show that −′ indeed is an embedding. The only cases of interest are (β_{μ}) and (β_{μ}^{+}). They require a long calculation which essentially only shows that uncurrying is wellbehaved with respect to reduction. We only check (β_{μ}^{+}): ((Cjt)E_{μ}^{+}σs)′ ↦_{β_{μ}^{+}}

ŝ(map_{λα∃β.(β→α)×ρ′[α:=β]}(μαρ)′((μαρ)′ × σ′)(λx^{(μαρ)′}.⟨x, (λx^{(μαρ)′}.xE_{μ}^{+}σ′ŝ)x⟩)t̂) →_{β_{∀}}^{2}→_{β_{→}}^{2}

(setting r̂:= (λx^{(μαρ)′}.⟨x, (λx^{(μαρ)′}.xE_{μ}^{+}σ′ŝ)x⟩))

ŝ(t̂E_{∃}(Λβλy^{(β→(μαρ)′)×ρ′[α:=β]}.C_{∃β.(β→(μαρ)′×σ′)×ρ′[α:=β],β}⟨λz^{β}.r̂(yLz), yR⟩)) →_{β_{∃}}

ŝ((Λβλy^{(β→(μαρ)′)×ρ′[α:=β]}.C_{∃β.(β→(μαρ)′×σ′)×ρ′[α:=β],β}⟨λz^{β}.r̂(yLz), yR⟩)τ′⟨j′, t′⟩) →_{β_{∀}}→_{β_{→}}→_{β_{×}}^{2}

ŝ(C_{∃β.(β→(μαρ)′×σ′)×ρ′[α:=β],τ′}⟨λz^{τ′}.r̂(j′z), t′⟩) = ŝ(C_{∃α.(α→(μαρ)′×σ′)×ρ′,τ′}⟨λz^{τ′}.r̂(j′z), t′⟩) →^{2}

(Λαλy^{(α→(μαρ)′×σ′)×ρ′}.s′α(λu^{α}.yLuL)(λu^{α}.yLuR)(yR))τ′⟨λz^{τ′}.r̂(j′z), t′⟩ →_{β_{∀}}→_{β_{→}}→_{β_{×}}^{3}

s′τ′(λu^{τ′}.(λz^{τ′}.r̂(j′z))uL)(λu^{τ′}.(λz^{τ′}.r̂(j′z))uR)t′ →_{β_{→}}^{4}→_{β_{×}}^{2}

s′τ′(λu^{τ′}.j′u)(λu^{τ′}.(λx^{(μαρ)′}.xE_{μ}^{+}σ′ŝ)(j′u))t′ →_{β_{→}}

s′τ′(λx^{τ′}j′x)(λx^{τ′}.(j′u)E_{μ}^{+}σ′ŝ))t′ = (sτ(λx^{τ} .jx)(λx^{τ} .(jx)E_{μ}^{+}σs)t)′

6.3 The dual coMeIT of MeIT

The system corresponding to (lfp^{⊆}-I), (lfp^{⊆}-E) and (lfp^{⊆}-E^{+}) is defined. The system varEMIT is embedded into it and it is embedded into its fragment without iteration and into coMePIT which motivated its definition, and its iterative fragment is embedded into eF. The system coMeIT is dual to MeIT because it is motivated by the monotone operator Φ^{⊆} which is a construction dual to the definition of Φ^{⊇}.

6.3.1 Definition

The (second) definition of typed terms and their free variables for system eF is extended by the following clauses:

(μ-I) If t^{∀α.(μαρ→α)→ρ} ∈ Λ then (C_{μαρ}t)^{μαρ} ∈ Λ and FV(C_{μαρ}t) := FV(t).

(μ-E) If r^{μαρ} ∈ Λ and s^{(∀α.(σ→α)→ρ)→σ} ∈ Λ (with α ∉ FV(σ)), then (rs)^{σ} ∈ Λ (also written

as rE_{μ}σs or shorter rE_{μ}s) and FV(rs) := FV(r) ∪ FV(s).

(μ-E^{+}) If r^{μαρ} ∈ Λ and s^{(∀α.(μαρ×σ→α)→ρ)→σ} ∈ Λ^{5}(with α ∉ FV(σ)), then (rs)^{σ} ∈ Λ (also

written as rE_{μ}^{+}σs or shorter rE_{μ}^{+}s) and FV(rs) := FV(r) ∪ FV(s).

This definition is again compatible with the renaming convention for bound type variables. Extend the recursive definition of FTV(r) for system eF by the following clauses:

(μ-I) FTV(C_{μαρ}t) := FV(μαρ) ∪ FTV(t).

(μ-E) FTV(rs) := FTV(r) ∪ FTV(s).

(μ-E^{+}) FTV(rs) := FTV(r) ∪ FTV(s).

5It would be easy to avoid the use of × by stipulating s^{(∀α.(μαρ→σ→α)→ρ)→σ} ∈ Λ and changing (β_{μ}^{+}) accordingly.

The embeddings into and from coMeIT would be less elegant, however.

The definition of r[xρ⃗ := s⃗] for system eF together with the proof of r^{ρ}[xρ⃗ := s⃗] : ρ and FV(r[xρ⃗ := s⃗]) = (FV(r) \ xρ⃗) ∪ ⋃{FV(s_{i})|x_{i}^{ρ_{i}} ∈ FV(r) ∧ x_{i}^{ρ_{i}} ≠ x_{j}^{ρ_{j}} for j < i} (i. e., the statement of Lemma 2.10) is extended by the following clauses:

(μ-I) (C_{μαρ}t)[xρ⃗ := s⃗] := C_{μαρ}t[xρ⃗ := s⃗]. Proof obvious.
(μ-E) (rs)[xρ⃗ := s⃗] := r[xρ⃗ := s⃗]E_{μ}s[xρ⃗ := s⃗]. Proof obvious.
(μ-E^{+}) (rs)[xρ⃗ := s⃗] := r[xρ⃗ := s⃗]E_{μ}^{+}s[xρ⃗ := s⃗]. Proof obvious.

The definition of r[α⃗ := σ⃗] for system eF together with the proof of r^{ρ}[α⃗ := σ⃗] : ρ[α⃗ := σ⃗] and FV(r[α⃗ := σ⃗]) = {y^{τ[α⃗:=σ⃗]}|y^{τ} ∈ FV(r)} is extended by the following clauses:

(μ-I) (C_{μαρ}t)[α⃗ := σ⃗] := C_{(μαρ)[α⃗:=σ⃗]}t[α⃗ := σ⃗]. Proof obvious.
(μ-E) (rs)[α⃗ := σ⃗] := r[α⃗ := σ⃗]E_{μ}s[α⃗ := σ⃗]. Proof obvious.
(μ-E^{+}) (rs)[α⃗ := σ⃗] := r[α⃗ := σ⃗]E_{μ}^{+}s[α⃗ := σ⃗]. Proof obvious.

The statements made in section 2.1.2 are valid in coMeIT, too. Extend the inductive definition of rs⃗ for system eF as follows:

(μ-E) If rs⃗ : μαρ and s : (∀α.(σ → α) → ρ) → σ (with α ∉ FV(σ)), then r(s⃗, s) := (rs⃗)s.

(μ-E^{+}) If rs⃗ : μαρ and s : (∀α.(μαρ × σ → α) → ρ) → σ (with α ∉ FV(σ)), then

r(s⃗, s) := (rs⃗)s.

The statement of Lemma 2.23 holds also true for coMeIT.

Lemma 6.4 Every term has exactly one of the forms given in Lemma 2.44 or exactly one of the following forms:

(μ-I) C_{μαρ}t

(μ-R) (C_{μαρ}t)ss⃗, subsuming both eliminations for μ

Proof Induction on terms. _{□}

Extend the inductive definition of the set NF for system eF by the following clause:

(μ-I) If C_{μαρ}t is a term and t ∈ NF, then C_{μαρ}t ∈ NF.

The statements in section 2.1.3 hold again for coMeIT. Define the relation ↦ as for system eF, but add the following clauses:

coMeIT

\begin{matrix}(β_{μ}) & (C_{μαρ}t)E_{μ}σs ↦ & s(Λαλz^{σ→α}.tα(λx^{μαρ}.z(xE_{μ}σs))) \\ (β_{μ}^{+}) & (C_{μαρ}t)E_{μ}^{+}σs ↦ & s(Λαλz^{μαρ×σ→α}.tα(λx^{μαρ}.z⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩)) \end{matrix}

In both rules we require that x^{μαρ} ∉ FV(s) and that z with the respective type is not in FV(s) ∪ FV(t) and we assume that α ∉ FTV(s) ∪ FTV(t). As for system eF the objects on the right side are automatically terms if the respective object on the left is a term, and the types are equal. The relation →_{whd} is defined as for system F and has the same properties as stated there. Extend the inductive definition of the relation → for system eF by the congruence rules for μ and prove that if r → r′, then r and r′ have the same type and FV(r′) ⊆ FV(r). Extend the inductive definition of WN for system eF by the following clauses:

(μ-I) If C_{μαρ}t is a term and t ∈ WN, then C_{μαρ}t ∈ WN.

(β_{μ}) If s(Λαλz^{σ→α}.tα(λx^{μαρ}.z(xE_{μ}σs)))s⃗ ∈ WN, the side conditions of the (β_{μ})-rule

are met and (C_{μαρ}t)E_{μ}σss⃗ is a term, then (C_{μαρ}t)E_{μ}σss⃗ ∈ WN.

(β_{μ}^{+}) If s(Λαλz^{μαρ×σ→α}.tα(λx^{μαρ}.z⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩))s⃗ ∈ WN, the side conditions of the (β_{μ}^{+})-rule are met and (C_{μαρ}t)E_{μ}^{+}σss⃗ is a term, then (C_{μαρ}t)E_{μ}^{+}σss⃗ ∈ WN.

Again definition by recursion on WN is admissible. Extend the recursive definition of the function Ω from WN to Λ and the simultaneous proof of r →^{∗} Ω(r) ∈ NF for r ∈ WN by the following clauses:

(μ-I) Ω(C_{μαρ}t) := C_{μαρ}Ω(t).
(β_{μ}) Ω((C_{μαρ}t)E_{μ}σss⃗) := Ω(s(Λαλz^{σ→α}.tα(λx^{μαρ}.z(xE_{μ}σs)))s⃗).

(β_{μ}^{+}) Ω((C_{μαρ}m)E_{μ}^{+}σss⃗) := Ω(s(Λαλz^{μαρ×σ→α}.tα(λx^{μαρ}.z⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩))s⃗).

The proofs are always obvious. Extend the definition of SN for system eF by the following clauses:

(μ-I) If C_{μαρ}t is a term and t ∈ SN, then C_{μαρ}t ∈ SN.

(β_{μ}) If s(Λαλz^{σ→α}.tα(λx^{μαρ}.z(xE_{μ}σs)))s⃗ ∈ SN, the side conditions of the (β_{μ})-rule are

met and (C_{μαρ}t)E_{μ}σss⃗ is a term, then (C_{μαρ}t)E_{μ}σss⃗ ∈ SN.

(β_{μ}^{+}) If s(Λαλz^{μαρ×σ→α}.tα(λx^{μαρ}.z⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩))s⃗ ∈ SN, the side conditions of the (β_{μ}^{+})-rule are met and (C_{μαρ}t)E_{μ}^{+}σss⃗ is a term, then (C_{μαρ}t)E_{μ}^{+}σss⃗ ∈ SN.

The only difference between the μ-clauses for SN and WN is the name of the defined set. Every statement made in section 2.1.4 for system F (on nf, NF, wn, WN, Ω, SN and sn) is also true for coMeIT.

6.3.2 Embedding varEMIT in coMeIT

The motivation for this section is similar to the motivation for the embedding of varIMIT into MeIT. In the introduction to this chapter it was shown that (lfp^{⊆}-I), (lfp^{⊆}-E) and (lfp^{⊆}-E^{+}) are equivalent to (lfp-I), (lfp-E) and (lfp-E^{+}) after replacing Φ by Φ^{⊆} in the latter three rules. If Φ is monotone, then Φ^{⊆} = Φ. Hence, by using monotonicity of Φ we may derive (lfp-I), (lfp-E) and (lfp-E^{+}) from (lfp^{⊆}-I), (lfp^{⊆}-E) and (lfp^{⊆}-E^{+}), respectively, where lfp^{⊆} has been replaced by lfp in the latter three rules. Because monotonicity does not enter the proofs for the elimination rules and it is only used in a restricted way for the introduction rule, it is possible to produce an embedding of varEMIT into coMeIT out of the proofs. Of course, one has to check that reduction is also preserved. Set ρ′ := ρ for every type ρ of varEMIT. Define for every term r of system varEMIT the term r′ of coMeIT by recursion on r and simultaneously prove that for r : ρ we have r′ : ρ and FTV(r′) = FTV(r) and FV(r′) = FV(r) as follows:

(eF) The homomorphic term rules for eF.

(μ-I) (C_{μαρ}m^{∀α.(μαρ→α)→ρ[α:=μαρ]→ρ}t^{ρ[α:=μαρ]})′ := C_{μαρ}(Λαλk^{μαρ→α}.m′αkt′)

(μ-E) (r^{μαρ}E_{μ}σs^{ρ[α:=σ]→σ})′ := r′E_{μ}σ(λf^{∀α.(σ→α)→ρ}.s′(fσ(λy^{σ}y)))

(μ-E^{+}) (r^{μαρ}E_{μ}^{+}σs^{ρ[α:=μαρ×σ]→σ})′ := r′E_{μ}^{+}σ(λf^{∀α.(μαρ×σ→α)→ρ}.s′(f(μαρ × σ)(λy^{μαρ×σ}y)))

(The proofs are trivial.) Note that in both elimination cases the variable f is simply applied to the identity (after instantiation to a type). The statement of Lemma 4.16 is true for this definition and is proved by induction on r. That −′ is an embedding is proved by induction on →. Only (β_{μ}) and (β_{μ}^{+}) deserve attention. Check e. g. (β_{μ}^{+}): ((C_{μαρ}mt)E_{μ}^{+}σs)′ = C_{μαρ}(Λαλk^{μαρ→α}.m′αkt′)E_{μ}^{+}σ(λf^{∀α.(μαρ×σ→α)→ρ}.s′(f(μαρ × σ)(λy^{μαρ×σ}y))) ↦_{β_{μ}^{+}}

(setting ŝ:= (λf^{∀α.(μαρ×σ→α)→ρ}.s′(f(μαρ × σ)(λy^{μαρ×σ}y))))

ŝ(Λαλz^{μαρ×σ→α}.(Λαλk^{μαρ→α}.m′αkt′)α(λx^{μαρ}.z⟨x, (λx^{μαρ}.xE_{μ}^{+}σŝ)x⟩)) →_{β_{∀}}→_{β_{→}}

ŝ(Λαλz^{μαρ×σ→α}.m′α(λx^{μαρ}.z⟨x, (λx^{μαρ}.xE_{μ}^{+}σŝ)x⟩)t′) →_{β_{→}}→_{β_{∀}}→_{β_{→}}

s′(m′(μαρ × σ)(λx^{μαρ}.(λy^{μαρ×σ}y)⟨x, (λx^{μαρ}.xE_{μ}^{+}σŝ)x⟩)t′) →_{β_{→}}

s′(m′(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σŝ)x⟩)t′) =

(s(m(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩)t))′

6.3.3 Embedding coMeIT in coMePIT

This section is nothing but the syntactic analogue of the considerations which motivated the definition of coMeIT including the verification that reduction is preserved. For every type ρ of system coMeIT define the type ρ′ of system coMePIT by recursion on ρ and simultaneously prove that FV(ρ′) = FV(ρ) as follows:

(eF) The homomorphic type rules for eF.

(μ) (μαρ)′ := pos(μαρ′) = μα∀β.(α → β) → ρ′[α := β] for β ∉ {α} ∪ FV(ρ) which is a type of coMePIT because α ∉ {β} ∪ FV(ρ′[α := β]).

(The proofs were obvious.) This definition is compatible with the variable conventions for the systems coMeIT and coMePIT.

Lemma 6.5 (ρ[α⃗ := σ⃗])′ = ρ′[α⃗ := σ′].

Proof Induction on ρ. _{□}

Define for every term r of system coMeIT the term r′ of coMePIT by recursion on r and simultaneously prove that r′ : ρ′ and FTV(r′) = FTV(r) and FV(r′) = {x^{σ′}|x^{σ} ∈ FV(r)} as follows:

(eF) The homomorphic term rules for eF.

(μ-I) (C_{μαρ}t^{∀α.(μαρ→α)→ρ})′ := C_{(μαρ)′}t′.

(μ-E) (r^{μαρ}E_{μ}σs^{(∀α.(σ→α)→ρ)→σ})′ := r′E_{μ}σs′.

(μ-E^{+}) (r^{μαρ}E_{μ}^{+}σs^{(∀α.(μαρ×σ→α)→ρ)→σ})′ := r′E_{μ}^{+}σs′.

(The proofs are trivial except for r′ : ρ′.) Obviously, −′ is the identity on the underlying untyped terms. (coMeIT has been designed such this trivial embedding works.) Substitutivity (the statement of Lemma 4.11) is again true for this definition. By induction on → show that −′ indeed is an embedding. The only cases of interest are (β_{μ}) and (β_{μ}^{+}). We only check (β_{μ}^{+}): ((C_{μαρ}t)E_{μ}^{+}σs)′ = (C_{(μαρ)′}t′)E_{μ}^{+}σ′s′ ↦_{β_{μ}^{+}}

s′(map_{λα∀β.(α→β)→ρ′}(μαρ)′((μαρ)′ × σ′)(λx^{(μαρ)′}.⟨x, (λx^{(μαρ)′}.xE_{μ}^{+}σ′s′)x⟩)t′) →_{β_{∀}}^{2}→_{β_{→}}^{3}

s′(Λβλy^{(μαρ)′×σ′→β}.t′β(λx^{(μαρ)′}.y⟨x, (λx^{(μαρ)′}.xE_{μ}^{+}σ′s′)x⟩)) =

(s(Λαλz^{μαρ×σ→α}.tα(λx^{μαρ}.z⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩)))′ We see that the verification that −′ gives an embedding is completely straightforward because also the reduction rules for coMeIT were designed for that purpose. But note that due to the fact that β-reduction for μ in coMePIT is defined by help of map (and not only by \underline{map} and a substitution) we get some extra reductions which also show that an embedding of coMePIT in coMeIT cannot be given in an easy way.

6.3.4 Embedding coMeIT in coMeIT–it

Let coMeIT–it be the system which is derived from coMeIT by leaving out the term rule (μ-E) and the reduction rule (β_{μ}). Set ρ′ := ρ and for every term r^{ρ} of system coMeIT define the term r′ of system coMeIT–it by recursion on r and simultaneously prove that r′ : ρ and FTV(r′) = FTV(r) and FV(r′) = FV(r) as follows:

(eF) The homomorphic term rules for eF.

(μ-I) The homomorphic μ-introduction rule.

(μ-E) (r^{μαρ}E_{μ}σs)′ := r′E_{μ}^{+}σŝ with

ŝ:= λz^{∀α.(μαρ×σ→α)→ρ}.s′(Λαλy^{σ→α}.zα(λk^{μαρ×σ}.y(kR))),

where we assume that α ∉ FV(σ) and require z ∉ FV(s).

(μ-E^{+}) The homomorphic μ^{+}-elimination rule.

(The proofs are obvious.) Substitutivity (the statement of Lemma 4.16) is true for this definition and is proved by induction on r. That −′ is an embedding is proved by induction on →. Only the rule (β_{μ}) deserves attention. (β_{μ}): ((C_{μαρ}t)E_{μ}σs)′ = (C_{μαρ}t′)E_{μ}^{+}σŝ with ŝ as defined above ↦ ŝ(Λαλz^{μαρ×σ→α}.t′α(λx^{μαρ}.z⟨x, (λx^{μαρ}.xE_{μ}^{+}σŝ)x⟩)) →^{3} → s′(Λαλy^{σ→α}.t′α(λx^{μαρ}.(λk^{μαρ×σ}.y(kR))⟨x, (λx^{μαρ}.xE_{μ}^{+}σŝ)x⟩)) →^{3} → s′(Λαλy^{σ→α}.t′α(λx^{μαρ}.y(xE_{μ}^{+}σŝ))) = (s(Λαλz^{σ→α}.tα(λx^{μαρ}.z(xE_{μ}σs))))′

6.3.5 Embedding coMeIT–rec in eF

Let coMeIT–rec be the system which is derived from coMeIT by leaving out the term generation rule (μ-E^{+}) and the reduction rule (β_{μ}^{+}). For every type ρ of system coMeIT–rec define the type ρ′ of system eF by recursion on ρ and simultaneously prove that FV(ρ′) = FV(ρ) as follows:

(eF) The homomorphic type rules for eF.

(μ) (μαρ)′ := ∀β.((∀α.(β → α) → ρ′) → β) → β for β ∉ {α} ∪ FV(ρ).

(The proofs were obvious.) This definition is compatible with the variable conventions for the systems coMeIT–rec and eF.

Lemma 6.6 (ρ[α⃗ := σ⃗])′ = ρ′[α⃗ := σ′].

Proof Induction on ρ. _{□}

For every term r^{ρ} of system coMeIT–rec define the term r′ of system eF by recursion on r and simultaneously prove that r′ : ρ′ and FTV(r′) = FTV(r) and FV(r′) = {x^{σ′}|x^{σ} ∈ FV(r)} as follows:

(eF) The homomorphic term rules for eF.

(μ-I) (C_{μαρ}t)′ := Λβλz^{(∀α.(β→α)→ρ′)→β}.z(Λαλy^{β→α}.t′α(λx^{(μαρ)′}.y(xβz))) for β ∉ {α} ∪

FV(ρ) ∪ FTV(t) and y, z ∉ FV(t).

(μ-E) (r^{μαρ}E_{μ}σs)′ := r′E_{∀}σ′s′.

(The proofs were always obvious.) This definition is again compatible with the variable conventions for coMeIT–rec and eF. The statement of Lemma 4.11 is true for −′ and proved by induction on the terms. That −′ is an embedding is proved by induction on →. Only (β_{μ}) deserves our attention:

((C_{μαρ}t)E_{μ}σs)′ = (Λβλz^{(∀α.(β→α)→ρ′)→β}.z(Λαλy^{β→α}.t′α(λx^{(μαρ)′}.y(xβz))))σ′s′
→^{2} → s′(Λαλy^{σ′→α}.t′α(λx^{(μαρ)′}.y(xσ′s′)))
= (s(Λαλz^{σ→α}.tα(λx^{μαρ}.z(xE_{μ}σs))))′.

There is another way to get an embedding of coMeIT–rec in eF which goes as follows: coMeIT embeds into varEMIT by composing the embeddings via coMePIT, ESMIT and EMIT. Obviously, one may leave the rule (μ-E^{+}) out of all these embeddings in order to have an embedding of coMeIT–rec in varEMIT–rec. Because there are also embeddings of varEMIT–rec in IT and of IT in eF we are done.

98 CHAPTER 6. SYSTEMS WITH INDUCTIVE TYPES À LA MENDLER

Composing the embeddings

Let us first list all of the embeddings proved in the preceding chapters. In addition it is listed if a system is an instances of a class of systems or if it is a subsystem of a system (giving rise to a trivial embedding). We write ≼ for “embeds into”, ∈ for “is an instance of” and ≤ for “is a subsystem of”. We also write ≼ and ≤ between a system and a class of systems if the relation holds for each of those systems. As expected we use ⊆ and ∩ set-theoretically for classes of systems. (An asterisk marks the relation as interesting although it may be easy to establish. Two asterisks stress the importance.)

• F ≤ eF ≼^{∗} F.

• eF ≤ IT ≼^{∗} eF.

• eF ≤ eF+ex ≼^{∗} eF.

• eF ≤ EMIT.

• eF ≤ ESMIT ≼^{∗∗} EMIT.

• ESMITit ⊆ ESMIT and ESMITrec ⊆ ESMIT.

• eF+ex ≤ ESMIT+ex.

• eF ≤ varEMIT, EMIT ≼ varEMIT, eF ≤ varEMIT–rec ≤ varEMIT and varEMIT–rec ≼^{∗} IT.

• eF ≤ IMIT, eF ≤ IMIT–rec ≤ IMIT, eF ≤ IMIT–it ≤ IMIT.

• eF ≤ EMIT–it ≤ EMIT, eF+ex ≤ ISMIT+ex and IMIT ≤ IMIT+ex.

• The following embeddings were only sketched (in section 4.5.2): IMIT ≼^{∗} IMIT–it and EMIT ≼^{∗} EMIT–it. Auxiliary were: NISPIT+ex ∈ ISMIT+ex, ISMIT+ex ≼ IMIT+ex, IMIT+ex ≼ IMIT, MeIT–it ≼ IMIT–it and coMeIT–it ≼ EMIT–it.

• eF ≤ ISMIT ≼^{∗} IMIT.

• eF ≤ varIMIT and IMIT ≼ varIMIT.

• PIT = PITit ∈^{∗∗} ESMITit ∩ ISMIT and PITrec ∈ ESMITrec.

• SPIT ≤ PIT and SPIT ∈ ESMITit.

• PIT+ex ∈ ESMIT+ex and SPIT+ex ∈ ESMIT+ex.

• NIPIT ≤ PIT, NIPIT ∈^{∗} ESMITit ∩ ESMITrec.

• NISPIT ≤ SPIT, NISPIT ∈ ESMITit and NISPIT+ex ≤ SPIT+ex.

• MePIT ∈ ESMIT+ex and MePIT ≤ NISPIT+ex.

• coMePIT ∈ ESMIT and coMePIT ≤ NIPIT.

• eF ≤ MeIT and varIMIT ≼^{∗∗} MeIT.

• eF ≤ MeIT–it ≤ MeIT and MeIT ≼^{∗} MeIT–it.

• eF ≤ MeIT–rec ≤ MeIT and MeIT–rec ≼ eF.

• eF ≤ UVIT and MeIT ≼ UVIT ≼^{∗} MePIT.

• eF ≤ coMeIT and varEMIT ≼^{∗∗} coMeIT ≼^{∗} coMePIT.

• eF ≤ coMeIT–it ≤ coMeIT and coMeIT ≼^{∗} coMeIT–it.

• eF ≤ coMeIT–rec ≤ coMeIT and coMeIT–rec ≼ eF.

We may now prove the part of the theorem in chapter 1 pertaining to embeddings: The systems of class I embed into each other: F ≤ eF ≼ F. The other systems are defined as extensions of eF. Hence, they only have to be embedded into eF: This has been shown directly for IT, eF+ex, varEMIT–rec, MeIT–rec and coMeIT–rec. For IMIT–rec we argue as follows: In the proof of IMIT ≼ varIMIT ≼ MeIT one may leave out (μ-E^{+}) everwhere and thus gets IMIT–rec ≼ MeIT–rec. Because MeIT–rec ≼ eF, we are done. The systems of class IIa embed into one of class III: NISPIT and SPIT are subsystems of PIT and hence embed into it. Moreover, they are extensions of eF. Hence, every system of class I embeds into them. The systems of class IIb are all extensions of eF. They embed into one of the systems of class III: ESMIT ≼ EMIT, hence trivially also ESMITit ≼ EMIT and ESMITrec ≼ EMIT. ISMIT ≼ IMIT. Let us define the system EMIT+ex as the obvious extension of EMIT by ∃. Clearly, the proof that ESMIT ≼ EMIT extends to ESMIT+ex ≼ EMIT+ex. Also, the proof that eF+ex ≼ eF extends to EMIT+ex ≼ EMIT. Therefore, ESMIT+ex ≼ EMIT. ISMIT+ex ≼ IMIT+ex has already been listed. The systems of class III embed into each other: NIPIT ≤ PIT ∈ ISMIT. Also NIPIT ≤ PITrec ∈ ISMIT because NIPIT does neither use iteration nor recursion in the map terms and because the height measure h does not only establish that PITrec ∈ ESMIT but also PITrec ∈ ISMIT. ISMIT ≼ IMIT ≼ varIMIT ≼ MeIT ≼ UVIT ≼ MePIT ≤ NISPIT+ex ≤ SPIT+ex ≤ PIT+ex ∈ ESMIT+ex ≼ EMIT+ex ≼ EMIT ≼ varEMIT ≼ coMeIT ≼ coMePIT ≤ NIPIT. Hence, the concrete members of this chain (not each of ISMIT and ESMIT+ex) embed into each other and we are done with NIPIT, PIT=PITit, PITrec, IMIT, varIMIT, MeIT, UVIT, MePIT, NISPIT+ex, SPIT+ex, PIT+ex, EMIT, varEMIT, coMeIT and coMePIT. Therefore only IMIT+ex, MeIT–it, coMeIT–it, EMIT–it and IMIT–it remain to be dealt with. But IMIT ≤ IMIT+ex ≼ IMIT, MeIT–it ≤ MeIT ≼ MeIT–it and coMeIT–it ≤ coMeIT ≼ coMeIT–it. These embeddings were used to etablish the same for IMIT–it and EMIT–it in section 4.5.2. Confluence will be addressed in the next chapter and strong normalization in chapter 9. _{□}

As a main consequence of the theorem I consider the equivalence with respect to β-reduction of EMIT and IMIT. Hence, the two ways of fixing monotonicity witnesses to the term rules for μαρ give essentially the same. An interesting technical detail is the embedding of varEMIT into EMIT and of varIMIT into IMIT, hence showing that the relaxation of the monotonicity assumption does not add to the capability of expressing algorithms^{1}. As a consequence we also get e. g. NISPIT+ex ≼ NIPIT and NIPIT ≼ NISPIT+ex which is not at all obvious! One might think that the first embedding is furnished by simply coding the existential quantifier as in eF+ex ≼ eF. A coding is gained (note that it does not preserve strict positivity and hence has target NIPIT), but it does not preserve reduction because the map term is not transformed to the map term for the transformed type: Let −′ be the encoding. Let ρ := ∃γτ for some γ and τ such that α ∈ FV(ρ). We have to show e. g. that

(C_{μαρ}tE_{μ}σs)′ →^{+} (s(map_{λαρ}(μαρ)σ(λx^{μαρ}.xE_{μ}σs)t))′.

We have that

(C_{μαρ}tE_{μ}σs)′ = C_{μαρ′}t′E_{μ}σ′s′ ↦ s′(map_{λαρ′}(μαρ′)σ′(λx^{μαρ′}.xE_{μ}σ′s′)t′)

and

(s(map_{λαρ}(μαρ)σ(λx^{μαρ}.xE_{μ}σs)t))′ = s′((map_{λαρ})′(μαρ′)σ′(λx^{μαρ′}.xE_{μ}σ′s′)t′).

By looking at the definitions we see that map_{λαρ′} ≠ (map_{λαρ})′ (the first corresponding \underline{map} starts with Λ-abstraction, the \underline{map} corresponding to the second term is a term of the form xr⃗). Because map_{λαρ′} ∈ NF, also map_{λαρ′} ↛^{∗} (map_{λαρ})′. A second glance at the definitions reveals that also except in trivial cases

s′(map_{λαρ′}(μαρ′)σ′(λx^{μαρ′}.xE_{μ}σ′s′)t′) ↛^{∗} s′((map_{λαρ})′(μαρ′)σ′(λx^{μαρ′}.xE_{μ}σ′s′)t′).

We conclude that type-changing coding in general does not give embeddings for systems of selected monotone inductive types because the selected monotonicity witnesses for the encoded types are not the encoded witnesses. Another interesting consequence of the theorem is PIT ≼ NIPIT. Hence, even non-strict positivity does not allow to make essential (in the sense of getting algorithms which cannot be simulated) use of interleaving. Open questions remain, most importantly whether SPIT ≼ NISPIT or NIPIT ≼ SPIT. If both were true, then class IIa could be merged in class III. In order to show both embeddings it is obviously enough to show that NIPIT embeds into NISPIT. In some sense it is the question whether the intuitionistic theory of positive inductive definitions may be reduced to the intuitionistic theory of strictly positive inductive definitions which has been answered positively by Buchholz in [BFPS81], chapter IV §5. But the analogy is not too close: Buchholz’ systems do not have the second-order universal quantification because the aim is a proof-theoretic reduction. On the other side, there is no account of primitive recursion and no notion of β-reduction. Nevertheless it might be possible to get NIPIT ≼ NISPIT from an analysis of the proof in [BFPS81]. If NIPIT ⋠ NISPIT then a proof of the non-embeddability would probably be even harder.

1Contrast this with the non-normalizing variant of IMIT considered in section 4.7.1.

102 CHAPTER 7. COMPOSING THE EMBEDDINGS

Confluence

A binary relation → (with transitive and reflexive closure →^{∗}) on a set M is locally confluent iff for every r, r′ and r′′ in M with r → r′ and r → r′′ there is an r′′′ ∈ M such that r′ →^{∗} r′′′ and r′′ →^{∗} r′′′. → is confluent iff →^{∗} is locally confluent. (Note that →^{∗∗}=→^{∗}.) The major consequence of confluence is that there is at most one normal form of any term. If the system is also normalizing this gives decidability of the equality induced by →. Our goal is to establish confluence for all the systems which have been introduced so far. The proof will use a variant of Masako Takahashi’s method [Tak95] which in case of higher-order rewrite systems has been worked out in [vR96] and for Orthogonal Pattern Rewrite Systems in [MN98]. It has to be admitted that the variation on the method is not essential for getting the result. Also the restriction to typed terms is not necessary. However, only typed terms are considered in this thesis. Note that there are also proofs of confluence via the computability predicate method presented in the next chapter for proving strong normalization (see e. g. [Kol85] where predicates of monovaluedness are studied). For the systems of this thesis the method has the drawback of reflecting the expressive power of the systems (which therefore includes intuitionistic second-order arithmetic) although the proof by complete superdevelopments shown here is an easy syntactic analysis.

8.1 Confluence of system F

Define the relation ↠ of parallel reduction between terms^{1} by induction and simultaneously prove that r ↠ r′ ⇒ r →^{∗} r′ as follows:

(V) x^{ρ} ↠ x^{ρ}.

(→-I) If r ↠ r′, then λx^{ρ}r ↠ λx^{ρ}r′.

(→-E) If r ↠ r′ and s ↠ s′, then rE_{→}s ↠ r′E_{→}s′. (We use the notation of section 2.2.2.)

(β_{→}) If r ↠ λx^{ρ}r′ and s^{ρ} ↠ s′, then rE_{→}s ↠ r′[x^{ρ} := s′].
(∀-I) If r ↠ r′, then Λαr ↠ Λαr′.

(∀-E) If r ↠ r′, then rE_{∀}σ ↠ r′E_{∀}σ.

1We adopt the convention of footnote 4 on p. 19. As for → a more careful formulation would clarify that the well-formedness of r′ is always a consequence of the well-formedness of r in every clause which again gives an operational reading to ↠. See also the discussion in section 2.1.4.

(β_{∀}) If r ↠ Λαr′, then rE_{∀}σ ↠ r′[α := σ].

(The proofs are omitted.) Define for every term r the complete superdevelopment r^{∗} of r as a term of the same type as r by recursion on terms and simultaneously prove that r ↠ r^{∗} as follows:

(V) (x^{ρ})^{∗} := x^{ρ}.
(→-I) (λx^{ρ}r)^{∗} := λx^{ρ}r^{∗}.
(→-E) (rE_{→}s)^{∗} := r^{∗}Ê_{→}s^{∗}. (See section 2.1.4 for the notation Ê_{→}.)

(∀-I) (Λαr)^{∗} := Λαr^{∗}. (Note that Λαr^{∗} is well-formed due to FV(r^{∗}) ⊆ FV(r) which follows from the additional claim.)

(∀-E) rE_{∀}σ := r^{∗}Ê_{∀}σ. (See section 2.1.4 for the notation Ê_{∀}.)

(The proofs are again omitted.) Let us consider two essential examples of complete superdevelopments (omitting types everywhere):

((λxx)(λyr)s)^{∗} = r^{∗}[y := s^{∗}]
((λxλyr)st)^{∗} = r^{∗}[x, y := s^{∗}, t^{∗}], if x ≠ y

We see that even created redices are contracted during the formation of the complete superdevelopment. Of course, we do not contract every created redex, e. g.

((λx.xy)(λzz))^{∗} = (xy)[x := λzz] = (λzz)y.

The name superdevelopment was coined by van Raamsdonk [vR93]. I just mention that r^{∗} is a maximal superdevelopment of r, if one extends van Raamsdonk’s notion to system F properly. Below we will see that r^{∗} is a maximal reduct with respect to ↠. Nevertheless, ↠ is not the superdevelopment relation (↠ is stronger) because in the definition of superdevelopments it is allowed that the term which is substituted via the (β_{→})-rule gets developped differently for the different free occurrences of x in r (which is obviously impossible in the definition of ↠). One would get maximal developments if one replaced the elimination clauses of the definition of r^{∗} in the following way:

(→-E) ((λx^{ρ}t)s)^{∗} := t^{∗}[x^{ρ} := s^{∗}], and (rs)^{∗} := r^{∗}s^{∗}, if r is not a λ-abstraction.
(∀-E) (Λαt)σ)^{∗} := t^{∗}[α := σ], and (rσ)^{∗} := r^{∗}σ, if r is not a Λ-abstraction.

Deciding the cases according to the shape of r and not that of r^{∗} makes the difference. This definition would fit to an alternate notion of parallel reduction by replacing the defining rules of ↠ as follows:

(β_{→}) If r ↠ r′ and s ↠ s′, then (λx^{ρ}r)s ↠ r′[x^{ρ} := s′].
(β_{∀}) If r ↠ r′, then (Λαr)σ ↠ r′[α := σ].

These definitions are the basis of the Takahashi method for proving confluence. My definitions give more flexibility to the method. This will not become clear from this thesis, however.

Lemma 8.1 (Reflexivity of ↠) r ↠ r.

Proof Induction on r. (The rules (β_{→}) and (β_{∀}) are not needed here.) _{□}

Corollary 8.2 →⊆↠.

Proof Induction on → using reflexivity almost everywhere. _{□}

Corollary 8.3 →^{∗}=↠^{∗}.

Proof Use ↠⊆→^{∗} and →^{∗∗}=→^{∗}. _{□}

Lemma 8.4 If r ↠ r′ and s⃗ ↠ s⃗′ (i. e., s_{i} ↠ s′_{i} for all i), then r[xρ⃗ := s⃗] ↠ r′[xρ⃗ := s⃗′].

Proof Induction on r ↠ r′. (V) Case x^{ρ} ↠ x^{ρ}. Obvious. (→-I) Case λx^{ρ}r ↠ λx^{ρ}r′. Easy by induction hypothesis. (→-E) Case rE_{→}s ↠ r′E_{→}s′. By induction hypothesis. (β_{→}) Case rE_{→}s ↠ r′[x^{ρ} := s′]. We may assume that x^{ρ} ∉ xρ⃗ ∪ FV(s⃗). Therefore by induction hypothesis r[xρ⃗ := s⃗] ↠ λx^{ρ}.r′[xρ⃗ := s⃗′] and s[xρ⃗ := s⃗] ↠ s′[xρ⃗ := s⃗′]. Hence

(rE_{→}s)[xρ⃗ := s⃗] ↠ (r′[xρ⃗ := s⃗′])[x^{ρ} := s′[xρ⃗ := s′]] = (r′[x^{ρ} := s′])[xρ⃗ := s⃗′]

by Lemma 2.13. (∀-I) Case Λαr ↠ Λαr′. We may assume that α ∉ FTV(s⃗). By Lemma 2.30, α ∉ FTV(s⃗′). The claim now follows from the induction hypothesis. (∀-E) Case rE_{∀}σ ↠ r′E_{∀}σ. By induction hypothesis. (β_{∀}) Case rE_{∀}σ ↠ r′[α := σ]. We may assume that α ∉ FTV(s⃗′). Therefore by induction hypothesis r[xρ⃗ := s⃗] ↠ Λαr′[xρ⃗ := s⃗′]. Hence, (rE_{∀}σ)[xρ⃗ := s⃗] ↠ (r′[xρ⃗ := s⃗′])[α := σ]. Due to FV(ρ⃗) ⊆ FTV(s⃗′) (by Lemma 2.8), α ∉ FV(ρ⃗). Because Λαr′ is well-formed, we have the implication x^{ρ} ∈ FV(r′) ⇒ α ∉ FV(ρ). Therefore Corollary 2.21 applies and gives that

(r′[xρ⃗ := s′])[α := σ] = r′[α := σ][xρ⃗ := s′[α := σ]] = r′[α := σ][xρ⃗ := s⃗′]

(as α ∉ FTV(s⃗′)). _{□}

Lemma 8.5 If r ↠ r′, then r[α⃗ := σ⃗] ↠ r′[α⃗ := σ⃗].

Proof Induction on r ↠ r′. The cases (V), (→-I), (→-E), (∀-I) and (∀-E) are as easy as for the preceding lemma. The case (β_{∀}) uses Lemma 2.18. Case (β_{→}): By induction hypothesis r[α⃗ := σ⃗] ↠ (λx^{ρ}r′)[α⃗ := σ⃗]. We may assume that x^{τ} ∈ FV(r′) ⇒ τ = ρ. Hence, (λx^{ρ}r′)[α⃗ := σ⃗] = λx^{ρ[α⃗:=σ⃗]}.r′[α⃗ := σ⃗]. By induction hypothesis s[α⃗ := σ⃗] ↠ s′[α⃗ := σ⃗]. Therefore

(rs)[α⃗ := σ⃗] ↠ (r′[α⃗ := σ⃗])[x^{ρ[α⃗:=σ⃗]} := s′[α⃗ := σ⃗]].

This last term equals r′[x^{ρ} := s′][α⃗ := σ⃗] by Corollary 2.22 (to the interchange law for substitution). _{□}

Obviously, the parallel reduction relation ↠ is not deterministic, i. e., given a term r there may be several terms r′ such that r ↠ r′. If r is not an elimination there is only one clause in the definition which allows to derive r ↠ r′ for any r′. This immediately leads to the following

Lemma 8.6 (V) If x ↠ t, then t = x.

(→-I) If λx^{ρ}r ↠ t, then t = λx^{ρ}r′ with r ↠ r′.

(∀-I) If Λαr ↠ t, then t = Λαr′ with r ↠ r′.

Proof By induction on ↠ without using the induction hypothesis. _{□}

The following lemma is the key to proving confluence. It states that the complete superdevelopment r^{∗} of a term r is not only a parallel reduct of r (as is shown simultaneously with the definition of r^{∗}) but a parallel reduct of every parallel reduct r′ of r. In this sense r^{∗} is the maximal parallel reduct of r.

Lemma 8.7 (Maximality of r^{∗}) If r ↠ r′, then r′ ↠ r^{∗}.

Proof Induction on r ↠ r′. The cases (V), (→-I) and (∀-I) are very easy. (→-E) Case rE_{→}s ↠ r′E_{→}s′. By induction hypothesis r′ ↠ r^{∗} and s′ ↠ s^{∗}. If r^{∗} = λx^{ρ}t, then r′s′ ↠ t[x^{ρ} := s^{∗}] = (rs)^{∗} by the rule (β_{→}). If r^{∗} is not a λ-abstraction, then by rule (→-E) r′s′ ↠ r^{∗}s^{∗} = (rs)^{∗}. (β_{→}) Case rE_{→}s ↠ r′[x^{ρ} := s′]. By induction hypothesis λx^{ρ}r′ ↠ r^{∗} and s′ ↠ s^{∗}. By the preceding lemma r^{∗} = λx^{ρ}r′′ with r′ ↠ r′′. Hence (rs)^{∗} = r′′[x^{ρ} := s^{∗}] and by Lemma 8.4 r′[x^{ρ} := s′] ↠ r′′[x^{ρ} := s^{∗}]. The rules (∀-E) and (β_{∀}) are treated similarly (where Lemma 8.5 is used instead of Lemma 8.4). _{□}

Corollary 8.8 (“Diamond property” for ↠) If r ↠ r′ and r ↠ r′′, then there is a term r′′′ such that r′ ↠ r′′′ and r′′ ↠ r′′′.

Proof Set r′′′ := r^{∗}. _{□}

The main advantage of Takahashi’s method over the traditional approach by parallel reduction seems to be the fact that r′′′ is identified as a term r^{∗} which does not depend on r′ and r′′. Define the binary relations ↠^{n}, n ∈ ℕ, by recursion on n as follows:

r ↠^{0} s :⇔ r = s and r ↠^{n+1} s :⇔ ∃t.r ↠ t ∧ t ↠^{n} s.

Obviously, r ↠^{∗} r′ ⇔ ∃n.r ↠^{n} r′, and if r ↠^{n} r′, then r ↠^{m} r′ for all m > n.

Corollary 8.9 If r ↠^{m} r′ and r ↠^{n} r′′, then there is a term r′′′ such that r′ ↠^{n} r′′′ and r′′ ↠^{m} r′′′.

Proof Induction on m + n. Trivial for m = 0 or n = 0. Otherwise there are terms s′ and s′′ such that r ↠ s′ ↠^{m−1} r′ and r ↠ s′′ ↠^{n−1} r′′. By the preceding corollary, there is a term s (viz. r^{∗}) such that s′ ↠ s and s′′ ↠ s. m − 1 + 1 < m + n, hence by induction hypothesis there is a term t such that r′ ↠ t and s ↠^{m−1} t. m − 1 + 1 + n − 1 < m + n, hence by induction hypothesis (applied to the term s′′) there is a term r′′′ such that t ↠^{n−1} r′′′ and r′′ ↠^{m−1+1} r′′′. Therefore also r′ ↠^{n} r′′′. (Of course, it would be easier to draw a big rectangle built up from mn small rectangles derived by applying the “diamond property” that many times.) _{□}

Corollary 8.10 (Confluence) → is confluent.

Proof We have to show that →^{∗}=↠^{∗} is locally confluent. This follows immediately from the preceding corollary. _{□}

8.2 Confluence of the other systems

Unfortunately there is no result on preservation of confluence via embeddings. It is clear from the definition that even taking a subset of reduction rules may destroy confluence^{2}. Of course, the confluence proof given in the previous section is also modular in the sense which allows us to appeal to the meta-convention on extensions introduced in section 2.2.3 (more precisely the extension thereof which will be introduced on p. 122). Only the confluence proof for ESMIT will be given in the sequel. It will turn out that stratification is not needed, that the principles modelled by the system are not reflected and that compatibility with substitution of map_{λαρ} is the only feature of ESMIT entering the arguments. Extend the definition of the relation ↠ of parallel reduction for system F to ESMIT and simultaneously prove that r ↠ r′ ⇒ r →^{∗} r′ as follows:

(0-E) If r ↠ r′, then rE_{0}ρ ↠ r′E_{0}ρ.
(1-I) IN1 ↠ IN1.
(×-I) If r ↠ r′ and s ↠ s′, then ⟨r, s⟩ ↠ ⟨r′, s′⟩.
(×-E) If r ↠ r′, then rL ↠ r′L and rR ↠ r′R.
(β_{×}) If r ↠ ⟨r′, s′⟩, then rL ↠ r′ and rR ↠ s′.
(+-I) If r ↠ r′, then INL_{σ}r ↠ INL_{σ}r′ and INR_{ρ}r ↠ INR_{ρ}r′.
(+-E) If r ↠ r′, s ↠ s′ and t ↠ t′, then rE_{+}st ↠ r′E_{+}s′t′.

(β_{+}) If r ↠ INL_{σ}r′ and s ↠ s′, then rE_{+}st ↠ s′r′. If r ↠ INR_{ρ}r′ and t ↠ t′, then

rE_{+}st ↠ t′r′.
(μ-I) If t ↠ t′, then C_{μαρ}t ↠ C_{μαρ}t′.
(μ-E) If r ↠ r′ and s ↠ s′, then rE_{μ}s ↠ r′E_{μ}s′.
(β_{μ}) If r ↠ C_{μαρ}t and s ↠ s′, then rE_{μ}σs ↠ s′(map_{λαρ}(μαρ)σ(λx^{μαρ}.xE_{μ}σs′)t).
(μ-E^{+}) If r ↠ r′ and s ↠ s′, then rE_{μ}^{+}s ↠ r′E_{μ}^{+}s′.
(β_{μ}^{+}) If r ↠ C_{μαρ}t and s ↠ s′, then
rE_{μ}^{+}σs ↠ s′(map_{λαρ}(μαρ)(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs′)x⟩t).

(The proofs are omitted.) Define the reducing eliminations Ê_{μ} and Ê_{μ}^{+} by

r^{μαρ}Ê_{μ}σs := \{ \begin{matrix}s(map_{λαρ}(μαρ)σ(λx^{μαρ}.xE_{μ}σs)t) & , if r = C_{μαρ}t \\ rE_{μ}σs & , else \end{matrix}
r^{μαρ}Ê_{μ}^{+}σs := \{ \begin{matrix}s(map_{λαρ}(μαρ)(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩t) & , if r = C_{μαρ}t \\ rE_{μ}^{+}σs & , else \end{matrix}

Unlike the situation of Ê_{→}, Ê_{∀} and Ê_{×}, these reducing eliminations never preserve normal forms if the first case applies. Therefore one may doubt whether the complete superdevelopment to be defined next deserves its name^{3}.

2This is the idea of completion: add rules (justified by the equality theory) until confluence is achieved.

3At least it deserves a name indicating that more is done than usual developments.

Extend the definition of the complete superdevelopment r^{∗} of a term r as a term of the same type as r by recursion on terms and simultaneously prove that r ↠ r^{∗} as follows:

(0-E) (rE_{0}ρ)^{∗} := r^{∗}E_{0}ρ.
(1-I) IN1^{∗} := IN1.
(×-I) ⟨r, s⟩^{∗} := ⟨r^{∗}, s^{∗}⟩.
(×-E) (rL)^{∗} := r^{∗}Ê_{×}L and (rR)^{∗} := r^{∗}Ê_{×}R (see section 2.2.4 for the notation Ê_{×}).
(+-I) (INL_{σ}r)^{∗} := INL_{σ}r^{∗} and (INR_{ρ}r)^{∗} := INR_{ρ}r^{∗}.
(+-E) (rE_{+}st)^{∗} := r^{∗}Ê_{+}s^{∗}t^{∗}.
(μ-I) (C_{μαρ}t)^{∗} := C_{μαρ}t^{∗}.
(μ-E) (rE_{μ}σs)^{∗} := r^{∗}Ê_{μ}σs^{∗}.
(μ-E^{+}) (rE_{μ}^{+}σs)^{∗} := r^{∗}Ê_{μ}^{+}σs^{∗}.

(The proofs are again omitted.) We see that stratification does not enter this definition because in the definitions of Ê_{μ} and Ê_{μ}^{+} the term map_{λαρ} is not completely super-developped, i. e., we do not use map_{λαρ}^{∗}^{4}. Now we check that the confluence proof for system F goes through with these definitions. Reflexivity of ↠ (Lemma 8.1) and its corollaries are immediate. Lemma 8.4 which essentially shows that ↠ is parallel reduction goes through because in the cases (β_{μ}) and (β_{μ}^{+}) we know that map_{λαρ} is closed. Compatibility with type substitution (Lemma 8.5) works in these critical cases because of the uniformity condition of ESMIT which says that map_{λαρ}[α⃗ := σ⃗] = map_{(λαρ)[α⃗:=σ⃗]}. Lemma 8.6 on parallel reducts of introduction terms is extended by the following

Lemma 8.11 (1-I) If IN1 ↠ t, then t = IN1.

(×-I) If ⟨r, s⟩ ↠ t, then t = ⟨r′, s′⟩ with r ↠ r′ and s ↠ s′.

(+-I) If INL_{σ}r ↠ t, then t = INL_{σ}r′ with r ↠ r′. If INR_{ρ}r ↠ t, then t = INR_{ρ}r′ with

r ↠ r′.
(μ-I) If C_{μαρ}r ↠ t, then t = C_{μαρ}r′ with r ↠ r′.

Proof As before by induction on ↠ without using the induction hypothesis (also called inversion)._{□}

The Maximality Lemma (Lemma 8.7) is the only part deserving some attention. The reasoning used in the proofs of its corollaries (including confluence) works in any abstract reduction system (= binary relation) and hence does not need any adjustment to ESMIT.

Lemma 8.12 (Maximality of r^{∗} for ESMIT) If r ↠ r′, then r′ ↠ r^{∗}.

Proof Induction on r ↠ r′ as before. Only the cases (μ-I), (μ-E) and (β_{μ}) are shown. (μ-I) Case C_{μαρ}t ↠ C_{μαρ}t′. By induction hypothesis t′ ↠ t^{∗}. Hence also C_{μαρ}t′ ↠ C_{μαρ}t^{∗} = (C_{μαρ}t)^{∗}.

(μ-E) Case rE_{μ}σs ↠ r′E_{μ}σs′. By induction hypothesis r′ ↠ r^{∗} and s′ ↠ s^{∗}. If r^{∗} = C_{μαρ}t, then r′E_{μ}σs′ ↠ s^{∗}(map_{λαρ}(μαρ)σ(λx^{μαρ}.xE_{μ}σs^{∗})t) = (rE_{μ}σs)^{∗}. Otherwise r′E_{μ}σs′ ↠ r^{∗}E_{μ}σs^{∗} = (rE_{μ}σs)^{∗}.

4In PIT this could not even change anything because due to Lemma 5.2 map_{λαρ} is already in normal form.

(β_{μ}) Case rE_{μ}σs ↠ s′(map_{λαρ}(μαρ)σ(λx^{μαρ}.xE_{μ}σs′)t). By induction hypothesis we have C_{μαρ}t ↠ r^{∗} and s′ ↠ s^{∗}. By the preceding lemma r^{∗} = C_{μαρ}t′ with t ↠ t′. Hence (rE_{μ}σs)^{∗} = s^{∗}(map_{λαρ}(μαρ)σ(λx^{μαρ}.xE_{μ}σs^{∗})t′). By using reflexivity and the definition of ↠ several times

we get s′(map_{λαρ}(μαρ)σ(λx^{μαρ}.xE_{μ}σs′)t) ↠ s^{∗}(map_{λαρ}(μαρ)σ(λx^{μαρ}.xE_{μ}σs^{∗})t′). _{□}

This establishes confluence for every system ESMIT (among them PIT, PITrec, SPIT, NIPIT and coMePIT) and the reader will hopefully be convinced that the other systems may be handled by the same apparatus. (Note that stratification did not enter neither the definitions nor the proofs. Hence, also ISMIT is covered. The need for closed map_{λαρ} satisfying uniformity does not carry over to analogous conditions on the monotonicity witnesses of systems of monotone inductive types simply because they are “carried around” which makes the induction hypotheses in all the proofs apply. Hence, the situation becomes even easier for EMIT and its relatives. The systems in the spirit of Mendler are essentially nothing more than systems of non-interleaved positive inductive types and hence also do not pose new problems.) There are other reasons why not so much effort is put into the confluence proofs: Because all of the systems are strongly normalizing (as will be shown in the next chapter), confluence follows from local confluence which is the content of Newman’s Lemma (see e. g. [Mit96, p. 227]). And local confluence could be checked by a boring analysis of both reducts of the term in question (by double induction on the definition of → and consideration of every possible pair of rules including the congruence rules). An even stronger reason comes from the theory of higher-order rewrite systems: All of the rewrite rules in our systems are left-linear and non-overlapping. Those systems are called orthogonal^{5} and are confluent in the first-order case. In [MN98] this result is lifted to Orthogonal Pattern Rewrite Systems which are higher-order rewrite systems using simply-typed lambda calculus as meta-language. The proof of this fact hopefully is extensible to cover our situation: One would have to extend the substitution calculus from simply-typed lambda calculus to system F with η-expansion which is also strongly normalizing and confluent (see [Joa97]) and therefore should allow to define the notions of [MN98] accordingly.

Note again that the induction principles expressed by the μ-types did not enter the proof of confluence. In the next chapter this will be different.

5If we added η-rules trivial critical pairs would arise and hence make the systems “weakly orthogonal”.

110 CHAPTER 8. CONFLUENCE

Strong normalization

Every system having a name in this thesis is strongly normalizing, i. e., sn = Λ holds for all of them. The proof might be carried out by proving strong normalization for the system NIPIT of non-interleaving positive inductive types or for the system NISPIT+ex of non-interleaving strictly positive inductive types including the existential quantifier and then referring to the reductionpreserving embeddings. I decided to prove strong normalization directly for some of the systems because this gives a lot of insight into the flexibility of the proof method by saturated sets which is a variant of Girard’s candidate method. Two different proofs are given for every system: A proof where the definition of the computability predicate essentially fixes which introduction terms enter the predicate (the introduction-based proof^{1}) and a proof where the definition of the computability predicate specifies that a term only may enter if sufficiently many eliminations with this term as main premise have the right properties (the elimination-based proof). The informal modified realizability interpretation which served as a motivation in the earlier chapters now will lead to additional information after the proofs have been carried out: By considering the extracted type of the definition of the computability predicates encodings of the system at hand into other systems may be read off. All known examples of extracted encodings even preserve reduction (i. e., they are embeddings). An interesting project would be to justify this observation by a meta-theorem on proofs of strong normalization via the methods described in this chapter. It would be a refinement of the usual soundness theorem of modified realizability (see e. g. the presentations in [Ber93, vdP96b]).

9.1 Strong normalization of system F

Anyone interested in mastering polymorphic lambda calculus should try to come up with one’s own proof of normalization and see oneself make a mistake in the process. Then try giving a correct proof. Andre Scedrov [Sce89]

9.1.1 Terms in SN are strongly normalizing

As was promised in section 2.1.4 we prove that SN ⊆ sn. Note that we already know that SN ⊆ wn. If someone is only interested in weak normalization, he or she should should skip this section and proceed with section 9.1.2.

Lemma 9.1 If x^{ρ}s⃗ is a term and the terms in s⃗ are in sn, then x^{ρ}s⃗ ∈ sn.

Proof Main induction on the first term in s⃗ being in sn, side induction on the second being in sn, etc. Let r be any term such that x^{ρ}s⃗ → r. We have to show that r ∈ sn. It is easy to see that r = x^{ρ}s⃗′ where s⃗′ is derived from s⃗ by reduction of one term. (This will henceforth be written as s⃗ → s⃗′.) Therefore the induction hypothesis applies to x^{ρ}s⃗′. _{□}

1In [Pra71] (proof) terms in computability predicates of this kind are called strongly valid.

Lemma 9.2 If r ∈ sn, then λx^{ρ}r ∈ sn.

Proof Induction on r ∈ sn. Let s be any term such that λx^{ρ}r → s. We have to show that s ∈ sn. Obviously, s = λx^{ρ}r′ with a term r′ such that r → r′. By induction hypothesis, λx^{ρ}r′ ∈ sn. _{□}

Lemma 9.3 If (λx^{ρ}r)ss⃗ is a term, s ∈ sn and r[x^{ρ} := s]s⃗ ∈ sn, then (λx^{ρ}r)ss⃗ ∈ sn.

Proof For ease of understanding the proof will first be given in a somewhat intuitive form: Main induction on s ∈ sn, side induction^{2} on r[x^{ρ} := s]s⃗ ∈ sn. Let t be any term such that (λx^{ρ}r)ss⃗ → t. We have to show that t ∈ sn.

• If t = (λx^{ρ}r′)ss⃗ with r → r′, then r[x^{ρ} := s]s⃗ → r′[x^{ρ} := s]s⃗. By side induction hypothesis, t ∈ sn.

• If t = (λx^{ρ}r)s′s⃗ with s → s′, then r[x^{ρ} := s]s⃗ →^{∗} r[x^{ρ} := s′]s⃗, hence also r[x^{ρ} := s′]s⃗ ∈ sn. By main induction hypothesis, t ∈ sn.

• If t = (λx^{ρ}r)ss⃗′ with s⃗ → s⃗′, then r[x^{ρ} := s]s⃗ → r[x^{ρ} := s]s⃗′. By side induction hypothesis, t ∈ sn.

• If t = r[x^{ρ} := s]s⃗, then t ∈ sn by assumption.

• There are no other possibilities (which can easily shown by induction on the inductive definition of →).

As this lemma is crucial to the proof of strong normalization and to my knowledge is an unavoidable^{3} part of any strong normalization proof by the Tait method, I give a second proof which should be seen as justification for the preceding proof. The very first proof of strong normalization (in [Tai75]) had a similar lemma which was proved by refuting the existence of infinite reduction sequences. My aim is to avoid reasoning by reduction sequences and to confine to the use of the induction principle coming from the inductive definition of the set sn. Fix a variable x^{ρ} and the length of all vectors (and the types of the terms in the vectors) in the proof to follow. Define

M := {s|∀r, s⃗ : r[x^{ρ} := s]s⃗ ∈ sn ⇒ (λx^{ρ}r)ss⃗ ∈ sn}.

We have to show that sn ⊆ M. We do induction on sn. Let s be a term. We assume that for every term s′ such that s → s′ we have s′ ∈ M. We have to show that s ∈ M. Assume r[x^{ρ} := s]s⃗ ∈ sn. We have to show (λx^{ρ}r)ss⃗ ∈ sn. Define

N := {t ∈ sn|∀r, s⃗ : t = r[x^{ρ} := s]s⃗ ⇒ (λx^{ρ}r)ss⃗ ∈ sn}.

2Note that the term r[x^{ρ} := s]s⃗ of the side induction depends on the term s of the main induction.

3In [Gal98] it is argued that the proof presented there does not “involve rather strange looking terms such as M[N/x]N_{1} … N_{k}” (p. 233). On p. 236 it is conceded that “it is no surprise that they crop up again” but that they do not have to be dealt with explicitly. On p. 250, it becomes clear that those terms in fact do not enter the refined arrangement of the proof. But there is a reference to finite reduction sequences in property (P3) on p. 248 which is the price to pay which to me seems to be higher than to consider r[x^{ρ} := s]s⃗. Therefore I stick to the word “unavoidable” but do not take it too serious.

It suffices to show that sn ⊆ N. We do induction^{4} on sn. Let t be a term. We assume that for every term t′ such that t → t′ we have t′ ∈ N. We have to show that t ∈ N. t ∈ sn follows^{5} from N ⊆ sn. Let t = r[x^{ρ} := s]s⃗ for some r and s⃗. We have to show (λx^{ρ}r)ss⃗ ∈ sn. Let v be any term such that (λx^{ρ}r)ss⃗ → v and show v ∈ sn.

• If v = (λx^{ρ}r′)ss⃗ with r → r′, then r[x^{ρ} := s]s⃗ → r′[x^{ρ} := s]s⃗, hence r′[x^{ρ} := s]s⃗ ∈ N. Therefore v ∈ sn.

• If v = (λx^{ρ}r)s′s⃗ with s → s′, then r[x^{ρ} := s]s⃗ →^{∗} r[x^{ρ} := s′]s⃗, hence also r[x^{ρ} := s′]s⃗ ∈ sn. Because of s′ ∈ M, also v ∈ sn.

• If v = (λx^{ρ}r)ss⃗′ with s⃗ → s⃗′, then r[x^{ρ} := s]s⃗ → r[x^{ρ} := s]s⃗′, hence r[x^{ρ} := s]s′ ∈ N. Therefore v ∈ sn.

• If v = r[x^{ρ} := s]s⃗, then v = t ∈ sn.

• There are no other possibilities (to be shown as in the first proof).

We conclude that the second proof is nothing but the first proof with explicit statements of the induction formulas added. _{□}

Lemma 9.4 If Λαr is a term and r ∈ sn, then Λαr ∈ sn.

Proof Induction on r ∈ sn. Let s be any term such that Λαr → s. We have to show that s ∈ sn. Obviously, s = Λαr′ with a term r′ such that r → r′. By induction hypothesis, Λαr′ ∈ sn. _{□}

Lemma 9.5 If (Λαr)σs⃗ is a term and r[α := σ]s⃗ ∈ sn, then (Λαr)σs⃗ ∈ sn.

Proof Induction on r[α := σ]s⃗ ∈ sn. Let t be any term such that (Λαr)σs⃗ → t. We have to show that t ∈ sn.

• If t = (Λαr′)σs⃗ with r → r′, then r[α := σ]s⃗ → r′[α := σ]s⃗, hence t ∈ sn by induction hypothesis.

• If t = (Λαr)σs⃗′ with s⃗ → s⃗′, then r[α := σ]s⃗ → r[α := σ]s⃗′, hence t ∈ sn by induction hypothesis.

• If t = r[α := σ]s⃗, then t ∈ sn by assumption.

• There are no other possibilities.

Note that this proof is essentially easier than the one covering (β_{→}). _{□}

Lemma 9.6 SN ⊆ sn.

Proof The preceding lemmas simply say that the defining properties of SN are closure properties of sn. _{□}

We remark that types do not play a role in the proof and that therefore SN ⊆ sn could also be proved for a untyped term system.

4This is the same as proving sn ⊆ N′ := {t term|∀r, s⃗ : t = r[x^{ρ} := s]s⃗ ⇒ (λx^{ρ}r)ss⃗ ∈ sn} by extended induction (as defined in the introduction to chapter 4) on sn.

5The proof by the principle of extended induction would not need this (in this case very short) reasoning because it is once done in the derivation of that principle from the induction principle.

9.1.2 Saturated sets

The main goal of this chapter is to establish that every term is in SN which of course is not true for untyped terms. The following proof is by the Tait method of computability predicates. In its very first form it appeared in [Tai67]. Due to the presence of type quantification the notion of computability predicate has to be relativized to any sensible predicate which Girard called “candidats de reductibilité” [Gir72] (see [Gal90] for a discussion of several variations on the definition). The least criterion for being sensible is that only strongly normalizing terms may enter the candidates. Girard’s candidates in [GLT89] are closed under reduction and “neutral” terms (i. e., terms which are no abstractions) enter if all their reducts are already in the set. Tait’s candidates (“propositions” in [Tai75]) are also closed under reduction but this is never used in his proof of strong normalization. His essential condition for M being a candidate is

r[x := s]s⃗ ∈ M ∧ s is strongly normalizing ⇒ (λxr)ss⃗ ∈ M.

Thorsten Altenkirch observed that this is a pattern which may be generalized considerably: One may base the candidates on weak head expansion^{6} under the proviso that this expansion does not lead out of the set of strongly normalizing term. Those sets are then called saturated (a name which is also used in [Bar93] for candidates in the spirit of [Tai75]). In [Alt93a] this approach is used for the calculus of constructions extended by some generalization of trees. In the following proof the explicit reference to strongly normalizing terms is abandoned in favour of the set SN.^{7} The definition of saturated sets is modelled after the definition of SN. In this thesis only typed terms are considered. Therefore also the saturated sets consist only of typed terms as opposed e. g. to the treatment in [Alt93a]. In my view this makes the definition more intuitive: All the terms in a saturated set are required to have the same type, and saturated sets by definition have all the closure properties of SN which do not conflict with this requirement. It is possible to show that by adding closure under reduction one gets back^{8} Girard’s candidates as in [GLT89]. Let SN_{τ} be the set of terms of type τ in SN. A set M of terms is called τ-saturated, if the following conditions are met.

(SN) If r ∈ M, then r ∈ SN_{τ}.

(V) If x^{ρ}s⃗ is a term of type τ and the terms in s⃗ are in SN, then x^{ρ}s⃗ ∈ M.

(β_{→}) If (λx^{ρ}r)ss⃗ is a term, s ∈ SN and r[x^{ρ} := s]s⃗ ∈ M, then (λx^{ρ}r)ss⃗ ∈ M.

(β_{∀}) If (Λαr)σs⃗ is a term and r[α := σ]s⃗ ∈ M, then (Λαr)σs⃗ ∈ M.

Note that the rules (→-I) and (∀-I) of the definition of SN do not enter this definition because they change the type of the term. Let SAT_{τ} be the set of all τ-saturated sets and SAT := ⋃_{τ} SAT_{τ}. Elements of SAT are called saturated sets. Obviously, SN_{τ} ∈ SAT_{τ}. Note that SAT_{τ} is closed under arbitrary intersections (the empty intersection being SN_{τ}) and hence is a complete lattice. For M ∈ SAT write M^{τ} to indicate that M ∈ SAT_{τ}. If one is only interested in weak normalization, one could leave out the condition s ∈ SN from (β_{→}) which would clearly amount to basing the definition of saturatedness on WN instead of SN. Then one would have WN ∩ Λ_{τ} ∈ SAT_{τ} and would finally get that WN = Λ. But this does not simplify any of the arguments to follow. And of course, there would be no justification of an embedding extracted from the proof of normalization (see section 9.3). Let M be a set of terms. The τ-saturated closure cl_{τ} (M) of M is defined inductively by the following clauses.

6In [MKO95] this process is reversed in some sense: The computability predicates have a very easy definition but instead of checking whether a term is in the predicate one checks whether its weak head normal form is in the predicate. The price to pay is that in some sense one has to calculate with equivalence classes modulo weak head reduction.

7At first sight, the approach taken in [BTG91] of studying arbitrary “candidate-closed” sets instead of the strongly normalizing terms, seems to be even more general. However, it turns out that any candidate-closed set is a superset of SN and hence both approaches are equivalent (ignoring algebraic term rewriting which is also present in [BTG91]).

8Hence, Girard’s candidates are nothing but saturated sets which are closed under reduction. I consider the freedom from analyses of the possible reducts (except when showing that SN ⊆ sn where it conceptually cannot be avoided) as the main advantage of the method shown in this thesis.

(⊆) If r ∈ M ∩ SN_{τ}, then r ∈ cl_{τ} (M).
(V) If x^{ρ}s⃗ is a term of type τ and the terms in s⃗ are in SN, then x^{ρ}s⃗ ∈ cl_{τ} (M).

(β_{→}) If (λx^{ρ}r)ss⃗ is a term, s ∈ SN and r[x^{ρ} := s]s⃗ ∈ cl_{τ} (M), then (λx^{ρ}r)ss⃗ ∈ cl_{τ} (M).

(β_{∀}) If (Λαr)σs⃗ is a term and r[α := σ]s⃗ ∈ cl_{τ} (M), then (Λαr)σs⃗ ∈ cl_{τ} (M).

This is a strictly positive inductive definition. By induction on the definition one shows cl_{τ} (M) ⊆ SN_{τ}. Therefore, cl_{τ} (M) is the smallest τ-saturated set containing M ∩ SN_{τ}. Obviously, cl_{τ} is an isotone mapping of sets of terms to SAT_{τ}.

Calculating with saturated sets

We define operations on saturated sets which correspond to the type constructions.

Arrow types We define an arrow construction for saturated sets, i. e., given a ρ-saturated set M and a σ-saturated set N, we define a (ρ → σ)-saturated set M → N. There are mainly two ways how to do that: In the introduction-based definition, sufficiently many λ-abstractions are put into the set whereas in the elimination-based definition only terms enter the set which behave well with respect to →-elimination. Define

\begin{aligned}M_{I} & := & \{r ∈ Λ_{ρ→σ}|∃x^{ρ}∃t^{σ}.r = λx^{ρ}t ∧ ∀s ∈ M t[x^{ρ} := s] ∈ N \} \\ M_{E} & := & \{r ∈ Λ_{ρ→σ}|∀s ∈ M rs ∈ N \} \end{aligned}

and set M →_{I} N := cl_{ρ→σ}(M_{I}) and M →_{E} N := cl_{ρ→σ}(M_{E}). Hence, M →_{I} N and M →_{E} N are (ρ → σ)-saturated sets and the construction is isotone in the argument N and antitone in the argument M.

Lemma 9.7 M_{E} ∩ SN ∈ SAT (which implies M →_{E} N = M_{E} ∩ SN).

Proof Very easy. One only has to append the term s to the vector s⃗. _{□}

Note that we do not immediately see that M_{E} ⊆ SN. Some more traditional proofs of strong normalization would require to prove it (where SN would be replaced by sn), and it would be done in the following way: Let x^{ρ} be a variable. Hence x^{ρ} ∈ M. By assumption rx ∈ N, hence rx ∈ SN. Because r is a subterm of rx, also r ∈ SN. A similar reasoning is indeed possible with our set SN, but only for x^{ρ} ∉ FV(r) which does no harm. But in our approach we do not need the underlying lemma, viz. rx^{ρ} ∈ SN ∧ x^{ρ} ∉ FV(r) ⇒ r ∈ SN which in some sense contradicts the philosophy of only using the reduction strategy expressed in the definition of SN. (Ex post—after the proof of the main theorem which is SN = Λ—we know that it is true in a trivial sense.)

Lemma 9.8 M_{I} ⊆ SN (which implies M →_{I} N ⊇ M_{I}).

Proof Choose s := x^{ρ}, which trivially is in M. Then t ∈ N by definition, hence t ∈ SN and consequently r = λx^{ρ}t ∈ SN. _{□}

Lemma 9.9 M →_{I} N ⊆ M →_{E} N.

Proof It suffices to show M_{I} ⊆ M_{E}. This is an application of the rule (β_{→}) of the definition of saturated sets (with empty s⃗). _{□}

The preceding three statements immediately imply the following rules for calculating with M →_{I} N and M →_{E} N:

(→_{E}-E) If r ∈ M →_{E} N and s ∈ M, then rE_{→}s ∈ N.

(→_{I}-E) If r ∈ M →_{I} N and s ∈ M, then rE_{→}s ∈ N.

(→_{I}-I) If t[x^{ρ} := s] ∈ N for all s ∈ M, then λx^{ρ}t ∈ M →_{I} N.

(→_{E}-I) If t[x^{ρ} := s] ∈ N for all s ∈ M, then λx^{ρ}t ∈ M →_{E} N.

In the sequel M → N will denote either M →_{I} N or M →_{E} N as long as it does not matter which one is meant, i.e. the use of this set is restricted to the following rules^{9}:

(SAT) M → N ∈ SAT_{ρ→σ}.
(→-I) If t[x^{ρ} := s] ∈ N for all s ∈ M, then λx^{ρ}t ∈ M → N.
(→-E) If r ∈ M → N and s ∈ M, then rE_{→}s ∈ N.

It is possible that M →_{I} N ≠ M →_{E} N: Let ρ, σ := α → α, M := SN_{α→α} and N := cl_{α→α}(N) with N := {(λz^{α→α}z)t|t ∈ SN_{α→α}}. Clearly, N ⊆ SN_{α→α} and hence N ⊆ N. Let r := λz^{α→α}z. We claim that r ∈ M →_{E} N \ M →_{I} N. We want to show r ∈ M →_{E} N. r ∈ SN_{(α→α)→α→α}. Hence it suffices to show rt ∈ N for every t ∈ SN_{α→α}. By definition rt ∈ N and therefore also rt ∈ N. For every set M, we have that λx^{ρ}r ∈ cl(M) ⇒ λx^{ρ}r ∈ M. This is easily seen by induction on the definition of the saturated closure cl. Assume that r ∈ M →_{I} N. By the preceding observation, r ∈ M_{I}. Hence for every t ∈ SN_{α→α}, t ∈ N. Take t := λx^{α}x. Therefore λx^{α}x ∈ N and again by the above observation λx^{α}x ∈ N which is not the case.

9This would not suffice to get the normalization proof through in extensions of the system having introduction constants of arrow type instead of term forming rules (e. g. injection constants for sum types instead of INL_{ρ} and INR_{ρ} in eF which are not terms but term formers). In those systems one would have to base the definitions of computability predicates on M →_{E} N and thus would be forced to follow an elimination-based approach concerning the arrow type. More disturbing on the aesthetic side would be the obligation to unwind the definition of M →_{E} N several times in the proof instead of only using the above rules which directly correspond to a semantical view on the introduction and elimination rule for terms. This aesthetic defect will affect future formalizations of the arguments and hence the process of extraction of embeddings from normalization proofs.

Universal types Fix λαρ. Let Φ := (Φ_{τ})_{τ} be a family of mappings Φ_{τ} : SAT_{τ} → SAT_{ρ[α:=τ]}. Define

M_{I} := {r ∈ Λ_{∀αρ}|∃α∃t^{ρ}.r = Λαt ∧ ∀τ∀P ∈ SAT_{τ} t[α := τ] ∈ Φ_{τ} (P)}
M_{E} := {r ∈ Λ_{∀αρ}|∀τ∀P ∈ SAT_{τ} rτ ∈ Φ_{τ} (P)}

and set ∀_{I}(Φ) := cl_{∀αρ}(M_{I}) and ∀_{E}(Φ) := cl_{∀αρ}(M_{E}). Hence, ∀_{I}(Φ) and ∀_{E}(Φ) are ∀αρ-saturated sets and the construction is (pointwise) isotone in the argument Φ.

Lemma 9.10 M_{E} ∩ SN ∈ SAT (which implies ∀_{E}(Φ) = M_{E} ∩ SN).

Proof As easy as for the arrow type (simply append τ to s⃗). _{□}

Lemma 9.11 M_{I} ⊆ SN (which implies ∀_{I}(Φ) ⊇ M_{I}).

Proof Choose τ := α and P := SN_{α}. Hence, t ∈ Φ_{α}(SN_{α}) ⊆ SN. Therefore Λαt ∈ SN. _{□}

Lemma 9.12 ∀_{I}(Φ) ⊆ ∀_{E}(Φ).

Proof It suffices to show M_{I} ⊆ M_{E}. This is an application of the rule (β_{∀}) of the definition of saturated sets (with empty s⃗). _{□}

As for arrow types we get the following rules:

(∀_{E}-E) If r ∈ ∀_{E}(Φ), then ∀τ∀P ∈ SAT_{τ} rE_{∀}τ ∈ Φ_{τ} (P).
(∀_{I}-E) If r ∈ ∀_{I}(Φ), then ∀τ∀P ∈ SAT_{τ} rE_{∀}τ ∈ Φ_{τ} (P).
(∀_{I}-I) If ∀τ∀P ∈ SAT_{τ} t[α := τ] ∈ Φ_{τ} (P), then Λαt ∈ ∀_{I}(Φ).
(∀_{E}-I) If ∀τ∀P ∈ SAT_{τ} t[α := τ] ∈ Φ_{τ} (P), then Λαt ∈ ∀_{E}(Φ).

(The introduction rules are under the proviso that Λαt is a term.) From now on ∀(Φ) shall denote ∀_{I}(Φ) or ∀_{E}(Φ) if only the following rules are used.

(SAT) ∀(Φ) ∈ SAT_{∀αρ}.
(∀-I) If ∀τ∀P ∈ SAT_{τ} t[α := τ] ∈ Φ_{τ} (P), then Λαt ∈ ∀(Φ).
(∀-E) If r ∈ ∀(Φ), then ∀τ∀P ∈ SAT_{τ} rE_{∀}τ ∈ Φ_{τ} (P).

It is possible that ∀_{I}(Φ) ≠ ∀_{E}(Φ). Let ρ := β → β with β ≠ α. Let M := cl_{β→β}(M) with M := {(Λαr)τ|τ type, r ∈ SN_{β→β} with α ∉ FTV(r)}. Because r[α := τ] = r, M ⊆ SN_{β→β} and hence M ⊆ M ∈ SAT_{β→β}. Let Φ_{τ} (P) := M for all τ and all P ∈ SAT_{τ}. Let r := Λαλx^{β}x. We claim that r ∈ ∀_{E}(Φ) \ ∀_{I}(Φ). We want to show r ∈ ∀_{E}(Φ). r ∈ SN_{∀α.β→β}. Let τ be a type and P ∈ SAT_{τ}. It suffices to show that rτ ∈ Φ_{τ} (P) = M. By definition rτ ∈ M ⊆ M. For every set M, we have that Λαr ∈ cl(M) ⇒ Λαr ∈ M. This is easily seen by induction on the definition of the saturated closure cl. Assume that r ∈ ∀_{I}(Φ). By the preceding observation, r ∈ M_{I}. Hence for every type τ and every P ∈ SAT_{τ}: (λx^{β}x)[α := τ] ∈ Φ_{τ} (P), whence λx^{β}x ∈ M. By the observation on cl at the end of the section on arrow types we conclude λx^{β}x ∈ M which is not the case.

Computability predicates

Define the (ρ[α⃗ := σ⃗])-saturated set SC_{ρ}[α⃗ := P⃗] of strongly computable terms w.r.t. the type ρ, the finite list of type variables α⃗ and the (equally long) list of saturated sets P⃗, where σ_{i} is the unique type such that P_{i} is σ_{i}-saturated, by recursion on ρ as follows.

(V) SC_{α}[α⃗ := P⃗] := cl_{α}(∅)^{10}, if α does not occur in the list α⃗.

SC_{α}[α⃗ := P⃗] := P_{i}, if i is the smallest index such that α_{i} = α.

(→) SC_{ρ→σ}[α⃗ := P⃗] := SC_{ρ}[α⃗ := P⃗] → SC_{σ}[α⃗ := P⃗].

(∀) SC_{∀αρ}[α⃗ := P⃗] := ∀(Φ) with Φ = (Φ_{σ})_{σ}, where Φ_{σ} : SAT_{σ} → SAT_{ρ[α⃗,α:=σ⃗,σ]} is defined by Φ_{σ}(P) := SC_{ρ}[α⃗, α := P⃗, P] (We assume that α ∉ α⃗ ∪ FV(σ⃗) and use Lemma 2.6 to conclude that this definition is type-correct).

The definition in case (∀) may be written more intuitively as follows:

SC_{∀αρ}[α⃗ := P⃗] := ∀P.SC_{ρ}[α⃗, α := P⃗, P]

The implicit quantification over all types σ hopefully will always be clear from the context. This notation will be used in the sequel (especially in the normalization proofs for the systems with inductive types). Obviously, the indetermination of whether the introduction-based or the elimination-based constructions for saturated sets are used has to be handled with care. E. g. the choice for →_{I} or →_{E} in the definition of SC_{ρ→σ}[α⃗ := P⃗] must not depend on P_{i} with α_{i} ∉ FV(ρ → σ) because otherwise the following lemma would fail to hold. The next but one lemma imposes much stronger restrictions: The choice has to be the same for any substitution instance of ρ → σ. To be on the safe side, simply assume that e. g. → means →_{E} everywhere and ∀(Φ) means ∀_{I}(Φ) everywhere. Hence, the freedom in the choice reduces to 4 possibilities. And the computability predicates indeed depend on this choice: The examples that M →_{I} N ≠ M →_{E} N and ∀_{I}(Φ) ≠ ∀_{E}(Φ) suffice because SC_{β→γ}[β, γ := M, N] = M → N (generally for β ≠ γ) and (for γ ∉ {α, β}) SC_{∀αγ}[γ := M] = ∀(Φ) with Φ_{τ} (P) = SC_{γ}[γ, α := M, P] = M (for the specific example shown on p. 117).

Lemma 9.13 If α ∉ FV(ρ), then SC_{ρ}[α⃗, α := P⃗, P] = SC_{ρ}[α⃗ := P⃗].

Proof By induction on ρ show that even SC_{ρ}[α⃗, α, α′ := P⃗, P, P⃗′] = SC_{ρ}[α⃗, α′ := P⃗, P⃗′] holds if α ∉ FV(ρ). _{□}

Lemma 9.14 If α ∉ α⃗, then SC_{ρ[α:=τ]}[α⃗ := P⃗] = SC_{ρ}[α⃗, α := P⃗, SC_{τ} [α⃗ := P⃗]].

Proof By induction on ρ show that for α ∉ α⃗ ∪ α′ we have

SC_{ρ[α:=τ]}[α⃗, α′ := P⃗, P⃗′] = SC_{ρ}[α⃗, α, α′ := P⃗, SC_{τ} [α⃗, α′ := P⃗, P⃗′], P⃗′].

The preceding lemma is needed in the case (∀). _{□}

Corollary 9.15 If β ∉ α⃗ ∪ FV(ρ) and α ∉ α⃗, then

SC_{ρ[α:=β]}[α⃗, β := P⃗, P] = SC_{ρ}[α⃗, α := P⃗, P].

10One could take any set instead of ∅.

Proof Trivial, if α = β. Otherwise

SC_{ρ[α:=β]}[α⃗, β := P⃗, P] = SC_{ρ}[α⃗, β, α := P⃗, P, SC_{β}[α⃗, β := P⃗, P]] by the preceding lemma
= SC_{ρ}[α⃗, α := P⃗, P] due to the proof of the last but one lemma.
□

Lemma 9.13 is the “coincidence lemma” and Lemma 9.14 is the “substitution lemma” which are auxiliary statements for the next lemma which should be called the “soundness lemma”. This next lemma shows that every term is strongly computable—even if term variables are substituted by strongly computable terms. This generalization is needed in the case (→-I) of the proof. The case (∀-I) needs the freedom in the number of saturated sets to which the notion of strong computability is relativized. The proviso in the statement (see below) is only present for technical reasons: It is tailored to make the statement true for variables! This technical problem arises because of the natural deduction formulation of system F as opposed to a formulation with contexts which many authors prefer.

Lemma 9.16 Let r^{ρ} be a term, xρ⃗ a list of variables and s⃗ an equally long list of terms such that s⃗ ∈ SCρ⃗[α⃗ := P⃗σ⃗] for some P⃗ ⊆ SAT. Assume that

∀x∀π∀π′.(x^{π}, x^{π′} ∈ FV(r) ∪ xρ⃗) ∧ (π[α⃗ := σ⃗] = π′[α⃗ := σ⃗]) ⇒ π = π′.

Then r[α⃗ := σ⃗][x^{ρ⃗[α⃗:=σ⃗]} := s⃗] ∈ SC_{ρ}[α⃗ := P⃗].

Proof Induction on r. Abbreviate r[α⃗ := σ⃗][x^{ρ⃗[α⃗:=σ⃗]} := s⃗] by r′ (also for any other terms instead of r). The assumption in the statement will be referenced to as “injectivity”. (V) Case x^{ρ}. If x^{ρ} ∉ xρ⃗, then x^{ρ[α⃗:=σ⃗]} ∉ x^{ρ⃗[α⃗:=σ⃗]}. (For a proof assume x^{ρ[α⃗:=σ⃗]} = x_{i}^{ρ_{i}[α⃗:=σ⃗]} for some i. Hence x = x_{i} and ρ[α⃗ := σ⃗] = ρ_{i}[α⃗ := σ⃗]. Because x^{ρ}, x_{i}^{ρ_{i}} ∈ FV(x^{ρ}) ∪ xρ⃗, this implies ρ = ρ_{i}, and consequently x^{ρ} = x_{i}^{ρ_{i}} ∈ xρ⃗ which is not the case.)

(x^{ρ})′ = x^{ρ[α⃗:=σ⃗]}[x^{ρ⃗[α⃗:=σ⃗]} := s⃗] = x^{ρ[α⃗:=σ⃗]} ∈ SC_{ρ}[α⃗ := P⃗],

because SC_{ρ}[α⃗ := P⃗] ∈ SAT_{ρ[α⃗:=σ⃗]}. If x^{ρ} ∈ xρ⃗, then let i be the smallest number such that x_{i}^{ρ_{i}[α⃗:=σ⃗]} = x^{ρ[α⃗:=σ⃗]}. Due to injectivity, ρ_{i} = ρ. Hence

(x^{ρ})′ = x_{i}^{ρ_{i}[α⃗:=σ⃗]}[x^{ρ⃗[α⃗:=σ⃗]} := s⃗] = s_{i} ∈ SC_{ρ_{i}}[α⃗ := P⃗] = SC_{ρ}[α⃗ := P⃗].

(→-I) Case λx^{ρ}r^{σ}. We may assume (1): x^{π} ∈ FV(r) ⇒ π = ρ. Therefore (λx^{ρ}r)[α⃗ := σ⃗] = λx^{ρ[α⃗:=σ⃗]}.r[α⃗ := σ⃗]. We may assume (2): x^{ρ[α⃗:=σ⃗]} ∉ x^{ρ⃗[α⃗:=σ⃗]} ∪ FV(s⃗). Therefore (λx^{ρ}r)′ = λx^{ρ[α⃗:=σ⃗]}.r′. We have to show λx^{ρ[α⃗:=σ⃗]}.r′ ∈ SC_{ρ→σ}[α⃗ := P⃗]. Use (→-I) for saturated sets. Let s ∈ SC_{ρ}[α⃗ := P⃗]. Show that r′[x^{ρ[α⃗:=σ⃗]} := s] ∈ SC_{σ}[α⃗ := P⃗]. Because of (2) and Lemma 2.14,

r′[x^{ρ[α⃗:=σ⃗]} := s] = r[α⃗ := σ⃗][x^{ρ⃗[α⃗:=σ⃗]}, x^{ρ[α⃗:=σ⃗]} := s⃗, s].

By induction hypothesis for r this term is in SC_{ρ}[α⃗ := P⃗] provided injectivity holds for this situation. If y^{π}, y^{π′} ∈ (FV(r) \ {x^{ρ}}) ∪ xρ⃗, then by assumption π[α⃗ := σ⃗] = π′[α⃗ := σ⃗] implies π = π′. Hence we only have to consider x^{ρ} and x^{π} ∈ FV(r) ∪ xρ⃗. If x^{π} ∈ FV(r), then ρ = π by (1). If x^{π} ∈ xρ⃗, then x^{π} = x_{i}^{ρ_{i}} for some i. ρ[α⃗ := σ⃗] = ρ_{i}[α⃗ := σ⃗] is impossible due to (2), hence trivially ρ[α⃗ := σ⃗] = π[α⃗ := σ⃗] ⇒ ρ = π.

(→-E) Case r^{ρ→σ}s^{ρ}. (rs)′ = r′s′. Because FV(rs) = FV(r) ∪ FV(s), injectivity holds also for r and s. By induction hypothesis r′ ∈ SC_{ρ→σ}[α⃗ := P⃗] and s′ ∈ SC_{ρ}[α⃗ := P⃗], which implies r′s′ ∈ SC_{σ}[α⃗ := P⃗] by (→-E) for saturated sets. (∀-I) Case Λαr^{ρ}. We may assume that (1): α ∉ α⃗∪FV(σ⃗). Hence (Λαr)[α⃗ := σ⃗] = Λα.r[α⃗ := σ⃗]. We may assume (2): α ∉ FTV(s⃗), which gives (Λαr)′ = Λαr′. We have to show Λαr′ ∈ SC_{∀αρ}[α⃗ := P⃗]. Use (∀-I) for saturated sets: Let σ be a type and P ∈ SAT_{σ}. Show that r′[α := σ] ∈ SC_{ρ}[α⃗, α := P⃗, P]. We first show that

r′[α := σ] = r[α⃗, α := σ⃗, σ][x^{ρ⃗[α⃗,α:=σ⃗,σ]} := s⃗].  (∗)

We want to apply Corollary 2.21 (to the interchange law for substitution) in order to get

r[α⃗ := σ⃗][x^{ρ⃗[α⃗:=σ⃗]} := s⃗][α := σ] = r[α⃗ := σ⃗][α := σ][x^{ρ⃗[α⃗:=σ⃗]} := s⃗[α := σ]].

If x^{π} ∈ FV(r[α⃗ := σ⃗]), then α ∉ FV(π) because Λαr is well-formed and consequently by help of (1) also Λα.r[α⃗ := σ⃗]. Moreover, α ∉ FV(ρ⃗[α⃗ := σ⃗]) follows by help of (2) and Lemma 2.8 which gives FV(ρ_{i}[α⃗ := σ⃗]) ⊆ FTV(s_{i}) for all i. Hence, Corollary 2.21 applies. By (1) and Lemma 2.19

r[α⃗ := σ⃗][α := σ] = r[α⃗, α := σ⃗, σ].

Because α ∉ FV(ρ_{i}[α⃗ := σ⃗]) and hence by (1) and Corollary 2.4 which give α ∉ FV(ρ_{i}), we get

ρ_{i}[α⃗ := σ⃗] = ρ_{i}[α⃗, α := σ⃗, σ].

Because α ∉ FTV(s_{i}), s_{i}[α := σ] = s_{i}. We conclude that (∗) holds. Show that

r[α⃗, α := σ⃗, σ][x^{ρ⃗[α⃗,α:=σ⃗,σ]} := s⃗] ∈ SC_{ρ}[α⃗, α := P⃗, P]

by induction hypothesis: For all i, s_{i} ∈ SC_{ρ_{i}}[α⃗, α := P⃗, P] by Lemma 9.13 because α ∉ FV(ρ_{i}). Finally we have to check injectivity: Let x^{π} ∈ FV(r) ∪ xρ⃗. Then α ∉ FV(π): If x^{π} ∈ FV(r), this follows from the well-formedness of Λαr. If x^{π} = x_{i}^{ρ_{i}} for some i, then it follows from α ∉ FV(ρ_{i}). Therefore π[α⃗, α := σ⃗, σ] = π[α⃗ := σ⃗]. Now injectivity (“for α⃗, α”) follows immediately from the assumed injectivity (“for α⃗”). (∀-E) Case r^{∀αρ}σ. (rσ)′ = r′(σ[α⃗ := σ⃗]). Set τ := σ[α⃗ := σ⃗] and P := SC_{σ}[α⃗ := P⃗]. Then P ∈ SAT_{τ} and we have to show that r′τ ∈ SC_{ρ[α:=σ]}[α⃗ := P⃗]. Because FV(r) = FV(rσ), the induction hypothesis gives r′ ∈ SC_{∀αρ}[α⃗ := P⃗]. By (∀-E) for saturated sets it follows r′τ ∈ SC_{ρ}[α⃗, α := P⃗, P] = SC_{ρ[α:=σ]}[α⃗ := P⃗] by Lemma 9.14^{11}. _{□}

Theorem SN = Λ.

Proof Take empty lists in the preceding lemma. Because empty substitutions do not affect the types and terms (Corollary 2.2, Lemma 2.11 and Lemma 2.16), the injectivity condition is trivially fulfilled and r ∈ SC_{ρ}[:=]^{12} ∈ SAT which implies SC_{ρ}[:=] ⊆ SN and hence r ∈ SN^{13}. _{□}

Corollary 9.17 Every term of system F is strongly normalizing.

Proof Lemma 9.6. _{□} 9.2. STRONG NORMALIZATION OF SYSTEM EF+EX 121

11We already assumed α ∉ α⃗ in the definition of SC_{∀αρ}[α⃗ := P⃗].

12Perhaps one should prefer to write SC_{ρ} instead of SC_{ρ}[:=].

13 It might be interesting to check that we never used the induction on the inductively defined set SN. We only used the defining clauses expressing the head reduction strategy.

Corollary 9.18 The function Ω defined in section 2.1.4 is a function from Λ to NF and hence a normalizing function. Proof Lemma 2.38. _{□} Corollary 9.19 There is no closed term of type ∀αα. Proof Lemma 2.37. _{□}

9.2 Strong normalization of system eF+ex

In the section following this proof we will see how the well-known impredicative encoding of + and ∃ which was already used in the embedding of eF into F and in that of eF+ex into eF may be read off the proof.

9.2.1 Terms in SN are strongly normalizing

Lemma 9.20 If r, s ∈ sn, then ⟨r, s⟩ ∈ sn. Proof For example by main induction on r ∈ sn and side induction on s ∈ sn. As for system F the immediate reducts have to be analyzed. _{□} Lemma 9.21 If rs⃗ ∈ sn and s ∈ sn, then ⟨r, s⟩Ls⃗ ∈ sn. If ss⃗ ∈ sn and r ∈ sn, then ⟨r, s⟩Rs⃗ ∈ sn. Proof By induction on the ingredients being in sn. _{□} Lemma 9.22 If r ∈ sn, then INL_{ρ}r ∈ sn and INR_{ρ}r ∈ sn. Proof Similarly. _{□} Lemma 9.23 If (INL_{ρ}r)sts⃗ is a term and srs⃗ ∈ sn and t ∈ sn, then (INL_{ρ}r)sts⃗ ∈ sn. If (INR_{ρ}r)sts⃗ is a term and trs⃗ ∈ sn and s ∈ sn, then (INR_{ρ}r)sts⃗ ∈ sn. Proof Similarly. _{□} Lemma 9.24 If C_{∃αρ,τ} t is a term and t ∈ sn, then C_{∃αρ,τ} t ∈ sn. Proof Similarly. _{□} Lemma 9.25 If (C_{∃αρ,τ} t)E_{∃}ss⃗ is a term and sτts⃗ ∈ sn, then (C_{∃αρ,τ} t)E_{∃}ss⃗ ∈ sn. Proof Similarly. _{□} Corollary 9.26 SN ⊆ sn. Proof As for Lemma 9.6. Note that also IN1 ∈ sn. _{□} A remark is in order: SN ⊆ sn is proved by showing that all the defining clauses of SN are closure properties of sn. But we did not show this for (V), (→-I), (β_{→}), (∀-I) and (β_{∀}). Those clauses were only considered for system F. But the systems are organized in such a way as to allow modular proofs. Hence, the proofs in section 9.1.1 hold verbatim for eF+ex. This is a general pattern: In the proof of any lemma needed for the proof of strong normalization we only have to consider the newly introduced type or term constructs because the proof clauses for the original constructs are also valid in the extended system. This is what I called non-quadratic reasoning in section 2.2.3. The meta-convention on extensions stated in that section shall now also cover the above pattern: If in the proof of a statement in the extension of a system for which the same statement has already been proved only clauses are given which correspond to the additional constructs of the extension then the proofs for the original system hold verbatim for the extension.

9.2.2 Saturated sets

Extend the definition for system F of M being a τ-saturated set by the following clauses:

(β_{×}) If rs⃗ ∈ M and s ∈ SN, then ⟨r, s⟩Ls⃗ ∈ M. If ss⃗ ∈ M and r ∈ SN, then ⟨r, s⟩Rs⃗ ∈ M.

(β_{+}) If (INL_{ρ}r)sts⃗ is a term and srs⃗ ∈ M and t ∈ SN, then (INL_{ρ}r)sts⃗ ∈ M. If (INR_{ρ}r)sts⃗

is a term and trs⃗ ∈ M and s ∈ SN, then (INR_{ρ}r)sts⃗ ∈ M.
(β_{∃}) If (C_{∃αρ,τ} t)E_{∃}ss⃗ is a term and sτts⃗ ∈ M, then (C_{∃αρ,τ} t)E_{∃}ss⃗ ∈ M.

Extend the definition of the τ-saturated closure cl_{τ} (M) accordingly by the clauses

(β_{×}) If rs⃗ ∈ cl_{τ} (M) and s ∈ SN, then ⟨r, s⟩Ls⃗ ∈ cl_{τ} (M). If ss⃗ ∈ cl_{τ} (M) and r ∈ SN, then

⟨r, s⟩Rs⃗ ∈ cl_{τ} (M).

(β_{+}) If (INL_{ρ}r)sts⃗ is a term and srs⃗ ∈ cl_{τ} (M) and t ∈ SN, then (INL_{ρ}r)sts⃗ ∈ cl_{τ} (M). If

(INR_{ρ}r)sts⃗ is a term and trs⃗ ∈ cl_{τ} (M) and s ∈ SN, then (INR_{ρ}r)sts⃗ ∈ cl_{τ} (M).
(β_{∃}) If (C_{∃αρ,τ} t)E_{∃}ss⃗ is a term and sτts⃗ ∈ cl_{τ} (M), then (C_{∃αρ,τ} t)E_{∃}ss⃗ ∈ cl_{τ} (M).

As for system F this is a strictly positive inductive definition. One also shows cl_{τ} (M) ⊆ SN_{τ}. Hence, again cl_{τ} (M) is the smallest τ-saturated set containing M ∩ SN_{τ}.

Calculating with saturated sets

The zero type Define 0_{SAT} := cl_{0}(∅).

Lemma 9.27 If r ∈ 0_{SAT}, ρ type and M ∈ SAT_{ρ}, then rE_{0}ρ ∈ M.

Proof Induction on r ∈ cl_{0}(∅). _{□}

Therefore, we have the following rule:

(0-E) If r ∈ 0_{SAT}, then ∀ρ∀M ∈ SAT_{ρ} rE_{0}ρ ∈ M.

The one type Define 1_{SAT} := cl_{1}(Λ_{1}) = SN_{1}. Obviously, we have the following rule:

(1-I) IN1 ∈ 1_{SAT}.

Product types Let M ∈ SAT_{ρ} and N ∈ SAT_{σ}. Define

\begin{aligned}M_{I} & := & \{r ∈ Λ_{ρ×σ}|∃s ∈ M∃t ∈ N .r = ⟨s, t⟩\} \\ M_{E} & := & \{r ∈ Λ_{ρ×σ}|rL ∈ M ∧ rR ∈ N \} \end{aligned}

and set M ×_{I} N := cl_{ρ×σ}(M_{I}) and M ×_{E} N := cl_{ρ×σ}(M_{E}). Hence, M ×_{I} N and M ×_{E} N are (ρ × σ)-saturated sets and the construction is isotone in the arguments M and N.

Lemma 9.28 M_{E} ∩ SN ∈ SAT (which implies M ×_{E} N = M_{E} ∩ SN).

Proof Very easy. One only has to append the symbols L and R to the vector s⃗. _{□}

Lemma 9.29 M_{I} ⊆ SN (which implies M ×_{I} N ⊇ M_{I}). _{□}

Lemma 9.30 M ×_{I} N ⊆ M ×_{E} N.

Proof It suffices to show M_{I} ⊆ M_{E}. This is an application of the rule (β_{×}) of the definition of saturated sets (with empty s⃗). _{□}

The preceding three statements immmediately imply the following rules for calculating with M ×_{I} N and M ×_{E} N:

(×_{E}-E) If r ∈ M ×_{E} N, then rL ∈ M and rR ∈ N.
(×_{I}-E) If r ∈ M ×_{I} N, then rL ∈ M and rR ∈ N.
(×_{I}-I) If r ∈ M and s ∈ N, then ⟨r, s⟩ ∈ M ×_{I} N.
(×_{E}-I) If r ∈ M and s ∈ N, then ⟨r, s⟩ ∈ M ×_{E} N.

In the sequel M × N will denote either M ×_{I} N or M ×_{E} N as long as it does not matter which one is meant, i.e. the use of this set is restricted to the following rules:

(SAT) M × N ∈ SAT_{ρ×σ}.
(×-I) If r ∈ M and s ∈ N, then ⟨r, s⟩ ∈ M × N.
(×-E) If r ∈ M × N, then rL ∈ M and rR ∈ N.

It is also possible to produce an example showing M ×_{I} N ≠ M ×_{E} N: Let ρ, σ := α × α, M := cl_{α×α}({⟨t, t⟩L|t ∈ SN_{α×α}}) and N := cl_{α×α}({⟨t, t⟩R|t ∈ SN_{α×α}}). It is easy to show that ⟨⟨x^{α}, x^{α}⟩, ⟨x^{α}, x^{α}⟩⟩ ∈ M ×_{E} N \ M ×_{I} N.

Sum types Let M ∈ SAT_{ρ} and N ∈ SAT_{σ}. Define

M_{I} := {r ∈ Λ_{ρ+σ}|(∃s ∈ M.r = INL_{σ}s) ∨ (∃s ∈ N .r = INR_{ρ}s)}
M_{E} := {r ∈ Λ_{ρ+σ}|∀τ∀P ∈ SAT_{τ} ∀s ∈ M → P∀t ∈ N → P.rE_{+}τst ∈ P}

and set M +_{I} N := cl_{ρ+σ}(M_{I}) and M +_{E} N := cl_{ρ+σ}(M_{E}). Hence, M +_{I} N and M +_{E} N are (ρ + σ)-saturated sets and the construction is isotone in the arguments M and N. (M +_{E} N is non-strictly positive in M and N.) Note that we already use the indeterminate construction → for saturated sets in the definition of M_{E}.

Lemma 9.31 M_{E} ∩ SN ∈ SAT (which implies M +_{E} N = M_{E} ∩ SN).

Proof Very easy. One only has to append s and t to the vector s⃗. _{□} Lemma 9.32 M_{I} ⊆ SN (which implies M +_{I} N ⊇ M_{I}). _{□} Lemma 9.33 M +_{I} N ⊆ M +_{E} N. Proof It suffices to show M_{I} ⊆ M_{E}. This is an application of the rule (β_{+}) of the definition of saturated sets (with empty s⃗) and of (→-E) for saturated sets. _{□} The preceding three statements immediately imply the following rules for calculating with M +_{I} N and M +_{E} N:

(+_{E}-E) If r ∈ M +_{E} N, then ∀τ∀P ∈ SAT_{τ} ∀s ∈ M → P∀t ∈ N → P.rE_{+}τst ∈ P.

(+_{I}-E) If r ∈ M +_{I} N, then ∀τ∀P ∈ SAT_{τ} ∀s ∈ M → P∀t ∈ N → P.rE_{+}τst ∈ P.
(+_{I}-I) If s ∈ M, then INL_{σ}s ∈ M +_{I} N. If s ∈ N, then INR_{ρ}s ∈ M +_{I} N.
(+_{E}-I) If s ∈ M, then INL_{σ}s ∈ M +_{E} N. If s ∈ N, then INR_{ρ}s ∈ M +_{E} N.

In the sequel M + N will denote either M +_{I} N or M +_{E} N as long as it does not matter which one is meant, i.e. the use of this set is restricted to the following rules:

(SAT) M + N ∈ SAT_{ρ+σ}.

(+-I) If s ∈ M, then INL_{σ}s ∈ M + N. If s ∈ N, then INR_{ρ}s ∈ M + N.
(+-E) If r ∈ M + N, then ∀τ∀P ∈ SAT_{τ} ∀s ∈ M → P∀t ∈ N → P.rE_{+}τst ∈ P.

Existential types Fix λαρ. Let Φ := (Φ_{τ})_{τ} be a family of mappings Φ_{τ} : SAT_{τ} → SAT_{ρ[α:=τ]}. Define

M_{I} := {r ∈ Λ_{∃αρ}|∃τ∃P ∈ SAT_{τ} ∃t ∈ Φ_{τ} (P).r = C_{∃αρ,τ} t}
M_{E} := {r ∈ Λ_{∃αρ}|∀σ∀N ∈ SAT_{σ}∀s ∈ (∀P.Φ(P) → N).rE_{∃}σs ∈ N }

and set ∃_{I}(Φ) := cl_{∃αρ}(M_{I}) and ∃_{E}(Φ) := cl_{∃αρ}(M_{E}). Hence, ∃_{I}(Φ) and ∃_{E}(Φ) are ∃αρsaturated sets and the construction is (pointwise) isotone in the argument Φ. Note that we use the indeterminate → and ∀ for saturated sets in the definition of M_{E}. Lemma 9.34 M_{E} ∩ SN ∈ SAT (which implies ∃_{E}(Φ) = M_{E} ∩ SN). Proof Append s to s⃗. _{□} Lemma 9.35 M_{I} ⊆ SN (which implies ∃_{I}(Φ) ⊇ M_{I}). _{□} Lemma 9.36 ∃_{I}(Φ) ⊆ ∃_{E}(Φ). Proof It suffices to show M_{I} ⊆ M_{E}. This is an application of the rule (β_{∃}) of the definition of saturated sets (with empty s⃗) and of (∀-E) and (→-E) for saturated sets. _{□} We get the following rules:

(∃_{E}-E) If r ∈ ∃_{E}(Φ), then ∀σ∀N ∈ SAT_{σ}∀s ∈ (∀P.Φ(P) → N).rE_{∃}σs ∈ N.

(∃_{I}-E) If r ∈ ∃_{I}(Φ), then ∀σ∀N ∈ SAT_{σ}∀s ∈ (∀P.Φ(P) → N).rE_{∃}σs ∈ N.

(∃_{I}-I) If t ∈ Φ_{τ} (P) for some P ∈ SAT_{τ}, then C_{∃αρ,τ} t ∈ ∃_{I}(Φ).

(∃_{E}-I) If t ∈ Φ_{τ} (P) for some P ∈ SAT_{τ}, then C_{∃αρ,τ} t ∈ ∃_{E}(Φ).

From now on ∃(Φ) shall denote ∃_{I}(Φ) or ∃_{E}(Φ) if only the following rules are used.

(SAT) ∃(Φ) ∈ SAT_{∃αρ}.
(∃-I) If t ∈ Φ_{τ} (P) for some P ∈ SAT_{τ}, then C_{∃αρ,τ} t ∈ ∃(Φ).
(∃-E) If r ∈ ∃(Φ), then ∀σ∀N ∈ SAT_{σ}∀s ∈ (∀P.Φ(P) → N).rE_{∃}σs ∈ N.

Computability predicates

Extend the definition of SC_{ρ}[α⃗ := P⃗] by the following clauses:

(0) SC_{0}[α⃗ := P⃗] := 0_{SAT}.
(1) SC_{1}[α⃗ := P⃗] := 1_{SAT}.
(×) SC_{ρ×σ}[α⃗ := P⃗] := SC_{ρ}[α⃗ := P⃗] × SC_{σ}[α⃗ := P⃗].
(+) SC_{ρ+σ}[α⃗ := P⃗] := SC_{ρ}[α⃗ := P⃗] + SC_{σ}[α⃗ := P⃗].

(∃) SC_{∃αρ}[α⃗ := P⃗] := ∃(Φ) with Φ = (Φ_{σ})_{σ}, where Φ_{σ} : SAT_{σ} → SAT_{ρ[α⃗,α:=σ⃗,σ]} is defined by Φ_{σ}(P) := SC_{ρ}[α⃗, α := P⃗, P] (with the same assumptions as in the definition of strong computability for universal types in order to guarantee type-correctness).

The definition in clause (∃) will be written more intuitively as follows:

SC_{∃αρ}[α⃗ := P⃗] := ∃P.SC_{ρ}[α⃗, α := P⃗, P].

Evidently, the choice whether one uses the introduction-based or the elimination-based construction for saturated sets has to be consistent in the sense that if one uses e. g. ∃_{E}(Φ) with M_{E} defined by reference to →_{I}, then SC_{ρ→σ}[α⃗ := P⃗] also has to be defined by means of →_{I}. As for system F we therefore assume that this choice is made once for every type construct and then used throughout. With this fixed choice, it is obvious that coincidence and substitution lemma (Lemma 9.13 and Lemma 9.14) extend to eF+ex. Now we extend Lemma 9.16 to eF+ex:

Lemma 9.37 Let r^{ρ} be a term, xρ⃗ a list of variables and s⃗ an equally long list of terms such that s⃗ ∈ SCρ⃗[α⃗ := P⃗σ⃗] for some P⃗ ⊆ SAT. Assume that

∀x∀π∀π′.(x^{π}, x^{π′} ∈ FV(r) ∪ xρ⃗) ∧ (π[α⃗ := σ⃗] = π′[α⃗ := σ⃗]) ⇒ π = π′.

Then r[α⃗ := σ⃗][x^{ρ⃗[α⃗:=σ⃗]} := s⃗] ∈ SC_{ρ}[α⃗ := P⃗].

Proof Induction on r. Again abbreviate r[α⃗ := σ⃗][x^{ρ⃗[α⃗:=σ⃗]} := s⃗] by r′ (for any term r). The assumption in the statement will again be referenced to as “injectivity”. We only have to consider the term generation rules corresponding to the types and type constructions newly introduced in eF+ex. (0-E) Case r^{0}ρ. (rρ)′ = r′(ρ[α⃗ := σ⃗]). Because FV(rρ) = FV(r), injectivity holds also for r. By induction hypothesis, r′ ∈ SC_{0}[α⃗ := P⃗] = 0_{SAT}. By (0-E) for saturated sets (the reference to the named rules will in the sequel always mean those for saturated sets), r′(ρ[α⃗ := σ⃗]) ∈ SC_{ρ}[α⃗ := P⃗].

(1-I) Case IN1. IN1′ = IN1. By (1-I), IN1 ∈ 1_{SAT} = SC_{1}[α⃗ := P⃗]. (×-I) Case ⟨r^{ρ}, s^{σ}⟩. ⟨r, s⟩′ = ⟨r′, s′⟩. Because FV(⟨r, s⟩) = FV(r) ∪ FV(s), injectivity also holds for r and s. By induction hypothesis, r′ ∈ SC_{ρ}[α⃗ := P⃗] and s′ ∈ SC_{σ}[α⃗ := P⃗]. By (×-I) we conclude ⟨r′, s′⟩ ∈ SC_{ρ×σ}[α⃗ := P⃗]. (×-E) Case r^{ρ×σ}L. (rL)′ = r′L. Because FV(rL) = FV(r), injectivity also holds for r. By induction hypothesis, r′ ∈ SC_{ρ×σ}[α⃗ := P⃗]. By (×-E), we get r′L ∈ SC_{ρ}[α⃗ := P⃗]. The case r^{ρ×σ}R is similar. (+-I) Case INL_{σ}r^{ρ}. (INL_{σ}r)′ = INL_{σ[α⃗:=σ⃗]}r′. Because FV(INL_{σ}r) = FV(r), injectivity also holds for r. By induction hypothesis, r′ ∈ SC_{ρ}[α⃗ := P⃗]. By (+-I), INL_{σ[α⃗:=σ⃗]}r′ ∈ SC_{ρ+σ}[α⃗ := P⃗]. The case INR_{ρ}r^{σ} is similar. (+-E) Case r^{ρ+σ}E_{+}τs^{ρ→τ} t^{σ→τ}. (rst)′ = r′E_{+}τ[α⃗ := σ⃗]s′t′. Because FV(rst) = FV(r) ∪ FV(s) ∪ FV(t), injectivity holds also for r, s and t. By induction hypothesis we have r′ ∈ SC_{ρ+σ}[α⃗ := P⃗], s′ ∈ SC_{ρ→τ} [α⃗ := P⃗] and t′ ∈ SC_{σ→τ} [α⃗ := P⃗]. Hence, by (+-E): r′E_{+}τ[α⃗ := σ⃗]s′t′ ∈ SC_{τ} [α⃗ := P⃗]. (∃-I) Case C_{∃αρ,τ} t^{ρ[α:=τ]}. We may assume that α ∉ α⃗ ∪ FV(σ⃗). Therefore, we have that (C_{∃αρ,τ} t)′ = C_{∃α.ρ[α⃗:=σ⃗],τ[α⃗:=σ⃗]}t′. Show C_{∃α.ρ[α⃗:=σ⃗],τ[α⃗:=σ⃗]}t′ ∈ SC_{∃αρ}[α⃗ := P⃗] by use of (∃-I). It suffices to show

t′ ∈ SC_{ρ}[α⃗, α := P⃗, SC_{τ} [α⃗ := P⃗]].

By the substitution lemma we have

SC_{ρ}[α⃗, α := P⃗, SC_{τ} [α⃗ := P⃗]] = SC_{ρ[α:=τ]}[α⃗ := P⃗].

Hence it suffices to show t′ ∈ SC_{ρ[α:=τ]}[α⃗ := P⃗] which follows from the induction hypothesis because injectivity also holds for t due to FV(C_{∃αρ,τ} t) = FV(t). (∃-E) Case r^{∃αρ}E_{∃}σs^{∀α.ρ→σ} (with α ∉ FV(σ)). (rs)′ = r′E_{∃}σ[α⃗ := σ⃗]s′. Because FV(rs) = FV(r) ∪ FV(s), injectivity also holds for r and s. By induction hypothesis r′ ∈ SC_{∃αρ}[α⃗ := P⃗] and s′ ∈ SC_{∀α.ρ→σ}[α⃗ := P⃗]. Show that r′E_{∃}σ[α⃗ := σ⃗]s′ ∈ SC_{σ}[α⃗ := P⃗] by help of (∃-E). It suffices to show that s′ ∈ ∀P.SC_{ρ}[α⃗, α := P⃗, P] → SC_{σ}[α⃗ := P⃗]. This holds by definition of strong computability and by the coincidence lemma (recall that α ∉ FV(σ)). _{□}

As for system F we get as corollaries that SN = Λ, that every term is strongly normalizing, that Ω is a normalizing function and that there is no closed term of type ∀αα. Lemma 2.46 also gives us that there is no closed term of type 0. Note that every definition and lemma in this section can be done for system eF by simply leaving out the clauses referring to the existential quantifier. The definitions in the next section will be based on these concepts for eF.

9.3 Extracting embeddings from normalization proofs

The proofs of strong normalization of F and eF+ex are very close to a formalization. There is no analysis of reducts and only the introduction rule and the elimination rule for the constructions of saturated sets corresponding to the type formation rules are used in the final soundness lemma 9.16 (strong computability under substitution). It appears that there is a considerable overhead for dealing with substitution issues. After all, substitution is the governing principle of system F. Therefore, program extraction from intuitionistic proofs seems quite promising because it divides the bookkeeping part from the interesting combinatorial problem solved. Modified realizability will again be used informally. Let us first study the case of sum types.

M +_{I} N = cl_{ρ+σ}({r ∈ Λ_{ρ+σ}|(∃s ∈ M.r = INL_{σ}s) ∨ (∃s ∈ N .r = INR_{ρ}s)})

If M already had the extracted type ρ′ and N had extracted type σ′, we would get as extracted type of the predicate M +_{I} N the type ρ′ + σ′: The closure cl is responsible for closing comprehension predicates and r = INL_{σ}s and r = INR_{ρ}s carry no essential information. What counts is only the extracted types of the predicates involved.

M +_{E} N = cl_{ρ+σ}({r ∈ Λ_{ρ+σ}|∀τ∀P ∈ SAT_{τ} ∀s ∈ M → P∀t ∈ N → P.rE_{+}τst ∈ P})

This time we would get as extracted type of the predicate M +_{E} N the type ∀α.(ρ′ → α) → (σ′ → α) → α with α ∉ FV(ρ′) ∪ FV(σ′): The universal quantifier does not come from ∀τ but from ∀P ∈ SAT_{τ} and the extracted type of M → P is ρ′ → α regardless of the decision whether M → P is M →_{I} P or M →_{E} P. Why? Because clearly the extracted type is the same in both cases. The same effect happens with ×: If M has extracted type ρ′ and N has extracted type σ′, then M ×_{I} N and M ×_{E} N have extracted type ρ′ × σ′. Also the extracted type of 0_{SAT} is 0 (corresponding to the least element of SAT_{0}) and that of 1_{SAT} is 1 (corresponding to the greatest element of SAT_{1}). We want to reconstruct the part of the embedding of eF into F pertaining to +. The proof of the lemma stating that M +_{I} N ⊆ M +_{E} N goes as follows: It suffices to show M_{I} ⊆ M_{E} (nothing combinatorial). There are two cases: First let r ∈ M. We have to show that ∀τ∀P ∈ SAT_{τ} ∀s ∈ M → P∀t ∈ N → P.INL_{σ}rE_{+}τst ∈ P. Let τ be a type, P ∈ SAT_{τ}, s ∈ M → P and t ∈ N → P. We have to show INL_{σ}rE_{+}τst ∈ P. Because P is saturated (bookkeeping!) it suffices to show sr ∈ P and t ∈ SN (bookkeeping). Because of (→-E) for saturated sets, applied to s ∈ M → P and r ∈ M, finally sr ∈ P. Clearly, we may read off this proof the term Λαλx^{ρ′→α}λy^{σ′→α}.xr′ if we assume that r′ is the extracted term of “r ∈ M”. This was exactly the term (INL_{σ}r^{ρ})′ in the embedding of eF into F and it is one half of the proof which gives the rule (+_{E}-I) not counting the proof of (+_{I}-I) which is only done by checking something without combinatorial content. The proof of (+_{E}-E) is no better and hence explains why the clause (+-E) of the embedding of eF into F is so simple. Consider ∃_{I}(Φ). If Φ has λαρ′ as extracted type, then ∃_{I}(Φ) has extracted type ∃αρ′. This does not give an interesting encoding. But ∃_{E}(Φ) has extracted type ∀β.(∀α.ρ′ → β) → β for β ∉ {α} ∪ FV(ρ′) because the extraction read off the definitions for the universal quantifier is in both cases the homomorphic rule. And this is exactly the crucial clause in the embedding of eF+ex into eF. The proof that ∃_{I}(Φ) ⊆ ∃_{E}(Φ) contains the idea for the clause (∃-I) of that embedding. The open question is: Do those encodings read off the proof by saturated sets always preserve β-reduction, i. e., are they in fact embeddings? In the next sections we will see many more proofs where the method works.

9.4 Strong normalization of MeIT–it and coMeIT–it

For MeIT–it and for coMeIT–it we give an introduction-based and an elimination-based proof. In contrast to the situation of eF following both possibilities of defining a fixed-point construction for saturated sets is more work than only following one of them. Nevertheless, it seems worthwile studying the differences of the proofs of Lemma 9.44 and Lemma 9.46.

9.4.1 Strong normalization of MeIT–it

Lemma 9.38 If t ∈ sn, then C_{μαρ}t ∈ sn.

Proof Induction on t ∈ sn. _{□} Lemma 9.39 If s(μαρ)(λy^{μαρ}y)(λx^{μαρ}.xE_{μ}^{+}σs)ts⃗ ∈ sn, x^{μαρ} ∉ FV(s) and (C_{μαρ}t)E_{μ}^{+}σss⃗ is a term, then (C_{μαρ}t)E_{μ}^{+}σss⃗ ∈ sn.

Proof Induction on s(μαρ)(λy^{μαρ}y)(λx^{μαρ}.xE_{μ}^{+}σs)ts⃗ ∈ sn^{+} by the usual analysis of the immediate reducts of (C_{μαρ}t)E_{μ}^{+}σss⃗. (Note that we need sn^{+} because s occurs twice in the canonical reduct of (C_{μαρ}t)E_{μ}^{+}σss⃗.) _{□}

Corollary 9.40 SN ⊆ sn.

Proof The same as for Lemma 9.6. _{□}

Saturated sets for MeIT–it

Extend the definition for system eF of M being a τ-saturated set by the following clause:

(β_{μ}^{+}) If s(μαρ)(λy^{μαρ}y)(λx^{μαρ}.xE_{μ}^{+}σs)ts⃗ ∈ M, x^{μαρ} ∉ FV(s) and (C_{μαρ}t)E_{μ}^{+}σss⃗ is a

term, then (C_{μαρ}t)E_{μ}^{+}σss⃗ ∈ M.

Extend the definition of the τ-saturated closure cl_{τ} (M) accordingly by the clause

(β_{μ}^{+}) If s(μαρ)(λy^{μαρ}y)(λx^{μαρ}.xE_{μ}^{+}σs)ts⃗ ∈ cl_{τ} (M), x^{μαρ} ∉ FV(s) and (C_{μαρ}t)E_{μ}^{+}σss⃗ is a

term, then (C_{μαρ}t)E_{μ}^{+}σss⃗ ∈ cl_{τ} (M).

Again cl_{τ} (M) is the smallest τ-saturated set containing M ∩ SN_{τ}.

Calculating with saturated sets for MeIT–it

From now on we always adopt the same operator precedences for constructions of saturated sets as for types, e. g. P → Q → M denotes P → (Q → M). Fix λαρ. Let Φ := (Φ_{τ})_{τ} be a family of mappings Φ_{τ} : SAT_{τ} → SAT_{ρ[α:=τ]}. Define for M ∈ SAT_{μαρ}

\begin{aligned}M_{I}(M) & := & \{r ∈ Λ_{μαρ}|∃t ∈ Φ_{μαρ}(M).r = C_{μαρ}t\} \\ M_{E}(M) & := & \{r ∈ Λ_{μαρ}|∀σ∀N ∈ SAT_{σ}∀s ∈ ∀P.(P → M) → (P → N) → Φ(P) → N .rs ∈ N \} \end{aligned}

and Ψ_{I} : SAT_{μαρ} → SAT_{μαρ} by setting

Ψ_{I}(M) := cl_{μαρ}(M_{I}(M))

and

μ_{E}(Φ) := any fixed point of Ψ_{E} : SAT_{μαρ} → SAT_{μαρ},

defined by

Ψ_{E}(M) := cl_{μαρ}(M_{E}(M)).

Because Ψ_{E} is monotone (it is even non-strictly positive) and SAT_{μαρ} is a complete lattice, such a fixed point exists. Hence, μ_{E}(Φ) is μαρ-saturated. If we took the least fixed point for μ_{E}(Φ), μ_{E}(Φ) would be (pointwise) isotone in the argument Φ. If Φ_{μαρ} were monotone, Ψ_{I} would also be monotone and we could define μ_{I}(Φ) as the least fixed point of Ψ_{I}. Unfortunately, in the definition of the computability predicates we cannot ensure the monotonicity of Φ_{μαρ}: Let ρ := α → 1. (Hence, λαρ is trivially monotone although it is not positive.) Assume that → (for saturated sets) is →_{E}. In order to define SC_{μαρ} we have to study Φ_{μαρ}, defined by

Φ_{μαρ}(M) := SC_{ρ}[α⃗, α := P⃗, M] := SC_{α}[α⃗, α := P⃗, M] →_{E} SC_{1}[α⃗, α := P⃗, M] := M →_{E} SN_{1}.

Let M ⊆ M′ and r ∈ Φ_{μαρ}(M). How could we show r ∈ Φ_{μαρ}(M′)? r ∈ SN is clear. Let s ∈ M′. We would have to show rE_{→}s ∈ SN_{1}. By assumption on r we have that rE_{→}t ∈ SN_{1} for t ∈ M ⊆ M′. Hence, we cannot use this assumption. However, if we already knew that every term is in SN, we could infer that Φ_{μαρ} is constantly equal to SN_{μαρ→1} and hence monotone. But we are about to proving Λ = SN!^{14} Nevertheless, there is an introduction-based approach which works. Define for M ∈ SAT_{μαρ}

M_{I}^{⊇}(M) := {r ∈ Λ_{μαρ}|∃M′ ∈ SAT_{μαρ}.M′ ⊆ M ∧ ∃t ∈ Φ_{μαρ}(M′).r = C_{μαρ}t}

and set

μ_{I}(Φ) := the least fixed point of Ψ_{I}^{⊇} : SAT_{μαρ} → SAT_{μαρ},

defined by

Ψ_{I}^{⊇}(M) := cl_{μαρ}(M_{I}^{⊇}(M)).

Because Ψ_{I}^{⊇} is monotone (is is even strictly positive), such a fixed point exists. It is obvious that Ψ_{I}^{⊇} ⊇ Ψ_{I} (pointwise). Therefore any pre-fixed-point of Ψ_{I}^{⊇} is also a pre-fixed-point of Ψ_{I}. Note that for Ψ_{I}^{⊇} only Φ_{μαρ} is needed. However, for ease of presentation also in this case the existence of the family (Φ_{τ})_{τ} is assumed. Using informal modified realizability the above definitions motivate two encodings of the types: The definition of μ_{I}(Φ) gives rise^{15} to

(μαρ)′ := μα∃β.(β → α) × ρ′[α := β]

for β ∉ {α} ∪ FV(ρ), hence (μαρ)′ = spos(μαρ′) which is the encoding used for embedding UVIT (and hence also MeIT) into MePIT (in section 6.2.3). The definition of μ_{E}(Φ) suggests^{16} the following

(μαρ)′ := μ̂β∀γ.(∀α.(α → β) → (α → γ) → ρ′ → γ) → γ

where μ̂ indicates that a fixed-point type is used instead of an inductive type (see appendix B). Following the proofs of this section one may also read off embeddings: In the first case into MePIT, in the second^{17} into a system of non-interleaving positive fixed-point types. That both preserve reduction has to be checked due to the lack of a general theorem saying when the extracted encodings are in fact embeddings.

Lemma 9.41 M_{E}(M) ∩ SN ∈ SAT (which implies Ψ_{E}(M) = M_{E}(M) ∩ SN).

Proof Straightforward. _{□}

Lemma 9.42 M_{I}(M) ⊆ SN (which implies Ψ_{I}(M) ⊇ M_{I}(M)). _{□} Lemma 9.43 Let M be a μαρ-saturated set. M is a pre-fixed-point of Ψ_{I} iff for all t ∈ Φ_{μαρ}(M), we have that C_{μαρ}t ∈ M. M is a post-fixed-point of Ψ_{E} iff for all r ∈ M, types σ, N ∈ SAT_{σ} and for all terms s ∈ ∀P.(P → M) → (P → N) → Φ(P) → N, we have rE_{μ}^{+}σs ∈ N.

14We could partly solve the problem by considering only μαρ with α ∈ Pos(ρ) and monotone Φ_{μαρ} and later proving simultaneously with the definition of the computability predicates that the function P ↦ SC_{ρ}[α⃗, α := P⃗, P] is monotone for α ∈ Pos(ρ) and antitone for α ∈ Neg(ρ). We would thus get strong normalization only for the original system of Mendler (coinductive types not taken into account) and were not allowed to infer strong normalization of IMIT from this result.

15The existence of M′ is reflected by ∃β, the inclusion by →, the conjunction by × and t ∈ Φ_{μαρ}(M′) by ρ′[α := β]. r = C_{μαρ}t has no computational content and hence is not represented.

16∀γ reflects ∀σ∀N ∈ SAT_{σ}.

17For the translation of the introduction rule one uses the slightly easier proof that μ_{E}(Φ) is a pre-fixed-point of Ψ_{I} instead of Lemma 9.44.

Proof Use the two preceding lemmas. _{□}

Lemma 9.44 μ_{E}(Φ) is a pre-fixed-point of Ψ_{I}^{⊇}.

Proof We have to show that

Ψ_{I}^{⊇}(μ_{E}(Φ)) ⊆ μ_{E}(Φ).

Because μ_{E}(Φ) is a pre-fixed-point of Ψ_{E}, it suffices to show

Ψ_{I}^{⊇}(μ_{E}(Φ)) ⊆ Ψ_{E}(μ_{E}(Φ)).

Because cl_{μαρ} is monotone, it suffices to show

M_{I}^{⊇}(μ_{E}(Φ)) ⊆ M_{E}(μ_{E}(Φ)).

Let M ∈ SAT_{μαρ} with M ⊆ μ_{E}(Φ). Let t ∈ Φ_{μαρ}(M). We have to show

C_{μαρ}t ∈ M_{E}(μ_{E}(Φ)).

Let σ be a type, N ∈ SAT_{σ} and s ∈ ∀P.(P → μ_{E}(Φ)) → (P → N) → Φ(P) → N. We have to show that

C_{μαρ}tE_{μ}^{+}σs ∈ N .

Because N is saturated it suffices to show

s(μαρ)(λy^{μαρ}y)(λx^{μαρ}.xE_{μ}^{+}σs)t ∈ N .

Because of (→-E) for saturated sets (in the sequel the named rules will always be those for saturated sets) and t ∈ Φ_{μαρ}(M) it suffices to show

s(μαρ)(λy^{μαρ}y)(λx^{μαρ}.xE_{μ}^{+}σs) ∈ Φ_{μαρ}(M) → N .

Because of (∀-E) we have

s(μαρ) ∈ (M → μ_{E}(Φ)) → (M → N) → Φ_{μαρ}(M) → N .

By help of (→-I) we know λy^{μαρ}y ∈ M → μ_{E}(Φ). Hence by (→-E)

s(μαρ)(λy^{μαρ}y) ∈ (M → N) → Φ_{μαρ}(M) → N .

Again because of (→-E) it suffices to show

λx^{μαρ}.xE_{μ}^{+}σs ∈ M → N .

Use (→-I). Let r ∈ M. We have to show

rE_{μ}^{+}σs ∈ N .

This follows from the preceding lemma because r ∈ M ⊆ μ_{E}(Φ) and μ_{E}(Φ) is a post-fixed-point of Ψ_{E}. _{□} Note that we used from μ_{E}(Φ) the properties of being a pre-fixed-point and a post-fixed-point of Ψ_{E}. Note also that for the purposes of the normalization proof it would have been enough to show that μ_{E}(Φ) is a pre-fixed-point of Ψ_{I} instead of Ψ_{I}^{⊇}, but from the above result we even get the following

Corollary 9.45 μ_{I}(Φ) ⊆ μ_{E}(Φ).

Proof μ_{I}(Φ) is the least pre-fixed-point of Ψ_{I}^{⊇}. _{□}

Lemma 9.46 μ_{I}(Φ) is a post-fixed-point of Ψ_{E}.

Proof Set M := μ_{I}(Φ). We prove M ⊆ Ψ_{E}(M) by extended induction (as defined in the introduction to chapter 4) on M. Let M′ := Ψ_{E}(M) ∩ M. We have to show

Ψ_{I}^{⊇}(M′) ⊆ Ψ_{E}(M).

Because cl_{μαρ} is monotone, it suffices to show

M_{I}^{⊇}(M′) ⊆ M_{E}(M).

Let r ∈ M_{I}^{⊇}(M′), i. e., r = C_{μαρ}t with t ∈ Φ_{μαρ}(M′′) for some M′′ ∈ SAT_{μαρ} with M′′ ⊆ M′. We have to show that

C_{μαρ}t ∈ M_{E}(M).

Let σ be a type, N ∈ SAT_{σ} and s ∈ ∀P.(P → M) → (P → N) → Φ(P) → N. We have to show that

C_{μαρ}tE_{μ}^{+}σs ∈ N .

Because N is saturated it suffices to show

s(μαρ)(λy^{μαρ}y)(λx^{μαρ}.xE_{μ}^{+}σs)t ∈ N .

Because of (→-E) for saturated sets (in the sequel the named rules will always be those for saturated sets) and t ∈ Φ_{μαρ}(M′′) it suffices to show

s(μαρ)(λy^{μαρ}y)(λx^{μαρ}.xE_{μ}^{+}σs) ∈ Φ_{μαρ}(M′′) → N .

Because of (∀-E) we have

s(μαρ) ∈ (M′′ → M) → (M′′ → N) → Φ_{μαρ}(M′′) → N .

By help of (→-I) and because M′′ ⊆ M we know λy^{μαρ}y ∈ M′′ → M. Hence by (→-E)

s(μαρ)(λy^{μαρ}y) ∈ (M′′ → N) → Φ_{μαρ}(M′′) → N .

Again because of (→-E) it suffices to show

λx^{μαρ}.xE_{μ}^{+}σs ∈ M′′ → N .

Use (→-I). Let r′ ∈ M′′. We have to show

r′E_{μ}^{+}σs ∈ N .

This follows from r′ ∈ M′′ ⊆ M′ ⊆ Ψ_{E}(M) ⊆ M_{E}(M). _{□} Note that we only used that μ_{I}(Φ) is a least pre-fixed-point. Note also that the stronger induction principle is essential to the argument because we have to show that λy^{μαρ}y ∈ M′′ → M. Finally note that some sort of induction is indispensable because otherwise one could never use the rule (β_{μ}^{+}) for saturated sets. If we took the greatest fixed point in the definition of μ_{E}(Φ) (which would be the greatest post-fixed-point by dualization of Tarski’s theorem) we would have μ_{I}(Φ) ⊆ μ_{E}(Φ) again as a consequence of the preceding lemma. Putting everything together we get the following rules for reasoning with μ_{I}(Φ) and μ_{E}(Φ) where we simply write μ(Φ) for both of them:

(SAT) μ(Φ) ∈ SAT_{μαρ}.
(μ-I) If t ∈ Φ_{μαρ}(μ(Φ)), then C_{μαρ}t ∈ μ(Φ).

(μ-E^{+}) If r ∈ μ(Φ), σ type, N ∈ SAT_{σ} and s ∈ ∀P.(P → μ(Φ)) → (P → N) → Φ(P) → N,

then rE_{μ}^{+}σs ∈ N.

Computability predicates for MeIT–it

Extend the definition of SC_{ρ}[α⃗ := P⃗] by the following clause:

(μ) SC_{μαρ}[α⃗ := P⃗] := μ(Φ) with Φ = (Φ_{σ})_{σ}, where Φ_{σ} : SAT_{σ} → SAT_{ρ[α⃗,α:=σ⃗,σ]} is defined by Φ_{σ}(P) := SC_{ρ}[α⃗, α := P⃗, P] (with the same assumptions as in the definition of strong computability for universal types in order to guarantee type-correctness).

The definition will be written more intuitively as follows:

SC_{μαρ}[α⃗ := P⃗] := μP.SC_{ρ}[α⃗, α := P⃗, P].

We want to extend the coincidence and substitution lemma (Lemma 9.13 and Lemma 9.14) to MeIT–it. This is not possible if we interpret “any fixed point of Ψ_{E}” in the definition of μ_{E}(Φ)^{18} too liberally. We have to stipulate that this choice only depends on Ψ_{E}. This means that we assume a function giving for any monotone Ψ : SAT_{μαρ} → SAT_{μαρ} a fixed point of Ψ and that this function is used for choosing the fixed point in the definition of μ_{E}(Φ)^{19}. With this extra condition it is obvious that the coincidence and substitution lemma extend to MeIT–it. Now we extend Lemma 9.16 to MeIT–it:

Lemma 9.47 Let r^{ρ} be a term, xρ⃗ a list of variables and s⃗ an equally long list of terms such that s⃗ ∈ SCρ⃗[α⃗ := P⃗σ⃗] for some P⃗ ⊆ SAT. Assume that

∀x∀π∀π′.(x^{π}, x^{π′} ∈ FV(r) ∪ xρ⃗) ∧ (π[α⃗ := σ⃗] = π′[α⃗ := σ⃗]) ⇒ π = π′.

Then r[α⃗ := σ⃗][x^{ρ⃗[α⃗:=σ⃗]} := s⃗] ∈ SC_{ρ}[α⃗ := P⃗].

Proof Induction on r. Again abbreviate r[α⃗ := σ⃗][x^{ρ⃗[α⃗:=σ⃗]} := s⃗] by r′ (for any term r). The assumption in the statement will again be referenced to as “injectivity”. We only have to consider the rules (μ-I) and (μ-E^{+}). (μ-I) Case C_{μαρ}t. (C_{μαρ}t)′ = C_{μαρ[α⃗:=σ⃗]}t′. We may assume that α ∉ α⃗. We have to show C_{μαρ[α⃗:=σ⃗]}t′ ∈ SC_{μαρ}[α⃗ := P⃗]. By the rule (μ-I) for saturated sets it suffices to show

t′ ∈ SC_{ρ}[α⃗, α := P⃗, SC_{μαρ}[α⃗ := P⃗]].

18For the restrictions of the choice between μ_{I} and μ_{E} see the discussion immediately before Lemma 9.13 on p. 118.

19This uniformity assumption will be tacitly made also for the other systems of inductive types.

Because FV(C_{μαρ}t) = FV(t), injectivity holds trivially also for t. By induction hypothesis t′ ∈ SC_{ρ[α:=μαρ]}[α⃗ := P⃗]. By the substitution lemma (which for system F is Lemma 9.14) we have

SC_{ρ[α:=μαρ]}[α⃗ := P⃗] = SC_{ρ}[α⃗, α := P⃗, SC_{μαρ}[α⃗ := P⃗]].

(μ-E^{+}) Case rE_{μ}^{+}σs. (rE_{μ}^{+}σs)′ = r′E_{μ}^{+}(σ[α⃗ := σ⃗])s′. We have to show that r′E_{μ}^{+}σ[α⃗ := σ⃗]s′ ∈ SC_{σ}[α⃗ := P⃗]. Use (μ-E^{+}) for saturated sets. Show that r′ ∈ SC_{μαρ}[α⃗ := P⃗] and

s′ ∈ ∀P.(P → SC_{μαρ}[α⃗ := P⃗]) → (P → SC_{σ}[α⃗ := P⃗]) → SC_{ρ}[α⃗, α := P⃗, P] → SC_{σ}[α⃗ := P⃗].

Injectivity holds for r and s because FV(r), FV(s) ⊆ FV(rE_{μ}^{+}σs). Therefore by induction hypothesis r′ ∈ SC_{μαρ}[α⃗ := P⃗] and s′ ∈ SC_{∀α.(α→μαρ)→(α→σ)→ρ→σ}[α⃗ := P⃗]. Unwinding the definition and using the coincidence lemma (α ∉ FV(μαρ) ∪ FV(σ)) and α ∉ α⃗ (which we assumed in the definition of SC_{μαρ}[α⃗ := P⃗]) leads to the desired result. _{□}

As for system eF we get as corollaries that SN = Λ, that every term is strongly normalizing, that Ω is a normalizing function and that there is no closed term of type 0^{20}.

9.4.2 Strong normalization of coMeIT–it

Lemma 9.48 If t ∈ sn, then C_{μαρ}t ∈ sn.

Proof Induction on t ∈ sn. _{□}

Lemma 9.49 If s(Λαλz^{μαρ×σ→α}.tα(λx^{μαρ}.z⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩))s⃗ ∈ sn, the side conditions of the (β_{μ}^{+})-rule are met and (C_{μαρ}t)E_{μ}^{+}σss⃗ is a term, then (C_{μαρ}t)E_{μ}^{+}σss⃗ ∈ sn.

Proof Induction on s(Λαλz^{μαρ×σ→α}.tα(λx^{μαρ}.z⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩))s⃗ ∈ sn^{+} by the usual analysis of the reducts of (C_{μαρ}t)E_{μ}^{+}σss⃗. (Note that we need sn^{+} because s occurs twice in the canonical reduct of (C_{μαρ}t)E_{μ}^{+}σss⃗.) _{□}

Corollary 9.50 SN ⊆ sn.

Proof The same as for Lemma 9.6. _{□}

Saturated sets for coMeIT–it

Extend the definition for system eF of M being a τ-saturated set by the following clause:

(β_{μ}^{+}) If s(Λαλz^{μαρ×σ→α}.tα(λx^{μαρ}.z⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩))s⃗ ∈ M, the side conditions of the (β_{μ}^{+})-rule are met and (C_{μαρ}t)E_{μ}^{+}σss⃗ is a term, then (C_{μαρ}t)E_{μ}^{+}σss⃗ ∈ M.

Extend the definition of the τ-saturated closure cl_{τ} (M) accordingly by the clause

(β_{μ}^{+}) If s(Λαλz^{μαρ×σ→α}.tα(λx^{μαρ}.z⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩))s⃗ ∈ cl_{τ} (M), the side conditions of the (β_{μ}^{+})-rule are met and (C_{μαρ}t)E_{μ}^{+}σss⃗ is a term, then (C_{μαρ}t)E_{μ}^{+}σss⃗ ∈

cl_{τ} (M).

Again cl_{τ} (M) is the smallest τ-saturated set containing M ∩ SN_{τ}.

20As was mentioned in footnote 13 concerning system F we never used induction on SN. This is also true of this system (and of all the others considered in this thesis). It would not be possible e. g. in the following variant of MeIT–it with (μ-E^{+}) replaced by: If r : μαρ and σ type, then rE_{μ}^{+}σ : (∀α.(α → μαρ) → (α → σ) → ρ → σ) → σ.

We would have to prove r^{μαρ} ∈ SN ⇒ rE_{μ}^{+}σ ∈ SN by induction on SN.

Calculating with saturated sets for coMeIT–it

Fix λαρ. Let Φ := (Φ_{τ})_{τ} be a family of mappings Φ_{τ} : SAT_{τ} → SAT_{ρ[α:=τ]}. Define for M ∈ SAT_{μαρ}

M_{I}(M) := {r ∈ Λ_{μαρ}|∃t ∈ (∀P.(M → P) → Φ(P)).r = C_{μαρ}t}
M_{E}(M) := {r ∈ Λ_{μαρ}|∀σ∀N ∈ SAT_{σ}∀s ∈ (∀P.(M × N → P) → Φ(P)) → N .rE_{μ}^{+}s ∈ N }

and set

μ_{I}(Φ) := the least fixed point of Ψ_{I} : SAT_{μαρ} → SAT_{μαρ},

defined by

Ψ_{I}(M) := cl_{μαρ}(M_{I}(M))

and

μ_{E}(Φ) := any fixed point of Ψ_{E} : SAT_{μαρ} → SAT_{μαρ},

defined by

Ψ_{E}(M) := cl_{μαρ}(M_{E}(M)).

Because Ψ_{I} and Ψ_{E} are monotone (they are even non-strictly positive) and SAT_{μαρ} is a complete lattice, such fixed points exist. Hence, μ_{I}(Φ) and μ_{E}(Φ) are μαρ-saturated sets. μ_{I}(Φ) is (pointwise) isotone in the argument Φ. If we took the least fixed point for μ_{E}(Φ), the same would hold. The first approach corresponds to the encoding

(μαρ)′ := μα∀β.(α → β) → ρ′[α := β]

for β ∉ {α} ∪ FV(ρ). Hence (μαρ)′ = pos(μαρ′) which is the encoding used for embedding coMeIT into coMePIT in section 6.3.3. The second approach (via μ_{E}(Φ)) corresponds to

(μαρ)′ := μ̂β∀γ.((∀α.(β × γ → α) → ρ′) → γ) → γ

with “new” β and γ. Following the proof below one even gets an embedding into a system of non-interleaved positive fixed-point types (see appendix B).

Lemma 9.51 M_{E}(M) ∩ SN ∈ SAT (which implies Ψ_{E}(M) = M_{E}(M) ∩ SN).

Proof Straightforward. _{□}

Lemma 9.52 M_{I}(M) ⊆ SN (which implies Ψ_{I}(M) ⊇ M_{I}(M)). _{□}

Lemma 9.53 A μαρ-saturated set M is a pre-fixed-point of Ψ_{I} iff for all t ∈ ∀P.(M → P) → Φ(P), we have that C_{μαρ}t ∈ M. A μαρ-saturated set M is a post-fixed-point of Ψ_{E} iff for all r ∈ M, types σ, N ∈ SAT_{σ} and s ∈ (∀P.(M × N → P) → Φ(P)) → N, we have rE_{μ}^{+}σs ∈ N.

Proof Use the two preceding lemmas. _{□}

Lemma 9.54 μ_{E}(Φ) is a pre-fixed-point of Ψ_{I}.

Proof Set M := μ_{E}(Φ). We have to show that

Ψ_{I}(M) ⊆ M.

Because M is a pre-fixed-point of Ψ_{E}, it suffices to show

Ψ_{I}(M) ⊆ Ψ_{E}(M).

Because cl_{μαρ} is monotone it suffices to show

M_{I}(M) ⊆ M_{E}(M).

Let t ∈ ∀P.(M → P) → Φ(P). We have to show

C_{μαρ}t ∈ M_{E}(M).

Let σ be a type, N ∈ SAT_{σ} and s ∈ (∀P.(M × N → P) → Φ(P)) → N. We have to show that

C_{μαρ}tE_{μ}^{+}σs ∈ N .

Because N is saturated it suffices to show

s(Λαλz^{μαρ×σ→α}.tα(λx^{μαρ}.z⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩)) ∈ N .

Because of (→-E) for saturated sets (in the sequel the named rules will always be those for saturated sets) it suffices to show

Λαλz^{μαρ×σ→α}.tα(λx^{μαρ}.z⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩) ∈ ∀P.(M × N → P) → Φ(P).

We use (∀-I). Let τ be a type and P ∈ SAT_{τ}. We have to show

λz^{μαρ×σ→τ} .tτ(λx^{μαρ}.z⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩) ∈ (M × N → P) → Φ_{τ} (P).

We use (→-I). Let u ∈ M × N → P. We may assume that x^{μαρ} ∉ FV(u). Therefore we have to show

tτ(λx^{μαρ}.u⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩) ∈ Φ_{τ} (P).

Because of (∀-E) we have that tτ ∈ (M → P) → Φ_{τ} (P). By (→-E) it suffices to show

λx^{μαρ}.u⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩ ∈ M → P.

We use (→-I). Let r ∈ M. We have to show

u⟨r, (λx^{μαρ}.xE_{μ}^{+}σs)r⟩ ∈ P.

Because of (→-E) and (×-I) it suffices to show

r ∈ M and (λx^{μαρ}.xE_{μ}^{+}σs)r ∈ N .

Because r ∈ M ⊆ SN and N is saturated it suffices to show

rE_{μ}^{+}σs ∈ N .

This follows from the preceding lemma because M is a post-fixed-point of Ψ_{E}. _{□} Note that we used from μ_{E}(Φ) the properties of being a pre-fixed-point and a post-fixed-point of Ψ_{E}. Corollary 9.55 μ_{I}(Φ) ⊆ μ_{E}(Φ). Proof μ_{I}(Φ) is the least pre-fixed-point of Ψ_{I}. _{□} Lemma 9.56 μ_{I}(Φ) is a post-fixed-point of Ψ_{E}. Proof Set M := μ_{I}(Φ). We prove M ⊆ Ψ_{E}(M) by extended induction (as defined in the introduction to chapter 4) on M. Let M′ := Ψ_{E}(M) ∩ M. We have to show

Ψ_{I}(M′) ⊆ Ψ_{E}(M).

Because cl_{μαρ} is monotone it suffices to show

M_{I}(M′) ⊆ M_{E}(M).

Let r ∈ M_{I}(M′), i. e., r = C_{μαρ}t with t ∈ ∀P.(M′ → P) → N. We have to show that

C_{μαρ}t ∈ M_{E}(M).

Let σ be a type, N ∈ SAT_{σ} and s ∈ (∀P.(M × N → P) → Φ(P)) → N. We have to show

C_{μαρ}tE_{μ}^{+}σs ∈ N .

Because N is saturated it suffices to show

s(Λαλz^{μαρ×σ→α}.tα(λx^{μαρ}.z⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩)) ∈ N .

Because of (→-E) it suffices to show

Λαλz^{μαρ×σ→α}.tα(λx^{μαρ}.z⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩) ∈ ∀P.(M × N → P) → Φ(P). We use (∀-I). Let τ be a type and P ∈ SAT_{τ}. We have to show

λz^{μαρ×σ→τ} .tτ(λx^{μαρ}.z⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩) ∈ (M × N → P) → Φ_{τ} (P).

We use (→-I). Let u ∈ M × N → P. We may assume that x^{μαρ} ∉ FV(u). Therefore we have to show

tτ(λx^{μαρ}.u⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩) ∈ Φ_{τ} (P).

Because of (∀-E) we have that tτ ∈ (M′ → P) → Φ_{τ} (P). By (→-E) it suffices to show

λx^{μαρ}.u⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩ ∈ M′ → P.

We use (→-I). Let r′ ∈ M′. We have to show

u⟨r′, (λx^{μαρ}.xE_{μ}^{+}σs)r′⟩ ∈ P.

Because of (→-E) and (×-I) it suffices to show

r′ ∈ M and (λx^{μαρ}.xE_{μ}^{+}σs)r′ ∈ N .

Because r′ ∈ M′ ⊆ M ⊆ SN and N is saturated it suffices to show

r′E_{μ}^{+}σs ∈ N .

This follows from r′ ∈ M′ ⊆ Ψ_{E}(M) ⊆ M_{E}(M). _{□} Note that we only used that μ_{I}(Φ) is a least pre-fixed-point. Note also that the stronger induction principle is essential to the argument because we have to show that r′ ∈ M. Finally note that some sort of induction is indispensable because otherwise one could never use the rule (β_{μ}^{+}) for saturated sets. If we took the greatest fixed point in the definition of μ_{E}(Φ) we would have μ_{I}(Φ) ⊆ μ_{E}(Φ) again as a consequence of the preceding lemma. Putting everything together we get the following rules for reasoning with μ_{I}(Φ) and μ_{E}(Φ) where we simply write μ(Φ) for both of them:

(SAT) μ(Φ) ∈ SAT_{μαρ}.
(μ-I) If t ∈ ∀P.(μ(Φ) → P) → Φ(P), then C_{μαρ}t ∈ μ(Φ).

(μ-E^{+}) If r ∈ μ(Φ), σ type, N ∈ SAT_{σ} and s ∈ (∀P.(μ(Φ) × N → P) → Φ(P)) → N, then

rE_{μ}^{+}σs ∈ N.

Computability predicates for coMeIT–it

Extend the definition of SC_{ρ}[α⃗ := P⃗] by the following clause:

(μ) SC_{μαρ}[α⃗ := P⃗] := μ(Φ) with Φ = (Φ_{σ})_{σ}, where Φ_{σ} : SAT_{σ} → SAT_{ρ[α⃗,α:=σ⃗,σ]} is defined by Φ_{σ}(P) := SC_{ρ}[α⃗, α := P⃗, P] (with the same assumptions as in the definition of strong computability for universal types in order to guarantee type-correctness).

The definition will be written more intuitively as follows:

SC_{μαρ}[α⃗ := P⃗] := μP.SC_{ρ}[α⃗, α := P⃗, P].

It is obvious that coincidence and substitution lemma (Lemma 9.13 and Lemma 9.14) extend to coMeIT–it^{21}. Now we extend Lemma 9.16 to coMeIT–it:

Lemma 9.57 Let r^{ρ} be a term, xρ⃗ a list of variables and s⃗ an equally long list of terms such that s⃗ ∈ SCρ⃗[α⃗ := P⃗σ⃗] for some P⃗ ⊆ SAT. Assume that

∀x∀π∀π′.(x^{π}, x^{π′} ∈ FV(r) ∪ xρ⃗) ∧ (π[α⃗ := σ⃗] = π′[α⃗ := σ⃗]) ⇒ π = π′.

Then r[α⃗ := σ⃗][x^{ρ⃗[α⃗:=σ⃗]} := s⃗] ∈ SC_{ρ}[α⃗ := P⃗].

Proof Induction on r. Again abbreviate r[α⃗ := σ⃗][x^{ρ⃗[α⃗:=σ⃗]} := s⃗] by r′ (for any term r). The assumption in the statement will again be referenced to as “injectivity”. We only have to consider the rules (μ-I) and (μ-E^{+}). (μ-I) Case C_{μαρ}t. (C_{μαρ}t)′ = C_{μαρ[α⃗:=σ⃗]}t′. We have to show C_{μαρ[α⃗:=σ⃗]}t′ ∈ SC_{μαρ}[α⃗ := P⃗]. By the rule (μ-I) for saturated sets it suffices to show

t′ ∈ ∀P.(SC_{μαρ}[α⃗ := P⃗] → P) → SC_{ρ}[α⃗, α := P⃗, P].

Because FV(C_{μαρ}t) = FV(t), injectivity holds trivially also for t. By induction hypothesis t′ ∈ SC_{∀α.(μαρ→α)→ρ}[α⃗ := P⃗]. By definition of strong computability,

SC_{∀α.(μαρ→α)→ρ}[α⃗ := P⃗] = ∀P.(SC_{μαρ}[α⃗, α := P⃗, P] → SC_{α}[α⃗, α := P⃗, P]) → SC_{ρ}[α⃗, α := P⃗, P].

21Cf. the discussion for MeIT–it.

Using the implicit assumption α ∉ α⃗, we get SC_{α}[α⃗, α := P⃗, P]) = P. By the coincidence lemma (for F this is Lemma 9.13), we get SC_{μαρ}[α⃗, α := P⃗, P] = SC_{μαρ}[α⃗ := P⃗]. (μ-E^{+}) Case rE_{μ}^{+}σs. (rE_{μ}^{+}σs)′ = r′E_{μ}^{+}(σ[α⃗ := σ⃗])s′. We have to show that r′E_{μ}^{+}σ[α⃗ := σ⃗]s′ ∈ SC_{σ}[α⃗ := P⃗]. Use (μ-E^{+}) for saturated sets. Show that r′ ∈ SC_{μαρ}[α⃗ := P⃗] and

s′ ∈ (∀P.(SC_{μαρ}[α⃗ := P⃗] × SC_{σ}[α⃗ := P⃗] → P) → SC_{ρ}[α⃗, α := P⃗, P]) → SC_{σ}[α⃗ := P⃗].

Injectivity holds for r and s because FV(r), FV(s) ⊆ FV(rE_{μ}^{+}σs). Therefore by induction hypothesis r′ ∈ SC_{μαρ}[α⃗ := P⃗] and s′ ∈ SC_{(∀α.(μαρ×σ→α)→ρ)→σ}[α⃗ := P⃗]. Unwinding the definition and using the coincidence lemma (α ∉ FV(μαρ) ∪ FV(σ)) and α ∉ α⃗ leads to the desired result._{□}

As before we get as corollaries that SN = Λ, that every term is strongly normalizing, that Ω is a normalizing function and that there is no closed term of type 0.

9.5 Strong normalization of EMIT, varEMIT, IMIT and varIMIT

Direct proofs of strong normalization are given although strong normalization follows already via the embeddings into MeIT–it and coMeIT–it. Technically it is interesting that monotonicity of the operators is mainly enforced not by the general method described in the introduction to the chapter on systems à la Mendler but by a construction based on the monotonicity witnesses which for the elimination-based proof for EMIT follows an idea of [Alt93c]. Because for the systems varEMIT and varIMIT this construction does partly not work the general method is applied almost purely.

9.5.1 Strong normalization of EMIT

Lemma 9.58 If m ∈ sn and t ∈ sn, then C_{μαρ}mt ∈ sn.

Proof Induction on m ∈ sn and t ∈ sn. _{□}

Lemma 9.59 If s(m(μαρ)σ(λx^{μαρ}.xE_{μ}σs)t)s⃗ ∈ sn, x^{μαρ} ∉ FV(s) and (C_{μαρ}mt)E_{μ}σss⃗ is a term, then (C_{μαρ}mt)E_{μ}σss⃗ ∈ sn.

Proof Induction on s(m(μαρ)σ(λx^{μαρ}.xE_{μ}σs)t)s⃗ ∈ sn^{+} by the usual analysis of the reducts of (C_{μαρ}mt)E_{μ}σss⃗. (Note that we need sn^{+} because s occurs twice in the canonical reduct of (C_{μαρ}mt)E_{μ}σss⃗.) _{□}

Lemma 9.60 If s(m(μαρ)(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩)t)s⃗ ∈ sn, x^{μαρ} ∉ FV(s) and (C_{μαρ}mt)E_{μ}^{+}σss⃗ is a term, then (C_{μαρ}mt)E_{μ}^{+}σss⃗ ∈ sn.

Proof Induction on s(m(μαρ)(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩)t)s⃗ ∈ sn^{+} by analysis of the reducts of (C_{μαρ}mt)E_{μ}^{+}σss⃗. (Note that we need sn^{+} because s occurs twice in the canonical reduct of (C_{μαρ}mt)E_{μ}^{+}σss⃗.) _{□}

Corollary 9.61 SN ⊆ sn.

Proof The same as for Lemma 9.6. _{□} Saturated sets for EMIT

Extend the definition for system eF of M being a τ-saturated set by the following clause:

(β_{μ}) If s(m(μαρ)σ(λx^{μαρ}.xE_{μ}σs)t)s⃗ ∈ M, x^{μαρ} ∉ FV(s) and (C_{μαρ}mt)E_{μ}σss⃗ is a term,

then (C_{μαρ}mt)E_{μ}σss⃗ ∈ M.

(β_{μ}^{+}) If s(m(μαρ)(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩)t)s⃗ ∈ M, x^{μαρ} ∉ FV(s) and

(C_{μαρ}mt)E_{μ}^{+}σss⃗ is a term, then (C_{μαρ}mt)E_{μ}^{+}σss⃗ ∈ M.

Extend the definition of the τ-saturated closure cl_{τ} (M) accordingly by the clause

(β_{μ}) If s(m(μαρ)σ(λx^{μαρ}.xE_{μ}σs)t)s⃗ ∈ cl_{τ} (M), x^{μαρ} ∉ FV(s) and (C_{μαρ}mt)E_{μ}σss⃗ is a

term, then (C_{μαρ}mt)E_{μ}σss⃗ ∈ cl_{τ} (M).

(β_{μ}^{+}) If s(m(μαρ)(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩)t)s⃗ ∈ cl_{τ} (M), x^{μαρ} ∉ FV(s)

and (C_{μαρ}mt)E_{μ}^{+}σss⃗ is a term, then (C_{μαρ}mt)E_{μ}^{+}σss⃗ ∈ cl_{τ} (M).

Again cl_{τ} (M) is the smallest τ-saturated set containing M ∩ SN_{τ}.

Calculating with saturated sets for EMIT

Fix λαρ. Let Φ := (Φ_{τ})_{τ} be a family of mappings Φ_{τ} : SAT_{τ} → SAT_{ρ[α:=τ]}. Define for M ∈ SAT_{μαρ}

M_{I}(M) := {r ∈ Λ_{μαρ}|∃m ∈ ∀P∀Q.(P → Q) → Φ(P) → Φ(Q)∃t ∈ Φ_{μαρ}(M).r = C_{μαρ}mt}
M_{E}(M) := {r ∈ Λ_{μαρ}|∀σ∀N ∈ SAT_{σ}.∀s ∈ Φ_{σ}(N) → N rE_{μ}σs ∈ N ∧
∀s ∈ Φ_{μαρ×σ}(M × N) → N rE_{μ}^{+}σs ∈ N }

and define Ψ_{I} : SAT_{μαρ} → SAT_{μαρ} by

Ψ_{I}(M) := cl_{μαρ}(M_{I}(M))

and Ψ_{E} : SAT_{μαρ} → SAT_{μαρ} by

Ψ_{E}(M) := cl_{μαρ}(M_{E}(M)).

We cannot ensure Ψ_{I} or Ψ_{E} to be monotone. In order to overcome this problem we define (with Pow denoting the power set) for m ∈ ∀P∀Q.(P → Q) → Φ(P) → Φ(Q)

Φ_{m}^{⊇} : SAT_{μαρ} → Pow(SN_{ρ[α:=μαρ]})

via

Φ_{m}^{⊇}(M) := {t ∈ SN_{ρ[α:=μαρ]}|∀σ∀N ∈ SAT_{σ}∀s ∈ M → N .m(μαρ)σst ∈ Φ_{σ}(N)}

and Φ^{⊆} := (Φ_{σ}^{⊆})_{σ} with

Φ_{σ}^{⊆} : SAT_{σ} → SAT_{ρ[α:=σ]}

via

Φ_{σ}^{⊆}(N) := cl_{ρ[α:=σ]}({r ∈ Λ_{ρ[α:=σ]}|∃m ∈ ∀P∀Q.(P → Q) → Φ(P) → Φ(Q)
∃M ∈ SAT_{μαρ}∃s ∈ M → N ∃t ∈ Φ_{μαρ}(M).r = m(μαρ)σst})

Φ_{m}^{⊇} is monotone (even non-strictly positive) and Φ_{m}^{⊇} ⊇ Φ_{μαρ} (pointwise) because of the rules (∀-E) and (→-E) for saturated sets. Φ_{σ}^{⊆} is monotone (even strictly positive) and Φ_{σ}^{⊆} ⊆ Φ_{σ} (pointwise) also because of the rules (∀-E) and (→-E) for saturated sets. (Note that already the set which is the argument to cl_{ρ[α:=σ]} is a subset of Φ_{σ}(M) and therefore also Φ_{σ}^{⊆}(M) because Φ_{σ}(M) is saturated.) Define for M ∈ SAT_{μαρ}

M_{I}^{⊇}(M) := {r ∈ Λ_{μαρ}|∃m ∈ ∀P∀Q.(P → Q) → Φ(P) → Φ(Q)∃t ∈ Φ_{m}^{⊇}(M).r = C_{μαρ}mt}
M_{E}^{⊆}(M) := {r ∈ Λ_{μαρ}|∀σ∀N ∈ SAT_{σ}.∀s ∈ Φ_{σ}(N) → N rE_{μ}σs ∈ N ∧
∀s ∈ Φ_{μαρ×σ}^{⊆}(M × N) → N rE_{μ}^{+}σs ∈ N }

and set

μ_{I}(Φ) := the least fixed point of Ψ_{I}^{⊇} : SAT_{μαρ} → SAT_{μαρ},

defined by

Ψ_{I}^{⊇}(M) := cl_{μαρ}(M_{I}^{⊇}(M))

and

μ_{E}(Φ) := any fixed point of Ψ_{E}^{⊆} : SAT_{μαρ} → SAT_{μαρ},

defined by

Ψ_{E}^{⊆}(M) := cl_{μαρ}(M_{E}^{⊆}(M)).

Because Ψ_{I} and Ψ_{E} are monotone (they are even non-strictly positive) and SAT_{μαρ} is a complete lattice, such fixed points exists. Hence, μ_{I}(Φ) and μ_{E}(Φ) are μαρ-saturated sets. Let us extract an encoding of types from the definition of μ_{I}(Φ):

(μαρ)′ := μβ.Mon(λαρ′) × ∀α.(β → α) → ρ′,

where we write Mon(λαρ) for ∀α∀β.(α → β) → ρ → ρ[α := β] and assume that β ∉ {α}∪FV(ρ). The extraction read off the following proofs indeed gives an embedding of EMIT into NIPIT. Following the elimination-based proof one presumably gets an embedding into a system of noninterleaving positive fixed-point types.

Lemma 9.62 M_{E}(M) ∩ SN ∈ SAT and M_{E}^{⊆}(M) ∩ SN ∈ SAT (which implies that Ψ_{E}(M) = M_{E}(M) ∩ SN and Ψ_{E}^{⊆}(M) = M_{E}^{⊆}(M) ∩ SN).

Proof Straightforward. _{□}

Lemma 9.63 M_{I}(M) ⊆ SN and M_{I}^{⊇}(M) ⊆ SN (which implies that Ψ_{I}(M) ⊇ M_{I}(M) and Ψ_{I}^{⊇}(M) ⊇ M_{I}^{⊇}(M)). _{□}

Lemma 9.64 Let M be a μαρ-saturated set M. M is a pre-fixed-point of Ψ_{I} iff for all m ∈ ∀P∀Q.(P → Q) → Φ(P) → Φ(Q) and for all t ∈ Φ_{μαρ}(M), we have that C_{μαρ}mt ∈ M. M is a post-fixed-point of Ψ_{E} iff for all r ∈ M, types σ, N ∈ SAT_{σ} and s ∈ Φ_{σ}(N) → N, we have rE_{μ}σs ∈ N and for all s ∈ Φ_{μαρ×σ}(M × N) → N, rE_{μ}^{+}σs ∈ N.

Proof Use the two preceding lemmas. _{□}

Lemma 9.65 μ_{I}(Φ) is a pre-fixed-point of Ψ_{I}.

Proof μ_{I}(Φ) is a pre-fixed-point of Ψ_{I}^{⊇} by definition. Hence

μ_{I}(Φ) ⊇ Ψ_{I}^{⊇}(μ_{I}(Φ)) ⊇ Ψ_{I}(μ_{I}(Φ)),

which clearly follows from Φ_{m}^{⊇} ⊇ Φ_{μαρ} because M_{I}(M) and M_{I}^{⊇}(M) have the same definition with exception of the occurrence of Φ_{μαρ} and Φ_{m}^{⊇}, respectively, which is at a strictly positive position. _{□}

Lemma 9.66 μ_{E}(Φ) is a post-fixed-point of Ψ_{E}.

Proof μ_{E}(Φ) is a post-fixed-point of Ψ_{E}^{⊆} by definition. Hence

μ_{E}(Φ) ⊆ Ψ_{E}^{⊆}(μ_{E}(Φ)) ⊆ Ψ_{E}(μ_{E}(Φ)),

which clearly follows from Φ^{⊆} ⊆ Φ (typewise) because M_{E}(M) and M_{E}^{⊆}(M) have the same definition with exception of the occurrence of Φ_{μαρ×σ} and Φ_{μαρ×σ}^{⊆}, respectively, which is at a non-strictly positive position. _{□}

Lemma 9.67 μ_{E}(Φ) is a pre-fixed-point of Ψ_{I}^{22}.

Proof Set M := μ_{E}(Φ). We have to show

Ψ_{I}(M) ⊆ M.

Because M is a pre-fixed-point of Ψ_{E}^{⊆}, it suffices to show

Ψ_{I}(M) ⊆ Ψ_{E}^{⊆}(M).

Because cl_{μαρ} is monotone, it suffices to show

M_{I}(M) ⊆ M_{E}^{⊆}(M).

Let m ∈ ∀P∀Q.(P → Q) → Φ(P) → Φ(Q) and t ∈ Φ_{μαρ}(M). We have to show

C_{μαρ}mt ∈ M_{E}^{⊆}(M).

Let σ be a type, N ∈ SAT_{σ} and s ∈ Φ_{σ}(N) → N. We have to show that

C_{μαρ}mtE_{μ}σs ∈ N .

Because N is saturated it suffices to show

s(m(μαρ)σ(λx^{μαρ}.xE_{μ}σs)t) ∈ N .

Because of (→-E) for saturated sets (in the sequel the named rules will always be those for saturated sets) it suffices to show

m(μαρ)σ(λx^{μαρ}.xE_{μ}σs)t ∈ Φ_{σ}(N).

By (∀-E) and (→-E) it suffices to show

λx^{μαρ}.xE_{μ}σs ∈ M → N .

22It does not seem possible to show that μ_{E}(Φ) is even a pre-fixed-point of Ψ_{I}^{⊇} and hence I do not know whether μ_{I}(Φ) ⊆ μ_{E}(Φ).

We use (→-I). Let r ∈ M. We have to show

rE_{μ}σs ∈ N .

This follows from M ⊆ Ψ_{E}^{⊆}(M) ⊆ M_{E}^{⊆}(M). We come to the case for which Ψ_{E}^{⊆} was designed, namely s ∈ Φ_{μαρ×σ}^{⊆}(M × N) → N. We have to show

C_{μαρ}mtE_{μ}^{+}σs ∈ N .

By saturatedness of N it suffices to show

s(m(μαρ)(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩)t) ∈ N .

Because of (→-E) it suffices to show

m(μαρ)(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩)t ∈ Φ_{μαρ×σ}^{⊆}(M × N).

According to the definition of Φ^{⊆} (the closure in the definition of Φ^{⊆} only makes the set larger) we are done if we show

λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩ ∈ M → M × N .

We use (→-I). Let r ∈ M. We have to show

⟨r, (λx^{μαρ}.xE_{μ}^{+}σs)r⟩ ∈ M × N .

By (×-I) it suffices to show

(λx^{μαρ}.xE_{μ}^{+}σs)r ∈ N .

Because N is saturated, we only need to show

rE_{μ}^{+}σs ∈ N .

This follows again from M ⊆ Ψ_{E}^{⊆}(M) ⊆ M_{E}^{⊆}(M). _{□}

Note that we used from μ_{E}(Φ) the properties of being a pre-fixed-point and a post-fixed-point of Ψ_{E}^{⊆}.

Lemma 9.68 μ_{I}(Φ) is a post-fixed-point of Ψ_{E}^{23}.

Proof Set M := μ_{I}(Φ). We prove M ⊆ Ψ_{E}(M) by extended induction (as defined in the introduction to chapter 4) on M. Let M′ := Ψ_{E}(M) ∩ M. We have to show

Ψ_{I}^{⊇}(M′) ⊆ Ψ_{E}(M).

Because cl_{μαρ} is monotone, it suffices to show

M_{I}^{⊇}(M′) ⊆ M_{E}(M).

Let r ∈ M_{I}^{⊇}(M′), i. e., r = C_{μαρ}mt with m ∈ ∀P∀Q.(P → Q) → Φ(P) → Φ(Q) and t ∈ Φ_{m}^{⊇}(M′). We have to show that

C_{μαρ}mt ∈ M_{E}(M).

23It does not seem possible to show that μ_{I}(Φ) is even a post-fixed-point of Ψ_{E}^{⊆} and hence also this lemma does not give an information whether μ_{I}(Φ) ⊆ μ_{E}(Φ) (in case the greatest fixed point of Ψ_{E}^{⊆} is chosen to give μ_{E}(Φ)).

Let σ be a type, N ∈ SAT_{σ} and s ∈ Φ_{σ}(N) → N. We have to show that

C_{μαρ}mtE_{μ}σs ∈ N .

Because N is saturated it suffices to show

s(m(μαρ)σ(λx^{μαρ}.xE_{μ}σs)t) ∈ N .

Because of (→-E) for saturated sets it suffices to show

m(μαρ)σ(λx^{μαρ}.xE_{μ}σs)t ∈ Φ_{σ}(N).

By definition^{24} of Φ_{m}^{⊇}(M′) it suffices to show

λx^{μαρ}.xE_{μ}σs ∈ M′ → N .

We use (→-I). Let r′ ∈ M′. We have to show

r′E_{μ}σs ∈ N .

This follows from M′ ⊆ Ψ_{E}(M) ⊆ M_{E}(M). We come to the case which needs the extended form of induction. Let s ∈ Φ_{μαρ×σ}(M×N) → N. We have to show

C_{μαρ}mtE_{μ}^{+}σs ∈ N .

By saturatedness of N it suffices to show

s(m(μαρ)(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩)t) ∈ N .

Because of (→-E) it suffices to show

m(μαρ)(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩)t ∈ Φ_{μαρ×σ}(M × N).

By definition of Φ_{m}^{⊇}(M′) it suffices to show

λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩ ∈ M′ → M × N .

We use (→-I). Let r′ ∈ M′. We have to show

⟨r′, (λx^{μαρ}.xE_{μ}^{+}σs)r′⟩ ∈ M × N .

By (×-I) it suffices to show

r′ ∈ M and (λx^{μαρ}.xE_{μ}^{+}σs)r′ ∈ N .

Because N is saturated and M′ ⊆ M (this argument needs the extension of induction), we only need to show

r′E_{μ}^{+}σs ∈ N .

This follows again from M′ ⊆ Ψ_{E}(M) ⊆ M_{E}(M). _{□} Note that we only used that μ_{I}(Φ) is a least pre-fixed-point. Putting everything together we get the following rules for reasoning with μ_{I}(Φ) and μ_{E}(Φ) where we simply write μ(Φ) for both of them:

24This would not work if in the definition of Φ_{m}^{⊇}(M′) the closure operation would have been used to finally give a saturated set. Therefore locally the realm of saturated sets is left. A formalization in a theory of saturated sets is nevertheless possible because we may view the definition of Φ_{m}^{⊇}(M′) as an abbreviation like classes are seen as abbreviations in set theory. In contrast to that taking the closure would correspond to set comprehension.

(SAT) μ(Φ) ∈ SAT_{μαρ}.

(μ-I) If m ∈ ∀P∀Q.(P → Q) → Φ(P) → Φ(Q) and t ∈ Φ_{μαρ}(μ(Φ)), then C_{μαρ}mt ∈ μ(Φ).

(μ-E) If r ∈ μ(Φ), σ type, N ∈ SAT_{σ} and s ∈ Φ_{σ}(N) → N, then rE_{μ}σs ∈ N.

(μ-E^{+}) If r ∈ μ(Φ), σ type, N ∈ SAT_{σ} and s ∈ Φ_{μαρ×σ}(μ(Φ) × N) → N, then rE_{μ}^{+}σs ∈ N.

Computability predicates for EMIT

Extend (as for MeIT–it and coMeIT–it) the definition of SC_{ρ}[α⃗ := P⃗] by the following clause:

(μ) SC_{μαρ}[α⃗ := P⃗] := μ(Φ) with Φ = (Φ_{σ})_{σ}, where Φ_{σ} : SAT_{σ} → SAT_{ρ[α⃗,α:=σ⃗,σ]} is defined by Φ_{σ}(P) := SC_{ρ}[α⃗, α := P⃗, P] (with the same assumptions as in the definition of strong computability for universal types in order to guarantee type-correctness).

The definition will again be written more intuitively as follows:

SC_{μαρ}[α⃗ := P⃗] := μP.SC_{ρ}[α⃗, α := P⃗, P].

It is obvious that coincidence and substitution lemma (Lemma 9.13 and Lemma 9.14) extend to EMIT^{25}. Now we extend Lemma 9.16 to EMIT:

Lemma 9.69 Let r^{ρ} be a term, xρ⃗ a list of variables and s⃗ an equally long list of terms such that s⃗ ∈ SCρ⃗[α⃗ := P⃗σ⃗] for some P⃗ ⊆ SAT. Assume that

∀x∀π∀π′.(x^{π}, x^{π′} ∈ FV(r) ∪ xρ⃗) ∧ (π[α⃗ := σ⃗] = π′[α⃗ := σ⃗]) ⇒ π = π′.

Then r[α⃗ := σ⃗][x^{ρ⃗[α⃗:=σ⃗]} := s⃗] ∈ SC_{ρ}[α⃗ := P⃗].

Proof Induction on r. Again abbreviate r[α⃗ := σ⃗][x^{ρ⃗[α⃗:=σ⃗]} := s⃗] by r′ (for any term r). The assumption in the statement will again be referenced to as “injectivity”. We only have to consider the rules (μ-I), (μ-E) and (μ-E^{+}). (μ-I) Case C_{μαρ}mt. (C_{μαρ}mt)′ = C_{μαρ[α⃗:=σ⃗]}m′t′. We may assume that α ∉ α⃗. We have to show C_{μαρ[α⃗:=σ⃗]}m′t′ ∈ SC_{μαρ}[α⃗ := P⃗]. By the rule (μ-I) for saturated sets it suffices to show

m′ ∈ ∀P∀Q.(P → Q) → SC_{ρ}[α⃗, α := P⃗, P] → SC_{ρ}[α⃗, α := P⃗, Q] and
t′ ∈ SC_{ρ}[α⃗, α := P⃗, SC_{μαρ}[α⃗ := P⃗]].

Because FV(C_{μαρ}mt) = FV(m) ∪ FV(t), injectivity holds trivially also for m and t. By induction hypothesis m′ ∈ SC_{∀α∀β.(α→β)→ρ→ρ[α:=β]}[α⃗ := P⃗] and t′ ∈ SC_{ρ[α:=μαρ]}[α⃗ := P⃗]. By two applications of the coincidence lemma (which for system F is Lemma 9.13) and the equivalent to Corollary 9.15 (stated for F) we see that

SC_{∀α∀β.(α→β)→ρ→ρ[α:=β]}[α⃗ := P⃗] = ∀P∀Q.(P → Q) → SC_{ρ}[α⃗, α := P⃗, P] → SC_{ρ}[α⃗, α := P⃗, Q] (one of the applications even needs the generalization which is in fact proved). By the substitution lemma (which for system F is Lemma 9.14) we have

25See the discussion for MeIT–it.

SC_{ρ[α:=μαρ]}[α⃗ := P⃗] = SC_{ρ}[α⃗, α := P⃗, SC_{μαρ}[α⃗ := P⃗]].

(μ-E) Case rE_{μ}σs. This is only a minor variant to the following (μ-E^{+}) and therefore not shown. (μ-E^{+}) Case rE_{μ}^{+}σs. (rE_{μ}^{+}σs)′ = r′E_{μ}^{+}(σ[α⃗ := σ⃗])s′. We have to show that

r′E_{μ}^{+}σ[α⃗ := σ⃗]s′ ∈ SC_{σ}[α⃗ := P⃗].

Use (μ-E^{+}) for saturated sets. Show that r′ ∈ SC_{μαρ}[α⃗ := P⃗] and that

s′ ∈ SC_{ρ}[α⃗, α := P⃗, SC_{μαρ}[α⃗ := P⃗] × SC_{σ}[α⃗ := P⃗]] → SC_{σ}[α⃗ := P⃗].

Injectivity holds for r and s because FV(r), FV(s) ⊆ FV(rE_{μ}^{+}σs). Therefore by induction hypothesis r′ ∈ SC_{μαρ}[α⃗ := P⃗] and s′ ∈ SC_{ρ[α:=μαρ×σ]→σ}[α⃗ := P⃗]. Because we may assume α ∉ α⃗ the substitution lemma gives the desired result. _{□}

As before we get as corollaries that SN = Λ, that every term is strongly normalizing, that Ω is a normalizing function and that there is no closed term of type 0. Note that one could have also defined Φ_{σ}^{⊆} : SAT_{σ} → SAT_{ρ[α:=σ]} via

Φ_{σ}^{⊆}(N) := cl_{ρ[α:=σ]}({r ∈ Λ_{ρ[α:=σ]}|∃m ∈ ∀P∀Q.(P → Q) → Φ(P) → Φ(Q)
∃τ∃M ∈ SAT_{τ} ∃s ∈ M → N ∃t ∈ Φ_{τ} (M).r = mτσst})

Every proof concerning Φ^{⊆} would go through without any changes (the new Φ^{⊆} is typewise larger than the former but still smaller than Φ). But the former definition is more informative because it shows that only μαρ is relevant as first argument to m (which is not too surprising). We also could replace the definition of Φ_{m}^{⊇}(M) by a definition of

Φ^{⊇}(M) : SAT_{μαρ} → Pow(SN_{ρ[α:=μαρ]})

(without the parameter m) via

Φ^{⊇}(M) := {t ∈ SN_{ρ[α:=μαρ]}|∀m ∈ ∀P∀Q.(P → Q) → Φ(P) → Φ(Q)
∀σ∀N ∈ SAT_{σ}∀s ∈ M → N .m(μαρ)σst ∈ Φ_{σ}(N)}

The proof with Φ^{⊇}(M) instead of Φ_{m}^{⊇}(M) would also go through without explicit changes because the universal m may always be instantiated to the existential m in the proof of Lemma 9.68. (Note that Φ^{⊇} is smaller than Φ_{m}^{⊇} for every appropriate m but still larger than Φ.)

Acknowledgement: I owe the definition of Φ^{⊆} to [Alt93c] where a version without the closure and with a fixed monotonicity witness and untyped terms in the saturated sets is defined.

9.5.2 Strong normalization of varEMIT

We try to extend the proof for EMIT in order to cover varEMIT. We first have to replace

m ∈ ∀P∀Q.(P → Q) → Φ(P) → Φ(Q) by m ∈ ∀Q.(M → Q) → Φ_{μαρ}(M) → Φ(Q)

in the definitions of M_{I}(M), Φ^{⊇}(M)^{26},Φ_{σ}^{⊆}(N) and M_{I}^{⊇}(M) and remove the first argument to m (the removal of which only type-checks because this argument is always μαρ). In the definition of Φ_{σ}^{⊆}(N) we also have to put the existential over m inside the scope of the existential over M. Although these definitions make sense there is no chance to get monotonicity of Ψ_{I}^{⊇}. But Ψ_{E}^{⊆} is monotone and therefore we may expect the elimination-based proof for EMIT to carry over to varEMIT. That this expectation is justified will be shown in appendix A. Essentially using the general idea of defining Ψ_{I}^{⊇} as a monotone operator being pointwise larger than Ψ_{I} presented in the introduction to chapter 6 we also give an introduction-based proof in that appendix. Here only the definition of μ_{E}(Φ) and μ_{I}(Φ) are shown. Fix λαρ. Let Φ := (Φ_{τ})_{τ} be a family of mappings Φ_{τ} : SAT_{τ} → SAT_{ρ[α:=τ]}. Define Φ^{⊆} := (Φ_{σ}^{⊆})_{σ} with

26We clearly have to use Φ^{⊇}(M) considered at the end of the proof for EMIT instead of Φ_{m}^{⊇}(M).

Φ_{σ}^{⊆} : SAT_{σ} → SAT_{ρ[α:=σ]}

via

Φ_{σ}^{⊆}(N) := cl_{ρ[α:=σ]}({r ∈ Λ_{ρ[α:=σ]}|∃M ∈ SAT_{μαρ}∃m ∈ ∀Q.(M → Q) → Φ_{μαρ}(M) → Φ(Q)
∃s ∈ M → N ∃t ∈ Φ_{μαρ}(M).r = mσst})

Φ_{σ}^{⊆} is monotone (even strictly positive) and Φ_{σ}^{⊆} ⊆ Φ_{σ} (pointwise) because of the rules (∀-E) and (→-E) for saturated sets. Define for M ∈ SAT_{μαρ}

M_{I}^{⊇}(M) := {r ∈ Λ_{μαρ}|∃M′ ∈ SAT_{μαρ}.M′ ⊆ M∧
∃m ∈ ∀Q.(M′ → Q) → Φ_{μαρ}(M′) → Φ(Q)∃t ∈ Φ_{μαρ}(M′).r = C_{μαρ}mt}
M_{E}^{⊆}(M) := {r ∈ Λ_{μαρ}|∀σ∀N ∈ SAT_{σ}.∀s ∈ Φ_{σ}(N) → N rE_{μ}σs ∈ N ∧
∀s ∈ Φ_{μαρ×σ}^{⊆}(M × N) → N rE_{μ}^{+}σs ∈ N }

and set

μ_{I}(Φ) := the least fixed point of Ψ_{I}^{⊇} : SAT_{μαρ} → SAT_{μαρ},

defined by

Ψ_{I}^{⊇}(M) := cl_{μαρ}(M_{I}^{⊇}(M))

and set

μ_{E}(Φ) := any fixed point of Ψ_{E}^{⊆} : SAT_{μαρ} → SAT_{μαρ},

defined by

Ψ_{E}^{⊆}(M) := cl_{μαρ}(M_{E}^{⊆}(M)).

Because Ψ_{I} and Ψ_{E} are monotone (Ψ_{I} is even strictly positive and Ψ_{E} non-strictly positive) and SAT_{μαρ} is a complete lattice, the fixed points exists. Hence, μ_{I}(Φ) and μ_{E}(Φ) are μαρ-saturated sets. See appendix A for all the details leading to SN = Λ and discussion of the failure of the generalization of the introduction-based proof for EMIT.

9.5.3 Strong normalization of IMIT

We may easily transform the normalization proof for EMIT given in section 9.5.1 to yield a normalization proof for IMIT. We only have to adjust the definition of saturated sets and the closure operation to the different definition of SN and then define the construction of μ_{I}(Φ) and μ_{E}(Φ) as before except that the reference to the monotonicity witness moves from M_{I}(M) to M_{E}(M) and from M_{I}^{⊇}(M) to M_{E}^{⊆}(M) (the quantifier changes from ∃ to ∀) and that the parameter m in Φ_{m}^{⊇} has to be internalized (by universal quantification) to give Φ^{⊇} and the existentially quantified m inside Φ_{σ}^{⊆} is made a parameter to yield Φ_{m,σ}^{⊆}. Only the definition of μ_{I}(Φ) and μ_{E}(Φ) will be shown here. For the other definitions and all the proofs see appendix A. Fix λαρ. Let Φ := (Φ_{τ})_{τ} be a family of mappings Φ_{τ} : SAT_{τ} → SAT_{ρ[α:=τ]}. Define

Φ^{⊇} : SAT_{μαρ} → Pow(SN_{ρ[α:=μαρ]})

via

Φ^{⊇}(M) := {t ∈ SN_{ρ[α:=μαρ]}|∀m ∈ ∀P∀Q.(P → Q) → Φ(P) → Φ(Q)
∀σ∀N ∈ SAT_{σ}∀s ∈ M → N .m(μαρ)σst ∈ Φ_{σ}(N)}

and for m ∈ ∀P∀Q.(P → Q) → Φ(P) → Φ(Q) define Φ_{m}^{⊆} := (Φ_{m,σ}^{⊆})_{σ} with

Φ_{m,σ}^{⊆} : SAT_{σ} → SAT_{ρ[α:=σ]}

via

Φ_{m,σ}^{⊆}(N) := cl_{ρ[α:=σ]}({r ∈ Λ_{ρ[α:=σ]}|∃M ∈ SAT_{μαρ}∃s ∈ M → N ∃t ∈ Φ_{μαρ}(M).
r = m(μαρ)σst})

Φ^{⊇} and Φ_{m,σ}^{⊆} are monotone. Define for M ∈ SAT_{μαρ}

M_{I}^{⊇}(M) := {r ∈ Λ_{μαρ}|∃t ∈ Φ^{⊇}(M).r = C_{μαρ}t}
M_{E}^{⊆}(M) := {r ∈ Λ_{μαρ}|∀m ∈ ∀P∀Q.(P → Q) → Φ(P) → Φ(Q)∀σ∀N ∈ SAT_{σ}
∀s ∈ Φ_{σ}(N) → N rE_{μ}σms ∈ N ∧ ∀s ∈ Φ_{m,μαρ×σ}^{⊆}(M × N) → N rE_{μ}^{+}σms ∈ N }

and set

μ_{I}(Φ) := the least fixed point of Ψ_{I}^{⊇} : SAT_{μαρ} → SAT_{μαρ},

defined by

Ψ_{I}^{⊇}(M) := cl_{μαρ}(M_{I}^{⊇}(M))

and

μ_{E}(Φ) := any fixed point of Ψ_{E}^{⊆} : SAT_{μαρ} → SAT_{μαρ},

defined by

Ψ_{E}^{⊆}(M) := cl_{μαρ}(M_{E}^{⊆}(M)).

Because Ψ_{I} and Ψ_{E} are monotone (they are even non-strictly positive) and SAT_{μαρ} is a complete lattice, such fixed points exists. Hence, μ_{I}(Φ) and μ_{E}(Φ) are μαρ-saturated sets. In appendix A it will be shown that in fact the proof of SN = Λ given for EMIT goes through without changes to the content of it. Clearly, this reflects that β-reduction for μ-types only applies if the introduction and the elimination rule come together and then the monotonicity witness is used in the same way for EMIT and for IMIT.

9.5.4 Strong normalization of varIMIT

Extend the proof for IMIT to varIMIT by refining it in the same spirit as the proof for EMIT is refined to cover varEMIT. This time only the introduction-based approach directly generalizes. For the elimination-based definition another idea has to be adopted: We essentially use the general method of defining Ψ_{E}^{⊆} as a monotone operator being pointwise smaller than Ψ_{E} presented in the introduction to chapter 6. Here only the definitions which show the construction of μ_{I}(Φ) and μ_{E}(Φ) are shown. All the details may be found in appendix A.

Fix λαρ. Let Φ := (Φ_{τ})_{τ} be a family of mappings Φ_{τ} : SAT_{τ} → SAT_{ρ[α:=τ]}. Define

Φ^{⊇} : SAT_{μαρ} → Pow(SN_{ρ[α:=μαρ]})

via

Φ^{⊇}(M) := {t ∈ SN_{ρ[α:=μαρ]}|∀σ∀N ∈ SAT_{σ}∀m ∈ ∀P.(P → N) → Φ(P) → Φ_{σ}(N)
∀s ∈ M → N .m(μαρ)st ∈ Φ_{σ}(N)}

Φ^{⊇} is monotone (even non-strictly positive) and Φ^{⊇} ⊇ Φ_{μαρ} (pointwise) because of the rules (∀-E) and (→-E) for saturated sets. Define for M ∈ SAT_{μαρ}

M_{I}^{⊇}(M) := {r ∈ Λ_{μαρ}|∃t ∈ Φ^{⊇}(M).r = C_{μαρ}t}
M_{E}^{⊆}(M) := {r ∈ Λ_{μαρ}|∀σ∀N ∈ SAT_{σ}
∀m ∈ ∀P.(P → N) → Φ(P) → Φ_{σ}(N)
∀s ∈ Φ_{σ}(N) → N rE_{μ}σms ∈ N ∧
∀M′ ∈ SAT_{μαρ}.M ⊆ M′ ⇒
∀m ∈ ∀P.(P → M′ × N) → Φ(P) → Φ_{μαρ×σ}(M′ × N)
∀s ∈ Φ_{μαρ×σ}(M′ × N) → N rE_{μ}^{+}σms ∈ N }

and set

μ_{I}(Φ) := the least fixed point of Ψ_{I}^{⊇} : SAT_{μαρ} → SAT_{μαρ},

defined by

Ψ_{I}^{⊇}(M) := cl_{μαρ}(M_{I}^{⊇}(M))

and

μ_{E}(Φ) := any fixed point of Ψ_{E}^{⊆} : SAT_{μαρ} → SAT_{μαρ},

defined by

Ψ_{E}^{⊆}(M) := cl_{μαρ}(M_{E}^{⊆}(M)).

Because Ψ_{I} and Ψ_{E} are monotone (they are even non-strictly positive) and SAT_{μαρ} is a complete lattice, such fixed points exists. Hence, μ_{I}(Φ) and μ_{E}(Φ) are μαρ-saturated sets. See appendix A for all the details leading to SN = Λ and discussion of the failure of the generalization of the elimination-based proof for IMIT.

9.6 Strong normalization of the other systems

In chapter 7 all the embeddings claimed in the main theorem in chapter 1 have been proved. Hence every system embeds into any of the systems in class III. Therefore due to Lemma 2.49 we only needed to prove strong normalization for one of those, e. g. for MeIT–it, and this has been done in this chapter twice: with the help of introduction-based computability predicates and with elimination-based such predicates. The embeddings only show that every term is in sn. But it has been always easy to prove that sn ⊆ SN and hence we also get the induction principle of SN and because SN ⊆ WN also the induction principle of WN which allows to define the normalization function Ω. Also Corollary 2.43 (concerning the Peirce formula) may be proved in all of the systems with the same proof (as was the case for Lemma 2.37 and 2.46 expressing consistency).

Although we now know strong normalization of PIT by indirect means it is interesting to think of a direct proof. It would work as indicated in the footnote 14 on p. 129: For the construction of the fixed points μ_{I}(Φ) and μ_{E}(Φ) one would require that every Φ_{τ} be monotone. This monotonicity has to be preserved by any of the constructions and hence one would be forced to take the least or greatest fixed point in the elimination-based approach. The essential lemmas which say that μ_{I}(Φ) is a post-fixed-point of Ψ_{E} and that μ_{E}(Φ) is a pre-fixed-point of Ψ_{I} can only be proved under the assumption that already map_{λαρ} ∈ ∀P∀Q.(P → Q) → Φ(P) → Φ(Q). The definition of computability predicates would be done simultaneously with the proof that the function P ↦ SC_{ρ}[α⃗, α := P⃗, P] is monotone for α ∈ Pos(ρ) and antitone for α ∈ Neg(ρ) which of course needs the preservation of monotonicity of the construction of μ_{E}(Φ). The final soundness lemma (stating strong computability under substitution) cannot be proved by structural recursion because of the assumptions on map_{λαρ} in the crucial lemmas. If μ_{I}(Φ) is used, the proof goes by induction on the set ST of stratified terms of ISMIT (of which PIT is an instance) and in case μ_{E}(Φ) is chosen, induction on ST of ESMIT works. For NIPIT a direct proof would be a lot easier: Because there is no interleaving, μ_{E}(Φ) need not be monotone in Φ. Hence, we may take any fixed point of Ψ_{E} as usual. The definition of computability predicates would be done simultaneously with the proof that the function P ↦ SC_{ρ}[α⃗, α := P⃗, P] is monotone for α ∈ NIPos(ρ) and antitone for α ∈ NINeg(ρ) and constant if α ∉ FV(ρ) (this already includes the coincidence lemma). Although the crucial lemmas have the same condition as in the proof for PIT, no reference to ST is needed because map_{λαρ} does not use the term rules pertaining to μ-types: Simply show the soundness lemma first for terms without the rules (μ-I), (μ-E) and (μ-E^{+}) and then for all terms by reusing the proof clauses for the other term rules. I decided to show the other direct proofs because they give a lot of insight into the techniques of proving strong normalization and into ways of dealing with monotonicity beyond positivity. Moreover, the extracted embeddings deserve the reader’s attention.

150 CHAPTER 9. STRONG NORMALIZATION

Appendix A

Other proofs of strong normalization

In this appendix direct proofs of strong normalization are studied for the systems varEMIT, IMIT and varIMIT. Also the extracted embeddings are given. In the final section some remarks on the different methods of monotonization are made and it is sketched how the embeddings of monotone inductive types into MePIT and coMePIT could be drawn from normalization proofs.

A.1 Proof of strong normalization for varEMIT

This section contains the elimination-based proof for varEMIT which is only a minor variant to the proof for EMIT. The introduction-based proof could not directly be generalized to varEMIT. But an introduction-based proof following the general idea of strict positivization already used for MeIT–it is also presented. Extend the definition of SN for system eF by the expected clauses:

(μ-I) If C_{μαρ}mt is a term and m ∈ SN and t ∈ SN, then C_{μαρ}mt ∈ SN.

(β_{μ}) If s(mσ(λx^{μαρ}.xE_{μ}σs)t)s⃗ ∈ SN, x^{μαρ} ∉ FV(s) and (C_{μαρ}mt)E_{μ}σss⃗ is a term, then

(C_{μαρ}mt)E_{μ}σss⃗ ∈ SN.

(β_{μ}^{+}) If s(m(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩)t)s⃗ ∈ SN, x^{μαρ} ∉ FV(s) and the

expression (C_{μαρ}mt)E_{μ}^{+}σss⃗ is a term, then (C_{μαρ}mt)E_{μ}^{+}σss⃗ ∈ SN.

Lemma A.1 If m ∈ sn and t ∈ sn, then C_{μαρ}mt ∈ sn.

Proof Induction on m ∈ sn and t ∈ sn. _{□}

Lemma A.2 If s(mσ(λx^{μαρ}.xE_{μ}σs)t)s⃗ ∈ sn, x^{μαρ} ∉ FV(s) and (C_{μαρ}mt)E_{μ}σss⃗ is a term, then (C_{μαρ}mt)E_{μ}σss⃗ ∈ sn.

Proof Induction on s(mσ(λx^{μαρ}.xE_{μ}σs)t)s⃗ ∈ sn^{+} by the usual analysis of the reducts of (C_{μαρ}mt)E_{μ}σss⃗. (Note that we need sn^{+} because s occurs twice in the canonical reduct of (C_{μαρ}mt)E_{μ}σss⃗.) _{□}

Lemma A.3 If s(m(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩)t)s⃗ ∈ sn, x^{μαρ} ∉ FV(s) and the expression (C_{μαρ}mt)E_{μ}^{+}σss⃗ is a term, then (C_{μαρ}mt)E_{μ}^{+}σss⃗ ∈ sn.

Proof Induction on s(m(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩)t)s⃗ ∈ sn^{+} by analysis of the reducts of (C_{μαρ}mt)E_{μ}^{+}σss⃗. (Note that we need sn^{+} because s occurs twice in the canonical reduct of (C_{μαρ}mt)E_{μ}^{+}σss⃗.) _{□}

Corollary A.4 SN ⊆ sn.

Proof The same as for Lemma 9.6. _{□}

A.1.1 Saturated sets for varEMIT

Extend the definition for system eF of M being a τ-saturated set by the following clause:

(β_{μ}) If s(mσ(λx^{μαρ}.xE_{μ}σs)t)s⃗ ∈ M, x^{μαρ} ∉ FV(s) and (C_{μαρ}mt)E_{μ}σss⃗ is a term, then

(C_{μαρ}mt)E_{μ}σss⃗ ∈ M.

(β_{μ}^{+}) If s(m(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩)t)s⃗ ∈ M, x^{μαρ} ∉ FV(s) and the

expression (C_{μαρ}mt)E_{μ}^{+}σss⃗ is a term, then (C_{μαρ}mt)E_{μ}^{+}σss⃗ ∈ M.

Extend the definition of the τ-saturated closure cl_{τ} (M) accordingly by the clause

(β_{μ}) If s(mσ(λx^{μαρ}.xE_{μ}σs)t)s⃗ ∈ cl_{τ} (M), x^{μαρ} ∉ FV(s) and (C_{μαρ}mt)E_{μ}σss⃗ is a term,

then (C_{μαρ}mt)E_{μ}σss⃗ ∈ cl_{τ} (M).

(β_{μ}^{+}) If s(m(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩)t)s⃗ ∈ cl_{τ} (M), x^{μαρ} ∉ FV(s) and

(C_{μαρ}mt)E_{μ}^{+}σss⃗ is a term, then (C_{μαρ}mt)E_{μ}^{+}σss⃗ ∈ cl_{τ} (M).

Again cl_{τ} (M) is the smallest τ-saturated set containing M ∩ SN_{τ}.

A.1.2 Calculating with saturated sets for varEMIT

Fix λαρ. Let Φ := (Φ_{τ})_{τ} be a family of mappings Φ_{τ} : SAT_{τ} → SAT_{ρ[α:=τ]}. Define for M ∈ SAT_{μαρ}

M_{I}(M) := {r ∈ Λ_{μαρ}|∃m ∈ ∀Q.(M → Q) → Φ_{μαρ}(M) → Φ(Q)∃t ∈ Φ_{μαρ}(M).r = C_{μαρ}mt}
M_{E}(M) := {r ∈ Λ_{μαρ}|∀σ∀N ∈ SAT_{σ}.∀s ∈ Φ_{σ}(N) → N rE_{μ}σs ∈ N ∧
∀s ∈ Φ_{μαρ×σ}(M × N) → N rE_{μ}^{+}σs ∈ N }

and define Ψ_{I} : SAT_{μαρ} → SAT_{μαρ} by

Ψ_{I}(M) := cl_{μαρ}(M_{I}(M))

and Ψ_{E} : SAT_{μαρ} → SAT_{μαρ} by

Ψ_{E}(M) := cl_{μαρ}(M_{E}(M)).

We again cannot ensure Ψ_{I} or Ψ_{E} to be monotone. In order to overcome this problem we define (with Pow denoting the power set)

Φ^{⊇} : SAT_{μαρ} → Pow(SN_{ρ[α:=μαρ]})

via

Φ^{⊇}(M) := {t ∈ SN_{ρ[α:=μαρ]}|∀m ∈ ∀Q.(M → Q) → Φ_{μαρ}(M) → Φ(Q)
∀σ∀N ∈ SAT_{σ}∀s ∈ M → N .mσst ∈ Φ_{σ}(N)}

and Φ^{⊆} := (Φ_{σ}^{⊆})_{σ} with

Φ_{σ}^{⊆} : SAT_{σ} → SAT_{ρ[α:=σ]}

via

Φ_{σ}^{⊆}(N) := cl_{ρ[α:=σ]}({r ∈ Λ_{ρ[α:=σ]}|∃M ∈ SAT_{μαρ}∃m ∈ ∀Q.(M → Q) → Φ_{μαρ}(M) → Φ(Q)
∃s ∈ M → N ∃t ∈ Φ_{μαρ}(M).r = mσst})

Φ^{⊇} is presumably not monotone (in general). Φ^{⊇} ⊇ Φ_{μαρ} (pointwise) because of the rules (∀-E) and (→-E) for saturated sets. Φ_{σ}^{⊆} is monotone (even strictly positive) and Φ_{σ}^{⊆} ⊆ Φ_{σ} (pointwise) also because of the rules (∀-E) and (→-E) for saturated sets. (Note that already the set which is the argument to cl_{ρ[α:=σ]} is a subset of Φ_{σ}(M) and therefore also Φ_{σ}^{⊆}(M) because Φ_{σ}(M) is saturated.) Define for M ∈ SAT_{μαρ}

M_{I}^{⊇}(M) := {r ∈ Λ_{μαρ}|∃m ∈ ∀Q.(M → Q) → Φ_{μαρ}(M) → Φ(Q)∃t ∈ Φ^{⊇}(M).r = C_{μαρ}mt}
M_{E}^{⊆}(M) := {r ∈ Λ_{μαρ}|∀σ∀N ∈ SAT_{σ}.∀s ∈ Φ_{σ}(N) → N rE_{μ}σs ∈ N ∧
∀s ∈ Φ_{μαρ×σ}^{⊆}(M × N) → N rE_{μ}^{+}σs ∈ N }

and define

Ψ_{I}^{⊇} : SAT_{μαρ} → SAT_{μαρ},

by

Ψ_{I}^{⊇}(M) := cl_{μαρ}(M_{I}^{⊇}(M))

and set

μ_{E}(Φ) := any fixed point of Ψ_{E}^{⊆} : SAT_{μαρ} → SAT_{μαρ},

defined by

Ψ_{E}^{⊆}(M) := cl_{μαρ}(M_{E}^{⊆}(M)).

Because Ψ_{E} is monotone (it is even non-strictly positive) and SAT_{μαρ} is a complete lattice, the fixed point exists. Hence, μ_{E}(Φ) is a μαρ-saturated set. Ψ_{I}^{⊇} cannot be monotone in general (not only the problem with Φ^{⊇} propagates but also M_{I}^{⊇}(M)’s definition has several critical occurrences of M). The definitions of Φ^{⊇}, M_{I}^{⊇}(M) and Ψ_{I}^{⊇} are thus useless. Φ^{⊇} will not be used any further and M_{I}^{⊇}(M) and Ψ_{I}^{⊇} are redefined in the following way:

M_{I}^{⊇}(M) := {r ∈ Λ_{μαρ}|∃M′ ∈ SAT_{μαρ}.M′ ⊆ M∧
∃m ∈ ∀Q.(M′ → Q) → Φ_{μαρ}(M′) → Φ(Q)∃t ∈ Φ_{μαρ}(M′).r = C_{μαρ}mt}
Ψ_{I}^{⊇}(M) := cl_{μαρ}(M_{I}^{⊇}(M))

Ψ_{I}^{⊇} is monotone (even strictly positive) and trivially, Ψ_{I}^{⊇} ⊇ Ψ_{I} (pointwise). We may now form

μ_{I}(Φ) := the least fixed point of Ψ_{I}^{⊇},

which therefore is also a pre-fixed-point of Ψ_{I}. An analysis of the definition of μ_{I}(Φ) gives the following encoding (for “new” β and γ):

(μαρ)′ := μβ∃α.(α → β) × (∀γ.(α → γ) → ρ′ → ρ′[α := γ]) × ρ′.

An embedding of varEMIT into NISPIT+ex may now be read off the proofs that μ_{I}(Φ) is a pre-fixed-point of Ψ_{I} and that μ_{I}(Φ) is a post-fixed-point of Ψ_{E}^{1} which are given below. It is possible to show that this indeed gives an embedding.

1In fact we prove that μ_{I}(Φ) is a post-fixed-point of Ψ_{E}^{⊆} but the proof of the weaker statement has exactly the same combinatorial content.

The elimination-based approach presumably gives a quite complicated embedding into noninterleaving positive fixed-point types based on (μαρ)′ := μ̂α∀β.((ρ′[α := β] → β) → β)×

(((∃γ.(∀δ.(γ → δ) → ρ′[α := γ] → ρ′[α := δ]) × (γ → α × β) × ρ′[α := γ]) → β) → β)

with “new” β, γ and δ^{2}.

Lemma A.5 M_{E}(M) ∩ SN ∈ SAT and M_{E}^{⊆}(M) ∩ SN ∈ SAT (which implies that Ψ_{E}(M) = M_{E}(M) ∩ SN and Ψ_{E}^{⊆}(M) = M_{E}^{⊆}(M) ∩ SN).

Proof Straightforward. _{□}

Lemma A.6 M_{I}(M) ⊆ SN and M_{I}^{⊇}(M) ⊆ SN (which implies that Ψ_{I}(M) ⊇ M_{I}(M) and Ψ_{I}^{⊇}(M) ⊇ M_{I}^{⊇}(M)). _{□}

Lemma A.7 Let M be a μαρ-saturated set M. M is a pre-fixed-point of Ψ_{I} iff for all m ∈ ∀Q.(M → Q) → Φ_{μαρ}(M) → Φ(Q) and for all t ∈ Φ_{μαρ}(M), we have that C_{μαρ}mt ∈ M. M is a post-fixed-point of Ψ_{E} iff for all r ∈ M, types σ, N ∈ SAT_{σ} and s ∈ Φ_{σ}(N) → N, we have rE_{μ}σs ∈ N and for all s ∈ Φ_{μαρ×σ}(M × N) → N, rE_{μ}^{+}σs ∈ N.

Proof Use the two preceding lemmas. _{□}

Lemma A.8 Every post-fixed-point of Ψ_{E}^{⊆} is also a post-fixed-point of Ψ_{E}.

Proof Let M be a post-fixed-point of Ψ_{E}^{⊆}. Hence

M ⊆ Ψ_{E}^{⊆}(M) ⊆ Ψ_{E}(M),

which clearly follows from Φ^{⊆} ⊆ Φ (typewise) because M_{E}(M) and M_{E}^{⊆}(M) have the same definition with exception of the occurrence of Φ_{μαρ×σ} and Φ_{μαρ×σ}^{⊆}, respectively, which is at a non-strictly positive position. _{□}

Lemma A.9 μ_{E}(Φ) is a pre-fixed-point of Ψ_{I}^{⊇}.

Proof We have to show that

Ψ_{I}^{⊇}(μ_{E}(Φ)) ⊆ μ_{E}(Φ).

Because μ_{E}(Φ) is a pre-fixed-point of Ψ_{E}^{⊆}, it suffices to show

Ψ_{I}^{⊇}(μ_{E}(Φ)) ⊆ Ψ_{E}^{⊆}(μ_{E}(Φ)).

Because cl_{μαρ} is monotone, it suffices to show

M_{I}^{⊇}(μ_{E}(Φ)) ⊆ M_{E}^{⊆}(μ_{E}(Φ)).

Let M ∈ SAT_{μαρ} with M ⊆ μ_{E}(Φ). Let m ∈ ∀Q.(M → Q) → Φ_{μαρ}(M) → Φ(Q) and t ∈ Φ_{μαρ}(M). We have to show

C_{μαρ}mt ∈ M_{E}^{⊆}(μ_{E}(Φ)).

2If we only had iteration then (μαρ)′ := ∀β.((ρ′[α := β] → β) → β) would be sufficient which is nothing but the composition of the embeddings of varEMIT–rec into IT and IT into eF.

Let σ be a type, N ∈ SAT_{σ} and s ∈ Φ_{σ}(N) → N. We have to show that

C_{μαρ}mtE_{μ}σs ∈ N .

Because N is saturated it suffices to show

s(mσ(λx^{μαρ}.xE_{μ}σs)t) ∈ N .

Because of (→-E) for saturated sets (in the sequel the named rules will always be those for saturated sets) it suffices to show

mσ(λx^{μαρ}.xE_{μ}σs)t ∈ Φ_{σ}(N).

By (∀-E) and (→-E) it suffices to show

λx^{μαρ}.xE_{μ}σs ∈ M → N .

We use (→-I). Let r ∈ M. We have to show

rE_{μ}σs ∈ N .

This follows from r ∈ M ⊆ μ_{E}(Φ) ⊆ Ψ_{E}^{⊆}(μ_{E}(Φ)) ⊆ M_{E}^{⊆}(μ_{E}(Φ)). We come to the case for which Ψ_{E}^{⊆} was designed, namely s ∈ Φ_{μαρ×σ}^{⊆}(μ_{E}(Φ) × N) → N. We have to show

C_{μαρ}mtE_{μ}^{+}σs ∈ N .

By saturatedness of N it suffices to show

s(m(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩)t) ∈ N .

Because of (→-E) it suffices to show

m(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩)t ∈ Φ_{μαρ×σ}^{⊆}(μ_{E}(Φ) × N).

According to the definition of Φ^{⊆} (the closure in the definition of Φ^{⊆} only makes the set larger) we are done if we show

λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩ ∈ M → μ_{E}(Φ) × N .

We use (→-I). Let r ∈ M. We have to show

⟨r, (λx^{μαρ}.xE_{μ}^{+}σs)r⟩ ∈ μ_{E}(Φ) × N .

By (×-I) and because M ⊆ μ_{E}(Φ) it suffices to show

(λx^{μαρ}.xE_{μ}^{+}σs)r ∈ N .

Because N is saturated, we only need to show

rE_{μ}^{+}σs ∈ N .

This follows again from r ∈ M ⊆ μ_{E}(Φ) ⊆ Ψ_{E}^{⊆}(μ_{E}(Φ)) ⊆ M_{E}^{⊆}(μ_{E}(Φ)). _{□} Note that we used from μ_{E}(Φ) the properties of being a pre-fixed-point and a post-fixed-point of Ψ_{E}^{⊆}. Note also that for the purposes of the normalization proof it would have been enough to show that μ_{E}(Φ) is a pre-fixed-point of Ψ_{I} instead of Ψ_{I}^{⊇}, but from the above result we even get the following

Corollary A.10 μ_{I}(Φ) ⊆ μ_{E}(Φ).

Proof μ_{I}(Φ) is the least pre-fixed-point of Ψ_{I}^{⊇}. _{□}

Lemma A.11 μ_{I}(Φ) is a post-fixed-point of Ψ_{E}^{⊆}.

Proof Set M := μ_{I}(Φ). We prove M ⊆ Ψ_{E}^{⊆}(M) by extended induction (as defined in the introduction to chapter 4) on M. Let M′ := Ψ_{E}^{⊆}(M) ∩ M. We have to show

Ψ_{I}^{⊇}(M′) ⊆ Ψ_{E}^{⊆}(M).

Because cl_{μαρ} is monotone, it suffices to show

M_{I}^{⊇}(M′) ⊆ M_{E}^{⊆}(M).

Let r ∈ M_{I}^{⊇}(M′), i. e., r = C_{μαρ}mt with m ∈ ∀Q.(M′′ → Q) → Φ(M′′) → Φ(Q) and t ∈ Φ_{μαρ}(M′′) with M′′ ∈ SAT_{μαρ} and M′′ ⊆ M′. We have to show that

C_{μαρ}mt ∈ M_{E}^{⊆}(M).

Let σ be a type, N ∈ SAT_{σ} and s ∈ Φ_{σ}(N) → N. We have to show that

C_{μαρ}mtE_{μ}σs ∈ N .

Because N is saturated it suffices to show

s(mσ(λx^{μαρ}.xE_{μ}σs)t) ∈ N .

Because of (→-E) for saturated sets it suffices to show

mσ(λx^{μαρ}.xE_{μ}σs)t ∈ Φ_{σ}(N).

By (∀-E) and (→-E) it suffices to show

λx^{μαρ}.xE_{μ}σs ∈ M′′ → N .

We use (→-I). Let r′ ∈ M′′. We have to show

r′E_{μ}σs ∈ N .

This follows from M′′ ⊆ M′ ⊆ Ψ_{E}^{⊆}(M) ⊆ M_{E}^{⊆}(M). We come to the case which needs the extended form of induction. Let s ∈ Φ_{μαρ×σ}^{⊆}(M×N) → N. We have to show

C_{μαρ}mtE_{μ}^{+}σs ∈ N .

By saturatedness of N it suffices to show

s(m(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩)t) ∈ N .

Because of (→-E) it suffices to show

m(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩)t ∈ Φ_{μαρ×σ}^{⊆}(M × N).

By definition of Φ^{⊆} (the closure in the definition of Φ^{⊆} only makes the set larger) it suffices to show

λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σs)x⟩ ∈ M′′ → M × N .

We use (→-I). Let r′ ∈ M′′. We have to show

⟨r′, (λx^{μαρ}.xE_{μ}^{+}σs)r′⟩ ∈ M × N .

By (×-I) it suffices to show

r′ ∈ M and (λx^{μαρ}.xE_{μ}^{+}σs)r′ ∈ N .

Because N is saturated and M′′ ⊆ M′ ⊆ M (this argument needs the extension of induction), we only need to show

r′E_{μ}^{+}σs ∈ N .

This follows again from M′′ ⊆ M′ ⊆ Ψ_{E}^{⊆}(M) ⊆ M_{E}^{⊆}(M). _{□}

Note that we only used that μ_{I}(Φ) is a least pre-fixed-point. Note also that for the purposes of the normalization proof it would have been enough to show that μ_{I}(Φ) is a post-fixed-point of Ψ_{E} instead of Ψ_{E}^{⊆}^{3}. Putting everything together we get the following rules for reasoning with μ_{I}(Φ) and μ_{E}(Φ) where we simply write μ(Φ) for both of them:

(SAT) μ(Φ) ∈ SAT_{μαρ}.

(μ-I) If m ∈ ∀Q.(μ(Φ) → Q) → Φ(μ(Φ)) → Φ(Q) and t ∈ Φ_{μαρ}(μ(Φ)), then C_{μαρ}mt ∈

μ(Φ).
(μ-E) If r ∈ μ(Φ), σ type, N ∈ SAT_{σ} and s ∈ Φ_{σ}(N) → N, then rE_{μ}σs ∈ N.

(μ-E^{+}) If r ∈ μ(Φ), σ type, N ∈ SAT_{σ} and s ∈ Φ_{μαρ×σ}(μ(Φ) × N) → N, then rE_{μ}^{+}σs ∈ N.

A.1.3 Computability predicates for varEMIT

Extend (as for MeIT–it and coMeIT–it) the definition of SC_{ρ}[α⃗ := P⃗] by the following clause:

(μ) SC_{μαρ}[α⃗ := P⃗] := μ(Φ) with Φ = (Φ_{σ})_{σ}, where Φ_{σ} : SAT_{σ} → SAT_{ρ[α⃗,α:=σ⃗,σ]} is defined by Φ_{σ}(P) := SC_{ρ}[α⃗, α := P⃗, P] (with the same assumptions as in the definition of strong computability for universal types in order to guarantee type-correctness).

The definition will again be written more intuitively as follows:

SC_{μαρ}[α⃗ := P⃗] := μP.SC_{ρ}[α⃗, α := P⃗, P].

It is obvious that coincidence and substitution lemma (Lemma 9.13 and Lemma 9.14) extend to varEMIT. Now we extend Lemma 9.16 to varEMIT:

3If the greatest fixed point is taken for μ_{E}(Φ), then also the preceding lemma implies that μ_{I}(Φ) ⊆ μ_{E}(Φ).

Lemma A.12 Let r^{ρ} be a term, xρ⃗ a list of variables and s⃗ an equally long list of terms such that s⃗ ∈ SCρ⃗[α⃗ := P⃗σ⃗] for some P⃗ ⊆ SAT. Assume that

∀x∀π∀π′.(x^{π}, x^{π′} ∈ FV(r) ∪ xρ⃗) ∧ (π[α⃗ := σ⃗] = π′[α⃗ := σ⃗]) ⇒ π = π′.

Then r[α⃗ := σ⃗][x^{ρ⃗[α⃗:=σ⃗]} := s⃗] ∈ SC_{ρ}[α⃗ := P⃗].

Proof Induction on r. Again abbreviate r[α⃗ := σ⃗][x^{ρ⃗[α⃗:=σ⃗]} := s⃗] by r′ (for any term r). The assumption in the statement will again be referenced to as “injectivity”. We only have to consider the rules (μ-I), (μ-E) and (μ-E^{+}). (μ-I) Case C_{μαρ}mt. (C_{μαρ}mt)′ = C_{μαρ[α⃗:=σ⃗]}m′t′. We may assume that α ∉ α⃗. We have to show C_{μαρ[α⃗:=σ⃗]}m′t′ ∈ SC_{μαρ}[α⃗ := P⃗]. By the rule (μ-I) for saturated sets it suffices to show

m′ ∈ ∀Q.(SC_{μαρ}[α⃗ := P⃗] → Q) → SC_{ρ}[α⃗, α := P⃗, SC_{μαρ}[α⃗ := P⃗]] → SC_{ρ}[α⃗, α := P⃗, Q] and

t′ ∈ SC_{ρ}[α⃗, α := P⃗, SC_{μαρ}[α⃗ := P⃗]].

Because FV(C_{μαρ}mt) = FV(m) ∪ FV(t), injectivity holds trivially also for m and t. By induction hypothesis m′ ∈ SC_{∀α.(μαρ→α)→ρ[α:=μαρ]→ρ}[α⃗ := P⃗] and t′ ∈ SC_{ρ[α:=μαρ]}[α⃗ := P⃗]. By two applications of the coincidence lemma (which for system F is Lemma 9.13) we see that

SC_{∀α.(μαρ→α)→ρ[α:=μαρ]→ρ}[α⃗ := P⃗] =
∀Q.(SC_{μαρ}[α⃗ := P⃗] → Q) → SC_{ρ[α:=μαρ]}[α⃗ := P⃗] → SC_{ρ}[α⃗, α := P⃗, Q].

By the substitution lemma (which for system F is Lemma 9.14) we have

SC_{ρ[α:=μαρ]}[α⃗ := P⃗] = SC_{ρ}[α⃗, α := P⃗, SC_{μαρ}[α⃗ := P⃗]].

(μ-E) and (μ-E^{+}): Trivially the same as for EMIT. _{□}

As for EMIT we get as corollaries that SN = Λ and that every term is strongly normalizing.

A.2 Proof of strong normalization for IMIT

This section contains the proof for IMIT which is only a minor variant to the proof for EMIT. Extend the definition of SN for system eF by the expected clauses:

(μ-I) If t ∈ SN, then C_{μαρ}t ∈ SN.

(β_{μ}) If s(m(μαρ)σ(λx^{μαρ}.xE_{μ}σms)t)s⃗ ∈ SN, x^{μαρ} ∉ FV(s) and (C_{μαρ}t)E_{μ}σmss⃗ is a

term, then (C_{μαρ}t)E_{μ}σmss⃗ ∈ SN.

(β_{μ}^{+}) If s(m(μαρ)(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σms)x⟩)t)s⃗ ∈ SN, x^{μαρ} ∉ FV(s) and

(C_{μαρ}t)E_{μ}^{+}σmss⃗ is a term, then (C_{μαρ}t)E_{μ}^{+}σmss⃗ ∈ SN.

Lemma A.13 If t ∈ sn, then C_{μαρ}t ∈ sn.

Proof Induction on t ∈ sn. _{□}

Lemma A.14 If s(m(μαρ)σ(λx^{μαρ}.xE_{μ}σms)t)s⃗ ∈ sn, x^{μαρ} ∉ FV(s) and (C_{μαρ}t)E_{μ}σmss⃗ is a term, then (C_{μαρ}t)E_{μ}σmss⃗ ∈ sn.

Proof Induction on s(m(μαρ)σ(λx^{μαρ}.xE_{μ}σms)t)s⃗ ∈ sn^{+} by the usual analysis of the reducts of (C_{μαρ}t)E_{μ}σmss⃗. (Note that we need sn^{+} because s occurs twice in the canonical reduct of (C_{μαρ}t)E_{μ}σmss⃗.) _{□}

Lemma A.15 If s(m(μαρ)(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σms)x⟩)t)s⃗ ∈ sn, x^{μαρ} ∉ FV(s) and (C_{μαρ}t)E_{μ}^{+}σmss⃗ is a term, then (C_{μαρ}t)E_{μ}^{+}σmss⃗ ∈ sn.

Proof Induction on s(m(μαρ)(μαρ×σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σms)x⟩)t)s⃗ ∈ sn^{+} by analysis of the reducts of (C_{μαρ}t)E_{μ}^{+}σmss⃗. (Note that we need sn^{+} because s occurs twice in the canonical reduct of (C_{μαρ}t)E_{μ}^{+}σmss⃗.) _{□}

Corollary A.16 SN ⊆ sn.

Proof The same as for Lemma 9.6. _{□}

A.2.1 Saturated sets for IMIT

Extend the definition for system eF of M being a τ-saturated set by the following clause:

(β_{μ}) If s(m(μαρ)σ(λx^{μαρ}.xE_{μ}σms)t)s⃗ ∈ M, x^{μαρ} ∉ FV(s) and (C_{μαρ}t)E_{μ}σmss⃗ is a

term, then (C_{μαρ}t)E_{μ}σmss⃗ ∈ M.

(β_{μ}^{+}) If s(m(μαρ)(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σms)x⟩)t)s⃗ ∈ M, x^{μαρ} ∉ FV(s) and

(C_{μαρ}t)E_{μ}^{+}σmss⃗ is a term, then (C_{μαρ}t)E_{μ}^{+}σmss⃗ ∈ M.

Extend the definition of the τ-saturated closure cl_{τ} (M) accordingly by the clause

(β_{μ}) If s(m(μαρ)σ(λx^{μαρ}.xE_{μ}σms)t)s⃗ ∈ cl_{τ} (M), x^{μαρ} ∉ FV(s) and (C_{μαρ}t)E_{μ}σmss⃗ is

a term, then (C_{μαρ}t)E_{μ}σmss⃗ ∈ cl_{τ} (M).

(β_{μ}^{+}) If s(m(μαρ)(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σms)x⟩)t)s⃗ ∈ cl_{τ} (M), x^{μαρ} ∉ FV(s)

and (C_{μαρ}t)E_{μ}^{+}σmss⃗ is a term, then (C_{μαρ}t)E_{μ}^{+}σmss⃗ ∈ cl_{τ} (M).

Again cl_{τ} (M) is the smallest τ-saturated set containing M ∩ SN_{τ}.

A.2.2 Calculating with saturated sets for IMIT

Fix λαρ. Let Φ := (Φ_{τ})_{τ} be a family of mappings Φ_{τ} : SAT_{τ} → SAT_{ρ[α:=τ]}. Define for M ∈ SAT_{μαρ}

M_{I}(M) := {r ∈ Λ_{μαρ}|∃t ∈ Φ_{μαρ}(M).r = C_{μαρ}t}
M_{E}(M) := {r ∈ Λ_{μαρ}|∀m ∈ ∀P∀Q.(P → Q) → Φ(P) → Φ(Q)∀σ∀N ∈ SAT_{σ}
∀s ∈ Φ_{σ}(N) → N rE_{μ}σms ∈ N ∧ ∀s ∈ Φ_{μαρ×σ}(M × N) → N rE_{μ}^{+}σms ∈ N }

and define Ψ_{I} : SAT_{μαρ} → SAT_{μαρ} by

Ψ_{I}(M) := cl_{μαρ}(M_{I}(M))

and Ψ_{E} : SAT_{μαρ} → SAT_{μαρ} by

Ψ_{E}(M) := cl_{μαρ}(M_{E}(M)).

We cannot ensure Ψ_{I} or Ψ_{E} to be monotone. In order to overcome this problem we define (with Pow denoting the power set)

Φ^{⊇} : SAT_{μαρ} → Pow(SN_{ρ[α:=μαρ]})

via

Φ^{⊇}(M) := {t ∈ SN_{ρ[α:=μαρ]}|∀m ∈ ∀P∀Q.(P → Q) → Φ(P) → Φ(Q)
∀σ∀N ∈ SAT_{σ}∀s ∈ M → N .m(μαρ)σst ∈ Φ_{σ}(N)}

and for m ∈ ∀P∀Q.(P → Q) → Φ(P) → Φ(Q) we define Φ_{m}^{⊆} := (Φ_{m,σ}^{⊆})_{σ} with

Φ_{m,σ}^{⊆} : SAT_{σ} → SAT_{ρ[α:=σ]}

via

Φ_{m,σ}^{⊆}(N) := cl_{ρ[α:=σ]}({r ∈ Λ_{ρ[α:=σ]}|∃M ∈ SAT_{μαρ}∃s ∈ M → N ∃t ∈ Φ_{μαρ}(M).
r = m(μαρ)σst})

Φ^{⊇} is monotone (even non-strictly positive) and Φ^{⊇} ⊇ Φ_{μαρ} (pointwise) because of the rules (∀-E) and (→-E) for saturated sets. Φ_{m,σ}^{⊆} is monotone (even strictly positive) and Φ_{m,σ}^{⊆} ⊆ Φ_{σ} (pointwise) also because of the rules (∀-E) and (→-E) for saturated sets. (Note that already the set which is the argument to cl_{ρ[α:=σ]} is a subset of Φ_{σ}(M) and therefore also Φ_{m,σ}^{⊆}(M) because Φ_{σ}(M) is saturated.) Define for M ∈ SAT_{μαρ}

M_{I}^{⊇}(M) := {r ∈ Λ_{μαρ}|∃t ∈ Φ^{⊇}(M).r = C_{μαρ}t}
M_{E}^{⊆}(M) := {r ∈ Λ_{μαρ}|∀m ∈ ∀P∀Q.(P → Q) → Φ(P) → Φ(Q)∀σ∀N ∈ SAT_{σ}
∀s ∈ Φ_{σ}(N) → N rE_{μ}σms ∈ N ∧ ∀s ∈ Φ_{m,μαρ×σ}^{⊆}(M × N) → N rE_{μ}^{+}σms ∈ N }

and set

μ_{I}(Φ) := the least fixed point of Ψ_{I}^{⊇} : SAT_{μαρ} → SAT_{μαρ},

defined by

Ψ_{I}^{⊇}(M) := cl_{μαρ}(M_{I}^{⊇}(M))

and

μ_{E}(Φ) := any fixed point of Ψ_{E}^{⊆} : SAT_{μαρ} → SAT_{μαρ},

defined by

Ψ_{E}^{⊆}(M) := cl_{μαρ}(M_{E}^{⊆}(M)).

Because Ψ_{I} and Ψ_{E} are monotone (they are even non-strictly positive) and SAT_{μαρ} is a complete lattice, such fixed points exists. Hence, μ_{I}(Φ) and μ_{E}(Φ) are μαρ-saturated sets. Let us extract an encoding of types from the definition of μ_{I}(Φ):

(μαρ)′ := μβ.Mon(λαρ′) × ∀α.(β → α) → ρ′,

where we write Mon(λαρ) for ∀α∀β.(α → β) → ρ → ρ[α := β] and assume that β ∉ {α}∪FV(ρ). The extraction read off the following proofs indeed gives an embedding of IMIT into NIPIT. Following the elimination-based proof one presumably gets an embedding into a system of noninterleaving positive fixed-point types.

Lemma A.17 M_{E}(M) ∩ SN ∈ SAT and M_{E}^{⊆}(M) ∩ SN ∈ SAT (which implies that Ψ_{E}(M) = M_{E}(M) ∩ SN and Ψ_{E}^{⊆}(M) = M_{E}^{⊆}(M) ∩ SN).

Proof Straightforward. _{□} Lemma A.18 M_{I}(M) ⊆ SN and M_{I}^{⊇}(M) ⊆ SN (which implies that Ψ_{I}(M) ⊇ M_{I}(M) and Ψ_{I}^{⊇}(M) ⊇ M_{I}^{⊇}(M)). _{□} Lemma A.19 Let M be a μαρ-saturated set M. M is a pre-fixed-point of Ψ_{I} iff for all t ∈ Φ_{μαρ}(M), we have that C_{μαρ}t ∈ M. M is a post-fixed-point of Ψ_{E} iff for all r ∈ M, m ∈ ∀P∀Q.(P → Q) → Φ(P) → Φ(Q), types σ, N ∈ SAT_{σ} and s ∈ Φ_{σ}(N) → N, we have rE_{μ}σms ∈ N and for all s ∈ Φ_{μαρ×σ}(M × N) → N, rE_{μ}^{+}σms ∈ N. Proof Use the two preceding lemmas. _{□} Lemma A.20 μ_{I}(Φ) is a pre-fixed-point of Ψ_{I}. Proof μ_{I}(Φ) is a pre-fixed-point of Ψ_{I}^{⊇} by definition. Hence

μ_{I}(Φ) ⊇ Ψ_{I}^{⊇}(μ_{I}(Φ)) ⊇ Ψ_{I}(μ_{I}(Φ)),

which clearly follows from Φ^{⊇} ⊇ Φ_{μαρ} because M_{I}(M) and M_{I}^{⊇}(M) have the same definition with exception of the occurrence of Φ_{μαρ} and Φ^{⊇}, respectively, which is at a strictly positive position. _{□} Lemma A.21 μ_{E}(Φ) is a post-fixed-point of Ψ_{E}. Proof μ_{E}(Φ) is a post-fixed-point of Ψ_{E}^{⊆} by definition. Hence

μ_{E}(Φ) ⊆ Ψ_{E}^{⊆}(μ_{E}(Φ)) ⊆ Ψ_{E}(μ_{E}(Φ)),

which clearly follows from Φ_{m}^{⊆} ⊆ Φ (typewise) because M_{E}(M) and M_{E}^{⊆}(M) have the same definition with exception of the occurrence of Φ_{μαρ×σ} and Φ_{m,μαρ×σ}^{⊆}, respectively, which is at a non-strictly positive position. _{□} Lemma A.22 μ_{E}(Φ) is a pre-fixed-point of Ψ_{I}^{4}. Proof Set M := μ_{E}(Φ). We have to show that

Ψ_{I}(M) ⊆ M.

Because M is a pre-fixed-point of Ψ_{E}^{⊆}, it suffices to show

Ψ_{I}(M) ⊆ Ψ_{E}^{⊆}(M).

Because cl_{μαρ} is monotone, it suffices to show

M_{I}(M) ⊆ M_{E}^{⊆}(M).

Let t ∈ Φ_{μαρ}(M). We have to show

C_{μαρ}t ∈ M_{E}^{⊆}(M).

4As for EMIT this seems not to extend to Ψ_{I}^{⊇} instead of Ψ_{I}, and hence it is open whether μ_{I}(Φ) ⊆ μ_{E}(Φ).

Let m ∈ ∀P∀Q.(P → Q) → Φ(P) → Φ(Q), σ be a type, N ∈ SAT_{σ} and s ∈ Φ_{σ}(N) → N. We have to show that

C_{μαρ}tE_{μ}σms ∈ N .

Because N is saturated it suffices to show

s(m(μαρ)σ(λx^{μαρ}.xE_{μ}σms)t) ∈ N .

Because of (→-E) for saturated sets (in the sequel the named rules will always be those for saturated sets) it suffices to show

m(μαρ)σ(λx^{μαρ}.xE_{μ}σms)t ∈ Φ_{σ}(N).

By (∀-E) and (→-E) it suffices to show

λx^{μαρ}.xE_{μ}σms ∈ M → N .

We use (→-I). Let r ∈ M. We have to show

rE_{μ}σms ∈ N .

This follows from M ⊆ Ψ_{E}^{⊆}(M) ⊆ M_{E}^{⊆}(M). We come to the case for which Ψ_{E}^{⊆} was designed, namely s ∈ Φ_{m,μαρ×σ}^{⊆}(M × N) → N. We have to show

C_{μαρ}tE_{μ}^{+}σms ∈ N .

By saturatedness of N it suffices to show

s(m(μαρ)(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σms)x⟩)t) ∈ N .

Because of (→-E) it suffices to show

m(μαρ)(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σms)x⟩)t ∈ Φ_{m,μαρ×σ}^{⊆}(M × N).

According to the definition of Φ_{m}^{⊆} (the closure in the definition of Φ_{m}^{⊆} only makes the set larger) we are done if we show

λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σms)x⟩ ∈ M → M × N .

We use (→-I). Let r ∈ M. We have to show

⟨r, (λx^{μαρ}.xE_{μ}^{+}σms)r⟩ ∈ M × N .

By (×-I) it suffices to show

(λx^{μαρ}.xE_{μ}^{+}σms)r ∈ N .

Because N is saturated, we only need to show

rE_{μ}^{+}σms ∈ N .

This follows again from M ⊆ Ψ_{E}^{⊆}(M) ⊆ M_{E}^{⊆}(M). _{□}

Note that we used from μ_{E}(Φ) the properties of being a pre-fixed-point and a post-fixed-point of Ψ_{E}^{⊆}.

Lemma A.23 μ_{I}(Φ) is a post-fixed-point of Ψ_{E}^{5}.

Proof Set M := μ_{I}(Φ). We prove M ⊆ Ψ_{E}(M) by extended induction (as defined in the introduction to chapter 4) on M. Let M′ := Ψ_{E}(M) ∩ M. We have to show

Ψ_{I}^{⊇}(M′) ⊆ Ψ_{E}(M).

Because cl_{μαρ} is monotone, it suffices to show

M_{I}^{⊇}(M′) ⊆ M_{E}(M).

Let r ∈ M_{I}^{⊇}(M′), i. e., r = C_{μαρ}t with t ∈ Φ^{⊇}(M′). We have to show that

C_{μαρ}t ∈ M_{E}(M).

Let m ∈ ∀P∀Q.(P → Q) → Φ(P) → Φ(Q), σ be a type, N ∈ SAT_{σ} and s ∈ Φ_{σ}(N) → N. We have to show that

C_{μαρ}tE_{μ}σms ∈ N .

Because N is saturated it suffices to show

s(m(μαρ)σ(λx^{μαρ}.xE_{μ}σms)t) ∈ N .

Because of (→-E) for saturated sets it suffices to show

m(μαρ)σ(λx^{μαρ}.xE_{μ}σms)t ∈ Φ_{σ}(N).

By definition of Φ^{⊇}(M′) it suffices to show

λx^{μαρ}.xE_{μ}σms ∈ M′ → N .

We use (→-I). Let r′ ∈ M′. We have to show

r′E_{μ}σms ∈ N .

This follows from M′ ⊆ Ψ_{E}(M) ⊆ M_{E}(M). We come to the case which needs the extended form of induction. Let s ∈ Φ_{μαρ×σ}(M×N) → N. We have to show

C_{μαρ}tE_{μ}^{+}σms ∈ N .

By saturatedness of N it suffices to show

s(m(μαρ)(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σms)x⟩)t) ∈ N .

Because of (→-E) it suffices to show

m(μαρ)(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σms)x⟩)t ∈ Φ_{μαρ×σ}(M × N).

By definition of Φ^{⊇}(M′) it suffices to show

λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σms)x⟩ ∈ M′ → M × N .

5Again as for EMITthis seems not to extend to Ψ_{E}^{⊆} instead of Ψ_{E}.

We use (→-I). Let r′ ∈ M′. We have to show

⟨r′, (λx^{μαρ}.xE_{μ}^{+}σms)r′⟩ ∈ M × N .

By (×-I) it suffices to show

r′ ∈ M and (λx^{μαρ}.xE_{μ}^{+}σms)r′ ∈ N .

Because N is saturated and M′ ⊆ M (this argument needs the extension of induction), we only need to show

r′E_{μ}^{+}σms ∈ N .

This follows again from M′ ⊆ Ψ_{E}(M) ⊆ M_{E}(M). _{□}

Note that we only used that μ_{I}(Φ) is a least pre-fixed-point. Putting everything together we get the following rules for reasoning with μ_{I}(Φ) and μ_{E}(Φ) where we simply write μ(Φ) for both of them:

(SAT) μ(Φ) ∈ SAT_{μαρ}.
(μ-I) If t ∈ Φ_{μαρ}(μ(Φ)), then C_{μαρ}t ∈ μ(Φ).

(μ-E) If r ∈ μ(Φ), m ∈ ∀P∀Q.(P → Q) → Φ(P) → Φ(Q), σ type, N ∈ SAT_{σ} and

s ∈ Φ_{σ}(N) → N, then rE_{μ}σms ∈ N.

(μ-E^{+}) If r ∈ μ(Φ), m ∈ ∀P∀Q.(P → Q) → Φ(P) → Φ(Q), σ type, N ∈ SAT_{σ} and

s ∈ Φ_{μαρ×σ}(μ(Φ) × N) → N, then rE_{μ}^{+}σms ∈ N.

A.2.3 Computability predicates for IMIT

Extend (as for EMIT) the definition of SC_{ρ}[α⃗ := P⃗] by the following clause:

(μ) SC_{μαρ}[α⃗ := P⃗] := μ(Φ) with Φ = (Φ_{σ})_{σ}, where Φ_{σ} : SAT_{σ} → SAT_{ρ[α⃗,α:=σ⃗,σ]} is defined by Φ_{σ}(P) := SC_{ρ}[α⃗, α := P⃗, P] (with the same assumptions as in the definition of strong computability for universal types in order to guarantee type-correctness).

The definition will once again be written more intuitively as follows:

SC_{μαρ}[α⃗ := P⃗] := μP.SC_{ρ}[α⃗, α := P⃗, P].

It is obvious that coincidence and substitution lemma (Lemma 9.13 and Lemma 9.14) extend to IMIT. Now we extend Lemma 9.16 to IMIT:

Lemma A.24 Let r^{ρ} be a term, xρ⃗ a list of variables and s⃗ an equally long list of terms such that s⃗ ∈ SCρ⃗[α⃗ := P⃗σ⃗] for some P⃗ ⊆ SAT. Assume that

∀x∀π∀π′.(x^{π}, x^{π′} ∈ FV(r) ∪ xρ⃗) ∧ (π[α⃗ := σ⃗] = π′[α⃗ := σ⃗]) ⇒ π = π′.

Then r[α⃗ := σ⃗][x^{ρ⃗[α⃗:=σ⃗]} := s⃗] ∈ SC_{ρ}[α⃗ := P⃗].

Proof Induction on r. Again abbreviate r[α⃗ := σ⃗][x^{ρ⃗[α⃗:=σ⃗]} := s⃗] by r′ (for any term r). The assumption in the statement will again be referenced to as “injectivity”. We only have to consider the rules (μ-I), (μ-E) and (μ-E^{+}). (μ-I) Case C_{μαρ}t. (C_{μαρ}t)′ = C_{μαρ[α⃗:=σ⃗]}t′. We may assume that α ∉ α⃗. We have to show C_{μαρ[α⃗:=σ⃗]}t′ ∈ SC_{μαρ}[α⃗ := P⃗]. By the rule (μ-I) for saturated sets it suffices to show

t′ ∈ SC_{ρ}[α⃗, α := P⃗, SC_{μαρ}[α⃗ := P⃗]].

Because FV(C_{μαρ}t) = FV(t), injectivity holds trivially also for t. By induction hypothesis t′ ∈ SC_{ρ[α:=μαρ]}[α⃗ := P⃗]. By the substitution lemma (which for system F is Lemma 9.14) we have

SC_{ρ[α:=μαρ]}[α⃗ := P⃗] = SC_{ρ}[α⃗, α := P⃗, SC_{μαρ}[α⃗ := P⃗]].

(μ-E) Case rE_{μ}σs. This is only a minor variant to the following (μ-E^{+}) and therefore not shown. (μ-E^{+}) Case rE_{μ}^{+}σms. (rE_{μ}^{+}σms)′ = r′E_{μ}^{+}(σ[α⃗ := σ⃗])m′s′. We have to show that

r′E_{μ}^{+}σ[α⃗ := σ⃗]m′s′ ∈ SC_{σ}[α⃗ := P⃗].

Use (μ-E^{+}) for saturated sets. Show that r′ ∈ SC_{μαρ}[α⃗ := P⃗],

m′ ∈ ∀P∀Q.(P → Q) → SC_{ρ}[α⃗, α := P⃗, P] → SC_{ρ}[α⃗, α := P⃗, Q] and
s′ ∈ SC_{ρ}[α⃗, α := P⃗, SC_{μαρ}[α⃗ := P⃗] × SC_{σ}[α⃗ := P⃗]] → SC_{σ}[α⃗ := P⃗].

Injectivity holds for r, m and s because FV(r), FV(m), FV(s) ⊆ FV(rE_{μ}^{+}σms). Therefore by induction hypothesis we have r′ ∈ SC_{μαρ}[α⃗ := P⃗], m′ ∈ SC_{∀α∀β.(α→β)→ρ→ρ[α:=β]}[α⃗ := P⃗] and s′ ∈ SC_{ρ[α:=μαρ×σ]→σ}[α⃗ := P⃗]. By two applications of the coincidence lemma (which for system F is Lemma 9.13) we see that

SC_{∀α∀β.(α→β)→ρ→ρ[α:=β]}[α⃗ := P⃗] = ∀P∀Q.(P → Q) → SC_{ρ}[α⃗, α := P⃗, P] → SC_{ρ}[α⃗, α := P⃗, Q]

(one of the applications even needs the generalization which is in fact shown). Because we may assume α ∉ α⃗ the substitution lemma also gives the desired property of s′. _{□}

As for EMIT we get as corollaries that SN = Λ and that every term is strongly normalizing.

A.3 Proof of strong normalization for varIMIT

This section contains the proof for varIMIT where the introduction-based proof is only a minor variant to the proof for IMIT. The elimination-based proof follows the more general approach to enforce monotonicity. Extend the definition of SN for system eF by the expected clauses:

(μ-I) If t ∈ SN, then C_{μαρ}t ∈ SN.

(β_{μ}) If s(m(μαρ)(λx^{μαρ}.xE_{μ}σms)t)s⃗ ∈ SN, x^{μαρ} ∉ FV(s) and (C_{μαρ}t)E_{μ}σmss⃗ is a term,

then (C_{μαρ}t)E_{μ}σmss⃗ ∈ SN.

(β_{μ}^{+}) If s(m(μαρ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σms)x⟩)t)s⃗ ∈ SN, x^{μαρ} ∉ FV(s) and the ex-

pression (C_{μαρ}t)E_{μ}^{+}σmss⃗ is a term, then (C_{μαρ}t)E_{μ}^{+}σmss⃗ ∈ SN.

Lemma A.25 If t ∈ sn, then C_{μαρ}t ∈ sn. Proof Induction on t ∈ sn. _{□} Lemma A.26 If s(m(μαρ)(λx^{μαρ}.xE_{μ}σms)t)s⃗ ∈ sn, x^{μαρ} ∉ FV(s) and (C_{μαρ}t)E_{μ}σmss⃗ is a term, then (C_{μαρ}t)E_{μ}σmss⃗ ∈ sn. Proof Induction on s(m(μαρ)(λx^{μαρ}.xE_{μ}σms)t)s⃗ ∈ sn^{+} by the usual analysis of the reducts of (C_{μαρ}t)E_{μ}σmss⃗. (Note that we need sn^{+} because s occurs twice in the canonical reduct of (C_{μαρ}t)E_{μ}σmss⃗.) _{□} Lemma A.27 If s(m(μαρ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σms)x⟩)t)s⃗ ∈ sn, x^{μαρ} ∉ FV(s) and the expression (C_{μαρ}t)E_{μ}^{+}σmss⃗ is a term, then (C_{μαρ}t)E_{μ}^{+}σmss⃗ ∈ sn. Proof Induction on s(m(μαρ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σms)x⟩)t)s⃗ ∈ sn^{+} by analysis of the reducts of (C_{μαρ}t)E_{μ}^{+}σmss⃗. (Note that we need sn^{+} because s occurs twice in the canonical reduct of (C_{μαρ}t)E_{μ}^{+}σmss⃗.) _{□} Corollary A.28 SN ⊆ sn. Proof The same as for Lemma 9.6. _{□}

A.3.1 Saturated sets for varIMIT

Extend the definition for system eF of M being a τ-saturated set by the following clause:

(β_{μ}) If s(m(μαρ)(λx^{μαρ}.xE_{μ}σms)t)s⃗ ∈ M, x^{μαρ} ∉ FV(s) and (C_{μαρ}t)E_{μ}σmss⃗ is a term,

then (C_{μαρ}t)E_{μ}σmss⃗ ∈ M.

(β_{μ}^{+}) If s(m(μαρ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σms)x⟩)t)s⃗ ∈ M, x^{μαρ} ∉ FV(s) and the ex-

pression (C_{μαρ}t)E_{μ}^{+}σmss⃗ is a term, then (C_{μαρ}t)E_{μ}^{+}σmss⃗ ∈ M.

Extend the definition of the τ-saturated closure cl_{τ} (M) accordingly by the clause

(β_{μ}) If s(m(μαρ)(λx^{μαρ}.xE_{μ}σms)t)s⃗ ∈ cl_{τ} (M), x^{μαρ} ∉ FV(s) and (C_{μαρ}t)E_{μ}σmss⃗ is a

term, then (C_{μαρ}t)E_{μ}σmss⃗ ∈ cl_{τ} (M).

(β_{μ}^{+}) If s(m(μαρ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σms)x⟩)t)s⃗ ∈ cl_{τ} (M), x^{μαρ} ∉ FV(s) and the

expression (C_{μαρ}t)E_{μ}^{+}σmss⃗ is a term, then (C_{μαρ}t)E_{μ}^{+}σmss⃗ ∈ cl_{τ} (M).

Again cl_{τ} (M) is the smallest τ-saturated set containing M ∩ SN_{τ}.

A.3.2 Calculating with saturated sets for varIMIT

Fix λαρ. Let Φ := (Φ_{τ})_{τ} be a family of mappings Φ_{τ} : SAT_{τ} → SAT_{ρ[α:=τ]}. Define for M ∈ SAT_{μαρ}

M_{I}(M) := {r ∈ Λ_{μαρ}|∃t ∈ Φ_{μαρ}(M).r = C_{μαρ}t}
M_{E}(M) := {r ∈ Λ_{μαρ}|∀σ∀N ∈ SAT_{σ}
∀m ∈ ∀P.(P → N) → Φ(P) → Φ_{σ}(N)
∀s ∈ Φ_{σ}(N) → N rE_{μ}σms ∈ N ∧
∀m ∈ ∀P.(P → M × N) → Φ(P) → Φ_{μαρ×σ}(M × N)
∀s ∈ Φ_{μαρ×σ}(M × N) → N rE_{μ}^{+}σms ∈ N }

and define Ψ_{I} : SAT_{μαρ} → SAT_{μαρ} by

Ψ_{I}(M) := cl_{μαρ}(M_{I}(M))

and Ψ_{E} : SAT_{μαρ} → SAT_{μαρ} by

Ψ_{E}(M) := cl_{μαρ}(M_{E}(M)).

We cannot ensure Ψ_{I} or Ψ_{E} to be monotone. In order to overcome this problem we define (with Pow denoting the power set)

Φ^{⊇} : SAT_{μαρ} → Pow(SN_{ρ[α:=μαρ]})

via

Φ^{⊇}(M) := {t ∈ SN_{ρ[α:=μαρ]}|∀σ∀N ∈ SAT_{σ}∀m ∈ ∀P.(P → N) → Φ(P) → Φ_{σ}(N)
∀s ∈ M → N .m(μαρ)st ∈ Φ_{σ}(N)}

and Φ^{⊆} := (Φ_{σ}^{⊆})_{σ} with

Φ_{σ}^{⊆} : SAT_{σ} → SAT_{ρ[α:=σ]}

via

Φ_{σ}^{⊆}(N) := cl_{ρ[α:=σ]}({r ∈ Λ_{ρ[α:=σ]}|∃m ∈ ∀P.(P → N) → Φ(P) → Φ_{σ}(N)∃M ∈ SAT_{μαρ}
∃s ∈ M → N ∃t ∈ Φ_{μαρ}(M).r = m(μαρ)st})

Φ^{⊇} is monotone (even non-strictly positive) and Φ^{⊇} ⊇ Φ_{μαρ} (pointwise) because of the rules (∀-E) and (→-E) for saturated sets. Φ_{σ}^{⊆} is obviously not monotone (in general) and Φ_{σ}^{⊆} ⊆ Φ_{σ} (pointwise) also because of the rules (∀-E) and (→-E) for saturated sets. (Note that already the set which is the argument to cl_{ρ[α:=σ]} is a subset of Φ_{σ}(M) and therefore also Φ_{σ}^{⊆}(M) because Φ_{σ}(M) is saturated.) Define for M ∈ SAT_{μαρ}

M_{I}^{⊇}(M) := {r ∈ Λ_{μαρ}|∃t ∈ Φ^{⊇}(M).r = C_{μαρ}t}
M_{E}^{⊆}(M) := {r ∈ Λ_{μαρ}|∀σ∀N ∈ SAT_{σ}
∀m ∈ ∀P.(P → N) → Φ(P) → Φ_{σ}(N)
∀s ∈ Φ_{σ}(N) → N rE_{μ}σms ∈ N ∧
∀m ∈ ∀P.(P → M × N) → Φ(P) → Φ_{μαρ×σ}(M × N)
∀s ∈ Φ_{μαρ×σ}^{⊆}(M × N) → N rE_{μ}^{+}σms ∈ N }

and set

μ_{I}(Φ) := the least fixed point of Ψ_{I}^{⊇} : SAT_{μαρ} → SAT_{μαρ},

defined by

Ψ_{I}^{⊇}(M) := cl_{μαρ}(M_{I}^{⊇}(M))

and define Ψ_{E}^{⊆} : SAT_{μαρ} → SAT_{μαρ} by

Ψ_{E}^{⊆}(M) := cl_{μαρ}(M_{E}^{⊆}(M)).

Because Ψ_{I} is monotone (it is even non-strictly positive) and SAT_{μαρ} is a complete lattice, such a fixed point exists. Hence, μ_{I}(Φ) is a μαρ-saturated set. Ψ_{E}^{⊆} cannot be monotone in general (not only the problem with Φ^{⊆} propagates but also M_{E}^{⊆}(M)’s definition has several critical occurrences of M). The definitions of Φ^{⊆}, M_{E}^{⊆}(M) and Ψ_{E}^{⊆} are thus useless. Φ^{⊇} will not be used any further and M_{E}^{⊆}(M) and Ψ_{E}^{⊆} are redefined as follows:

M_{E}^{⊆}(M) := {r ∈ Λ_{μαρ}|∀σ∀N ∈ SAT_{σ}
∀m ∈ ∀P.(P → N) → Φ(P) → Φ_{σ}(N)
∀s ∈ Φ_{σ}(N) → N rE_{μ}σms ∈ N ∧
∀M′ ∈ SAT_{μαρ}.M ⊆ M′ ⇒
∀m ∈ ∀P.(P → M′ × N) → Φ(P) → Φ_{μαρ×σ}(M′ × N)
∀s ∈ Φ_{μαρ×σ}(M′ × N) → N rE_{μ}^{+}σms ∈ N }
Ψ_{E}^{⊆}(M) := cl_{μαρ}(M_{E}^{⊆}(M))

Ψ_{E}^{⊆} is monotone (even non-strictly positive) and obviously Ψ_{E}^{⊆} ⊆ Ψ_{E} (pointwise). We may now form

μ_{E}(Φ) := any fixed point of Ψ_{E}^{⊆},

which therefore is also a post-fixed-point of Ψ_{E}. An analysis of the definition of μ_{I}(Φ) gives the following encoding (for “new” β and γ):

(μαρ)′ := μβ∀α.(∀γ.(γ → α) → ρ′[α := γ] → ρ′) → (β → α) → ρ′.

An embedding of varIMIT into NIPIT may now be read off the proofs that μ_{I}(Φ) is a pre-fixed-point of Ψ_{I} and that μ_{I}(Φ) is a post-fixed-point of Ψ_{E}^{6} which are given below. It is possible to show that this indeed gives an embedding. The elimination-based approach presumably gives a quite complicated embedding into noninterleaving positive fixed-point types.

Lemma A.29 M_{E}(M) ∩ SN ∈ SAT and M_{E}^{⊆}(M) ∩ SN ∈ SAT (which implies that Ψ_{E}(M) = M_{E}(M) ∩ SN and Ψ_{E}^{⊆}(M) = M_{E}^{⊆}(M) ∩ SN).

Proof Straightforward. _{□}

Lemma A.30 M_{I}(M) ⊆ SN and M_{I}^{⊇}(M) ⊆ SN (which implies that Ψ_{I}(M) ⊇ M_{I}(M) and Ψ_{I}^{⊇}(M) ⊇ M_{I}^{⊇}(M)). _{□}

Lemma A.31 Let M be a μαρ-saturated set M. M is a pre-fixed-point of Ψ_{I} iff for all t ∈ Φ_{μαρ}(M), we have that C_{μαρ}t ∈ M. M is a post-fixed-point of Ψ_{E} iff for all r ∈ M, types σ, N ∈ SAT_{σ}, m ∈ ∀P.(P → N) → Φ(P) → Φ_{σ}(N) and s ∈ Φ_{σ}(N) → N, we have rE_{μ}σms ∈ N and for m ∈ ∀P.(P → M × N) → Φ(P) → Φ_{μαρ×σ}(M × N) and s ∈ Φ_{μαρ×σ}(M × N) → N, rE_{μ}^{+}σms ∈ N.

Proof Use the two preceding lemmas. _{□}

Lemma A.32 Every pre-fixed-point of Ψ_{I}^{⊇} is also a pre-fixed-point of Ψ_{I}.

Proof Let M be a pre-fixed-point of Ψ_{I}^{⊇}. Hence

M ⊇ Ψ_{I}^{⊇}(M) ⊇ Ψ_{I}(M),

which clearly follows from Φ^{⊇} ⊇ Φ_{μαρ} because M_{I}(M) and M_{I}^{⊇}(M) have the same definition with exception of the occurrence of Φ_{μαρ} and Φ^{⊇}, respectively, which is at a strictly positive position. _{□} Lemma A.33 μ_{E}(Φ) is a pre-fixed-point of Ψ_{I}^{⊇}.

6In fact we prove that μ_{I}(Φ) is a post-fixed-point of Ψ_{E}^{⊆} and should analyze the slightly easier proof of the weaker statement.

Proof Set M := μ_{E}(Φ). We have to show that

Ψ_{I}^{⊇}(M) ⊆ M.

Because M is a pre-fixed-point of Ψ_{E}^{⊆}, it suffices to show

Ψ_{I}^{⊇}(M) ⊆ Ψ_{E}^{⊆}(M).

Because cl_{μαρ} is monotone, it suffices to show

M_{I}^{⊇}(M) ⊆ M_{E}^{⊆}(M).

Let t ∈ Φ^{⊇}(M). We have to show

C_{μαρ}t ∈ M_{E}^{⊆}(M).

Let σ be a type, N ∈ SAT_{σ}, m ∈ ∀P.(P → N) → Φ(P) → Φ_{σ}(N) and s ∈ Φ_{σ}(N) → N. We have to show that

C_{μαρ}tE_{μ}σms ∈ N .

Because N is saturated it suffices to show

s(m(μαρ)(λx^{μαρ}.xE_{μ}σms)t) ∈ N .

Because of (→-E) for saturated sets (in the sequel the named rules will always be those for saturated sets) it suffices to show

m(μαρ)(λx^{μαρ}.xE_{μ}σms)t ∈ Φ_{σ}(N).

By definition of Φ^{⊇}(M) it suffices to show

λx^{μαρ}.xE_{μ}σms ∈ M → N .

We use (→-I). Let r ∈ M. We have to show

rE_{μ}σms ∈ N .

This follows from M ⊆ Ψ_{E}^{⊆}(M) ⊆ M_{E}^{⊆}(M). We come to the case for which Ψ_{E}^{⊆} was designed, namely m ∈ ∀P.(P → M′ × N) → Φ(P) → Φ_{μαρ×σ}(M′ × N) and s ∈ Φ_{μαρ×σ}(M′ × N) → N for some M′ ∈ SAT_{μαρ} with M ⊆ M′. We have to show

C_{μαρ}tE_{μ}^{+}σms ∈ N .

By saturatedness of N it suffices to show

s(m(μαρ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σms)x⟩)t) ∈ N .

Because of (→-E) it suffices to show

m(μαρ)(μαρ × σ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σms)x⟩)t ∈ Φ_{μαρ×σ}(M′ × N).

According to the definition of Φ^{⊇} we are done if we show

λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σms)x⟩ ∈ M → M′ × N .

We use (→-I). Let r ∈ M. We have to show

⟨r, (λx^{μαρ}.xE_{μ}^{+}σms)r⟩ ∈ M′ × N .

By (×-I) and because of M ⊆ M′ it suffices to show

(λx^{μαρ}.xE_{μ}^{+}σms)r ∈ N .

Because N is saturated, we only need to show

rE_{μ}^{+}σms ∈ N .

This follows again from M ⊆ Ψ_{E}^{⊆}(M) ⊆ M_{E}^{⊆}(M). _{□} Note that we used from μ_{E}(Φ) the properties of being a pre-fixed-point and a post-fixed-point of Ψ_{E}^{⊆}. Note also that for the purposes of the normalization proof it would have been enough to show that μ_{E}(Φ) is a pre-fixed-point of Ψ_{I} instead of Ψ_{I}^{⊇}, but from the above result we even get the following Corollary A.34 μ_{I}(Φ) ⊆ μ_{E}(Φ). Proof μ_{I}(Φ) is the least pre-fixed-point of Ψ_{I}^{⊇}. _{□} Lemma A.35 μ_{I}(Φ) is a post-fixed-point of Ψ_{E}^{⊆}. Proof Set M := μ_{I}(Φ). We prove M ⊆ Ψ_{E}^{⊆}(M) by extended induction (as defined in the introduction to chapter 4) on M. Let M′ := Ψ_{E}^{⊆}(M) ∩ M. We have to show

Ψ_{I}^{⊇}(M′) ⊆ Ψ_{E}^{⊆}(M).

Because cl_{μαρ} is monotone, it suffices to show

M_{I}^{⊇}(M′) ⊆ M_{E}^{⊆}(M).

Let r ∈ M_{I}^{⊇}(M′), i. e., r = C_{μαρ}t with t ∈ Φ^{⊇}(M′). We have to show that

C_{μαρ}t ∈ M_{E}^{⊆}(M).

Let σ be a type, N ∈ SAT_{σ}, m ∈ ∀P.(P → N) → Φ(P) → Φ_{σ}(N) and s ∈ Φ_{σ}(N) → N. We have to show that

C_{μαρ}tE_{μ}σms ∈ N .

Because N is saturated it suffices to show

s(m(μαρ)(λx^{μαρ}.xE_{μ}σms)t) ∈ N .

Because of (→-E) for saturated sets it suffices to show

m(μαρ)(λx^{μαρ}.xE_{μ}σms)t ∈ Φ_{σ}(N).

By definition of Φ^{⊇}(M′) it suffices to show λx^{μαρ}.xE_{μ}σms ∈ M′ → N .

We use (→-I). Let r′ ∈ M′. We have to show

r′E_{μ}σms ∈ N .

This follows from M′ ⊆ Ψ_{E}^{⊆}(M) ⊆ M_{E}^{⊆}(M). We come to the case which needs the extended form of induction. Let M′′ ∈ SAT_{μαρ} with M ⊆ M′′, m ∈ ∀P.(P → M′′ × N) → Φ(P) → Φ_{μαρ×σ}(M′′ × N) and s ∈ Φ_{μαρ×σ}(M′′ × N) → N. We have to show

C_{μαρ}tE_{μ}^{+}σms ∈ N .

By saturatedness of N it suffices to show

s(m(μαρ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σms)x⟩)t) ∈ N .

Because of (→-E) it suffices to show

m(μαρ)(λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σms)x⟩)t ∈ Φ_{μαρ×σ}(M′′ × N).

By definition of Φ^{⊇}(M′) it suffices to show

λx^{μαρ}.⟨x, (λx^{μαρ}.xE_{μ}^{+}σms)x⟩ ∈ M′ → M′′ × N .

We use (→-I). Let r′ ∈ M′. We have to show

⟨r′, (λx^{μαρ}.xE_{μ}^{+}σms)r′⟩ ∈ M′′ × N .

By (×-I) it suffices to show

r′ ∈ M′′ and (λx^{μαρ}.xE_{μ}^{+}σms)r′ ∈ N .

Because N is saturated and M′ ⊆ M ⊆ M′′ (this argument needs the extension of induction), we only need to show

r′E_{μ}^{+}σms ∈ N .

This follows again from M′ ⊆ Ψ_{E}^{⊆}(M) ⊆ M_{E}^{⊆}(M). _{□}

Note that we only used that μ_{I}(Φ) is a least pre-fixed-point. Note also that for the purposes of the normalization proof it would have been enough to show that μ_{I}(Φ) is a post-fixed-point of Ψ_{E} instead of Ψ_{E}^{⊆}^{7}. Putting everything together we get the following rules for reasoning with μ(Φ) := μ_{I}(Φ):

(SAT) μ(Φ) ∈ SAT_{μαρ}.

(μ-I) If t ∈ Φ_{μαρ}(μ(Φ)), then C_{μαρ}t ∈ μ(Φ).

(μ-E) If r ∈ μ(Φ), σ type, N ∈ SAT_{σ}, m ∈ ∀P.(P → N) → Φ(P) → Φ_{σ}(N) and

s ∈ Φ_{σ}(N) → N, then rE_{μ}σms ∈ N.

(μ-E^{+}) If r ∈ μ(Φ), σ type, N ∈ SAT_{σ}, m ∈ ∀P.(P → M×N) → Φ(P) → Φ_{μαρ×σ}(M×N)

and s ∈ Φ_{μαρ×σ}(μ(Φ) × N) → N, then rE_{μ}^{+}σms ∈ N.

7If the greatest fixed point is taken for μ_{E}(Φ), then also the preceding lemma implies that μ_{I}(Φ) ⊆ μ_{E}(Φ).

A.3.3 Computability predicates for varIMIT

Extend (as for IMIT) the definition of SC_{ρ}[α⃗ := P⃗] by the following clause:

(μ) SC_{μαρ}[α⃗ := P⃗] := μ(Φ) with Φ = (Φ_{σ})_{σ}, where Φ_{σ} : SAT_{σ} → SAT_{ρ[α⃗,α:=σ⃗,σ]} is defined by Φ_{σ}(P) := SC_{ρ}[α⃗, α := P⃗, P] (with the same assumptions as in the definition of strong computability for universal types in order to guarantee type-correctness).

The definition will once again be written more intuitively as follows:

SC_{μαρ}[α⃗ := P⃗] := μP.SC_{ρ}[α⃗, α := P⃗, P].

It is obvious that coincidence and substitution lemma (Lemma 9.13 and Lemma 9.14) extend to varIMIT. Now we extend Lemma 9.16 to varIMIT:

Lemma A.36 Let r^{ρ} be a term, xρ⃗ a list of variables and s⃗ an equally long list of terms such that s⃗ ∈ SCρ⃗[α⃗ := P⃗σ⃗] for some P⃗ ⊆ SAT. Assume that

∀x∀π∀π′.(x^{π}, x^{π′} ∈ FV(r) ∪ xρ⃗) ∧ (π[α⃗ := σ⃗] = π′[α⃗ := σ⃗]) ⇒ π = π′.

Then r[α⃗ := σ⃗][x^{ρ⃗[α⃗:=σ⃗]} := s⃗] ∈ SC_{ρ}[α⃗ := P⃗].

Proof Induction on r. Again abbreviate r[α⃗ := σ⃗][x^{ρ⃗[α⃗:=σ⃗]} := s⃗] by r′ (for any term r). The assumption in the statement will again be referenced to as “injectivity”. We only have to consider the rules (μ-I), (μ-E) and (μ-E^{+}). (μ-I) Trivially the same as for IMIT. (μ-E) Case rE_{μ}σs. This is only a minor variant to the following (μ-E^{+}) and therefore not shown. (μ-E^{+}) Case rE_{μ}^{+}σms. (rE_{μ}^{+}σms)′ = r′E_{μ}^{+}(σ[α⃗ := σ⃗])m′s′. We have to show that

r′E_{μ}^{+}σ[α⃗ := σ⃗]m′s′ ∈ SC_{σ}[α⃗ := P⃗].

Use (μ-E^{+}) for saturated sets. Show that r′ ∈ SC_{μαρ}[α⃗ := P⃗],

m′ ∈ ∀P.(P → SC_{μαρ}[α⃗ := P⃗] × SC_{σ}[α⃗ := P⃗]) → SC_{ρ}[α⃗, α := P⃗, P] →
SC_{ρ}[α⃗, α := P⃗, SC_{μαρ}[α⃗ := P⃗] × SC_{σ}[α⃗ := P⃗]]

and

s′ ∈ SC_{ρ}[α⃗, α := P⃗, SC_{μαρ}[α⃗ := P⃗] × SC_{σ}[α⃗ := P⃗]] → SC_{σ}[α⃗ := P⃗].

Injectivity holds for r, m and s because FV(r), FV(m), FV(s) ⊆ FV(rE_{μ}^{+}σms). Therefore by induction hypothesis we have r′ ∈ SC_{μαρ}[α⃗ := P⃗], m′ ∈ SC_{∀α.(α→μαρ×σ)→ρ→ρ[α:=μαρ×σ]}[α⃗ := P⃗] and s′ ∈ SC_{ρ[α:=μαρ×σ]→σ}[α⃗ := P⃗]. By several applications of the coincidence lemma (which for system F is Lemma 9.13) we see that m′ is already in the right set (use α ∉ FV(σ)). Because we may assume α ∉ α⃗ the substitution lemma also gives the desired property of s′. _{□}

As for IMIT we get as corollaries that SN = Λ and that every term is strongly normalizing.

A.4 Concluding remarks

For the systems of monotone inductive types we preferred to monotonize Φ by help of monotonicity witnesses and then to replace Φ by the monotonized variant in the definition of the operators Ψ_{I} and Ψ_{E} in order to get Ψ_{I}^{⊇} and Ψ_{E}^{⊆}^{8}. In the introduction-based proof for varEMIT and in the elimination-based proof for varIMIT this approach failed and therefore a more primitive monotonization had to happen directly in the definition of M_{I}^{⊇}(M) and M_{E}^{⊆}(M). It is easy to see that

M_{I}^{⊇}(M) = ⋃{M_{I}(M′)|M′ ⊆ M} in the proof for varEMIT

and

M_{E}^{⊆}(M) = ⋂{M_{E}(M′)|M′ ⊇ M} in the proof for varIMIT

which is quite similar to the definitions of upper and lower monotonization. By applying the saturated closure monotone operators Ψ_{I}^{⊇} and Ψ_{E}^{⊆} were defined. One can show that in fact Ψ_{I}^{⊇} is the upper monotonization of Ψ_{I} (use M_{I}(M) ⊆ SN) and that Ψ_{E}^{⊆} is the lower monotonization of Ψ_{E} (use M_{E}(M) ∩ SN ∈ SAT). We may now ask whether the use of those canonical monotonizations would be fruitful even in case the other method works. The answer is positive. Let us consider varIMIT. We set

M̃_{I}^{⊇}(M) = ⋃{M_{I}(M′)|M′ ⊆ M},

define Ψ̃_{I}^{⊇}(M) := cl_{μαρ}(M̃_{I}^{⊇}(M)) and take for μ̃_{I}(Φ) the least fixed point of Ψ̃_{I}^{⊇}. Then again Ψ̃_{I}^{⊇} is the upper monotonization of Ψ_{I} and hence due to the minimality of the upper monotonization Ψ̃_{I}^{⊇} ⊆ Ψ_{I}^{⊇} (pointwise). We conclude that μ̃_{I}(Φ) ⊆ μ_{I}(Φ). It can be shown that μ̃_{I}(Φ) is a postfixed-point of Ψ_{E}^{⊆} (Ψ_{E} would suffice) and hence μ̃_{I}(Φ) also qualifies for the definition of the computability predicates and the normalization proof. The extracted encoding of types is

(μαρ)′ := μα∃β.(β → α) × ρ′[α := β]

with β ∉ {α} ∪ FV(ρ′) which is exactly the encoding of types used in the embedding of UVIT into MePIT and also the encoding of types in the embedding of varIMIT into MePIT which is derived from the composition of the embeddings via MeIT and UVIT. By analysis of the proof that μ̃_{I}(Φ) is a post-fixed-point of Ψ_{E} we even get the embedding of varIMIT into MePIT for the terms. Now consider EMIT: If we also take the upper monotonization of Ψ_{I} we get another introductionbased proof for EMIT giving rise to the encoding

(μαρ)′ := μβ.Mon(λαρ′) × ∃α.(α → β) × ρ′

with β ∉ {α} ∪ FV(ρ′) which extends to an embedding of EMIT into NISPIT+ex but (trivially) not into MePIT. In section 9.5.1 we got via the encoding

(μαρ)′ := μβ.Mon(λαρ′) × ∀α.(β → α) → ρ′

an embedding of EMIT into NIPIT. Unlike the situation of varIMIT we get a type encoding being free from the monotonicity statement in neither of the two approaches. Of course, we would like to get back the encoding into the types of coMePIT (in chapter 6). But in the introduction-based proof for EMIT (which led to the last-mentioned encoding) we urgently needed the monotonicity assumptions in order to have that M_{I}^{⊇}(M) ⊇ M_{I}(M). Already the type ∀α.(β → α) → ρ′ reflects the lower monotonization which hints at the impossibility of getting rid of Mon(λαρ′) without giving up the essential M_{I}^{⊇}(M) ⊇ M_{I}(M). Nevertheless, it is possible even for varEMIT which does not allow the introduction-based proof by the method used in the proof for EMIT! This was shown in section 6.3.2 and section 6.3.3 by making use of coMeIT (being designed for that purpose). How is this possible? In the lattice-theoretic motivation of the embedding of varEMIT into coMeIT we used a monotone Φ and studied the rules of its lower monotonization knowing that it is the same as Φ. It turned out that for the embedding to work it was sufficient that there is a monotonicity witness. In the normalization proof however, the operator is not monotone and hence its monotonization different from it. Only via the monotonicity requirement (for EMIT this is ∀P∀Q.(P → Q) → Φ(P) → Φ(Q)) for the monotonicity witnesses they relate to each other. Therefore we do not get a normalization proof whose extract gives the embedding of varEMIT into coMePIT. But we may take the embedding read off the first proof for EMIT, recognize that the monotonicity witnesses do not play an essential role in the embedding(!) and then optimize the embedding and finally see that it even captures varEMIT although the normalization proof we started with did not extend to varEMIT.

8Clearly, the introduction-based operator has to be made bigger and the elimination-based operator has to made smaller such that in the first case a pre-fixed-point of the new operator is also a pre-fixed-point of the original operator Ψ_{I} and in the second case that a post-fixed-point of the new operator is also a post-fixed-point of the original operator Ψ_{E}.

Appendix B

Directions for future research

In the introductory chapter the impossibility of having a “good” predecessor function on the natural numbers represented in system F was a motivation for studying extensions of system F by primitive recursion. In section 5.1.2 we saw that Gödel’s system T is represented faithfully in NISPIT via the type μα.1 + α. Therefore we have the required predecessor function. The question now is whether a general predecessor may be defined, i. e., a closed term P of type μαρ → ρ[α := μαρ] such that P (C_{μαρ}t) →^{∗} t for every term t of type ρ[α := μαρ]. We first study the situation for monotone inductive types. In EMIT the exact question would be: Is there a closed term P of type μαρ → ρ[α := μαρ] such that P (C_{μαρ}mt) →^{∗} t for every m and t? For IMIT it would be the question as above. Let us look at the lattice-theoretic situation: If (U, ≤) is a complete lattice and Φ : U → U is a monotone, we want to show that lfp(Φ) ≤ Φ(lfp(Φ)). It is done by applying the rule (lfp-E^{+}). We have to show Φ(lfp(Φ) ∧ Φ(lfp(Φ))) ≤ Φ(lfp(Φ)). This follows by mononicity from lfp(Φ) ∧ Φ(lfp(Φ)) ≤ lfp(Φ). The proof motivates the following “definition” for EMIT:

P := λx^{μαρ}.xE_{μ}^{+}(m(μαρ × ρ[α := μαρ])(μαρ)(λz^{μαρ×ρ[α:=μαρ]}.zL)).

Where do we take m from? In EMIT I see no chance. Neither in IMIT, where m also has to be put after “E_{μ}^{+}”. But even for a type with a fixed closed monotonicity witness there need not be any predecessor: Define one of the systems ESMIT by setting MTypes to the least set closed under all the type forming operations except (μ) and having π := μα.α → 1 ∈ MTypes. Set

map_{λα.α→1} := ΛαΛβλf^{α→β}λx^{α→1}λy^{β}.IN1.

That this gives one of the systems ESMIT (and also ISMIT) is trivial to see. The constructor C_{π} has type (π → 1) → π. Assume that there is a term P : π → π → 1 such that P (C_{π}t^{π→1}) →^{∗} t for every term t. Consider ω := λx^{π}.P xx : π → 1. Then C_{π}ω : π. Setting Ω := ω(C_{π}ω) : 1, we get P (C_{π}ω) →^{∗} ω and hence

Ω ↦_{β_{→}} P (C_{π}ω)(C_{π}ω) →^{∗} ω(C_{π}ω) = Ω.

By Lemma 2.50 we conclude that Ω ∉ sn contradicting strong normalization^{1}. The same proof works verbatim for IMIT and by decorating C_{π} with map_{λα.α→1} everywhere also for EMIT. We observe that the monotonicity witness does not enter the specification of the predecessor. This leads to the following idea (formulated for EMIT): Define a weak predecessor to be a closed term P of type μαρ → ρ[α := μαρ] such that P (C_{μαρ}mt) and m(μαρ)(μαρ)(λy^{μαρ}y)t have a common reduct for every m and t. For IMIT an m^{∀α∀β.(α→β)→ρ→ρ[α:=β]}-predecessor is a closed term P of type μαρ → ρ[α := μαρ] such that P (C_{μαρ}t) and m(μαρ)(μαρ)(λy^{μαρ}y)t have a common reduct for every t. For ESMIT a weak predecessor is a closed term P of type μαρ → ρ[α := μαρ] such that P (C_{μαρ}t) and map_{λαρ}(μαρ)(μαρ)(λy^{μαρ}y)t have a common reduct for every t. For the example type π this would require that P (C_{π}t) and map_{λα.α→1}ππ(λy^{π}y)t have a common reduct. Hence, P := λx^{π}λy^{π}.IN1 suffices—reflecting the triviality of the monotonicity witness. This is the basis for the definition of systems of monotone fixed-point types. (We write now μ̂ instead of μ to emphasize the difference.) We show the elimination-based system: The (μ)- introduction rule of EMIT is kept, and the (μ)-elimination rules are replaced by:

1Here we need strong normalization.

(μ̂-E) If r^{μ̂αρ} ∈ Λ, then rEμ̂ ∈ Λ.

The rules (β_{μ}) and (β_{μ}^{+}) of iteration and primitive recursion are replaced by

(βμ̂) (C_{μ̂αρ}mt)Eμ̂ ↦ m(μ̂αρ)(μ̂αρ)(λy^{μ̂αρ}y)t.

One can show that this extension of F is strongly normalizing either by a direct proof in the style of this thesis’ normalization proofs or by an embedding into a system of non-interleaved positive fixed-point types. There are two such systems: one having the intuitive predecessor modelled by (C_{μ̂αρ}t)Eμ̂ ↦ t, the other being defined as above for monotone fixed-point types but with canonical monotonicity witnesses existing due to the absence of interleaving. One may then embed them into each other (if we leave out sum types and add standard η-rules) because the canonical monotonicity witnesses then map the identity to the identity, i. e. map_{λαρ}σσ(λy^{σ}y)s^{ρ[α:=σ]} →^{∗} s for every type σ and any term s. The extracted embeddings motivated in the sections with the direct normalization proofs embed monotone inductive types into non-interleaving positive fixed-point types, but also noninterleaving positive fixed-point types embed into non-interleaving positive inductive types (again if sum types are left out and this time because the canonical witnesses are functorial with respect to some restricted composition). We see that we may separate concerns: The behaviour of the monotonicity witnesses on the identity and their behaviour with respect to composition. Because of these embeddings we also cannot expect an embedding of non-interleaving positive fixed-point types into IT. However, led by the proof of Tarski’s theorem where it is even shown that the infimum of the pre-fixed-points is a post-fixed-point (see section 4.3.3) we can define an encoding of the system into IT^{2}. The crucial definition clause is

(μ̂-E) (r^{μ̂αρ}Eμ̂)′ := r′E_{i}(map_{λαρ′}(ρ′[α := (μ̂αρ)′])(μ̂αρ)′(λz^{ρ[α:=μ̂αρ]}.C_{μ̂αρ}z)′).

Note that (λz^{ρ[α:=μ̂αρ]}.C_{μ̂αρ}z)′ has first^{3} to be expanded according to the rule (μ̂-I) which will be the same as for the embedding of varIMIT–rec into IT but with canonical witnesses instead of any m. As expected it turns out that this encoding does not preserve reduction and hence is no embedding. As was the case for the attempt to code recursion via iteration (in section 4.5) not only functoriality is needed but also some formal induction principle. In addition one would have to define η-reduction for infimum types. Sum types make things more complicated when trying to attack functoriality problems. One needs some η-rule and permutative conversions which may be handled though. The question of existence of the predecessor for interleaved positive inductive types is more involved because one needs an η-rule and permutative conversions for μ-types (which are not yet known). One may at least show that in extensional equality theory (with a rule meaning that μαρ not only expresses a weakly initial algebra but even an initial algebra, cf. [Geu92]) the intuitive definition of the predecessor shown at the beginning of this section is correct. The proofs of functoriality of map and comap which enter the argument are quite intricate and rely on naturality. For PITrec where map and comap do not use (μ-E) but (μ-E^{+}) the proofs are even more involved. Extensionally, map and comap are equal to those of PITit = PIT. A lot more could be said but will be said or written elsewhere. But now we come to some open problems:

2Unlike the situation of section 4.3.3 we cannot deal with elimination-based monotone fixed-point types because the argument for getting a post-fixed-point again uses the monotonicity of Φ which is reflected by the need of a monotonicity witness also in the rule (μ̂-E) and hence requiring to keep to systems which have selected monotonicity witnesses.

3Recall that in the proof of Tarski’s theorem we first proved that μ_{Φ} is a pre-fixed-point and then used this fact for the proof that μ_{Φ} is also a post-fixed-point.

• What are useful permutations of μ with μ?

• Do they strongly normalize?

• Are they confluent? (This is a problem of my current definition.)

• Do they help in analyzing the closed terms in normal form of type of a monotonicity witness, namely ∀α∀β.(α → β) → ρ → ρ[α := β]?

• Is it at least possible to analyze the closed terms in normal form (after adding η-reduction) of type ∀α∀β.(α → β) → ρ → ρ[α := β] in NIPIT without sum types? Are they the canonical terms map, if one requires that they map the identity to the identity (also with η-rules included)?

• What happens with sum types? How can one reduce the set NF to have xE_{+}sts⃗ ∈ NF only if x ∉ FV(s) ∪ FV(t)? I propose some variable elimination reduction as follows:

x^{ρ+σ}E_{+}st ↦ xE_{+}(λy^{ρ}.(sy)[x := INL_{σ}y])(λy^{σ}.(ty)[x := INR_{ρ}y])

provided that x ∈ FV(s) ∪ FV(t) and y is “new”. It will be wise to allow this reduction also for any substitution instance. Does it preserve strong normalization? (It is correct in the extensional equality theory.)

• How about the analogous rule for μ-types?

• Is it true that for non-positive μαρ, there is no closed monotonicity witness mapping the identity to the identity? (After adding as much η-rules as possible.)

• What can be done with types such as bizarre(ρ) which are inhabited, monotone and not positive and do not map the identity to the identity? Are there more interesting examples of essentially monotone inductive types? Or do we first need to extend our framework to cover dependent types?^{4}

• Is there a proof of confluence for a class of orthogonal term rewrite systems which includes every system of this thesis?

4After all, in mathematics there is a wealth of monotone functions not being positive although monotonicity is often enforced by syntactic means (cf. the example of limit inferior in the introduction).

• Is there anything to be gained by dualizing everything to coinductive types?

• Is there an embedding of SPIT into NISPIT or of NIPIT into SPIT?

• What are the differences in heights of reduction trees between PIT and NIPIT(for a term and its code in the other system)?

• Do we always have μ_{I}(Φ) ⊆ μ_{E}(Φ) in the proofs of strong normalization for systems of inductive types? Are there examples which show that μ_{I}(Φ) ≠ μ_{E}(Φ)?

• One should work out modified realizability for monotone inductive definitions using the term language of systems of monotone inductive types and prove soundness of this interpretation. (For interleaving positive inductive definitions without “extended induction” and without second-order universal quantification this is sketched in [Ber95].)

• Is there a meta-theorem stating that the encodings read off the normalization proofs in the style of chapter 9 are always embeddings? It seems essential that in the presented proofs all the definitions of saturated sets by comprehension are closed via the saturated closure.

Because issues of denotational semantics were never touched in this thesis I close by expressing the hope that the methods of [Loa97] may be lifted from strictly positive types to the systems of this thesis.

Index

bar induction, 20

complete lattice, 33 congruence rules for μ, 59 critical pair, 109 Curry-Howard isomorphism, 1, 11, 17, 19,

26, 28, 30, 54

extended induction, 51

fixed-point types, 176 framework, 35 functoriality, 66–68, 176, 177

Gödel’s T, 76

homomorphic μ-elimination rules, 60 homomorphic μ-elimination rule, 60 homomorphic μ-introduction rule, 70 homomorphic μ^{+}-elimination rule, 60 homomorphic term rules for eF, 38 homomorphic term rules for F, 33 homomorphic type rules for eF, 37 homomorphic type rules for F, 32

inconsistency, 72 induction on r ∈ sn^{+}, 31 interleaving, 49

local confluence, 103

meta-convention, 28, 122 metapredicativity, 46 monotonization, 6

lower, 83 upper, 83

naïve reduction-free normalization, 22 nesting, 49

ordinals, 60 orthogonality, 109

Peirce formula, 23 permutative conversions, 24, 38, 68, 177 predecessor, 175 predicativity, 46

quadratic reasoning, 28

saturated closure, 115

sn, 20

standardization theorem, 22

stratification, 58

strongly normalizing terms, 20

Tarski’s theorem, 43, 63, 176

trees, 46

uniformity, 58

well-founded, 58 well-parsed, 21 witness of monotonicity, 52 180 INDEX

Bibliography

[Acz77] Peter Aczel. An introduction to inductive definitions. In Barwise [Bar77], pages 739–782.

[Alt93a] Thorsten Altenkirch. Constructions, Inductive Types and Strong Normalization. PhD thesis, University of Edinburgh, 1993.

[Alt93b] Thorsten Altenkirch. A formalization of the strong normalization proof for system F in LEGO. In Bezem and Groote [BG93], pages 13–28.

[Alt93c] Thorsten Altenkirch. Strong normalization for T+. ASCII note, 1993.

[Bar77] Jon Barwise, editor. Handbook of Mathematical Logic, volume 90 of Studies in logic and the foundations of mathematics. North–Holland, Amsterdam, 1977.

[Bar84] Henk P. Barendregt. The Lambda Calculus: Its Syntax and Semantics. North– Holland, Amsterdam, second revised edition, 1984.

[Bar93] Henk P. Barendregt. Lambda calculi with types. In Samson Abramsky, Dov M. Gabbay, and Tom S. E. Maibaum, editors, Background: Computational Structures, volume 2 of Handbook of Logic in Computer Science, pages 117–309. Oxford University Press, 1993.

[BB85] Corrado Böhm and Alessandro Berarducci. Automatic synthesis of typed λ-programs on term algebras. Theoretical Computer Science, 39:135–154, 1985.

[BBS^{+}98] Holger Benl, Ulrich Berger, Helmut Schwichtenberg, Monika Seisenberger, and Wolfgang Zuber. Proof theory at work: Program development in the MINLOG system. In Wolfgang Bibel and Peter H. Schmitt, editors, Automated Deduction—A Basis for Applications, Vol. II Systems and Implementation Techniques, volume 9 of Applied Logic Series. Kluwer Academic Publishers, 1998.

[Ber93] Ulrich Berger. Program extraction from normalization proofs. In Bezem and Groote [BG93], pages 91–106.

[Ber95] Ulrich Berger. A constructive interpretation of positive inductive definitions. Draft, March 1995.

[BFPS81] Wilfried Buchholz, Solomon Feferman, Wolfram Pohlers, and Wilfried Sieg. Iterated Inductive Definitions and Subsystems of Analysis: Recent Proof-Theoretical Studies, volume 897 of Lecture Notes in Mathematics. Springer Verlag, 1981.

[BG93] Marc Bezem and J.F. Groote, editors. Typed Lambda Calculi and Applications, volume 664 of Lecture Notes in Computer Science. Springer Verlag, 1993.

[BTG91] Val Breazu-Tannen and Jean Gallier. Polymorphic rewriting preserves algebraic strong normalization. Theoretical Computer Science, 83(1):3–28, 1991.

[CV97] Venanzio Capretta and Silvio Valentini. A general method to prove the normalization theorem for first and second order typed λ-calculi. To be published in Mathematical Structures in Computer Science, 1997.

[Dav55] Anne C. Davis. A characterization of complete lattices. Pacific Journal of Mathematics, 5:311–319, 1955.

[dB72] N. G. de Bruijn. Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem. Indagationes Mathematicae, 34:381–392, 1972.

[Fef77] Solomon Feferman. Theories of finite type related to mathematical practice. In Barwise [Bar77], pages 913–971.

[Fef82] Solomon Feferman. Monotone inductive definitions. In Anne S. Troelstra and Dirk van Dalen, editors, The L. E. J. Brouwer Centenary Symposium, pages 77–89. North– Holland, Amsterdam, 1982.

[Gal90] Jean H. Gallier. On Girard’s “candidats de reductibilité”. In Odifreddi [Odi90], pages 123–203.

[Gal98] Jean Gallier. Typing untyped λ-terms, or reducibility strikes again! Annals of Pure and Applied Logic, 91:231–270, 1998.

[Geu92] Herman Geuvers. Inductive and coinductive types with iteration and recursion. In Bengt Nordström, Kent Pettersson, and Gordon Plotkin, editors, Proceedings of the 1992 Workshop on Types for Proofs and Programs, Båstad, Sweden, June 1992, pages 193–217, 1992. Electronically available via

ftp://ftp.cs.chalmers.se/pub/cs-reports/baastad.92/proc.dvi.Z.

[Geu93] Herman Geuvers. Logics and Type Systems. Proefschrift (PhD thesis), University of Nijmegen, September 1993.

[Gir72] Jean-Yves Girard. Interprétation fonctionnelle et élimination des coupures dans l’arithmétique d’ordre supérieur. Thèse de Doctorat d’État, Université de Paris VII, 1972.

[GLT89] Jean-Yves Girard, Yves Lafont, and Paul Taylor. Proofs and Types, volume 7 of Cambridge Tracts in Theoretical Computer Science. Cambridge University Press, 1989.

[Gog94] Healfdene Goguen. A Typed Operational Semantics for Type Theory. PhD thesis, University of Edinburgh, August 1994. Available as LFCS Report ECS-LFCS-94-304.

[Gog95] Healfdene Goguen. Typed operational semantics. In Mariangiola Dezani-Ciancaglini and Gordon Plotkin, editors, Proceedings of the Second International Conference on Typed Lambda Calculi and Applications (TLCA ’95), Edinburgh, United Kingdom, April 1995, volume 902 of Lecture Notes in Computer Science, pages 186–200. Springer Verlag, 1995.

[GRS97] Thomas Glass, Michael Rathjen, and Andreas Schlüter. On the proof-theoretic strength of monotone induction in explicit mathematics. Annals of Pure and Applied Logic, 85:1–46, 1997.

[How80] W. A. Howard. The formulae-as-types notion of construction. In J. P. Seldin and J. R. Hindley, editors, To H. B. Curry: Essays on Combinatory Logic, Lambda Calculus and Formalism, pages 479–490. Academic Press, 1980.

[How92] Brian Howard. Fixed Points and Extensionality in Typed Functional Programming Languages. PhD thesis, Stanford University, 1992.

[JO97] Jean-Pierre Jouannaud and Mitsuhiro Okada. Abstract data type systems. Theoretical Computer Science, 173:349–391, 1997.

[Joa97] Felix Joachimski. On η-expansion in Gödel’s T , pure type systems and calculi with permutative conversions. Unpublished manuscript, September 1997.

[Kol85] George Koletsos. Church-Rosser theorem for typed functional systems. The Journal of Symbolic Logic, 50(3):782–790, 1985.

[Lei75] Daniel Leivant. Strong normalization for arithmetic (variations on a theme of Prawitz). In Justus Diller and G. H. Müller, editors, Proof Theory Symposion, Kiel, Germany, 1974, volume 500 of Lecture Notes in Mathematics, pages 182–197. Springer Verlag, 1975.

[Lei90] Daniel Leivant. Contracting proofs to programs. In Odifreddi [Odi90], pages 279–327.

[Loa95] Ralph Loader. Normalisation by translation. Unpublished note announced on the “types” mailing list on April 6, 1995.

[Loa97] Ralph Loader. Equational theories for inductive types. Annals of Pure and Applied Logic, 84:175–217, 1997.

[Men87a] Nax P. Mendler. Recursive types and type constraints in second-order lambda calculus. In Proceedings of the Second Annual IEEE Symposium on Logic in Computer Science, Ithaca, N.Y., pages 30–36. IEEE Computer Society Press, 1987. Forms a part of [Men87b].

[Men87b] Paul F. Mendler. Inductive definition in type theory. Technical Report 87-870, Cornell University, Ithaca, N.Y., September 1987. PhD Thesis (Paul F. Mendler = Nax P. Mendler).

[Mit96] John C. Mitchell. Foundations for Programming Languages. Foundations of Computing. The MIT Press, 1996.

[MKO95] David McAllester, Jakov Kučan, and Daniel Otth. A proof of strong normalization for F_{2}, F_{ω}, and beyond. Information and Computation, 121(2):193–200, 1995.

[ML84] Per Martin-Löf. Intuitionistic Type Theory. Bibliopolis, Napoli, 1984.

[MN98] Richard Mayr and Tobias Nipkow. Higher-order rewrite systems and their confluence. Theoretical Computer Science, 192:3–29, 1998.

[Mos74] Yiannis N. Moschovakis. Elementary Induction on Abstract Structures, volume 77 of Studies in Logic and the Foundations of Mathematics. North–Holland, Amsterdam, [Odi90] Piergiorgio Odifreddi, editor. Logic and Computer Science, volume 31 of APIC Studies

in Data Processing. Academic Press, 1990.

[Par92] Michel Parigot. Recursive programming with proofs. Theoretical Computer Science, 94:335–356, 1992.

[Pra71] Dag Prawitz. Ideas and results in proof theory. In Jens E. Fenstad, editor, Proceedings of the Second Scandianvian Logic Symposium, volume 63 of Studies in Logic and the Foundations of Mathematics, pages 235–307. North–Holland, Amsterdam, 1971.

[Rat96] Michael Rathjen. Monotone inductive definitions in explicit mathematics. The Journal of Symbolic Logic, 61:125–146, 1996.

[Rat98] Michael Rathjen. Explicit mathematics with the monotone fixed point principle. The Journal of Symbolic Logic, 63:181–200, 1998.

[Rat99] Michael Rathjen. Explicit mathematics with the monotone fixed point principle. II: Models. The Journal of Symbolic Logic, 1999? To appear.

[Rei96] Gunnar Reitel. Eine Realisierbarkeitsinterpretation der Arithmetik zweiter Stufe. Diplomarbeit (Master’s thesis), Ludwig-Maximilians-Universität München, September 1996. In German.

[Rey74] John C. Reynolds. Towards a theory of type structure. In B. Robinet, editor, Programming Symposium, volume 19 of Lecture Notes in Computer Science, pages 408–425, Berlin, 1974. Springer-Verlag.

[Sce89] Andre Scedrov. Normalization revisited. Contemporary Mathematics, 92:357–369, 1989.

[Str99] Thomas Strahm. First steps into metapredicativity in explicit mathematics. In S. Barry Cooper and John K. Truss, editors, Sets and Proofs. Invited Papers from the Logic Colloquium 97, University of Leeds, England, July 6–13, 1997. Cambridge University Press, 1999? To appear.

[Tai67] William W. Tait. Intensional interpretations of functionals of finite type I. The Journal of Symbolic Logic, 32(2):198–212, 1967.

[Tai75] William W. Tait. A realizability interpretation of the theory of species. In R. Parikh, editor, Logic Colloquium Boston 1971/72, volume 453 of Lecture Notes in Mathematics, pages 240–251. Springer Verlag, 1975.

[Tak95] Masako Takahashi. Parallel reduction in λ-calculus. Information and Computation, 118(1):120–127, 1995.

[Tar55] Alfred Tarski. A lattice-theoretical fixpoint theorem and its applications. Pacific Journal of Mathematics, 5:285–309, 1955.

[Tat94] Makoto Tatsuta. Two realizability interpretations of monotone inductive definitions. International Journal of Foundations of Computer Science, 5(1):1–21, 1994.

[UV97] Tarmo Uustalu and Varmo Vene. A cube of proof systems for the intuitionistic predicate μ-, ν-logic. In Magne Haveraaen and Olaf Owe, editors, Selected Papers of the 8th Nordic Workshop on Programming Theory (NWPT ’96), Oslo, Norway, December 1996, volume 248 of Research Reports, Department of Informatics, University of Oslo, pages 237–246, May 1997.

[vdP96a] Jaco van de Pol. Termination of higher-order rewrite systems. Quaestiones Infinitae XVI, Department of Philosophy, Utrecht University, 1996. Proefschrift (PhD thesis).

[vdP96b] Jaco van de Pol. Two different strong normalization proofs? In G. Dowek, J. Heering, K. Meinke, and B. Möller, editors, Proceedings of the Second International Workshop on Higher-Order Algebra, Logic and Term Rewriting (HOA ’95), Paderborn, Germany, volume 1074 of Lecture Notes in Computer Science, pages 201–220. Springer Verlag, 1996. Forms a part of [vdP96a].

[vR93] Femke van Raamsdonk. Confluence and superdevelopments. In Claude Kirchner, editor, Proceedings of the 5th International Conference on Rewriting Techniques and Applications (RTA ’93), Montreal, Canada, June 1993, volume 690 of Lecture Notes in Computer Science, pages 168–182. Springer Verlag, 1993.

[vR96] Femke van Raamsdonk. Confluence and Normalisation for Higher-Order Rewriting. Academisch Proefschrift (PhD thesis), Vrije Universiteit te Amsterdam, 1996.

[vRS95] Femke van Raamsdonk and Paula Severi. On normalisation. Technical Report CS-R9545, Centrum voor Wiskunde en Informatica (CWI), Amsterdam, June 1995.