This package is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.

Sketches: Outline with References by Charles Wells Addendum 15 September 2009

This package contains the original article, written in December, 1993, and this addendum, which lists a few references to papers and books that have been written since 1993. Additional and Updated References Atish Bagchi and Charles Wells, Graph Based and Sketches. May be downloaded from http://arxiv.org/PS cache/arxiv/pdf/0809/0809.3023v1.pdf Michael Barr and Charles Wells, Toposes, Triples and Theories. Revised and corrected edition now available online at http://www.case.edu/artsci/math/wells/pub/pdf/ttt.pdf Michael Barr and Charles Wells, Category Theory for Computing Science, third edi- tion (1999). Les Publications CRM, Montreal. Zinovy Diskin and Uwe Wolter, A diagrammatic logic for object-oriented visual model- ing. Electronic Notes in Theoretical (2006). May be downloaded from http://www.cs.toronto.edu/ zdiskin/Pubs/ACCAT-07.pdf Ren´eGuitart, The theory of sketches. Journ´eesFaiscaux et Logique (1981). Online at http://pagesperso-orange.fr/rene.guitart/textespublications/guitart81theosketches.pdf Peter Johnstone, Sketches of an Elephant, Vol. 2, Chapter D2. Oxford University Press (2003). Yoshiki Kinoshita, John Power, and Makoto Takeyama. Sketches. In Mathematical Foun- dations of Programming Semantics, Thirteenth Annual Conference, Stephen Brookes and Michael W. Mislove, editors. Elsevier (1997). Michael Makkai, Generalized sketches as a framework for completeness theorems. Journal of Pure and Applied Algebra 115 (1997): 49-79, 179-212, 214-274.

1 Sketches: Outline with References∗

Charles Wells 8 December 1993

1 Introduction

1.1 Purpose directory math/wells. The BibTEX source for the bibliography is in a file in the same direc- This document is an outline of the theory of tory called sketch.bib. sketches with pointers to the literature. An extensive bibliography is given. Some cover- 1.1.1 Addendum 8 December 1993 age is given to related areas such as algebraic This version of this document contains a num- theories, categorial model theory and catego- ber of additions and corrections pointed out by rial logic as well. An appendix beginning on M. Barr, C. Lair and P. Ag´eron and some I dis- page 14 provides definitions of some of the covered myself. I do not intend to produce fur- less standard terms used in the paper, but the ther revisions of this document. I understand reader is expected to be familiar with the basic that another, much more extensive document ideas of category theory. A rough machine gen- concerning sketches is in preparation, and I erated index begins on page 27. expect that the forthcoming text by Ad´amek I would have liked to explain the main ideas and Rosiˇcky[1994] will have a useful guide to of all the papers referred to herein, but I am the literature on categorical logic. not familiar enough with some of them to do I will post any corrections anyone sends me that. It seemed more useful to be inclusive, in a file available by FTP in the directory men- even if many papers were mentioned without tioned above. comment. One consequence of this is that the discussions in this document often go into more 1.2 Terminology detail about the papers published in North This outline uses the terminology for sketches America than about those published elsewhere. given in [Barr and Wells, 1990], Chapters 4, 7, The DVI file for this article is available by 9 and 10. It is quite different from the usage anonymous FTP from ftp.cwru.edu in the of the French school beginning with Charles

∗Copyright c 1998 by Charles Wells. This document may be freely redistributed or quoted from for noncommercial purposes, provided it is not changed.

1 Ehresmann [1968b], the inventor of sketches. is a difference, but the terminology from [Barr The French usage is explained wherever there and Wells, 1990] is the one used in discussions.

2 Sketches

In this section, sketches in the standard sense Makkai and Par´e [1990] use “commutativity are defined. Generalizations are discussed in conditions” — pairs of paths in the graph with Section 9. An excellent short outline of sketch common source and target — instead of dia- theory using North American terminology may grams. be found in [Makkai and Par´e, 1990], Chap- Many authors take the compositive graph ter 3. More details are in [Barr and Wells, to be simply a category. This is in fact not a 1985] and [Barr and Wells, 1990]. The best restriction (Section 5). source for the French version is by Coppey and Lair [1984], [1988]. 2.2 Morphisms of sketches 2.1 Sketches If S and S0 are sketches, a graph homomorph- 2.1.1 Definition ism f : GS GS0 is a morphism of sketches if it takes−→ each diagram of S to a diagram of A sketch S consists of a graph GS, a set DS of S0, each cone of S to a cone of S0, and each diagrams in GS, a set LS of cones in GS and a cocone of S to a cocone of S0. This produces set CS of cocones in GS. the category Sk of sketches. Graphs, cones, cocones and other tech- Each small category has an underlying nical terms are defined in the Appendix, sketch whose graph isC the underlying graph page 14. The phrase “distinguished diagram of , whose diagrams are all the commutative of S” means a diagram in D , and analogously S diagramsC in , whose cones are all the limit for cones and cocones. cones in andC whose cocones are all the limit 2.1.2 Variations in terminology cocones inC . C The French replace the sets GS and DS with a compositive graph MS. The cones and cocones 2.3 Models of sketches must be commutative cones and cocones in MS. These approaches are clearly equivalent. Let S be a sketch and a category. M : S Some North American variations: Barr and is a model of S in ifCM is a sketch morphism−→C Wells [1985] add a function that specifies which from S to the underlyingC sketch of .IfM and C arrows must become identities in a model. M 0 are two models of S in , µ : M M 0 is a This was abandoned in [Barr and Wells, 1990] homomorphism of modelsC if µ is−→ a natural because one can force an arrow u to be an iden- transformation from M to M 0. tity by including the diagram This produces a category of models of u the sketch S in , using vertical composition R of natural transformationsC as the composition. • 2 This category is denoted Mod (S). The cat- of mathematical structure. For example, there C egory of models of S in the category of sets is a sketch for groups; its models “are” groups is denoted Mod(S), and normally the phrase and the homomorphisms between its models “model of S” without qualification means a are exactly the group homomorphisms. There model in the category of sets. is a clear analogy with the way a path in a A model of a sketch in the category of topological space is defined as a continuous sets associates a set with each node of the map from a closed interval to the space. (And a graph of the sketch, so that the nodes of the loop is a map from the unit circle, and so on.) graph specify the sorts of the structure. The Of course, the traditional techniques of first arrows correspond to mappings between sets order logic provide another way of specifying that are values of the sorts, so they specify structures, and so does the method of signa- the operations of the structure. The cones tures and equations used in universal algebra. and cocones formally specify constructed sorts. More about this in Section 6. For example, a discrete cone whose diagram has n nodes specifies a set of n-tuples, with the Sketches show their superiority (in my ith entry drawn from the value of the ith node opinion) particularly when you want to deal in the diagram. General limit diagrams spec- with multisorted structures, and when you ify equationally defined subsorts, and colimit want to deal with models in categories other diagrams specify quotient structures (coequal- than sets. izers), free products (coproducts), and amal- gamated products (pushouts). There is a second point of view concerning 2.4 Remarks sketches, that a sketch is a presentation of a Sketches were invented by Ehresmann to pro- category in the usual sense of “presentation”. vide a mathematical way to specify a species This is discussed in Section 5.

3 Kinds of sketches

3.1 A listing of types one node and no arrows, and the category of graphs is equivalent to the category of models By restricting the kinds of cones and cocones of the trivial sketch whose graph is that occur, we obtain a hierarchy of types of source- sketches. I list them from the most primitive g1 - g0 to the most complex (the listing is not quite a target total order). 3.1.2 A linear or elementary sketch 3.1.1 A trivial sketch consists of a graph (the latter is the French name) may have dia- only, with no diagrams, cones or cocones. For grams, but has no cones or cocones. The cat- example, the category of sets and functions is egory of reflexive graphs is given by such a the category of models of the trivial sketch with sketch [Barr and Wells, 1990], [Coppey and

3 Lair, 1988], Le¸con 6. Models of linear sketches ology in the style of universal algebra. are algebraic structures whose operations are 3.1.7 A finite sum sketch or FS sketch all unary. has finite cones and finite discrete cocones. 3.1.3 A linear sketch with constants 3.1.8 A projective sketch has any kind has no cocones and cones only over the empty of cone but no cocones. diagram. Thus they allow one to specify unary operations and also specific elements (nullary 3.1.9 A regular sketch has any kind of operations) in a model. See [Barr and Wells, cone, and cocones that allow one to require an 1990], Section 4.7. arrow to be an epimorphism in a model. In the literature, models are generally required to 3.1.4 A finite product sketch, or FP be in regular categories (why this is done is sketch, has no cocones and all the cones are discussed in Section 5.3). Note: The French based on finite discrete diagrams. These corre- school uses the phrase “regular sketch” for a spond in expressive power to (multisorted, in sketch in which no node is the vertex of more general) universal algebras given by (finite) sig- than one cone. natures and equations, so their models include well known algebraic structures such as semi- 3.1.10 A coherent sketch has finite groups, groups and rings. They do not include cones and finite cocones that are either discrete fields. See 6.2.1 below. or “regular epi specifications” (see [Makkai and Par´e, 1990], page 42). The definition in terms 3.1.5 A finite discrete sketch has only of sieves in [Barr and Wells, 1985], page 294, discrete cones and cocones. It is usually is equivalent. required that the models of a finite discrete sketch (and a finite sum sketch – see 3.1.7) 3.1.11 A geometric sketch has finite be in a category with finite disjoint sums cones and arbitrary cocones. The arbitrary (see [Barr and Wells, 1990], page 219, or any cocones can be replaced by arbitrary discrete book on topos theory). This is discussed in in cocones and arbitrary sieves, since sieves can Section 5.3. The category of fields is the cate- be expressed in terms of coequalizers of paral- gory of models of a finite discrete sketch. lel sets of arrows and those and sums generate all colimits. See 5.3 and 7. 3.1.6 A finite limit or FL sketch has no cocones and all the cones are based on finite 3.1.12 A mixed sketch is the French diagrams. These correspond up to equivalence name for any sketch. to essentially algebraic structures as defined by Freyd [1972]. See the discussion by Makkai 3.2 Notation for the French School and Par´e [1990], page 2 (bottom). Finite limit The main focus of Ehresmann, Guitart, Lair, sketches can sketch all structures expressible Coppey and others of the French school has by Horn theories, and more [Barr, 1989]. Finite been on properties of projective sketches and limit sketches are called “left exact” sketches mixed sketches. In their modern papers, they in [Barr and Wells, 1985]. Cartmell [1986] use a systematic notation: //S// denotes a provides a different (and illuminating) point mixed sketch. Its underlying projective sketch of view concerning finite limit sketches, and is /S/, its underlying compositive graph is S, Reichel [1987] develops an equivalent method- and its underlying oriented graph is S. 4 4 Examples and applications of sketches

4.1 Algebraic structures sketched by an FL sketch (finite limit cones Many examples of sketches of algebraic struc- only). These include categories with various tures (groups, rings, fields, M-sets, ...) are types of canonically-chosen limits and colim- given by Coppey and Lair [1988], Le¸con 6. its, cartesian closed categories, toposes, and Some algebraic structures are sketched by Barr others. Constructions of this kind are given in and Wells [1985] and [1990]. [Lair, 1970], [Burroni, 1970a], [Burroni, 1970b], There are two ways of thinking of algebraic [Conduche, 1973], [Lair, 1975a], [Lair, 1977b], structures. I will illustrate them using semi- [Lair, 1979], [Burroni, 1981], [McDonald and groups as an example. Stone, 1984], [Barr and Wells, 1985], [Even and Ag´eron, 1987], [Coppey and Lair, 1985], 1. A semigroup is a set S together with a [Coppey and Lair, 1988], and [Wells, 1990]. I function that takes each ordered pair of have not seen many of these papers and so will elements of S to an element of S, such not try to summarize their contents and rela- that .... tionships. A general framework for sketching 2. A semigroup consists of a function m : structured categories is given by Lair [1987b], S S S such that .... and a very different one with many examples × −→ by Makkai [1993a]. Many mathematicians would say these are Barr and Wells [1992] indicate how to use exactly the same, since S S is the set of × regular sketches to sketch categories with lim- ordered pairs of elements of S. To a categorist, its and functors that preserve them but not S S is the product of S with itself, so its ele- × necessarily on the nose. ments can be represented as ordered pairs of A sketch for 2-categories is given in [Power elements of S, but in fact S S is determined × and Wells, 1992]. I have been informed that only by what you specify its first and second sketches for 2-categories and double categories coordinate functions to be together with the can be constructed using the monoidal closed universal property of products. For this rea- structure on the category of sketches given son, the category of models of a sketch for semi- in [Lair, 1975b]. groups is equivalent but not isomorphic to the category of semigroups in sense (1) above. This 4.3 Sketching sketches is discussed in more detail in [Barr and Wells, 1990], pages 170–172. Sketches and the morphisms between them can themselves be sketched using FL sketches. 4.2 Sketches for categories These are are discussed in [Burroni, 1970a], The sketch for categories is given in detail [Lair, 1974], [Coppey and Lair, 1984], Le¸con 4 in [Barr and Wells, 1990], Section 9.1.4 and and in [Lair, 1987a]. in [Coppey and Lair, 1988], page 64. This 4.4 Sketches in computer science was first done by Ehresmann [1966], [1968a] and [1968b] Gray [1989] describes a systematic and general Many types of categories with extra struc- approach to algebraic semantics using sketches. ture are essentially algebraic and can be See also [Gray, 1987] and [Gray, 1990]. Duval

5 and Reynaud [1994a], [1994b] introduce a braic specification of data structures and com- systematic methodology for computing using puter languages. Most of the constructions sketches. In particular, they use finite sum in that literature can be translated directly sketches to compute in fields of arbitrary char- into the construction of finite product sketches. acteristic. See also [Duval and S´en´echaud, Ehrig and Mahr [1985] is a fundamental text 1994]. Sketches and context-free grammars in the field. Also, the book by Reichel [1987] are discussed in [Wells and Barr, 1988] and develops an alternative formulation of finite (without actually mentioning sketches) [Wal- limit theories, with many examples drawn from ters, 1988] Examples of mathematical struc- computer science. Other surveys and basic tures used in computer science also occur in papers are [Goguen et al., 1978], [Dybjer, the following papers, not all of which actually 1986], [Manes and Arbib, 1986], [Wagner et use sketches although they easily could have. I al., 1985] and [Goguen, 1990]. [Barr and Wells, have not seen some of these papers. [Guitart, 1990] has an extensive list of references in this 1986], [Guitart, 1988], [Wells and Barr, 1988], area, updated in [Barr and Wells, 1993b]. [Lellahi, 1989], [MacDonald and Stone, 1990], Permvall [1991] provides a large bibliogra- [Cockett, 1990], [Gray, 1991a] and [Barr and phy of literature concerning sketches in com- Wells, 1990], Chapters 7, 9 and 10. puter science. They are not all included in this There is a large literature concerning alge- summary.

5 The Theory of a sketch

5.1 Doctrines sketches are categories with all small limits and functors that preserve small limits. Given a Let E be a type of sketch, determined by what type E, we will refer to E-sketches, E-categories sorts of cones and cocones are allowed in the and E-functors. Following Lawvere, we will sketch. Thus E could be any of the types listed refer to E as a doctrine.1 in Section 3, and many others. Correspond- ing to each type E there is a type of category, required to have all limits, respectively colim- 5.2 The categorial theory of a sketch its, of the type of cones, respectively cocones, allowed by E. Likewise, there is a type of func- Using the preceding notation, for any doctrine tor, required to preserve that type of limits or E, every E-sketch S has an E-theory, which is colimits. an E-category ThE(S) together with a sketch For example, corresponding to finite prod- morphism HM : S ThE(S) with the fol- uct sketches are categories that have all lowing property: For−→ every E-category and finite products and functors that preserve every model M : S there is an E-functorC finite products. Corresponding to projective Th (M):Th (S) −→C, unique up to natural E E −→C 1A doctrine can be a type of category requiring other structure besides limits and colimits – precisely, any type of category definable essentially algebraically over the category of categories.

6 isomorphism, for which called the classifying topos2 of the sketch, and explains why geometric sketches have been HM- SThE(S) studied specially among all sketches, and why, @ in much of the literature, sketches with cocones @ M @ ThE(M) are required to have models in categories hav- @@R ? ing some of the properties of toposes (for exam- (1) ple, disjoint sums). C commutes. This determines ThE(S)upto The unadorned phrase “generic model of S” equivalence of categories. The morphism HM usually refers to the model of S in its classifying is a model of S in ThE(S) called the generic topos. E-model of S. Other constructions for special kinds of As a consequence of the definition, sketches are given in [Peake and Peters, 1972], HM induces a natural equivalence between [Kelly, 1982b] and [Barr and Wells, 1993a]. Mod (S) and the category of E-functors from The last paper is based on a direct (not induc- C Th (S)to ; the equivalence takes a model M tive and not by embedding) construction of the E C to the functor ThE(M) shown in Diagram 1. free category with limits generated by a cate- An analogous construction holds for E cat- gory. egories with designated E-limits and functors The (strict) E-theory of a sketch (for arbi- that preserve them on the nose; then the corre- trary E) is the initial algebra for the finite limit sponding theory functor is a left adjoint to the sketch of E-categories with constants added underlying functor and the underlying functor describing the sketch [Wells, 1990]. is monadic [Ag´eron, 1991]. It is useful to call the theory in this sense the strict theory and 5.3.1 Note concerning toposes A the theory in the sense of the preceding para- topos is a category in which roughly speak- graph the loose theory (following the French ing one can pretend the objects are sets and usage). the arrows are functions, except that one must restrict the rules of inference in one’s rea- 5.3 Construction of theories of sketches soning. Intuitionistic or constructive reason- The strict theory was first constructed ing, defined precisely, is always appropriate in [Ehresmann, 1968b] and the loose theory in a topos. You may be able to use more (they called it the type) in citebastehres. Barr powerful tools in particular toposes, such as and Wells [1985] give a proof using the Yoneda the law of the excluded middle (in a Boolean Lemma that FL sketches generate FL theo- topos) or the existence of only two truth val- ries. Another embedding construction pro- ues. Topos theory and its logic is expounded duces the theory for many types of sketches in [Johnstone, 1977], [Barr and Wells, 1985], with cocones[Barr and Wells, 1985], Chapter 8. [Mac Lane and Moerdijk, 1992], and [McLarty, In both cases, one gets an E-embedding of 1992], among others. A brief but illuminating the theory in a topos for free. This topos is discussion of toposes is given in the review of

2 If you know some topology, you will eventually notice that the arrow HM goes backward compared to the corresponding arrow for classifying spaces, so that the name “classifying topos” seems to be a false analogy. This is because in this case HM is the left adjoint of a geometric morphism that does indeed go from the the category in which the models live to the classifying topos. C 7 [Bell, 1988] by McLarty [1990]. Another useful axioms due to Lawvere and Tierney that they discussion is given by Phoa [1993]. called an “elementary topos”. Every Grothen- The word “topos” has two meanings. The dieck topos is an elementary topos, but not first is the meaning originally given it by conversely. I am using the word topos to Grothendieck — a category of sheaves over a mean elementary topos, but be warned: many site. The second is a structure determined by authors use it to mean Grothendieck topos.

6 Categories as theories

6.1 Specification of mathematical 6.1.3 Categorial theories A third structures approach is that of regarding an E-category (for a particular doctrine E)asaE-theory, Mathematicians historically have created often called a categorial theory3 or cate- mathematical structures to be approximations gorical theory. Such phrases mean that the of physical phenomena, extracting the salient category is being thought of as analogous to a properties of physical behavior and making logical theory. In this setting, the semantics them precise. is given by an E-functor to some E-category . Of course, every E-theory is the theory of anC C 6.1.1 Mathematical logic Classical E-sketch, namely the underlying E sketch of . C mathematical logic has done something simi- A categorial theory has the advantage of lar: One creates formal mathematical objects being independent of any particular presenta- (language, term, formula, rule of inference) tion, in much the same way that linear trans- that are special types of strings of symbols and formations have the advantage of being coor- sets thereof. These objects are precise math- dinate-free as compared to matrices. ematical constructions that extract and make The idea of categories as theories is dis- formal certain properties of the statements and cussed in the context of computer science by deductions that occur in mathematical theo- Fourman and Vickers [1986]. rems and proofs. Let’s call this string-based syntax. 6.2 Background The notion of category as theory and sketch as 6.1.2 Signatures and Equations In presentation of the theory originated in three universal algebra, one specifies structures using streams of thought. tuple-based syntax — signatures and equa- tions. This formalism has been extended to 6.2.1 Algebraic theories In the essentially algebraic theories by Reichel [1987]. 1960’s, Lawvere [1963], [1968] introduced the Of course, universal algebraists also use classi- idea that a category should be used to specify cal first order logic. one-sorted algebraic structures such as groups

3In this paper, I use “categorial theory” because to logicians the phrase “categorical theory” means a theory with only one model up to isomorphism. On the other hand, “categorial” is confusing to linguists.

8 and rings. He called the category the alge- a categorial theory, although in the early days braic theory of the type of structure; it is it was thought of as the analog of a classifying a category in which every object is a sum space more than as a theory (see Section 5.3 (coproduct) of a single object that corresponds above). Tierney [1976] clearly had in mind the to the underlying set of the algebra. The construction of what I would call the classify- semantics is given by a contravariant func- ing topos of a sketch, but I am not familiar tor that takes sums to products. Other early with the early history of the relation between papers in this field are [Linton, 1966], [Linton, toposes, sketches and logic (see Section 7.5 1969b], and [Linton, 1969a]. below for more references in this area), and An algebraic theory is equivalent to the there may be earlier references to this idea. opposite category of the theory of a finite prod- uct sketch for the same type of structure4. Manes [1975] treats algebraic theories and 6.2.3 Sketches The third strand is the their relation with monads (see Section 7.2) in introduction of sketches based on what are detail. They are also treated by Pareigis [1970]. now called compositive graphs by Ehres- Models in toposes are treated by Johnstone mann [1968b], [1972]. He and his students and Wraith [1978] and by Rosebrugh [1980]. developed the subject extensively, but I think Blackwell, Kelly and Power [1989] provide an it is fair to say that for the most part they stud- important generalization. ied sketches and their models directly and did 6.2.2 Classifying toposes The con- not focus on the passage to the corresponding cept of classifying topos is another example of categorial theories.

7 Properties of model categories

7.1 Properties of model categories [Guitart and Lair, 1980] also contains a lot of information about the properties of model cat- Categories of models of particular doctrines of egories for special kinds of sketches. sketches (or of categories in the role of the- 7.1.1 The category of models of a linear ories) have specific properties that have been sketch is a topos. (Two particular such toposes studied in some detail. As one would expect are discussed in [Lawvere, 1989].) the more one can specify in a sketch, the less nice is the category of models. I will mention 7.1.2 The category of models of a finite two examples here. More detail is in [Barr and product sketch has limits and filtered colimits Wells, 1985], page 297 (that list omits to men- computed “sortwise”, is regular and has effec- tion that all geometric theories have filtered tive equivalence relations. These statements colimits computed sortwise). The major paper imply that the category of models is a variety.

4For some authors, an algebraic theory is the opposite category of what Lawvere called an algebraic theory, in which case it is equivalent to the finite product sketch. Note that finite product sketches in general sketch multisorted structures.

9 A limit or colimit constructed “sortwise” of the category of Kleisli algebras of the monad means that the underlying set functor(s) (there determined by the functor. See [Mac Lane, is one for each node of the graph of the sketch) 1971], [Manes, 1975], and [Barr and Wells, preserve the limit or the colimit. The fact that 1985] for introductions to the subject of mon- the product of two groups is defined on the ads. product of their underlying sets is an instance Algebraic structures in enriched categories of sortwise construction. The free product of (properly defined) are also monadic (propertly two groups is not defined on the direct sum defined!) [Kelly and Power, 1991]. of their underlying sets — and the direct sum There are many theorems stating that some is a colimit but not a filtered colimit. On the kind of categories with structure are monadic other hand, a coequalizer is a filtered colimit, over Cat or over some category of sketches and indeed one constructs quotient groups on or graphs. See [Lair, 1975a], [Lair, 1979], the quotient of the underlying set. [McDonald and Stone, 1984], [Coppey and Johnstone [1985], [1990], has given condi- Lair, 1985], [Ag´eron, 1991] (not all of which tions on an algebraic theory for its category of I have seen). models (the variety it generates) to be respec- tively a topos or a cartesian closed category. 7.3 Characterization of model cate- Ag´eron [1992] gives sufficient conditions on gories a class of sketches for the following category to be cartesianS closed: Its objects are all cate- Gabriel and Ulmer [1971] give a complete char- gories Mod(S) with S in , and its arrows are acterization of those categories that are ModS all functors preserving sufficientlyS filtered col- for a finite limit sketch S. [Ulmer, 1971] is a imits. summary of that result in English. Lair [1981] characterized sketchable cat- 7.2 Connections with monads egories (those that are equivalent to ModS A functor U : that has a left for some sketch S) (see also [Mouen, 1984].) adjoint determinesC− two→D categories, its category This result was rediscovered and elaborated by of Eilenberg-Moore algebras and its cat- Makkai and Par´e [1990], who called such cat- egory of Kleisli algebras. U is monadic egories accessible categories. I recommend or tripleable if is equivalent to its cate- the review by Gray [1991b]. gory of Eilenberg-MooreC algebras. Remark- Guitart and Lair [1980] showed that ably, monadic functors U : are up to axiomatizable categories are the same as equivalence just the underlyingC−→Set functors from sketchable categories. The definition of categories of algebraic structures defined by “axiomatizable” involves “satisfying” certain signatures (possibly with boundedly infinitary cones in a specific sense (the cones correspond operations) and equations. to cocones of the sketch). This is also a char- When U is monadic, the operations and acterization of sketchable categories, though I equations of the signature can be recovered think it is fair to say that it is not a categorial from the natural endomorphisms of the under- characterization. lying functors [Linton, 1969b], and the Kleisli If I understand it correctly, [Day and algebras turn out to be the free algebras. In Street, 1990] can be interpreted as a kind of fact, Lawvere’s algebraic theory is the opposite characterization of sketchable categories.

10 Barr [1986] has some results of a similar and [Meseguer and Goguen, 1985]. nature of this form: for certain E and E0, if the When the sketch has cocones, initial alge- category of models of an E sketch has certain bras need not exist. If the cocones are all dis- properties of the category of models of an E0 crete, we have the case of a localizable cat- sketch (where E0 is more restrictive), then it is egory [Diers, 1977]. Then each component of in fact (equivalent to) the category of models the category of models has an initial algebra; of an E0 sketch. for fields, these are the prime fields. These are constructed inductively in [Wells and Barr, 7.4 Initial algebras and locally free dia- 1988]. The construction there includes the con- grams struction of the initial algebra for a finite limit theory as a special case. 7.4.1 Initial algebras for FL sketches Let S be a finite limit sketch. The cate- In the general case, instead of a free alge- gory Mod(S) of its models in the category of bra, one has a locally free diagram, which in sets has an initial model or initial alge- most important cases is small (but not neces- bra, a model M with the property that there sarily unique). This is developed by Guitart is exactly one homomorphism from M to any and Lair [1980] (see also [Guitart and Lair, model. This follows from the work of Gabriel 1981] and [Guitart and Lair, 1982a]). A Galois and Ulmer [1971]. (That work actually implies group is an example of a locally free diagram the existence of initial algebras for any projec- [Lair, 1983]. tive sketch whose cones are over diagrams with 7.5 Logic bounded cardinality.) There is a considerable literature that works 7.4.2 Free algebras When S is a finite out precise string-based languages and rules of limit sketch, Mod(S) has an underlying func- inference that correspond in expressive power tor to G0 , where G is the set of nodes of to certain specific types of categorial theories. Set 0 the graph of S. This functor has a left adjoint Starting at the bottom, equational logic is the F , which means that if is any G -indexed logic of finite product theories. Note that in X 0 family of sets, then F ( )isafree algebra on the general categorial treatment, one allows X . This actually follows from the existence of some sorts of a multisorted theory to be empty X initial algebras for finite limit sketches, as fol- in a model, which complicates the logic. The lows: For each set X in (where g isanode treatment of equational logic in [Goguen and g X of G), adjoin one new constant of type g for Meseguer, 1985] illustrates this admirably. each element x Xg. The resulting sketch is Coste [1976] and McLarty [1986] provide ∈ still a finite limit sketch, and its initial model a language and rules of inference for finite is the desired free algebra. limit theories (see also [Keane, 1975]), and Such free algebras can be constructed McLarty [1989] does the same for regular the- inductively from the ground up, Herbrand ories. style. (See [Ehresmann, 1969], [Kelly, 1980]. [Makkai and Reyes, 1977] is the classic This construction, for finite product sketches source for the translation between geometric (although they don’t explicitly use sketches), theories and first order string-based logic. This has been used extensively to model data types work is updated by Pitts [1989], which I rec- in computing. See [Goguen et al., 1978] ommend for its succinct technical introduction

11 to the ideas. See also [Reyes, 1977] and [Par´e, nected graphs cannot be specified in first order 1989]. logic limited to finite formulas and terms (I The texts by Johnstone [1977], Lambek and don’t have a reference to this). Finite sketches Scott [1986] (which also develops the connec- that contain formal coequalizers may require tion between cartesian closed categories and infinitary disjunctions to express the corre- the typed λ-calculus), McLarty [1992], and sponding structure in first order logic. In the Mac Lane and Moerdijk [1992] all describe the case of connected graphs, that a graph is con- internal language of a topos. Other papers nected is expressed by the requirement that worth looking at in this area are [Boileau and the formal coequalizer of the source and tar- Joyal, 1981], [Bunge, 1984], [Osius, 1975b], get maps must be the formal terminator. [Osius, 1975a], [Poign´e, 1986a], [Fourman, 1977] and [Vickers, 1993]. Bell [1988] develops Another subtlety: The preceding discussion topos theory completely in terms of its lan- concerns the question of expressing the struc- guage. Lawvere [1975] discusses some of the ture sketched by a sketch using a first order early history of the subject. theory in such a way that a model of the first In a somewhat subtle sense, sketches are order theory is an example of the structure. equivalent in expressive power to first order Of course, you can incorporate all of Zermelo- logic [Guitart and Lair, 1982b], [Makkai and Fr¨ankel set theory in the logical theory and Par´e, 1990]. The subtlety may be seen by express the structure as an element of a model considering the category of connected graphs, of the logical theory, but that is a different mat- which is sketchable by a finite sketch, but con- ter.

8 Categories of sketches

8.1 Properties of categories of sketches 8.2 Institutions

The information in this subsection was pro- Sketches form an institution [Goguen and vided in part by C. Lair and P. Ag´eron. Burstall, 1986]. This is a formalization of the The category of sketches is studied in [Lair, idea that morphisms of sketches (equivalently, 1975b], [Gray, 1989] and [Lair, 1988]. In a morphism of theories) induce a morphism the first paper, it is shown that the cate- of the model categories going the other way. gory of sketches is sketchable by a projective It is spelled out in [Barr and Wells, 1990], sketch, from which it follows that it is com- Section 10.3. In connection with this, one plete and cocomplete. He also shows that can ask whether, for a particular type of the- it is monoidally closed; applications of this ory, a morphism of theories that induces an are given in [Lair, 1977a] and [Ag´eron, 1992]. equivalence on the category of models must [Gray, 1989] gives several explicit constructions be an equivalence of theories (conceptual com- in the category of sketches, in particular show- pleteness). The answer is yes for pretoposes ing that it is cartesian closed. [Makkai and Reyes, 1977], Chapter 8, (see

12 also [Pitts, 1989]) Some form of Morita the- Palmquist and Palmquist, 1973], [Borceux and ory can also explain when categories of mod- Vitale, 1991] and [McKenzie, 1992]. els are equivalent (but in this case without Lair [1979] gives precise conditions on necessarily being induced by a morphism of a morphism of sketches for it to induce a theories); for this, see [Freyd, 1966], [Lind- monadic functor (see Section 7.2) between ner, 1974], [Elkins and Zilber, 1976], [Fisher- model categories.

9 Generalizations of the concept of sketch

The idea that sketches can be sketched using order sketches. One can conceive of a whole an FL sketch (see subsection 4.3) is the basis hierarchy of orders of sketches; this is the idea of a generalization of the concept of sketch of both [Lair, 1987b] and [Makkai, 1993a] (see in [Wells, 1990], developed for 2-sketches in also [Makkai, 1993b]). Kelly [1982a] gener- [Power and Wells, 1992]. [Barr and Wells, alizes the concept of sketch to enriched cate- 1992] contains other examples of their use. gories, beginning on page 218. See also [Kelly, Because of the relationship between sketches 1982c]. Obtulowicz [1992] describes a type of and first order logic (see 7.5), these generaliza- sketch that is intended to generate an infinite tions are appropriately referred to as higher- graph rather than a category.

10 Omissions

In preparation for this report, I have gradu- The following papers clearly should be ally become aware that the paper [Guitart and included, but I either don’t have them or Lair, 1980] is of major importance and should have not become familiar enough with them be more widely known. It has not influenced to say anything. [Ad´amek and Rosiˇcky, 1991], this report as much as it should have because [Ag´eron, 1989], [Andr´eka and N´emeti, 1979], I have so far gained only a partial understand- [B´enabou, 1972], [Bastiani, 1973], [Coppey, ing of its contents. Similar comments could 1972], [Coppey, 1990], [Foltz and Lair, 1972], probably be made about [Isbell, 1972], but I [Foltz et al., 1980], [Henry, 1982], [Johnson and understand it even less. Walters, 1992], [Lair, 1971].

11 Acknowledgments

13 I am grateful to Michael Barr, Robin Cock- from [Permvall, 1991], which has an excellent ett, Colin McLarty, Jim Otto and Robert Par´e discussion of sketches and their applications to for conversations that clarified some of these computer science. Not all of the items men- ideas. Pierre Ag´eron, Michael Barr, G. M. tioned in [Permvall, 1991] are included here. Kelly and Christian Lair found errors and The diagrams in this paper were prepared provided more references. The bibliography using Michael Barr’s diagram.tex. Thanks to includes several items that I learned about Carol Larson for typing sketch.bib.

Appendix: Some definitions

We define graphs, diagrams, cones and cocones for which these diagrams commute: in detail because the terminology is not stan- dard. f1 - G1 H1

11.1 Graphs source source ? ? - 11.1.1 Definition G0 H0 f0

A graph G consists of two sets G0 and G and two functions source :G G and f1 1 1 0 G - H target :G G . −→ 1 1 1 −→ 0 target target The elements of G0 are called the nodes ? ? or vertices of G and the elements of G are G - H 1 0 f 0 the arrows of G. If an arrow a has source x 0 and target y we write a : x y. A graph is conventionally drawn using− dots→ or labels for (Commutative diagrams are defined for- the nodes, and an arrow going from node x to mally in Section 11.4 below. This one means node y for each element a of G with source x 1 that source f = f source and target f = and target y. ◦ 1 0 ◦ ◦ 1 f0 ◦ target.) The subscripts 0 and 1 are nor- mally omitted when mentioning graph homo- morphisms, in the same way they are for func- tors. 11.1.2 Definition Every category has an underlying graph whose nodes are the objects of the category A homomorphism of graphs f :G H is a and whose arrows are the arrows of the cate- pair of functions f :G H and f :G−→ H gory with the same source and target. 0 0 −→ 0 1 1 −→ 1 14 11.1.3 Definition 11.2 Reflexive graphs

Let f,f0 : G be graph homomorphisms 11.2.1 Definition to a category−→C.Anatural transformation C φ : f f 0 is a family of arrows φx : f(x) A reflexive graph is a graph with additional −→ −→ f 0(x) indexed by the nodes of G with the prop- structure, namely a function loop : G G 0 −→ 1 erty that for every arrow u : x x0 of the satisfying the equations following diagram commutes: −→ C loop φx- - f(x) f 0(x) G0 G1 @ @ source f(u) f 0(u) G0 @ @ ? ? @R ? - f(x0) f 0(x0) G0 φx0 This is just like the definition of natu- loop G - G ral transformation for functors between cate- 0 1 @ gories, which in any case makes no use of the G@ target composition in the domain of the functors. 0 @ A path of length n from x to y in a graph G @@R ? G is a sequence f ,f ,...,f of arrows with the 0 h 1 2 ni property that the target of fj 1 is the source − (In this text, I follow the categorial custom of of fj for j =2,...,n, source(f1)=x and using the name of an object also as the name target(fn)=y.Ifp = f1,f2,...,fn is a path of its identity arrow.) The arrows of the form from x to y, we write ph: x y. Fori each node −→ loop(x) for some node x are called the distin- x, there is one empty path : x x. guished loops. We extend the definition ofhi homomorphism−→ F :G H of graphs to paths in G by mapping −→ A homomorphism of reflexive graphs F over the nodes in the path: is a homomorphism of graphs that takes dis- tinguished loops to distinguished loops. F f1,f2,...,fn = F (f1),F(f2),...,F(fn) h i h i The underlying reflexive graph of a cate- The nodes of G and the paths form a cat- gory is the underlying graph with the identity egory, the free category generated by the arrows as the distinguished loops. graph G, with the empty paths as identity arrows and composition by concatenation. See 11.3 Compositive graphs [Barr and Wells, 1990], Sections 2.1 and 2.6, for the details. The French school bases its definition of sketch The set of paths of length n in G is denoted on the concept of a compositive graph or Gn. In particular, a path of length 2 is a pair multiplicative graph: A compositive graph f,g of arrows such that the source of g is the G is a reflexive graph with a partially defined h i target of f. Such a pair is called a compos- binary operation κ : CG G satisfying the able pair. laws CG–1 through CG–3−→ below. If f,g is h i 15 a composable pair and κ(f,g) is defined, we to these two diagrams 5 write g ◦f for κ(f,g) (note the reversal). f - GH h CG.1 CG is a subset of G2. @ @ f h g R - CG.2 For all arrows f, f id and @ GH ◦ source(f) @@R ? g id f are both defined and equal target(f) ◦ G to f. (2) are these two graphs respectively: CG.3 If g ◦f is defined, source(g ◦f)= a - source(f) and target(g ◦f) = target(g). ij b @ Associativity is not required. A category is a @ c R a - b @ uv compositive graph G for which CG = G2 and @@R ? c the composition is associative. See [Coppey k and Lair, 1984], Le¸con 2 for details. (Their “oriented graph” is our reflexive graph.) See The diagrams in (2) are not the same! Section 3.2 for notation concerning these ideas. A diagram d:I in a category is com- mutative if for all−→C pairs of paths p,C q : x y A functor between compositive graphs is −→ defined just like functors between categories. in the shape graph I between the same two In all cases, if F is a functor and g f is nodes, d(p) and d(q) have the same compos- ◦ ites in . For example, if the left diagram defined, then F (g)◦F (f) is defined and equal C in (2) commutes, then g ◦f = h, whereas if the to F (g ◦f). right diagram commutes, then g ◦f = h =idG 11.4 Diagrams and f ◦g =idH . (The point is that there is an empty path from G to G and another one from If I and G are graphs, a graph homomorphism H to H.) d : I G is a diagram in G. In this case, I The concept of commutative diagram −→ is the shape graph of the diagram. If I is a requires composition; it makes sense in a com- graph, is a category, and d is a diagram in positive graph but not in a graph in general. C the underlying graph of , we will write it as In much of the categorial literature, a dia- C d : I . gram d:I is defined to be a functor from a −→C By convention, a diagram is drawn in such category (most−→C commonly a small category) I a way that its shape graph can be recovered to . A graph-based diagram can be converted (except for the actual names of the nodes and toC an equivalent category-based one by basing arrows) from the way it is drawn by replacing it on the free category generated by the graph. each node of the drawn graph by a different Conversely, a functor defined on a category is label (whether two nodes as drawn have the a diagram based on the underlying graph ofI . same label or not) and similarly for arrows. But be careful: there are in general diagramsI For example, the shape graphs corresponding based on the underlying graph of that are I 5Many computer scientists write f; g in this case, a notation that has certain advantages. Many French authors use g ◦f but draw the horizontal arrows in their diagrams from right to left so that the composite matches the path indicated by the arrows.

16 not functors from , because there is no way itive graph (hence in a category) is commuta- to enforce the preservationI of composition. tive by definition. The base diagram of a cone in a category 11.5 Cones is not required to be commutative. 11.5.1 Definition If the shape graph of the base diagram has only identity arrows, the cone is discrete. If d : I G is a diagram in a graph G, then a cone p−→: v d consists of an object v of and A cocone in based on a diagram d : I −→ C consists of anC object v of and arrows−→ a set of arrows pk : v d(k) indexed by the −→ iC : d(k) v indexed by the objectsC of I.Itis nodes of I.Ifd : I is a diagram in a cate- k −→ gory , the cone p−:→Cv d is commutative if commutative if for all u : k k0 in I, C −→ −→ for all arrows u : k k0 in I, −→ i vd k (k) pk - vd(k) @I@ @ @ ik0 d(u) p @ @ k0 @ d(u) @ ? @@R ? d(k0) d(k0) commute. commutes. [Barr and Wells, 1990] has an extensive dis- The diagram d is called the base diagram cussion of limits and colimits using the ter- of the cone and the arrows pk are the projec- minology introduced here. Mac Lane [1971] tions or sometimes elements of the cone. is an excellent source for limits and colimits Note that the concept of commutative cone defined in terms of functors based on small does not make sense for a cone in a graph, categories, with many mathematical examples. although it does for a cone in a compositive Poign´e [1986b] introduces limits and colimits in graph. For most authors, a cone in a compos- the context of computer science.

17 References volume 278 of Grundlehren der mathematischen Wissenschaften. At the end of each entry, the pages on which that Springer-Verlag, New York, 1985. A list of entry is cited are listed in parentheses. corrections and additions is maintained in [Ad´amek and Rosiˇcky, 1991] Jiˇr´i Ad´amek and [Barr and Wells, 1993c]. (2, 4, 5, 7, 9, 10, Jiˇr´i Rosiˇcky. On injectivity in locally 18) presentable categories. Transactions of the American Mathematical Society, 336(2), 1991. [Barr and Wells, 1990] Michael Barr and Charles (13) Wells. Category Theory for Computing Science. Prentice-Hall International Series in [Ad´amek and Rosiˇcky, 1994] Jiˇr´i Ad´amek and Computer Science. Prentice-Hall International, Jiˇr´i Rosiˇcky. Locally Presentable and New York, 1990. The document [Barr and Accessible Categories. Cambridge Wells, 1993b] contains corrections and University Press, 1994. (Note: The title may additions to the book. (1, 2, 3, 4, 5, 6, 12, have been changed. The ISBN number is 15, 17, 18) 0-521-42261-2.). (1) [Barr and Wells, 1992] Michael Barr and Charles [Ag´eron, 1989] Pierre Ag´eron. S´emantique Wells. On the limitations of sketches. cat´egorique des constructeurs de types d’ordre Canadian Mathematical Bulletin, 35:287–294, sup´erieur. Diagrammes, 22:31–44, 1989. 1992. (5, 13) (13)

[Ag´eron, 1991] Pierre Ag´eron. Structure des [Barr and Wells, 1993a] Michael Barr and Logiques et Logique des Structures: Charles Wells. The category of diagrams, 1993. Logiques, Cat´egories, Esquisses. PhD To appear in the Journal of Pure and Applied thesis, Universit´e Paris 7, 1991. (7, 10) Algebra. (7)

[Ag´eron, 1992] Pierre Ag´eron. The logic of [Barr and Wells, 1993b] Michael Barr and structures. Journal of Pure and Applied Charles Wells. Category Theory for Computing Algebra, 79:15–34, 1992. (10, 12) Science: Update. Available by anonymous FTP from triples.math.mcgill.ca in [Andr´eka and N´emeti, 1979] H. Andr´eka and directory pub/barr. The file is called I. N´emeti. Formulas and ultraproducts in ctcsupdate.dvi, 1993. Corrections and categories. Beit. zur Alg. und Geom., 8, 1979. additions to [Barr and Wells, 1990]. (6, 18) (13) [Barr and Wells, 1993c] Michael Barr and [Barr, 1986] Michael Barr. Models of sketches. Charles Wells. Corrections to Toposes, Triples Cahiers de Topologie et G´eom´etrie and Theories. Available by anonymous FTP Diff´erentielle Cat´egorique, 27:93–107, 1986. from triples.math.mcgill.ca in directory (11) pub/barr, 1993. Corrections and additions to [Barr, 1989] Michael Barr. Models of Horn [Barr and Wells, 1985]. (18) theories. Contemporary Mathematics, 92:1–7, 1989. (4) [Bastiani, 1973] Andr´ee Bastiani. Sketched structures and completions. Cahiers de [Barr and Wells, 1985] Michael Barr and Charles Topologie et G´eom´etrie Diff´erentielle, Wells. Toposes, Triples and Theories, 14:158–160, 1973. (13)

18 [Bastiani and Ehresmann, 1972] Andr´ee Bastiani [Cockett, 1990] J. Robin Cockett. List-arithmetic and Charles Ehresmann. Categories of sketched distributive categories: Locoi. Journal of Pure structures. Cahiers de Topologie et G´eom´etrie and Applied Algebra, 66:1–29, 1990. (6) Diff´erentielle, 13:104–213, 1972. (9) [Conduche, 1973] F. Conduche. Definition des [Bell, 1988] J.L. Bell. Toposes and Local Set topos elementaires par limites projectives Theories: An Introduction. Oxford Logic finies. Notes, Paris, 1973. (5) Guides. Oxford University Press, 1988. (8, 12, 24) [Coppey, 1972] L. Coppey. Th´eories alg´ebriques et extensions de pr´efaisceaux, et compl´ements. [B´enabou, 1972] Jean B´enabou. Structures Cahiers de Topologie et G´eom´etrie algebriques dans les categories. Cahiers de Diff´erentielle, XIII(1 et 3), 1972. (13) Topologie et G´eom´etrie Diff´erentielle, 13:103–214, 1972. (13) [Coppey, 1990] L. Coppey. Graphes structuraux. Diagrammes, 24:33–75, 1990. (13) [Blackwell et al., 1989] R. Blackwell, G.M. Kelly, and A.J. Power. Two-dimensional monad [Coppey and Lair, 1984] L. Coppey and C. Lair. theory. The Journal of Pure and Applied Le¸cons de th´eorie des esquisses. Diagrammes, Algebra, 59:1–41, 1989. (9) 12, 1984. (2, 5, 16)

[Boileau and Joyal, 1981] A. Boileau and [Coppey and Lair, 1985] L. Coppey and C. Lair. A. Joyal. La logique des topos. Symbolic Logic, Alg´ebricit´e, monadicit´e, esquissabilit´eet 46:6–16, 1981. (12) non-alg´ebricit´e. Diagrammes, 13, 1985. (5, 10) [Borceux and Vitale, 1991] Francis Borceux and Enrico Vitale. A Morita theorem for algebraic [Coppey and Lair, 1988] L. Coppey and C. Lair. theories, 1991. Preprint. (13) Le¸cons de th´eorie des esquisses, partie II. [Bunge, 1984] Marta C. Bunge. Toposes in logic Diagrammes, 19, 1988. Contains many and logic in toposes. Topoi, 3:13–22, 1984. elementary examples of sketches. (2, 3, 5) (12) [Coste, 1976] Michel Coste. Une approche logique [Burroni, 1981] A. Burroni. Alg´ebres graphiques. des th´eories d´efinissables par limites Cahiers de Topologie et G´eom´etrie projectives finies.InS´eminaire B´enabou. Diff´erentielle, XXII, 1981. (5) Universit´e Paris-Nord, 1976. (11) [Burroni, 1970a] Albert Burroni. Esquisses des [Day and Street, 1990] Brian Day and Ross cat´egoriesa ` limites et des quasi-topologies. Street. Localisations of locally presentable Esquisses Math´ematiques, 5, 1970. (5) categories II. Journal of Pure and Applied Algebra, 63:225–229, 1990. (10) [Burroni, 1970b] E. Burroni. Cat´egories discretement structur´ees. Esquisses [Diers, 1977] Y. Diers. Cat´egories Math´ematiques, 5, 1970. (5) Localizables. PhD thesis, Universit´e de Paris, 1977. (11) [Cartmell, 1986] J. Cartmell. Generalized algebraic theories and contextual categories. [Duval and Reynaud, 1994a] Dominique Duval Annals Pure Applied Logic, 32:209–243, 1986. and Jean-Claude Reynaud. Sketches and A different approach to models of finite limit computation (1). Mathematical Structures in theories. (4) Computer Science, 1994. (6)

19 [Duval and Reynaud, 1994b] Dominique Duval Rocky Mountain Mathematical Journal, and Jean-Claude Reynaud. Sketches and 6:199–225, 1976. (13) computation (2). Mathematical Structures in Computer Science, 1994. (6) [Even and Ag´eron, 1987] C. Even and P. Ag´eron. Ag´eron, rapport de stage de diplome d’etudes [Duval and S´en´echaud, 1994] Dominique Duval approfondies. Paris, 1987. (5) and Pascale S´en´echaud. Sketches and [Fisher-Palmquist and Palmquist, 1973] parametrization. Theoretical Computer J. Fisher-Palmquist and P. H. Palmquist. Science, 1994. (6) Morita contexts and equivalences of enriched [Dybjer, 1986] P. Dybjer. Category theory and functor categories, 1973. (13) programming language semantics: an overview. [Foltz and Lair, 1972] F. Foltz and Christian In Category Theory and Computer Lair. Fermeture standard des cat´egories Programming, D. Pitt, editor, volume 240 of al’ebriques. Cahiers de Topologie et G´eom´etrie Lecture Notes in Computer Science, pages Diff´erentielle, 13:275–307, 1972. (13) 165–181. Springer-Verlag, 1986. (6) [Foltz et al., 1980] F. Foltz, Christian Lair, and [Ehresmann, 1966] Charles Ehresmann. G. M. Kelly. Algebraic categories with few Introduction to the theory of structured monoidal biclosed structures or none. Journal categories. Technical Report 10, University of of Pure and Applied Algebra, pages 171–177, Kansas, 1966. (5) 1980. (13)

[Ehresmann, 1968a] Charles Ehresmann. [Fourman, 1977] Michael Fourman. The logic of Cat´egories structur´ees g´en´eralis´es. Cahiers de topoi.InHandbook of Mathematical Topologie et G´eom´etrie Diff´erentielle, Logic, J. Barwise et al., editors. X:139–168, 1968. (5) North-Holland, 1977. (12)

[Ehresmann, 1968b] Charles Ehresmann. [Fourman and Vickers, 1986] Michael Fourman Esquisses et types des structures alg´ebriques. and S. Vickers. Theories as categories.In Bul. Inst. Polit. Ia¸si, XIV, 1968. (2, 5, 7, Category Theory and Computer 9) Programming, D. Pitt et al., editors, volume 240 of Lecture Notes in Computer Science, [Ehresmann, 1969] Charles Ehresmann. pages 434–448. Springer-Verlag, 1986. (8) Construction de structures libres.In Category Theory, Homology Theory and [Freyd, 1966] Peter Freyd. Algebra valued their Applications II, Peter Hilton, editor, functors in general and tensor products in volume 92 of Lecture Notes in Mathematics. particular. Colloquium Mathematicum, Springer-Verlag, 1969. I have not read this. 14:89–106, 1966. (13) (11) [Freyd, 1972] Peter Freyd. Aspects of topoi. [Ehrig and Mahr, 1985] Helmut Ehrig and Bulletin of the Australian Mathematical B. Mahr. Fundamentals of Algebraic Society, 7:1–72, 1972. (4) Specifications I. Springer-Verlag, 1985. (6) [Gabriel and Ulmer, 1971] Peter Gabriel and Friedrich Ulmer. Lokal Pr¨asentierbare [Elkins and Zilber, 1976] B. Elkins and J. Zilber. Kategorien, volume 221 of Lecture Notes in Categories of actions and Morita equivalences. Mathematics. Springer-Verlag, 1971. Contains

20 the characterization of categories of models of Theory, A. Carboni, M. C. Pedicchio, and finite-limit sketches. (10, 11, 25) G. Rosolini, editors, volume 1488 of Lecture Notes in Mathematics, pages 105–130. [Goguen, 1990] Joseph A. Goguen. Types as Springer-Verlag, 1991. (6) theories.InProceedings of Symposium on General Topology and Applications. [Gray, 1991b] John W. Gray. Review of Oxford University Press, 1990. (6) “Accessible Categories: The Foundations of Categorical Model Theory, by Michael Makkai [Goguen and Burstall, 1986] Joseph A. Goguen and Robert Par´e”. Bulletin (New Series) of the and R. M. Burstall. A study in the foundations American Mathematical Society, 25:131–140, of programming methodology: Specifications, 1991. (10) institutions, charters and parchments.In Category Theory and Computer [Guitart, 1986] Ren´e Guitart. On the geometry Programming, D. Pitt et al., editors, volume of computations (I). Cahiers de Topologie et 240 of Lecture Notes in Computer Science, G´eom´etrie Diff´erentielle Cat´egorique, pages 313–333. Springer-Verlag, 1986. (12) 27:107–136, 1986. (6)

[Goguen and Meseguer, 1985] Joseph A. Goguen [Guitart, 1988] Ren´e Guitart. On the geometry and Jos´e Meseguer. Completeness of of computations (II). Cahiers de Topologie et many-sorted equational logic. Houston Journal G´eom´etrie Diff´erentielle Cat´egorique, of Mathematics, 11(3), 1985. (11) 29:297–326, 1988. (6)

[Goguen et al., 1978] Joseph A. Goguen, J.W. [Guitart and Lair, 1980] Ren´e Guitart and Thatcher, and E.G. Wagner. An initial algebra Christian Lair. Calcul syntaxique des mod`eles approach to the specification, correctness and et calcul des formules internes. Diagrammes, implementation of abstract data types.In 4, 1980. (9, 10, 11, 13) Current Trends in Programming Methodology IV, R. Yeh, editor, pages [Guitart and Lair, 1981] Ren´e Guitart and 80–149. Prentice-Hall, 1978. (6, 11) Christian Lair. Existence de diagrammes localement libres 1. Diagrammes, 6, 1981. [Gray, 1987] John W. Gray. Categorical aspects (11) of data type constructors. Theoretical Computer Science, 50:103–135, 1987. (5) [Guitart and Lair, 1982a] Ren´e Guitart and Christian Lair. Existence de diagrammes [Gray, 1989] John W. Gray. The category of localement libres 2. Diagrammes, 7, 1982. sketches as a model for algebraic semantics.In (11) Categories in Computer Science and Logic, John W. Gray and Andre Scedrov, [Guitart and Lair, 1982b] Ren´e Guitart and editors, volume 92 of Contemporary Christian Lair. Limites et co-limites pour Mathematics, pages 109–135. American representer les formules. Diagrammes, 7, 1982. Mathematical Society, 1989. (5, 12) (12)

[Gray, 1990] John W. Gray. Executable [Henry, 1982] C. Henry. Sur quelques probl`emes specifications for data-type constructors. de plongements en alg´ebre. Diagrammes, 7, Diagrammes, 24:7–31, 1990. (5) 1982. Gives a syntactic condition for when a structure of one type is embedded into the [Gray, 1991a] John W. Gray. Order-enriched structure of a “stronger” type that it sketches for typed lambda calculi.InCategory generates. (13)

21 [Isbell, 1972] John Isbell. General functorial [Kelly, 1982a] G.M. Kelly. Basic Concepts of semantics, I. American Journal of Enriched Category Theory. Cambridge Mathematics, 94:535–596, 1972. General University Press, 1982. (13) treatment of theories, including large ones. [Kelly, 1982b] G.M. Kelly. On the (13) essentially-algebraic theory generated by a [Johnson and Walters, 1992] Michael Johnson sketch. Bulletin of the Australian and R. F. C. Walters. Algebra objects and Mathematical Society, 26:45–56, 1982. (7) algebra families for finite limit theories. [Kelly, 1982c] G.M. Kelly. Structures defined by Journal of Pure and Applied Algebra, 83:283 – finite limits in the enriched context. Cahiers de 293, 1992. (13) Topologie et G´eom´etrie Diff´erentielle Cat´egorique, 23:3–42, 1982. (13) [Johnstone, 1977] Peter T. Johnstone. Topos Theory. Academic Press, 1977. (7, 12) [Lair, 1970] Christian Lair. Constructions d’esquisses et transformations naturelles [Johnstone, 1985] Peter T. Johnstone. When is a g´en´eralis´ees. Esquisses Math´ematiques, 2, variety a topos? Algebra Universalis, 1970. (5) 21:198–212, 1985. (10) [Lair, 1971] Christian Lair. Foncteurs d’omission [Johnstone, 1990] Peter T. Johnstone. Collapsed de structures alg´ebriques. Cahiers de Topologie toposes and cartesian closed varieties. Journal et G´eom´etrie Diff´erentielle, 12:447–486, 1971. of Pure and Applied Algebra, 129:446–480, (13) 1990. (10) [Lair, 1974] Christian Lair. Dualit´es pours les [Johnstone and Wraith, 1978] Peter T. structures alg´ebriques esquiss´ees. Cahiers de Johnstone and Gavin Wraith. Algebraic Topologie et G´eom´etrie Diff´erentielle, theories in toposes.InIndexed Categories 15:353–376, 1974. (5) and their Applications, Peter T. Johnstone [Lair, 1975a] Christian Lair. Esquissabilit´eet and Gavin Wraith, editors, volume 661 of triplabilit´e. Cahiers de Topologie et G´eom´etrie Lecture Notes in Mathematics, pages 141–242. Diff´erentielle, 16, 1975. (5, 10) Springer-Verlag, 1978. (9) [Lair, 1975b] Christian Lair. Etude g´en´eral de la [Keane, 1975] Orville Keane. Abstract Horn cat´egorie des esquisses. Esquisses theories.InModel Theory and Topoi, Math´ematiques, 23, 1975. (5, 12) volume 445 of Lecture Notes in Mathematics. [Lair, 1977a] Christian Lair. Fermeture standard Springer-Verlag, 1975. (11) des cat´egories al’ebriques II. Cahiers de [Kelly and Power, 1991] G. M. Kelly and A. J. Topologie et G´eom´etrie Diff´erentielle, 18:3–60, Power. Algebraic structure in the enriched 1977. (12) context, 1991. (10) [Lair, 1977b] Christian Lair. Th`ese de Doctorat es Sciences. PhD thesis, [Kelly, 1980] G.M. Kelly. A unified treatment of Universit´e de Amiens, 1977. (5) transfinite constructions for free algebras, free monoids, colimits, associated sheaves, and so [Lair, 1979] Christian Lair. Condition syntaxique on. Bulletin of the Australian Mathematical de triplabilit´e d’un foncteur alg´ebrique Society, 22:1–84, 1980. (11) esquiss´e. Diagrammes, 1, 1979. (5, 10, 13)

22 [Lair, 1981] Christian Lair. Cat´egories Computer Science and Logic, volume 92. modelables et cat´egories esquissables. American Mathematical Society, 1989. (9) Diagrammes, 6, 1981. (10) [Lellahi, 1989] S. K. Lellahi. Categorical abstract [Lair, 1983] Christian Lair. Diagrammes data types. Diagrammes, 21:1–23, 1989. (6) localement libres, extensions de corps at [Lindner, 1974] Harold Lindner. Morita th´eorie de Galois. Diagrammes, 10, 1983. equivalence of enriched categories. Cahiers de (11) Topologie et G´eom´etrie Diff´erentielle, 15, [Lair, 1987a] Christian Lair. Diagrammes 1974. (13) structur´es de mod`eles. Diagrammes, 18, 1987. [Linton, 1966] F.E.J Linton. Some aspects of (5) equational categories.InProceedings of the [Lair, 1987b] Christian Lair. Trames et Conference on Categorical Algebra at La semantiques cat´egoriques des syst`emes de Jolla, S. Eilenberg et al., editors. trames. Diagrammes, 18, 1987. (5, 13) Springer-Verlag, 1966. (9) [Linton, 1969a] F.E.J. Linton. Applied functorial [Lair, 1988] Christian Lair. Lax-colimites semantics.InSeminar on Triples and structur´ees. Diagrammes, 20:1–90, 1988. Categorical Homology Theory, volume 80 (12) of Lecture Notes in Mathematics, pages 53–74. [Lambek and Scott, 1986] Joachim Lambek and Springer-Verlag, 1969. (9) P. Scott. Introduction to Higher Order [Linton, 1969b] F.E.J. Linton. An outline of Categorical Logic, volume 7 of Cambridge functional semantics.InSeminar on Triples Studies in Advanced Mathematics. Cambridge and Categorical Homology Theory, University Press, 1986. (12) volume 80 of Lecture Notes in Mathematics, [Lawvere, 1963] F.W. Lawvere. Functorial pages 7–52. Springer-Verlag, 1969. (9, 10) Semantics of Algebraic Theories. PhD [Mac Lane, 1971] Saunders Mac Lane. thesis, , 1963. (8) Categories for the Working [Lawvere, 1968] F.W. Lawvere. Some algebraic Mathematician, volume 5 of Graduate Texts problems in the context of functorial semantics in Mathematics. Springer-Verlag, 1971. of algebraic structures.InReports of the (10, 17) Midwest Category Seminar II, volume 61 [Mac Lane and Moerdijk, 1992] Saunders of Lecture Notes in Mathematics. Mac Lane and Ieke Moerdijk. Sheaves in Springer-Verlag, 1968. (8) Geometry and Logic. Universitext. Springer-Verlag, 1992. (7, 12) [Lawvere, 1975] F.W. Lawvere. Introduction to part I.InModel Theory and Topoi, F.W. [MacDonald and Stone, 1990] John L. Lawvere, C. Maurer, and G. C. Wraith, MacDonald and Arthur Stone. Uniformly editors, volume 445 of Lecture Notes in constructive monads. Journal of Pure and Mathematics, pages 3–14. Springer-Verlag, Applied Algebra, 68:225–242, 1990. (6) 1975. (12) [Makkai, 1993a] Michael Makkai. Generalized [Lawvere, 1989] F.W. Lawvere. Qualitative sketches as a framework for completeness distinctions between some toposes of theorems, 1993. Preprint, McGill University. generalized graphs.InCategories in (5, 13)

23 [Makkai, 1993b] Michael Makkai. The syntax of [McLarty, 1992] Colin McLarty. Elementary categorical logic, 1993. Preprint, McGill Categories, Elementary Toposes. Oxford University. (13) Logic Guides. Clarendon Press, 1992. (7, 12) [Makkai and Par´e, 1990] Michael Makkai and R. Par´e. Accessible Categories: the [Meseguer and Goguen, 1985] J. Meseguer and Foundations of Categorical Model Joseph Goguen. Initiality, induction and Theory, volume 104 of Contemporary computability.InAlgebraic Methods in Mathematics. American Mathematical Society, Semantics, M. Nivat and J.C. Reynolds, 1990. (2, 4, 10, 12) editors. Cambridge University Press, 1985. (11) [Makkai and Reyes, 1977] Michael Makkai and Gonzalo Reyes. First Order Categorical [Mouen, 1984] F. Mouen. Sur la caract´erisation Logic, volume 611 of Lecture Notes in s´emantique des cat´egories de structures. Mathematics. Springer-Verlag, 1977. (11, Diagrammes, 11, 1984. (10) 12) [Obtulowicz, 1992] Adam Obtu lowicz. Graphical [Manes, 1975] E. Manes. Algebraic Theories, sketches. a finite presentation of infinite volume 26 of Graduate Texts in Mathematics. graphs, 1992. Preprint, Institute of Springer-Verlag, 1975. (9, 10) Mathematics, Polish Academy of Sciences, [Manes and Arbib, 1986] E. Manes and Sniadeckich 8, P. O. Box 137, 00-950 Warsaw, M. Arbib. Algebraic Approaches to Poland. (13) Program Semantics. Springer-Verlag, 1986. (6) [Osius, 1975a] Gerhard Osius. Logical and set theoretical tools in elementary topoi.InModel [McDonald and Stone, 1984] J. McDonald and Theory and Topoi, F.W. Lawvere, A. Stone. Topoi over graphs. Cahiers de C. Maurer, and G. C. Wraith, editors, volume Topologie et G´eom´etrie Diff´erentielle, XXV, 445 of Lecture Notes in Mathematics, pages 1984. (5, 10) 297–346. Springer-Verlag, 1975. (12)

[McKenzie, 1992] Ralph McKenzie. Algebraic [Osius, 1975b] Gerhard Osius. A note on and categorical characterizations of categorical Kripke-Joyal semantics for the internal equivalence between varieties, 1992. Preprint, language of topoi.InModel Theory and Department of Mathematics, University of Topoi, F.W. Lawvere, C. Maurer, and G. C. California, Berkeley, CA 94720. (13) Wraith, editors, volume 445 of Lecture Notes [McLarty, 1986] Colin McLarty. Left exact logic. in Mathematics, pages 349–354. J. Pure Applied Algebra, 41:63–66, 1986. Springer-Verlag, 1975. (12) (11) [Par´e, 1989] Robert Par´e. Some applications of [McLarty, 1989] Colin McLarty. Stable surjection categorical model theory.InCategories in logic. Diagrammes, 22:45–57, 1989. (11) Computer Science and Logic, volume 92 of Contemporary Mathematics, pages 325–340. [McLarty, 1990] Colin McLarty. Review of [Bell, American Mathematical Society, 1989. (12) 1988]. Notre Dame Journal of Formal Logic, 31:151–161, 1990. Nice overview of toposes. [Pareigis, 1970] B. Pareigis. Categories and (8) functors. Academic Press, 1970. (9)

24 [Peake and Peters, 1972] E. James Peake and and Partial Algebras. Clarendon Press, Galen R. Peters. Extension of algebraic 1987. (4, 6, 8) theories. Proceedings of the American Mathematical Society, 32:358–362, 1972. [Reyes, 1977] Gonzalo Reyes. Sheaves and (7) concepts: A model-theoretic interpretation of Grothendieck topoi. Cahiers de Topologie et [Permvall, 1991] Oskar Permvall. A bibliography G´eom´etrie Diff´erentielle, 18:405–437, 1977. on sketches from the computer science point of (12) view. Bulletin of the European Association for [Rosebrugh, 1980] Robert Rosebrugh. On Theoretical Computer Science, 45:238–255, algebras defined by operations and equations in 1991. (6, 14) a topos. J. Pure Applied Algebra, 17, 1980. [Phoa, 1993] Wesley Phoa. An introduction to (9) fibrations, topos theory, the effective topos and [Tierney, 1976] Myles Tierney. Forcing topologies modest sets. Available by anonymous FTP and classifying topoi.InAlgebra, Topology from maths.su.oz.au in the directory and Category Theory, Alex Heller and sydcat/papers/phoa. It is the file Myles Tierney, editors, pages 211–220. tech.ps.Z., 1993. (8) Academic Press, 1976. (9)

[Pitts, 1989] Andrew M. Pitts. Conceptual [Ulmer, 1971] Friedrich Ulmer. Locally completeness for first-order intuitionistic logic: α-presentable and locally α-generated An application of categorical logic. Annals of categories.InReports of the Midwest Pure and Applied Logic, 41:33–81, 1989. Category Seminar V, John W. Gray and (11, 13) Saunders Mac Lane, editors, volume 195 of [Poign´e, 1986a] A. Poign´e. Category theory and Lecture Notes in Mathematics. logic.InCategory Theory and Computer Springer-Verlag, 1971. Summary in English of Programming, D. Pitt et al., editors, volume results in [Gabriel and Ulmer, 1971]. (10) 240 of Lecture Notes in Computer Science, [Vickers, 1993] Steve Vickers. Geometric logic in pages 103–142. Springer-Verlag, 1986. (12) computer science. Available by anonymous FTP from theory.doc.ic.ac.uk in directory [Poign´e, 1986b] A. Poign´e. Elements of papers/Vickers. The paper is called categorical reasoning: Products and coproducts GLiCS.dvi., 1993. (12) and some other (co-)limits.InCategory Theory and Computer Programming, [Wagner et al., 1985] E.G. Wagner, S. Bloom, D. Pitt et al., editors, volume 240 of Lecture and J.W. Thatcher. Why algebraic theories? Notes in Computer Science, pages 16–42. In Algebraic Methods in Semantics, Springer-Verlag, 1986. (17) M. Nivat and J.C. Reynolds, editors. Cambridge University Press, 1985. (6) [Power and Wells, 1992] A.J. Power and Charles Wells. A formalism for the specification of [Walters, 1988] R. F. C. Walters. A note on essentially algebraic structures in 2-categories. context-free languages. Technical Report 88-22, Mathematical Structures in Computer Science, The , 1988. (6) 2:1–28, 1992. (5, 13) [Wells, 1990] Charles Wells. A generalization of [Reichel, 1987] Horst Reichel. Initial the concept of sketch. Theoretical Computer Computability, Algebraic Specifications Science, 70:159–178, 1990. (5, 7, 13)

25 [Wells and Barr, 1988] Charles Wells and Semantics, Michael Main et al., editors, M. Barr. The formal description of data types volume 298 of Lecture Notes in Computer using sketches.InMathematical Science. Springer-Verlag, 1988. (6, 11) Foundations of Programming Language

26 INDEX accessible diagram, 2, 16 FS sketch, 4 loose theory, 7 categories, discrete, 17 functor, 16 10 distinguished, 2 mathematical logic, algebraic theory, 9, distinguished loop, generic model, 7 8 10 15 geometric sketch, 4, mixed sketch, 4 amalgamated doctrine, 6 7 model, 2 product, 3 geometric theory, 7, monad, 9, 10 arrow, 14 E-theory, 6, 8 9, 11 monadic, 10, 13 axiomatizable, 10 Eilenberg-Moore graph, 2, 3, 12, 14 Morita theory, 13 algebras, Grothendieck morphism of base diagram, 17 10 topos, 8 sketches, 2 elementary sketch, group, 4, 5 multiplicative cartesian closed 3 graph, 15 category, 5, elementary topos, 8 higher-order sketch, 13 10, 12 elements, 17 natural transforma- homomorphism of categorial theory, 8 empty path, 15 tion, models, 2 categorical theory, epimorphism, 4 15 homomorphism of 8 equation, 4, 8 node, 14 category of models, reflexive equational logic, 11 nullary operation, 4 2 essentially graphs, 15 category of algebraic, Horn theory, 4 operation, 3 sketches, 4–6, 8 initial algebra, 7, 12 path, 15 11 classifying topos, 7, field, 4, 5 presentation, 3 9 filtered colimit, 9 initial model, 11 institution, 12 pretopos, 12 cocone, 2, 17 finite discrete projections, 17 coequalizer, 3, 12 sketch, 4 internal language, 12 projective sketch, 4 coherent sketch, 4 finite limit sketch, pushout, 3 colimits, 17 4, 5, 11 Kleisli algebras, 10 commutative, 17 finite limit theory, quotient, 3 commutative 11 left exact, 4 diagram, finite product limits, 17 reflexive graph, 3, 16 sketch, 4, 9 linear sketch, 3, 9 15 composable pair, 15 finite product linear sketch with regular (category), compositive graph, theory, 11 constants, 4, 9 2 finite sum sketch, 4 4 regular sketch, 4, 5 conceptual com- first order logic, 11, localizable regular theory, 11 pleteness, 12 category, ring, 4, 5 12 FL sketch, 4 11 cone, 2, 17 FP sketch, 4 locally free semigroup, 4, 5 connected graph, free algebra, 11 diagram, shape graph, 16 12 free category, 15 11 sieve, 4 coproduct, 3 free product, 3 logic, 8, 11, 12 signature, 4, 8, 10

27 sketch, 2 syntax, 8, tripleable, 10 14 sketch for 11 trivial sketch, 3 underlying reflexive categories, tuple-based syntax, graph, 15 5 target, 14 8 underlying sketch, sort, 3 theory, 6, 7 type, 7 2 source, 14 topos, 5, 7, 9, 10, universal algebra, 4 strict theory, 7 12 unary operation, 4 string-based triple, 9 underlying graph, vertex, 14

28 Charles Wells Department of Mathematics, Case Western Reserve University 10900 Euclid Avenue, Cleveland, OH 44106-7058, USA [email protected]

29