Top Banner
144

Category Theory for All (NASSLLI 2012)

May 10, 2015

Download

Technology

Preliminary, very preliminary slides.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Category Theory for All (NASSLLI 2012)

Category Theory for All:a logician's perspective

Valeria de Paiva

NASSLLI2012

June, 2012

Valeria de Paiva (NASSLLI2012) June, 2012 1 / 113

Page 2: Category Theory for All (NASSLLI 2012)

Outline

Outline

1 Interested in Category Theory?

2 Categories, Functors and Natural Transformations

3 Adjunctions

4 Deductive Systems as Categories

5 A taste of Glue Semantics?...

Valeria de Paiva (NASSLLI2012) June, 2012 2 / 113

Page 3: Category Theory for All (NASSLLI 2012)

Interested in Category Theory?

Introduction

Category theory is a relatively new branch of mathematics that keepsappearing in texts of computational semantics, on the syntax-semanticsinterface and even on material on pure syntax.It also is very proeminent on the literature on Functional Programming, inthe theory of speci�cations and even on some discussions on databases.Thirdly it has become familiar in texts for physicists, especially the onesinterested in Quantum stu�.

Category theory is simple, but requires an investment of time to get overthe initial barrier of language, hence it seems an ideal subject to be taughtat NASSLLI.

�There are two ways to do great mathematics. The �rst way is to

be smarter than everybody else. The second way is to be stupider

than everybody else � but persistent." � Raoul Bott

Valeria de Paiva (NASSLLI2012) June, 2012 3 / 113

Page 4: Category Theory for All (NASSLLI 2012)

Interested in Category Theory?

A little bit of personal history...

Some twenty years ago I �nished my PhD thesis "The DialecticaCategories" in Cambridge. My supervisor was Dr Martin Hyland.

Valeria de Paiva (NASSLLI2012) June, 2012 4 / 113

Page 5: Category Theory for All (NASSLLI 2012)

Interested in Category Theory?

Dialectica categories come from Gödel's DialecticaInterpretation

The interpretation is named after the Swiss journal Dialectica where itappeared in a special volume dedicated to Paul Bernays 70th birthday in1958.I was originally trying to provide an internal categorical model of theDialectica Interpretation. The categories I came up with proved (also) tobe a model of Linear Logic...

Valeria de Paiva (NASSLLI2012) June, 2012 5 / 113

Page 6: Category Theory for All (NASSLLI 2012)

Interested in Category Theory?

Dialectica categories are models of Linear Logic

Linear Logic (LL) introduced by Girard (1987): �[...]linear logic comes froma proof-theoretic analysis of usual logic.�LL the best of both worlds, the dualities of classical logic plus theconstructive content of proofs of intuitionistic logic.

Dialectica categories are a cool model of LL, still one of the best around...

Valeria de Paiva (NASSLLI2012) June, 2012 6 / 113

Page 7: Category Theory for All (NASSLLI 2012)

Interested in Category Theory?

From Linear Logic to Semantics of Natural Language

Many linguists became interested in Linear Logic because it's aresource-conscious logic.I became interested in Linguistics because of Linear Logic and itsprogramme of proofs as �rst class objects.

Valeria de Paiva (NASSLLI2012) June, 2012 7 / 113

Page 8: Category Theory for All (NASSLLI 2012)

Interested in Category Theory?

From Linear Logic to Linear Functional Programming

I also became interested in Functional Programing because of Linear Logicand its programme of proofs as �rst class objects.

Valeria de Paiva (NASSLLI2012) June, 2012 8 / 113

Page 9: Category Theory for All (NASSLLI 2012)

Interested in Category Theory?

Proofs as �rst class objects?

Programme to elevate the status of proofs to ��rst class� logical objects.Instead of asking `when is a formula A true', we ask `what is a proof of A?'

Using Frege's distinction between sense and denotation:proofs are the senses of logical formulas,whose denotations might be truth values.

Sometimes I call this programme Proof Semantics.sometimes I call it Categorical Proof Theory (because the semantics of proofsare given in terms of natural constructions in Category Theory).

Valeria de Paiva (NASSLLI2012) June, 2012 9 / 113

Page 10: Category Theory for All (NASSLLI 2012)

Interested in Category Theory?

The Challenges of Proof Semantics...

There is a problem with viewing proofs as logical objects:We do not have direct access to proofs.Only to syntactic representations of them, in the form of derivations insome proof system (e.g. axiomatic, natural deduction or sequent calculus).

Syntactic derivations are �awed means of accessing the underlying proofobjects. The syntax can introduce spurious di�erences between derivationsthat do not correspond to di�erences in the underlying proofs; it can alsomask di�erences that really are there.Semantics of proofs is what categorical logic is about.Our category theory will be directed towards proof semantics.Valeria de Paiva (NASSLLI2012) June, 2012 10 / 113

Page 11: Category Theory for All (NASSLLI 2012)

Interested in Category Theory?

Things I hope you know...

We will assume some familiarity with �rst-order predicate calculus, arudimentary knowledge of the lambda-calculus and type theory, and a basicidea of what logical inference is about.If you have an intuitive understanding what the following means I thinkyou'll be �ne.

∀x. man(x)→ mortal(x), man(john) ` mortal(john)

λx.see(x, john) (fred) ≡β see(fred, john)

If you have done a basic course in abstract algebra, linear algebra orgroups, then you should be in really good shape.

Valeria de Paiva (NASSLLI2012) June, 2012 11 / 113

Page 12: Category Theory for All (NASSLLI 2012)

Interested in Category Theory?

What is Categorical Logic?

Traditionally mathematical logic divided into four areas:proof theorymodel theory,recursion theoryand set theory.A trend towards adding `Complexity' to the four basic areas.

Categorical logic means di�erent things to di�erent people.In this course we will mean categorical `proof theory'.

Valeria de Paiva (NASSLLI2012) June, 2012 12 / 113

Page 13: Category Theory for All (NASSLLI 2012)

Interested in Category Theory?

What is Categorical Proof Theory?

Proof theory using categorical models instead of Sets-based models...Logic could be �rst-order, but it will be propositional only.Classical logic poses some problems, discussed later on.We deal with propositional intuitionistic logic IPL.

For this course this means that we need to consider three independentconnectives: conjunction (A ∧B), disjunction (A ∨B) and implication(A→ B).These are not interde�nable, so some of the usual classical rules (e.g.A→ B ∼= ¬A ∨B) are not valid.

Valeria de Paiva (NASSLLI2012) June, 2012 13 / 113

Page 14: Category Theory for All (NASSLLI 2012)

Interested in Category Theory?

The quest for proofs...

Traditional proof theory, to the extent that it relies on models usesalgebraic structures such as Boolean algebras, Heyting algebras or Kripkemodels of several styles.These models lose one important dimension. In these models di�erentproofs are not represented at all.Provability, the fact that Γ a collection of premisses A1, . . . , Ak entails A,is represented by the less or equal ≤ relation in the model.This does not give us a way of representing the proofs themselves. We onlyknow if a proof exists Γ ≤ A or not. All proofs are collapsed into theexistence of this relation.Valeria de Paiva (NASSLLI2012) June, 2012 14 / 113

Page 15: Category Theory for All (NASSLLI 2012)

Interested in Category Theory?

The quest for proofs...

By contrast in categorical proof theory we think and write a proof as

Γ→f A

where f is the reason why we can deduce A from Γ, a name for the proofwe are thinking of. Thus we can observe and name and compare di�erentderivations. Which means that we can see subtle di�erences in the logics.

Valeria de Paiva (NASSLLI2012) June, 2012 15 / 113

Page 16: Category Theory for All (NASSLLI 2012)

Interested in Category Theory?

Constructive perspective: not much of one...

This course is not about the deep philosophical questions of the foundationsof mathematics. We will side-step every philosophical issue that we can.(It is not that these issues are not interesting. They are. It is just that Idon't think I can enlighten anyone much on them.)

Caveat emptor Whether you believe or not that there is a single logic thatis the correct one, applications (especially in CS) have provided us withempirical evidence that there are several logical systems that are convenientfor use in speci�c contexts.When studying these contexts and applications it pays to keep aconstructive viewpoint. If classical logic turns out to be necessary, we willpragmatically use it and �ag its use.Commmitment to intuitionistic principles is a matter of pragmatic choice:It is easier to be intuitionistic and then if need arises to become classicthan the other way round. Moreover it's safer: intuitionistic principles areaccepted by all...

Valeria de Paiva (NASSLLI2012) June, 2012 16 / 113

Page 17: Category Theory for All (NASSLLI 2012)

Interested in Category Theory?

The real point of this course...

Valeria de Paiva (NASSLLI2012) June, 2012 17 / 113

Page 18: Category Theory for All (NASSLLI 2012)

Interested in Category Theory?

Edwardian proofs for futuristic programs...

Valeria de Paiva (NASSLLI2012) June, 2012 18 / 113

Page 19: Category Theory for All (NASSLLI 2012)

Interested in Category Theory?

Introductions to category theory?...

There are many. check out logic-forall for links.S. Mac Lane, Categories for the Working Mathematician (1971, 1998)J.-Y. Girard, Y. Lafont, P. Taylor, Proofs and Types (1989)M. Barr, C. Wells, Category Theory for Computer Science (1995)B.C. Pierce, Basic Category Theory for Computer Science (1991)R. Blute P. Scott, Category Theory for Linear Logicians (2003)F.W. Lawvere, S.H. Schanuel, Conceptual Mathematics (1997)Abramsky,Tzevelekos, Introduction to Cats and Categorical Logic (2010)S. Awodey, Category Theory, (2010).H. Simmons, An Introduction to Category Theory, (2011)V. de Paiva, Categorical Proof Theory and Linear Logic (1996)

Blog http://logic-forall.blogspot.com/

Valeria de Paiva (NASSLLI2012) June, 2012 19 / 113

Page 20: Category Theory for All (NASSLLI 2012)

Interested in Category Theory?

More Introductions...

M. Johansson, Category Theory and Functional Programming, StanfordFALL 2009, and St. Andrews 2012also Chalmers discussion group:G. Hutton, Introduction to Category Theory , Midlands Grad School, 2012D. Verity, An Introduction to Category Theory - FP-Syd talk,E. Cheng, The Catstars YouTube channel,J. van Oosten, Basic Category Theory, 2002,L. Maertens, Category Theory for Program Construction. ESSLLI (1995)Benton, Bierman, Hyland and de Paiva, Term Assignment for IntuitionisticLinear Logic, 1992.

Valeria de Paiva (NASSLLI2012) June, 2012 20 / 113

Page 21: Category Theory for All (NASSLLI 2012)

Interested in Category Theory?

Elements of category theory...

Meant to imply that we will discuss and do exercises on some basicconcepts. necessary for categorical proof theory, in the restricted senseabove.No promisses of completeness of building blocks...Basic concepts we intend to cover:� categories, functors, natural transformations� products, pullbacks, equalizers, initial and terminal objects� adjunctions and monoidal closure� Yoneda Lemma� (monads, algebras, coalgebras and comonads?)

Valeria de Paiva (NASSLLI2012) June, 2012 21 / 113

Page 22: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

De�nition of a Category

A category C consists of a collection of objects (A,B, . . .) and a collectionof morphisms (or maps) from A to B (written as f : A→ B) satisfyingthree easy conditions:

1. Given maps f : A→ B and g : B → C such that the codomain of f isequal to the domain of g, there is an operation of composition ofmorphisms, which produces a map f ; g : A→ C.2. The composition operation is associative, ie. f ; (g;h) = (f ; g);h.3. For each object A in the category we have an associated identitymorphism idA : A→ A such that if f : A→ B is any map in the category,then idA; f = f = f ; idB.

Note on `writing' composition: mathematicians usually write g ◦ f for whatI mostly write as f ; g. Use whatever you like, and have a scratchpad nearbyto check it out...

Valeria de Paiva (NASSLLI2012) June, 2012 22 / 113

Page 23: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

The De�nition of Category

Valeria de Paiva (NASSLLI2012) June, 2012 23 / 113

Page 24: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

The De�nition of Category

Valeria de Paiva (NASSLLI2012) June, 2012 24 / 113

Page 25: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Examples of Categories

Valeria de Paiva (NASSLLI2012) June, 2012 25 / 113

Page 26: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Examples of Categories

Valeria de Paiva (NASSLLI2012) June, 2012 26 / 113

Page 27: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Examples of kinds of Categories

Valeria de Paiva (NASSLLI2012) June, 2012 27 / 113

Page 28: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Examples of Categories

Valeria de Paiva (NASSLLI2012) June, 2012 28 / 113

Page 29: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Examples of Categories

The category of Sets and usual functions is the paradigmatic example.Maybe it's too intuitive.

A good example to show the di�erence between morphisms and functions isthe category Rel of sets and relations.

Easy mathematical examples:Groups and homomorphisms,vector spaces and linear transformations,monoids and monoid homomorphisms.More complicated example: topological spaces and continuous maps.

Valeria de Paiva (NASSLLI2012) June, 2012 29 / 113

Page 30: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Examples of Categories: Monoids

A monoidM is a set with a `multiplication-like' operation and one identity,say the element e. SoM = (M, ·, e) where · : M ×M →M is such that

m1 · (m2 ·m3) = (m1 ·m2) ·m3 and m·e = m = e ·m

Easy mathematical examples:(N,+, 0) integers under addition,(R,×, 1) reals under multiplicationmatrices under multiplication of matrices (Matn, ·, In)strings over alphabet {0, 1}, under concatenation, (String, ·, λ).

Valeria de Paiva (NASSLLI2012) June, 2012 30 / 113

Page 31: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Two extreme examples

The empty category (writen as 0), which has no objects nor morphisms.(Just a parallel concept to the empty set.)The singleton category (written as 1), which has a single object and asingle morphism, which is the identity on the single object.

Valeria de Paiva (NASSLLI2012) June, 2012 31 / 113

Page 32: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Why Categories?

Category theory (CT) is a convenient new languageIt puts existing mathematical results into perspectiveIt gives an appreciation of the unity of modern mathematics

As a language, it o�ers economy of thought and expressionReveals common ideas in (apparently) unrelated areas of mathematicsA single result proved in CT generates many results in di�erent areasDuality: for every categorical construct, there is a dual, reverse all the mapsDi�cult problems in some areas of mathematics can be translated into(easier) problems in other areas (e.g. by using functors, which map fromone category to another)Makes precise some notions that were previously vague, e.g. universality,naturality, etc

Valeria de Paiva (NASSLLI2012) June, 2012 32 / 113

Page 33: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Why Categories?

Category theory is ideal for:Reasoning about structure and the mappings that preserve structureAbstracting away from detailsAutomation (constructive methods for many useful categorical structures)

Applications of Category theory in software engineering:The category of algebraic speci�cations: category theory used to representcomposition and re�nementThe category of temporal logic speci�cations: category theory used to buildmodular speci�cations and decompose system properties across themAutomata theory: category theory o�ers a new way of comparing automata

Logic as a category: represent a logical system as a category, and constructproofs using universal constructs in category theory (diagram chasing).A category of logics: theorem provers in di�erent logic systems can behooked together through institution morphismsFunctional Programming: type theory, programming language semantics...Valeria de Paiva (NASSLLI2012) June, 2012 33 / 113

Page 34: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Beware of paradoxes...

To avoid set theoretical paradoxes care must be taken.Oversimplifying: small collections are sets, big collections are classes andtry not to pay much attention to the di�erences between them.

Say C is a small category if boththe collection objects of C (written as obj(C) or |C|) andthe collection of maps between two objects HomC(A,B) (for all A,Bobjects of C) are sets.Say C is a locally small category if HomC(A,B) is a set for any twoobjects A and B in the category.

We assume all the categories we discuss are at least locally small and thatthe sets of morphisms HomC(A,B) are disjoint for distinct pairs of objectsA and B. We also draw diagrams and say they commute to stateequations between morphisms.

Valeria de Paiva (NASSLLI2012) June, 2012 34 / 113

Page 35: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

beginframe

Valeria de Paiva (NASSLLI2012) June, 2012 35 / 113

Page 36: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Initial and Terminal Objects

Valeria de Paiva (NASSLLI2012) June, 2012 35 / 113

Page 37: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Recap

1. Discussed the idea of categorical semantics:

want our to be able to distinguish di�erent derivations of the same formulafrom same assumptions;2. want to use categorical morphisms as denotations of our proofs;3. want Curry-Howard "triangles" for other logics/other typetheories/other categories;for now want to understand how original categorical Curry-Howard works4. Saw the de�nition of a category and some examples

Valeria de Paiva (NASSLLI2012) June, 2012 36 / 113

Page 38: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Recap

1. Discussed the idea of categorical semantics:want our to be able to distinguish di�erent derivations of the same formulafrom same assumptions;

2. want to use categorical morphisms as denotations of our proofs;3. want Curry-Howard "triangles" for other logics/other typetheories/other categories;for now want to understand how original categorical Curry-Howard works4. Saw the de�nition of a category and some examples

Valeria de Paiva (NASSLLI2012) June, 2012 36 / 113

Page 39: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Recap

1. Discussed the idea of categorical semantics:want our to be able to distinguish di�erent derivations of the same formulafrom same assumptions;2. want to use categorical morphisms as denotations of our proofs;

3. want Curry-Howard "triangles" for other logics/other typetheories/other categories;for now want to understand how original categorical Curry-Howard works4. Saw the de�nition of a category and some examples

Valeria de Paiva (NASSLLI2012) June, 2012 36 / 113

Page 40: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Recap

1. Discussed the idea of categorical semantics:want our to be able to distinguish di�erent derivations of the same formulafrom same assumptions;2. want to use categorical morphisms as denotations of our proofs;3. want Curry-Howard "triangles" for other logics/other typetheories/other categories;

for now want to understand how original categorical Curry-Howard works4. Saw the de�nition of a category and some examples

Valeria de Paiva (NASSLLI2012) June, 2012 36 / 113

Page 41: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Recap

1. Discussed the idea of categorical semantics:want our to be able to distinguish di�erent derivations of the same formulafrom same assumptions;2. want to use categorical morphisms as denotations of our proofs;3. want Curry-Howard "triangles" for other logics/other typetheories/other categories;for now want to understand how original categorical Curry-Howard works

4. Saw the de�nition of a category and some examples

Valeria de Paiva (NASSLLI2012) June, 2012 36 / 113

Page 42: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Recap

1. Discussed the idea of categorical semantics:want our to be able to distinguish di�erent derivations of the same formulafrom same assumptions;2. want to use categorical morphisms as denotations of our proofs;3. want Curry-Howard "triangles" for other logics/other typetheories/other categories;for now want to understand how original categorical Curry-Howard works4. Saw the de�nition of a category and some examples

Valeria de Paiva (NASSLLI2012) June, 2012 36 / 113

Page 43: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Repeating: a Category

A category C consists of a collection of objects (A,B, . . .) and a collectionof morphisms (or maps/arrows) from A to B (written as f : A→ B)satisfying three easy conditions:

1. Given maps f : A→ B and g : B → C such that the codomain of f isequal to the domain of g, there is an operation of composition ofmorphisms, which produces a map f ; g : A→ C.2. The composition operation is associative, ie. f ; (g;h) = (f ; g);h.3. For each object A in the category we have an associated identitymorphism idA : A→ A such that if f : A→ B is any map in the category,then idA; f = f = f ; idB.

Note on `writing' composition: mathematicians usually write g ◦ f for whatI mostly write as f ; g. Use whatever you like, and have a scratchpad nearbyto check it out...

Valeria de Paiva (NASSLLI2012) June, 2012 37 / 113

Page 44: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Repeating: Examples

0. Category Set, plus few �nite ones, plus `sets-with-structure' (universalalgebra)...

1.any partially-ordered set (P,≤) can be seen as a category, a morphismexists between p, q in P just when p ≤ q, ie. either a single or no morphismbetween objects.

how do we show this satis�es conditions for category?2. category of monoids (M, ·, e) and monoid homormorphisms, ie mapsf : M →M ′ such that f(m · n) = f(m) · f(n) and f(e) = e′.

Valeria de Paiva (NASSLLI2012) June, 2012 38 / 113

Page 45: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Repeating: Examples

0. Category Set, plus few �nite ones, plus `sets-with-structure' (universalalgebra)...

1.any partially-ordered set (P,≤) can be seen as a category, a morphismexists between p, q in P just when p ≤ q, ie. either a single or no morphismbetween objects.

how do we show this satis�es conditions for category?2. category of monoids (M, ·, e) and monoid homormorphisms, ie mapsf : M →M ′ such that f(m · n) = f(m) · f(n) and f(e) = e′.

Valeria de Paiva (NASSLLI2012) June, 2012 38 / 113

Page 46: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Two extreme examples of categories

The empty category (writen as 0), which has no objects nor morphisms.(Just a parallel concept to the empty set.)

The singleton category (written as 1), which has a single object and asingle morphism,

which is the identity on the single object.

Valeria de Paiva (NASSLLI2012) June, 2012 39 / 113

Page 47: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Two extreme examples of categories

The empty category (writen as 0), which has no objects nor morphisms.(Just a parallel concept to the empty set.)

The singleton category (written as 1), which has a single object and asingle morphism, which is the identity on the single object.

Valeria de Paiva (NASSLLI2012) June, 2012 39 / 113

Page 48: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

The opposite category Cop

Given any category C we can formally invert all its morphisms, to constructthe category Cop.

Why would you do this?

Actually will be extremely useful to deal with e.g. logical implication.But for the time being, it's a simple way of seeing that morphisms do nothave to be function-based.Fork on the road: structures inside categories vs. structures relating cats

Valeria de Paiva (NASSLLI2012) June, 2012 40 / 113

Page 49: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Products of Categories

Given categories C and D we consider a new category whose objects arepairs of objects (C,D), C in C and D in D and morphisms are pairs ofmorphisms (f, g), f : C → C ′, g : D → D′. This builds the categoryC×D.

Does the operation of taking products of categories has a unity?

Valeria de Paiva (NASSLLI2012) June, 2012 41 / 113

Page 50: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Products of Categories

Given categories C and D we consider a new category whose objects arepairs of objects (C,D), C in C and D in D and morphisms are pairs ofmorphisms (f, g), f : C → C ′, g : D → D′. This builds the categoryC×D.Does the operation of taking products of categories has a unity?

Valeria de Paiva (NASSLLI2012) June, 2012 41 / 113

Page 51: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Slice Categories

This construction is a bit more involved. Given a category C and an objectA of C, the slice category over A, C/A is a category whose objects aremorphisms of the form C → A.A morphism from C → A to C ′ → A is a morphism in C, f : C → C ′ suchthat the following triangle commutes:

Cf- C ′

A?�

Valeria de Paiva (NASSLLI2012) June, 2012 42 / 113

Page 52: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

A menagerie of Categories

Valeria de Paiva (NASSLLI2012) June, 2012 43 / 113

Page 53: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Functors

We have been stressing that more than objects it is the way that objectsrelate to each that matters in category theory. The same is true ofcategories themselves.Hence the old Eilenberg-MacLane joke that categories were only inventedso that they could talk about functors. And functors were only invented totalk about natural transformations. and yes talk about the naturaltransformations was what the algebraic geometers wanted to do all along.So we need maps of categories, the natural way of relating categories.Which structure should they preserve?

Composition and identities, of course.

Valeria de Paiva (NASSLLI2012) June, 2012 44 / 113

Page 54: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Functors

We have been stressing that more than objects it is the way that objectsrelate to each that matters in category theory. The same is true ofcategories themselves.Hence the old Eilenberg-MacLane joke that categories were only inventedso that they could talk about functors. And functors were only invented totalk about natural transformations. and yes talk about the naturaltransformations was what the algebraic geometers wanted to do all along.So we need maps of categories, the natural way of relating categories.Which structure should they preserve?

Composition and identities, of course.Valeria de Paiva (NASSLLI2012) June, 2012 44 / 113

Page 55: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Functors

Given categories C and D, a functor F : C→ D consists of an assignmentof objects of C to objects to D such that if f : A→ B is a morphism in Cthen F (f) : F (A)→ F (B) is a morphism in D and1. F preserves composition, F (f ; g) = F (f);F (g) and2. F preserves identities, F (idA) = idF (A)

Valeria de Paiva (NASSLLI2012) June, 2012 45 / 113

Page 56: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Functors

Valeria de Paiva (NASSLLI2012) June, 2012 46 / 113

Page 57: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Examples of Functors

The trivial example is the identity functor on any category C.1. A functor between posets is simply an order-preserving function.(they are called monotonic or monotone functions..)2. Forgetful functors simply forget the mathematical structure present. Forexample, the functor U : Mon→ Sets simply forgets the monoid structureand returns the set that is the carrier of the monoid.Similarly for U : Group→ Sets, the functor that forgets the groupstructure.3. More interesting are the free functors, that create free structure on baresets. For example, FreeMon : Sets→Mon creates free monoids.

Can you guess what the free monoid functor FreeMon does to a setA = {a, b, c} ?

Valeria de Paiva (NASSLLI2012) June, 2012 47 / 113

Page 58: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Examples of Functors

The trivial example is the identity functor on any category C.1. A functor between posets is simply an order-preserving function.(they are called monotonic or monotone functions..)2. Forgetful functors simply forget the mathematical structure present. Forexample, the functor U : Mon→ Sets simply forgets the monoid structureand returns the set that is the carrier of the monoid.Similarly for U : Group→ Sets, the functor that forgets the groupstructure.3. More interesting are the free functors, that create free structure on baresets. For example, FreeMon : Sets→Mon creates free monoids.

Can you guess what the free monoid functor FreeMon does to a setA = {a, b, c} ?

Valeria de Paiva (NASSLLI2012) June, 2012 47 / 113

Page 59: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

More Slice Categories

Given a map f : A→ B in C we have a functor Σf : C/A→ C/B.For g : C/A→ C/A

Cg- C ′

A?�

Σf acts as

Cg- C ′

A?

- B?

-

Valeria de Paiva (NASSLLI2012) June, 2012 48 / 113

Page 60: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

More Slice Categories

Given a map f : A→ B in C we have a functor Σf : C/A→ C/B.For g : C/A→ C/A

Cg- C ′

A?�

Σf acts as

Cg- C ′

A?

- B?

-

Valeria de Paiva (NASSLLI2012) June, 2012 48 / 113

Page 61: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

More Examples of Functors

From Hutton's notes, http://www.cs.nott.ac.uk/ gmh/cat.html.1. The powerset functor, P : Set→ Set, P(A) is the set of all subsets ofA, for example if A = {0, 1} then P(A) = {∅, {0}, {1}, {0, 1}}.2. The List : Set→ Set functor. On objects ListA is the set de�ned by thegrammar

ListA ::= Nil | ConsA(ListA)

On maps, if f : A→ B is a function then List(f) : List(A)→ List(B) isthe function de�ned by the equations:

List f (Nil) = Nil

List f (Cons x xs) = Cons(f(x))(List f xs))

Preservation of composition and identities proved by induction.3. Can you do the functor Tree : Set→ Set such that TreeA is the set ofbinary trees whose leaves are elements of the set A?

Valeria de Paiva (NASSLLI2012) June, 2012 49 / 113

Page 62: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

More Examples of Functors

From Hutton's notes, http://www.cs.nott.ac.uk/ gmh/cat.html.1. The powerset functor, P : Set→ Set, P(A) is the set of all subsets ofA, for example if A = {0, 1} then P(A) = {∅, {0}, {1}, {0, 1}}.2. The List : Set→ Set functor. On objects ListA is the set de�ned by thegrammar

ListA ::= Nil | ConsA(ListA)

On maps, if f : A→ B is a function then List(f) : List(A)→ List(B) isthe function de�ned by the equations:

List f (Nil) = Nil

List f (Cons x xs) = Cons(f(x))(List f xs))

Preservation of composition and identities proved by induction.3. Can you do the functor Tree : Set→ Set such that TreeA is the set ofbinary trees whose leaves are elements of the set A?

Valeria de Paiva (NASSLLI2012) June, 2012 49 / 113

Page 63: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

More Examples of Functors

From Hutton's notes, http://www.cs.nott.ac.uk/ gmh/cat.html.1. The powerset functor, P : Set→ Set, P(A) is the set of all subsets ofA, for example if A = {0, 1} then P(A) = {∅, {0}, {1}, {0, 1}}.2. The List : Set→ Set functor. On objects ListA is the set de�ned by thegrammar

ListA ::= Nil | ConsA(ListA)

On maps, if f : A→ B is a function then List(f) : List(A)→ List(B) isthe function de�ned by the equations:

List f (Nil) = Nil

List f (Cons x xs) = Cons(f(x))(List f xs))

Preservation of composition and identities proved by induction.3. Can you do the functor Tree : Set→ Set such that TreeA is the set ofbinary trees whose leaves are elements of the set A?

Valeria de Paiva (NASSLLI2012) June, 2012 49 / 113

Page 64: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

More Examples of Functors

From Hutton's notes, http://www.cs.nott.ac.uk/ gmh/cat.html.1. The powerset functor, P : Set→ Set, P(A) is the set of all subsets ofA, for example if A = {0, 1} then P(A) = {∅, {0}, {1}, {0, 1}}.2. The List : Set→ Set functor. On objects ListA is the set de�ned by thegrammar

ListA ::= Nil | ConsA(ListA)

On maps, if f : A→ B is a function then List(f) : List(A)→ List(B) isthe function de�ned by the equations:

List f (Nil) = Nil

List f (Cons x xs) = Cons(f(x))(List f xs))

Preservation of composition and identities proved by induction.3. Can you do the functor Tree : Set→ Set such that TreeA is the set ofbinary trees whose leaves are elements of the set A?Valeria de Paiva (NASSLLI2012) June, 2012 49 / 113

Page 65: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Recap:

1. Discussed categories. what are they?

collection of objects, collection ofmaps such that maps compose (associatively) and there are identities foreach objectf ; (g;h) = (f ; g);hf(idA) = idf(A)

2. talked about some examples e.g. monoids and monoid morphismscan you remember two examples of monoids?slice category where objects are already morphisms..product category C ×D.3. de�ned functor F : C → D need to map objects to objects and maps tomaps. need to satisfy F (f ; g) = F (f);F (g) F (idA) = idF (A) where arethese compositions?

Valeria de Paiva (NASSLLI2012) June, 2012 50 / 113

Page 66: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Recap:

1. Discussed categories. what are they? collection of objects, collection ofmaps such that maps compose (associatively) and there are identities foreach objectf ; (g;h) = (f ; g);hf(idA) = idf(A)

2. talked about some examples e.g. monoids and monoid morphisms

can you remember two examples of monoids?slice category where objects are already morphisms..product category C ×D.3. de�ned functor F : C → D need to map objects to objects and maps tomaps. need to satisfy F (f ; g) = F (f);F (g) F (idA) = idF (A) where arethese compositions?

Valeria de Paiva (NASSLLI2012) June, 2012 50 / 113

Page 67: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Recap:

1. Discussed categories. what are they? collection of objects, collection ofmaps such that maps compose (associatively) and there are identities foreach objectf ; (g;h) = (f ; g);hf(idA) = idf(A)

2. talked about some examples e.g. monoids and monoid morphismscan you remember two examples of monoids?slice category where objects are already morphisms..product category C ×D.3. de�ned functor F : C → D need to map objects to objects and maps tomaps. need to satisfy F (f ; g) = F (f);F (g) F (idA) = idF (A)

where arethese compositions?

Valeria de Paiva (NASSLLI2012) June, 2012 50 / 113

Page 68: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Recap:

1. Discussed categories. what are they? collection of objects, collection ofmaps such that maps compose (associatively) and there are identities foreach objectf ; (g;h) = (f ; g);hf(idA) = idf(A)

2. talked about some examples e.g. monoids and monoid morphismscan you remember two examples of monoids?slice category where objects are already morphisms..product category C ×D.3. de�ned functor F : C → D need to map objects to objects and maps tomaps. need to satisfy F (f ; g) = F (f);F (g) F (idA) = idF (A) where arethese compositions?

Valeria de Paiva (NASSLLI2012) June, 2012 50 / 113

Page 69: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Two more examples of Categories: I. Labelled Graphs

Can you describe the category of `labelled graphs'? what are the objects?

Valeria de Paiva (NASSLLI2012) June, 2012 51 / 113

Page 70: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Labelled Graphs

Morphisms/arrows/maps from one labelled graph to another?

Valeria de Paiva (NASSLLI2012) June, 2012 52 / 113

Page 71: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Labelled Graphs

Morphisms/arrows/maps from one labelled graph to another?

Valeria de Paiva (NASSLLI2012) June, 2012 52 / 113

Page 72: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Maps of Labelled Graphs

Valeria de Paiva (NASSLLI2012) June, 2012 53 / 113

Page 73: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Second Example: Automata

remember these?

Valeria de Paiva (NASSLLI2012) June, 2012 54 / 113

Page 74: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Second Example: Automata from Goguen's Manifesto

Valeria de Paiva (NASSLLI2012) June, 2012 55 / 113

Page 75: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

More Examples of Functors

Back to the powerset functor, P : Set→ Set, P(A) is the set of all subsetsof A, for example if A = {0, 1} then P(A) = {∅, {0}, {1}, {0, 1}}.if B = {a, b, c} thenP(B) = {∅, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}}.

You can also consider only �nite subsets of a set Pfin(A), which makesmore sense if the set is in�nite.

The power set functorP : Set→ Set maps each set to its power set andeach function f : X → Y to the map which sends U ⊆ X to its imagef(U) ⊆ Y . One can also consider the contravariant power set functorwhich sends f : X → Y to the map which sends V ⊆ Y to its inverseimage f−1(V ) ⊆ X.

Valeria de Paiva (NASSLLI2012) June, 2012 56 / 113

Page 76: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

More Examples of Functors

The List : Set→ Set functor. On objects ListA is the set de�ned by thegrammar

ListA ::= Nil | ConsA(ListA)

On maps, if f : A→ B is a function then List(f) : List(A)→ List(B) isthe function de�ned by the equations:

List f (Nil) = Nil

List f (Cons x xs) = Cons(f(x))(List f xs))

Preservation of composition and identities proved by induction.3. Can you do the functor Tree : Set→ Set such that TreeA is the set ofbinary trees whose leaves are elements of the set A?

Valeria de Paiva (NASSLLI2012) June, 2012 57 / 113

Page 77: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

More Examples of Functors

The List : Set→ Set functor. On objects ListA is the set de�ned by thegrammar

ListA ::= Nil | ConsA(ListA)

On maps, if f : A→ B is a function then List(f) : List(A)→ List(B) isthe function de�ned by the equations:

List f (Nil) = Nil

List f (Cons x xs) = Cons(f(x))(List f xs))

Preservation of composition and identities proved by induction.3. Can you do the functor Tree : Set→ Set such that TreeA is the set ofbinary trees whose leaves are elements of the set A?

Valeria de Paiva (NASSLLI2012) June, 2012 57 / 113

Page 78: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

More Examples of Functors

The List : Set→ Set functor. On objects ListA is the set de�ned by thegrammar

ListA ::= Nil | ConsA(ListA)

On maps, if f : A→ B is a function then List(f) : List(A)→ List(B) isthe function de�ned by the equations:

List f (Nil) = Nil

List f (Cons x xs) = Cons(f(x))(List f xs))

Preservation of composition and identities proved by induction.3. Can you do the functor Tree : Set→ Set such that TreeA is the set ofbinary trees whose leaves are elements of the set A?

Valeria de Paiva (NASSLLI2012) June, 2012 57 / 113

Page 79: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

More Examples of Functors

The List : Set→ Set functor. On objects ListA is the set de�ned by thegrammar

ListA ::= Nil | ConsA(ListA)

On maps, if f : A→ B is a function then List(f) : List(A)→ List(B) isthe function de�ned by the equations:

List f (Nil) = Nil

List f (Cons x xs) = Cons(f(x))(List f xs))

Preservation of composition and identities proved by induction.3. Can you do the functor Tree : Set→ Set such that TreeA is the set ofbinary trees whose leaves are elements of the set A?

Valeria de Paiva (NASSLLI2012) June, 2012 57 / 113

Page 80: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Back to math: Hom Functors

Pick a category C and an object A in it. Then HomC(A,−) is a functorfrom C to Set, where HomC(A,−) the collection of all morphisms of Cwith source A.

A functor F is represented by an object A if F is naturally isomorphic toHomC(A,−).

Valeria de Paiva (NASSLLI2012) June, 2012 58 / 113

Page 81: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

More Hom Functors

Pick a category C and an object A in it. Look at HomC(−, A) is a functorfrom C to Set, where HomC(−, A) is the collection of all morphisms of Cwith codomain A.

Valeria de Paiva (NASSLLI2012) June, 2012 59 / 113

Page 82: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Functors: more notation

A functor of the form H : C×D→ E, where the domain is a productcategory, is called a bi-functor.Projections from a product category π1,2 : A×B → A are bi-functors.A functor of the form F : Cop → D, whose domain is the opposite of agiven category, is called a contravariant functor.

Example of non-functor that looks like one: the �centre of a group" (thecenter Z(G) of a group G, is de�ned as the subgroup consisting of allelements g ∈ G such that for all elements h ∈ H the equality gh = hgholds).

Valeria de Paiva (NASSLLI2012) June, 2012 60 / 113

Page 83: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Functors are ubiquitous?

Graham says:

The wikipedia says: For functors as a synonym of "function objects" incomputer programming to pass function pointers along with its state, seefunction object. For the use of the functor morphism presented here infunctional programming see also the fmap function of Haskell's Functorclass. Functor is also used to name functions in Prolog. For functors inlinguistics, see Function word.

Valeria de Paiva (NASSLLI2012) June, 2012 61 / 113

Page 84: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Natural Transformations

Given functors F : C→ D and G : C→ D, a natural transformation

α : F → G consists of morphisms αA : F (A)→ G(A) such that, for any Ain C and for any f : A→ B in C we have:

F (A)αA- G(A)

F (B)

F (f)

?

αB- G(B)

G(f)

?

do easy case and mentionhttp://blog.sigfpe.com/2008/05/you-could-have-de�ned-natural.html`Starting with the idea of a function that doesn't `peek inside' itsarguments, we're led inexorably to the idea of substitutability of argumentsand from there to a categorical de�nition of a natural transformation.'Valeria de Paiva (NASSLLI2012) June, 2012 62 / 113

Page 85: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

... prettier picture from Edsko de Vries, thanks!

Valeria de Paiva (NASSLLI2012) June, 2012 63 / 113

Page 86: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Examples of Natural Transformations

Reversing lists. If A is a set, then revA : List→ List is a function de�nedby:

revA(Nil) = Nil

revA(Cons x xs) = revA(xs) · (Consx Nil)

To show this is natural must show

ListArevA- ListA

ListB

Listf

?

revB- ListB

Listf

?

Valeria de Paiva (NASSLLI2012) June, 2012 64 / 113

Page 87: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Constructions in Categories: Products

A category C has binary products, if given objects A and B in C, thereexists an object A×B and morphisms π1 : A×B → A andp2 : A×B → B of C such that if P is another object of C equipped withmorphisms p1 : P → A and p2 : P → B, then there's a unique mapu : P → A×B such that the triangles below commute.

P

A �π1�

p 1

A×B

u

? π2 - B

p2

-

Valeria de Paiva (NASSLLI2012) June, 2012 65 / 113

Page 88: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Constructions in Categories: Pullbacks

A category C has pullbacks, if given maps f : X → Z and g : Y → Z in C,there exists an object P equipped with morphisms p1 : P → X andp2 : P → Y of C such that if Q is another object of C equipped withmorphisms q1 : Q→ X and q2 : Q→ Y , then there's a unique mapu : Q→ P such that the `triangles' below commute.

Valeria de Paiva (NASSLLI2012) June, 2012 66 / 113

Page 89: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Constructions in Categories: Equalizers

A category C has equalizers, if given maps f : A→ B and g : A→ B inC, there exists an object E equipped with a morphism e : E → A of Csuch that if E′ is another object of C equipped with a morphisme′ : E′ → A, then there's a unique map e : E′ → E such that the trianglebelow commutes.

Valeria de Paiva (NASSLLI2012) June, 2012 67 / 113

Page 90: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Recap...

Got up our ladder: categories, functors and natural transformations.Cats have objects and maps, identity morphism for each object, satisfyingcomposition and identity law.Functors transform cats into other cats,F : C→ D have a component forobjects a component for maps, st F (f ; g) = F (f);F (g) (covariantfunctor) and F (idC) = idFC .constructions relating cats: opposite or dual cat, products, extra exampleslike slice cat and Hom-functor. constructions inside a cat: initial/terminalobject, products (coproducts), pullbacks (push-outs), equalizers(co-equalizers).Not worrying about size considerations (set-theoretic paradoxes) can build:1. category of small categories where morphisms are functors between cats.2. Cat of functors between two given cats Fun(C,D) where objects arefunctors and morphisms are natural transformations.

Valeria de Paiva (NASSLLI2012) June, 2012 68 / 113

Page 91: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Recap...

Got up our ladder: categories, functors and natural transformations.Cats have objects and maps, identity morphism for each object, satisfyingcomposition and identity law.Functors transform cats into other cats,F : C→ D have a component forobjects a component for maps, st F (f ; g) = F (f);F (g) (covariantfunctor) and F (idC) = idFC .constructions relating cats: opposite or dual cat, products, extra exampleslike slice cat and Hom-functor. constructions inside a cat: initial/terminalobject, products (coproducts), pullbacks (push-outs), equalizers(co-equalizers).Not worrying about size considerations (set-theoretic paradoxes) can build:1. category of small categories where morphisms are functors between cats.2. Cat of functors between two given cats Fun(C,D) where objects arefunctors and morphisms are natural transformations.

Valeria de Paiva (NASSLLI2012) June, 2012 68 / 113

Page 92: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Recap...

A nat transformation α : F → G between functors F and G both from Cto D is a collection of morphisms in D αC one for each object C of thecategory C satisfying a nice square, for each morphism in C f : C → C ′:

F (C)αC- G(C)

F (C ′)

F (f)

?

α′C

- G(C ′)

G(f)

?

only example "reverse" between lists in Set...

Valeria de Paiva (NASSLLI2012) June, 2012 69 / 113

Page 93: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Trivial example: identity natural transformation

α− idC : F → F .how does it go?

A nat transformation α : F → G between functors F and G both from Cto C is a collection of morphisms in C αC one for each object C of thecategory satisfying a nice square, for each morphism in C f : C → C ′:

F (C)α− idC- F (C)

F (C ′)

F (f)

?

α− idC′

- F (C ′)

F (f)

?

Valeria de Paiva (NASSLLI2012) June, 2012 70 / 113

Page 94: Category Theory for All (NASSLLI 2012)

Categories, Functors and Natural Transformations

Trivial example: identity natural transformation

α− idC : F → F .how does it go?A nat transformation α : F → G between functors F and G both from Cto C is a collection of morphisms in C αC one for each object C of thecategory satisfying a nice square, for each morphism in C f : C → C ′:

F (C)α− idC- F (C)

F (C ′)

F (f)

?

α− idC′

- F (C ′)

F (f)

?

Valeria de Paiva (NASSLLI2012) June, 2012 70 / 113

Page 95: Category Theory for All (NASSLLI 2012)

Adjunctions

Adjunctions?

Given functors F : C→ D and G : D→ C, we say that F is left-adjoint toG (or that G is right-adjoint to F ) F ` G if there is a natural bijection

HomD(FC,D) ∼= HomC(C,GD)

for each pair of objects C in C and D in D.

Many people prefer to think of them as Galois connections.

Valeria de Paiva (NASSLLI2012) June, 2012 71 / 113

Page 96: Category Theory for All (NASSLLI 2012)

Adjunctions

Galois connections...

Let (A,≤) and (B,≤) be two partially ordered sets. A Galois connection

between these posets consists of two monotone functions: F : A→ B andG : B → A, such that for all a in A andb in B, we have

F (a) ≤ b if and only if a ≤ G(b)

In this situation,F is called the lower adjoint of G and G is called theupper adjoint of F .Several names in the literature, wikipedia has a good selection.Originally from Galois' work on groups.Check out Peter Smith's carefully written "The Galois Connection betweenSyntax and Semantics".Abstract Algebraic Logic. Abstract interpretation. "Concept analysis",some Information Flow...

Valeria de Paiva (NASSLLI2012) June, 2012 72 / 113

Page 97: Category Theory for All (NASSLLI 2012)

Adjunctions

Examples of Adjunctions

Free monoids again... Cartesian Closedness (monoidal closedness)

Valeria de Paiva (NASSLLI2012) June, 2012 73 / 113

Page 98: Category Theory for All (NASSLLI 2012)

Adjunctions

Free monoids?

Recall the functor Free : Set→Mon.On an set A it produces the free monoid. i.e sequences of elements fromA, 'multiplied' by concatenation, (A∗, [], concat).On an set B it produces the free monoid (sequences of elements from B)(B∗, [], concat).

remind me, what's the rest of the functor?On a map f : A→ B the action of Free, f∗ is simply doing the function fin each of the elements of A.Recall also the `boring' forgetful functor U : Mon→ Set. Given anymonoid (M, ·, e) it returns simply M . Given a monoid morphismh : (M, ·, e)→ (M ′, ·, e′), return simply the function h.

Valeria de Paiva (NASSLLI2012) June, 2012 74 / 113

Page 99: Category Theory for All (NASSLLI 2012)

Adjunctions

Free monoids?

Recall the functor Free : Set→Mon.On an set A it produces the free monoid. i.e sequences of elements fromA, 'multiplied' by concatenation, (A∗, [], concat).On an set B it produces the free monoid (sequences of elements from B)(B∗, [], concat).remind me, what's the rest of the functor?

On a map f : A→ B the action of Free, f∗ is simply doing the function fin each of the elements of A.Recall also the `boring' forgetful functor U : Mon→ Set. Given anymonoid (M, ·, e) it returns simply M . Given a monoid morphismh : (M, ·, e)→ (M ′, ·, e′), return simply the function h.

Valeria de Paiva (NASSLLI2012) June, 2012 74 / 113

Page 100: Category Theory for All (NASSLLI 2012)

Adjunctions

Free monoids?

Recall the functor Free : Set→Mon.On an set A it produces the free monoid. i.e sequences of elements fromA, 'multiplied' by concatenation, (A∗, [], concat).On an set B it produces the free monoid (sequences of elements from B)(B∗, [], concat).remind me, what's the rest of the functor?On a map f : A→ B the action of Free, f∗ is simply doing the function fin each of the elements of A.Recall also the `boring' forgetful functor U : Mon→ Set. Given anymonoid (M, ·, e) it returns simply M . Given a monoid morphismh : (M, ·, e)→ (M ′, ·, e′), return simply the function h.

Valeria de Paiva (NASSLLI2012) June, 2012 74 / 113

Page 101: Category Theory for All (NASSLLI 2012)

Adjunctions

Free monoids?

Now let us look at the de�nition of adjunction: Two functors F,G going inopposite directions st

HomD(FC,D) ∼= HomC(C,GD)

where ∼= means there is a bijection that is natural in C and D.

We do have functors going between categories Mon and Set in oppositedirections.U : Mon→ Set and Free : Set→MonDo we have ....

HomSet(UM,A) ∼= HomMon(M,FreeA)

More than 20 di�erent de�nitions of adjunction...

Valeria de Paiva (NASSLLI2012) June, 2012 75 / 113

Page 102: Category Theory for All (NASSLLI 2012)

Adjunctions

Free monoids?

Now let us look at the de�nition of adjunction: Two functors F,G going inopposite directions st

HomD(FC,D) ∼= HomC(C,GD)

where ∼= means there is a bijection that is natural in C and D.We do have functors going between categories Mon and Set in oppositedirections.U : Mon→ Set and Free : Set→MonDo we have ....

HomSet(UM,A) ∼= HomMon(M,FreeA)

More than 20 di�erent de�nitions of adjunction...

Valeria de Paiva (NASSLLI2012) June, 2012 75 / 113

Page 103: Category Theory for All (NASSLLI 2012)

Adjunctions

Free monoids?

Simmons says:There is a lot going on with adjunctions and you willprobably get confused more than once. Don't worry....

universal property: a morphism η : A→ U(FreeA) such that whenever Mis a monoid, and g : A→ U(M) a function, then there is a unique monoidmorphism h : Free(A)→M such that U(h) · η = g.

A - UM

U(Free(A))?

-

Go and read it at your own pace. for intuition think the free monoid is themonoid built on the generators, the elements of the original set. you canalways embedd the original set into the set that is the forgotten monoid..Valeria de Paiva (NASSLLI2012) June, 2012 76 / 113

Page 104: Category Theory for All (NASSLLI 2012)

Adjunctions

An über familiar adjunction...

HomSet(A×B,C) ∼= HomSet(A,CB)

So f : A×B → C is bijectively related to f : A→ CB.This is trivial currying of functions, if your f has 2 arguments a and b, youcan transform it into a function f of a single argument a that returns afunction taking b's to c's, right?Schoen�nkel (1920s) the �rst (?) to notice its importance for combinators .Now can we do it in a generic category C?We have products. Need to internalize the notion of maps in C from B toC.In Set is easy, the set of functions from X to Y may be denoted X → Y orY X .As a special case, the power set of a set X may be identi�ed with the setof all functions from X to {0, 1}, denoted 2X .

Valeria de Paiva (NASSLLI2012) June, 2012 77 / 113

Page 105: Category Theory for All (NASSLLI 2012)

Adjunctions

An über familiar adjunction...

Consider the functor −×B : Set→ Set, where B is a �xed object of Set.On object A we have A×B,on object A′ we have A′ ×B.

what's the morphism component?On a map f : A→ A′ we simply product with the identity on B.

Now consider the functor (−)B : Set→ Set.On object D, DB is the set of all maps B → D.On object D′ it is the set of all maps B → D′.and on a morphism, f : D → D′

it's the usual, composition.Now, if we "formally" plug in these two functors into our de�nition ofadjunction, what happens?

Valeria de Paiva (NASSLLI2012) June, 2012 78 / 113

Page 106: Category Theory for All (NASSLLI 2012)

Adjunctions

An über familiar adjunction...

Consider the functor −×B : Set→ Set, where B is a �xed object of Set.On object A we have A×B,on object A′ we have A′ ×B.what's the morphism component?On a map f : A→ A′ we simply product with the identity on B.

Now consider the functor (−)B : Set→ Set.On object D, DB is the set of all maps B → D.On object D′ it is the set of all maps B → D′.and on a morphism, f : D → D′

it's the usual, composition.Now, if we "formally" plug in these two functors into our de�nition ofadjunction, what happens?

Valeria de Paiva (NASSLLI2012) June, 2012 78 / 113

Page 107: Category Theory for All (NASSLLI 2012)

Adjunctions

An über familiar adjunction...

Look at:

HomD(FC,D) ∼= HomC(C,GD)

where F = −×B and G = (−)B

applying to objects C and D we have:

HomSet(C ×B,D) ∼= HomSet(C,DB) ∼= HomSet(C,B → D)

which corresponds to our trivial operation on of currying functions...So I want to conclude that in a generic category C with products, I have anadjunction between functors −×B and (−)B.

Valeria de Paiva (NASSLLI2012) June, 2012 79 / 113

Page 108: Category Theory for All (NASSLLI 2012)

Adjunctions

An über familiar adjunction...

Look at:

HomD(FC,D) ∼= HomC(C,GD)

where F = −×B and G = (−)B

applying to objects C and D we have:

HomSet(C ×B,D) ∼= HomSet(C,DB) ∼= HomSet(C,B → D)

which corresponds to our trivial operation on of currying functions...So I want to conclude that in a generic category C with products, I have anadjunction between functors −×B and (−)B.

Valeria de Paiva (NASSLLI2012) June, 2012 79 / 113

Page 109: Category Theory for All (NASSLLI 2012)

Adjunctions

An über familiar adjunction...

ok, I'm cheating. I didn't tell you how to construct the functor (−)B inother categories. We know we can do it in Set, but what about anywhereelse?

I can give a proper de�nition of (−)B if I work hard on limits, the generalnotion of which we saw 3 instances: products, pullbacks and equalizers.then the adjunction is obvious.

or I can give you the adjunction saying you've used it a billion times beforeand say, go get your general de�nition of "internalizing functions" from theadjunction. Ie de�ne function spaces as the functor that makes theadjunction work, like many books do.A bit like riding a bike, if you start you can keep your balance...

Valeria de Paiva (NASSLLI2012) June, 2012 80 / 113

Page 110: Category Theory for All (NASSLLI 2012)

Adjunctions

Cartesian Closed Categories...

A category C is called a cartesian closed category (CCC) if it has productsand if for each object X of C, the product functor −×X : C→ C has aright adjoint, written as (−)X . That is we have

HomC(A×X,B) ∼= HomC(A,BX)

A minor modi�cation, not insisting on "real" cartesian products, producesthe de�nition of symmetric monoidal closed category.

HomC(A⊗X,B) ∼= HomC(A, [X,B]C)

Valeria de Paiva (NASSLLI2012) June, 2012 81 / 113

Page 111: Category Theory for All (NASSLLI 2012)

Adjunctions

Have you seen this adjunction before?...

If you squint a little and make × the same as ∧ and → logical implicationand think of maps in the category as proofs, you can read

HomC(A×X,B) ∼= HomC(A,X → B)

as any proof of A ∧X → B corresponds bijectively to a proof ofA→ X → B, which is a form of the Deduction Theorem in logic.

Valeria de Paiva (NASSLLI2012) June, 2012 82 / 113

Page 112: Category Theory for All (NASSLLI 2012)

Deductive Systems as Categories

Lambek introduced the idea of using Gentzen methods in category theoryand linguistics in the Sixties.A deductive system is simply a labelled graph whose objects are formulasand whose edges are labelled sequents. There are special identity arrowsand some special rules for creating new sequents outof the old ones. Givena graph G

Valeria de Paiva (NASSLLI2012) June, 2012 83 / 113

Page 113: Category Theory for All (NASSLLI 2012)

Deductive Systems as Categories

What are the Deductive Systems trying to do?...

Valeria de Paiva (NASSLLI2012) June, 2012 83 / 113

Page 114: Category Theory for All (NASSLLI 2012)

Deductive Systems as Categories

How do sequents relate to categories?...

Basic idea: a formula corresponds to an object in a suitable categoryWe assign to each sequent Γ ` A a map in the suitable category C fromthe interpretation of Γ to the interpretation of A. (But we don't bother toshow the di�erence between A formula and A object in the category...)Clearly the interpretation must be compositional: we get the interpretationof Γ = A1, . . . , An from the interpretations of the components Ai.What is the less contraining construction we can do in a category that willinterpret the context Γ?People will worry about commutativity, associativity of commas.If I am talking about intuitionistic logic, where conjunction is commutativeand associative, cartesian product would be �ne, but a commutative tensor

product ⊗ is �ne too.

Valeria de Paiva (NASSLLI2012) June, 2012 84 / 113

Page 115: Category Theory for All (NASSLLI 2012)

Deductive Systems as Categories

How do sequents relate to categories?...

Tensor products? Well, I mentioned categorical products and their universalproperty. It turns out that universality is not really required to modelcontexts.So we can do simply with a product-like functor ⊗ : C× C→ C, which isassociative, commutative and has an identity, usually written as I.Categorical products are unique up to iso, so if you have products, that's it.(up to iso).But tensor products are not unique, you can have several, this correspondsto several kinds of "conjunction" in your logic.A category with an associated tensor product and unit is called a monoidal

category. A category with an associated categorical product and terminalobject is called a cartesian category.Monoidal categories are very fashionable, as they seem more �exible formodelling phenomena. (glossing over issues with coherence).

Valeria de Paiva (NASSLLI2012) June, 2012 85 / 113

Page 116: Category Theory for All (NASSLLI 2012)

Deductive Systems as Categories

How do sequents relate to categories? ...

Adding terms/morphisms to a suitable version of sequent calculus rules weget a full interpretation of the suimply typed lambda-calculus in categories.This allows us to think of proofs as λ-terms or of morphisms in thecategory build up from identities and the constructors we allowed.Are we there yet?

No, must prove it works.Must prove we have triangle...

Valeria de Paiva (NASSLLI2012) June, 2012 86 / 113

Page 117: Category Theory for All (NASSLLI 2012)

Deductive Systems as Categories

How do sequents relate to categories? ...

Adding terms/morphisms to a suitable version of sequent calculus rules weget a full interpretation of the suimply typed lambda-calculus in categories.This allows us to think of proofs as λ-terms or of morphisms in thecategory build up from identities and the constructors we allowed.Are we there yet?No, must prove it works.Must prove we have triangle...

Valeria de Paiva (NASSLLI2012) June, 2012 86 / 113

Page 118: Category Theory for All (NASSLLI 2012)

Deductive Systems as Categories

Valeria de Paiva (NASSLLI2012) June, 2012 87 / 113

Page 119: Category Theory for All (NASSLLI 2012)

Deductive Systems as Categories

Old picture

Valeria de Paiva (NASSLLI2012) June, 2012 88 / 113

Page 120: Category Theory for All (NASSLLI 2012)

Deductive Systems as Categories

Problems?..

We can add terms to Natural Deduction (Curry-Howard correspondence).

But need sequent formulation provably equivalent to Natural Deduction.

(there is a problem with associating categorical constructions to sequentcalculus rules without ND, the proof equalities don't work without extraconstraints, Herbelin.)We will discuss this tomorrow.

Valeria de Paiva (NASSLLI2012) June, 2012 89 / 113

Page 121: Category Theory for All (NASSLLI 2012)

Deductive Systems as Categories

Recap..

So I goofed, should've de�ned:An object C in a category D is an internal hom object or an exponential

object [A→ B] or BA if it comes equipped with an arrowev : [A→ B]×A→ B, called the evaluation arrow, such that for anyother arrow f : C ×A→ B, there is a unique arrow λf : C → [A→ B]such that the compositeC ×A→λf×1A [A→ B]×A→ev Bis f .but yes, the bike metaphor is still valid...

Valeria de Paiva (NASSLLI2012) June, 2012 90 / 113

Page 122: Category Theory for All (NASSLLI 2012)

Deductive Systems as Categories

Traditional Curry-Howard reloaded..

Valeria de Paiva (NASSLLI2012) June, 2012 91 / 113

Page 123: Category Theory for All (NASSLLI 2012)

Deductive Systems as Categories

Traditional Curry-Howard reloaded..

But 88 pages in Gallier to prove ND equivalent to sequent calculus...Once you have it:

Valeria de Paiva (NASSLLI2012) June, 2012 92 / 113

Page 124: Category Theory for All (NASSLLI 2012)

Deductive Systems as Categories

Traditional Curry-Howard reloaded..

Valeria de Paiva (NASSLLI2012) June, 2012 93 / 113

Page 125: Category Theory for All (NASSLLI 2012)

Deductive Systems as Categories

Categorical Curry-Howard reloaded..

Valeria de Paiva (NASSLLI2012) June, 2012 94 / 113

Page 126: Category Theory for All (NASSLLI 2012)

Deductive Systems as Categories

Categorical Curry-Howard reloaded..

Valeria de Paiva (NASSLLI2012) June, 2012 95 / 113

Page 127: Category Theory for All (NASSLLI 2012)

Deductive Systems as Categories

Traditional Curry-Howard reloaded..

Valeria de Paiva (NASSLLI2012) June, 2012 96 / 113

Page 128: Category Theory for All (NASSLLI 2012)

Deductive Systems as Categories

Traditional Curry-Howard reloaded..

What can we prove?Few more (traditional de�nitions)A signature is a collection of basic types (Nat, Bool, Char, ...) and typedfunctional symbols (add, succ,..., etc).Consider a basic signature that contains at least basic types 1, 0 and basicoperators × for conjunctions, + for disjunctions and → for logicalimplication.Take a cartesian closed category C with products, coproducts and functionspaces.An interpretation I for signature Σ in C ( a Σ-structure in C) is speci�edby giving an object of C for each type in Σ and a map in C for eachfunction symbol f in Σ.

Valeria de Paiva (NASSLLI2012) June, 2012 97 / 113

Page 129: Category Theory for All (NASSLLI 2012)

Deductive Systems as Categories

Traditional Curry-Howard reloaded..

Considering terms in context, for any interpretation of Σ in C there exists astandard inductive de�nition of the interpretation of terms in context,induced by the interpretation of Σ.

Consider equations in context. Say an equation in EqΣ holds for aninterpretation I if the interpretations of the terms in context are equalmorphims in the category.Say an interpretation is a model of a set of equations if it satis�es all theequations in the set.Finally can state:

Valeria de Paiva (NASSLLI2012) June, 2012 98 / 113

Page 130: Category Theory for All (NASSLLI 2012)

Deductive Systems as Categories

Categorical Curry-Howard reloaded..

Soundness Theorem[Categorical Modelling of IPL]Let C be a cartesian closed category with coproducts and let I be a modelof EqΣ in C. Then I satis�es any equation derivable from Eqσ usingequational logic.

Valeria de Paiva (NASSLLI2012) June, 2012 99 / 113

Page 131: Category Theory for All (NASSLLI 2012)

Deductive Systems as Categories

Categorical Curry-Howard reloaded..

Soundness Theorem[Categorical Modelling of IPL]Let C be a cartesian closed category with coproducts and let I be a modelof EqΣ in C. Then I satis�es any equation derivable from EqΣ usingequational logic.

Completeness Theorem[Categorical Modelling of IPL]For all signatures Σ there exists a cartesian closed category with coproductsC and an interpretation of the calculus in this category such that:If Γ ` t : A and Γ ` s : A are derivable, then t and s are interpreted as thesame morphism only if t = s is provable from the equations above usingtyped equational logic.

Valeria de Paiva (NASSLLI2012) June, 2012 100 / 113

Page 132: Category Theory for All (NASSLLI 2012)

Deductive Systems as Categories

Wadler's Take

Valeria de Paiva (NASSLLI2012) June, 2012 101 / 113

Page 133: Category Theory for All (NASSLLI 2012)

A taste of Glue Semantics?...

Glue semantics in 5 minThanks for slides, Dick!

Glue semantics is a theory of the syntax-semantics interface that useslinear logic for meaning composition.Distinguish two separate logics in semantic interpretation

1. Meaning logic: target logical representation

2. Glue logic: logical speci�cation of how chunks of meaning are assembled

In principle, Glue uses any of several grammar formalisms/any of themainstream semantics. In practice Glue started for LFG, with a vanillaMontague-style logic for meanings.

Valeria de Paiva (NASSLLI2012) June, 2012 102 / 113

Page 134: Category Theory for All (NASSLLI 2012)

A taste of Glue Semantics?...

Linguistic applications of linear logic

1. Categorial and type-logical grammar (Moortgat, vanBenthem):including parsing categorial grammars (Morrill, Hepple) andcompositional semantics of categorial grammars (Morrill, Carpenter)

2. `Glue semantics' (a version of categorial semantics without anassociated categorial grammar?) (Dalrymple, Lamping & Gupta))

3. Resource-based reformulations of other grammatical theoriesMinimalism (Retore,Stabler)Lexical Functional Grammar (Saraswat,Muskens)Tree Adjoining Grammar (Abrusci)

4. Also AI issues such as the frame problem (White) or planning(Dixon) with linguistic relevance

Valeria de Paiva (NASSLLI2012) June, 2012 103 / 113

Page 135: Category Theory for All (NASSLLI 2012)

A taste of Glue Semantics?...

Curry-Howard Isomorphism (CHI)

CHI = Pairing of proof rules with operations on proof termsBut doesn't work for all logics, or proof systems

De�nes interesting identity criteria for proofsSyntactically distinct derivations corresponding to same proof

Intimate relation between logic and type-theory.Varied applications, e.g.

� Proofs as programs

� Semantic construction for natural language

Valeria de Paiva (NASSLLI2012) June, 2012 104 / 113

Page 136: Category Theory for All (NASSLLI 2012)

A taste of Glue Semantics?...

Example: Input to Semantic Interpretation

Lexicon

Word Meaning Glue

John john ↑ where ↑= g

Fred fred ↑ where ↑= h

saw λy.λx. see(x, y) ↑ .OBJ −◦ (↑ .SUBJ −◦ ↑)where ↑= f , f.OBJ = h, f.SUBJ = g

Constituents g, h, f : semantic resources, consuming & producing meanings

Valeria de Paiva (NASSLLI2012) June, 2012 105 / 113

Page 137: Category Theory for All (NASSLLI 2012)

A taste of Glue Semantics?...

Lexical Premises: Their nature

saw

aλy.λx. see(x, y) : bh −◦ (g −◦ f)

cMeaning Term dGlue Formula(Propositional LL)

Atomic propositions (f, g, h):• Correspond to syntactic constituents found in parsing• Denote resources used in semantic interpretation(Match production & consumption of constituent meanings)

Meaning terms:• Expressions in some chosen meaning language• Language must support abstraction and application• . . . but otherwise relatively free choice

Valeria de Paiva (NASSLLI2012) June, 2012 106 / 113

Page 138: Category Theory for All (NASSLLI 2012)

A taste of Glue Semantics?...

Cutting and Pasting 1...

Valeria de Paiva (NASSLLI2012) June, 2012 107 / 113

Page 139: Category Theory for All (NASSLLI 2012)

A taste of Glue Semantics?...

The Form of Glue Derivations

Γ ` M : f

where• Γ is set of lexical premises (instantiated by parse)• f is (LL atom corresponding to) sentential constituent• M is meaning term produced by derivation(Semantic) Ambiguity

Often (many) alternative derivations Γ ` Mi : feach producing a di�erent meaning termMi for f

Need to �nd all alternative derivations (e�ciently!)

Valeria de Paiva (NASSLLI2012) June, 2012 108 / 113

Page 140: Category Theory for All (NASSLLI 2012)

A taste of Glue Semantics?...

Alternative Derivations: Modi�er Scope

Consider phrase �alleged criminal from London�λx. criminal(x) : fλP. alleged(P ) : f −◦ fλPλx. from(l, x) ∧ P (x) : f −◦ f

Two derivations, resulting in:

1. λx. from(l, x) ∧ alleged(criminal)(x) : f2. alleged(λx. from(l, x) ∧ criminal(x)) : f

Valeria de Paiva (NASSLLI2012) June, 2012 109 / 113

Page 141: Category Theory for All (NASSLLI 2012)

A taste of Glue Semantics?...

Independence of Glue and Meaning

Original Glue (93) �Curry-Howard� Glue (97)mixes meanings & glue separates meanings & glue

gjohn john : ghfred fred : h

∀y. hy −◦ ∀x. (gx −◦ fsee(x, y)) λyλx. see(x, y) : h −◦ (g −◦ f)

Some meaning separation rules:• [[∀M. (rM −◦ ϕ)]]m = λM. [[ϕ]]m• [[rM]]m =M

Some expressions can't be separated: gjohn −◦ fsleep(john)� Avoid these: derivations dependent on meanings,

and higher order uni�cation needed to match meanings

Curry-Howard: good for understanding derivationsOriginal: good for understanding premises

Valeria de Paiva (NASSLLI2012) June, 2012 110 / 113

Page 142: Category Theory for All (NASSLLI 2012)

A taste of Glue Semantics?...

Skeletons and modi�ers?

Valeria de Paiva (NASSLLI2012) June, 2012 111 / 113

Page 143: Category Theory for All (NASSLLI 2012)

A taste of Glue Semantics?...

Glue Sales Pitch

Linguistically powerful & �exible approachInteresting analyses of scope, control (Asudeh), event-based semantics(Fry), intensional verbs (Dalrymple), context dependence,coordination.But many other phenomena still to do

Grammar & semantics engineeringApplicable to grammars besides LFG based onesSteep learning curve for writing lexical entriesBut turns out to allow plentiful re-use of �lingware�

Can be implemented e�ciently

Valeria de Paiva (NASSLLI2012) June, 2012 112 / 113

Page 144: Category Theory for All (NASSLLI 2012)

A taste of Glue Semantics?...

Conclusions

We missed Ulrik but managed to muddle through some basic de�nitions ofcategory theory.Covered categories, functors, natural transformations and some examples.Also discussed adjunctions and two of their easier examples: free monoidsand cartesian closedness.We discussed an extended version of CurryHoward to relates logics, notonly to type theory, but also to categories and structures inside thosecategories. Here's a graphic reminder of the main point.

As an novel and kind of unique application we mentione Glue Semanticsvery brie�y.

Valeria de Paiva (NASSLLI2012) June, 2012 113 / 113