STATMAN S HIERARCHY THEOREM

Size: px
Start display at page:

Download "STATMAN S HIERARCHY THEOREM"

Transcription

1 Logical Methods in Computer Science Vol. 13(4:19)2017, pp Submitted Aug. 12, 2013 Published Nov. 27, 2017 STATMAN S HIERARCHY THEOREM BRAM WESTERBAAN, BAS WESTERBAAN, RUTGER KUYPER, CARST TANKINK, REMY VIEHOFF, AND HENK BARENDREGT Radboud University Nijmegen address: bram@westerbaan.name address: bas@westerbaan.name address: r.kuyper@math.ru.nl address: carst@cs.ru.nl address: remyviehoff@student.ru.nl address: henk@cs.ru.nl Abstract. In the Simply Typed λ-calculus [Hin97, BDS13] Statman investigates the reducibility relation βη between types: for A, B T 0, types freely generated using and a single ground type 0, define A βη B if there exists a λ-definable injection from the closed terms of type A into those of type B. Unexpectedly, the induced partial order is the (linear) well-ordering (of order type) ω + 4, see [Sta80a, Sta80b, Sta81, BDS13]. In the proof a finer relation h is used, where the above injection is required to be a Böhm transformation ([Bar84]), and an (a posteriori) coarser relation h +, requiring a finite family of Böhm transformations that is jointly injective. We present this result in a self-contained, syntactic, constructive and simplified manner. En route similar results for h (order type ω + 5) and h + (order type 8) are obtained. Five of the equivalence classes of h + correspond to canonical term models of Statman, one to the trivial term model collapsing all elements of the same type, and one does not even form a model by the lack of closed terms of many types, [BDS13]. 1. Hierarchy of types We work in simply typed lambda calculus over a single base type 0. The set of open terms of (simple) type A is written Λ(A), while the set of closed terms of type A is denoted by Λ ε (A) (for reasons which become clear in Section 2). For types A, B one defines A βη B if there is a closed term Φ: A B that is an injection on closed terms modulo βη-equality. To get some feeling for the relation βη we begin by observing B (A C) βη A (B C) via λmab. mba (see Corollary 4.17); A C βη A B C via λmab. ma (see Lemma 4.16); A βη (A 0) 0 via λmf. fm (see Lemma 4.22); Key words and phrases: Simply typed lambda calculus, Head reducibility. LOGICAL METHODS l IN COMPUTER SCIENCE DOI: /LMCS-13(4:19)2017 c Westerbaan, Westerbaan, Kuyper, Tankink, Viehoff, and Barendregt CC Creative Commons

2 2 WESTERBAAN, WESTERBAAN, KUYPER, TANKINK, VIEHOFF, AND BARENDREGT [0, 0] βη 0 0 by counting closed inhabitants. Less intuitively clear is that for all simple types A over 0 one has A βη [0, 0] 0 0 (see Lemma 5.18). Also, one might ponder (writing 1 0 0) whether βη (no); βη (yes!); [0, 0] 0 0 βη (no). The general problem whether A βη B for given types A and B is solved by the Hierarchy Theorem (stated on page 3, due to Richard Statman [Sta80a, Sta80b]), which describes among other things the equivalence classes of βη in terms of (relatively) simple syntactic properties. We give a new proof, which is self-contained, syntactic and constructive. We assume only basic knowledge of the simply typed lambda calculus (long normal form, rank,... ), and recall the most important notions before using them. Roughly speaking, the proof is one long syntactic analysis of inhabitants of simple types and reductions between them; we make no use of term models and the like. The proof is constructive in the sense that we do not use the law of the excluded middle, and so one may easily ignore this feature of the proof (except perhaps when reading Theorem 1.8). Applications of the Hierarchy Theorem include the polynomial decidability of the Decidable Unification Problem,[Sta81] the 1-Section Theorem[Sta85] (which itself has many uses, see [Rie95]), and the construction of the five canonical term models (see 3.5 of [BDS13]). For more details on the Hierarchy Theorem, its applications, and another proof, we refer the reader to Section 3.4 of [BDS13] Hierarchy Theorem. To formulate the theorem we first recall a few notions and some notation from the simply typed lambda calculus, see Section 1.1 and Section 3.4 of [BDS13]. Definition 1.1. (i) Let A be a type. The components of A are the unique types A 1,..., A n such that A = A 1 A n 0. (ii) Each type A has a rank denoted by rk(a); it is defined recursively by rk(0) 0; rk(a B) max{ rk(a) + 1, rk(b) }. (iii) A type A A 1 A n 0 is fat when n 2. (iv) A type A A 1 A n 0 is large if either A has a fat component A i, or one of A s components A i A i1 A im 0 has a large component A ij. (v) A type which is not large, is called small. (vi) Let A, B be types and k, n natural numbers. The following notation is used. [ A 0 B B n + 1 n 0; A k+1 B A A k B. Definition 1.2 (Reducibility relations). Let A A 1 A n 0 and B B 1 B m 0 be types.

3 STATMAN S HIERARCHY THEOREM 3 (i) A βη-reduces to B, notation A βη B, if for some R Λ ε (A B) RM 1 = βη RM 2 = M 1 = βη M 2 (M 1, M 2 Λ ε (A) ). This R is then called a reducing term from A to B. (ii) A head reduces to B, notation A h B, if A βη B with a reducing term of the form R λm A b B 1 1 b Bm m. mϱ a1 ϱ an where ϱ ai :A i are open terms with free variables from b B 1 1,..., bbm m. We call a term of this form a Böhm term. (iii) A reduces multi-head to B, notation A h + B, provided there exist Böhm terms R (1),..., R (l) which are jointly injective, that is, for M 1, M 2 Λ ε (A), i [ R (i) M 1 = βη R (i) M 2 ] = M 1 = βη M 2. Theorem 1.3 (Statman Hierarchy). The relations h +, βη and h are increasingly fine. 1 Their equivalence classes are listed below vertically in descending order. The types H α in the last column (called canonical types) are representatives for the equivalence classes of h. T 5 T 4 T 3 T 2 T 1 B ω+3 B ω+2 B ω+1 B ω. B k H ω+4 H ω+3 H ω+2 H ω+1 H ω. H k H ω+4 (0 0 0) 0 0 H ω H ω H ω H ω H k 0 k 0 T 0 T 1. B 2 B 1 B 0. H 2 H 1 H 0 H H H 0 0 h + βη h Moreover, the equivalence classes H α of h have the following syntactic description, and the relations h +, βη and h are hence decidable. H ω+4 = { A: A is inhabited and large }; H ω+3 = { A: A is inhabited, small and rk(a) > 3 }; H ω+2 = { A; A is inhabited, small, rk(a) {2, 3} and A has at least two components of rank 1 }; H ω+1 = { A: A is inhabited, small, rk(a) = 3 and A has exactly one component of rank 1 }; H ω = { A: A is inhabited, small, rk(a) = 2 and A has exactly one component of rank 1 }; H k = { A: A is inhabited, small, rk(a) = 1 and A has exactly k components of rank 0 }; 1 Viz. A h + B = A βη B and A βη B = A h B for all types A and B.

4 4 WESTERBAAN, WESTERBAAN, KUYPER, TANKINK, VIEHOFF, AND BARENDREGT H 0 = { A: A is not inhabited }. We give an overview of the proof of Theorem 1.3 in Subsection 1.4. To be able to do this, we first expose the precise relation between the syntactic structure of a type and the shape of its (long normal form) inhabitants in Subsection 1.2, and we examine the inhabitants of the canonical types H 0, H 1,... in Subsection 1.3. While technical details are unavoidable in a paper like this, we make them more palatable by introducing some syntactic sugar in Section 2. With it we can already prove the inequalities between the canonical types (such as [0, 0] h [0]) in Section 3. We proceed by developing a general theory about reductions in Section 4 to establish the order type of h in Section 5, and the order types of βη and h + in Section 6. Since we are in the fortunate position to have strong normalization, every term has a long normal form (lnf), which is the βη 1 -normal form. As default we will only consider terms in lnf. The few exceptions will not pose a problem to the reader Syntactic structure and inhabitants. Recall that for any type A, there are unique types A 1,..., A n such that A = A 1... A n 0. Hence it is natural to write Definition 1.4. [A 1,..., A n ] A 1 A n 0. Observation 1.5. Any (lnf-)inhabitant M of a type A is of the form λa 1 a n. b B N 1 N m. Writing A = [A 1,..., A n ] and B = [B 1,..., B m ] we have that (i) the types of the variables a 1,..., a n are respectively A 1,..., A n and (ii) the types of the terms N 1,..., N m are respectively B 1,..., B m. Observation 1.6. We can write every type A using only the operation [ ] in a unique way. For example, 0 = [ ] and n + 1 = [n]. In this way we can consider types to be finite trees. For instance, the canonical types are represented by the following trees. 0 0 [0] 0 0 [0, 0] [1, 0] [2] [1, 1, 0] [3, 0] [0, 0] [[0, 0], 0] From this we see that given a type A, the nodes on odd height of the tree A are the types of the variables which might occur in closed terms of type A, while the possible types of the subterms are those on even height. (E.g., in a closed term of type [3, 0] such as λφ 3 c 0. Φλf 1 1. f 1Φλf 1 2. f 1f 2 c the introduced variables are of type 3 and 1, while the subterms are of type 2 and 0.) Observation 1.7. The syntactic properties mentioned in Theorem 1.3 are more easily defined and understood when considering a type to be a tree. (i) The rank of a type A is its height as a tree. If the rank of A is restricted from above to, say 2, the variables occurring in a closed term M of type A are of rank 0 or 1 so that all the variables in M are introduced at the head, contrary to types like [3, 0]

5 STATMAN S HIERARCHY THEOREM 5 (ii) A type A is fat if it has more than one component. Fat types are important, because a variable of fat type can be used to construct a pairing (see Lemma 4.42). Moreover, A is large if A as tree has a fat type on odd height. One can show that if A is inhabited, then A is large if and only if there is closed inhabitant M of A which contains a (bound) variable of fat type. In particular, if a type is small (= not large), then its inhabitants are strings of a variable followed by the mandatory abstractions λa A a An n. G λb B b Bm m. H λc C cc k k Inhabitants of the canonical types H α. By the preceding observations we can determine the (lnf-)inhabitants of a given type. As an example (and also since we will need them), we list by an iconic shorthand (explained by ) the inhabitants of the canonical types below. The verification is left to the reader. (The graphical inhabitation machines from Examples of [BDS13] might prove illuminating here, see also [SDB15].) To make terms more readable, we leave out parentheses. There is only one way to place parentheses to get a term obeying the typing rules. E.g., we read λf 1 g 1 c 0. fggfc as λf 1 g 1 c 0. f(g(g(fc))); λb [0,0] c 0. bcbcc as λb [0,0] c 0. (bc)((bc)c). We abbreviate [A, A, A, C, C] to [A 3, C 2 ], etcetera H k = [0 k ]. The inhabitants (of [0 k ]) are the projections on k elements: U k i λx 0 1 x 0 k. x i for 0 < i k H ω = [1, 0]. The inhabitants are the Church-numerals, c n λf 1 c 0. f (n) c, where f (0) c = c and f (n+1) c = f(f (n) c). As a warm-up for what is coming, note that the inhabitants of [1, 0] are produced by the following two-level grammar. λf 1 c 0. N where N ::= (fn) c H ω+1 = [2]. An inhabitant can be identified by a pair of natural numbers i, j λf 2. F λx 0 1. F λx 0 i. x j where j i. These terms are produced by the following grammar. λf 2. P 0 where P n ::= (F λx 0 n+1. P n+1 ) x 1 x n H ω+2 = [1, 1, 0]. The inhabitants are essentially words over a two element alphabet, λf 1 g 1 c 0. W where W ::= (fw) (gw) c. Hence we use words over {f, g} as shorthands. For instance, ffggf λf 1 g 1 c 0. ffggfc.

6 6 WESTERBAAN, WESTERBAAN, KUYPER, TANKINK, VIEHOFF, AND BARENDREGT H ω+3 = [3, 0]. The inhabitants are produced by the following grammar. λφ 3 c 0. M 1 where M n ::= (Φ λf 1 n. W n ) c W n ::= (f 1 W n ) (f n W n ) M n+1 By replacing Φ(λf 1 i. ) with /, hiding λφ3 c 0. and hiding the c at the end, we obtain a shorthand for the inhabitants of [3, 0]. For instance, /1//23 λφ 3 c 0. Φλf 1 1. f 1 Φλf 1 2. Φλf 3. f 2 f 3 c. So we identify an inhabitant of [3, 0] with a list of words w 1,..., w n with w i {1,..., i} H ω+4 = [[0, 0], 0]. The inhabitants are (like) binary trees: We will denote them as such. For instance, λb [0,0] c 0. T where T ::= (btt) c. λb [0,0] c 0. bbccc and λb [0,0] c 0. bcbcc Structure of the proof. In this Subsection, we present the proof of the Hierarchy Theorem. We delegate most of the work to the remainder of this article by using statements proved later on. What is left is the compact skeleton of the proof. Proof of Theorem 1.3. We need to prove the following. (I) The relations h, βη and h + are as displayed on page 3. (II) The relations h, βη and h + are decidable. Concerning (I). We first consider the relation h. Let the sets H α be defined as on page 3. One easily verifies that the H α form a partition of T 0, and that H α H α for all α. To show that h is of the form as on page 3 it suffices to show that for all A, B T 0 and α, β ω + 5 with A H α and B H β, we have that A h B H α h H β α β (1.1) For this we use the following four facts proved later on. (i) A H α = H α h A (see Subsection 5.1). (ii) A H α = A h H α (see Subsection 5.2). (iii) α β = H α h H β (see Subsection 5.3). (iv) α β = H α h H β (see Section 3). Before we prove Statement (1.1) let us spend some words on fact (iv). In Section 3 we do not directly prove that α β = H α h H β. Instead we show the inequalities listed below in Statement (1.2) (writing A h,βη B for A βη B & A h B, etcetera). Together with fact (iii), this is sufficient to establish fact (iv). Indeed suppose that α β and H α h H β for some α and β in order to obtain a contradiction. Then β < α, so β + 1 α. Thus H β+1 h H α h H β by fact (iii). This contradicts the inequality H β+1 h H β from Statement (1.2). It is interesting to note that we will prove the inequalities from Statement (1.2) of the form H β h,βη,h +H α (except one) by showing that there are distinct terms N 1, N 2 Λ ε (H β ) such that R N 1 = βη R N 2 for all R Λ ε (A B) (see Lemma 3.2). These terms N 1, N 2 are listed on the right in Statement (1.2) using the notation from Subsection 1.3.

7 STATMAN S HIERARCHY THEOREM 7 [[0, 0], 0] h,βη,h + [3, 0] N 1 = N 2 = [3, 0] h,βη,h + [1, 1, 0] N 1 = /1/21 N 2 = /1/22 [1, 1, 0] h,βη,h + [2] N 1 = fgfg N 2 = fggf [2] h [1, 0] (1.2) [1, 0] h,βη,h + [0 k+2 ] N 1 = c 1 N 2 = c 2 [0 k+2 ] h,βη [0 k+1 ] [0 k+1 ] h,βη,h + 0 Let us prove Statement (1.1). The first equivalence follows from facts (i) and (ii), the second equivalence follows directly from facts (iii) and (iv). We now turn to the order type of the reducibility relation βη. To show that βη is of the form as depicted on page 3, we need to prove that A βη B α β or α, β {ω, ω + 1} (1.3) for all α, β ω + 5 and all A H α and B H β. Note that A h B = A βη B for all types A and B. (1.4) Hence A βη H α for all A H α, since A h H α for A H α by facts (i) & (ii). So to prove Statement (1.3), it suffices to show that H α βη H β α β or α, β {ω, ω + 1}. (1.5) The implication = follows from Statements (1.1), Statement (1.4) and H ω+1 βη H ω (see Subsection 6.2). Concerning =. Let α, β ω + 5 be given. Suppose that H α βη H β. Then since and = on ω + 5 are decidable, it suffices to show that the negation of the right-hand side of Statement (1.5) leads to a contradiction. Suppose that β < α and not α, β {ω, ω + 1}. Then β γ < γ + 1 α for some γ ω + 5 with γ ω. (Pick γ = β if β ω, or pick γ = ω + 1 otherwise.) Then H γ+1 βη H γ by Statement (1.2), but we also have that H γ+1 βη H α βη H β βη H γ, a contradiction. We have proven Statement (1.3). We continue with the order type of h +. We need to prove that A h + B α β or α, β {ω, ω + 1} or α, β {2,..., ω} for all α, β ω + 5 and all A H α and B H β. Again, we have (1.6) A h B = A h + B for all types A and B, (1.7) and A h + H α for all A H α. So it suffices to show that H α h + H β α β or α, β {ω, ω + 1} or α, β {2,..., ω}. The implication = follows from Statement (1.1), and Statement (1.7) and H ω+1 h + H ω and H k+1 h + H k (k 2) (see Subsection 6.1). (1.8) The implication = can be proven using the inequalities of Stat. (1.2) in a similar fashion as the implication = of Stat. (1.5) was proven above. We leave this to the reader.

8 8 WESTERBAAN, WESTERBAAN, KUYPER, TANKINK, VIEHOFF, AND BARENDREGT Concerning (II). To show that the reducibility relations h, βη and h + are decidable, we prove that for every type A an α ω + 5 can be computed with A H α. (This is sufficient because if A H α and B H β then A h B can be decided using Statement (1.1); A βη B using Statement (1.3); A h + B using Statement (1.6).) Of course, algorithms to determine the rank of a type, the number of components and whether the type is large or small are defined easily enough; the difficulty here is how to decide whether a given type is inhabited. By Proposition of [BDS13] (which is proven using the law of the excluded middle) a type A [A 1,..., A n ] is inhabited iff A i is uninhabited for some i. From this fact a recursive algorithm to determine whether a type A is inhabited is easily concocted. Since we want constructive proof of the Hierarchy Theorem, we have formulated and proven a constructive variant of Proposition of [BDS13], see Theorem 1.8 below. Note that the algorithm to determine inhabitation in the constructive case is the same as in the classical case; only the proof that the algorithm is correct is different. This concludes the proof of the Hierarchy Theorem. Theorem 1.8. Let A = [A 1,..., A n ] be a type. Then either A is inhabited or not, and A is uninhabited all A i are inhabited. (1.9) Proof. Concerning =. Suppose towards a contradiction that all A i are inhabited, and A is inhabited too. Pick M Λ ε (A) and N i Λ ε (A i ) for each i. Then N M 1 M n is a closed inhabitant of 0, which is impossible. We prove = and either A is inhabited or not by induction on the buildup of types as tuples using the operation [ ]. Let A = [A 1,..., A n ] with A i = [A i1,..., A imi ] be given. For all i {1,..., n}, suppose the following. (i) Either A i is inhabited or A i is uninhabited. (ii) If A i is uninhabited then A ij is inhabited for all j. We need to prove that all A i are inhabited provided that A is uninhabited, and that either A is inhabited or A is uninhabited. Assume that A is uninhabited in order to show that all A i are inhabited. By (i), either all A i are inhabited or some A i is uninhabited. In the former case we are done; so let us prove the latter case leads to a contradiction. Assume A i is uninhabited for some i. By (ii) A ij is inhabited for all j. Pick N j Λ ε (A ij ) for all j. Then λa A 1 1 a An n. a i N 1 N mi is a closed inhabitant of A, contradicting that A is uninhabited. Therefore, all A i are inhabited. Consequently, A is inhabited iff not all A i are inhabited. Since (by (i)) either all A i are inhabited or not, it follows A is either inhabited or not. 2. Reductions and contexts In this section we introduce some syntactic sugar that will save ink later on. Definition 2.1. (i) A context is a sequence of distinct typed variables, c C 1 1,..., cc k k. The letters Γ,, Θ, and Ξ denote contexts. The empty context is denoted by ε; concatenation of contexts is written as Γ,.

9 STATMAN S HIERARCHY THEOREM 9 (ii) For a context Γ = c C 1 1,, cc k k write λγ. N λc C cc k. N k {Γ} {c C 1 1,..., cc k k } Λ Γ (A) { M Λ(A) FV(M) {Γ} } [Γ] [C 1,..., C k ]. (iii) Let Γ = c C 1 1,..., cc k k be a context. We say P fits in Γ if P = P 1,..., P k is a tuple of (open) terms, and P i : C i for every i. In that case we write M[Γ:= P ] M[c 1 :=P 1 ]... [c k :=P k ]. Remark 2.2. Recall that we have assumed that all terms are in long normal form. In particular, if M Λ Γ ([ ]), then M is of the form M λ.n where FV(N) {Γ, }. Using contexts one can formulate statements such as N Λ Γ (0) = λγ. N Λ ε ([Γ]), and (λγ. N) P = β N[Γ:= P ] for any term N and P which fits in Γ. Also contexts lighten the study of reductions as will be shown in the following. We study the relation A 1 h A 2 for types A 1, A 2 (see Definition 1.2(ii)). Note that A 1 h A 2 if and only if there is a Böhm transformation Φ: Λ ε (A 1 ) Λ ε (A 2 ), which is injective (on lnf-terms). That is, Φ should be of the form Φ(M) = βη RM where R is some Böhm term (see Definition 1.2(ii)). More explicitly, writing A 1 [ 1 ] and A 2 [ 2 ], the map Φ should be of the form Φ(M) = λ 2. M P where P fits in 1 and FV( P ) { 2 }. Let Φ be such a Böhm transformation, then it transforms λ 1. N to λ 2. N[ 1 := P ]. To see if Φ is injective, we only need to focus on the transformation mapping N to N[ 1 := P ]. A map Λ 1 (0) Λ 2 (0) of this form is also called a Böhm transformation. In order to construct these Böhm transformations it pays off to consider the more general Böhm transformations from Λ Γ 1 ([ 1 ]) Λ Γ 2 ([ 2 ]) which map λ 1. N to λ 2. N [ 1 := P ] [Γ 1 := Q], where P, Q fit in 1, Γ 1, respectively, having free variables from Γ 2, 2. Note that the core of these transformations is the substitution of P, Q for 1, Γ 1. These considerations lead to the next set of definitions. Definition 2.3. (i) A pair Γ A is called a context type and has as intended meaning the set Λ Γ (A) of terms M : A with FV(M) {Γ} (see Definition 2.1(ii)). (ii) Define for such Γ A the type Γ A C 1... C k A = [Γ, ], if Γ c C 1 1,..., cc k k and A [ ]. (iii) We say Γ 1 A 1 reduces to Γ 2 A 2 and write Γ 1 A 1 Γ 2 A 2 provided that Γ 1 A 1 h Γ 2 A 2. (iv) We write Γ 1 A 1 Γ 2 A 2 provided that Γ 1 A 1 Γ 2 A 2 and Γ 1 A 1 Γ 2 A 2.

10 10 WESTERBAAN, WESTERBAAN, KUYPER, TANKINK, VIEHOFF, AND BARENDREGT (v) Let Γ, be contexts. A substitution from Γ to is a map ϱ from {Γ} to terms such that ϱ c ϱ(c) Λ (C) for all c C {Γ}. (vi) Let Γ 1 [ 1 ] and Γ 2 [ 2 ] be given. A substitution ϱ from Γ 1 [ 1 ] to Γ 2 [ 2 ] is a substitution from Γ 1, 1 to Γ 2, 2. (vii) Let ϱ be as in (v). For every context Θ d D 1 1,..., dd l k with {Θ} {Γ}, define ϱ Θ ϱ d1,..., ϱ dl. (Then ϱ Θ fits in Θ, see Definition 2.1(iii).) (viii) Let ϱ be as in (vi). Writing A 1 = [ 1 ] & A 2 = [ 2 ], define ˆϱ: Λ Γ 1 (A 1 ) Λ Γ 2 (A 2 ) by ˆϱ( λ 1. N ) λ 2. N [Γ 1 := ϱ Γ1 ] [ 1 := ϱ 1 ] = β λ 2. (λ 1. N)[Γ 1 := ϱ Γ1 ] ϱ 1. Such a map ˆϱ is called a (Böhm-)transformation from Γ 1 A 1 to Γ 2 A 2. Proposition 2.4. Let Γ 1 A 1 and Γ 2 A 2 be context types. Then [ Γ 1 A 1 Γ 2 There is a substitution ϱ from Γ 1 A A 2 1 to Γ 2 A 2 such that the transformation ˆϱ: Λ Γ 1 (A 1 ) Λ Γ 2 (A 2 ) is injective. Proof. Just unfold the definitions. Hence, if Γ 1 A 1 reduces to Γ 2 A 2, then there is an injective Böhm transformation Φ = ˆϱ from Λ Γ 1 (A 1 ) to Λ Γ 2 (A 2 ). We will focus on ϱ instead of R as the following convention shows. (The benefit of this becomes clear later, see Remark 4.4.) Convention 2.5. A reduction from Γ 1 A 1 to Γ 2 A 2 is a substitution ϱ from Γ 1 A 1 to Γ 2 A 2 such that the Böhm transformation ˆϱ is injective. Since A h B ε A ε B for all types A and B, it is natural to regard the types part of the context types by identifying A with ε A. As such, any notion defined for context types can be applied to types as well. For notational brevity, we also identify Γ and Γ 0 for any context Γ. In this way we also regard the contexts as part of the context types. As such, any notion defined for context types is applicable to contexts. In particular, we obtain a notion of reduction between contexts; Γ Γ 0 0. Note that with these identifications we have Γ, Γ [ ] [Γ, ] for all Γ,. 3. Inequalities between canonical types In this section we will prove the inequalities listed in Statement (1.2) on page 7. This is one of the bits left out of the proof of the Hierarchy Theorem in Subsection 1.4. We start with two of the simpler inequalities Ad H k+1 βη H k. As H k has exactly k inhabitants, there is no injection from Λ ε (H k+1 ) to Λ ε (H k ), and hence no βη-reduction from H k+1 to H k (see Definition 1.2(i)).

11 STATMAN S HIERARCHY THEOREM Ad H ω+1 h H ω. We need to prove that [2] h [1, 0]. Or in other words, we must prove that [2] f 1, c 0 (see Definition 2.3(iii)). Let ϱ be a substitution from [2] to f 1, c 0 ; we will prove that the Böhm transformation ˆϱ is not injective. (Hence [2] f 1, c 0 by Proposition 2.4.) To this end we simply calculate ˆϱ(M) for M Λ ε ([2]). Recall that an inhabitant of [2] is of the following form (see 1.3.3). So we have i, j λf 2. F λx 0 1. F λx 0 i. x j ˆϱ( i, j ) i, j ϱ F = β ϱ F λx 0 1. ϱ F λx 0 i. x j. (3.1) Further, note that since ϱ F is an element of Λ f 1,c 0 (2) it must be of the following form. ϱ F λg 1. f (k 0) gf (k 1) gf (kn) c. We first exclude a pathological case. If n = 0, then ˆϱ( i, j ) = β f (k 0) c. So ˆϱ is constant and hence not injective. So let us assume that n > 0. To reduce Equation (3.1), note the following. (i) Let G λy 0. f (m) x; we calculate ϱ F G. To start, GM = β f (m) x for all terms M. So if M f (k 1) Gf (k 2) Gf (kn) c, then (ii) Let G λy 0. f (m) y. We have ϱ F G ϱ F λy 0. f (m) x = β f (k 0) GM = β f (k 0) f (m) x ϱ F λy 0. f (m) y = β f (k 0) Gf (k 1) Gf (kn) c = β f (k 0+m+k 1 + +m+k n) c = β f (m n+ i k i) c. So if we apply (i) and (ii) to Equation (3.1), in this order, (i), (ii), (i), we obtain ϱ F ( i, j ) = β ϱ F λx 0 1. ϱ F λx 0 j. f ((i j)k 0) x j = β ϱ F λx 0 1. ϱ F λx 0 i 1. f (n(i j)k 0+ i k i) c = β f ((i 1)k 0+n(i j)k 0 + i k i) c. Consequently, 3, 1 and n + 3, n + 2 are both sent to f (2(n+1)k 0+ i k i) c by ˆϱ Indiscernibility. The remaining inequalities are of the form H α h,βη,h + H β. In this subsection we develop some general theory to prove them. In fact, we prove a stronger statement: there are terms M 1 M 2 in H α (listed in Statement (1.2) on page 7) such that RM 1 = βη RM 2 for all R: H α H β. (3.2) That is, M 1 and M 2 are indiscernible for any term R: H α H β. (This is called observational equivalence in the literature[bds13].) As Proposition 3.6 shows, instead of proving that M 1 and M 2 are indiscernible for every R: H α H β, it suffices to prove that for certain variants H β of H β, the terms M 1 and M 2 are indiscernible for any Böhm transformation from H α to H β. (This is called existential equivalence.) This general method of proving that H α h,βη,h + H β has been extracted from the proof in [Dek88] of [3, 0] h [1, 1, 0].

12 12 WESTERBAAN, WESTERBAAN, KUYPER, TANKINK, VIEHOFF, AND BARENDREGT Definition 3.1. Let Γ A and be given. For M 1, M 2 Λ Γ (A) define M 1 Ob M 2 R [ R(λΓ. M 1 ) = βη R(λΓ. M 2 ) ], M 1 Ex M 2 ϱ [ ˆϱM 1 = ˆϱM 2 ], where R ranges over the closed terms R: (Γ A) [ ] and ϱ ranges over the substitutions from Γ A to. (So ˆϱ is a Böhm transformation.) Lemma 3.2. Let A and B [ ] be types and M 1, M 2 Λ ε (A) with M 1 M 2. (i) M 1 Ob M 2 implies A βη B. (ii) M 1 Ex M 2 implies A h B and A h + B. Proof. (i). Suppose M 1 Ob M 2 and A βη B towards a contradiction. Since A βη B, there a reducing term R Λ ε (A B) (see Definition 1.2(i)). Since M 1 Ob M 2, we get RM 1 = βη RM 2 (see Definition 3.1). But this implies that M 1 = M 2 (as R is a reducing term), contradicting M 1 M 2. Hence A βη B. (ii). Assume that M 1 Ex M 2. We will that prove A h + B, and hence a fortiori A h B (see Definition 1.2). Suppose that A h + B towards a contradiction. Pick a family of substitutions ϱ 1,..., ϱ n from A to [ ] such that i [ ˆϱ i (M) = ˆϱ i (N) ] = M = N (M, N Λ ε (A)). (3.3) Let i and M Λ ε (A) be given. Then we know that ˆϱ i (M) = λ. M ϱ Γ i and M ϱ Γ i Λ (0) where A = [Γ]. Hence M M ϱ Γ i is a Böhm transformation from A to. Thus we get M 1 ϱ Γ i = M 2 ϱ Γ i by M 1 Ex M 2 (see Definition 3.1). Then ˆϱ i (M 1 ) = ˆϱ i (M 2 ). So Statement (3.3) implies that M 1 = M 2, contradicting M 1 M 2. Hence A h + B. To formulate Proposition 3.6, we need one more notion. Observation 3.3. An inhabitant M of a context Γ, i.e. M Λ Γ (0), is of the form M a A (λγ 1. M 1 ) (λγ k. M k ), where a A {Γ}, A = [[Γ 1 ],..., [Γ k ]] and M i is an inhabitant of Γ, Γ i. Definition 3.4. Let Γ be a context and a A {Γ} with A [[Γ 1 ],..., [Γ k ]]. Then for all i the context Γ, Γ i is said to be a direct derivative of Γ. A context Γ is a derivative of Γ if there is a chain of direct derivatives from Γ to. 2 Examples 3.5. (1) The only derivative of x 0, f 1 is x 0, f 1 itself. In fact, a context Γ has only one derivative (c.q. itself) iff rk([γ]) 2. (2) Any derivative of F 2 is of the form F 2, x 0 1,..., x0 n for some n, and any derivative of Ω 3 is of the form Ω 3, f 1 1,..., f 1 n for some n. (3) The context Φ 4, F 2, x 0, G 2 is a derivative of Φ 4. Any derivative of Φ 4 is of the form Φ 4,, where is a context with { } = {F 2 1,..., F 2 m, x 0 1,..., x0 n} for some n, m with n 0 = m 0. Proposition 3.6. Given a type A, terms M 1, M 2 Λ ε (A) and a context, [ M 1 Ex M 2 ] = M 1 Ob M 2. Here ranges over contexts such that m A, is a derivative of m A,. 2 Equivalently, the relation on contexts of being a derivative is the transitive reflexive closure of the relation on contexts of being a direct derivative.

13 STATMAN S HIERARCHY THEOREM 13 Proof. Assume M 1 Ex M 2 for every. We will prove that N[m:=M 1 ] = N[m:=M 2 ] for each and N Λ ma, (0). (3.4) This is sufficient. Indeed, suppose that R: A [ ] with R λm A. N. Then we have that RM 1 = β N[m:=M 1 ] = N[m:=M 2 ] = β RM 2. Hence M 1 Ob M 2, as required. To prove Statement (3.4), we use induction (over the long normal form of N). Let N Λ ma, (0) be given for some such that m A, is a derivative of m A,. We have N c (λγ 1. N 1 ) (λγ k. N k ), where c {m A, } and N j Λ ma,,γ j (0) for all j (see Observation 3.3). To use induction over N, we need to prove that every N j falls in the scope of Statement (3.4), i.e. that N j Λ ma, (0) for some such that m A, is a derivative of m A,. That is, we need to have that m A,, Γ j is a derivative of m A,. This is indeed the case because m A,, Γ j is a direct derivative of m A,, and m A, itself is a derivative of m A, (see Definition 3.4). We need to prove that N[m:=M 1 ] = N[m:=M 2 ], and by induction we may assume that N i [m:=m 1 ] = N i [m:=m 2 ] for all i. Note that either c { } or c = m A. In the former case, m c, so N[m:=M j ] = c (λγ 1. N 1 [m:=m j ]) (λγ k. N k [m:=m j ]), hence N[m:=M 1 ] = N[m:=M 2 ], as required. In the latter case, we have c = m A (and thus A = [[Γ 1 ],..., [Γ k ]]), so N[m:=M j ] = M j (λγ 1. N 1 [m:=m j ]) (λγ k. N k [m:=m j ]) = ˆϱM j, where ϱ is the substitution from A = [a [Γ 1] 1,..., a [Γ k] ] to given by ϱ ai λγ i. N i [m:=m j ], but since M 1 Ex M 2, we have ˆϱM 1 = ˆϱM 2 and N[m:=M 1 ] = N[m:=M 2 ]. Corollary 3.7. Let A and B = [ ] be types. Let M 1, M 2 Λ ε (A) with M 1 M 2 and [ M 1 Ex M 2 ], where ranges over contexts such that m A, is a derivative of m A,. Then A βη B; A h B; A h + B. Proof. Combine Proposition 3.6 and Lemma 3.2. k 3.4. Ad H ω h + H k+1 and H ω βη H k+1. We need to prove that [1, 0] h + [0 k+1 ] and [1, 0] βη [0 k+1 ]. We use Corollary 3.7 with M i c i (see 1.3.2) and x 0 1,..., x0 k+1. Let m [0,1], be a derivative of m [0,1],. We need to prove that c 1 Ex c 2. Note that x 0 1,..., x0 m for some m k + 1. Let ϱ be a substitution from [f 1, c 0 ] to. In order to show that M 1 Ex M 2, we need to prove that ˆϱc 1 = ˆϱc 2. The term ϱ f Λ (1) is either λy 0. y or λy 0. x i for some i. (i) In the former case, ˆϱc i = ϱ (i) f ϱ c = ϱ c, so ˆϱc 1 = ˆϱc 2. (ii) In the latter, ϱ f M = β x i for each M, so in particular ˆϱc 1 = x i = ˆϱc 2.

14 14 WESTERBAAN, WESTERBAAN, KUYPER, TANKINK, VIEHOFF, AND BARENDREGT 3.5. Ad H ω+2 h + H ω+1 and H ω+2 βη H ω+1. Again we use Corollary 3.7, but now with M 1 = fgfg and M 2 = fggf (see 1.3.4). Let ϱ be a substitution from [f 1, g 1, c 0 ] to a context, such that m [1,1,0], is a derivative of m [1,1,0], F 2 ; we need to show that ˆϱM 1 = ˆϱM 2. Note that = F 2, d 0 1,..., d0 l for some l. Let us first study ϱ f Λ (1); it is of the form ϱ f λz 0. F λx 0 1. F λx 0 i. e, for some i, where either e = z, e = d k or e = x k for some k. So for any term M, { F λx 0 1 ϱ f M =. F λx0 i. M if e = z β F λx 0 1. F λx0 i. e otherwise. In the latter case, ˆϱM 1 ˆϱ(fgfg) = βη ϱ f ˆϱ(gfg) = β F λx 0 1. F λx0 i. e and similarly ˆϱM 2 = βη F λx 0 1. F λx0 i. e, so ˆϱM 1 = ˆϱM 2. So let us instead assume that ρ f = λz 0. F λx 0 1. F λx 0 i. z. By similar reasoning for g, we are left with the case that, for some j, ϱ g = λz 0. F λx 0 1. F λx 0 j. z. Abusing notation, one could set h F λz 0. and write ϱ f = h i z. Then ˆϱM 1 ˆϱ(fgfg) = β h i h j h i h j ϱ c = h 2(i+j) ϱ c = β ˆϱ(fggf) ˆϱM Ad H ω+3 h + H ω+2 and H ω+3 βη H ω+2. We use Corollary 3.7 with (see 1.3.5) M i /1/2i. Let m [3,0], be a derivative of m [3,0], f 1, g 1, d 0, and ϱ a substitution from [Φ 3, c 0 ] to. One easily verifies that { } = {f, g, d, G 2 1,..., G2 ν, d 0 1,..., d0 µ} for some ν, µ. We need to prove the following equality. ˆϱM 1 = ˆϱM 2 (3.5) To this end, we first calculate ϱ Φ M for M Λ Ξ (2) where Ξ h 1 1,..., h1 m,. The result is recorded in Lemma 3.8. We start with two remarks. First, note that ϱ Φ Λ (3) is of the form where w i are words on the alphabet ϱ Φ λf 2. w 0 F λz 0 1. w 1 F λz 0 n. w n e, (3.6) A = {f, g, G 1 λy 0.,..., G ν λy 0. } and e is a variable of type 0, so either e = d, e = z i for some i {1,..., n}, e = d i for some i {1,..., m}, or e = y for some y introduced by a G j in one of the w k. Secondly, we know that any M Λ Ξ (2) is of the form where H i Λ Ξ (1) and R Λ Ξ (0). M λh 1. H 1 hh 2 h H l hr Lemma 3.8. Let M λh 1. H 1 hh 2 h H l hr from Λ Ξ (2) be given. (i) If h does not occur in M (i.e. M λh 1. R), then ϱ Φ M = β w 0 R.

15 STATMAN S HIERARCHY THEOREM 15 (ii) If h occurs in M then { W H (T Pi H ) if e = z i, ϱ Φ M = β W H e otherwise, where H H 1 and T λh 1. H 2 h H l hr and W H w 0 Hw 1 Hw n and P H i λz 0 i. w i Hw i+1 Hw n z i. (3.7) Proof. (i). Assume h does not occur in M. Then MK = β R for every K : 1. We apply this to Equation (3.6). Writing K λz 0 1. w 1 Mλz 0 n. w n e, we have ϱ Φ M = β w 0 M( λz 0 1. w 1 Mλz 0 n. w n e ) w 0 MK = β w 0 R. (ii). Assume h occurs in M. Note that by definition of H and T, M = β λh 1. Hh(T h). (3.8) In particular, for any term K : 1 in which z j does not occur, we have Either e = z i for some i or not. If e z i, then If e = z i, then M(λz 0 j. K) = β HK. (3.9) ϱ Φ M = β w 0 Mλz 0 1. w 1 Mλz 0 n. w n e by Eq. (3.6) = β w 0 Hw 1 Hw n e by Eq. (3.9) = W H e by def. of W H. ϱ Φ M = β w 0 Mλz 0 1. w 1 Mλz 0 n. w n z i by Eq. (3.6) = β w 0 Hw 1 Mλz 0 i. w i Hw n z i by Eq. (3.9) = w 0 Hw 1 MP H i by def. of P H i = β w 0 Hw 1 HPi H (T Pi H ) by Eq. (3.8) = β w 0 Hw 1 Hw i Hw n (T Pi H ) by def. of Pi H = W H (T Pi H ) by def. of W H. We have proven Statement (3.7) and so we are done. We will use the special case of Lemma 3.8 where H = λx 0. x. Corollary 3.9. Define W w 0 w 1 w n and P i λzi 0. w iw i+1 w n z i. Then for any term M Λ Ξ (2) of the form M = β λh 1. h(t h) with T Λ Ξ (2) we have { W (T P i ) if e = z i, ϱ Φ M = β W e otherwise. Proof. Follows immediately from Lemma 3.8.

16 16 WESTERBAAN, WESTERBAAN, KUYPER, TANKINK, VIEHOFF, AND BARENDREGT We are now ready to prove Equation (3.5). Corollary ˆϱM 1 = ˆϱM 2. Proof. For brevity, let K j λx 1 x 2. x j. We have M j = λφ 3 c 0. Φλf 1 1. f 1 Φλf 1 2. f 2 (K j f 1 f 2 )c. (3.10) We distinguish two cases: either e = z i or not. Assume e = z i for some i. We apply Corollary 3.9 twice, first to M I λf 1 2. f 2(K j f 1 f 2 )ϱ c and then to M II λf 1 1. f 1W (K j f 1 P i )ϱ c. Indeed, ˆϱM j = β ϱ Φ λf 1 1. f 1 ϱ Φ λf 1 2. f 2 (K j f 1 f 2 )ϱ c by Equation (3.10) = ϱ Φ λf 1 1. f 1 ϱ Φ M I by def. of M I = β ϱ Φ λf 1 1. f 1 W (K j f 1 P i )ϱ c by Corollary 3.9 = β ϱ Φ M II by def. of M II = β W W (K j P i P i )ϱ c by Corollary 3.9 = β W W P i ϱ c by def. of K j. Assume e z i. By Corollary 3.9 applied to M λf 1 1. f 1ϱ Φ λf 1 2. f 2f i ϱ c, ˆϱM j = β ϱ Φ ( λf 1 1. f 1 ϱ Φ λf 1 2. f 2 f i ϱ c ) ϱ Φ M = β W e. So in both cases the value of ˆϱM j does not depend on j Ad H ω+4 h + H ω+3 and H ω+4 βη H ω+3. We use Corollary 3.7 with (see 1.3.6) M 1 = M 2 =. That is, M 1 λb [0,0] c 0. bbcbccbcc and M 2 λb [0,0] c 0. bbccbbccc. Let m [[0,0],0], be a derivative of m [[0,0],0], Φ 3, c 0, and let ϱ be a substitution from [b [0,0], c 0 ] to. Note that { } = {Φ 3, c 0, f 1 1,..., f 1 l, d0 1,..., d 0 ν}. We need to prove that ˆϱM 1 = ˆϱM 2. Consider ϱ b Λ ([0, 0]). It is of the form ϱ b λx 0 y 0. w 0 Φλg 1 1. w 1 Φλg 1 µ. w µ e, where e {x, y, c, d 1,..., d ν } and w i is a word over {f 1,..., f l, g 1,..., g i }. We see that either e {x, c, d 1,..., d ν } or e = y. In the former case, we have e y. Then y is not used in ϱ b, so we have ϱ b MN = β ϱ b MN for all terms M, N, N : 0. In particular, ˆϱM 1 ϱ b (ϱ b ϱ c (ϱ b ϱ c ϱ c ))(ϱ b ϱ c ϱ c ) = β ϱ b (ϱ b ϱ c N)N for any N, N = β ϱ b (ϱ b ϱ c ϱ c )(ϱ b (ϱ b ϱ c ϱ c )ϱ c ) ˆϱM 2.

17 STATMAN S HIERARCHY THEOREM 17 Similarly, if e = y, then e x, so ϱ b MN = β ϱ b M N for all M, M, N, and ˆϱM 1 = β ϱ b M(ϱ b M ϱ c ) = β ˆϱM 2 for all M, M. 4. Calculus of reductions Before we proceed, we establish some general calculation rules for reducibility. Although one can find some trivial rules for h such as [A 1, A 2 ] h [A 2, A 1 ], the notion of head reduction is otherwise uncooperative. Therefore, we work with strong reductions (Subsection 4.1) and atomic reductions (Subsection 4.2) instead, yielding the more tractable relations s and a, respectively. We prove later on that for types A and B we have A a B = A s B = A h B. So to show that A h B it suffices to prove that either A s B or A a B. One of the calculation rules provided in this section concerns types A with [1, 1] a A. It states that for such A and any contexts Γ 1, Γ 2, we have [Γ 1 ] s A and [Γ 2 ] s A = [Γ 1, Γ 2 ] s A. We will call these types atomic types and study them in Subsection Strong reductions. For the sake of familiarity we begin with strong reductions between types. Let A 1 and A 2 be types. Recall that a reducing term from A 1 to A 2 is a closed term R of type A 1 A 2 which is injective on closed terms (see Definition 1.2), that is, the map Φ: Λ ε (A 1 ) Λ ε (A 2 ) given by Φ(M) = β RM is injective. If R is also injective on open terms, then R is called strong: Definition 4.1. (i) Let A 1 and A 2 be types. A strong reducing term from A 1 to A 2 is a closed term R: A 1 A 2 that is injective on open terms, that is, for every context Ξ the term R is injective on open terms with free variables from {Ξ}, that is, the term R is injective considered as a map Λ Ξ (A 1 ) Λ Ξ (A 2 ). (ii) If there is a strong reducing term R: A 1 A 2 that is a Böhm term (see Definition 1.2(ii)), we say that A 1 strongly head reduces to A 2, notation A 1 s h A 2. (iii) For context types (see Definition 2.3) Γ 1 A 1 strongly reduces to Γ 2 A 2 if Γ 1 A 1 s h Γ 2 A 2, and we write Γ 1 A 1 s Γ 2 A 2. If in addition Γ 2 A 2 s Γ 1 A 1, we write Γ 2 A 2 s Γ 1 A 1. (iv) Let ϱ be a substitution from Γ 1 A 1 to Γ 2 A 2, and let Ξ be a fresh context. With ϱ Ξ we denote the natural extension of ϱ to a substitution from Ξ,Γ 1 A to Ξ,Γ 2 B given by ϱ Ξ c = c for all c C {Ξ}. Then ˆϱ Ξ : Λ Ξ,Γ 1 (A 1 ) Λ Ξ,Γ 2 (A 2 ). Proposition 4.2. Let Γ 1 A 1 and Γ 2 A 2 be context types. Then Γ 1 A 1 s Γ 2 A 2 There is a substitution ϱ from Γ 1 A 1 to Γ 2 A 2 such that ˆϱ Ξ : Λ Ξ,Γ 1 (A 1 ) Λ Ξ,Γ 2 (A 2 ) is injective for every context Ξ. Proof. Just unfold the definitions.

18 18 WESTERBAAN, WESTERBAAN, KUYPER, TANKINK, VIEHOFF, AND BARENDREGT Definition 4.3. Let Γ 1 A 1, Γ 2 A 2 be context types. A strong reduction from Γ 1 A 1 to Γ 2 A 2 is a substitution ϱ from Γ 1 A 1 to Γ 2 A 2 such that all ˆϱ Ξ are injective. We write ϱ: Γ 1 A 1 s Γ 2 A 2. Remark 4.4. It would not make sense to define a strong reduction to be the Böhm transformation Φ ˆϱ because one can not always reconstruct ϱ and hence the ˆϱ Ξ s from ˆϱ, which acts only on closed terms. The merit of strong reductions (over regular ones) is that it is easy to built complex strong reductions from simpler ones. Moreover, almost all reductions encountered in this text are strong. Remarks 4.5. (i) Not every reduction is also a strong reduction: the substitution ϱ from the context f 1 to the empty context ε given by ϱ f = λx 0. x is a reduction, because Λ f 1 (0) is empty, and thus ˆϱ: Λ f 1 (0) Λ ε (0) is injective (see Convention 2.5); but ϱ is not a strong reduction since ˆϱ Ξ with Ξ d 0 maps both fd and ffd to λx 0. x and is hence not injective (see Definition 4.3). (ii) Note that Γ s implies Ξ, Γ Ξ, for all contexts Ξ. It is not evident whether the reverse implication holds as well. If Γ s then there is one substitution ϱ which yields a family of similar reductions ϱ Ξ : Ξ, Γ Ξ, ; on the other hand, if Ξ, Γ Ξ, for all Ξ, we only know there is a family of (potentially quite dissimilar reductions) ϱ Ξ : Ξ, Γ Ξ,. As it turns out, the reverse implication does hold; we will not prove this in this article. (iii) As Γ s = [Γ] s [ ] (by Definition 4.1(iii)) one could conjecture that we also have that A s B = [A] s [B]. These however are quite different statements. By the Hierarchy Theorem, the conjecture is false. Indeed: later on we will see that [1, 0] s [2]. If one had [[1, 0]] s [[2]], then also [0, [1, 0]] h [0, [2]], quod non as [0, [1, 0]] H ω+4, while [0, [2]] H ω+3. (iv) Nevertheless we do have A s B = [[A]] s [[B]] (see Lemma 4.21). (v) Similarly, we have Γ s [Γ] for every context Γ (by Definition 4.1(iii)), but never A s [A] for a type A. Indeed, if A s [A], then [A] is inhabited iff A is inhabited, while by Theorem 1.8, [A] is inhabited iff A is uninhabited. Lemma 4.6. (ϱ Ξ 1 ) Ξ 2 = ϱ Ξ 2,Ξ 1 for every substitution ϱ and contexts Ξ 1, Ξ 2. Proof. By Definition 2.3(vi) we may assume that ϱ is a substitution between contexts, say from Γ to. Recall that ϱ Ξ 1 is a substitution from Ξ 1, Γ to Ξ 1, with ϱ Ξ 1 c = ϱ c for all c {Γ} and ϱ Ξ 1 d = d for all d {Ξ 1 } (see Definition 4.1(iv)). So both (ϱ Ξ 1 ) Ξ 2 and ϱ Ξ 2,Ξ 1 are a substitution σ from Ξ 2, Ξ 1, Γ to Ξ 2, Ξ 1, such that σ c = ϱ c for all c {Γ} and σ d = d for all d {Ξ 1, Ξ 2 }. Hence (ϱ Ξ 1 ) Ξ 2 and ϱ Ξ 2,Ξ 1 are the same. Lemma 4.7. Given contexts Θ, Γ and, we have Γ s = Θ, Γ s Θ,. Proof. Assume that Γ s, that is, that there is some strong reduction ϱ from Γ to (see Proposition 4.2 and Definition 4.3). To show that Θ, Γ s Θ,, we prove that ϱ Θ is a strong reduction from Θ, Γ to Θ,. Writing ϱ Θ Ξ (ϱ Θ ) Ξ = ϱ Ξ,Θ (see Lemma 4.6), we need to prove that the map ˆϱ Θ Ξ : Λ Ξ,Θ,Γ (0) Λ Ξ,Θ, (0) is injective for every context Ξ (see Proposition 4.2). Since ϱ is a strong reduction, we know that ˆϱ Ξ : Λ Ξ,Γ (0) Λ Ξ, (0) is injective for every Ξ. Now, pick Ξ = Ξ, Θ.

19 STATMAN S HIERARCHY THEOREM 19 Before we get to the more serious reductions, we study the workings of a Böhm transformation ˆϱ (see Definition 2.3(viii)) more closely in Proposition Definition 4.8. Let ϱ be a substitution from Γ 1 [ 1 ] to Γ 2 [ 2 ] (see Definition 2.3(vi)). For every type A [Ξ], let ϱ A denote the natural extension of ϱ to a substitution from Γ 1 [Ξ, 1 ] to Γ 2 [Ξ, 2 ] given by ˆϱ A (c) = c for all c {Ξ}. Remarks 4.9. Let Ξ be a context and let ϱ a substitution from Γ 1 [ 1 ] to Γ 2 [ 2 ]. (i) ϱ [Ξ] (Definition 4.8) and ϱ Ξ (Definition 4.1(iv)) are essentially the same substitution since we have ϱ [Ξ] c = ϱ Ξ c for all c {Ξ, Γ 1, 1 } (see Definition 2.3(vi)). (ii) Using Definition 2.3(viii) we see that for all contexts Ξ, Θ and M Λ Ξ,Γ 1 ([Θ, 1 ]), (iii) We have ϱ 0 = ϱ = ϱ ε. ϱ Ξ [Θ] M = βη M [Γ 1, 1 := ϱ Γ1, 1 ]. Proposition A substitution ϱ from Γ to satisfies the recursion : Given contexts Ξ, Θ and a A {Ξ, Γ} with A [A 1,..., A n ], we have ˆϱ Ξ ( a M 1... M n ) = βη ϱ Ξ a ( ˆϱ Ξ A 1 M 1 ) ( ˆϱ Ξ An M n ), ˆϱ Ξ [Θ] ( λθ. M ) = λθ. ( ˆϱ Θ,Ξ M ), for all M i Λ Ξ,Γ (A i ) and M Λ Θ,Ξ,Γ (0). Proof. It is only a matter of expanding definitions. Indeed, ˆϱ Ξ ( a M 1 M n ) = βη ( a M 1 M n )[ Γ:= ϱ Γ ] by Rem. 4.9(ii),(iii) = βη ϱ Ξ a M 1 [ Γ:= ϱ Γ ] M n [ Γ:= ϱ Γ ] = βη ϱ Ξ a ( ˆϱ Ξ A 1 M 1 ) ( ˆϱ Ξ An M n ) by Rem. 4.9(ii), where a A {Ξ, Γ} with A [A 1,..., A n ] and M i Λ Ξ,Γ (A i ). Similarly, for every term M Λ Θ,Ξ,Γ (0). ˆϱ Ξ [Θ] ( λθ. M ) = βη (λθ. M)[Γ:= ϱ Γ ] = λθ. ( M[Γ:= ϱ Γ ] ) by Rem. 4.9(ii) = βη λθ. ( ˆϱ Θ,Ξ M ) by Rem. 4.9(ii),(iii) We now give an important condition for a substitution to be a strong reduction. Theorem Let Γ and be contexts. Let ϱ be a substitution from Γ to. If ϱ has the following property, then ϱ is a strong reduction. Given a A, b B {Ξ, Γ} with A [A 1,..., A n ] and B [B 1,..., B m ]. Then ϱ Ξ a M 1 M n = βη ϱ Ξ b N 1 N m = a = b and M i = N i (4.1) for all M i Λ Ξ, (A i ) and N i Λ Ξ, (B i ) and every context Ξ. Proof. To prove that ϱ is a strong reduction, we need to show that for each context Ξ, the Böhm transformation ˆϱ Ξ : Λ Ξ,Γ (0) Λ Ξ, (0) is injective (see Definition 4.3). So, consider for each context type Ξ C (see Definition 2.3) and M Λ Ξ,Γ (C) the property P (M): ˆϱ Ξ C (M) = ˆϱ Ξ C (N) = M = N for all N Λ Ξ,Γ (C).

20 20 WESTERBAAN, WESTERBAAN, KUYPER, TANKINK, VIEHOFF, AND BARENDREGT It suffices to prove that P (M) for all M, because then (taking C = 0), ˆϱ Ξ (M) = ˆϱ Ξ (N) = M = N for all M, N Λ Ξ,Γ (0) for each context Ξ, so each Böhm transformation ˆϱ Ξ is injective. To prove that P (M) for all M, we use induction on M. There are two cases. (I) M a A M 1 M n ; (II) M λθ. M. (I) We have M a A M 1 M n where a A {Ξ, Γ} and where writing A [A 1,..., A n ] we have M i Λ Ξ,Γ (A i ). Assume P (M i ) in order to show that P (M). Let N Λ Ξ,Γ (0) with ˆϱ Ξ M = ˆϱ Ξ N be given. We need to prove that M = N. We have N b B N 1 N m for some b B {Ξ, Γ} with B [B 1,..., B m ] and N i Λ Ξ,Γ (B i ). Then by Proposition 4.10, ˆϱ Ξ M = ˆϱ Ξ N implies ϱ Ξ a ( ˆϱ Ξ A 1 M 1 ) ( ˆϱ Ξ An M n ) = βη ϱ Ξ b ( ˆϱΞ B 1 N 1 ) ( ˆϱ Ξ Bm N m ). Now, ˆϱ Ξ A i M i Λ Ξ, (A i ) and ˆϱ Ξ B i N i Λ Ξ, (B i ), so by Statement (4.1), a = b and ˆϱ Ξ A i M i = ˆϱ Ξ B i N i. Then M i = N i by P (M i ), so M = N. Hence P (M). (II) We have M λθ. M where Θ is some context and M Λ Θ,Ξ,Γ (0). Assume that P (M ) in order to show that P (M). Let N Λ Ξ,Γ ([Θ]) with ˆϱ Ξ [Θ] M = ˆϱ Ξ [Θ] N be given. We need to prove that M = N. Write N λθ. N where N Λ Θ,Ξ,Γ (0). Then by Proposition 4.10 we have λθ. ( ˆϱ Θ,Ξ M ) = λθ. ( ˆϱ Θ,Ξ N ). Then ˆϱ Θ,Ξ M = ˆϱ Θ,Ξ N, and thus M = N by P (M ). Hence M = N and so P (M). So we see that P (M) for all M. Hence ϱ is a strong reduction Atomic reductions. Definition (i) Let Γ and be contexts. A substitution from Γ to is called an atomic reduction if it satisfies condition (4.1) of Theorem (ii) A substitution ϱ from Γ 1 [ 1 ] to Γ 2 [ 2 ] is called an atomic reduction if ϱ, considered as substitution from Γ 1, 1 to Γ 2, 2 (see Definition 2.3(vi)), is an atomic reduction. In that case we write ϱ: Γ 1 [ 1 ] a Γ 2 [ 2 ]. (iii) We say that Γ 1 [ 1 ] atomically reduces to Γ 2 [ 2 ] if there is an atomic reduction from Γ 1 [ 1 ] to Γ 2 [ 2 ]. In that case we write Γ 1 [ 1 ] a Γ 2 [ 2 ]. Remark Given variables a and b, we have (cf. Statement (4.1)) a M 1 M n = βη b N 1 N m = a = b and M i = N i for all terms M i and N i. In this respect the terms ϱ Ξ a s of an atomic reduction ϱ behave similar to atomic terms (=variables). Hence the name. Remark Given context types Γ 1 1 and Γ 2 2 we have by Definition 4.12(ii). Cf. Definition 4.1(iii). Γ 1 [ 1 ] a Γ 2 [ 2 ] Γ 1, 1 a Γ 2, 2 Proposition For context types Γ 1 [ 1 ] and Γ 2 [ 2 ] we have Γ 1 [ 1 ] a Γ 2 [ 2 ] = Γ 1 [ 1 ] s Γ 2 [ 2 ].

21 STATMAN S HIERARCHY THEOREM 21 Proof. Assume that Γ 1 [ 1 ] a Γ 2 [ 2 ]. That is, there is some atomic reduction ϱ from Γ 1 [ 1 ] to Γ 2 [ 2 ]. By Theorem 4.11, ϱ is also a strong reduction. Hence Γ 1 [ 1 ] s Γ 2 [ 2 ] by Proposition 4.2 and Definition 4.3. Below we have collected the calculation rules for a which we use later on. The reader can chose to skip them at first and proceed to Remark Lemma Let Γ, and Θ be contexts. (i) If {Γ} { } then Γ a. (ii) If Γ a then Θ, Γ a Θ,. Proof. (i). Assume that {Γ} { }. To prove Γ a, we need to find an atomic reduction from Γ to (see Definition 4.12(iii)). Let ϱ be the substitution from Γ to given by ϱ c = c for all c C {Γ} (see Def. 2.3(v)). To prove that ϱ is an atomic reduction, we need to show that given a context Ξ and a A, b B {Ξ, Γ} with A [A 1,..., A n ] and B [B 1,..., B m ], ϱ Ξ a M 1 M n = βη ϱ Ξ b N 1 N m = a = b and M i = N i for all M i Λ Ξ, (A i ) and N i Λ Ξ, (B i ). Since all ϱ Ξ a are distinct variables, this follows immediately from Remark (ii). Assume that Γ a, that is, that there is some atomic reduction ϱ from Γ to (see Definition 4.12(iii)). To prove that Θ, Γ a Θ,, we show that ϱ Θ is an atomic reduction from Θ, Γ to Θ,. For this we must prove that (ϱ Θ ) Ξ a M 1 M n = βη (ϱ Θ ) Ξ b N 1 N m = a = b and M i = N i (4.2) for every context Ξ and appropriate a, b, M i and N i (see Definition 4.12(ii)). Since we have that (ϱ Θ ) Ξ = ϱ Ξ,Θ (see Lemma 4.6), Statement (4.2) follows immediately from the fact that ϱ is an atomic reduction. (Indeed, pick Ξ = Ξ, Θ). Corollary Given types C 1,..., C k and a permutation ϕ of {1,..., k}, we have [C 1,..., C k ] a [C ϕ(1),..., C ϕ(k) ]. Proof. Write [C 1,..., C k ] = [Γ] and [C ϕ(1),..., C ϕ(k) ] = [ϕ Γ]. We must prove that Γ a ϕ Γ (see Remark 4.14). This follows immediately from Lemma 4.16(i) since {Γ} = {ϕ Γ}. Lemma A substitution ϱ from Γ to is an atomic reduction provided that (i) If a A, b B {Γ} with A [A 1,..., A n ] and B [B 1,..., B m ], then ϱ a M 1 M n = βη ϱ b N 1 N m = a = b and M i = N i for all M i Λ Ξ, (A i ) and N i Λ Ξ, (B i ) and every context Ξ. (ii) If a A {Γ}, d D {Ξ} with A [A 1,..., A n ], D [D 1,..., D l ], then ϱ a M 1 M n βη d N 1 N l for all M i Λ Ξ, (A i ) and N i Λ Ξ, (D i ). Proof. Let a, b {Γ, Ξ} with A [A 1,..., A n ] and B [B 1,..., B m ] and ϱ Ξ a M 1 M n = βη ϱ Ξ b N 1 N m for some M i Λ Ξ, (A i ) and N i Λ Ξ, (B i ) and some context Ξ. We need to prove a = b and M i = N i (see Definition 4.12(i)). We distinguish four cases. (i) If a, b {Γ} then ϱ Ξ a = ϱ a, so a = b and M i = N i by Assumption (i). (ii) If a, b {Ξ} then ϱ Ξ a = a, so a = b and M i = N i by Remark 4.13.

arxiv: v1 [cs.lo] 15 Nov 2017

arxiv: v1 [cs.lo] 15 Nov 2017 STATMAN S HIERARCHY THEOREM arxiv:1711.05497v1 [cs.lo] 15 Nov 2017 BRAM WESTERBAAN, BAS WESTERBAAN, RUTGER KUYPER, CARST TANKINK, REMY VIEHOFF, AND HENK BARENDREGT Radboud University Nijmegen e-mail address:

More information

Lambda Calculus. Week 12 The canonical term models for λ. Henk Barendregt, Freek Wiedijk assisted by Andrew Polonsky

Lambda Calculus. Week 12 The canonical term models for λ. Henk Barendregt, Freek Wiedijk assisted by Andrew Polonsky Lambda Calculus Week 12 The canonical term models for λ Henk Barendregt, Freek Wiedijk assisted by Andrew Polonsky Two version of λ Curry version (type assignment). Λ Γ (A) {M Λ Γ M : A} with (axiom) Γ

More information

Axioms for Set Theory

Axioms for Set Theory Axioms for Set Theory The following is a subset of the Zermelo-Fraenkel axioms for set theory. In this setting, all objects are sets which are denoted by letters, e.g. x, y, X, Y. Equality is logical identity:

More information

Advanced Lambda Calculus Lecture 5

Advanced Lambda Calculus Lecture 5 Advanced Lambda Calculus Lecture 5 The fathers Alonzo Church (1903-1995) as mathematics student at Princeton University (1922 or 1924) Haskell B. Curry (1900-1982) as BA in mathematics at Harvard (1920)

More information

Context-free grammars and languages

Context-free grammars and languages Context-free grammars and languages The next class of languages we will study in the course is the class of context-free languages. They are defined by the notion of a context-free grammar, or a CFG for

More information

CS522 - Programming Language Semantics

CS522 - Programming Language Semantics 1 CS522 - Programming Language Semantics Simply Typed Lambda Calculus Grigore Roşu Department of Computer Science University of Illinois at Urbana-Champaign 2 We now discuss a non-trivial extension of

More information

Entailment with Conditional Equality Constraints (Extended Version)

Entailment with Conditional Equality Constraints (Extended Version) Entailment with Conditional Equality Constraints (Extended Version) Zhendong Su Alexander Aiken Report No. UCB/CSD-00-1113 October 2000 Computer Science Division (EECS) University of California Berkeley,

More information

,

, Kolmogorov Complexity Carleton College, CS 254, Fall 2013, Prof. Joshua R. Davis based on Sipser, Introduction to the Theory of Computation 1. Introduction Kolmogorov complexity is a theory of lossless

More information

Informal Statement Calculus

Informal Statement Calculus FOUNDATIONS OF MATHEMATICS Branches of Logic 1. Theory of Computations (i.e. Recursion Theory). 2. Proof Theory. 3. Model Theory. 4. Set Theory. Informal Statement Calculus STATEMENTS AND CONNECTIVES Example

More information

Lecture Notes on Inductive Definitions

Lecture Notes on Inductive Definitions Lecture Notes on Inductive Definitions 15-312: Foundations of Programming Languages Frank Pfenning Lecture 2 September 2, 2004 These supplementary notes review the notion of an inductive definition and

More information

Introduction to Metalogic

Introduction to Metalogic Philosophy 135 Spring 2008 Tony Martin Introduction to Metalogic 1 The semantics of sentential logic. The language L of sentential logic. Symbols of L: Remarks: (i) sentence letters p 0, p 1, p 2,... (ii)

More information

Type Systems Winter Semester 2006

Type Systems Winter Semester 2006 Type Systems Winter Semester 2006 Week 7 November 29 November 29, 2006 - version 1.0 Plan PREVIOUSLY: 1. type safety as progress and preservation 2. typed arithmetic expressions 3. simply typed lambda

More information

Lecture Notes on Inductive Definitions

Lecture Notes on Inductive Definitions Lecture Notes on Inductive Definitions 15-312: Foundations of Programming Languages Frank Pfenning Lecture 2 August 28, 2003 These supplementary notes review the notion of an inductive definition and give

More information

Automata Theory and Formal Grammars: Lecture 1

Automata Theory and Formal Grammars: Lecture 1 Automata Theory and Formal Grammars: Lecture 1 Sets, Languages, Logic Automata Theory and Formal Grammars: Lecture 1 p.1/72 Sets, Languages, Logic Today Course Overview Administrivia Sets Theory (Review?)

More information

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

Lecture Notes 1 Basic Concepts of Mathematics MATH 352 Lecture Notes 1 Basic Concepts of Mathematics MATH 352 Ivan Avramidi New Mexico Institute of Mining and Technology Socorro, NM 87801 June 3, 2004 Author: Ivan Avramidi; File: absmath.tex; Date: June 11,

More information

Propositions and Proofs

Propositions and Proofs Propositions and Proofs Gert Smolka, Saarland University April 25, 2018 Proposition are logical statements whose truth or falsity can be established with proofs. Coq s type theory provides us with a language

More information

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes These notes form a brief summary of what has been covered during the lectures. All the definitions must be memorized and understood. Statements

More information

Normalization by Evaluation

Normalization by Evaluation Normalization by Evaluation Andreas Abel Department of Computer Science and Engineering Chalmers and Gothenburg University PhD Seminar in Mathematical Engineering EAFIT University, Medellin, Colombia 9

More information

Matroid intersection, base packing and base covering for infinite matroids

Matroid intersection, base packing and base covering for infinite matroids Matroid intersection, base packing and base covering for infinite matroids Nathan Bowler Johannes Carmesin June 25, 2014 Abstract As part of the recent developments in infinite matroid theory, there have

More information

Lecture Notes on Sequent Calculus

Lecture Notes on Sequent Calculus Lecture Notes on Sequent Calculus 15-816: Modal Logic Frank Pfenning Lecture 8 February 9, 2010 1 Introduction In this lecture we present the sequent calculus and its theory. The sequent calculus was originally

More information

Supplementary Notes on Inductive Definitions

Supplementary Notes on Inductive Definitions Supplementary Notes on Inductive Definitions 15-312: Foundations of Programming Languages Frank Pfenning Lecture 2 August 29, 2002 These supplementary notes review the notion of an inductive definition

More information

CS 4110 Programming Languages & Logics. Lecture 16 Programming in the λ-calculus

CS 4110 Programming Languages & Logics. Lecture 16 Programming in the λ-calculus CS 4110 Programming Languages & Logics Lecture 16 Programming in the λ-calculus 30 September 2016 Review: Church Booleans 2 We can encode TRUE, FALSE, and IF, as: TRUE λx. λy. x FALSE λx. λy. y IF λb.

More information

Formal Methods Lecture 6. (B. Pierce's slides for the book Types and Programming Languages )

Formal Methods Lecture 6. (B. Pierce's slides for the book Types and Programming Languages ) Formal Methods Lecture 6 (B. Pierce's slides for the book Types and Programming Languages ) This Saturday, 10 November 2018, room 335 (FSEGA), we will recover the following activities: 1 Formal Methods

More information

Mathematical Reasoning & Proofs

Mathematical Reasoning & Proofs Mathematical Reasoning & Proofs MAT 1362 Fall 2018 Alistair Savage Department of Mathematics and Statistics University of Ottawa This work is licensed under a Creative Commons Attribution-ShareAlike 4.0

More information

Some Applications of MATH 1090 Techniques

Some Applications of MATH 1090 Techniques 1 Some Applications of MATH 1090 Techniques 0.1 A simple problem about Nand gates in relation to And gates and inversion (Not) Gates. In this subsection the notation A means that A is proved from the axioms

More information

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel Lecture Notes on DISCRETE MATHEMATICS Eusebius Doedel c Eusebius J. Doedel, 009 Contents Logic. Introduction............................................................................... Basic logical

More information

Theory of computation: initial remarks (Chapter 11)

Theory of computation: initial remarks (Chapter 11) Theory of computation: initial remarks (Chapter 11) For many purposes, computation is elegantly modeled with simple mathematical objects: Turing machines, finite automata, pushdown automata, and such.

More information

Ma/CS 117c Handout # 5 P vs. NP

Ma/CS 117c Handout # 5 P vs. NP Ma/CS 117c Handout # 5 P vs. NP We consider the possible relationships among the classes P, NP, and co-np. First we consider properties of the class of NP-complete problems, as opposed to those which are

More information

Marketing Impact on Diffusion in Social Networks

Marketing Impact on Diffusion in Social Networks Marketing Impact on Diffusion in Social Networks Pavel Naumov Vassar College, Poughkeepsie, New York, USA Jia Tao The College of New Jersey, Ewing, New Jersey, USA Abstract The article proposes a way to

More information

NOTES (1) FOR MATH 375, FALL 2012

NOTES (1) FOR MATH 375, FALL 2012 NOTES 1) FOR MATH 375, FALL 2012 1 Vector Spaces 11 Axioms Linear algebra grows out of the problem of solving simultaneous systems of linear equations such as 3x + 2y = 5, 111) x 3y = 9, or 2x + 3y z =

More information

Lecture 4. 1 Circuit Complexity. Notes on Complexity Theory: Fall 2005 Last updated: September, Jonathan Katz

Lecture 4. 1 Circuit Complexity. Notes on Complexity Theory: Fall 2005 Last updated: September, Jonathan Katz Notes on Complexity Theory: Fall 2005 Last updated: September, 2005 Jonathan Katz Lecture 4 1 Circuit Complexity Circuits are directed, acyclic graphs where nodes are called gates and edges are called

More information

CHAPTER 4: EXPLORING Z

CHAPTER 4: EXPLORING Z CHAPTER 4: EXPLORING Z MATH 378, CSUSM. SPRING 2009. AITKEN 1. Introduction In this chapter we continue the study of the ring Z. We begin with absolute values. The absolute value function Z N is the identity

More information

Type Systems Winter Semester 2006

Type Systems Winter Semester 2006 Type Systems Winter Semester 2006 Week 5 November 15 November 15, 2006 - version 1.0 Programming in the Lambda-Calculus, Continued Testing booleans Recall: tru = λt. λf. t fls = λt. λf. f We showed last

More information

Definitions. Notations. Injective, Surjective and Bijective. Divides. Cartesian Product. Relations. Equivalence Relations

Definitions. Notations. Injective, Surjective and Bijective. Divides. Cartesian Product. Relations. Equivalence Relations Page 1 Definitions Tuesday, May 8, 2018 12:23 AM Notations " " means "equals, by definition" the set of all real numbers the set of integers Denote a function from a set to a set by Denote the image of

More information

Lecture 1: The arithmetic hierarchy

Lecture 1: The arithmetic hierarchy MODEL THEORY OF ARITHMETIC Lecture 1: The arithmetic hierarchy Tin Lok Wong 8 October, 2014 [These theorems] go a long way to explaining why recursion theory is relevant to the study of models of arithmetic.

More information

Introduction to Metalogic

Introduction to Metalogic Introduction to Metalogic Hans Halvorson September 21, 2016 Logical grammar Definition. A propositional signature Σ is a collection of items, which we call propositional constants. Sometimes these propositional

More information

SLD-Resolution And Logic Programming (PROLOG)

SLD-Resolution And Logic Programming (PROLOG) Chapter 9 SLD-Resolution And Logic Programming (PROLOG) 9.1 Introduction We have seen in Chapter 8 that the resolution method is a complete procedure for showing unsatisfiability. However, finding refutations

More information

Perfect Two-Fault Tolerant Search with Minimum Adaptiveness 1

Perfect Two-Fault Tolerant Search with Minimum Adaptiveness 1 Advances in Applied Mathematics 25, 65 101 (2000) doi:10.1006/aama.2000.0688, available online at http://www.idealibrary.com on Perfect Two-Fault Tolerant Search with Minimum Adaptiveness 1 Ferdinando

More information

FINITE ABELIAN GROUPS Amin Witno

FINITE ABELIAN GROUPS Amin Witno WON Series in Discrete Mathematics and Modern Algebra Volume 7 FINITE ABELIAN GROUPS Amin Witno Abstract We detail the proof of the fundamental theorem of finite abelian groups, which states that every

More information

NUMBERS WITH INTEGER COMPLEXITY CLOSE TO THE LOWER BOUND

NUMBERS WITH INTEGER COMPLEXITY CLOSE TO THE LOWER BOUND #A1 INTEGERS 12A (2012): John Selfridge Memorial Issue NUMBERS WITH INTEGER COMPLEXITY CLOSE TO THE LOWER BOUND Harry Altman Department of Mathematics, University of Michigan, Ann Arbor, Michigan haltman@umich.edu

More information

3 Propositional Logic

3 Propositional Logic 3 Propositional Logic 3.1 Syntax 3.2 Semantics 3.3 Equivalence and Normal Forms 3.4 Proof Procedures 3.5 Properties Propositional Logic (25th October 2007) 1 3.1 Syntax Definition 3.0 An alphabet Σ consists

More information

Propositional Logic: Part II - Syntax & Proofs 0-0

Propositional Logic: Part II - Syntax & Proofs 0-0 Propositional Logic: Part II - Syntax & Proofs 0-0 Outline Syntax of Propositional Formulas Motivating Proofs Syntactic Entailment and Proofs Proof Rules for Natural Deduction Axioms, theories and theorems

More information

Formal Methods Lecture 6. (B. Pierce's slides for the book Types and Programming Languages )

Formal Methods Lecture 6. (B. Pierce's slides for the book Types and Programming Languages ) Formal Methods Lecture 6 (B. Pierce's slides for the book Types and Programming Languages ) Programming in the Lambda-Calculus, Continued Testing booleans Recall: tru = λt. λf. t fls = λt. λf. f We showed

More information

Introduction to Metalogic 1

Introduction to Metalogic 1 Philosophy 135 Spring 2012 Tony Martin Introduction to Metalogic 1 1 The semantics of sentential logic. The language L of sentential logic. Symbols of L: (i) sentence letters p 0, p 1, p 2,... (ii) connectives,

More information

Theory of Computation

Theory of Computation Thomas Zeugmann Hokkaido University Laboratory for Algorithmics http://www-alg.ist.hokudai.ac.jp/ thomas/toc/ Lecture 12: Turing Machines Turing Machines I After having dealt with partial recursive functions,

More information

Lecture 2: Syntax. January 24, 2018

Lecture 2: Syntax. January 24, 2018 Lecture 2: Syntax January 24, 2018 We now review the basic definitions of first-order logic in more detail. Recall that a language consists of a collection of symbols {P i }, each of which has some specified

More information

Lambda Calculus with Types. Henk Barendregt ICIS Radboud University Nijmegen The Netherlands

Lambda Calculus with Types. Henk Barendregt ICIS Radboud University Nijmegen The Netherlands Lambda Calculus with Types Henk Barendregt ICIS Radboud University Nijmegen The Netherlands New book Cambridge University Press / ASL Perspectives in Logic, 2011 Lambda Calculus with Types (698 pp) Authors:

More information

arxiv: v1 [cs.pl] 19 May 2016

arxiv: v1 [cs.pl] 19 May 2016 arxiv:1605.05858v1 [cs.pl] 19 May 2016 Domain Theory: An Introduction Robert Cartwright Rice University Rebecca Parsons ThoughtWorks, Inc. Moez AbdelGawad SRTA-City Hunan University This monograph is an

More information

Using models to model-check recursive schemes

Using models to model-check recursive schemes Using models to model-check recursive schemes S Salvati and I Walukiewicz Université de Bordeaux, INRIA, CNRS, LaBRI UMR5800 Abstract We propose a model-based approach to the model checking problem for

More information

Consequence Relations and Natural Deduction

Consequence Relations and Natural Deduction Consequence Relations and Natural Deduction Joshua D. Guttman Worcester Polytechnic Institute September 9, 2010 Contents 1 Consequence Relations 1 2 A Derivation System for Natural Deduction 3 3 Derivations

More information

Hierarchy among Automata on Linear Orderings

Hierarchy among Automata on Linear Orderings Hierarchy among Automata on Linear Orderings Véronique Bruyère Institut d Informatique Université de Mons-Hainaut Olivier Carton LIAFA Université Paris 7 Abstract In a preceding paper, automata and rational

More information

Natural Deduction for Propositional Logic

Natural Deduction for Propositional Logic Natural Deduction for Propositional Logic Bow-Yaw Wang Institute of Information Science Academia Sinica, Taiwan September 10, 2018 Bow-Yaw Wang (Academia Sinica) Natural Deduction for Propositional Logic

More information

The Lambda Calculus. Stephen A. Edwards. Fall Columbia University

The Lambda Calculus. Stephen A. Edwards. Fall Columbia University The Lambda Calculus Stephen A. Edwards Columbia University Fall 2014 Lambda Expressions Function application written in prefix form. Add four and five is (+ 4 5) Evaluation: select a redex and evaluate

More information

On Computing Boolean Connectives of Characteristic Functions

On Computing Boolean Connectives of Characteristic Functions On Computing Boolean Connectives of Characteristic Functions Richard Chang Computer Science Department Cornell University Ithaca, NY 14853 Jim Kadin Computer Science Department University of Maine Orono,

More information

Propositional Logic Language

Propositional Logic Language Propositional Logic Language A logic consists of: an alphabet A, a language L, i.e., a set of formulas, and a binary relation = between a set of formulas and a formula. An alphabet A consists of a finite

More information

Mathematical Logic IV

Mathematical Logic IV 1 Introduction Mathematical Logic IV The Lambda Calculus; by H.P. Barendregt(1984) Part One: Chapters 1-5 The λ-calculus (a theory denoted λ) is a type free theory about functions as rules, rather that

More information

Equational Logic. Chapter Syntax Terms and Term Algebras

Equational Logic. Chapter Syntax Terms and Term Algebras Chapter 2 Equational Logic 2.1 Syntax 2.1.1 Terms and Term Algebras The natural logic of algebra is equational logic, whose propositions are universally quantified identities between terms built up from

More information

The non-logical symbols determine a specific F OL language and consists of the following sets. Σ = {Σ n } n<ω

The non-logical symbols determine a specific F OL language and consists of the following sets. Σ = {Σ n } n<ω 1 Preliminaries In this chapter we first give a summary of the basic notations, terminology and results which will be used in this thesis. The treatment here is reduced to a list of definitions. For the

More information

Proof Techniques (Review of Math 271)

Proof Techniques (Review of Math 271) Chapter 2 Proof Techniques (Review of Math 271) 2.1 Overview This chapter reviews proof techniques that were probably introduced in Math 271 and that may also have been used in a different way in Phil

More information

Π 0 1-presentations of algebras

Π 0 1-presentations of algebras Π 0 1-presentations of algebras Bakhadyr Khoussainov Department of Computer Science, the University of Auckland, New Zealand bmk@cs.auckland.ac.nz Theodore Slaman Department of Mathematics, The University

More information

INEQUALITIES OF SYMMETRIC FUNCTIONS. 1. Introduction to Symmetric Functions [?] Definition 1.1. A symmetric function in n variables is a function, f,

INEQUALITIES OF SYMMETRIC FUNCTIONS. 1. Introduction to Symmetric Functions [?] Definition 1.1. A symmetric function in n variables is a function, f, INEQUALITIES OF SMMETRIC FUNCTIONS JONATHAN D. LIMA Abstract. We prove several symmetric function inequalities and conjecture a partially proved comprehensive theorem. We also introduce the condition of

More information

Truth-Functional Logic

Truth-Functional Logic Truth-Functional Logic Syntax Every atomic sentence (A, B, C, ) is a sentence and are sentences With ϕ a sentence, the negation ϕ is a sentence With ϕ and ψ sentences, the conjunction ϕ ψ is a sentence

More information

Proof Complexity of Intuitionistic Propositional Logic

Proof Complexity of Intuitionistic Propositional Logic Proof Complexity of Intuitionistic Propositional Logic Alexander Hertel & Alasdair Urquhart November 29, 2006 Abstract We explore the proof complexity of intuitionistic propositional logic (IP L) The problem

More information

Partial Collapses of the Σ 1 Complexity Hierarchy in Models for Fragments of Bounded Arithmetic

Partial Collapses of the Σ 1 Complexity Hierarchy in Models for Fragments of Bounded Arithmetic Partial Collapses of the Σ 1 Complexity Hierarchy in Models for Fragments of Bounded Arithmetic Zofia Adamowicz Institute of Mathematics, Polish Academy of Sciences Śniadeckich 8, 00-950 Warszawa, Poland

More information

Foundations of Mathematics

Foundations of Mathematics Foundations of Mathematics L. Pedro Poitevin 1. Preliminaries 1.1. Sets We will naively think of a set as a collection of mathematical objects, called its elements or members. To indicate that an object

More information

Turing Machines, diagonalization, the halting problem, reducibility

Turing Machines, diagonalization, the halting problem, reducibility Notes on Computer Theory Last updated: September, 015 Turing Machines, diagonalization, the halting problem, reducibility 1 Turing Machines A Turing machine is a state machine, similar to the ones we have

More information

Topology, Math 581, Fall 2017 last updated: November 24, Topology 1, Math 581, Fall 2017: Notes and homework Krzysztof Chris Ciesielski

Topology, Math 581, Fall 2017 last updated: November 24, Topology 1, Math 581, Fall 2017: Notes and homework Krzysztof Chris Ciesielski Topology, Math 581, Fall 2017 last updated: November 24, 2017 1 Topology 1, Math 581, Fall 2017: Notes and homework Krzysztof Chris Ciesielski Class of August 17: Course and syllabus overview. Topology

More information

Set theory. Math 304 Spring 2007

Set theory. Math 304 Spring 2007 Math 304 Spring 2007 Set theory Contents 1. Sets 2 1.1. Objects and set formation 2 1.2. Unions and intersections 3 1.3. Differences 4 1.4. Power sets 4 1.5. Ordered pairs and binary,amscdcartesian products

More information

Introduction to Turing Machines. Reading: Chapters 8 & 9

Introduction to Turing Machines. Reading: Chapters 8 & 9 Introduction to Turing Machines Reading: Chapters 8 & 9 1 Turing Machines (TM) Generalize the class of CFLs: Recursively Enumerable Languages Recursive Languages Context-Free Languages Regular Languages

More information

5 + 9(10) + 3(100) + 0(1000) + 2(10000) =

5 + 9(10) + 3(100) + 0(1000) + 2(10000) = Chapter 5 Analyzing Algorithms So far we have been proving statements about databases, mathematics and arithmetic, or sequences of numbers. Though these types of statements are common in computer science,

More information

Henk Barendregt and Freek Wiedijk assisted by Andrew Polonsky. Radboud University Nijmegen. March 5, 2012

Henk Barendregt and Freek Wiedijk assisted by Andrew Polonsky. Radboud University Nijmegen. March 5, 2012 1 λ Henk Barendregt and Freek Wiedijk assisted by Andrew Polonsky Radboud University Nijmegen March 5, 2012 2 reading Femke van Raamsdonk Logical Verification Course Notes Herman Geuvers Introduction to

More information

Mathematics 114L Spring 2018 D.A. Martin. Mathematical Logic

Mathematics 114L Spring 2018 D.A. Martin. Mathematical Logic Mathematics 114L Spring 2018 D.A. Martin Mathematical Logic 1 First-Order Languages. Symbols. All first-order languages we consider will have the following symbols: (i) variables v 1, v 2, v 3,... ; (ii)

More information

λ Slide 1 Content Exercises from last time λ-calculus COMP 4161 NICTA Advanced Course Advanced Topics in Software Verification

λ Slide 1 Content Exercises from last time λ-calculus COMP 4161 NICTA Advanced Course Advanced Topics in Software Verification Content COMP 4161 NICTA Advanced Course Advanced Topics in Software Verification Toby Murray, June Andronick, Gerwin Klein λ Slide 1 Intro & motivation, getting started [1] Foundations & Principles Lambda

More information

Notes on Computer Theory Last updated: November, Circuits

Notes on Computer Theory Last updated: November, Circuits Notes on Computer Theory Last updated: November, 2015 Circuits Notes by Jonathan Katz, lightly edited by Dov Gordon. 1 Circuits Boolean circuits offer an alternate model of computation: a non-uniform one

More information

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel LECTURE NOTES on DISCRETE MATHEMATICS Eusebius Doedel 1 LOGIC Introduction. First we introduce some basic concepts needed in our discussion of logic. These will be covered in more detail later. A set is

More information

A Discrete Duality Between Nonmonotonic Consequence Relations and Convex Geometries

A Discrete Duality Between Nonmonotonic Consequence Relations and Convex Geometries A Discrete Duality Between Nonmonotonic Consequence Relations and Convex Geometries Johannes Marti and Riccardo Pinosio Draft from April 5, 2018 Abstract In this paper we present a duality between nonmonotonic

More information

Filters in Analysis and Topology

Filters in Analysis and Topology Filters in Analysis and Topology David MacIver July 1, 2004 Abstract The study of filters is a very natural way to talk about convergence in an arbitrary topological space, and carries over nicely into

More information

Some hard families of parameterised counting problems

Some hard families of parameterised counting problems Some hard families of parameterised counting problems Mark Jerrum and Kitty Meeks School of Mathematical Sciences, Queen Mary University of London {m.jerrum,k.meeks}@qmul.ac.uk September 2014 Abstract

More information

1 Basic Combinatorics

1 Basic Combinatorics 1 Basic Combinatorics 1.1 Sets and sequences Sets. A set is an unordered collection of distinct objects. The objects are called elements of the set. We use braces to denote a set, for example, the set

More information

On Lists and Other Abstract Data Types in the Calculus of Constructions

On Lists and Other Abstract Data Types in the Calculus of Constructions On Lists and Other Abstract Data Types in the Calculus of Constructions Jonathan P. Seldin Department of Mathematics Concordia University Montreal, Quebec, Canada seldin@alcor.concordia.ca January 29,

More information

Safety Analysis versus Type Inference

Safety Analysis versus Type Inference Information and Computation, 118(1):128 141, 1995. Safety Analysis versus Type Inference Jens Palsberg palsberg@daimi.aau.dk Michael I. Schwartzbach mis@daimi.aau.dk Computer Science Department, Aarhus

More information

Syntactic Characterisations in Model Theory

Syntactic Characterisations in Model Theory Department of Mathematics Bachelor Thesis (7.5 ECTS) Syntactic Characterisations in Model Theory Author: Dionijs van Tuijl Supervisor: Dr. Jaap van Oosten June 15, 2016 Contents 1 Introduction 2 2 Preliminaries

More information

On the Complexity of the Reflected Logic of Proofs

On the Complexity of the Reflected Logic of Proofs On the Complexity of the Reflected Logic of Proofs Nikolai V. Krupski Department of Math. Logic and the Theory of Algorithms, Faculty of Mechanics and Mathematics, Moscow State University, Moscow 119899,

More information

Lecture Notes on From Rules to Propositions

Lecture Notes on From Rules to Propositions Lecture Notes on From Rules to Propositions 15-816: Substructural Logics Frank Pfenning Lecture 2 September 1, 2016 We review the ideas of ephemeral truth and linear inference with another example from

More information

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction Math 4 Summer 01 Elementary Number Theory Notes on Mathematical Induction Principle of Mathematical Induction Recall the following axiom for the set of integers. Well-Ordering Axiom for the Integers If

More information

Week Some Warm-up Questions

Week Some Warm-up Questions 1 Some Warm-up Questions Week 1-2 Abstraction: The process going from specific cases to general problem. Proof: A sequence of arguments to show certain conclusion to be true. If... then... : The part after

More information

Basic counting techniques. Periklis A. Papakonstantinou Rutgers Business School

Basic counting techniques. Periklis A. Papakonstantinou Rutgers Business School Basic counting techniques Periklis A. Papakonstantinou Rutgers Business School i LECTURE NOTES IN Elementary counting methods Periklis A. Papakonstantinou MSIS, Rutgers Business School ALL RIGHTS RESERVED

More information

arxiv: v1 [math.co] 3 Nov 2014

arxiv: v1 [math.co] 3 Nov 2014 SPARSE MATRICES DESCRIBING ITERATIONS OF INTEGER-VALUED FUNCTIONS BERND C. KELLNER arxiv:1411.0590v1 [math.co] 3 Nov 014 Abstract. We consider iterations of integer-valued functions φ, which have no fixed

More information

CHAPTER 2. FIRST ORDER LOGIC

CHAPTER 2. FIRST ORDER LOGIC CHAPTER 2. FIRST ORDER LOGIC 1. Introduction First order logic is a much richer system than sentential logic. Its interpretations include the usual structures of mathematics, and its sentences enable us

More information

Rewriting for Fitch style natural deductions

Rewriting for Fitch style natural deductions Rewriting for Fitch style natural deductions Herman Geuvers, Rob Nederpelt Nijmegen University, The Netherlands Eindhoven University of Technology, The Netherlands bstract Logical systems in natural deduction

More information

Equivalent Types in Lambek Calculus and Linear Logic

Equivalent Types in Lambek Calculus and Linear Logic Equivalent Types in Lambek Calculus and Linear Logic Mati Pentus Steklov Mathematical Institute, Vavilov str. 42, Russia 117966, Moscow GSP-1 MIAN Prepublication Series for Logic and Computer Science LCS-92-02

More information

Equational Reasoning in Algebraic Structures: a Complete Tactic

Equational Reasoning in Algebraic Structures: a Complete Tactic Equational Reasoning in Algebraic Structures: a Complete Tactic Luís Cruz-Filipe 1,2 and Freek Wiedijk 1 1 NIII, University of Nijmegen, Netherlands and 2 CLC, Lisbon, Portugal Abstract We present rational,

More information

CONTENTS. Appendix C: Gothic Alphabet 109

CONTENTS. Appendix C: Gothic Alphabet 109 Contents 1 Sentential Logic 1 1.1 Introduction............................ 1 1.2 Sentences of Sentential Logic................... 2 1.3 Truth Assignments........................ 7 1.4 Logical Consequence.......................

More information

Set theory and topology

Set theory and topology arxiv:1306.6926v1 [math.ho] 28 Jun 2013 Set theory and topology An introduction to the foundations of analysis 1 Part II: Topology Fundamental Felix Nagel Abstract We provide a formal introduction into

More information

Tableau-based decision procedures for the logics of subinterval structures over dense orderings

Tableau-based decision procedures for the logics of subinterval structures over dense orderings Tableau-based decision procedures for the logics of subinterval structures over dense orderings Davide Bresolin 1, Valentin Goranko 2, Angelo Montanari 3, and Pietro Sala 3 1 Department of Computer Science,

More information

The Lambda-Calculus Reduction System

The Lambda-Calculus Reduction System 2 The Lambda-Calculus Reduction System 2.1 Reduction Systems In this section we present basic notions on reduction systems. For a more detailed study see [Klop, 1992, Dershowitz and Jouannaud, 1990]. Definition

More information

CSE 1400 Applied Discrete Mathematics Definitions

CSE 1400 Applied Discrete Mathematics Definitions CSE 1400 Applied Discrete Mathematics Definitions Department of Computer Sciences College of Engineering Florida Tech Fall 2011 Arithmetic 1 Alphabets, Strings, Languages, & Words 2 Number Systems 3 Machine

More information

Automata Theory. Lecture on Discussion Course of CS120. Runzhe SJTU ACM CLASS

Automata Theory. Lecture on Discussion Course of CS120. Runzhe SJTU ACM CLASS Automata Theory Lecture on Discussion Course of CS2 This Lecture is about Mathematical Models of Computation. Why Should I Care? - Ways of thinking. - Theory can drive practice. - Don t be an Instrumentalist.

More information

Quadratic reciprocity and the Jacobi symbol Stephen McAdam Department of Mathematics University of Texas at Austin

Quadratic reciprocity and the Jacobi symbol Stephen McAdam Department of Mathematics University of Texas at Austin Quadratic reciprocity and the Jacobi symbol Stephen McAdam Department of Mathematics University of Texas at Austin mcadam@math.utexas.edu Abstract: We offer a proof of quadratic reciprocity that arises

More information

(1) A frac = b : a, b A, b 0. We can define addition and multiplication of fractions as we normally would. a b + c d

(1) A frac = b : a, b A, b 0. We can define addition and multiplication of fractions as we normally would. a b + c d The Algebraic Method 0.1. Integral Domains. Emmy Noether and others quickly realized that the classical algebraic number theory of Dedekind could be abstracted completely. In particular, rings of integers

More information