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

Size: px
Start display at page:

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

Transcription

1 On Lists and Other Abstract Data Types in the Calculus of Constructions Jonathan P. Seldin Department of Mathematics Concordia University Montreal, Quebec, Canada January 29, 1999 Dedicated to Joachim Lambek on the occasion of his 75th birthday Abstract The representation of the inductively defined abstract data type for lists was left incomplete in [2, 9]. Here that representation is completed, and it is proved that all extra axioms needed are consistent. Among the innovations of this paper is a definition of cdr, whose definition was left for future work in [2, 9]. The results are then extended to other abstract data types, those of [1]. The method used to define cdr for lists is extended to obtain the definition of an inverse for each argument of each constructor of an abstract data type. These inverses are used to prove the injective property for the constructors. Also, Dedekind s method of defining the natural numbers is used to define a predicate associated with each abstract data type, and the use of this predicate makes it unnecessary to postulate the induction principle. The only axioms left to be proved are those asserting the disjointness of the co-domains of different constructors, and it is shown that those axioms can be proved consistent. Key words: Calculus of constructions, abstract data types, lists This work was supported in part by grant RGP from the Natural Sciences and Engineering Research Council of Canada. 1

2 The discussion of the representation of the inductively defined abstract data type for lists at the end of [2, 9] was left incomplete. The aim of this paper is to complete it. The matters left unfinished in [2, 9] include the definition of cdr and the proof that three axioms corresponding to two of the Peano axioms are consistent. These are the matters finished here. In order to make this paper as self-contained as is reasonable for a paper of this size, a brief presentation of the representation of lists is presented in 1. This presentation includes a discussion of the induction property associated with this data type. This induction property can be easily used to define a number of list functions, but defining cdr is not so easy; it will be defined in 2. In 3, it will be shown that two of the three axioms are, in fact, provable; these are the axioms asserting the injective property of cons with respect to each of its arguments, and the proof uses the car and cdr. In 4, it will be shown that the remaining axiom, which asserts that the empty list is not constructed by cons, is consistent. Finally, in 5, these methods will be extended to all of the abstract data types of [1]. In particular, the methods used to define car in 1 and cdr in 2 will be used to obtain an inverse for each constructor with respect to each argument. This will allow the proof of the injective property of constructors. The use of a predicate associated with each abstract data type that uses Dedekind s method of defining an inductively defined set will be used to eliminate the need to postulate an induction axiom. This will leave only the axioms asserting that the co-domains of different constructors are disjoint, and these can be proved consistent by the method of 4. A familiarity with [2] will be assumed throughout. The version of the calculus of constructions will be assumed to be TOC0. 1 Preliminaries Recall that the basic definitions are as follows [2, p. 86]: List λa : Prop. ( u : Prop)((A u u) u u), nil λa : Prop. λb : Prop. λf : A B B. λy : B. y, cons λa : Prop. λx : A. λl : ListA. λb : Prop. λf : A B B. λy : B. fx(lbfy). 2

3 It is easy to prove the following: and A : Prop ListA : Prop, A : Prop nila : ListA, A : Prop, x : A, L : ListA consaxl : ListA. Now to do recursion on lists, define Listrec λa : Prop. λb : Prop. λh : A B B. λy : B. λl : ListA. lbhy. Then given A : Prop, B : Prop, H : A B B, and M : B, ListrecABHM(nilA) = nilabhm and given, in addition, x : A and L : ListA, = M, ListrecABHM(consAxL) = consaxlbhm = Hx(LBHM) = Hx(ListrecABHML). This allows us to define functions by recursion. For example, the function append is characterized by appenda(nila)l 2 = L 2, appenda(consaml 1 )L 2 = consam(appendl 1 L 2 ). This can be defined by where and append λa : Prop. λl : ListA. λm : ListA. ListrecA(ListA)HMlm, H λx : A. λn : ListA. consaxn M λl : ListA. l. We can also define length, which satisfies lengtha(nila) = 0, lengtha(consaxl) = σ(lengthal). 3

4 The definition is length λa : Prop. ListrecAN(λx : A. σ)0. Other examples will be fairly obvious. Two important functions used with the data type list are car and cdr. The first satisfies car(consaxl) = x, while the second satisfies cdr(consaxl) = L. There are problems defining both of these. The problem in defining car is that its value for nila must be an object of type A. Since we do not know, in general, if there is any term in a given type, it is best to supply the object to be assigned to nila as an argument of car. Thus, given A : Prop, M : A, x : A, and L : ListA, we will want The definition is then caram(nila) = M, caram(consaxl) = x. car λa : Prop. λy : A. ListrecAA(λx : A. λu : A. x)y. The definition of cdr is more complicated, and is left until the next section. To incorporate the logical properties of lists, we want a predicate L similar to the predicate N for arithmetic: L λa : Prop. λx : ListA. ( y : ( A : Prop)(ListA Prop)) (( u : A)( l : ListA)(yAl ya(consaul)) ya(nila) yax). (There is an error in the corresponding formula and in a few other formulas in connection with lists, [2, 9].) This formula is based on Dedekind s definition of the set of natural numbers, and it works whenever the logic is second order or higher order. It is then easy to prove L : ( A : Prop)(ListA Prop), M : ( A : Prop)(LA(nilA)), 4

5 N : ( A : Prop)( u : A)( l : ListA)(LAl LA(consAul)), and P : ( B : ( A : Prop)(ListA Prop))( A : Prop) (( u : A)( l : ListA)(BAl BA(consAul)) BA(nilA) ( l : ListA)(LAl BAl)), for some closed terms M, N, and P. This gives us the desired induction property on lists. To complete our theory, we need results corresponding to Peano1 and Peano2: List1 List2 List3 ( A : Prop)( x : A)( l : ListA)( consaxl = ListA nila), ( A : Prop)( x : A)( y : A)( l : ListA)( m : ListA) (consaxl = lista consaym x = A y), ( A : Prop)( x : A)( y : A)( l : ListA)( m : ListA) (consaxl = lista consaym l = ListA m), We shall deal with List2 and List3 in 3 and with List1 in 4. 2 Definition of cdr There is no great problem in deciding what the value of cdr should be for nila: just assign nila. The problem is getting access to the argument L in Hx(ListrecABHM L). So we must proceed by indirection. The idea is similar to the idea used in defining the numerical predecessor function π: we will define a function on lists whose value is an ordered pair of lists in which the first list of the pair is the argument of the function and the second is the result of applying cdr to the first. This function is definable using Listrec: where G λa : Prop. λu : ListA. ListrecA(ListA ListA)HMu, H λx : A. λv : ListA ListA. M D(ListA)(ListA)(consAx(fst(ListA)(ListA)v))(fst(ListA)(ListA)v), D(ListA)(ListA)(nilA)(nilA). 5

6 Theorem 1 Suppose A : Prop and L : ListA. Then where L 1 = L and Proof By a list induction on L. Basis: L = nila. We have GAL = D(ListA)(ListA)L 1 L 2, L 2 = { nila if L = nila, L if L = consaxl. GA(nilA) = ListrecA(ListA ListA)HM(nilA) = D(ListA)(ListA)(nilA)(nilA). Here L 1 = L 2 = nila, and so the theorem is satisfied. Induction step: By the induction hypothesis, GAL = D(ListA)(ListA)LL, where Then L = { nila if L = nila, L if L = consaxl. GA(consAxL) = ListrecA(ListA ListA)HM(consAxL) = Hx(ListrecA(ListA ListA)HML) = Hx(D(ListA)(ListA)LL ) = D(ListA)(ListA)(consAxL)L, as desired. Definition 1 The term cdr is defined by cdr λa : Prop. λl : ListA. snd(lista)(lista)(gal), where G is the term defined above. Corollary 1.1 If A : Prop, x : A, and L : ListA, then cdra(nila) = nila, cdra(consaxl) = L. 6

7 Note that the first result here does not use the induction hypothesis, whereas the second does. Thus, if we formalize the proof of this corollary, we get the following: Corollary 1.2 There are closed terms R and S such that and R : ( A : Prop)(cdrA(nilA) = ListA nila) S : ( A : Prop)( x : A)( l : ListA)(Ll cdr(consaxl) = ListA l). 3 List2 and List3 As we have seen, we need List2 and List3 to hold to have the logical properties of lists. In this section, we will see that we can prove List2 and a formula which gives us the properties we need of List3. Theorem 2 There is a closed term M such that M : List2. Proof Assume an environment Γ 0 consisting of A : Prop, x : A, y : A, l : ListA, m : ListA, u : consaxl = ListA consaym. By the conversion properties of car, car(consaxl) = ListA x and car(consaym) = ListA y are both inhabited types. By the logical properties of equality, there is a term N such that Γ 0 N : x = A y, and the theorem follows. Unfortunately, we cannot prove List3 in the same way. However, we can prove a result which is just as good for our purposes. 7

8 Theorem 3 There is a closed term M such that M : ( A : Prop)( x : A)( y : A)( l : ListA)( m : ListA) (Ll Lm consaxl = ListA consaym l = ListA m). Proof Similar to the proof of Theorem 2. The extra antecedents Ll and Lm are necessary in order to use the second result of Corollary The consistency of List1 It does not appear possible to prove List1 or a variant of it in the way we were able to prove List2 and List3. However, it is possible to prove that adding it as a postulate to other appropriate postulates is consistent. The proof is similar to that for Peano1 in [2, 9]. Theorem 4 Let Γ be a strongly consistent environment. Then Γ, c : List1 is consistent. Proof This will be proved by showing that it is impossible to prove (1) Γ, c : List1, M : z where z does not occur free in Γ. Thus, suppose it is possible. Then there is a normal deduction of (1). There is thus a shortest such deduction, call it D. Since z is an atomic type, the only inferences in the left branch of D are by ( e) and (Eq ). It follows that the formula at the top of that branch is not discharged. That formula cannot be in Γ because Γ is strongly consistent, and it cannot be. Hence, it must be c : List1, and D has the following form: c : List1 D 1 (z) A : Prop D 2 (z) X : A caxlm 1 : D 3 (z) L : ListA D 4 (z) M 1 : B caxlm 1 z : z. ( e) 4 ( e) where B consaxl = ListA nila and A B C D E F ( e) 4 8

9 is an abbreviaiton for A B F 1 ( e) F 2 C F 3 ( e) D F ( e) E ( e) for some F 1, F 2, F 3. Now consider D 4 (z). Written without abbreviations in the conclusion, it is D 4 (z) M 1 : ( r : ListA Prop)(r(consAXL) r(nila)). Case 1. The last non-equality rule of D 4 (z) is ( e). Then, as before, the top formula of the left branch is not discharged and is c : List1. Thus, D 4 (z) has the form c : List1 D 5 (z) A : Prop D 6 (z) X : A D 7 (z) L : ListA D 8 (z) M 2 : B ca X L M 2 : D 9 M 1 : ( r : ListA Prop)(r(consAXL) r(nila)), ( e) 4 where B consa X L = ListA nila. But then c : List1 D 5 (z) A : Prop D 6 (z) X : A ca X L M 2 : D 7 (z) L : ListA D 8 (z) M 2 : B ca X L M 2 z : z ( e) 4 ( e) is a shorter proof of (1), contrary to hypothesis. Hence, this case is impossible. Case 2. The last non-equality rule of D 4 (z) is ( Ti). Then D 4 (z) is 1, [r : ListA Prop] standard proof D 41 (z, r) ListA : Prop Prop : Type (PTF v) M 2 : r(consaxl) r(nila) ListA Prop : Type ( Ti - 1) λr : ListA Prop. M 2 : ( r : ListA Prop)(r(consAXL) r(nila)), 9

10 where M 1 λr : ListA Prop. M 2. Now consider D 41 (z, r). By the argument of Case 1 above, the last non-equality rule is not ( e), so it must be ( Pi), and the left branch of D 41 (z, r) is, r : ListA Prop, [u : r(consaxl)] D 411 (z, r, u) M 3 : r(nila), where M 2 λu : r(consaxl).m 3. Now consider D 411 (z, r, u). by the argument of Case 1, the last rule is not ( e), and it clearly cannot be ( κi). Hence, it must be (Eq ). This requires (2) consaxl = nila, but since and consaxl = λb : Prop. λf : A B B. λy : B. fx(lbfy) nila = λb : Prop. λf : A B B. λy : B. y, the two terms on either side of (2) have distinct normal forms, and (2) is impossible. Hence, there is no proof of (1). This proof is very much like the proof of [2, Theorem 21]. In fact, the two proofs could be combined as two cases of a proof of the following: Corollary 4.1 If Γ is a strongly consistent environment, then is consistent. Γ, c 1 : Peano1, c 2 : List1 I conjecture that similar results can be obtained for other inductively generated free algebras. 10

11 5 Generalization to abstract data types For any closed proposition A, ListA is almost an example of the data types considered by [1, Definition 4.1]: Definition 2 A CC-data type structure consists of 1. a closed proposition D 0, called the universe of the structure; 2. a set {M 1,..., M n } of closed propositions called parameters of the CCdata type structure; and 3. a set {f 1,..., f m } of closed proofs of CC (the calculus of constructions), called constructors of the CC-data type structure. Each f j has type A 1,j... A nj j D 0, where each A i,j is either D 0 or is some M k. Definition 3 The signature of a CC-data type structure consists of the sets of propositions {M 1,..., M n } (the parameters) and {F 1 [u],..., F m [u]} ( types of constructors ), where each F j [u] is obtained from A 1,j... A nj j D 0 by replacing D 0 and all A k,j which are not parameters by u, which has type Prop. Definition 4 Given a signature {M 1,..., M n }, {F 1 [u],..., F m [u]}, the CCparametric data type for this signature is the one given by 1. D 0 ( u : Prop)(F 1 [u]... F m [u] X), 2. {M 1,..., M n }, 3. f j λx 1 : A 1,j..... λn nj : A nj j. λu : Prop. λy 1 : F 1 [u]..... λy m : F m. y j t 1... t nj, where t i { xi if A i,j is some M k, x i uy 1... y m if A i,j is D 0. Definition 5 A CC-data type is defined by induction as follows: D is a CCdate type if it is a CC-parametric data type and all of its parameters are CC-data types or are variables of type Prop. 11

12 Remark 1 Berardi limits parameters to CC-data types. This definition is generalized here to accomodate ListA, since A is such a variable. It is possible to abstract from such CC-data types with respect to these papameters, as is done in the case of lists. Berardi also defines what he calls an iterator, which corresponds to Listrec: Definition 6 The D-iterator is defined by Diter λu : Prop. λh 1 : F 1 [u].... λh m : F m [u]. λx : D. xuh 1... h m. Remark 2 This term corresponds exactly to Listrec. Listrec should probably have been called Listiter, since it is really an iterator rather than a recursion operator. Compare with the terms Z (iterator) and R (recursion operator) for natural numbers: the former satisfies whereas the latter satisfies Z(σx)f = f(zxf), RMN(σx) = Nx(RMNx). Clearly, Listrec is more like the former than the latter, and this is why defining cdr was so difficult. The basic property of Diter is given by Theorem 5 If B : Prop and H j : F j [B] for j = 1,..., m, then DiterBH 1... H m (f j t 1... t nj ) = H j T 1... T nj, where T i { ti if A i,j is some M k, DiterBH 1... H m t i if A i,j is D 0. Proof By Definition 4, DiterBH 1... H m (f j t 1... t nj ) = f j t 1... t nj BH 1... H m = H j T 1... T nj, where T i { ti if A i,j is some M k, t i BH 1... H m if A i,j is D 0, 12

13 and DiterBH 1... H m t i = t i BH 1... H m by Definition 6. Berardi also defines propositions induction D asserting that all elements of the domain of the data type D can be constructed by the constructors, and considers it surprising that these propositions cannot be proved. But it is not surprising that they cannot be proved: if = does not include η-conversion, then the induction predicate for the natural numbers is not true. For the term λa : Prop. λx : A A. x is a term of type N which is not convertible to any numeral (although it is η-convertible to 1 λa : Prop. λx : A A. λy : A. xy). This is why I have used N and L to obtain induction for natural numbers and lists. If this approach is applied to CC-data types, the result is the following definition: Definition 7 If D is a CC-data type, then the predicate Dpred is defined as follows: Dpred λx : D. ( y : D Prop)(closef 1 y... closef m y yx), where, for each j = 1, 2,..., m, closef j y ( x 1 : A 1,j )... ( x nj : A nj j)(y 1 x 1... Y nj x nj y(f j x 1... x nj ), where, for each i = 1,..., n j, y if A i.j is D 0, Y i D pred if A i,j is M k, a CC-data type whose predicate is D pred, λz : M k. T if A i,j is M k, a variable, and where, T. As in the case of N and L, we can prove the following: Theorem 6 The term Dpred satisfies Dpred : D Prop, and there are closed terms N j and P such that N j : ( x 1 : A 1,j )... ( x nj : A nj j)(dpred (f j x 1... x nj )), and P : ( B : D Prop)(closef 1 B... closef n B ( x : D)(Dpred x Bx)). 13

14 The last of these expresses the induction property for D, so to have this property it is sufficient to replace formulas of the form ( x : D)M by ( x : D)(Dpred x M). This leaves the unicity conditions. They are that each constructor is injective and that the co-domains of the constructors are mutually disjoint. The methods used for lists here can deal with these conditions for CC-data types satisfying certain conditions. Let us start with the disjointness of the co-domains of the constructors. This is expressed by axioms of the form c j,l : ( x 1 : A 1,j )...( x nj : A nj j)( y 1 : A 1,l )...( y nl : A nl l) ( f j x 1... x nj = D f l y 1... y nl ). Let us call these axioms c i,j : C i,j. If we assume that different constructors have different normal forms, then these axioms can be proved consistent by the method of Theorem 4. But by Definition 4, the constructors will have distinct normal forms when no two of them have the same type (since the terms are determined by their signatures). This gives us Theorem 7 Let D be a CC-data type in which no two constructors have the same type. Let Γ be a strongly consistent environment. Let Γ be an environment consisting of Γ together with all the c i,j : C i,j. Then Γ is consistent. Because of the way in which constructors are defined from their types, it is safe to assume that there are no CC-data types in which two constructors have the same type, so the restriction of this theorem is not a major one. Now let us turn to the injective property of constructors. In the case of natural numbers and lists, this is established by the use of inverses to the constructors. What we need is an inverse for each constructor f j for each of its arguments. Let us call π i,j the predecessor for argument i of the constructor f j. The property we want for π i,j : D A i,j is π i,j M = { ti if M = f j t 1... t nj, N otherwise, where N : A i,j is any term of the right type. The definition will depend on the type A i,j : if it is some M k then our definition will be like that of car, whereas if it is D then the definition will be like that of cdr. For the case in which there is more than one i for which A i,j is D, we will need n-tuples. 14

15 Definition 8 Tuples will be defined so that D n A 1... A n X 1... X n : A 1... A n, where the association for is to the right, so that A 1 A 2... A n 1 A n is A 1 (A 2 (... (A n 1 A n )...)). The definition will be for n 2, and will be as follows: D 2 D and D n+1 λu : Prop. λu 1 : Prop..... λu n : Prop. λx : u. λx 1 : u λx n : u n. Dux(D n u 1... u n x 1... x n ). Projection functions will be defined in the form kth n for 1 k n as follows (where 1th will mean fst and 2th will mean snd): kth 2 kth, fst n+1 λu : Prop. λu 1 : Prop..... λu n : Prop. λx : u u 1... u n. and, for k 2, fstu(u 1... u n )x, kth n+1 λu : Prop. λu 1 : Prop..... λu n : Prop. λx : u u 1... u n. (k 1)th n u 1... u n (sndux). Definition 9 Let D be a CC-data type. The terms π i,j of type D A i,j will be defined as follows: (1) if A i,j is M k for some k, then where π i,j λy : A i,j. λx : D. DiterA i,j H 1... H m x, H l { λx1 : A 1,j..... λx nj : A nj j. x i if l = j, λx 1 : A 1,l..... λx nl : A nl l. y if l j. (2) if A i,j is D, then let i 1,..., i r be the indices i s for which A isj is D, and assume that i = i s. Then where π isj λx : D. (s + 1)th D }.{{.. D} (G j x), G j λx : D. Diter(D... D)H }{{} 1... H m x and λx 1 : A 1,j.... λx nj : A n j j. D D }.{{.. D} (f j X 1... X nj )X i1... X ir if l = j, H l λx 1 : A 1,l..... λx nl : A nl l. D D }.{{.. D} x }.{{.. x} otherwise, 15

16 and where (D... D) if h = i A }{{} s for s = 1,..., r, h,j A h,j otherwise, and fst D }.{{.. D} x h if h = i s for s = 1,..., r, X h x h otherwise. Theorem 8 Let D be a CC-data type, and suppose i 1,..., i r are the indices i s for which A isj = D. Suppose X : D. Then where Y = X and G j X = D D }.{{.. D} Y Y 1... Y r, Y l = { tis if X = f j t 1... t nj and l = i s, X otherwise. Proof By induction on X as a member of the CC-data type D. Case 1. X = f l t 1... t nl where l j. Then G j X = Diter(D... D)H }{{} 1... H m X = H j T 1... T nj = D D }.{{.. D} X }.{{.. X}, and the theorem is satisfied. Case 2. X = f j t 1... t nj. By the induction hypothesis, so fst(g i,j t i ) = t i. Hence, G j t i = D D }.{{.. D} t i Y 1... Y r, G j X = Diter(D... D)H }{{} 1... H m X = H j T 1... T nj = D D }.{{.. D} (f j T 1... T nj )T i1... T ir, 16

17 where T h = t h for h i s and T is = fst D }.{{.. D} (G j t is ) for s = 1,..., r. Hence, by the induction hypothesis, as desired. G j X = D D }.{{.. D} Xt i1... t ir, Corollary 8.1 For CC-data types D, if A i,j = D, then π i,j (f l t 1... t nl ) = { ti if l = j, f l t 1... t nl if l j. Theorem 9 Let D be a CC-data type and suppose that A i,j is some M k. Suppose N : M k. Then π i,j N(f l t 1... t nl ) = { ti if l = i, N if l i. Proof We have, by Definition 9 (1), π i,j N(f j t 1... t nj ) = DiterA i,j H 1... H m (f j t 1... t nj ) while if l j, we have = H j T 1... T nj = T i = t i, π i,j N(f l t 1... t nl ) = DiterA i,j H 1... H m (f l t 1... t nl ) = H l T 1... T nl = N. Corollary 9.1 For any CC-data type D, π i,j (f j t 1... t nj ) = t i. 17

18 The unicity conditions can now be proved for CC-data types as in Theorems 2 and 3. This means that the environment Σ (which the author calls a context) of [1, p. 49] can be made smaller: it will only need the axiom c : 0 = N σ0, which is a special case of Peano1 and is thus known to be consistent. Remark 3 It is worth pointing out that Berardi is not simply interested in whether or not his axioms are consistent in the terms we have considered here. He is interested in whether or not they are consistent with set theory. This is because he is using these axioms to verify the strong normal form theorem for Girard s F, and he wants to show that this proof is valid in set theory. Merely proving the axioms consistent in the sense of this paper would only lead to the result that SN for the calculus of constructions implies SN for F, which is a much less interesting result. References [1] Stefano Berardi. Encoding of data types in pure construction calculus: a semantic justification. In Gérard Huet and Gordon Plotkin, editors, Logical Environments, pages Cambridge University Press, [2] Jonathan P. Seldin. On the proof theory of Coquand s calculus of constructions. Annals of Pure and Applied Logic, 83:23 101,

Excluded Middle without Definite Descriptions in the Theory of Constructions

Excluded Middle without Definite Descriptions in the Theory of Constructions Excluded Middle without Definite Descriptions in the Theory of Constructions Jonathan P. Seldin Department of Mathematics Concordia University Montréal, Québec, Canada seldin@alcor.concordia.ca November

More information

CSE-433 Logic in Computer Science 2007 Final exam Sample Solution

CSE-433 Logic in Computer Science 2007 Final exam Sample Solution Name: Hemos ID: CSE-433 Logic in Computer Science 2007 Final exam Sample Solution This is a closed-book exam No other material is permitted It consists of 4 problems worth a total of 175 points There are

More information

The Calculus of Inductive Constructions

The Calculus of Inductive Constructions The Calculus of Inductive Constructions Hugo Herbelin 10th Oregon Programming Languages Summer School Eugene, Oregon, June 16-July 1, 2011 1 Outline - A bit of history, leading to the Calculus of Inductive

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

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

Peano Arithmetic. CSC 438F/2404F Notes (S. Cook) Fall, Goals Now

Peano Arithmetic. CSC 438F/2404F Notes (S. Cook) Fall, Goals Now CSC 438F/2404F Notes (S. Cook) Fall, 2008 Peano Arithmetic Goals Now 1) We will introduce a standard set of axioms for the language L A. The theory generated by these axioms is denoted PA and called Peano

More information

Introduction to Type Theory February 2008 Alpha Lernet Summer School Piriapolis, Uruguay. Herman Geuvers Nijmegen & Eindhoven, NL

Introduction to Type Theory February 2008 Alpha Lernet Summer School Piriapolis, Uruguay. Herman Geuvers Nijmegen & Eindhoven, NL Introduction to Type Theory February 2008 Alpha Lernet Summer School Piriapolis, Uruguay Herman Geuvers Nijmegen & Eindhoven, NL Lecture 5: Higher Order Logic and the Calculus of Constructions 1 Church

More information

Marie Duží

Marie Duží Marie Duží marie.duzi@vsb.cz 1 Formal systems, Proof calculi A proof calculus (of a theory) is given by: 1. a language 2. a set of axioms 3. a set of deduction rules ad 1. The definition of a language

More information

Programming Languages

Programming Languages CSE 230: Winter 2010 Principles of Programming Languages Lecture 10: Programming in λ-calculusc l l Ranjit Jhala UC San Diego Review The lambda calculus is a calculus of functions: e := x λx. e e 1 e 2

More information

Extending the Lambda Calculus: An Eager Functional Language

Extending the Lambda Calculus: An Eager Functional Language Syntax of the basic constructs: Extending the Lambda Calculus: An Eager Functional Language canonical forms z cfm ::= intcfm boolcfm funcfm tuplecfm altcfm intcfm ::= 0 1-1... boolcfm ::= boolconst funcfm

More information

The Process of Mathematical Proof

The Process of Mathematical Proof 1 The Process of Mathematical Proof Introduction. Mathematical proofs use the rules of logical deduction that grew out of the work of Aristotle around 350 BC. In previous courses, there was probably an

More information

From Constructibility and Absoluteness to Computability and Domain Independence

From Constructibility and Absoluteness to Computability and Domain Independence From Constructibility and Absoluteness to Computability and Domain Independence Arnon Avron School of Computer Science Tel Aviv University, Tel Aviv 69978, Israel aa@math.tau.ac.il Abstract. Gödel s main

More information

COMP6463: λ-calculus

COMP6463: λ-calculus COMP6463: λ-calculus 1. Basics Michael Norrish Michael.Norrish@nicta.com.au Canberra Research Lab., NICTA Semester 2, 2015 Outline Introduction Lambda Calculus Terms Alpha Equivalence Substitution Dynamics

More information

Convex Optimization Notes

Convex Optimization Notes Convex Optimization Notes Jonathan Siegel January 2017 1 Convex Analysis This section is devoted to the study of convex functions f : B R {+ } and convex sets U B, for B a Banach space. The case of B =

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

Propositional Logic: Syntax

Propositional Logic: Syntax Logic Logic is a tool for formalizing reasoning. There are lots of different logics: probabilistic logic: for reasoning about probability temporal logic: for reasoning about time (and programs) epistemic

More information

TR : Binding Modalities

TR : Binding Modalities City University of New York (CUNY) CUNY Academic Works Computer Science Technical Reports Graduate Center 2012 TR-2012011: Binding Modalities Sergei N. Artemov Tatiana Yavorskaya (Sidon) Follow this and

More information

An introduction to classical realizability

An introduction to classical realizability Q E I U G I C An introduction to classical realizability Alexandre Miquel O P. D E. L Ō A U D E L A R January 27th, 2017 EJCIM 17 Lyon The Curry-Howard correspondence The dictionary: Proof theory Functional

More information

A Constructive Analysis of Learning in Peano Arithmetic

A Constructive Analysis of Learning in Peano Arithmetic A Constructive Analysis of Learning in Peano Arithmetic Federico Aschieri Dipartimento di Informatica Università di Torino Italy School of Electronic Engineering and Computer Science Queen Mary, University

More information

CS156: The Calculus of Computation

CS156: The Calculus of Computation Page 1 of 31 CS156: The Calculus of Computation Zohar Manna Winter 2010 Chapter 3: First-Order Theories Page 2 of 31 First-Order Theories I First-order theory T consists of Signature Σ T - set of constant,

More information

Explicit Logics of Knowledge and Conservativity

Explicit Logics of Knowledge and Conservativity Explicit Logics of Knowledge and Conservativity Melvin Fitting Lehman College, CUNY, 250 Bedford Park Boulevard West, Bronx, NY 10468-1589 CUNY Graduate Center, 365 Fifth Avenue, New York, NY 10016 Dedicated

More information

Propositional and Predicate Logic - V

Propositional and Predicate Logic - V Propositional and Predicate Logic - V Petr Gregor KTIML MFF UK WS 2016/2017 Petr Gregor (KTIML MFF UK) Propositional and Predicate Logic - V WS 2016/2017 1 / 21 Formal proof systems Hilbert s calculus

More information

Applied Logic for Computer Scientists. Answers to Some Exercises

Applied Logic for Computer Scientists. Answers to Some Exercises Applied Logic for Computer Scientists Computational Deduction and Formal Proofs Springer, 2017 doi: http://link.springer.com/book/10.1007%2f978-3-319-51653-0 Answers to Some Exercises Mauricio Ayala-Rincón

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

3.2 Reduction 29. Truth. The constructor just forms the unit element,. Since there is no destructor, there is no reduction rule.

3.2 Reduction 29. Truth. The constructor just forms the unit element,. Since there is no destructor, there is no reduction rule. 32 Reduction 29 32 Reduction In the preceding section, we have introduced the assignment of proof terms to natural deductions If proofs are programs then we need to explain how proofs are to be executed,

More information

The Independence of Peano's Fourth Axiom from. Martin-Lof's Type Theory without Universes. Jan M. Smith. Department of Computer Science

The Independence of Peano's Fourth Axiom from. Martin-Lof's Type Theory without Universes. Jan M. Smith. Department of Computer Science The Independence of Peano's Fourth Axiom from Martin-Lof's Type Theory without Universes Jan M. Smith Department of Computer Science University of Goteborg/Chalmers S-412 96 Goteborg Sweden March 1987

More information

Typing λ-terms. Types. Typed λ-terms. Base Types. The Typing Relation. Advanced Formal Methods. Lecture 3: Simply Typed Lambda calculus

Typing λ-terms. Types. Typed λ-terms. Base Types. The Typing Relation. Advanced Formal Methods. Lecture 3: Simply Typed Lambda calculus Course 2D1453, 200607 Advanced Formal Methods Lecture 3: Simply Typed Lambda calculus Mads Dam KTH/CSC Some material from B. Pierce: TAPL + some from G. Klein, NICTA Typing λterms The uptyped λcalculus

More information

On the Role of Implication in Formal Logic 1

On the Role of Implication in Formal Logic 1 On the Role of Implication in Formal Logic 1 Jonathan P. Seldin Department of Mathematics Concordia University Montréal, Québec, Canada seldin@alcor.concordia.ca April 24, 1998 1 This research was supported

More information

Finite Automata Theory and Formal Languages TMV027/DIT321 LP Recap: Logic, Sets, Relations, Functions

Finite Automata Theory and Formal Languages TMV027/DIT321 LP Recap: Logic, Sets, Relations, Functions Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2017 Formal proofs; Simple/strong induction; Mutual induction; Inductively defined sets; Recursively defined functions. Lecture 3 Ana Bove

More information

A polytime proof of correctness of the Rabin-Miller algorithm from Fermat s Little Theorem

A polytime proof of correctness of the Rabin-Miller algorithm from Fermat s Little Theorem A polytime proof of correctness of the Rabin-Miller algorithm from Fermat s Little Theorem Grzegorz Herman and Michael Soltys November 24, 2008 Abstract Although a deterministic polytime algorithm for

More information

Lecture Notes on Heyting Arithmetic

Lecture Notes on Heyting Arithmetic Lecture Notes on Heyting Arithmetic 15-317: Constructive Logic Frank Pfenning Lecture 8 September 21, 2017 1 Introduction In this lecture we discuss the data type of natural numbers. They serve as a prototype

More information

Review. Principles of Programming Languages. Equality. The Diamond Property. The Church-Rosser Theorem. Corollaries. CSE 230: Winter 2007

Review. Principles of Programming Languages. Equality. The Diamond Property. The Church-Rosser Theorem. Corollaries. CSE 230: Winter 2007 CSE 230: Winter 2007 Principles of Programming Languages Lecture 12: The λ-calculus Ranjit Jhala UC San Diego Review The lambda calculus is a calculus of functions: e := x λx. e e 1 e 2 Several evaluation

More information

2.7.1 Foundations of Proof Systems

2.7.1 Foundations of Proof Systems 2.7.1 Foundations of Proof Systems Exam 2017-2018 1 Warming up... Question 1 Give a proof in natural deduction of the following proposition : ( f = (g = h)) = (( f = g) = ( f = h)). Solution. f (g h);

More information

A Constructive Analysis of Learning in Peano Arithmetic

A Constructive Analysis of Learning in Peano Arithmetic A Constructive Analysis of Learning in Peano Arithmetic Federico Aschieri Dipartimento di Informatica Università di Torino Italy School of Electronic Engineering and Computer Science Queen Mary, University

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

The semantics of propositional logic

The semantics of propositional logic The semantics of propositional logic Readings: Sections 1.3 and 1.4 of Huth and Ryan. In this module, we will nail down the formal definition of a logical formula, and describe the semantics of propositional

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

CSCI 490 problem set 6

CSCI 490 problem set 6 CSCI 490 problem set 6 Due Tuesday, March 1 Revision 1: compiled Tuesday 23 rd February, 2016 at 21:21 Rubric For full credit, your solutions should demonstrate a proficient understanding of the following

More information

The Curry-Howard Isomorphism

The Curry-Howard Isomorphism The Curry-Howard Isomorphism Software Formal Verification Maria João Frade Departmento de Informática Universidade do Minho 2008/2009 Maria João Frade (DI-UM) The Curry-Howard Isomorphism MFES 2008/09

More information

Logical Preliminaries

Logical Preliminaries Logical Preliminaries Johannes C. Flieger Scheme UK March 2003 Abstract Survey of intuitionistic and classical propositional logic; introduction to the computational interpretation of intuitionistic logic

More information

n(n + 1). 2 . If n = 3, then 1+2+3=6= 3(3+1) . If n = 2, then = 3 = 2(2+1)

n(n + 1). 2 . If n = 3, then 1+2+3=6= 3(3+1) . If n = 2, then = 3 = 2(2+1) Chapter 4 Induction In this chapter, we introduce mathematical induction, which is a proof technique that is useful for proving statements of the form (8n N)P(n), or more generally (8n Z)(n a =) P(n)),

More information

Propositional and Predicate Logic - IV

Propositional and Predicate Logic - IV Propositional and Predicate Logic - IV Petr Gregor KTIML MFF UK ZS 2015/2016 Petr Gregor (KTIML MFF UK) Propositional and Predicate Logic - IV ZS 2015/2016 1 / 19 Tableau method (from the previous lecture)

More information

Lecture Notes on Combinatory Modal Logic

Lecture Notes on Combinatory Modal Logic Lecture Notes on Combinatory Modal Logic 15-816: Modal Logic Frank Pfenning Lecture 9 February 16, 2010 1 Introduction The connection between proofs and program so far has been through a proof term assignment

More information

hal , version 1-21 Oct 2009

hal , version 1-21 Oct 2009 ON SKOLEMISING ZERMELO S SET THEORY ALEXANDRE MIQUEL Abstract. We give a Skolemised presentation of Zermelo s set theory (with notations for comprehension, powerset, etc.) and show that this presentation

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

Interpreting HOL in the Calculus of Constructions

Interpreting HOL in the Calculus of Constructions Interpreting HOL in the Calculus of Constructions Jonathan P. Seldin Department of Mathematics and Computer Science, University of Lethbridge, 4401 University Drive, Lethbridge, Alberta, Canada, T1K 3M4

More information

Propositional Logic: Syntax

Propositional Logic: Syntax 4 Propositional Logic: Syntax Reading: Metalogic Part II, 22-26 Contents 4.1 The System PS: Syntax....................... 49 4.1.1 Axioms and Rules of Inference................ 49 4.1.2 Definitions.................................

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

Provably Total Functions of Arithmetic with Basic Terms

Provably Total Functions of Arithmetic with Basic Terms Provably Total Functions of Arithmetic with Basic Terms Evgeny Makarov INRIA Orsay, France emakarov@gmail.com A new characterization of provably recursive functions of first-order arithmetic is described.

More information

23.1 Gödel Numberings and Diagonalization

23.1 Gödel Numberings and Diagonalization Applied Logic Lecture 23: Unsolvable Problems in Logic CS 4860 Spring 2009 Tuesday, April 14, 2009 The fact that Peano Arithmetic is expressive enough to represent all computable functions means that some

More information

Denotational semantics: proofs

Denotational semantics: proofs APPENDIX A Denotational semantics: proofs We show that every closed term M has a computable functional [[M ] as its denotation. A.1. Unification We show that for any two constructor terms one can decide

More information

A Note on Bootstrapping Intuitionistic Bounded Arithmetic

A Note on Bootstrapping Intuitionistic Bounded Arithmetic A Note on Bootstrapping Intuitionistic Bounded Arithmetic SAMUEL R. BUSS Department of Mathematics University of California, San Diego Abstract This paper, firstly, discusses the relationship between Buss

More information

Logic. Propositional Logic: Syntax

Logic. Propositional Logic: Syntax Logic Propositional Logic: Syntax Logic is a tool for formalizing reasoning. There are lots of different logics: probabilistic logic: for reasoning about probability temporal logic: for reasoning about

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

Type Theory and Constructive Mathematics. Type Theory and Constructive Mathematics Thierry Coquand. University of Gothenburg

Type Theory and Constructive Mathematics. Type Theory and Constructive Mathematics Thierry Coquand. University of Gothenburg Type Theory and Constructive Mathematics Type Theory and Constructive Mathematics Thierry Coquand University of Gothenburg Content An introduction to Voevodsky s Univalent Foundations of Mathematics The

More information

Propositional and Predicate Logic - XIII

Propositional and Predicate Logic - XIII Propositional and Predicate Logic - XIII Petr Gregor KTIML MFF UK WS 2016/2017 Petr Gregor (KTIML MFF UK) Propositional and Predicate Logic - XIII WS 2016/2017 1 / 22 Undecidability Introduction Recursive

More information

Part III Logic. Theorems. Based on lectures by T. E. Forster Notes taken by Dexter Chua. Lent 2017

Part III Logic. Theorems. Based on lectures by T. E. Forster Notes taken by Dexter Chua. Lent 2017 Part III Logic Theorems Based on lectures by T. E. Forster Notes taken by Dexter Chua Lent 2017 These notes are not endorsed by the lecturers, and I have modified them (often significantly) after lectures.

More information

Metainduction in Operational Set Theory

Metainduction in Operational Set Theory Metainduction in Operational Set Theory Luis E. Sanchis Department of Electrical Engineering and Computer Science Syracuse University Syracuse, NY 13244-4100 Sanchis@top.cis.syr.edu http://www.cis.syr.edu/

More information

CS156: The Calculus of Computation Zohar Manna Winter 2010

CS156: The Calculus of Computation Zohar Manna Winter 2010 Page 3 of 31 Page 4 of 31 CS156: The Calculus of Computation Zohar Manna Winter 2010 First-Order Theories I First-order theory T consists of Signature ΣT - set of constant, function, and predicate symbols

More information

Programming with Higher Inductive Types

Programming with Higher Inductive Types 1/32 Programming with Higher Inductive Types Herman Geuvers joint work with Niels van der Weide, Henning Basold, Dan Frumin, Leon Gondelman Radboud University Nijmegen, The Netherlands November 17, 2017

More information

Chapter 3 Deterministic planning

Chapter 3 Deterministic planning Chapter 3 Deterministic planning In this chapter we describe a number of algorithms for solving the historically most important and most basic type of planning problem. Two rather strong simplifying assumptions

More information

0.Axioms for the Integers 1

0.Axioms for the Integers 1 0.Axioms for the Integers 1 Number theory is the study of the arithmetical properties of the integers. You have been doing arithmetic with integers since you were a young child, but these mathematical

More information

2. Introduction to commutative rings (continued)

2. Introduction to commutative rings (continued) 2. Introduction to commutative rings (continued) 2.1. New examples of commutative rings. Recall that in the first lecture we defined the notions of commutative rings and field and gave some examples of

More information

1 Introduction. 2 Recap The Typed λ-calculus λ. 3 Simple Data Structures

1 Introduction. 2 Recap The Typed λ-calculus λ. 3 Simple Data Structures CS 6110 S18 Lecture 21 Products, Sums, and Other Datatypes 1 Introduction In this lecture, we add constructs to the typed λ-calculus that allow working with more complicated data structures, such as pairs,

More information

185.A09 Advanced Mathematical Logic

185.A09 Advanced Mathematical Logic 185.A09 Advanced Mathematical Logic www.volny.cz/behounek/logic/teaching/mathlog13 Libor Běhounek, behounek@cs.cas.cz Lecture #1, October 15, 2013 Organizational matters Study materials will be posted

More information

1. Model existence theorem.

1. Model existence theorem. We fix a first order logic F such that 1. Model existence theorem. C. We let S be the set of statements of F and we suppose Γ S. We let VFT be the set of variable free terms. For each s VFT we let [s]

More information

Proving Completeness for Nested Sequent Calculi 1

Proving Completeness for Nested Sequent Calculi 1 Proving Completeness for Nested Sequent Calculi 1 Melvin Fitting abstract. Proving the completeness of classical propositional logic by using maximal consistent sets is perhaps the most common method there

More information

NONSTANDARD MODELS AND KRIPKE S PROOF OF THE GÖDEL THEOREM

NONSTANDARD MODELS AND KRIPKE S PROOF OF THE GÖDEL THEOREM Notre Dame Journal of Formal Logic Volume 41, Number 1, 2000 NONSTANDARD MODELS AND KRIPKE S PROOF OF THE GÖDEL THEOREM HILARY PUTNAM Abstract This lecture, given at Beijing University in 1984, presents

More information

PEANO AXIOMS FOR THE NATURAL NUMBERS AND PROOFS BY INDUCTION. The Peano axioms

PEANO AXIOMS FOR THE NATURAL NUMBERS AND PROOFS BY INDUCTION. The Peano axioms PEANO AXIOMS FOR THE NATURAL NUMBERS AND PROOFS BY INDUCTION The Peano axioms The following are the axioms for the natural numbers N. You might think of N as the set of integers {0, 1, 2,...}, but it turns

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

AN ALTERNATIVE NATURAL DEDUCTION FOR THE INTUITIONISTIC PROPOSITIONAL LOGIC

AN ALTERNATIVE NATURAL DEDUCTION FOR THE INTUITIONISTIC PROPOSITIONAL LOGIC Bulletin of the Section of Logic Volume 45/1 (2016), pp 33 51 http://dxdoiorg/1018778/0138-068045103 Mirjana Ilić 1 AN ALTERNATIVE NATURAL DEDUCTION FOR THE INTUITIONISTIC PROPOSITIONAL LOGIC Abstract

More information

NICTA Advanced Course. Theorem Proving Principles, Techniques, Applications

NICTA Advanced Course. Theorem Proving Principles, Techniques, Applications NICTA Advanced Course Theorem Proving Principles, Techniques, Applications λ 1 CONTENT Intro & motivation, getting started with Isabelle Foundations & Principles Lambda Calculus Higher Order Logic, natural

More information

Math 341: Convex Geometry. Xi Chen

Math 341: Convex Geometry. Xi Chen Math 341: Convex Geometry Xi Chen 479 Central Academic Building, University of Alberta, Edmonton, Alberta T6G 2G1, CANADA E-mail address: xichen@math.ualberta.ca CHAPTER 1 Basics 1. Euclidean Geometry

More information

INDUCTION AND RECURSION

INDUCTION AND RECURSION INDUCTION AND RECURSION Jorma K. Mattila LUT, Department of Mathematics and Physics 1 Induction on Basic and Natural Numbers 1.1 Introduction In its most common form, mathematical induction or, as it is

More information

Lecture Notes on Certifying Theorem Provers

Lecture Notes on Certifying Theorem Provers Lecture Notes on Certifying Theorem Provers 15-317: Constructive Logic Frank Pfenning Lecture 13 October 17, 2017 1 Introduction How do we trust a theorem prover or decision procedure for a logic? Ideally,

More information

The Syntax of First-Order Logic. Marc Hoyois

The Syntax of First-Order Logic. Marc Hoyois The Syntax of First-Order Logic Marc Hoyois Table of Contents Introduction 3 I First-Order Theories 5 1 Formal systems............................................. 5 2 First-order languages and theories..................................

More information

Minimal logic for computable functionals

Minimal logic for computable functionals Minimal logic for computable functionals Helmut Schwichtenberg Mathematisches Institut der Universität München Contents 1. Partial continuous functionals 2. Total and structure-total functionals 3. Terms;

More information

The natural numbers. The natural numbers come with an addition +, a multiplication and an order < p < q, q < p, p = q.

The natural numbers. The natural numbers come with an addition +, a multiplication and an order < p < q, q < p, p = q. The natural numbers N = {0, 1,, 3, } The natural numbers come with an addition +, a multiplication and an order < p, q N, p + q N. p, q N, p q N. p, q N, exactly one of the following holds: p < q, q

More information

Lecture Notes on Subject Reduction and Normal Forms

Lecture Notes on Subject Reduction and Normal Forms Lecture Notes on Subject Reduction and Normal Forms 15-814: Types and Programming Languages Frank Pfenning Lecture 4 September 13, 2018 1 Introduction In the last lecture we proved some key aspect of a

More information

A MODAL EXTENSION OF FIRST ORDER CLASSICAL LOGIC Part I

A MODAL EXTENSION OF FIRST ORDER CLASSICAL LOGIC Part I Bulletin of the Section of Logic Volume 32/4 (2003), pp. 165 177 George Tourlakis 1 Francisco Kibedi A MODAL EXTENSION OF FIRST ORDER CLASSICAL LOGIC Part I Abstract We formalize a fragment of the metatheory

More information

Appendix A: Separation theorems in IR n

Appendix A: Separation theorems in IR n Appendix A: Separation theorems in IR n These notes provide a number of separation theorems for convex sets in IR n. We start with a basic result, give a proof with the help on an auxiliary result and

More information

Lecture Notes on Data Abstraction

Lecture Notes on Data Abstraction Lecture Notes on Data Abstraction 15-814: Types and Programming Languages Frank Pfenning Lecture 14 October 23, 2018 1 Introduction Since we have moved from the pure λ-calculus to functional programming

More information

Beyond First-Order Logic

Beyond First-Order Logic Beyond First-Order Logic Software Formal Verification Maria João Frade Departmento de Informática Universidade do Minho 2008/2009 Maria João Frade (DI-UM) Beyond First-Order Logic MFES 2008/09 1 / 37 FOL

More information

Logic. Propositional Logic: Syntax. Wffs

Logic. Propositional Logic: Syntax. Wffs Logic Propositional Logic: Syntax Logic is a tool for formalizing reasoning. There are lots of different logics: probabilistic logic: for reasoning about probability temporal logic: for reasoning about

More information

Přednáška 12. Důkazové kalkuly Kalkul Hilbertova typu. 11/29/2006 Hilbertův kalkul 1

Přednáška 12. Důkazové kalkuly Kalkul Hilbertova typu. 11/29/2006 Hilbertův kalkul 1 Přednáška 12 Důkazové kalkuly Kalkul Hilbertova typu 11/29/2006 Hilbertův kalkul 1 Formal systems, Proof calculi A proof calculus (of a theory) is given by: A. a language B. a set of axioms C. a set of

More information

KRIPKE S THEORY OF TRUTH 1. INTRODUCTION

KRIPKE S THEORY OF TRUTH 1. INTRODUCTION KRIPKE S THEORY OF TRUTH RICHARD G HECK, JR 1. INTRODUCTION The purpose of this note is to give a simple, easily accessible proof of the existence of the minimal fixed point, and of various maximal fixed

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

PREDICATE LOGIC: UNDECIDABILITY AND INCOMPLETENESS HUTH AND RYAN 2.5, SUPPLEMENTARY NOTES 2

PREDICATE LOGIC: UNDECIDABILITY AND INCOMPLETENESS HUTH AND RYAN 2.5, SUPPLEMENTARY NOTES 2 PREDICATE LOGIC: UNDECIDABILITY AND INCOMPLETENESS HUTH AND RYAN 2.5, SUPPLEMENTARY NOTES 2 Neil D. Jones DIKU 2005 14 September, 2005 Some slides today new, some based on logic 2004 (Nils Andersen) OUTLINE,

More information

Krivine s Intuitionistic Proof of Classical Completeness (for countable languages)

Krivine s Intuitionistic Proof of Classical Completeness (for countable languages) Krivine s Intuitionistic Proof of Classical Completeness (for countable languages) Berardi Stefano Valentini Silvio Dip. Informatica Dip. Mat. Pura ed Applicata Univ. Torino Univ. Padova c.so Svizzera

More information

03 Review of First-Order Logic

03 Review of First-Order Logic CAS 734 Winter 2014 03 Review of First-Order Logic William M. Farmer Department of Computing and Software McMaster University 18 January 2014 What is First-Order Logic? First-order logic is the study of

More information

PHIL 422 Advanced Logic Inductive Proof

PHIL 422 Advanced Logic Inductive Proof PHIL 422 Advanced Logic Inductive Proof 1. Preamble: One of the most powerful tools in your meta-logical toolkit will be proof by induction. Just about every significant meta-logical result relies upon

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

Linear Algebra M1 - FIB. Contents: 5. Matrices, systems of linear equations and determinants 6. Vector space 7. Linear maps 8.

Linear Algebra M1 - FIB. Contents: 5. Matrices, systems of linear equations and determinants 6. Vector space 7. Linear maps 8. Linear Algebra M1 - FIB Contents: 5 Matrices, systems of linear equations and determinants 6 Vector space 7 Linear maps 8 Diagonalization Anna de Mier Montserrat Maureso Dept Matemàtica Aplicada II Translation:

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

Peter Kahn. Spring 2007

Peter Kahn. Spring 2007 MATH 304: CONSTRUCTING THE REAL NUMBERS Peter Kahn Spring 2007 Contents 1 The Natural Numbers 1 1.1 The Peano Axioms............................ 2 1.2 Proof by induction............................ 4 1.3

More information

What are the recursion theoretic properties of a set of axioms? Understanding a paper by William Craig Armando B. Matos

What are the recursion theoretic properties of a set of axioms? Understanding a paper by William Craig Armando B. Matos What are the recursion theoretic properties of a set of axioms? Understanding a paper by William Craig Armando B. Matos armandobcm@yahoo.com February 5, 2014 Abstract This note is for personal use. It

More information

SOME TRANSFINITE INDUCTION DEDUCTIONS

SOME TRANSFINITE INDUCTION DEDUCTIONS SOME TRANSFINITE INDUCTION DEDUCTIONS SYLVIA DURIAN Abstract. This paper develops the ordinal numbers and transfinite induction, then demonstrates some interesting applications of transfinite induction.

More information

Examples: P: it is not the case that P. P Q: P or Q P Q: P implies Q (if P then Q) Typical formula:

Examples: P: it is not the case that P. P Q: P or Q P Q: P implies Q (if P then Q) Typical formula: Logic: The Big Picture Logic is a tool for formalizing reasoning. There are lots of different logics: probabilistic logic: for reasoning about probability temporal logic: for reasoning about time (and

More information

Typed Arithmetic Expressions

Typed Arithmetic Expressions Typed Arithmetic Expressions CS 550 Programming Languages Jeremy Johnson TAPL Chapters 3 and 5 1 Types and Safety Evaluation rules provide operational semantics for programming languages. The rules provide

More information

Lecture Notes on The Curry-Howard Isomorphism

Lecture Notes on The Curry-Howard Isomorphism Lecture Notes on The Curry-Howard Isomorphism 15-312: Foundations of Programming Languages Frank Pfenning Lecture 27 ecember 4, 2003 In this lecture we explore an interesting connection between logic and

More information