Gluing Nominal Theories

Size: px
Start display at page:

Download "Gluing Nominal Theories"

Transcription

1 É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

2 Contents 1 Introduction Categorical type theory Working with α-equivalence ominal algebra and sets ominal algebra Permutation actions ominal syntax Freshness contexts Equational theory α-equivalence quantifier Finitely supported objects Definition of the -quantifier ominal sets λ-calculus as a nominal theory Simply-typed λ-calculus Extensions Other approaches Conservative extensions and gluing constructions Gluing construction Freely generated category Proving conservative extensions Categorical interpretation of conservative extensions Gluing theories Proving conservative extensions of nominal theories Categorical semantics Categorical structure Interpretation of nominal terms Freshness contexts and equations About substitution Interpreting axioms Conclusion 19 Bibliography 20 1

3 Chapter 1 Introduction 1.1 Categorical type theory It is a common fact that there is an exact correspondence between some equational theories and categorical structures: given a sorted equational theory, for example simply-typed λ-calculus, one can interpret types γ as objects γ of a category C with some structure, terms-in-context Γ M : γ as morphisms of C, if x : γ M : δ and θ : γ are two terms, interpreted by two morphisms m : Γ and n : Θ Γ, then the capture-avoiding substitution θ M[x ] : δ is actually interpreted by the composition m n : Θ Γ, given a set of axioms, which have the form Γ M = : γ, one can build an equational theory over terms, and equality between two terms is equivalent to equality between morphisms. For example, one can interpret λ-calculus with finite products in a Cartesian closed category: the product of two types γ γ is interpreted by the product γ γ in the category, the type γ γ is interpreted by the exponential γ γ, a term-in-context M 1 : γ 1,..., M n : γ n M : γ is interpreted by a morphism n i=1 γ i γ, one can see morphisms in the category as proofs γ 1,..., γ n δ 1,..., δ m of all goals δ i from the hypotheses γ j. The previous points show that we in fact only need a model M : T h C, which is a map from the ground constructions of T h to objects in C: this model can then be inductively extended to the map, which interprets types and terms of T h in C. There exists a particular, necessarily unique, category noted Cl(T h), and called the classifying category of T h, such that any model M : T h C factors through the model T h Cl(T h) via a functor F : T h > Cl(T h) M > C Therefore, working on models of T h to a category amounts to a problem over Cartesian closed functors between Cl(T h) and C. F 2

4 The classifying category allows us to explicit the exact correspondence between theories and categories: to every theory T h we can associate a category Cl(T h), and conversely, any Cartesian closed category is the classifying category of some theory. This can be summarized by the following diagram: T h > Cl(T h) T h C < These constructions are mutually inverse in the following sense: given a category C, Cl(T h C ) and C are isomorphic, and conversely, T h and T h Cl(T h) are two equivalent theories (see [12, Remark 4.14]). Interpreting equational theories in a categorical way allows us to use all categorical constructions such as gluing constructions in this report in order to prove results about theories: we will for example see in 3 that proving a conservative extension result on equational theories is equivalent to finding a full and faithful functor between their classifying theories. 1.2 Working with α-equivalence We have seen in the previous section that α-equivalence and capture-avoiding substitution are nicely handled using composition of morphisms inside a category: while this construction is certainly elegant, it still suffers from the intrinsic complexity of this substitution. Moreover, in a language containing binders, α-equivalence is often dealt with very informally, especially when defining recursive functions over terms, up to α-equivalence: these functions are usually built from partial functions whose domain is the language without α-equivalence, and only become total on α-equivalent classes. For example, while defining the capture-avoiding substitution in λ-calculus, one usually encounters the following rule: a fv(m) (λa.)[u M] = λa.[u M] ominal sets [7, 11] and nominal algebra [6] use a different approach, which relies on permutations of variables instead of capture-avoiding substitution, along with a notion of finite support, to actually capture the meaning of binders. This permutation-based model has many good properties, which are actually linked with the bijective character of permutations this allows in particular to define a recursion scheme up to α-equivalence. The work on nominal sets applied to syntax with binders is quite recent, and the goals of this training period were to try and see whether we could interpret nominal equational theories in a categorical way, then see if the gluing construction could be adapted to a nominal setting in order to prove conservative extension results. This report will first recall the first definitions and results about nominal theories, then explain the ideas involved with gluing constructions, and finally show the main ideas we had during this training period in order to glue nominal theories, as well as the questions which still remain open. C 3

5 Chapter 2 ominal algebra and sets 2.1 ominal algebra Languages with binding operations often have to cope with a notion of capture-avoiding substitution, which in turn involves the definition of free variables and α-equivalence. While these notions are well-known for common languages, such as λ-calculus, π-calculus or first-order logic, one usually deals with them in a suitable informal way like implicitly assuming the Barendregt convention. Extending those languages with other binders, such as a let-rec construction in λ-calculus, implies redefining substitution and α-equivalence to take them into account. In this section, we describe nominal syntax which aims at providing a general framework for working with binders, and nominal algebra, which is a theory of equality over nominal terms. Our presentation uses the same pattern as in [2, 12]. In order to define nominal syntax, we will follow the approach of [6], using Church-style sorts: Church-style terms are indeed closer to the categorical structure given in section than Curry-style Permutation actions An important idea which lies behind nominal algebras are permutation actions on sets: let A be a countably infinite set, and P the set of permutations over A i.e. bijections π : A A such that the set {a A π(a) a} is finite. A permutation action on a set X is a map : P X X such that id A = id X : X X, and preserves the composition: π (π ) = (π π ) For example, the set A is endowed with an action given by functional application: π a = π(a) In the remainder, we will often assume that some sets are endowed with an action, by simply using the notation ominal syntax A nominal signature is specified by: a set AS of atomic sorts and a set Σ of base sorts, also called data types. The nominal sorts τ are generated by the grammar: τ ::= Σ AS [AS]τ a collection of term formers, each of which has an associated arity ρ, which is a pair formed by: 4

6 a finite, possibly empty, list of input sorts (τ 1,..., τ n ), where each τ i is a nominal sort, an output nominal sort τ, We will write f : (τ 1,..., τ n )τ to say that f is a term-former of arity ((τ 1,..., τ n ), τ). A nominal signature gives rise to nominal terms, provided that we fix: a countably infinite set A of atoms, along with a sorting function A AS, which assigns an atomic sort to each atom: we require that for every atomic sort α in AS, there is a countably infinite set of atoms of sort α. When α is the sort of an atom a, we will write a α, or simply drop the subscript when the sort can be explicitly guessed from the context, a countably infinite set of unknowns endowed with a permutation action, such that each unknown has a nominal sort τ. Here again, we assume that there is a countably infinite set of unknowns of sort τ, for each τ. We will denote sorted unknowns by X τ, Y τ, Z τ, or more simply X, Y, Z. Then, raw nominal terms which are not necessarily well-typed are defined by the following grammar, where P is a set of permutations of atoms in A: M ::= A P X τ f(m 1,..., M n ) [A]M One should understand the previous definition with these ideas in mind: unknowns X are placeholders, on which we can perform a (possibly capturing) substitution: they behave like any nominal term, but do not carry any explicit meaning, on the other hand, atoms act as variables which can be bound by the abstraction [A]M: for instance, if M is a nominal term, then [a]m is the nominal term where all free occurrences of a in M are bound by [a], a term-former f can be thought of as a function which takes n nominal terms, and whose result is also a nominal term: we will use term-formers to embed common theories such as λ-calculus in a nominal algebra (see 2.3.1). One should note that term-formers cannot bind variables: binding can only occur when using the bracket construction [ ]. This also means that binding is disjoint from substitution, since the former can only occurs on atoms, while the latter occurs on unknowns. From now on, we should restrict our attention to well-sorted terms. These are the terms which satisfy a typing judgement defined by the usual rules: M : τ a α : α X τ : τ [a α ]M : [α]τ M i : τ i, 1 i n f : (τ 1,..., τ n )τ f(m 1,..., M n ) : τ The permutation action on atoms can be extended by induction on the syntax of nominal terms: π a = π(a) (2.1) π f(t 1,..., t n ) = f(π t 1,..., π t n ) (2.2) π [a]t = [π a]π t (2.3) If we allow π to be any permutation of atoms, then a term π M may not be necessarily welltyped even if M is well-typed (think of a term f(a α, b α ) where f : (α, α)β, and the transposition (b α, c γ ) with α γ: then f(a α, c γ ) is not well-typed). The simplest way to ensure that the permutation action preserves typing judgements is to allow only permutations which preserve the sort of atoms, that is to say: a α A, π(a α ) : α So far we can only deal with an equality over terms which is purely syntactical: in particular, there is no equality up to α-equivalence, which means for example that [a]a [b]b as soon as a b. α-equivalence over terms will rather be a theorem in a nominal algebra (see 2.1.4). 5

7 2.1.3 Freshness contexts When dealing with α-equivalence or substitution in a language with binders, it is common to have preconditions involving the set of free variables of a term. For example, α-equivalence satisfies the following assertion: b fv(m) λa.m α λb.m[a b] We introduce in this section the notion of freshness assertion, which aims at expressing the assertions b fv(m) in the nominal setting. A freshness assertion is written a#m, where a is an atom and M a term: when M is an unknown X, we say that a#x is primitive. A freshness context is a finite list = a 1 #X 1,..., a n #X n of primitive freshness assertions. Then we can define freshness judgements, which we will write a#m, according to the following rules. a b a A a#m a#b a#[a]m a#[b]m π P π 1 (a)#x a#π X a#m 1... a#m n a#f(m 1,..., M n ) a#x a#x The definition we have just given of the freshness judgements is easily seen to be equivalent to the rules for computing the set fv(m) of free variables of a term M: we will however see in 2.2 that the fresh relation # can be defined in a more general way using the -quantifier Equational theory We now define equality judgements, which are judgements of the form M =, where is a freshness context, and M and are two nominal terms of the same sort. The equality is a congruence, that is to say an equivalence relation which is preserved by the language constructions according to the following rules. M = [a]m = [a] (congabs) M 1 = 1... M n = n (congf) f(m 1,..., M n ) = f( 1,..., n ) A nominal theory T is specified by a set of equality judgements, which we call axioms: from these theory we can derive the theorems of our nominal algebra, using the above rules, plus two new rules which allow us to prove theorems using a kind of instantiation of axioms. Formally, we call substitution a partial, sort-preserving, map σ from unknowns to terms, so that the typing judgement σ(x τ )τ holds. Let us define a substitution action, written tσ for a term M and a substitution σ, by induction on nominal terms, which is actually a capturing substitution: (π X)σ = π σ(x) aσ = a ([a]m)σ = [a](mσ) f(m 1,..., M n )σ = f(m 1 σ,..., M n σ) When using axioms for proving equalities, one may also want to permute the atoms which may appear in an axiom: this should only be needed in inference rules, and is a meta-level action of a 6

8 permutation π on a term M, rather than an actual new syntactic construction. We write M π for this action. (π X) π = π π π 1 X a π = π(a) ([a]m) π = [a π ]M π f(m 1,..., M n ) π = f(m π 1,..., M π n ) In 2.1.2, we required that for each sort, there exists a countably infinite set of atoms of this sort: this implies that for each term, we may always find a fresh atom for this term. We can now state the last inference rules of our nominal algebra: a#x 1,..., a#x n, M = a, M, (fresh) M = M = T π σ (axiom) π σ M π σ = π σ The first rule allows us to add a new atom in a derivation, which is fresh in a chosen list of atoms X 1,..., X n, while the second rule can be seen as an instantiation of an axiom α-equivalence Since α-equivalence is related only to the renaming of bound variables, i.e. atoms, we may define it using a transposition of fresh atoms on a term: a#x, b#x X = (b a) X (2.4) A detailed comparison between the use of textual substitution, capture-avoiding substitution and transposition for defining α-equivalence can be found in [7, Section 2]: we will only mention here the argument for proving that (2.4) actually defines α-equivalence. Let α denote the usual α-equivalence: it is the least congruence such that [a]m α [b]m[a b]. The action of (b a) preserves α, which implies that two nominal terms which are provably equal are α-equivalent. On the other hand, = is a congruence according to section 2.1.4, and when b does not occur in M, then (b a) M = M[a b] is provable: therefore, by (2.4) we have [a]m = (b a) [a]m, the right-hand side being equal by definition to [b](b a) M. This ensures that our theory is the actual α-equivalence. The freshness assertions and the axiom (2.4) define [ ] as a binder, which we may use much in the same way as with Higher Order Abstract Syntax when embedding a theory see for example [5] and section 2.4. Let us illustrate this fact with λ-calculus: we define a nominal signature which has only one base sort T, and one atomic sort A A represents here either the set of atoms or their sort. Our language has three term-formers: var : (A)T which casts an atom into an actual term of sort T, λ whose sort is ([A]T)T, app whose sort is (T, T)T. It is easy to check that there is bijection between λ-calculus whose variables range over A and the subset of nominal terms whose sort is T. 7

9 2.2 -quantifier In the previous section, we defined freshness assertions using inference rules: while this approach is sufficient to work with a nominal algebra, we will show here a more general idea, involving the (new) quantifier. This quantifier allows us to define the class of nominal sets, which in turn gives rise to a natural interpretation of nominal terms. The -quantifier will also motivate the constructions of section 4.1. ominal sets can be defined equivalently as a sub-class of the Zermelo-Fraenkel theory, or as the sets in the FM-set theory which is an axiomatisation of the Fraenkel and Mostowski permutation model. For the latter, the reader can see [7] Finitely supported objects Using the same notation as in section 2.1.5, let us consider a permutation action over a set X. A support of an element x X is a subset A A, such that: π P, ( a A, π(a) = a) π x = x In other words, we may say that all permutations which fix the atoms of A also fix x. In the case of nominal terms with the usual permutation action, the set of atoms which appear, as bound or not, in a term is a support of this term. An element x X is finitely supported if one of its supports is a finite set, and it is a well-known fact, albeit not trivial, that such an element admits a least supporting set (see [7, Proposition 3.4]), which is explicitly given by: Definition of the supp(x) = {a A {b A (a b) x x} is infinite} -quantifier If we rephrase the definition of a finite support, x is finitely supported if we may swap all atoms, except finitely many of them, without modifying x. The quantifier captures this notion of validity for almost all atoms: let φ(a) be a proposition involving the atom a, and say that a.φ(a) holds if and only if the set {b A φ(b)} is finite. The finite support of a term can therefore be defined as the set: supp(x) = {a A b.(b a) x = x} Let s have a closer look at the predicate b.(b a) x = x. It holds if and only if the set {b A (b a) x x} is finite: this means that a is fresh in x, since we can swap it with almost anything without changing x. That s why a freshness assertion can be redefined with the quantifier, as: a#x b.(b a) x = x Since the set of atoms A is infinite: we will certainly find a fresh atom for any given finitely supported object: an existential quantifier, is seen here as yet, any other atom out of the support would have also been acceptable as a fresh atom: acts here as a universal quantifier. A more detailed account of this duality can be found in [13, Section 6]. 8

10 2.2.3 ominal sets Let s now define the finite-support property of an object x only with the supported if and only if: a. b.(b a) x = x holds, which can be rewritten: a.a#x -quantifier: x is finitely Definition 1 (ominal set). A nominal set is a set X equipped with a permutation action over atoms in A, and such that every element of X is finitely supported. If X and Y are two nominal sets, the set X Y inherits a permutation action defined in a point-wise way and is also nominal. A more interesting set is the set of functions X Y, when it is endowed with the action: π f : X Y x π f(π 1 x) In the case when π f = f, we say that f is equivariant. This is equivalent to saying that: x X, π f(x) = f(π x) Equivariant functions play a central role when building an interpretation of nominal terms: let Sch be the category whose objects are nominal sets, and morphisms are the equivariant functions between those sets. This category is actually a Boolean topos, known as the Schanuel topos [7], and one may interpret nominal terms in this topos with morphism (see [6, Section 3]). 2.3 λ-calculus as a nominal theory Simply-typed λ-calculus We can define simply-typed λ-calculus, Church-style, terms as nominal terms by using the following signature. ominal base sorts Let be some countable set of ground data types, then the nominal base sorts δ recall that the base sorts will in turn give rise to the nominal sorts are generated by: δ := δ δ Atomic sorts For each base sort τ, we have an atomic sort A τ. Term-formers We proceed in the same was as for untyped λ-calculus, except that the termformers now carry explicit typing annotations: for each δ, we define a variable-casting function var δ : (A δ )δ, for each δ and δ, λ δ,δ : ([A δ ]δ )δ δ, for each δ and δ, app δ,δ : (δ δ, δ)δ We may use the following abbreviations when the type subscripts can be found from the context: a will stand for var δ a, λa.m for λ δ,δ ([a]m), and M for app δ,δ (M, ). We can prove that there is a bijection between the nominal terms whose sort is one of the base sort i.e. whose sort is not of the form [A ] and classes of α-equivalent λ-terms: an elegant way to write this bijection up to α-equivalence is described in [11, Theorem 5.1] and [14], which give a recursion principle on α-equivalence classes. 9

11 2.3.2 Extensions The nominal algebra generated by the signature of λ-calculus only contains equality of terms up to α-equivalence: in this section, we show a way of adding β-reduction using an explicit substitution. We also show more complicated constructions, namely let constructions, and fixpoint objects. They are introduced here in order to have the required machinery for our work on conservative extensions in 4, just like those extensions have been proved conservative for λ-calculus in [3]. Substitution Term-formers The theory of capture-avoiding substitution adds a collection of term-formers sub δ : ([A δ ]τ, δ)τ. We will use the common notation t[a ] instead of sub δ ([a]m, ). Equations f(x 1,..., X n )[a Y ] = f(x 1 [a Y ],..., X n [a Y ]) (2.5) b#y ([b]x)[a Y ] = [b](x[a Y ]) (2.6) var(a)[a Y ] = Y (2.7) a#x X[a Y ] = X (2.8) b#x X[a var(b)] = (b a) X (2.9) We have used an explicit substitution, which does appear as a new node when looking at abstract syntax trees: this extension is a first example of a conservative extension, which we will see in a more general way in chapters 3 and 4. Let s use the symbol for judgements in the theory without substitution, and sub for judgements which involve the substitution term-former and axioms. Substitution being a conservative extension of λ-calculus means that for any well-typed term sub M : τ, we may find a term : τ in the theory without substitution, which is provably equal to M: sub M = sub : τ Moreover, given any other term such that = : τ, then is also provably equal to M. In other words, we can say that this extension transforms the base language into a better language, yet it does not increase the expressive power since higher terms involving substitution are still provably equal to ground terms. While this conservative result is well-known for λ-calculus, our purpose here will be to use in 4 the categorical gluing technique described in 3. Let-theory Sorts For each nominal sort τ, define a sort T τ: we may think of T τ as the sort of computations of values of sort τ. Term-formers val δ : (δ)t δ let δ,δ : (T δ, [A δ ]T δ )T δ These term-formers correspond to the following typing assertions of a let-theory [3]: Γ M : δ Γ E : T δ Γ, x : δ F (x) : T δ Γ Val(M) : T δ Γ Let(E, F ) : T δ 10

12 Equations The following equations are exactly the same as in [3], adapted to the nominal theory. In particular, one should note that the equations in [3] are expressed in a higher-order setting, whereas here, in equation (2.12), we need to explicitly exhibit a fresh atom u to prevent captures. Fixpoint object let(val(m), [a]f ) = F [a M] (2.10) let(e, [u]val(u)) = E (2.11) u#g let(let(e, [u]f ), G) = let(e, [u]let(f, G)) (2.12) ow that we have define let-theories, we may extend them with a fixpoint object, in merely the same way as in [3]. Sorts Let fix be a new base sort, which therefore gives rise to the atomic sort A fix, and the let-sort T fix. Term-formers ω is a global element, of arity ()T fix, σ : (T fix)fix, for each sort δ, it δ : ([A T δ ]δ, fix)δ. Equations ω = val(σ(ω)) (2.13) X = val(σ(e)) E = ω (2.14) G[n σ(e)] = F [n let(e, [n]val(g))] G[n ] = it([n ]F, ) (2.15) it([n]f, σ(e)) = F [a let(e, [n]val(it(f, n)))] (2.16) 2.4 Other approaches We have already mentioned the traditional approach for dealing with binders, which has two main drawbacks: if a theory needs to be extended with new binders one has to redefine the α-equivalence, and the complexity of capture-avoiding substitution makes it difficult to define functions on terms up-to α-equivalence. Another common approach is to work with Higher Order Abstract Syntax (HOAS), where terms are interpreted as objects in the meta-theory functions of the language become actual functions in the meta-theory, and so on. Hybrid [5], for example, uses the native α-equivalence of Isabelle/HOL for modelling λ-calculus: one does not have any more to deal explicitly with α- equivalence, since the theorem prover dynamically renames variables to avoid any capture. This approach however can make it difficult to write an induction principle over abstract syntax. 11

13 Chapter 3 Conservative extensions and gluing constructions In this part, we show the main ideas behind the gluing constructions used for proving conservative extensions of a equational theory: one of the objective of the training period was to adapt the gluing construction to a nominal setting. Therefore, we will not show all details of the proofs, which would not be relevant here, but rather emphasize the main steps of the conservative extension proof, which may hopefully be the same when adapted to nominal theories. 3.1 Gluing construction We recall here the gluing construction presented in [2, 3]. Let C and D be two categories, where C is Cartesian closed and has all pullbacks, and Γ : D C a product-preserving functor. The comma category GL(Γ) = (C Γ) is the category whose: objects are morphisms f : C ΓD of C, morphisms are pairs (g : C C, h : D D ) such that the following diagram commutes: C g > C f f Γh ΓD > ΓD Let us also mention the obvious projection functor π 2 : GL(Γ) D, which will play a key role in the conservative extension proof. It is a well known fact, albeit not trivial to prove, that GL(Γ), like C, is Cartesian closed. Also, when D is endowed with some structure then π 2 often preserves that structure it is the case when D has products, exponentials [2], or a let-structure [3]. 3.2 Freely generated category Given a structure on a category we do not explicit this structure, as this construction can be adapted to many different cases, and a functor F between two categories with that structure, we assume that we can define a property saying that F preserves that structure: this property can be for example one of the standard notions of product, limit preserving functor. We will say that those categories are struc-categories, and F is a struc-preserving functor. 12

14 Definition 2 (Freely generated category). Let C be a category with finite products: we say that a category FC is freely generated from C when FC is a struc-category, and there exists a product preserving functor I : C FC such that: for any struc-category D, every product preserving functor F : C D factors through I, i.e. there exists a struc-preserving functor F such that this diagram commutes up to a natural isomorphism φ : F I = F : C F > D > I F > FC F is unique, that is to say, if there exists another functor F satisfying the same property, with φ : F I = F, then φ 1 φ is a natural isomorphism F = F. When T h is an algebraic theory (corresponding to a category with finite products), and T h is the λ -theory generated from T h (see [2]), then the classifying category Cl(T h ) is freely generated from Cl(T h): the structure involved here is the Cartesian closure. 3.3 Proving conservative extensions Categorical interpretation of conservative extensions Definition 3 (Conservative extension). Let T h and T h be two equational theories, and write T h and T h for judgements in each theory. T h is a conservative extension of T h if and only if: for every term 1 : γ 1,..., n : γ n T h M : γ, where γ and all γ i are types in T h, then M is provably equal, in T h, to a term T h : γ, when T h : γ is also equal to M, then one can prove that T h =. This definition can be summarized with the following diagram: Γ T h M : γ T h ============= T h ============= T h T h : γ =========== T h : γ We can reformulate the previous definition using only categorical notions: let us write C for the classifying category Cl(T h), D = Cl(T h ), and T h for the function which associates an object in C to each type in T h, and a morphism to each term, and T h for the corresponding function for T h. In order to prove that T h is a conservative extension of T h, it is enough to find a full and faithful functor I : C D which preserves the interpretation of types, that is to say, for every type γ of T h: γ T h = I γ T h A term Γ T h M : γ indeed gives rise to a morphism I Γ T h m > I γ T h, and since I is full, we can find a morphism n : Γ T h γ T h in C such that m = In. The morphism n corresponds to a term in T h, and the previous equality on morphisms implies that is provably equal to M 13

15 in T h. Furthermore, since I is faithful, if there exists another n such that m = In = In, then, in C, n = n which is equivalent to an equality over terms T h =. One should note that we have implicitly used the hypothesis that C and D were the classifying categories of T h and T h, since this ensures that any morphism n is actually the interpretation of a term, and that the equality is complete meaning that n = n if and only if = Gluing theories Using the previous interpretation of a conservative extension result, the main difficulty now is to prove the existence of a functor I : Cl(T h) Cl(T h ), which is full and faithful. 1. For λ or let-theories, one can prove that Cl(T h ) is the freely generated category from Cl(T h), via the obvious functor I = T h T h. 2. Find a category G and a product preserving functor J : C G, which we can factorize in the following way: J C > G I There are some reasons why a category GL(Γ) is a good choice for G: if Γ is a struc-preserving functor between FC and another struc-category, then GL(Γ) will be a struc-category, and the previous factorization can in fact be given by the struc-preserving functor π 2. The choice of the functors Γ and J clearly depends on the underlying theories: for let-theories, we can choose for example Γ = Set I Y : FC Set FCop Set Cop, where Y is the Yoneda embedding. 3. It follows that the following diagram commutes up to natural isomorphisms: the upper triangle because FC is freely generated, and the lower triangle is the previous factorization. > > FC FC ======= FC C I J J > GL(Γ) Id I π 2 > FC ======= FC The rectangle commutes because of the third property of a freely generated category: Id FC and π 2 J are two factorizations of I, and are therefore isomorphic. This implies that J is faithful, therefore I is full and faithful if J is: this last part of the proof depends on the choice made for J, and does not involve any more the gluing construction. 14

16 Chapter 4 Proving conservative extensions of nominal theories 4.1 Categorical semantics Categorical structure We would like to interpret a nominal theory in a category C, using the usual ideas of categorical type theory: nominal sorts τ are interpreted by objects τ in the category, a term M : τ is interpreted by a morphism m : A 1... A n τ, where the A i s are the sorts of free variables in M, two terms are provably equal in the nominal algebra whenever their associated morphisms are equal in the category. In order to interpret a nominal theory in C, we need, for each atomic sort α, an object A α, along with a property expressing the fact that A α is an object of atoms. This property will certainly be related to the abstraction: when T is an object, we need an abstracted object [A]T to interpret the type [A]τ. We could use an exponential, yet this approach has a few drawbacks: we do not want our category to have all exponentials, since only atoms can be abstracted, there is no application in nominal syntax: the evaluation map associated with the exponential would be superfluous, the exponential has no link with freshness assertions, and in particular with the judgement a#[a]m. Yet, the exponential is the right adjoint to the functor B, so we may use a similar idea here: let us consider a functor, following [10], F : C C such that: F 1 is the object A, F preservers pullbacks, there is a natural transformation θ : F Id, such that for every object X, θx isomorphism between the posets Sub(X) and Sub(F X), is an the map ζ X = F! X, θ X is monic, which makes F a subfunctor of A : that is why we may write A# instead of F. 15

17 We say that C has abstractions when A# has a right adjoint, written [A]. In the previous paragraphs, we have only considered one sort of atoms: in fact, we need a tuple (A α, F α, θ α, [A α ] ) for each atomic sort α. This structure is enough to define a morphism m for each nominal term M, yet we will later want to express freshness judgements in our category: we will therefore consider that C is a topos [8, 9], the Schanuel topos being for example such a topos with all required structure. It is however unclear whether we actually need a topos, or whether we could use a weaker categorical structure: this question is however important, since we already mentioned that we need a completeness property, which does not necessarily hold in a topos. Also, one can think of Cartesian closed categories, in which the equality of morphisms is decidable: this property does not necessarily hold either in a topos. Definition 4 (Structure). In order to interpret nominal terms in C, we need a structure M, which is given by: an object δ for every ground type δ, then we can naturally extend the map by induction on the syntax of nominal sorts, a morphism f : τ 1 τ n τ for every function symbol f : (τ 1,..., τ n )τ Interpretation of nominal terms Given a structure M, we can define by induction a morphism U τ for every nominal term M : τ. We use a form of terms-in-context Γ M : τ, where Γ is the list of free atoms in M. Γ M i = m i : U τ i f : (τ 1,..., τ n )τ (tf) Γ f(m 1,..., M n ) = f m i : U τ a α, Γ M = m : A α U V Γ [a α ]M = m ζ U : U [A α ]V (abs) Γ X τ = id τ : τ τ (unk) Γ, a α, Γ a α = π : U A α V A α (atm) In the rule (abs), m ζ U is a morphism A α #U A α U V, and m ζ U is its adjunct, given by A α # [A α ] Freshness contexts and equations Let A( ) be the set of distinct atoms which appear in the freshness context, and X( ) the set of distinct (sorted) unknowns. We can certainly find maps a : {1,..., n} A( ) and X : {1,..., n} X( ) such that: = a 1 #X 1,..., a n #X n For each i {1,..., n}, we will write A i for the sort of a i, and δ i for the sort of X i. Let Ω be the subobject classifier of C, and = a 1 #X 1,..., a n #X n be a freshness context. Using the previous notations, can be interpreted in C by a morphism : A k W Ω, where: k is the cardinal of A( ), W is the finite product δ i, given by the following rules: 16

18 a#x = char ζ X : A X Ω = u : U Ω = v : V Ω, = u v : W Ω Here, Ω is the subobject classifier of C, and the conjunction u v is given by the internal Heyting algebra. We have interpreted a freshness context as a morphism W Ω, yet in a topos, this is equivalent to having a subobject m of W, given by the pullback: m > 1 W > Ω Using a direct approach, which would allow us to directly define the subobject m without using the topos structure i.e. without using the previous pullback could help us in finding a minimal categorical structure for interpreting nominal syntax and judgements. 4.2 About substitution A major idea of categorical type theory is to interpret substitution of terms by composition of the corresponding morphisms. In a nominal theory, substitution of unknowns, which is the only meta-level substitution, does not avoid captures, whereas composition of morphisms does: take for example the terms M = a α and = [a α ]X α. These would be interpreted by the morphisms m = id Aα : A α A α and n = ζ Aα : A α [A α ]A α : yet the morphism n m is the interpretation of [a α ]b α, where b α is an atom. This happens in all cases, since the adjunction A# [A] is natural: whenever n ζ is a morphism V [A]W and m : U V, the morphism n ζ m has a left adjunct n ζ A#m, where A#m has type A#U A#V. Therefore, the abstracted atom in n ζ appears as fresh for both U and V in m, whereas we actually want it not to be fresh. However, we can use the naturality of the adjunction in a slightly different way to define a capturing substitution: we only show here the basic ideas, since some more work is needed to find out whether this approach actually works, and if so, to explicit the extra structure it involves. We have seen that composition with a morphism n : V [A]W cannot capture the abstracted atom: yet, if we consider its adjunct ˆn : A#V W, we can sometimes find a morphism n : A V W from n. If it is the case that V is a product V A V, then we can certainly define the following morphism, which would be the result of the substitution: true A#(V V ) ζ > A V V > A V A V n > W We should emphasize that we do not want all morphisms A#V W to be mapped to a morphism A V W, since when we consider freshness morphisms, this would allow the existence of A A A#A, merely implying that an atom a ((a, a) A A) could be fresh in itself ((a, a) A#A). We could have used binders λ X : A X [A]X [10] to define the interpretation of abstraction in 4.1.2: then our transformation exists at least for all morphisms defined via the inference rules. 4.3 Interpreting axioms Our last question concerns the interpretation of axioms: in a nominal equational theory, axioms may have preconditions which take the form of a freshness context. This makes their interpretation 17

19 more complicated than for an equational theory over λ-calculus: in such a theory, an axiom has the form Γ M = : γ, and is simply interpreted by saying that the morphisms Γ M : γ and Γ : γ are equal. Composition then ensures that we can substitute variables in M and and still prove the equality. Yet, in a nominal theory, axioms have the form M = : γ: is here a freshness context, which is in fact a precondition rather than the equivalent of a context in λ-calculus. Therefore, we cannot simply identify the morphisms M and in the category. This is in fact closely linked with the lack of a proper capturing substitution, which is crucial to embed the rule (axiom). 18

20 Chapter 5 Conclusion My main work during this training period was to understand the ideas of nominal sets and algebra while having in mind the concepts of categorical type theory. One of our goal was to adapt the gluing construction to a nominal setting, yet this point still seems far from being solved, since finding a good categorical structure for modelling nominal syntax happened to be a more difficult task than first expected. While we managed to adapt the constructions of [10] to define an interpretation of nominal terms in a category, and of freshness assertions in a topos, the minimal structure needed to model the equational theory still seems unclear. Yet this question is important, since a crucial point in the conservative extension proof is the fact that the categorical model is complete: while there exists a completeness theorem for equalities in the Schanuel topos, this does not hold for freshness judgements. This work was, to our knowledge, the first one to try and apply the approach of categorical type theory to nominal syntax. This raised many questions, which we tried to address, although further investigations are certainly needed. 19

21 Bibliography [1] Roy L. Crole. Programming Metalogics with a Fixpoint Type. PhD thesis, Computer Laboratory, University of Cambridge, [2] Roy L. Crole. Categories for Types. Cambridge Mathematical Textbooks. Cambridge University Press, xvii+335 pages, ISB HB, PB. [3] Roy L. Crole. On Fixpoint Objects and Gluing Constructions. Applied Categorical Structures, 4(2 & 3): , [4] Roy L. Crole. Operational Semantics, Abstract Machines and Correctness, Lecture otes for the Midlands Graduate School in the Foundations of Computer Science, LaTeX format 91 pages with subject and notation index. [5] Roy L. Crole. Hybrid Adequacy. Submitted for journal publication, [6] Murdoch J. Gabbay and Aad Mathijssen. ominal algebra. In Proc. 18th ordic Workshop on Programming Theory (WPT 06), [7] Murdoch J. Gabbay and Andrew M. Pitts. A new approach to abstract syntax with variable binding. Formal Aspects of Computing, 13: , [8] Saunders Mac Lane. Categories for the Working Mathematician. Graduate Texts in Mathematics. Springer, second edition, [9] Saunders Mac Lane and Ieke Moerdijk. Sheaves in Geometry and Logic: A First Introduction to Topos Theory. Universitext. Springer-Verlag, [10] Matías Menni. About -quantifiers. Applied Categorical Structures, 11: , [11] Andrew M. Pitts. Alpha-structural recursion and induction.??,?? [12] Andrew M. Pitts. otes on categorical logic. Lecture otes for a graduate course in the University of Cambridge Computer Laboratory, 78pp typescript, Lent Term [13] Andrew M. Pitts. ominal logic, a first order theory of names and binding. Information and Computation, 186: , [14] Andrew M. Pitts. Lectures on nominal syntax and semantics. International Summer School on Applied Semantics, Fauenchiemsee, Germany, September [15] Christian Urban, Andrew M. Pitts, and Murdoch J. Gabbay. ominal unification. Theoretical Computer Science, 323: ,

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

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

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

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

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

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

Lecture 2: Syntax. January 24, 2018

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

More information

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

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

Capture-Avoiding Substitution as a Nominal Algebra

Capture-Avoiding Substitution as a Nominal Algebra Under consideration for publication in Formal Aspects of Computing Capture-Avoiding Substitution as a Nominal Algebra Murdoch J. Gabbay 1 and Aad Mathijssen 2 Abstract. Substitution is fundamental to the

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

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

Herbrand Theorem, Equality, and Compactness

Herbrand Theorem, Equality, and Compactness CSC 438F/2404F Notes (S. Cook and T. Pitassi) Fall, 2014 Herbrand Theorem, Equality, and Compactness The Herbrand Theorem We now consider a complete method for proving the unsatisfiability of sets of first-order

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

Nominal Algebra and the HSP Theorem

Nominal Algebra and the HSP Theorem Nominal Algebra and the HSP Theorem Murdoch J. Gabbay 1,2 Abstract Nominal algebra is a logic of equality developed to reason algebraically in the presence of binding. In previous work it has been shown

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

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

Nominal Unification. Key words: Abstract Syntax, Alpha-Conversion, Binding Operations, Unification

Nominal Unification. Key words: Abstract Syntax, Alpha-Conversion, Binding Operations, Unification Nominal Unification Christian Urban a Andrew M. Pitts a Murdoch J. Gabbay b a University of Cambridge, Cambridge, UK b INRIA, Paris, France Abstract We present a generalisation of first-order unification

More information

Part II. Logic and Set Theory. Year

Part II. Logic and Set Theory. Year Part II Year 2018 2017 2016 2015 2014 2013 2012 2011 2010 2009 2008 2007 2006 2005 2018 60 Paper 4, Section II 16G State and prove the ǫ-recursion Theorem. [You may assume the Principle of ǫ- Induction.]

More information

Olivia Caramello. University of Insubria - Como. Deductive systems and. Grothendieck topologies. Olivia Caramello. Introduction.

Olivia Caramello. University of Insubria - Como. Deductive systems and. Grothendieck topologies. Olivia Caramello. Introduction. duality University of Insubria - Como 2 / 27 duality Aim of the talk purpose of this talk is to illustrate the relevance of the notion of topology. I will show that the classical proof system of geometric

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

First-Order Logic. Chapter Overview Syntax

First-Order Logic. Chapter Overview Syntax Chapter 10 First-Order Logic 10.1 Overview First-Order Logic is the calculus one usually has in mind when using the word logic. It is expressive enough for all of mathematics, except for those concepts

More information

U-Sets as a probabilistic set theory

U-Sets as a probabilistic set theory U-Sets as a probabilistic set theory Claudio Sossai ISIB-CNR, Corso Stati Uniti 4, 35127 Padova, Italy sossai@isib.cnr.it Technical Report 05/03 ISIB-CNR, October 2005 Abstract A topos of presheaves can

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

More Model Theory Notes

More Model Theory Notes More Model Theory Notes Miscellaneous information, loosely organized. 1. Kinds of Models A countable homogeneous model M is one such that, for any partial elementary map f : A M with A M finite, and any

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

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

Metainduction in Operational Set Theory

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

More information

Adjunctions! Everywhere!

Adjunctions! Everywhere! Adjunctions! Everywhere! Carnegie Mellon University Thursday 19 th September 2013 Clive Newstead Abstract What do free groups, existential quantifiers and Stone-Čech compactifications all have in common?

More information

A Grothendieck site is a small category C equipped with a Grothendieck topology T. A Grothendieck topology T consists of a collection of subfunctors

A Grothendieck site is a small category C equipped with a Grothendieck topology T. A Grothendieck topology T consists of a collection of subfunctors Contents 5 Grothendieck topologies 1 6 Exactness properties 10 7 Geometric morphisms 17 8 Points and Boolean localization 22 5 Grothendieck topologies A Grothendieck site is a small category C equipped

More information

Abstract and Variable Sets in Category Theory 1

Abstract and Variable Sets in Category Theory 1 Abstract and Variable Sets in Category Theory 1 John L. Bell In 1895 Cantor gave a definitive formulation of the concept of set (menge), to wit, A collection to a whole of definite, well-differentiated

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

TR : Binding Modalities

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

More information

MFPS LICS Special Session Honouring Dana Scott. Symmetric Scott. Andrew Pitts. Computer Laboratory MFPS/LICS /14

MFPS LICS Special Session Honouring Dana Scott. Symmetric Scott. Andrew Pitts. Computer Laboratory MFPS/LICS /14 MFPS/LICS 2013 1/14 MFPS LICS Special Session Honouring Dana Scott Symmetric Scott Andrew Pitts Computer Laboratory 80 years of Dana Scott MFPS/LICS 2013 2/14 automata theory set theory sheaves & logic

More information

Stone duality for first-order logic: a nominal approach to logic and topology

Stone duality for first-order logic: a nominal approach to logic and topology Stone duality for first-order logic: a nominal approach to logic and topology Murdoch J. Gabbay Heriot-Watt University, Scotland, UK http://www.gabbay.org.uk Abstract What are variables, and what is universal

More information

Propositional and Predicate Logic. jean/gbooks/logic.html

Propositional and Predicate Logic.   jean/gbooks/logic.html CMSC 630 February 10, 2009 1 Propositional and Predicate Logic Sources J. Gallier. Logic for Computer Science, John Wiley and Sons, Hoboken NJ, 1986. 2003 revised edition available on line at http://www.cis.upenn.edu/

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

LINDSTRÖM S THEOREM SALMAN SIDDIQI

LINDSTRÖM S THEOREM SALMAN SIDDIQI LINDSTRÖM S THEOREM SALMAN SIDDIQI Abstract. This paper attempts to serve as an introduction to abstract model theory. We introduce the notion of abstract logics, explore first-order logic as an instance

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

3. Only sequences that were formed by using finitely many applications of rules 1 and 2, are propositional formulas.

3. Only sequences that were formed by using finitely many applications of rules 1 and 2, are propositional formulas. 1 Chapter 1 Propositional Logic Mathematical logic studies correct thinking, correct deductions of statements from other statements. Let us make it more precise. A fundamental property of a statement is

More information

The Syntax of First-Order Logic. Marc Hoyois

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

More information

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

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

Unbounded quantifiers and strong axioms in topos theory

Unbounded quantifiers and strong axioms in topos theory Unbounded quantifiers and in topos A. University of Chicago November 14, 2009 The motivating question What is the topos-theoretic counterpart of the strong set-theoretic axioms of Separation, Replacement,

More information

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

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

More information

ELEMENTARY TOPOI: SETS, GENERALIZED

ELEMENTARY TOPOI: SETS, GENERALIZED ELEMENTARY TOPOI: SETS, GENERALIZED CHRISTOPHER HENDERSON Abstract. An elementary topos is a nice way to generalize the notion of sets using categorical language. If we restrict our world to categories

More information

Interpreting the Second-Order Lambda Calculus using Qualitative Domains

Interpreting the Second-Order Lambda Calculus using Qualitative Domains Department of Mathematics Bachelor Thesis Interpreting the Second-Order Lambda Calculus using Qualitative Domains Author: Anton Golov Supervisor: Dr. Jaap van Oosten September 2014-July 2015 Contents 1

More information

Nominal Matching and Alpha-Equivalence (Extended Abstract)

Nominal Matching and Alpha-Equivalence (Extended Abstract) Nominal Matching and Alpha-Equivalence (Extended Abstract) Christophe Calvès and Maribel Fernández King s College London, Department of Computer Science, Strand, London WC2R 2LS, UK Christophe.Calves@kcl.ac.uk

More information

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

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

More information

Foundations of Mathematics

Foundations of Mathematics Foundations of Mathematics Andrew Monnot 1 Construction of the Language Loop We must yield to a cyclic approach in the foundations of mathematics. In this respect we begin with some assumptions of language

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

Lecture 1: Overview. January 24, 2018

Lecture 1: Overview. January 24, 2018 Lecture 1: Overview January 24, 2018 We begin with a very quick review of first-order logic (we will give a more leisurely review in the next lecture). Recall that a linearly ordered set is a set X equipped

More information

Nominal Syntax and Semantics

Nominal Syntax and Semantics Nominal Syntax and Semantics Andrew Pitts University of Cambridge Computer Laboratory APPSEM 2005, 1 - p. 1 How best to reconcile Mathematics of syntax syntactical issues to do with name-binding and α-conversion

More information

Introduction to Metalogic

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

More information

Nominal Rewriting. Maribel Fernández. ISR - June King s College London

Nominal Rewriting. Maribel Fernández. ISR - June King s College London King s College London ISR - June 2009 - Course Syllabus Introduction First-order languages Languages with binding operators Specifying binders: α-equivalence Nominal terms Nominal unification (unification

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

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

H-Categories and Graphs

H-Categories and Graphs H-Categories and Graphs Aaron D. Ames and Paulo Tabuada Abstract H-categories are an essential ingredient of categorical models for hybrid systems. In this note, we consider oriented H-categories and form

More information

Nominal Dependent Types as a Logical Framework

Nominal Dependent Types as a Logical Framework ominal Dependent Types as a Logical Framework Elliot Fairweather, Maribel Fernández, ora Szasz, Alvaro Tasistro King s College London University ORT Uruguay July 20, 2011 Abstract We present a logical

More information

Part 2: First-Order Logic

Part 2: First-Order Logic Part 2: First-Order Logic First-order logic formalizes fundamental mathematical concepts is expressive (Turing-complete) is not too expressive (e. g. not axiomatizable: natural numbers, uncountable sets)

More information

This is logically equivalent to the conjunction of the positive assertion Minimal Arithmetic and Representability

This is logically equivalent to the conjunction of the positive assertion Minimal Arithmetic and Representability 16.2. MINIMAL ARITHMETIC AND REPRESENTABILITY 207 If T is a consistent theory in the language of arithmetic, we say a set S is defined in T by D(x) if for all n, if n is in S, then D(n) is a theorem of

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

Notation for Logical Operators:

Notation for Logical Operators: Notation for Logical Operators: always true always false... and...... or... if... then...... if-and-only-if... x:x p(x) x:x p(x) for all x of type X, p(x) there exists an x of type X, s.t. p(x) = is equal

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

A Recursion Combinator for Nominal Datatypes Implemented in Isabelle/HOL

A Recursion Combinator for Nominal Datatypes Implemented in Isabelle/HOL A Recursion Combinator for Nominal Datatypes Implemented in Isabelle/HOL Christian Urban and Stefan Berghofer Technische Universität München {urbanc,berghofe}@in.tum.de Abstract. The nominal datatype package

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

Algebraizing Hybrid Logic. Evangelos Tzanis University of Amsterdam Institute of Logic, Language and Computation

Algebraizing Hybrid Logic. Evangelos Tzanis University of Amsterdam Institute of Logic, Language and Computation Algebraizing Hybrid Logic Evangelos Tzanis University of Amsterdam Institute of Logic, Language and Computation etzanis@science.uva.nl May 1, 2005 2 Contents 1 Introduction 5 1.1 A guide to this thesis..........................

More information

A Canonical 1 Locally Named Representation of Binding. α -equivalence is identity. Randy Pollack. Masahiko Sato. LFCS, University of Edinburgh

A Canonical 1 Locally Named Representation of Binding. α -equivalence is identity. Randy Pollack. Masahiko Sato. LFCS, University of Edinburgh A Canonical 1 Locally Named Representation of Binding Randy Pollack LFCS, University of Edinburgh Masahiko Sato Graduate School of Informatics, Kyoto University Version of September 3, 2009 1 α -equivalence

More information

Discrete Mathematics. W. Ethan Duckworth. Fall 2017, Loyola University Maryland

Discrete Mathematics. W. Ethan Duckworth. Fall 2017, Loyola University Maryland Discrete Mathematics W. Ethan Duckworth Fall 2017, Loyola University Maryland Contents 1 Introduction 4 1.1 Statements......................................... 4 1.2 Constructing Direct Proofs................................

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

Alpha-Structural Recursion and Induction

Alpha-Structural Recursion and Induction Alpha-Structural Recursion and Induction ANDREW M. PITTS Cambridge University, Cambridge, UK Abstract. The nominal approach to abstract syntax deals with the issues of bound names and α-equivalence by

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

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

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

CHAPTER 0: BACKGROUND (SPRING 2009 DRAFT)

CHAPTER 0: BACKGROUND (SPRING 2009 DRAFT) CHAPTER 0: BACKGROUND (SPRING 2009 DRAFT) MATH 378, CSUSM. SPRING 2009. AITKEN This chapter reviews some of the background concepts needed for Math 378. This chapter is new to the course (added Spring

More information

Notes on ordinals and cardinals

Notes on ordinals and cardinals Notes on ordinals and cardinals Reed Solomon 1 Background Terminology We will use the following notation for the common number systems: N = {0, 1, 2,...} = the natural numbers Z = {..., 2, 1, 0, 1, 2,...}

More information

Cartesian Closed Topological Categories and Tensor Products

Cartesian Closed Topological Categories and Tensor Products Cartesian Closed Topological Categories and Tensor Products Gavin J. Seal October 21, 2003 Abstract The projective tensor product in a category of topological R-modules (where R is a topological ring)

More information

Lecture Notes: Axiomatic Semantics and Hoare-style Verification

Lecture Notes: Axiomatic Semantics and Hoare-style Verification Lecture Notes: Axiomatic Semantics and Hoare-style Verification 17-355/17-665/17-819O: Program Analysis (Spring 2018) Claire Le Goues and Jonathan Aldrich clegoues@cs.cmu.edu, aldrich@cs.cmu.edu It has

More information

Automata Theory and Formal Grammars: Lecture 1

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

More information

CS632 Notes on Relational Query Languages I

CS632 Notes on Relational Query Languages I CS632 Notes on Relational Query Languages I A. Demers 6 Feb 2003 1 Introduction Here we define relations, and introduce our notational conventions, which are taken almost directly from [AD93]. We begin

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

CS2742 midterm test 2 study sheet. Boolean circuits: Predicate logic:

CS2742 midterm test 2 study sheet. Boolean circuits: Predicate logic: x NOT ~x x y AND x /\ y x y OR x \/ y Figure 1: Types of gates in a digital circuit. CS2742 midterm test 2 study sheet Boolean circuits: Boolean circuits is a generalization of Boolean formulas in which

More information

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

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

More information

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

The Locally Nameless Representation

The Locally Nameless Representation Noname manuscript No. (will be inserted by the editor) The Locally Nameless Representation Arthur Charguéraud Received: date / Accepted: date Abstract This paper provides an introduction to the locally

More information

Canonical extension of coherent categories

Canonical extension of coherent categories Canonical extension of coherent categories Dion Coumans Radboud University Nijmegen Topology, Algebra and Categories in Logic (TACL) Marseilles, July 2011 1 / 33 Outline 1 Canonical extension of distributive

More information

Elimination of binary choice sequences

Elimination of binary choice sequences Elimination of binary choice sequences Tatsuji Kawai Japan Advanced Institute of Science and Technology JSPS Core-to-Core Program Workshop on Mathematical Logic and its Application 16 17 September 2016,

More information

Marie Duží

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

More information

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

Algebraic Geometry

Algebraic Geometry MIT OpenCourseWare http://ocw.mit.edu 18.726 Algebraic Geometry Spring 2009 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. 18.726: Algebraic Geometry

More information

Theories With Duality DRAFT VERSION ONLY

Theories With Duality DRAFT VERSION ONLY Theories With Duality DRAFT VERSION ONLY John C. Baez Department of athematics, University of California Riverside, CA 9252 USA Paul-André elliès Laboratoire PPS Université Paris 7 - Denis Diderot Case

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

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

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

More information

Morita-equivalences for MV-algebras

Morita-equivalences for MV-algebras Morita-equivalences for MV-algebras Olivia Caramello* University of Insubria Geometry and non-classical logics 5-8 September 2017 *Joint work with Anna Carla Russo O. Caramello Morita-equivalences for

More information

Categorical coherence in the untyped setting. Peter M. Hines

Categorical coherence in the untyped setting. Peter M. Hines Categorical coherence in the untyped setting Peter M. Hines SamsonFest Oxford May 2013 The Untyped Setting Untyped categories Categories with only one object (i.e. monoids) with additional categorical

More information

07 Equational Logic and Algebraic Reasoning

07 Equational Logic and Algebraic Reasoning CAS 701 Fall 2004 07 Equational Logic and Algebraic Reasoning Instructor: W. M. Farmer Revised: 17 November 2004 1 What is Equational Logic? Equational logic is first-order logic restricted to languages

More information

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

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

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

More information

A MODEL-THEORETIC PROOF OF HILBERT S NULLSTELLENSATZ

A MODEL-THEORETIC PROOF OF HILBERT S NULLSTELLENSATZ A MODEL-THEORETIC PROOF OF HILBERT S NULLSTELLENSATZ NICOLAS FORD Abstract. The goal of this paper is to present a proof of the Nullstellensatz using tools from a branch of logic called model theory. In

More information