Recursive types to D and beyond

Size: px
Start display at page:

Download "Recursive types to D and beyond"

Transcription

1 Recursive types to D and beyond Felice Cardone Dipartimento di Informatica, Sistemistica e Comunicazione, Università di Milano-Bicocca, Via Bicocca degli Arcimboldi 8, I Milano, Italy Abstract The paper presents an analysis of the interpretation of recursive types as logical relations in the framework of iterative algebraic theories. This allows a smoother presentation of the underlying technique, and easier proofs of properties of the interpretation. Key words: Recursive types, Logical relations, Models of the lambda-calculus, Iterative algebraic theories 1 Introduction In this paper I present a rational reconstruction of the interpretation of simple recursive types introduced by Coppo in [1] within the framework of the iterative algebraic theories of Elgot and his school [2], regarded as a canonical theory of recursive structures (see e.g. [3]). The interpretation of [1] shares with the analysis of recursive types contained in [4] the same semantical structure, namely the collection of non-empty, Scottclosed subsets (viz., ideals) of a domain that solves a suitable equation (whose shape depends on the constructors of the underlying untyped language). Ideals are interesting for several reasons. First, constructions on ideals can be generalized easily to relational structures, in particular to partial equivalence relations. Second, because these formalize directly the intuition of types as sets of values, they model subtyping rules, [5], even in the presence of polymorphic type constructors (and, of course, type recursion; see for example [6]). address: cardone@disco.unimib.it (Felice Cardone). Preprint submitted to Theoretical Computer Science 27 October 2006

2 However, there are differences as to the specific strategy followed in the two approaches in finding solutions of recursive type equations. The strategy of [4] exploits a structure of complete metric space on the collection of ideals, and then solves recursive type equations by appealing to Banach s theorem after observing that the allowed patterns of recursion define contractive mappings. On the other hand, the path followed in [1] amounts essentially to performing the systematic construction, for each type expression, of a logical relation over the underlying domain, by exploiting both the syntactic details of the type system and the fine structure of the domain in a way that is reminiscent of early applications of logical relations in [7 9]. This involves a considerable amount of details that tend to obscure the overall intuition on which the technique is based. The algebraic perspective that I describe in this paper reconciles the approach based on metric spaces with the latter construction, by subsuming both under a common framework. It also shows how natural it is to find solutions of recursive type equations by interpreting directly the infinite regular trees obtained by pushing into infinity occurrences of recursively defined type symbols (and, with hindsight, it offers further support to some choices made in [10]). The story that I will tell here (a similar one is in [11]) introduces in Section 2 the presentation of recursive types by means of equations, then highlights in Section 3 the basic ingredients used in [1] for the interpretation of recursive simple types ( 3.1, 3.2) and shows how types can be interpreted in a wide class of iterative algebraic theories ( 3.3). The final Section 4 outlines a few easy or well-known applications of the relational interpretation of types, suggesting some directions for futher research. 2 Defining types recursively Recursive types are commonly defined by means of a recursion operator added to other type constructors of some extended system of λ-terms; a type of the form µx.a is thought of as a notation for the solution of the type equation X = A [4,10,12,13]. I shall use here another presentation, which allows the simultaneous definition of finite sequences of recursive type expressions by means of systems of equations, called simultaneous recursions following [14]. This is perhaps closer to the way actual programming languages introduce recursive datatype declarations, and is in fact the original presentation used in [1]. However, the two presentations are equivalent, and indeed both can naturally be compiled into the set of combinators built in the semantical framework used in this paper, Elgot s iterative algebraic theories. Definition 1 (Types and simultaneous recursions) (a) Let ξ = ξ 1,..., ξ n, for some n 0, be a sequence of distinct indeterminates, and X = X 1,..., X p 2

3 a sequence of distinct type variables (the parameters). These will be called collectively the atoms. The set T( ξ; X) of simple types over ξ, X is defined inductively by the productions: T( ξ; X) T ::= ξ i for each i = 1... n X j for each j = 1... p T T (b) A simultaneous recursion (over indeterminates ξ and parameters X) is a finite system of equations of the form E = {ξ 1 = T 1,..., ξ n = T n n 0} where ξ 1,..., ξ n are distinct indeterminates and T i T( ξ; X) is not an atom, for all i = 1,..., n. In general, recursive types are considered modulo a type congruence, viz. an equivalence relation. = E over T( ξ; X) such that In particular, we have: ξ i = T i E = ξ i. =E T i (. = E -unfold/fold) A. = E B, A. =E B = A A. =E B B (. = E - ) Definition 2 (Weak equivalence from simultaneous recursions) If E is a simultaneous recursion, types A, B T( ξ; X) are weakly equivalent modulo E, written A E B, if they are identified modulo the smallest type congruence. Another interesting type congruence arises when recursive types are viewed as notations for the regular trees obtained by pushing into infinity occurrences of recursively defined symbols, using (. = E -unfold/fold). This stronger notion of equivalence will be defined later (Definition 22), after setting up the semantical framework for the interpretation of recursive types. Both congruences are studied in [10,15]. Systems for building recursively typed λ-terms can now be introduced in a straightforward way:. Definition 3 (Recursively typed terms) Let = E, for a simultaneous recursion E, be any type congruence over T( ξ; X). For any A T( ξ; X), the sets Λ E (A) of λ-terms of type A are defined inductively by the following rules, assuming that for each type A there is a denumerable set of variables of type A, ranged over by x A, y A, z A,...: x A Λ E (A) M Λ E (A B), N Λ E (A) = (MN) Λ E (B) M Λ E (B) = (λx A.M) Λ E (A B) M Λ E (A), A =. E B = M Λ E (B) (var) (app) (abs) (equiv) 3

4 As an example, if X is any type variable and E = {ξ = ξ X}, where X is a type variable, the following is the construction tree of the term (λx ξ.xx) Λ E (ξ X): x ξ Λ E (ξ) ξ =. E ξ X (equiv) x Λ E (ξ X) x ξ Λ E (ξ) xx Λ E (X) λx ξ.xx Λ E (ξ X) (abs) (app) Then the construction tree of (λx ξ.xx)(λx ξ.xx) Λ E (X) is:. λx ξ.xx Λ E (ξ X). λx ξ.xx Λ E (ξ X) (λx ξ.xx)(λx ξ.xx) Λ E (X) λx ξ.xx Λ E (ξ) ξ. = E ξ X (app) (equiv) Observe that any pure λ-term M, possibly containing free variables x 1,..., x n, has a reflexively typed version M Λ E (A), where A E A A, assuming that each x i is of type A. 3 Interpreting recursively defined types 3.1 Approximating λ-models Let D be a reflexive cpo [16, 5.4], namely a cpo D with continuous functions F : D [D D] and G : [D D] D such that F G = I [D D]. One basic ingredient in the interpretation of recursive types of [1] is the assumption of the existence of a denumerable family of approximating mappings over D that behave well with respect to application: Definition 4 (Notion of approximation) Given a reflexive cpo D, F, G, a family of continuous functions {( ) n : D D n N} is a notion of approximation over D if it satisfies the following conditions: (i) For all d D, and all n, m N: 0 = (1) n m d n d m (2) (d n ) m = d min(n,m) = (d m ) n (3) 4

5 (ii) For all d, e D and n N: d = d n. (4) n N d 0 e = d 0 = (d ) 0 (5) d n+1 e n = d n+1 e = (d e n ) n (6) d e = (d n+1 e n ). (7) n N These properties hold for the D λ-models built by the classical construction of Scott [16, Lemma , Proposition ], although some of these may fail for the same contruction as modified by Park [16, Exercise ]. Slightly beyond D, they also apply to models of the λ-calculus not explicitly obtained by means of an inverse limit construction, like Engeler s models D A [18] or (quite appropriately in view of the occasion of this paper) the filter λ-model F introduced in [19]: Proposition 5 F is a reflexive cpo with a notion of approximation. PROOF. The proof that F is a reflexive cpo is implicit in [19]. The existence of a notion of approximations is proved by observing that intersection types can given a height σ as follows: ω = 0, ϕ i = 1, for all type variables ϕ i, σ τ = max{ σ, τ }, σ τ = 1 + max{ σ, τ }. Given a filter d F, it can be cut at level n (n N) by defining d[n] = {σ d σ n} but this is not a filter in general: for example, ω ω d[0] even though ω d[0] and ω ω ω. So, define d n as d[n], where X is the filter generated by the set X, namely the set {σ τ 1,..., τ n X.τ 1... τ n σ}. Then the mappings d d n : F F endow F with a notion of approximation. The details are tedious but straightforward, with the exception perhaps of Equation (6), which need a closer analysis of the preorder on intersection types. Claim 6 (Invertibility) If τ ω and σ τ σ τ, then σ σ and τ τ. Proof of Claim 6 An immediate consequence of [19, Lemma 2.4(ii)]. 6) (Claim 5

6 Claim 7 If χ σ τ and χ n + 1, then there exist σ, τ such that σ, τ n and χ σ τ σ τ. Proof of Claim 7 First define the relation on types by the same axioms and rules as, with the exception of transitivity. Then an easy induction on the length of the proof that σ τ shows that σ τ if and only if σ( ) + τ, that means that all applications of transitivity can be postponed. Assume that χ σ τ, then χ( ) + σ τ and therefore there is a finite sequence χ χ 0 χ 1 χ n σ τ (8) for some n > 0. If σ τ > n + 1 (otherwise there is nothing to prove), then take the leftmost χ i in (8) such that χ i < χ i+1, and consider the only two possibilities: (1) χ i ω, χ i+1 ω ω. Then take σ τ ω; (2) χ i (µ ν) and χ i+1 (µ ν ), where the rule applied at this step is µ µ ν ν µ ν µ ν and µ > n or ν > n Observe that µ ν n + 1, so take σ µ and τ ν. (Claim 7) Equation (6): I only show that d n+1 e = d n+1 e n. Let τ d n+1 e = def {τ σ e.(σ τ) d n+1 }, and assume τ ω (otherwise τ d n+1 e n needs no proof). Then there is χ d[n + 1] such that χ σ τ. By Claim 7 there is σ τ d[n+1] such that σ τ σ τ, so by Claim 6 σ σ and τ τ. Then σ e[n] because σ σ e and, as σ τ d[n + 1] d n+1 we have that τ d n+1 e n and finally also that τ d n+1 e n. Conversely, τ d n+1 e n implies σ τ d n+1 for some σ e n. Assume that τ ω, otherwise the proof is immediate. Then by Claim 7 there is σ τ d[n + 1] d n+1 such that σ τ σ τ and therefore, again by Claim 6, σ σ and τ τ, with σ, τ n. Now σ e n e and τ d n+1 e, so finally τ τ d n+1 e. The verification of the other equations is similar. (Proposition 5) 3.2 Types as logical relations Recursive types will be interpreted as certain logical relations over reflexive cpo s with a notion of approximation. Specializations of these to partial 6

7 equivalence relations have been used in [20,6] for the semantics of the system described in [5], which includes recursive types, subtyping and bounded quantification, but I shall argue later that the history of the relational interpretation of types is even longer. Definition 8 (Complete relations) Given reflexive cpo s with a notion of approximation D and E, a relation R D E is complete iff: D R E, if {d (j) j N}, {e (j) j N} are increasing chains in D and E, respectively, such that d (j) R e (j) for all j N, then d (j) R e (j) j N j N The relations must respect the notion of approximation, in the following sense: Definition 9 (Uniformity) Given reflexive cpo s with a notion of approximation D and E, let be a complete relation over D 0 E 0 such that D E. A relation R D E is uniform if the following properties hold where, for n N, R n = def { d n, e n d, e R}: R 0 =, R n R for all n N. Let CU (D, E) denote the set of complete and uniform relations over D, E with base. The following Proposition summarizes the main properties of CU (D, E); the (mostly straightforward) proofs are omitted. Proposition 10 (Basic properties of complete and uniform relations) For any R, S CU (D, E) and any n N: (1) R n CU (D, E); (2) R = S if and only if, for all n N, R n = S n ; (3) R n = (R n+1 ) n ; (4) Let R (i), for i N, be a sequence of complete and uniform relations such that, for all n N: R (n) = (R (n+1) ) n. (9) Then: For all k n R (n) R (k) ; For all k n (R (n) ) k = R (k) ; Define R ( ) as { d, e d n, e n R (n) }. Then R ( ) is the unique complete and uniform relation such that, for all n N, (R ( ) ) n = R (n). 7

8 The operation on the class of complete and uniform relations that provides the interpretations of function types can now be defined. Definition 11 For R, S CU (D, E), define for d D and e E: d (R S) e iff a D, b E (a R b = d a S e b) Proposition 12 If R, S CU (D, E) then R S CU (D, E). PROOF. I first show that = (R S) 0. Assume d, e, and let a, b R. Then d a, e b = d 0 a, e 0 b (as D 0 E 0 ) = d, e (by Definition 4(5)) therefore d a, e b = S 0 S by uniformity. So R S, and (R S) 0 as = 0. Conversely, let d 0, e 0 (R S) 0. Then d 0, e 0 = (d D ) 0, (e E ) 0 (by Definition 4(5)) but D, E = R 0 R, hence d D, e D S, because d, e R S, so (d D ) 0, (e E ) 0 S 0 = and finally d 0, e 0. Completeness and uniformity are easy. The following property of the interpretation of function types is the key to the whole construction of the interpretation of recursive types in [1]: Proposition 13 For any R, S CU (D, E) and n N, (R S) n+1 = (R n S n ) n+1. PROOF. Assume that d n+1, e n+1 (R S) n+1 a n, b n R n R. Then d n+1 a n, e n+1 b n S. But R S and that d n+1 a n, e n+1 b n = (d n+1 a n ) n, (e n+1 b n ) n S n by Definition 4(6), so d n+1, e n+1 R n S n and this entails d n+1, e n+1 (R n S n ) n+1. Conversely, let d n+1, e n+1 (R n S n ) n+1, and assume that a, b R. Then a n, b n R n. Observe now that d n+1 a, e n+1 b = d n+1 a n, e n+1 b n S n S using again Definition 4(6) and uniformity of S, so d n+1, e n+1 R S and finally d n+1, e n+1 (R S) n+1. 8

9 It is possible now to outline the idea behind the construction of type interpretations in [1]. By way of example, consider the simultaneous recursion E = {ξ = ξ ξ}. The interpretation Ξ of the type symbol ξ as a complete and uniform relation is defined locally, in denumerably many stages Ξ (0), Ξ (1), Ξ (2),.... The 0-th stage is Ξ (0) =. Then, whatever Ξ will be eventually, Ξ 0 = Ξ (0). For later stages, set up the recurrence relation Ξ (n+1) = (Ξ (n) Ξ (n) ) n+1. If we can show that for all n N ( Ξ (n+1) ) n = Ξ(n), (10) then Proposition 10(4) suggests taking Ξ = Ξ ( ), and then Ξ n = Ξ (n) for all n N. The proof of (10) is the core of the technique (cf. [8, Lemma 1.1]), and appeals in an essential way to Proposition 13. The fact that Ξ solves E, that is, Ξ = Ξ Ξ, is then a direct consequence of Proposition 10(2). Of course, this process should be carried out in parallel for all type expressions, not only for the unknowns ξ of the simultaneous recursion E. It is at this point that syntactic details creep into the technique, and it becomes useful to adopt the more abstract viewpoint to which I turn next. 3.3 Complete and uniform relations as an iterative algebraic theory Fix arbitrary reflexive cpo s with a notion of approximation D, E and D 0 E 0, and let CU abbreviate CU (D, E). It is interesting to frame the solution of recursive equations over complete and uniform relations in the context of a standard theory of recursion: to this end, I will show that (not too surprisingly) the iterative algebraic theories of Elgot provide such a context. I will review the basic notions of iterative theories along with their interpretations in an iterative theory of complete and uniform relations, following the comprehensive monograph [2] with slight and easily recognizable changes in notation when appropriate. The category CU has the natural numbers as objects, and as morphisms CU (n, p) the functions f : CU p CU n, where CU p is the p-fold power of CU, with CU 0 = { }, such that, for every i N and R (1),..., R (p), if f(r (1),..., R (p) ) = S (1),..., S (n) then: ( f((r (1) ) i,..., (R (p) ) i ) ) i = (S(1) ) i,..., (S (n) ) i (11) Morphisms in CU (1, p) are called scalar morphisms. In the category CU, for every n N, there are n distinguished morphisms i n : 1 n mapping R (1),..., R (n) to R (i), for i = 1,..., n. The distinguished morphisms have the following universal property: for any p 0 and any family f 1,..., f n : 1 p of scalar morphisms there is a unique morphism f 1,..., f n : n p (the 9

10 tupling of f 1,..., f n ) such that i n f 1,..., f n = f i : 1 p: just set, for R = R (1),..., R (p), f 1,..., f n ( R) = def f 1 ( R),..., f n ( R) (where, on the right hand side, corners delimit an element of CU n ). Then every morphism f CU (n, p) has the form f 1,..., f n where f i : 1 p (take f i = i n f). Tupling can be applied more generally to morphisms f : n p and g : m p by setting f, g : n + m p = def 1 n f,..., n n f, 1 m g,..., m m g. Furthermore, for any n N there is one morphism 0 n : 0 n. Observe also that 1 1 = I 1 and, in general, the identity morphisms I n have the form 1 n,..., n n, from the universal property of tupling. Therefore CU is an algebraic theory [2, 2.3], but it does not yet support recursion over complete and uniform relations, because there are too many morphisms. However, we can single out a class of morphisms of this theory in such a way that each of these has a unique fixed point: Definition 14 (Ideal morphisms) A scalar morphism f : 1 p of CU is ideal if, for every i N and R (1),..., R (p) : ( f(r (1),..., R (p) ) ) = ( f((r (1) ) i+1 i,..., (R (p) ) i ) ) (12) i+1 Morphisms and ideal morphisms of CU correspond to the rank-preserving, resp. rank-increasing functions of [21], but these are also clearly related to nonexpansive, resp. contractive mappings on CU regarded as a complete metric space as in [20]. Proposition 15 (Scalar iteration) If f : p is ideal, then there is a unique morphism f : 1 p that solves the scalar iteration equation for f: f = f f, I p (13) PROOF. That f is ideal means that for all R, R (1),..., R (p) : ( f(r, R (1),..., R (p) ) ) i+1 = ( f(r i, (R (1) ) i,..., (R (p) ) i ) ) i+1 = ( f(r i, R (1),..., R (p) ) ) i+1 for all i N. Now, define inductively the sequence: Φ (0) = Φ (n+1) = ( f(φ (n), R) ) n+1 10

11 Then, for all n N, Φ (n) = ( Φ (n+1)). In fact, n Φ(0) = = ( Φ (1)). Assuming 0 that Φ (n 1) = ( Φ (n)) for n > 0, we have n 1 ( ) Φ (n+1) = ( (f(φ (n), ) R)) n n+1 (by definition) n = ( f(φ (n), R) ) (by uniformity) n = ( f ( (Φ (n) ) n 1, R )) (f is ideal) n = ( f(φ (n 1), R) ) (induction hypothesis) n = Φ (n) (by definition) Using Proposition 10(4), define f ( R) as Φ ( ), and observe that ( f(φ ( ), R) ) n = ( f((φ ( ) ) n 1, R) ) n (as f is ideal) = ( f(φ (n 1), R) ) n = Φ (n) (by definition) hence f(f ( R), R) = f(φ ( ), R) = Φ ( ) = f ( R). Uniqueness of f follows by a straightforward induction, using Proposition 10(2). Proposition 13 can then be rephrased by saying that : 1 2 is an ideal morphism in CU. Observe that the scalar ideal morphisms form a scalar ideal in CU, viz. if f : 1 p is ideal then also f g : 1 q is a scalar ideal morphism, for any g CU (p, q). In fact, let g(r (1),..., R (q) ) = S (1),..., S (p), then ( f(g(r (1),..., R (q) )) ) i+1 = f(s(1),..., S (p) ) i+1 = f ( (S (1) ) i,..., (S (p) ) i ) i+1 = f ( g((r (1) ) i,..., (R (q) ) i ) ) i+1 (as f is ideal) (as g CU (p, q)) = ( (f g)((r (1) ) i,..., (R (q) ) i ) ) i+1 Define now the subtheory CU of CU whose objects are the same as those of CU, and where f : n p if and only if, for every i = 1,..., n, i n f either is a distinguished morphism or is ideal. General results on iterative theories [2, Proposition , Theorem 5.2.2], together with Proposition 13 yield: Proposition 16 CU is an iterative theory whose ideal morphisms have the form f 1,..., f n where each f i is a scalar ideal morphism. In particular, for any ideal morphism f : n n + p, there is a unique ideal morphism f : n p solving the iteration equation for f, i.e., f = f f, I p. 11

12 One important consequence of this Proposition is that CU satisfies all equations valid in iterative theories [2, 5.3]. Among these we have, for example, a general form of Bekič s theorem: f, g = f h, I p, h (14) where f : n n+m+p, g : m n+m+p are ideal and h = g f, I m+p : m m + p. Another equation that is worth recording is (f (I n g)) = f g (15) for any ideal f : n n+p and all g : p q. The notation h k : n+m p + q for h : n p, k : m q, is defined as the tuple h κ, k λ, where κ : p p + q, λ : q p + q are given by i p κ = i p+q i q λ = p + i p+q for i = 1,..., p for i = 1,..., q Regarding theories as categories, it is appropriate to define homomorphisms of theories as a certain kind of functors that are the identity on objects: Definition 17 (Homomorphisms of iterative theories) If T and T are iterative theories, then a homomorphism is a family of mappings F = F n,p : T(n, p) T (n, p) for n, p 0 such that for f : n p and g : p q in T, F n,q (f g) = F n,p (f) F p,q (g) in T (n, q), F 1,p (i p ) = i p for any i = 1,..., p, if F 1,p (f) is distinguished in T, then f is distinguished in T or, equivalently, for every ideal f : n p, F n,p (f) is ideal in T. Then it can be shown [2, Proposition 5.2.3] that, if F : T T is an iterative theory morphism, then it preserves tupling and iteration, more precisely F n,p (f ) = (F n,n+p (f)) for every ideal morphism f : n n + p in T. Let R be the iterative algebraic theory whose morphisms in R(n, p) are n- tuples or regular trees over the signature with a binary operation symbol, in which may occur variables in the list X = X 1,..., X p [22, 4]. Distinguished morphisms of R(1, p) are i p = X i, and composition of t : n p and s = s 1,..., s p : p q is t s = def t 1,..., t n, where t i is given by substitution, t i = t i [X 1 := s 1,..., X p := s p ]. This is the initial iterative algebraic theory [2, Corollary ]: for any iterative theory T and any interpretation of as an ideal morphism T(1, 2), there is a unique homomorphism of iterative theories Ψ T : R T. 12

13 3.4 Interpretations of types The iterative algebraic theory of complete and uniform relations provides a uniform ambient for interpreting recursive types in any presentation. The discussion below focuses on simultaneous recursions, but it will be clear that the results apply to recursive types defined by means of the recursion operator as well. Actually, types and simultaneous recursions shall be interpreted quite generally in any iterative algebraic theory T with an ideal T(1, 2), as morphisms of the appropriate kinds. As particular cases, we shall obtain interpretations in the iterative theories R and CU. The role of a simultaneous recursion E = {ξ 1 = T 1,..., ξ n = T n } is that of defining (recursively and simultaneously) the type symbols ξ = ξ 1,..., ξ n to be used as constants, together with the parameters X = X 1,..., X p, in the constructions of the elements of T( ξ; X). Accordingly, the interpretation of that simultaneous recursion in T, given a type environment η = η (1),..., η (p) : p 0 that assigns meaning η (i) T(1, 0) to the parameter X i, must return a tuple Ξ = Ξ (1),..., Ξ (n) : n 0, such that Ξ (i) T(1, 0) is the interpretation of the type symbol ξ i. Types in T( ξ; X) are then assigned meanings by means of a straightforward inductive extension of η and Ξ. Throughout this section, to avoid notational clutter, the sequences of indeterminates ξ = ξ 1,..., ξ n and parameters X = X 1,..., X p, for some n, p 0, as well as the simultaneous recursion E = {ξ 1 = T 1,..., ξ n = T n }, are arbitrary but fixed. I shall also assume throughout that T is an iterative theory with an ideal morphism : 1 2. Definition 18 (Interpreting simultaneous recursions) For any A T( ξ; X), define a morphism T[A] : 1 n + p of T as follows, by induction on the structure of A: T[ξ i ] = i n+p, T[X j ] = (n + j) n+p, T[A A ] = T[A ], T[A ]. Observe that T[T 1 ],..., T[T n ] is an ideal morphism and define T[E ] = T[T 1 ],..., T[T n ] : n p. Definition 19 (Interpreting recursive types) Given a type A T( ξ; X), define the interpretation of A under E, T E [A] T(1, p), as T[A] T[E ], I p. The standard identities hold for this interpretation of types, for example T E [A A ] turns out to be the same as T E [A ], T E [A ]. Furthermore, weak equivalence of recursive types (Definition 2) is respected by the 13

14 interpretation: Proposition 20 If A E B, then T E [A] = T E [B ]. The following properties exploit the special role played by the initial iterative theory R (see [22, 4.8]): Lemma 21 (i) For any type A T( ξ; X), (ii) For any simultaneous recursion E, (iii) For any type A T( ξ; X) T[A] = Ψ T (R[A]) : 1 n + p T[E ] = Ψ T (R[E ]) : n p T E [A] = Ψ T ( R E [A] ) : 1 p We finally can define a stronger equivalence on recursive types, as the type congruence that identifies types whose infinite unfoldings give rise to identical infinite (regular) trees. It follows directly from Lemma 21 that the type interpretation respects this stronger equivalence too: Definition 22 (Strong equivalence from simultaneous recursions) Two types A, B T( ξ; X) are strongly equivalent, written A E B, when R E [A] = R E [B ] : 1 p. Corollary 23 If A E B, then T E [A] = T E [B ]. 4 Concluding remarks There are several directions that are worth pursuing in order to understand the properties of the interpretation outlined in this paper. While [1,10] have focussed mainly on completeness properties of type inference or of strong equivalence over recursively defined types, I outline here the proofs of two properties that seem to point to a different area of applications (and also justify the study of a relatively weak system like that used throughout this paper). They are both consequences of a very important property of logical relations, that can be proved by induction on the construction of recursively typed terms (Definition 3), using the standard interpretation of terms in a λ-model [16, Ch. 5]: 14

15 Lemma 24 (Fundamental property of logical relations) Let M Λ E (A) where A T( ξ; X) and M contains possibly the free variables x A 1 1,..., x A k k. Let M be the pure untyped λ-term obtained by erasing all types in M, and let η = η (1),..., η (p) be a type environment. Then given (term) environments ρ 1, ρ 2 such that ρ 1 (x i ) ( CU E [A i ]η ) ρ 2 (x i ), for all i = 1,..., k where x i = (x A i i ), then [M ]ρ 1 ( CU E [A]η ) [M ]ρ 2. Now, as remarked earlier, every pure closed λ-term M has a reflexively typed version M Λ E (ξ), where ξ = ξ ξ E. Therefore [M ] Ξ [M ] where Ξ D D is CU E [ξ ] with base = { D, D } (a sort of inner model ) and D is any of the standard extensional models obtained by Scott s original construction [16, 18.2]. Then we take almost verbatim the proof of Plotkin in [8] (whose details are now hidden in the proofs of Section 3 above) to show Proposition 25 The only definable element of D 0 D is. In fact, if d D 0 is definable, then d = [M ] for some closed M Λ E (ξ). Therefore d Ξ d by Lemma 24, and then d 0 Ξ 0 d 0, so d d as d = d 0 and Ξ 0 =, because Ξ CU (D, D ). Hence d =. Another observation is that closed terms in Λ E (X) for a type variable X have a trivial computational behavior. Indeed: Proposition 26 If M Λ E (X) is closed, then M is unsolvable. Take F and set = { F, F }. Then [M ] R [M ] for R CU (F, F), in particular [M ] [M ], showing that [M ] = F, hence M : σ iff ω σ iff M is unsolvable, by [19, Theorem 4.13(i)]. The initial model L = [L L] of the lazy λ-calculus also satisfies a slight generalization of Definition 4 [17, 4.3]. This allows to show that the assumption of Proposition 26 even implies that M is an unsolvable term of order 0. It remains to be seen to what extent these remarks can be extended to a systematic approach to proving properties of pure, type-free λ-terms by means of recursisvely defined logical relations. A parallel direction for further investigations is the extension of the interpretation discussed in this paper from λ-models to structures that are closer to operational semantics including as a limiting case the syntax itself in the form of a labeled λ-calculus similar to that of [23], where the notion of approximation is built in the definition of labeled reduction. This extension should take into account the recent attempts towards the operational semantics of recursive types of [24,25] and provide a 15

16 systematic approach to approximate or indexed type interpretations, to be compared to the alternative proposal of [26]. References [1] M. Coppo, A completeness theorem for recursively defined types, in: W. Brauer (Ed.), Proc. 12th International Colloquium on Automata, Languages and Programming, Vol. 194 of Lecture Notes in Computer Science, Springer-Verlag, 1985, pp [2] S. Bloom, Z. Ésik, Iteration Theories: The Equational Logic of Iterative Processes, EATCS Monographs in Theoretical Computer Science, Springer- Verlag, [3] A. J. C. Hurkens, M. McArthur, Y. N. Moschovakis, L. S. Moss, G. T. Whitney, The logic of recursive equations, Journal of Symbolic Logic 63 (2) (1998) [4] D. MacQueen, G. Plotkin, R. Sethi, An ideal model for recursive polymorphic types, Information and Control 71 (1/2) (1986) [5] L. Cardelli, P. Wegner, On understanding types, data abstraction and polymorphism, ACM Computing Surveys 17 (1985) [6] F. Cardone, Recursive types for Fun, Theoretical Computer Science 83 (1991) [7] R. Milne, The formal semantics of computer languages and their implementations, Ph.D. thesis, Cambridge University (1973). [8] G. Plotkin, Lambda definability and logical relations, Memorandum SAI-RM-4, University of Edinburgh School of Artificial Intelligence (1973). [9] J. Reynolds, On the relation between direct and continuation semantics, in: J. Loeckx (Ed.), Proceedings of the 2nd International Colloquium on Automata, Languages and Programming, Vol. 14 of Lecture Notes in Computer Science, Springer-Verlag, 1974, pp [10] F. Cardone, M. Coppo, Type inference with recursive types. Syntax and Semantics, Information and Computation 92 (1) (1991) [11] F. Cardone, An algebraic approach to the interpretation of recursive types, in: J.-C. Raoult (Ed.), Proceedings of the 17th Colloquium on Trees in Algebra and Programming, Vol. 581 of Lecture Notes in Computer Science, Springer-Verlag, 1992, pp [12] R. Amadio, L. Cardelli, Subtyping recursive types, ACM Transactions on Programming Languages and Systems 15 (4) (1993)

17 [13] V. Gapeyev, M. Y. Levin, B. C. Pierce, Recursive subtyping revealed, Journal of Functional Programming 12 (6) (2002) [14] R. Statman, Recursive types and the subject reduction theorem, Technical Report , Carnegie Mellon University (1994). [15] F. Cardone, M. Coppo, Recursive types, Part II of H. Barendregt, W. Dekkers and R. Statman: Typed Lambda Calculus, in preparation, [16] H. P. Barendregt, The Lambda Calculus. Its Syntax and Semantics, North- Holland, [17] S. Abramsky, C.-H. L. Ong, Full abstraction in the lazy lambda calculus, Information and Computation 105 (1993) [18] E. Engeler, Algebras and combinators, Algebra Universalis 13 (1981) [19] H. P. Barendregt, M. Coppo, M. Dezani, A filter lambda model and the completeness of type assignment, Journal of Symbolic Logic 48 (1983) [20] R. Amadio, Recursion over realizability structures, Information and Computation 91 (1) (1991) [21] K. B. Bruce, J. C. Mitchell, Per models of subtyping, recursive types and higherorder polymorphism., in: Conference Record of the Nineteenth Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, ACM Press, Albuquerque, New Mexico, 1992, pp [22] B. Courcelle, Fundamental properties of infinite trees, Theoretical Computer Science 25 (1983) [23] C. Wadsworth, The relation between computational and denotational properties for Scott s D models of the lambda calculus, SIAM Journal on Computing 5 (1976) [24] L. Birkedal, R. Harper, Constructing interpretations of recursive types in an operational setting, Information and Computation 155 (1999) [25] A. W. Appel, D. McAllester, An indexed model of recursive types for foundational proof-carrying code, ACM Transactions on Programming Languages and Systems (TOPLAS) 23 (5) (2001) [26] J. Vouillon, P.-A. Melliès, Semantic types: A fresh look at the ideal model for types, in: Proceedings of the 31st ACM Conference on Principles of Programming Languages, ACM Press, Venezia, Italy, 2004, pp

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

Step-Indexed Biorthogonality: a Tutorial Example

Step-Indexed Biorthogonality: a Tutorial Example Step-Indexed Biorthogonality: a Tutorial Example Andrew Pitts University of Cambridge Computer Laboratory 1 Introduction The purpose of this note is to illustrate the use of step-indexing [2] combined

More information

Intersection Types and Lambda Theories

Intersection Types and Lambda Theories Intersection Types and Lambda Theories M.Dezani-Ciancaglini S.Lusin Abstract We illustrate the use of intersection types as a semantic tool for showing properties of the lattice of λ-theories. Relying

More information

The Minimal Graph Model of Lambda Calculus

The Minimal Graph Model of Lambda Calculus The Minimal Graph Model of Lambda Calculus Antonio Bucciarelli 1 and Antonino Salibra 2 1 Université Paris 7, Equipe PPS, 2 place Jussieu, 72251 Paris Cedex 05, France buccia@pps.jussieu.fr, 2 Università

More information

Complete Partial Orders, PCF, and Control

Complete Partial Orders, PCF, and Control Complete Partial Orders, PCF, and Control Andrew R. Plummer TIE Report Draft January 2010 Abstract We develop the theory of directed complete partial orders and complete partial orders. We review the syntax

More information

Komponenten- und Service-orientierte Softwarekonstruktion

Komponenten- und Service-orientierte Softwarekonstruktion Komponenten- und Service-orientierte Softwarekonstruktion Vorlesung 5: Combinatory Logic Synthesis Jakob Rehof LS XIV Software Engineering TU Dortmund Sommersemester 2015 SS 2015 J. Rehof (TU Dortmund)

More information

Parameterizations and Fixed-Point Operators on Control Categories

Parameterizations and Fixed-Point Operators on Control Categories Parameterizations and Fixed-Point Operators on Control Categories oshihiko Kakutani 1 and Masahito Hasegawa 12 1 Research Institute for Mathematical Sciences, Kyoto University {kakutani,hassei}@kurims.kyoto-u.ac.jp

More information

Higher Order Containers

Higher Order Containers Higher Order Containers Thorsten Altenkirch 1, Paul Levy 2, and Sam Staton 3 1 University of Nottingham 2 University of Birmingham 3 University of Cambridge Abstract. Containers are a semantic way to talk

More information

The Absoluteness of Constructibility

The Absoluteness of Constructibility Lecture: The Absoluteness of Constructibility We would like to show that L is a model of V = L, or, more precisely, that L is an interpretation of ZF + V = L in ZF. We have already verified that σ L holds

More information

Partial model checking via abstract interpretation

Partial model checking via abstract interpretation Partial model checking via abstract interpretation N. De Francesco, G. Lettieri, L. Martini, G. Vaglini Università di Pisa, Dipartimento di Ingegneria dell Informazione, sez. Informatica, Via Diotisalvi

More information

Safety Analysis versus Type Inference for Partial Types

Safety Analysis versus Type Inference for Partial Types Safety Analysis versus Type Inference for Partial Types Jens Palsberg palsberg@daimi.aau.dk Michael I. Schwartzbach mis@daimi.aau.dk Computer Science Department, Aarhus University Ny Munkegade, DK-8000

More information

Graph lambda theories

Graph lambda theories Under consideration for publication in Math. Struct. in Comp. Science Graph lambda theories A N T O N I O B U C C I A R E L L I 1 and A N T O N I N O S A L I B R A 2 1 Equipe PPS (case 7014), Université

More information

What are Iteration Theories?

What are Iteration Theories? What are Iteration Theories? Jiří Adámek and Stefan Milius Institute of Theoretical Computer Science Technical University of Braunschweig Germany adamek,milius @iti.cs.tu-bs.de Jiří Velebil Department

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

Logic for Computational Effects: work in progress

Logic for Computational Effects: work in progress 1 Logic for Computational Effects: work in progress Gordon Plotkin and John Power School of Informatics University of Edinburgh King s Buildings Mayfield Road Edinburgh EH9 3JZ Scotland gdp@inf.ed.ac.uk,

More information

Step-indexed models of call-by-name: a tutorial example

Step-indexed models of call-by-name: a tutorial example Step-indexed models of call-by-name: a tutorial example Aleš Bizjak 1 and Lars Birkedal 1 1 Aarhus University {abizjak,birkedal}@cs.au.dk June 19, 2014 Abstract In this tutorial paper we show how to construct

More information

What are Iteration Theories?

What are Iteration Theories? What are Iteration Theories? Jiří Adámek 1, Stefan Milius 1 and Jiří Velebil 2 1 Institute of Theoretical Computer Science, TU Braunschweig, Germany {adamek,milius}@iti.cs.tu-bs.de 2 Department of Mathematics,

More information

Formal Epistemology: Lecture Notes. Horacio Arló-Costa Carnegie Mellon University

Formal Epistemology: Lecture Notes. Horacio Arló-Costa Carnegie Mellon University Formal Epistemology: Lecture Notes Horacio Arló-Costa Carnegie Mellon University hcosta@andrew.cmu.edu Logical preliminaries Let L 0 be a language containing a complete set of Boolean connectives, including

More information

Intersection Types for

Intersection Types for Intersection Types for -Trees Steffen van Bakel Franco Barbanera Mariangiola Dezani-Ciancaglini Fer-Jan de Vries Department of Computing, Imperial College, 180 Queen s Gate, London SW7 2BZ, UK E-mail:

More information

Realizability Semantics of Parametric Polymorphism, General References, and Recursive Types

Realizability Semantics of Parametric Polymorphism, General References, and Recursive Types Realizability Semantics of Parametric Polymorphism, General References, and Recursive Types Lars Birkedal IT University of Copenhagen Joint work with Kristian Støvring and Jacob Thamsborg Oct, 2008 Lars

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

arxiv: v3 [cs.pl] 15 May 2011

arxiv: v3 [cs.pl] 15 May 2011 A Step-indexed Semantic Model of Types for the Call-by-Name Lambda Calculus arxiv:1105.1985v3 [cs.pl] 15 May 2011 Abstract Step-indexed semantic models of types were proposed as an alternative to purely

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

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

A call-by-name lambda-calculus machine

A call-by-name lambda-calculus machine A call-by-name lambda-calculus machine Jean-Louis Krivine University Paris VII, C.N.R.S. 2 place Jussieu 75251 Paris cedex 05 (krivine@pps.jussieu.fr) Introduction We present, in this paper, a particularly

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

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

Systems of modal logic

Systems of modal logic 499 Modal and Temporal Logic Systems of modal logic Marek Sergot Department of Computing Imperial College, London utumn 2008 Further reading: B.F. Chellas, Modal logic: an introduction. Cambridge University

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

Lazy Strong Normalization

Lazy Strong Normalization Lazy Strong Normalization Luca Paolini 1,2 Dipartimento di Informatica Università di Torino (ITALIA) Elaine Pimentel 1,2 Departamento de Matemática Universidade Federal de Minas Gerais (BRASIL) Dipartimento

More information

ACLT: Algebra, Categories, Logic in Topology - Grothendieck's generalized topological spaces (toposes)

ACLT: Algebra, Categories, Logic in Topology - Grothendieck's generalized topological spaces (toposes) ACLT: Algebra, Categories, Logic in Topology - Grothendieck's generalized topological spaces (toposes) Steve Vickers CS Theory Group Birmingham 2. Theories and models Categorical approach to many-sorted

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

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

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

Canonical Calculi: Invertibility, Axiom expansion and (Non)-determinism

Canonical Calculi: Invertibility, Axiom expansion and (Non)-determinism Canonical Calculi: Invertibility, Axiom expansion and (Non)-determinism A. Avron 1, A. Ciabattoni 2, and A. Zamansky 1 1 Tel-Aviv University 2 Vienna University of Technology Abstract. We apply the semantic

More information

Boolean Algebra and Propositional Logic

Boolean Algebra and Propositional Logic Boolean Algebra and Propositional Logic Takahiro Kato September 10, 2015 ABSTRACT. This article provides yet another characterization of Boolean algebras and, using this characterization, establishes a

More information

FIXED POINTS AND EXTENSIONALITY IN TYPED FUNCTIONAL PROGRAMMING LANGUAGES

FIXED POINTS AND EXTENSIONALITY IN TYPED FUNCTIONAL PROGRAMMING LANGUAGES FIXED POINTS AND EXTENSIONALITY IN TYPED FUNCTIONAL PROGRAMMING LANGUAGES a dissertation submitted to the department of computer science and the committee on graduate studies of stanford university in

More information

Binding in Nominal Equational Logic

Binding in Nominal Equational Logic MFPS 2010 Binding in Nominal Equational Logic Ranald Clouston 1,2 Computer Laboratory, University of Cambridge, Cambridge CB3 0DF, United Kingdom Abstract Many formal systems, particularly in computer

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

Simply Typed λ-calculus

Simply Typed λ-calculus Simply Typed λ-calculus Lecture 1 Jeremy Dawson The Australian National University Semester 2, 2017 Jeremy Dawson (ANU) COMP4630,Lecture 1 Semester 2, 2017 1 / 23 A Brief History of Type Theory First developed

More information

The algebraicity of the lambda-calculus

The algebraicity of the lambda-calculus The algebraicity of the lambda-calculus André Hirschowitz 1 and Marco Maggesi 2 1 Université de Nice Sophia Antipolis http://math.unice.fr/~ah 2 Università degli Studi di Firenze http://www.math.unifi.it/~maggesi

More information

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw Applied Logic Lecture 1 - Propositional logic Marcin Szczuka Institute of Informatics, The University of Warsaw Monographic lecture, Spring semester 2017/2018 Marcin Szczuka (MIMUW) Applied Logic 2018

More information

Towards a Denotational Semantics for Discrete-Event Systems

Towards a Denotational Semantics for Discrete-Event Systems Towards a Denotational Semantics for Discrete-Event Systems Eleftherios Matsikoudis University of California at Berkeley Berkeley, CA, 94720, USA ematsi@eecs. berkeley.edu Abstract This work focuses on

More information

Subtyping and Intersection Types Revisited

Subtyping and Intersection Types Revisited Subtyping and Intersection Types Revisited Frank Pfenning Carnegie Mellon University International Conference on Functional Programming (ICFP 07) Freiburg, Germany, October 1-3, 2007 Joint work with Rowan

More information

University of Oxford, Michaelis November 16, Categorical Semantics and Topos Theory Homotopy type theor

University of Oxford, Michaelis November 16, Categorical Semantics and Topos Theory Homotopy type theor Categorical Semantics and Topos Theory Homotopy type theory Seminar University of Oxford, Michaelis 2011 November 16, 2011 References Johnstone, P.T.: Sketches of an Elephant. A Topos-Theory Compendium.

More information

Probabilistic Bisimilarity as Testing Equivalence

Probabilistic Bisimilarity as Testing Equivalence Probabilistic Bisimilarity as Testing Equivalence Yuxin Deng a,, Yuan Feng b a Shanghai Key Laboratory of Trustworthy Computing, MOE International Joint Lab of Trustworthy Software, and International Research

More information

Nonmonotone Inductive Definitions

Nonmonotone Inductive Definitions Nonmonotone Inductive Definitions Shane Steinert-Threlkeld March 15, 2012 Brief Review of Inductive Definitions Inductive Definitions as Sets of Clauses Definition A set B of clauses (of the form A b)

More information

Partially commutative linear logic: sequent calculus and phase semantics

Partially commutative linear logic: sequent calculus and phase semantics Partially commutative linear logic: sequent calculus and phase semantics Philippe de Groote Projet Calligramme INRIA-Lorraine & CRIN CNRS 615 rue du Jardin Botanique - B.P. 101 F 54602 Villers-lès-Nancy

More information

7 RC Simulates RA. Lemma: For every RA expression E(A 1... A k ) there exists a DRC formula F with F V (F ) = {A 1,..., A k } and

7 RC Simulates RA. Lemma: For every RA expression E(A 1... A k ) there exists a DRC formula F with F V (F ) = {A 1,..., A k } and 7 RC Simulates RA. We now show that DRC (and hence TRC) is at least as expressive as RA. That is, given an RA expression E that mentions at most C, there is an equivalent DRC expression E that mentions

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

Boolean Algebra and Propositional Logic

Boolean Algebra and Propositional Logic Boolean Algebra and Propositional Logic Takahiro Kato June 23, 2015 This article provides yet another characterization of Boolean algebras and, using this characterization, establishes a more direct connection

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

Π 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

CS411 Notes 3 Induction and Recursion

CS411 Notes 3 Induction and Recursion CS411 Notes 3 Induction and Recursion A. Demers 5 Feb 2001 These notes present inductive techniques for defining sets and subsets, for defining functions over sets, and for proving that a property holds

More information

Contextual equivalence

Contextual equivalence Techniques 16/22 ACS L16, lecture 2 4/10 Contextual equivalence Two phrases of a programming language are ( Morris style ) contextually equivalent ( = ctx ) if occurrences of the first phrase in any program

More information

Madhavan Mukund Chennai Mathematical Institute

Madhavan Mukund Chennai Mathematical Institute AN INTRODUCTION TO LOGIC Madhavan Mukund Chennai Mathematical Institute E-mail: madhavan@cmiacin Abstract ese are lecture notes for an introductory course on logic aimed at graduate students in Computer

More information

Universal Algebra for Logics

Universal Algebra for Logics Universal Algebra for Logics Joanna GRYGIEL University of Czestochowa Poland j.grygiel@ajd.czest.pl 2005 These notes form Lecture Notes of a short course which I will give at 1st School on Universal Logic

More information

Relational Graph Models, Taylor Expansion and Extensionality

Relational Graph Models, Taylor Expansion and Extensionality Relational Graph Models, Taylor Expansion and Extensionality Domenico Ruoppolo Giulio Manzonetto Laboratoire d Informatique de Paris Nord Université Paris-Nord Paris 13 (France) MFPS XXX Ithaca, New York

More information

A fully abstract semantics for a nondeterministic functional language with monadic types

A fully abstract semantics for a nondeterministic functional language with monadic types A fully abstract semantics for a nondeterministic functional language with monadic types Alan Jeffrey 1 School of Cognitive and Computing Sciences University of Sussex, Brighton BN1 9QH, UK alanje@cogs.susx.ac.uk

More information

The length-ω 1 open game quantifier propagates scales

The length-ω 1 open game quantifier propagates scales The length-ω 1 open game quantifier propagates scales John R. Steel June 5, 2006 0 Introduction We shall call a set T an ω 1 -tree if only if T α

More information

Consequence Relations and Natural Deduction

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

More information

A should be R-closed: R(A) A. We would like this to hold because we would like every element that the rules say should be in A to actually be in A.

A should be R-closed: R(A) A. We would like this to hold because we would like every element that the rules say should be in A to actually be in A. CS 6110 S18 Lecture 7 Inductive Definitions and Least Fixed Points 1 Set Operators Last time we considered a set of rule instances of the form X 1 X 2... X n, (1) X where X and the X i are members of some

More information

Techniques. Contextual equivalence

Techniques. Contextual equivalence Techniques 16/22 Contextual equivalence Two phrases of a programming language are ( Morris style ) contextually equivalent ( = ctx )if occurrences of the first phrase in any program can be replaced by

More information

Alberto Carraro 1, 2 and Antonino Salibra 1

Alberto Carraro 1, 2 and Antonino Salibra 1 Theoretical Informatics and Applications Informatique Théorique et Applications Will be set by the publisher EASY LAMBDA-TERMS ARE NOT ALWAYS SIMPLE Alberto Carraro 1, 2 and Antonino Salibra 1 Abstract.

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

Decision procedure for Default Logic

Decision procedure for Default Logic Decision procedure for Default Logic W. Marek 1 and A. Nerode 2 Abstract Using a proof-theoretic approach to non-monotone reasoning we introduce an algorithm to compute all extensions of any (propositional)

More information

Review of The π-calculus: A Theory of Mobile Processes

Review of The π-calculus: A Theory of Mobile Processes Review of The π-calculus: A Theory of Mobile Processes Riccardo Pucella Department of Computer Science Cornell University July 8, 2001 Introduction With the rise of computer networks in the past decades,

More information

Löwenheim-Skolem Theorems, Countable Approximations, and L ω. David W. Kueker (Lecture Notes, Fall 2007)

Löwenheim-Skolem Theorems, Countable Approximations, and L ω. David W. Kueker (Lecture Notes, Fall 2007) Löwenheim-Skolem Theorems, Countable Approximations, and L ω 0. Introduction David W. Kueker (Lecture Notes, Fall 2007) In its simplest form the Löwenheim-Skolem Theorem for L ω1 ω states that if σ L ω1

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

Topos Theory. Lectures 17-20: The interpretation of logic in categories. Olivia Caramello. Topos Theory. Olivia Caramello.

Topos Theory. Lectures 17-20: The interpretation of logic in categories. Olivia Caramello. Topos Theory. Olivia Caramello. logic s Lectures 17-20: logic in 2 / 40 logic s Interpreting first-order logic in In Logic, first-order s are a wide class of formal s used for talking about structures of any kind (where the restriction

More information

COMPUTER SCIENCE TEMPORAL LOGICS NEED THEIR CLOCKS

COMPUTER SCIENCE TEMPORAL LOGICS NEED THEIR CLOCKS Bulletin of the Section of Logic Volume 18/4 (1989), pp. 153 160 reedition 2006 [original edition, pp. 153 160] Ildikó Sain COMPUTER SCIENCE TEMPORAL LOGICS NEED THEIR CLOCKS In this paper we solve some

More information

Intersection and Singleton Type Assignment Characterizing Finite Böhm-Trees

Intersection and Singleton Type Assignment Characterizing Finite Böhm-Trees Information and Computation 178, 1 11 (2002) doi:101006/inco20022907 Intersection and Singleton Type Assignment Characterizing Finite Böhm-Trees Toshihiko Kurata 1 Department of Mathematics, Tokyo Metropolitan

More information

Realisability methods of proof and semantics with application to expansion

Realisability methods of proof and semantics with application to expansion Realisability methods of proof and semantics with application to expansion First Year Examination Supervisors : Professor Fairouz Kamareddine and Doctor Joe B. Wells Student : Vincent Rahli ULTRA group,

More information

Fixed-point elimination in Heyting algebras 1

Fixed-point elimination in Heyting algebras 1 1/32 Fixed-point elimination in Heyting algebras 1 Silvio Ghilardi, Università di Milano Maria João Gouveia, Universidade de Lisboa Luigi Santocanale, Aix-Marseille Université TACL@Praha, June 2017 1 See

More information

AN ALGEBRAIC APPROACH TO GENERALIZED MEASURES OF INFORMATION

AN ALGEBRAIC APPROACH TO GENERALIZED MEASURES OF INFORMATION AN ALGEBRAIC APPROACH TO GENERALIZED MEASURES OF INFORMATION Daniel Halpern-Leistner 6/20/08 Abstract. I propose an algebraic framework in which to study measures of information. One immediate consequence

More information

Relational Reasoning for Recursive Types and References

Relational Reasoning for Recursive Types and References Relational Reasoning for Recursive Types and References Nina Bohr and Lars Birkedal IT University of Copenhagen (ITU) {ninab,birkedal}@itu.dk Abstract. We present a local relational reasoning method for

More information

CONSTRUCTION OF THE REAL NUMBERS.

CONSTRUCTION OF THE REAL NUMBERS. CONSTRUCTION OF THE REAL NUMBERS. IAN KIMING 1. Motivation. It will not come as a big surprise to anyone when I say that we need the real numbers in mathematics. More to the point, we need to be able to

More information

CS611 Lecture 25 Solving Domain Equations 22 October 2007 Lecturer: Andrew Myers

CS611 Lecture 25 Solving Domain Equations 22 October 2007 Lecturer: Andrew Myers CS611 Lecture 25 Solving Domain Equations 22 October 2007 Lecturer: Andrew Myers To develop a denotational semantics for a language with recursive types, or to give a denotational semantics for the untyped

More information

What You Must Remember When Processing Data Words

What You Must Remember When Processing Data Words What You Must Remember When Processing Data Words Michael Benedikt, Clemens Ley, and Gabriele Puppis Oxford University Computing Laboratory, Park Rd, Oxford OX13QD UK Abstract. We provide a Myhill-Nerode-like

More information

Semantics for algebraic operations

Semantics for algebraic operations MFPS 17 Preliminary Version Semantics for algebraic operations Gordon Plotkin and John Power 1 Laboratory for the Foundations of Computer Science University of Edinburgh King s Buildings, Edinburgh EH9

More information

CS 6110 Lecture 35 Solving Domain Equations 19 April 2013 Lecturer: Andrew Myers

CS 6110 Lecture 35 Solving Domain Equations 19 April 2013 Lecturer: Andrew Myers CS 6110 Lecture 35 Solving Domain Equations 19 April 2013 Lecturer: Andrew Myers To develop a denotational semantics for a language with recursive types, or to give a denotational semantics for the untyped

More information

Constructing classical realizability models of Zermelo-Fraenkel set theory

Constructing classical realizability models of Zermelo-Fraenkel set theory Constructing classical realizability models of Zermelo-Fraenkel set theory Alexandre Miquel Plume team LIP/ENS Lyon June 5th, 2012 Réalisabilité à Chambéry Plan 1 The theory ZF ε 2 The model M (A ) of

More information

Notes on Logical Frameworks

Notes on Logical Frameworks Notes on Logical Frameworks Robert Harper IAS November 29, 2012 1 Introduction This is a brief summary of a lecture on logical frameworks given at the IAS on November 26, 2012. See the references for technical

More information

The constructible universe

The constructible universe The constructible universe In this set of notes I want to sketch Gödel s proof that CH is consistent with the other axioms of set theory. Gödel s argument goes well beyond this result; his identification

More information

Synthetic Computability

Synthetic Computability Synthetic Computability Andrej Bauer Department of Mathematics and Physics University of Ljubljana Slovenia MFPS XXIII, New Orleans, April 2007 What is synthetic mathematics? Suppose we want to study mathematical

More information

Mathematical Logic. An Introduction

Mathematical Logic. An Introduction Mathematical Logic. An Introduction Summer 2006 by Peter Koepke Table of contents Table of contents............................................... 1 1 Introduction.................................................

More information

Consistency of a Programming Logic for a Version of PCF Using Domain Theory

Consistency of a Programming Logic for a Version of PCF Using Domain Theory Consistency of a Programming Logic for a Version of PCF Using Domain Theory Andrés Sicard-Ramírez EAFIT University Logic and Computation Seminar EAFIT University 5 April, 3 May 2013 A Core Functional Programming

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

A note on coinduction and weak bisimilarity for while programs

A note on coinduction and weak bisimilarity for while programs Centrum voor Wiskunde en Informatica A note on coinduction and weak bisimilarity for while programs J.J.M.M. Rutten Software Engineering (SEN) SEN-R9826 October 31, 1998 Report SEN-R9826 ISSN 1386-369X

More information

Abstract A new proof is given of the analogue of Böhm s Theorem in the typed lambda calculus with functional types.

Abstract A new proof is given of the analogue of Böhm s Theorem in the typed lambda calculus with functional types. The Typed Böhm Theorem Kosta Došen University of Toulouse III, IRIT 31062 Toulouse cedex, France and Mathematical Institute Knez Mihailova 35, PO Box 367 11001 Belgrade, Yugoslavia email: kosta@misanuacyu

More information

A Behavioral Congruence for Concurrent Constraint Programming with Nondeterministic Choice

A Behavioral Congruence for Concurrent Constraint Programming with Nondeterministic Choice A Behavioral Congruence for Concurrent Constraint Programming with Nondeterministic Choice Luis Pino*, Filippo Bonchi** and Frank Valencia* (Presented by: Jorge A. Pe rez) *E quipe Come te, LIX, Laboratoire

More information

Rough Approach to Fuzzification and Defuzzification in Probability Theory

Rough Approach to Fuzzification and Defuzzification in Probability Theory Rough Approach to Fuzzification and Defuzzification in Probability Theory G. Cattaneo and D. Ciucci Dipartimento di Informatica, Sistemistica e Comunicazione Università di Milano Bicocca, Via Bicocca degli

More information

Nested Epistemic Logic Programs

Nested Epistemic Logic Programs Nested Epistemic Logic Programs Kewen Wang 1 and Yan Zhang 2 1 Griffith University, Australia k.wang@griffith.edu.au 2 University of Western Sydney yan@cit.uws.edu.au Abstract. Nested logic programs and

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

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

Basic Algebraic Logic

Basic Algebraic Logic ELTE 2013. September Today Past 1 Universal Algebra 1 Algebra 2 Transforming Algebras... Past 1 Homomorphism 2 Subalgebras 3 Direct products 3 Varieties 1 Algebraic Model Theory 1 Term Algebras 2 Meanings

More information

Advanced Lambda Calculus. Henk Barendregt & Giulio Manzonetto ICIS Faculty of Science Radboud University Nijmegen, The Netherlands

Advanced Lambda Calculus. Henk Barendregt & Giulio Manzonetto ICIS Faculty of Science Radboud University Nijmegen, The Netherlands Advanced Lambda Calculus Henk Barendregt & Giulio Manzonetto ICIS Faculty of Science Radboud University Nijmegen, The Netherlands Form of the course Ordinary lecture Seminar form Exam: working out an exercise

More information

Type inference in systems of recursive types with subtyping

Type inference in systems of recursive types with subtyping Type inference in systems of recursive types with subtyping Trevor Jim Jens Palsberg June 1999 Abstract We present general methods for performing type inference and deciding subtyping in languages with

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

Lecture 1: Logical Foundations

Lecture 1: Logical Foundations Lecture 1: Logical Foundations Zak Kincaid January 13, 2016 Logics have two components: syntax and semantics Syntax: defines the well-formed phrases of the language. given by a formal grammar. Typically

More information