Second-Order Equational Logic

Size: px
Start display at page:

Download "Second-Order Equational Logic"

Transcription

1 Second-Order Equational Logic Extended Abstract Marcelo Fiore Computer Laboratory University of Cambridge Chung-Kil Hur Laboratoire PPS Université Paris 7 Abstract We provide an extension of universal algebra and its equational logic from first to second order. Conservative extension, soundness, and completeness results are established. Introduction The notion of algebraic structure has solid mathematical foundations. In the traditional, first order, case our understanding of the subject is as complete as to allow us to look at it from three different perspectives: universal algebra, equational logic, and categorical algebra. Of direct concern to us in this paper is the relationship between the first two. Universal algebra provides a model theory for algebraic structure and equational logic a formal deductive system for reasoning about it. These are related by Birkhoff s theorem [3] establishing the semantic soundness and completeness of equational deduction see Goguen and Meseguer [13] for the many-sorted case. Importantly, the theory of computation also plays a role here, as bidirectional term rewriting provides a sound and complete computational method for establishing equational derivability see e.g. [2]. We are interested here in extending the above fundamental theory from first to second order. The main motivation for doing so comes from the increasing need of metalanguages that support the specification of formalisms with variable binding. Such a development has also been advocated by Plotkin [22]. Syntactically, the passage from first to second order involves extending the language with both variable-binding operators and parameterised metavariables. These two concepts are orthogonal to each other, but it is with both of them in place that the language attains the required expressiveness. Variable-binding operators may bind a list of variables in each of their arguments and thereby lead to syntax up to alpha equivalence. Parameterised metavariables are, in effect, second-order variables for which substitution of a phrase also involves an instantiation of it. The consideration of such second-order syntax is far from being new. As far as we are aware, it was first put forward by Aczel [1]. A variation of it incorporating abstractions features in the CRSs of Klop [17]. A mathematical theory of second-order syntax was developed by Fiore [9], building on work of Fiore, Plotkin and Turi [12] and Hamana [14]. In it, second-order syntax is abstractly characterised by free algebras of a term monad on a suitable semantic universe. This provides initial-algebra semantics, induction principles, and structural recursion. Moreover, the crucial result that term monads are strong provides a second-order substitution calculus. Term monads for second-order syntax, being strong with respect to a biclosed action, fit into the framework of Fiore and Hur [11] for synthesising equational logics. This framework provides a canonical algebraic model theory for categorical equational presentations in the form of sets of parallel pairs of Kleisli maps together with a sound categorical equational metalogic for reasoning about them. The gist of the work in this paper is then to instantiate our framework and apply the supporting methodology to derive a universal algebra for second-order equational presentations, synthesise a sound second-order equational logic, and relate them by means of a completeness theorem. In passing, we also establish the conservativity of second-order equational logic over first-order equational logic and the completeness of bidirectional second-order term rewriting for establishing equational derivability. The perspective to first-order algebraic structure offered by Lawvere theories [19] has also been extended to secondorder by Fiore and Mahmoud. This will be presented elsewhere. Concerning related work, deductive systems for reasoning about algebraic structure with binding have already been considered in the literature. The system closest to ours is the Equational Logic for Binding Algebras of Sun [24, 25]. Some minor syntactic differences being that Sun works with 1

2 abstracted terms and raw syntax, and hence needs to incorporate extensionality and alpha equivalence axioms. The major difference is however in the semantics, which Sun restricts to functional models and leads to a restricted completeness result so-called admissible completeness with respect to a satisfaction relation that cuts down to a class of so-called admissible valuations. Another early system is the abstract variable binding calculus of Pigozzi and Salibra [21]. A strong point of departure between this system and ours is that in it metavariables are treated informally in the metalanguage. This results in the deductive system not being a true equational theory. More recently, there have been the Nominal Algebra of Gabbay and Mathijssen [20] and the Nominal Equational Logic of Clouston and Pitts [4]. These systems have been shown to correspond to the Synthetic Nominal Equational Logic of Fiore and Hur [11] with metavariables that can be solely parameterised by names. 1. Syntactic theory The syntactic theory underlying Second-Order Equational Logic is presented. The development comprises second-order signatures on top of which second-order terms in context are introduced. For these the needed two-levelled substitution calculus is presented. Signatures. A second-order signature Σ = T, O, is specified by a set of types T, a set of operators O, and an arity function : O T T T. This definition is a typed version of the binding signatures of Aczel [1] see also [18, 12]. Notation. We let σ be the length of a sequence σ. For 1 i σ, we let σ i be the i th element of σ; so that σ = σ 1,..., σ σ. For an operator o O, we typically write o : σ 1 τ 1,..., σ n τ n whenever o = σ 1, τ 1... σ n, τ n, τ. The intended meaning here is that o is an operator of type τ taking n arguments each of which binds n i = σ i variables of types σ i,1,..., σ i,ni in a term of type τ i. Examples of second-order signatures arise in a wide range of subjects: category theory e.g. ends, logic e.g. quantifiers, mathematics e.g. integration, process calculi e.g. restriction, programming languages e.g. local scope, type theory e.g. lambda calculi. The paradigmatic example is given below. Example 1. The signature of the typed λ-calculus over a set of base types B has set of types B => given by β B σ, τ B => β B => σ => τ B => τ and, for σ, τ B =>, operators abs σ,τ : στ σ => τ and app σ,τ : σ => τ, σ τ. The signature of the untyped λ-calculus is as above when only one type, say D, is available. Hence, it has operators abs : DD D and app : D, D D. Contexts. We will consider terms in typing contexts. Typing contexts have two zones, each respectively typing variables and metavariables. Variable typings are types. Metavariable typings are parameterised types; the idea being that a metavariable of type [σ 1,..., σ n ]τ, when parameterised by terms of type σ 1,..., σ n, will yield a term of type τ. In accordance, we use the following representation for typing contexts M 1 : [ σ 1 ]τ 1,..., M k : [ σ k ]τ k x 1 : σ 1,..., x l : σ l where, as usual, all metavariables and all variables are assumed distinct. Terms. Signatures give rise to terms. These are built up by means of operators from both variables and metavariables, and hence referred to as second-order. Terms are considered up the α-equivalence relation induced by stipulating that, for every operator o, in the term o..., x i t i,... the x i are bound in t i. This may be formalised in a variety of ways, but it is not necessary for us to dwell into it here. The judgement for terms in context Θ Γ is defined by the following rules. This definition is a typed version of the second-order syntax of Aczel [1]. Variables For x Γ, Θ Γ x Metavariables For M : [τ 1,..., τ n ]τ Θ, Θ Γ t i i 1 i n Θ Γ M[t 1,..., t n ] Operators For o : σ 1 τ 1,..., σ n τ n τ, Θ Γ, x i : σ i t i i 1 i n Θ Γ o x 1 t 1,..., x n t n where x : σ stands for x 1 : σ 1,..., x k : σ k. Example 2. Two sample terms for the signature of the typed λ-calculus follow: M : [σ]τ, N : σ app abs xm[x], N[ ], M : [σ]τ, N : σ M[N[ ]]. Substitution calculus. The second-order nature of the syntax requires a two-level substitution calculus, see e.g. [1, 18, 26, 9]. Each level respectively accounts for the substitution 2

3 of variables and metavariables, with the latter operation depending on the former. The operation of capture-avoiding simultaneous substitution of terms for variables maps to Θ x 1 : σ 1,..., x n : σ n t, Θ Γ t i : σ i 1 i n Θ Γ t[t i /x i] 1 i n according to the following definition: x j [t i /x i] 1 i n = t j M[..., s,...] [ [t i /x i] 1 i n = M..., s[ t i /x i] 1 i n,... ] o..., y 1,..., y k s,... [t i /x i] 1 i n = o..., z 1,..., z k s[t i /x i, z j /y j] 1 i n,1 j k,... with z j domγ for all 1 j k. The operation of metasubstitution of abstracted terms for metavariables maps to M 1 : [ σ 1 ]τ 1,..., M k : [ σ k ]τ k Γ t, Θ Γ, x i : σ i t i i 1 i k Θ Γ t{m i := x i t i } 1 i k according to the following definition: x{m i := x i t i } 1 i k = x M j [s 1,..., s m ] {M i := x i t i } 1 i k = t j [s j/x i,j] 1 j m where, for 1 j m, s j = s j{m i := x i t i } 1 i k o..., xs,... {M i := x i t i } 1 i k = o..., xs{m i := x i t i } 1 i k,... The syntactic theory can be completely justified on model-theoretic grounds. We turn to this next. 2. Abstract syntactic theory Having developed some second-order syntactic theory, our purpose in this section is to show how this arises from a model theory. This is important for several reasons: it provides an abstract characterisation of syntax by free constructions and thereby supports initial-algebra semantics and definitions by structural recursion; it encompasses and guarantees all the necessary properties of the substitution calculus; and it opens up the development of an algebraic model theory for second-order equational presentations together with an associated equational logic. We now introduce the semantic universe and, within it, constructions for modelling substitution and algebraic structure leading to a notion of model for signatures [12, 8]. The syntactic nature of free models is then explained [9]. Notation. For a sequence σ, we let [ σ] = {1,..., σ }. Semantic universe. For a set T, we write F[T ] for the free cocartesian category on T. Explicitly, it has set of objects T and morphisms σ τ given by functions ρ : [ σ] [ τ] such that σ i = τ ρi for all i [ σ]. For a set of types T, we will work within and over the semantic universe Set F[T ] T of T -sorted sets in T -typed contexts [6]. We write y for the Yoneda embedding F[T ] op Set F[T ]. Substitution. We recall the substitution monoidal structure in semantic universes [7]. It has tensor unit and tensor product respectively given by V τ = yτ, X Y τ = X τ Y where P Y = σ F[T ] P σ i [ σ] Y σ i. A monoid V A A A for the substitution monoidal structure equips A with substitution structure. In particular, the unit V A provides an embedding A y σ τ i [ σ] A σ i A τ A which together with the multiplication yields a substitution operation A τ y σ i [ σ] A σ i A τ. The category of monoids for the substitution tensor product is isomorphic to that of T -sorted Lawvere theories and maps not translations. The Lawvere theory L A associated to A has objects T and homsets L A σ, τ = i [ τ] A τ i σ, with identities and composition provided by the monoid structure. On the other hand, for every cartesian category C and assignment C C T consider the functor C, : C T Set F[T ] T 1 defined as C, D τ = C, D τ with C, c τ σ = C 1 i σ C σ i, c. Then, C, C has a canonical monoid structure given by projections and composition. Of relevance in what follows see [9], there are canonical natural isomorphisms i I X i Y = i I X i Y 2 1 i n X i Y = 1 i n X i Y 3 and, for all points ν : V Y, a natural extension map ν # : P y σ Y P Y y σ. 4 Algebras. Every signature Σ over a set of types T induces a signature endofunctor on Set F[T ] T given by 3

4 ΣX τ = o: σ 1τ 1,..., σ nτ n τ 1 i n X τ i y σ i. Σ-algebras provide interpretations for the operators of Σ. By virtue of 2 4 every signature endofunctor comes equipped with a pointed strength [9] ϖ X,V Y : ΣX Y ΣX Y. Models. The models that we are interested in referred to as Σ-monoids in [12, 9] are algebras equipped with a compatible substitution structure. For a signature Σ over a set of types T, we let Σ-Mod be the category of Σ-models with objects A Set F[T ] T equipped with a Σ-algebra and a monoid structure ΣA V A A A that are compatible in the sense that the diagram ΣA A A A ϖ A,V A ΣA A ΣA commutes. Morphisms are maps that are both Σ-algebra and monoid homomorphims. Term monad. The forgetful functor Σ-Mod Set F[T ] T is monadic [9, 10]. Hence, writing M for the induced monad and M-Alg for its category of Eilenberg-Moore algebras, we have a canonical isomorphism Σ-Mod = M-Alg. Carriers of free models can be explicitly described as initial algebras: A MX = µz. V + X Z + ΣZ. 5 Thereby free models on objects arising from meta-variable contexts have a syntactic description [14, 9]. Indeed, for a metavariable context Θ = M 1 : [ σ 1 ]τ 1,..., M k : [ σ k ]τ k let where Θ = 1 i k y σ α = in Set F[T ] T { P, if α = τ 0, if α τ Then, we have the following syntactic characterisation MΘ τ σ = { t Θ x : σ t }. 6 We thus refer to M as the term monad. For a metavariable context Θ, the monoid multiplication MΘ MΘ MΘ amounts to the operation of capture-avoiding simultaneous substitution [9]. The term monad comes equipped with a strength MX P MX P where X P τ = X τ P, see [9]. It follows that every model MA A admits an interpretation map: MX [X, A] M X [X, A] MA A where [X, Y ] = τ T Y τ Xτ. For metavariable contexts Θ and Ξ, the interpretation map MΘ [Θ, MΞ] MΞ amounts to the operation of metasubstitution [9]. 3. Equational metalogic Our aim now is to use the above monadic model theory for second-order syntax to synthesise a Second-Order Equational Logic. This development, which is presented in Section 4, depends on a general theory and methodology of the authors [11, 5, 15]. An outline of the framework follows. To every strong monad T with respect to a biclosed action [16] we associate an Equational Metalogic. This is a deductive system for reasoning about the equality of the interpretation of Kleisli maps X T Y in Eilenberg- Moore algebras T A A as captured by the following satisfaction relation: A = f g : X T Y iff [f ] = [g ] : X [Y, A] A where [h] = X [Y, A] h id T Y [Y, A] A. 7 Equational metalogic is parameterised by a set of axioms E given by parallel pairs of Kleisli maps. The rules assert the derivability of judgements of the form E f g : X and are given in Figure 1. Example 3. The rule T Y Local parameterised composition E f g : X T i I Y i E f i g i : Y i P T Z i I E f P [ [f i ] i I ] g P [ [gi ] i I ] : X P T Z is derivable, and may be used instead of the Composition and Parameterisation rules. The category T, E-Alg of T, E-algebras is defined as the full subcategory of the category T -Alg of Eilenberg- Moore algebras that satisfy the axioms E. We have the following two important results. Soundness If E f g then A = [[f ] = [g ] for all T, E-algebras A. 8 4

5 Axiom f, g : X T Y E E f g : X T Y Equivalence f : X T Y E f f : X T Y E f g : X T Y E g f : X T Y E f g : X T Y E g h : X T Y E f h : X T Y Composition E f 1 g 1 : X T Y E f 2 g 2 : Y T Z E f 1 [f 2 ] g 1 [g 2 ] : X T Z where, for f : X T Y and g : Y T Z, f[g] is the Kleisli composite X f T Y T g T T Y T Y Parameterisation E f g : X T Y E f P g P : X P T Y P where, for h : X T Y, h P = X P h id T Y P T Y P Local character E f e i g e i : X i T Y i I E f g : X T Y {ei : X i X} i I jointly epi Figure 1. Equational Metalogic Internal completeness If every object Z admits a free T, E-algebra T E Z, then we have a quotient map q : T T E and the following are equivalent: 1 A = f g : X T Y for all T, E-algebras A 2 T E Y = f g : X T Y 3 q Y f = q Y g : X T E Y 4. Second-Order Equational Logic Second-Order Equational Logic is now synthesised from Equational Metalogic. This is done by 1 considering the term monad M; 2 restricting attention to Kleisli maps of the form y MΘ, which by 6 amount to secondorder terms of type τ in context Θ x : σ; and 3 rendering the rules in syntactic form. Presentations. An equational presentation is a set of axioms each of which is a pair of terms in context. Without loss of generality see Appendix A one may restrict to axioms containing an empty variable context, as in the CRSs of Klop [18]. There is no need for us to do so here. Example 4. The equational presentation of the typed λ-calculus follows. β M : [σ]τ, N : [ ]σ app abs zm[z], N[ ] [ M N[ ] ] η F : [ ]σ => τ abs xappf[ ], x F[ ] : σ => τ Logic. The rules of Second-Order Equational Logic are given in Figure 2. The Metasubstitution rule is a syntactic rendering of the Local parameterised composition rule. The syntactic counterpart of the Local character rule is derivable and hence omitted. We illustrate the expressive power of the system by giving some sample derivable rules. Example 5 Structural rules. For ρ : σ τ, Θ x : σ s t : γ Θ y : τ s[ρ] t[ρ] : γ where u[ρ] = u[y ρi /x i] 1 i σ. For f : {1,..., k} {1,..., l} and ρ i : 1 i k, σ fi M 1 : [ α 1 ]β 1,... M k : [ α k ]β k Γ s t : γ N 1 : [ σ 1 ]τ 1,... N l : [ σ l ]τ l Γ s{f/ρ} t{f/ρ} : γ where, for n j = σ j 1 j l, α i 5

6 Axiom Θ Γ s t E Θ Γ s t Equivalence Θ Γ t Θ Γ t t Θ Γ s t Θ Γ t s Θ Γ s t Θ Γ s u Θ Γ t u Metasubstitution M 1 : [ σ 1 ]τ 1,..., M k : [ σ k ]τ k Γ s t Θ, x i : σ i s i t i i 1 i k Θ Γ, s{m i := x i s i } 1 i k t{m i := x i t i } 1 i k Figure 2. Second-Order Equational Logic u{f/ρ} = u{m i := x i N fi [x i,ρi1,..., x i,ρin fi ]} 1 i k. Example 6. Substitution Θ x 1 : σ 1,..., x n : σ n s t Θ Γ s i t i : σ i 1 i n Θ Γ s[s i /x i] 1 i n t[t i /x i] 1 i n Example 7. Extension M 1 : [ σ 1 ]τ 1,..., M k : [ σ k ]τ k Γ s t M 1 : [ σ 1, σ]τ 1,..., M k : [ σ k, σ]τ k Γ, x : σ s # t # where u # = u{m i := x i M i [ x i, x]} 1 i k. 5. Model theory The model theory of Second-Order Equational Logic is presented and exemplified. The soundness of deduction is a by-product of our methodology. As an application, a conservative extension result is established. Semantics. The interpretation of a term Θ x : σ t in a model A is that of its associated Kleisli map y MΘ see 6 according to the general definition 7. Explicitly, for Θ = M 1 : [ α 1 ]β 1,..., M k : [ α k ]β k and Γ = x : σ, we have that and that [Θ Γ] A = 1 i k A β i y α i y σ [Θ Γ t ] A : [Θ Γ] A A τ is given inductively on the structure of terms as follows: [Θ Γ x j : σ j ] A is the composite [Θ Γ] A π 2 y σ yσ j A σj. [Θ Γ M i [t 1,..., t mi ] : β i ] A is the composite [Θ Γ] A π i π 1,f A βi y α i 1 j m i A αi,j A βi where f = [Θ Γ t j : α i,j ] A 1 j m i. For o : γ 1 τ 1,..., γ n τ n τ, is the composite [Θ Γ o y 1 t 1,..., y n t n ] [Θ Γ] A f j 1 j n 1 j n A τ j y γ j where f j is the exponential transpose of 1 i k A y α i β i y σ y γ j = 1 i k A β i y α i y σ, γ j A τ [Θ Γ, y j: γ j t j:τ j ] A A τj. Models. A model A is said to satisfy Θ Γ s t, written A = Θ Γ s t, iff [Θ Γ s ] A = [Θ Γ t ] A. For an equational presentation E over a signature Σ, we write Σ, E-Mod for the full subcategory of Σ-Mod consisting of the Σ-models A that satisfy the axioms E. Thus, Σ, E-Mod = M, E-Alg where E is the set of parallel pairs of Kleisli maps corresponding to the pairs of terms in E. Example 8. For the signature of the typed λ-calculus over a set of base types B Example 1, a model A τ yσ A σ A σ=>τ, A σ=>τ A σ A τ yτ A τ A τ A satisfies the β and η axioms Example 4 iff the following diagrams commute. 6

7 A τ yσ A σ abs id β subst A σ=>τ A σ app A τ A σ=>τ λapp id var η yσ A τ abs id A σ=>τ The Lawvere theory L A associated to such a model is a B => -sorted Lawvere theory equipped with cartesian closed structure L γ σ, τ = L γ, σ => τ. On the other hand, for every cartesian closed category C, an assignment C : B C canonically gives rise to a model on C #, C # satisfying the β and η axioms; where C # σ => τ = C # σ C # τ and, for β B, C # β = C β. Models of the untyped λ-calculus are briefly discussed in Appendix B. Soundness. The soundness of Second-Order Equational Logic follows as a direct consequence of that of Equational Metalogic. Soundness For an equational presentation E over a signature Σ, if Θ Γ s t is derivable from E then A = Θ Γ s t for all Σ, E-models A. Conservativity. Appendix C applies the model theory to establish the following result. Conservative extension Second-Order Equational Logic is a conservative extension of First-Order Equational Logic. This also follows from our proof of completeness, to which we turn next. 6. Completeness We establish the semantic completeness of equational derivability. Our proof is then used to show the derivability completeness of bidirectional second-order term rewriting. Free algebras. It follows from our theory of free constructions, see [11] and [10], that the forgetful functor Σ, E-Mod Set F[T ] T is monadic. Hence, writing M E for the induced monad, we have a quotient map q : M M E. In fact, since M is finitary and preserves epimorphisms 1, we have the following construction of free algebras again see [11] and [10]. 1 For E = {Θ i Γ i l i r i i } i I we take the joint coequaliser 1 As can be seen directly from the explicit description 5 or using our theory of free constructions [10]. [Θi Γ i ] MΘ for i i [Θ i Γ i l i:τ i [Θ i Γ i r i:τ i MΘ q1 coeq MΘ 1 2 We perform the following inductive construction MMΘ µ Θ µ 1 MΘ q1 MΘ 1 where MΘ 0 = MΘ. Mq n+1 MMΘ n MMΘ n+1 pushout µ n+1 3 We obtain M E Θ as the colimit of µ n+2 MΘ n+1 qn+2 MΘ n+2 MΘ q1 MΘ 1 MΘ n q n, and hence have an epimorphic quotient map q Θ : MΘ M E Θ. 9 In the light of the Internal completeness result, our method for establishing completeness is to show that, for Θ x : σ s and Θ x : σ t, if q Θ,τ, σ s = q Θ,τ, σ t then Θ Γ s t is derivable from E. This will be evident from a rule-based characterisation of the quotient 9 that we will extract from the above constructions. Explicit substitutions. We start by analising the syntactic structure of MMΘ. We need consider first syntax with explicit substitutions as abstractly introduced by the following construction where T X = µz. V + X Z + ΣZ X Y τ = X τ Y, P Y = σ T P σ i [ σ] Y σ i. Indeed, we have that T Θ τ σ = {u Θ x : σ u } where the judgement Θ Γ is given by the following rules. Variables For x Γ, Explicit substitutions Θ Γ x Θ x 1 : σ 1,..., x n : σ n t Θ Γ u i : σ i 1 i n Θ Γ t[x 1,..., x n u 1,..., u n ] Operators For o : σ 1 τ 1,..., σ n τ n τ, Θ Γ, x i : σ i u i i 1 i n Θ Γ o x 1 u 1,..., x n u n 7

8 Θ Γ u Θ Γ u 0 v Θ Γ u 0 v Θ Γ v 0 w Θ Γ u 0 u Θ Γ v 0 u Θ Γ u 0 w Θ y : τ s[y ρi/x i] 1 i σ = t Θ Γ u i 0 v ρi : σ i 1 i σ Θ Γ s[ x u] 0 t[ y ρ : σ τ v] Θ Γ, x i : σ i u i 0 v i i 1 i n Θ Γ o..., x i u i,... 0 o..., x i v i,... o : σ 1 τ 1,..., σ n τ n τ Figure 3. Rules of 0 Here the α-equivalence relation is induced by considering that in t[ x u] the x are bound in t and that in o..., x i t i,... the x i are bound in t i. The canonical quotient q 0 : X MX X MX gives rise to a quotient q # 0 : T X MX characterised as the unique map such that V + X MX + ΣMX V+X q V+q 0+ΣX # 0 +Σq# 0 V + X T X + ΣT X V + X MX + ΣMX = T X q # 0 = MX It follows that MMΘ = T MΘ / 0 where 0 is given by the rules in Figure 3. The composite T MΘ MMΘ MΘ maps Θ Γ u to Θ Γ u according to the following definition: x = x t[x 1,..., x n u 1,..., x n ] = t[u 1/x 1,..., u n/x n] o..., x i u i,... = o..., x i u i,... Syntactic model. We describe equivalence relations n on MΘ and n on T MΘ respectively giving rise to the quotients q n : MΘ MΘ n and q # n : T MΘ MMΘ n, where q n = q n q 1 and q # n = Mq n q # 0 ; so that MΘ n = MΘ/ n and MMΘ n = T MΘ/ n. As base cases, we let 0 be syntactic equality and 1 be given by the rules in Figure 4; whilst we have already defined 0 by the rules in Figure 3. For the inductive step we note that we have the following two situations: V + MΘ n MMΘ n + ΣMMΘ n V+q n q V+q # n +Σq# n 0+ΣMMΘ n V + MΘ T MΘ V + MΘ n MMΘ n + ΣT MΘ + ΣMMΘ n = T MΘ q # n = MMΘ n T MΘ MMΘ n µ n+1 pushout II MΘ q 1 MΘ 1 MΘ n+1 q # n q n+1 It follows from I that, for n 1, the equivalence relation n on T MΘ is given by the rules in Figure 5. We have from II that, for n 1, the equivalence relation n+1 on MΘ is generated by 1 and the -projection n of n. Since n is a reflexive and symmetric relation that contains 1, we have that n+1 is the transitive closure of n. Further analysis gives the characterisation of n+1 by the rules of Figure 6. Finally, the equivalence relation on MΘ describing the quotient 9 is given by the rules in Figure 7. Since derivability in this deductive system can be mimicked in Second-Order Equational Logic we have: Completeness For an equational presentation E over a signature Σ, if A = Θ Γ s t for all Σ, E-models A then Θ Γ s t is derivable from E. Furthermore, since can be characterised as the equivalence relation generated by the second-order term rewriting relation given in Figure 8, we have: Completeness of second-order term rewriting Θ Γ s t iff Θ Γ s t. I 8

9 Θ Γ t Θ Γ t 1 t Θ Γ s 1 t Θ Γ t 1 s Θ Γ r 1 s Θ Γ r 1 t Θ Γ s 1 t M 1 : [ σ 1 ]τ 1,..., M k : [ σ k ]τ k x : α l r E ρ : α β, Θ y : β, xj : σ j t j j 1 j k Θ y : β l[y ρi/x i] 1 i α {M j := x j t j } 1 j k 1 r[y ρi/x i] 1 i α {M j := x j t j } 1 j k Figure 4. Rules of 1. Θ Γ u Θ Γ u n v Θ Γ u n v Θ Γ v n w Θ Γ u n u Θ Γ v n u Θ Γ u n w Θ y : τ s[y ρi/x i] 1 i σ n t Θ Γ u i n v ρi : σ i 1 i σ Θ Γ s[ x u] n t[ y ρ : σ τ v] Θ Γ, x i : σ i u i n v i i 1 i k Θ Γ o..., x i u i,... n o..., x i v i,... o : σ 1 τ 1,..., σ k τ k τ Figure 5. Rules of n for n 1. References [1] P. Aczel. A general Church-Rosser theorem. Typescript, [2] F. Baader and T. Nipkow. Term Rewriting and All That. CUP, [3] G. Birkhoff. On the structure of abstract algebras. Proc. of the Cambridge Philosophical Society, 31: , [4] R. Clouston and A. Pitts. Nominal equational logic. ENTCS, 172: , [5] M. Fiore. Algebraic meta-theories and synthesis of equational logics. Research Programme, Available from mpf23/.. [6] M. Fiore. Semantic analysis of normalisation by evaluation for typed lambda calculus. In PPDP 2002, pages 26 37, [7] M. Fiore. Mathematical models of computational and combinatorial structures. In FOSSACS 2005, volume 3441 of LNCS, pages 25 46, [8] M. Fiore. A mathematical theory of substitution and its applications to syntax and semantics. Invited tutorial ICMS, Available from mpf23/. [9] M. Fiore. Second-order and dependently-sorted abstract syntax. In LICS 08, pages 57 68, [10] M. Fiore and C.-K. Hur. On the construction of free algebras for equational systems. TCS, 410: , [11] M. Fiore and C.-K. Hur. Term equational systems and logics. In MFPS XXIV, volume 218, pages , [12] M. Fiore, G. Plotkin, and D. Turi. Abstract syntax and variable binding. In LICS 99, pages , [13] J. Goguen and J. Meseguer. Completeness of many-sorted equational logic. Houston Journal of Mathematics, 11: , [14] M. Hamana. Free Σ-monoids: A higher-order syntax with metavariables. In APLAS 2004, LNCS 3202, pages , [15] C.-K. Hur. Categorical Equational Systems: Algebraic Models and Equational Reasoning. PhD thesis, Computer Laboratory, University of Cambridge, [16] G. Janelidze and G. Kelly. A note on actions of a monoidal category. Theory and Applications of Categories, 94:61 91, [17] J. Klop. Combinatory Reduction Systems. PhD thesis, Mathematical Centre Tracts 127, CWI, Amsterdam, [18] J. Klop, V. van Oostrom, and F. van Raamsdonk. Combinatory reduction systems: introduction and survey. TCS, 121: , [19] F. Lawvere. Functorial semantics of algebraic theories. Reprints in TAC, No. 5, pp , [20] M.J. Gabbay and A. Mathijssen. A formal calculus for informal equality with binding. In WoLLIC 07, [21] D. Pigozzi and A. Salibra. The abstract variable-binding calculus. Studia Logica, 55: , [22] G. Plotkin. An algebraic framework for logics and type theories. Invited talk ICMS, [23] A. Sangalli. On the structure and representation of clones. Algebra Universalis, 25: , [24] Y. Sun. A Framework for Binding Operators. PhD thesis, LFCS, The University of Edinburgh, [25] Y. Sun. An algebraic generalization of Frege structures binding algebras. TCS, 211: , [26] F. van Raamsdonk. Higher-order rewriting. In Term Rewriting Systems, pages ,

10 Θ Γ t Θ Γ s n+1 t Θ Γ r n+1 s Θ Γ s n+1 t Θ Γ t n+1 t Θ Γ t n+1 s Θ Γ r n+1 t Θ x : σ s n t Θ Γ s i n+1 t i : σ i 1 i σ Θ Γ s[s i /x i] 1 i σ n+1 t[t i /x i] 1 i σ Θ Γ, x i : σ i s i n+1 t i i 1 i k Θ Γ o..., x i s i,... n+1 o..., x i t i,... o : σ 1 τ 1,..., σ k τ k τ Figure 6. Rules of n+1 for n 1. Θ Γ t Θ Γ t t Θ Γ s t Θ Γ t s Θ Γ r s Θ Γ r t Θ Γ s t M 1 : [ σ 1 ]τ 1,..., M k : [ σ k ]τ k x : α l r E ρ : α β, Θ y : β, xj : σ j t j j 1 j k Θ y : β l[y ρi/x i] 1 i α {M j := x j t j } 1 j k r[y ρi/x i] 1 i α {M j := x j t j } 1 j k Θ x : σ s t Θ Γ s i t i : σ i 1 i σ Θ Γ s[s i /x i] 1 i σ t[t i /x i] 1 i σ Θ Γ, x i : σ i s i t i i 1 i k Θ Γ o x 1 s 1,..., x k s k o x1 t 1,..., x k t k o : σ1 τ 1,..., σ k τ k τ Figure 7. Rules of. M 1 : [ σ 1 ]τ 1,..., M k : [ σ k ]τ k x : α l r E ρ : α β, Θ y : β, xj : σ j t j j 1 j k Θ Γ s l : β l 1 l β Θ Γ l[y ρi/x i] 1 i α {M j := x j t j } 1 j k [s l /y l ] 1 l β r[y ρi/x i] 1 i α {M j := x j t j } 1 j k [s l /y l ] 1 l β Θ Γ s i Θ Γ M[..., s i,...] t i : σ i M[..., t i,...] 1 i n, M : [σ1,..., σ n ]τ Θ Θ Γ, x i : σ i s i t i i Θ Γ o..., x i s i,... o..., x i t i,... 1 i k, o : σ1 τ 1,..., σ k τ k τ Figure 8. Rules of. 10

11 A. Abstraction Every term Θ Γ t can be abstracted to yield a term Θ, Γ t where, for Γ = x 1 1,..., x n n, and Γ = X 1 : [ ]τ 1,..., X n : [ ]τ n t = t[ X1[ ] /x 1,..., Xn[ ] /x n]. Performing the operation on a set of equations E to obtain a set of abstracted equations Ê, we have that the following are equivalent: Θ Γ E s t, Θ, Γ E ŝ t, Θ Γ be s t, Θ, Γ be ŝ t. Example 9. An alternative equational presentation of the typed λ-calculus follows. β T : [σ]τ x : σ η f : σ => τ app abs zt[z], x T[x] abs xappf, x f : σ => τ B. Untyped λ-calculus models A model of the syntax of the untyped λ-calculus is given by an abstract clone see e.g. [23] for this concept A n n N, x n i A n 1 i n N, k A k A n A n s, t 1,..., t k k, n N s[t 1,..., t k ] together with natural families of operations A n+1 A n : t λt, A n 2 A n : s, t st such that, for all s, s A k and t 1,..., t k A n, ss [t 1,..., t k ] = s[t 1,..., t k ] s [t 1,..., t k ] and, for all s A n+1 and t A n, λs [t 1,..., t k ] = λs[t 1,..., t k, xn+1 n+1 ] where t = t[x n+1 1,..., x n+1 n ]. See [12]. A model satisfies β-conversion if β for all s A n+1 and t A n. λst = s[x n+1 1,..., x n+1 n, t] Traditional models of the λ-calculus fit our framework as follows. Every D D D in a cartesian closed category gives rise to a model satisfying β-conversion with clone D, D and operations D, D V = D, D D D, D, D, D 2 = D, D 2 D, D D D D, D. C. Conservativity We show that Second-Order Equational Logic is a conservative extension of First-Order Equational Logic. Extension. Every first-order signature can be regarded as a second-order signature, and every first-order term as the second-order term Γ t Γ t. It follows that, for a set of first-order equations E, if Γ s t is derivable in first-order equational logic, then Γ s t is derivable in second-order equational logic. We turn to establishing the converse. 10 Conservation. Since C, preserves limits, it follows that, for every first-order signature Ω, an Ω-algebra structure on C C T 1 i n C τ i C τ τ1,..., τ n τ in Ω yields an Ω-algebra structure 1 i n C, C τ i = C, 1 i n C τ i C, C τ on C, C Set F[T ] T. The Ω-algebra and monoid structures are compatible, and we thus obtain an Ω-model Ω C, C V C, C C, C C, C The interpretations of first-order terms are related as follows: 1 i n C, C τ i = C, 1 i n C τ i [[ Γ b bt ]] C,C C, [[Γ t ]] C C, C τ and we have that C = Γ s t iff C, C = Γ ŝ t. Thus, if A = Γ ŝ t for all Ω, Ê-models A Set F[T ] T, then C = Γ s t for all Ω, E-algebras C C T and the converse of 10 holds. 11

Second-Order Equational Logic

Second-Order Equational Logic Second-Order Equational Logic (Extended Abstract) Marcelo Fiore 1 and Chung-Kil Hur 2 1 Computer Laboratory, University of Cambridge 2 Laboratoire PPS, Université Paris 7 Abstract. We extend universal

More information

Second-Order Algebraic Theories

Second-Order Algebraic Theories Second-Order Algebraic Theories (Extended Abstract) Marcelo Fiore and Ola Mahmoud University of Cambridge, Computer Laboratory Abstract. Fiore and Hur [10] recently introduced a conservative extension

More information

Mathematical Synthesis of Equational Deduction Systems. Marcelo Fiore. Computer Laboratory University of Cambridge

Mathematical Synthesis of Equational Deduction Systems. Marcelo Fiore. Computer Laboratory University of Cambridge Mathematical Synthesis of Equational Deduction Systems Marcelo Fiore Computer Laboratory University of Cambridge TLCA 2009 3.VII.2009 Context concrete theories meta-theories Context concrete theories meta-theories

More information

Term Equational Systems and Logics

Term Equational Systems and Logics Term Equational Systems and Logics Extended Abstract Marcelo Fiore 1 Chung-Kil Hur 2,3 Computer Laboratory University of Cambridge Cambridge, UK Abstract We introduce an abstract general notion of system

More information

Categorical Equational Systems: Algebraic Models and Equational Reasoning

Categorical Equational Systems: Algebraic Models and Equational Reasoning Categorical Equational Systems: Algebraic Models and Equational Reasoning Chung-Kil Hur Churchill College University of Cambridge Computer Laboratory November 2009 This dissertation is submitted for the

More information

AN EQUATIONAL METALOGIC FOR MONADIC EQUATIONAL SYSTEMS

AN EQUATIONAL METALOGIC FOR MONADIC EQUATIONAL SYSTEMS Theory and Applications of Categories, Vol. 27, No. 18, 2013, pp. 464 492. AN EQUATIONAL METALOGIC FOR MONADIC EQUATIONAL SYSTEMS MARCELO FIORE Abstract. The paper presents algebraic and logical developments.

More information

Algebraic theories in the presence of binding operators, substitution, etc.

Algebraic theories in the presence of binding operators, substitution, etc. Algebraic theories in the presence of binding operators, substitution, etc. Chung Kil Hur Joint work with Marcelo Fiore Computer Laboratory University of Cambridge 20th March 2006 Overview First order

More information

On the Construction of Free Algebras for Equational Systems

On the Construction of Free Algebras for Equational Systems On the Construction of Free Algebras for Equational Systems Marcelo Fiore and Chung-Kil Hur 1 Computer Laboratory, University of Cambridge Abstract The purpose of this paper is threefold: to present a

More information

Universal Algebra for Termination of Higher-Order Rewriting. Makoto Hamana

Universal Algebra for Termination of Higher-Order Rewriting. Makoto Hamana Universal Algebra for Termination of Higher-Order Rewriting Makoto Hamana Department of Computer Science, Gunma University, Japan RTA 05 2005, April 1 Intro: First-Order Term Rewriting System (TRS) Terms

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

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

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

A categorical model for a quantum circuit description language

A categorical model for a quantum circuit description language A categorical model for a quantum circuit description language Francisco Rios (joint work with Peter Selinger) Department of Mathematics and Statistics Dalhousie University CT July 16th 22th, 2017 What

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

Programming Languages in String Diagrams. [ four ] Local stores. Paul-André Melliès. Oregon Summer School in Programming Languages June 2011

Programming Languages in String Diagrams. [ four ] Local stores. Paul-André Melliès. Oregon Summer School in Programming Languages June 2011 Programming Languages in String iagrams [ four ] Local stores Paul-André Melliès Oregon Summer School in Programming Languages June 2011 Finitary monads A monadic account of algebraic theories Algebraic

More information

A few bridges between operational and denotational semantics of programming languages

A few bridges between operational and denotational semantics of programming languages A few bridges between operational and denotational semantics of programming languages Soutenance d habilitation à diriger les recherches Tom Hirschowitz November 17, 2017 Hirschowitz Bridges between operational

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

Multiversal Polymorphic Algebraic Theories Syntax, Semantics, Translations, and Equational Logic

Multiversal Polymorphic Algebraic Theories Syntax, Semantics, Translations, and Equational Logic Multiversal Polymorphic Algebraic Theories Syntax, Semantics, Translations, and Equational Logic Marcelo Fiore Computer Laboratory, University of Cambridge Makoto Hamana Dept. of Computer Science, Gunma

More information

Notions of Computation Determine Monads

Notions of Computation Determine Monads Notions of Computation Determine Monads Gordon Plotkin and John Power Division of Informatics, University of Edinburgh, King s Buildings, Edinburgh EH9 3JZ, Scotland Abstract. We model notions of computation

More information

Equational reasoning for probabilistic programming Part II: Quantitative equational logic

Equational reasoning for probabilistic programming Part II: Quantitative equational logic Equational reasoning for probabilistic programming Part II: Quantitative equational logic Prakash Panangaden 1 1 School of Computer Science McGill University Probabilistic Programming Languages 29th May

More information

Quasi-Boolean Encodings and Conditionals in Algebraic Specification

Quasi-Boolean Encodings and Conditionals in Algebraic Specification Quasi-Boolean Encodings and Conditionals in Algebraic Specification Răzvan Diaconescu Institute of Mathematics Simion Stoilow of the Romanian Academy Abstract We develop a general study of the algebraic

More information

Uniform Schemata for Proof Rules

Uniform Schemata for Proof Rules Uniform Schemata for Proof Rules Ulrich Berger and Tie Hou Department of omputer Science, Swansea University, UK {u.berger,cshou}@swansea.ac.uk Abstract. Motivated by the desire to facilitate the implementation

More information

Monads Need Not Be Endofunctors

Monads Need Not Be Endofunctors Monads Need Not Be Endofunctors Thorsten Altenkirch, University of Nottingham James Chapman, Institute of Cybernetics, Tallinn Tarmo Uustalu, Institute of Cybernetics, Tallinn ScotCats, Edinburgh, 21 May

More information

Nominal Lawvere Theories: A Category Theoretic Account of Equational Theories with Names

Nominal Lawvere Theories: A Category Theoretic Account of Equational Theories with Names Nominal Lawvere Theories: A Category Theoretic Account of Equational Theories with Names Ranald Clouston 1 Logic and Computation Group, Research School of Computer Science, The Australian National University,

More information

Names and Symmetry in Computer Science

Names and Symmetry in Computer Science 1/27 Names and Symmetry in Computer Science Andrew Pitts Computer Laboratory LICS 2015 Tutorial 2/27 An introduction to nominal techniques motivated by Programming language semantics Automata theory Constructive

More information

Category Theory. Categories. Definition.

Category Theory. Categories. Definition. Category Theory Category theory is a general mathematical theory of structures, systems of structures and relationships between systems of structures. It provides a unifying and economic mathematical modeling

More information

CS522 - Programming Language Semantics

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

More information

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

Semantics and syntax of higher inductive types

Semantics and syntax of higher inductive types Semantics and syntax of higher inductive types Michael Shulman 1 Peter LeFanu Lumsdaine 2 1 University of San Diego 2 Stockholm University http://www.sandiego.edu/~shulman/papers/stthits.pdf March 20,

More information

A categorical view of computational effects

A categorical view of computational effects Emily Riehl Johns Hopkins University A categorical view of computational effects C mp se::conference 1. Functions, composition, and categories 2. Categories for computational effects (monads) 3. Categories

More information

Interpolation in Logics with Constructors

Interpolation in Logics with Constructors Interpolation in Logics with Constructors Daniel Găină Japan Advanced Institute of Science and Technology School of Information Science Abstract We present a generic method for establishing the interpolation

More information

Nominal Completion for Rewrite Systems with Binders

Nominal Completion for Rewrite Systems with Binders Nominal Completion for Rewrite Systems with Binders Maribel Fernández King s College London July 2012 Joint work with Albert Rubio Summary Motivations Nominal Rewriting Closed nominal rules Confluence

More information

How to combine diagrammatic logics

How to combine diagrammatic logics How to combine diagrammatic logics Dominique Duval To cite this version: Dominique Duval. How to combine diagrammatic logics. 2009. HAL Id: hal-00432330 https://hal.archives-ouvertes.fr/hal-00432330v2

More information

Streams and Coalgebra Lecture 2

Streams and Coalgebra Lecture 2 Streams and Coalgebra Lecture 2 Helle Hvid Hansen and Jan Rutten Radboud University Nijmegen & CWI Amsterdam Representing Streams II, Lorentz Center, Leiden, January 2014 Tutorial Overview Lecture 1 (Hansen):

More information

From syntax to semantics of Dependent Type Theories - Formalized

From syntax to semantics of Dependent Type Theories - Formalized RDP 2015, Jun. 30, 2015, WCMCS, Warsaw. From syntax to semantics of Dependent Type Theories - Formalized by Vladimir Voevodsky from the Institute for Advanced Study in Princeton, NJ. I will be speaking

More information

Gluing Nominal Theories

Gluing Nominal Theories École ormale Supérieure de Lyon Master d Informatique Fondamentale, 1 re année Gluing ominal Theories Florian Hatat with Roy L. Crole University of Leicester June August 2007 Contents 1 Introduction 2

More information

Sequent Combinators: A Hilbert System for the Lambda Calculus

Sequent Combinators: A Hilbert System for the Lambda Calculus Sequent Combinators: A Hilbert System for the Lambda Calculus Healfdene Goguen Department of Computer Science, University of Edinburgh The King s Buildings, Edinburgh, EH9 3JZ, United Kingdom Fax: (+44)

More information

Instances of computational effects: an algebraic perspective

Instances of computational effects: an algebraic perspective Instances of computational effects: an algebraic perspective Sam Staton Computer Laboratory, University of Cambridge, UK Abstract We investigate the connections between computational effects, algebraic

More information

Theoretical Computer Science

Theoretical Computer Science Theoretical Computer Science 433 (202) 20 42 Contents lists available at SciVerse ScienceDirect Theoretical Computer Science journal homepage: www.elsevier.com/locate/tcs An axiomatic approach to structuring

More information

The equivalence axiom and univalent models of type theory.

The equivalence axiom and univalent models of type theory. The equivalence axiom and univalent models of type theory. (Talk at CMU on February 4, 2010) By Vladimir Voevodsky Abstract I will show how to define, in any type system with dependent sums, products and

More information

A Note on Extensional PERs

A Note on Extensional PERs A Note on Extensional PERs W. P. Stekelenburg March 2, 2010 Abstract In the paper Extensional PERs by P. Freyd, P. Mulry, G. Rosolini and D. Scott, a category C of pointed complete extensional PERs and

More information

Local states in string diagrams

Local states in string diagrams Local states in string diagrams Paul-André Melliès Laboratoire Preuves, Programmes, Systèmes CNRS, Université Paris iderot Abstract. We establish that the local state monad introduced by Plotkin and Power

More information

Towards a general framework for metareasoning on HOAS encodings

Towards a general framework for metareasoning on HOAS encodings Towards a general framework for metareasoning on HOAS encodings 1 Project TOSCA TASK HOAS LF Slide 1 Towards a general framework for metareasoning on HOAS encodings Anna Bucalo, Martin Hofmann, Furio Honsell,

More information

Monads Need Not Be Endofunctors

Monads Need Not Be Endofunctors Monads Need Not Be Endofunctors Thorsten Altenkirch 1, James Chapman 2, and Tarmo Uustalu 2 1 School of Computer Science, University of Nottingham 2 Institute of Cybernetics, Tallinn University of Technology

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

MacLane s coherence theorem expressed as a word problem

MacLane s coherence theorem expressed as a word problem MacLane s coherence theorem expressed as a word problem Paul-André Melliès Preuves, Programmes, Systèmes CNRS UMR-7126, Université Paris 7 ÑÐÐ ÔÔ ºÙ ÙºÖ DRAFT In this draft, we reduce the coherence theorem

More information

Locally cartesian closed categories

Locally cartesian closed categories Locally cartesian closed categories Clive Newstead 80-814 Categorical Logic, Carnegie Mellon University Wednesday 1st March 2017 Abstract Cartesian closed categories provide a natural setting for the interpretation

More information

Relational semantics for a fragment of linear logic

Relational semantics for a fragment of linear logic Relational semantics for a fragment of linear logic Dion Coumans March 4, 2011 Abstract Relational semantics, given by Kripke frames, play an essential role in the study of modal and intuitionistic logic.

More information

Abstract Syntax and Variable Binding

Abstract Syntax and Variable Binding Abstract Syntax and Variable Binding (Extended Abstract) Marcelo Fiore COGS Univ. of Sussex Gordon Plotkin LFCS Univ. of Edinburgh Daniele Turi LFCS Univ. of Edinburgh Abstract We develop a theory of abstract

More information

Semantic Labelling for Proving Termination of Combinatory Reduction Systems. Makoto Hamana

Semantic Labelling for Proving Termination of Combinatory Reduction Systems. Makoto Hamana Semantic Labelling for Proving Termination of Combinatory Reduction Systems Makoto Hamana Department of Computer Science, Gunma University, Japan WFLP 09 June, 2009. 1 2 Intro: Termination Proof by RPO

More information

Category theory for computer science. Overall idea

Category theory for computer science. Overall idea Category theory for computer science generality abstraction convenience constructiveness Overall idea look at all objects exclusively through relationships between them capture relationships between objects

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

Algebra and local presentability: how algebraic are they? (A survey)

Algebra and local presentability: how algebraic are they? (A survey) Algebra and local presentability: how algebraic are they? (A survey) Jiří Adámek 1 and Jiří Rosický 2, 1 Department of Mathematics, Faculty of Electrical Engineering, Czech Technical University in Prague,

More information

COMMUTATIVE ALGEBRA LECTURE 1: SOME CATEGORY THEORY

COMMUTATIVE ALGEBRA LECTURE 1: SOME CATEGORY THEORY COMMUTATIVE ALGEBRA LECTURE 1: SOME CATEGORY THEORY VIVEK SHENDE A ring is a set R with two binary operations, an addition + and a multiplication. Always there should be an identity 0 for addition, an

More information

Completeness for algebraic theories of local state

Completeness for algebraic theories of local state Completeness for algebraic theories of local state Sam Staton Computer Laboratory, University of Cambridge Abstract. Every algebraic theory gives rise to a monad, and monads allow a meta-language which

More information

Mechanizing Metatheory in a Logical Framework

Mechanizing Metatheory in a Logical Framework Under consideration for publication in J. Functional Programming 1 Mechanizing Metatheory in a Logical Framework Robert Harper and Daniel R. Licata Carnegie Mellon University (e-mail: {rwh,drl}@cs.cmu.edu)

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

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

Bialgebraic Methods in Structural Operational Semantics

Bialgebraic Methods in Structural Operational Semantics SOS 2006 Preliminary Version Bialgebraic Methods in Structural Operational Semantics (Invited Talk) Bartek 1,2 Warsaw University, Edinburgh University Abstract Bialgebraic semantics, invented a decade

More information

An introduction to Yoneda structures

An introduction to Yoneda structures An introduction to Yoneda structures Paul-André Melliès CNRS, Université Paris Denis Diderot Groupe de travail Catégories supérieures, polygraphes et homotopie Paris 21 May 2010 1 Bibliography Ross Street

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

The Rewriting Calculus as a Combinatory Reduction System

The Rewriting Calculus as a Combinatory Reduction System The Rewriting Calculus as a Combinatory Reduction System Clara Bertolissi 1, Claude Kirchner 2 1 LIF-CMI, Université de Provence, Marseille, France 2 INRIA & LORIA, Nancy, France first.last@loria.fr, clara.bertolissi@lif.univ-mrs.fr

More information

Normalisation by Evaluation for Dependent Types

Normalisation by Evaluation for Dependent Types Normalisation by Evaluation for Dependent Types Ambrus Kaposi Eötvös Loránd University, Budapest, Hungary (j.w.w. Thorsten Altenkirch, University of Nottingham) FSCD, Porto 24 June 2016 Introduction Goal:

More information

About categorical semantics

About categorical semantics About categorical semantics Dominique Duval LJK, University of Grenoble October 15., 2010 Capp Café, LIG, University of Grenoble Outline Introduction Logics Effects Conclusion The issue Semantics of programming

More information

MONADS NEED NOT BE ENDOFUNCTORS

MONADS NEED NOT BE ENDOFUNCTORS MONADS NEED NOT BE ENDOFUNCTORS THORSTEN ALTENKIRCH, JAMES CHAPMAN, AND TARMO UUSTALU School of Computer Science, University of Nottingham, Jubilee Campus, Wollaton Road, Nottingham NG8 1BB, United Kingdom

More information

Translating Combinatory Reduction Systems into the Rewriting Calculus

Translating Combinatory Reduction Systems into the Rewriting Calculus Electronic Notes in Theoretical Computer Science 86 No. 2 (2003) URL: http://www.elsevier.nl/locate/entcs/volume86.html 17 pages Translating Combinatory Reduction Systems into the Rewriting Calculus Clara

More information

via Topos Theory Olivia Caramello University of Cambridge The unification of Mathematics via Topos Theory Olivia Caramello

via Topos Theory Olivia Caramello University of Cambridge The unification of Mathematics via Topos Theory Olivia Caramello in University of Cambridge 2 / 23 in in In this lecture, whenever I use the word topos, I really mean Grothendieck topos. Recall that a Grothendieck topos can be seen as: a generalized space a mathematical

More information

Categories, Proofs and Programs

Categories, Proofs and Programs Categories, Proofs and Programs Samson Abramsky and Nikos Tzevelekos Lecture 4: Curry-Howard Correspondence and Cartesian Closed Categories In A Nutshell Logic Computation 555555555555555555 5 Categories

More information

Monad Transformers as Monoid Transformers

Monad Transformers as Monoid Transformers Monad Transformers as Monoid Transformers Mauro Jaskelioff CIFASIS/Universidad Nacional de Rosario, Argentina Eugenio Moggi 1 DISI, Università di Genova, Italy Abstract The incremental approach to modular

More information

Elements of Category Theory

Elements of Category Theory Elements of Category Theory Robin Cockett Department of Computer Science University of Calgary Alberta, Canada robin@cpsc.ucalgary.ca Estonia, Feb. 2010 Functors and natural transformations Adjoints and

More information

Teooriaseminar. TTÜ Küberneetika Instituut. May 10, Categorical Models. for Two Intuitionistic Modal Logics. Wolfgang Jeltsch.

Teooriaseminar. TTÜ Küberneetika Instituut. May 10, Categorical Models. for Two Intuitionistic Modal Logics. Wolfgang Jeltsch. TTÜ Küberneetika Instituut Teooriaseminar May 10, 2012 1 2 3 4 1 2 3 4 Modal logics used to deal with things like possibility, belief, and time in this talk only time two new operators and : ϕ now and

More information

An Introduction to the Stolz-Teichner Program

An Introduction to the Stolz-Teichner Program Intro to STP 1/ 48 Field An Introduction to the Stolz-Teichner Program Australian National University October 20, 2012 Outline of Talk Field Smooth and Intro to STP 2/ 48 Field Field Motivating Principles

More information

Topos Theory. Lectures 21 and 22: Classifying toposes. Olivia Caramello. Topos Theory. Olivia Caramello. The notion of classifying topos

Topos Theory. Lectures 21 and 22: Classifying toposes. Olivia Caramello. Topos Theory. Olivia Caramello. The notion of classifying topos Lectures 21 and 22: toposes of 2 / 30 Toposes as mathematical universes of Recall that every Grothendieck topos E is an elementary topos. Thus, given the fact that arbitrary colimits exist in E, we can

More information

From parametric polymorphism to models of polymorphic FPC

From parametric polymorphism to models of polymorphic FPC Under consideration for publication in Math. Struct. in Comp. Science From parametric polymorphism to models of polymorphic FPC Rasmus Ejlers Møgelberg IT University of Copenhagen Rued Langgaards Vej 7

More information

Order Sorted Algebra. Japan Advanced Institute of Science and Technology. March 8, 2008

Order Sorted Algebra. Japan Advanced Institute of Science and Technology. March 8, 2008 Order Sorted Algebra Daniel Găină Japan Advanced Institute of Science and Technology March 8, 2008 Introduction There are many examples where all items of one sort are necessarily also items of some other

More information

Streams and Coalgebra Lecture 1

Streams and Coalgebra Lecture 1 Streams and Coalgebra Lecture 1 Helle Hvid Hansen and Jan Rutten Radboud University Nijmegen & CWI Amsterdam Representing Streams II, Lorentz Center, Leiden, January 2014 Tutorial Overview Lecture 1 (Hansen):

More information

Towards a Flowchart Diagrammatic Language for Monad-based Semantics

Towards a Flowchart Diagrammatic Language for Monad-based Semantics Towards a Flowchart Diagrammatic Language or Monad-based Semantics Julian Jakob Friedrich-Alexander-Universität Erlangen-Nürnberg julian.jakob@au.de 21.06.2016 Introductory Examples 1 2 + 3 3 9 36 4 while

More information

Reconsidering MacLane. Peter M. Hines

Reconsidering MacLane. Peter M. Hines Reconsidering MacLane Coherence for associativity in infinitary and untyped settings Peter M. Hines Oxford March 2013 Topic of the talk: Pure category theory... for its own sake. This talk is about the

More information

A unifying model of variables and names

A unifying model of variables and names A unifying model of variables and names Marino Miculan 1 Kidane Yemane 2 1 Dept. of Mathematics and Computing Science, University of Udine Via delle Scienze 206, I-33100 Udine, Italy. miculan@dimi.uniud.it

More information

Automated Synthesis of Tableau Calculi

Automated Synthesis of Tableau Calculi Automated Synthesis of Tableau Calculi Renate A. Schmidt 1 and Dmitry Tishkovsky 1 School of Computer Science, The University of Manchester Abstract This paper presents a method for synthesising sound

More information

Informatics and Mathematical Modelling, Techn. University of Denmark, Lyngby

Informatics and Mathematical Modelling, Techn. University of Denmark, Lyngby Computing and Informatics, Vol. 20, 2001,????, V 2003-Sep-4 Casl THE COMMON ALGEBRAIC SPECIFICATION LANGUAGE: SEMANTICS AND PROOF THEORY Till Mossakowski Department of Computer Science, University of Bremen,

More information

Semantic Labelling for Proving Termination of Combinatory Reduction Systems

Semantic Labelling for Proving Termination of Combinatory Reduction Systems 62 Makoto Hamana Semantic Labelling for Proving Termination of Combinatory Reduction Systems Makoto Hamana Department of Computer Science, Gunma University, Japan hamana@cs.gunma-u.ac.jp Abstract. We give

More information

Higher toposes Internal logic Modalities Sub- -toposes Formalization. Modalities in HoTT. Egbert Rijke, Mike Shulman, Bas Spitters 1706.

Higher toposes Internal logic Modalities Sub- -toposes Formalization. Modalities in HoTT. Egbert Rijke, Mike Shulman, Bas Spitters 1706. Modalities in HoTT Egbert Rijke, Mike Shulman, Bas Spitters 1706.07526 Outline 1 Higher toposes 2 Internal logic 3 Modalities 4 Sub- -toposes 5 Formalization Two generalizations of Sets Groupoids: To keep

More information

Justifying Algorithms for βη-conversion

Justifying Algorithms for βη-conversion Justifying Algorithms for βη-conversion Healfdene Goguen AT&T Labs, 180 Park Ave., Florham Park NJ 07932 USA hhg@att.com. Abstract. Deciding the typing judgement of type theories with dependent types such

More information

Matching Logic: Syntax and Semantics

Matching Logic: Syntax and Semantics Matching Logic: Syntax and Semantics Grigore Roșu 1 and Traian Florin Șerbănuță 2 1 University of Illinois at Urbana-Champaign, USA grosu@illinois.edu 2 University of Bucharest, Romania traian.serbanuta@unibuc.ro

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

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

Derived Algebraic Geometry IX: Closed Immersions

Derived Algebraic Geometry IX: Closed Immersions Derived Algebraic Geometry I: Closed Immersions November 5, 2011 Contents 1 Unramified Pregeometries and Closed Immersions 4 2 Resolutions of T-Structures 7 3 The Proof of Proposition 1.0.10 14 4 Closed

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

NOTES ON ADJUNCTIONS, MONADS AND LAWVERE THEORIES. 1. Adjunctions

NOTES ON ADJUNCTIONS, MONADS AND LAWVERE THEORIES. 1. Adjunctions NOTES ON ADJUNCTIONS, MONADS AND LAWVERE THEORIES FILIP BÁR 1. Adjunctions 1.1. Universal constructions and adjunctions. Definition 1.1 (Adjunction). A pair of functors U : C D and F : D C form an adjoint

More information

Nominal Equational Logic

Nominal Equational Logic Electronic Notes in Theoretical Computer Science 172 (2007) 223 257 www.elsevier.com/locate/entcs Nominal Equational Logic Ranald A. Clouston 1 Andrew M. Pitts 2 Computer Laboratory, University of Cambridge,

More information

A Behavioural Model for Klop s Calculus

A Behavioural Model for Klop s Calculus Replace this file with prentcsmacro.sty for your meeting, or with entcsmacro.sty for your meeting. Both can be found at the ENTCS Macro Home Page. A Behavioural Model for Klop s Calculus Mariangiola Dezani-Ciancaglini

More information

Elementary (ha-ha) Aspects of Topos Theory

Elementary (ha-ha) Aspects of Topos Theory Elementary (ha-ha) Aspects of Topos Theory Matt Booth June 3, 2016 Contents 1 Sheaves on topological spaces 1 1.1 Presheaves on spaces......................... 1 1.2 Digression on pointless topology..................

More information

Abstracting away from cell complexes

Abstracting away from cell complexes Abstracting away from cell complexes Michael Shulman 1 Peter LeFanu Lumsdaine 2 1 University of San Diego 2 Stockholm University March 12, 2016 Replacing big messy cell complexes with smaller and simpler

More information

Topology in Denotational Semantics

Topology in Denotational Semantics Journées Topologie et Informatique Thomas Ehrhard Preuves, Programmes et Systèmes (PPS) Université Paris Diderot - Paris 7 and CNRS March 21, 2013 What is denotational semantics? The usual stateful approach

More information

a-logic with arrows Murdoch J. Gabbay 1 Michael J. Gabbay 2 1 Introduction

a-logic with arrows Murdoch J. Gabbay 1 Michael J. Gabbay 2 1 Introduction a-logic with arrows Murdoch J. Gabbay 1 Michael J. Gabbay 2 Abstract We present an extension of first-order predicate logic with a novel predicate at t meaning intuitively this term is a variable symbol.

More information

Normalisation by evaluation

Normalisation by evaluation Normalisation by evaluation Sam Lindley Laboratory for Foundations of Computer Science The University of Edinburgh Sam.Lindley@ed.ac.uk August 11th, 2016 Normalisation and embedded domain specific languages

More information

Equational Logic. Chapter Syntax Terms and Term Algebras

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

More information

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

Completeness of Star-Continuity

Completeness of Star-Continuity Introduction to Kleene Algebra Lecture 5 CS786 Spring 2004 February 9, 2004 Completeness of Star-Continuity We argued in the previous lecture that the equational theory of each of the following classes

More information