## Applied Category Theory at UCR (Part 3)

13 November, 2017

We had a special session on applied category theory here at UCR:

Applied category theory, Fall Western Sectional Meeting of the AMS, 4-5 November 2017, U.C. Riverside.

A bunch of people stayed for a few days afterwards, and we had a lot of great discussions. I wish I could explain everything that happened, but I’m too busy right now. Luckily, even if you couldn’t come here, you can now see slides of almost all the talks… and videos of many!

Click on talk titles to see abstracts. For multi-author talks, the person whose name is in boldface is the one who gave the talk. For videos, go here: I haven’t yet created links to all the videos.

### Saturday November 4, 2017

9:00 a.m.A higher-order temporal logic for dynamical systemstalk slides.
David I. Spivak, MIT.

10:00 a.m.
Algebras of open dynamical systems on the operad of wiring diagramstalk slides.
Dmitry Vagner, Duke University
David I. Spivak, MIT
Eugene Lerman, University of Illinois at Urbana-Champaign

10:30 a.m.
Abstract dynamical systemstalk slides.
Christina Vasilakopoulou, UCR
David Spivak, MIT
Patrick Schultz, MIT

3:00 p.m.
Decorated cospanstalk slides.
Brendan Fong, MIT

4:00 p.m.
Compositional modelling of open reaction networkstalk slides.
Blake S. Pollard, UCR
John C. Baez, UCR

4:30 p.m.
A bicategory of coarse-grained Markov processestalk slides.
Kenny Courser, UCR

5:00 p.m.
A bicategorical syntax for pure state qubit quantum mechanicstalk slides.
Daniel M. Cicala, UCR

5:30 p.m.
Open systems in classical mechanicstalk slides.

### Sunday November 5, 2017

9:00 a.m.
Controllability and observability: diagrams and dualitytalk slides.
Jason Erbele, Victor Valley College

9:30 a.m.
Frobenius monoids, weak bimonoids, and corelationstalk slides.
Brandon Coya, UCR

10:00 a.m.
Compositional design and tasking of networks.
John D. Foley, Metron, Inc.
John C. Baez, UCR
Joseph Moeller, UCR
Blake S. Pollard, UCR

10:30 a.m.
Joseph Moeller, UCR
John Foley, Metron Inc.
John C. Baez, UCR
Blake S. Pollard, UCR

2:00 p.m.
Reeb graph smoothing via cosheavestalk slides.
Vin de Silva, Department of Mathematics, Pomona College

3:00 p.m.
Knowledge representation in bicategories of relationstalk slides.
Evan Patterson, Stanford University, Statistics Department

3:30 p.m.
The multiresolution analysis of flow graphstalk slides.
Steve Huntsman, BAE Systems

4:00 p.m.
Data modeling and integration using the open source tool Algebraic Query Language (AQL)talk slides.
Peter Y. Gates, Categorical Informatics
Ryan Wisnesky, Categorical Informatics

## Applied Category Theory 2018 — Adjoint School

22 October, 2017

The deadline for applying to this ‘school’ on applied category theory is Wednesday November 1st.

Applied Category Theory: Adjoint School: online sessions starting in January 2018, followed by a meeting 23–27 April 2018 at the Lorentz Center in Leiden, the Netherlands. Organized by Bob Coecke (Oxford), Brendan Fong (MIT), Aleks Kissinger (Nijmegen), Martha Lewis (Amsterdam), and Joshua Tan (Oxford).

The name ‘adjoint school’ is a bad pun, but the school should be great. Here’s how it works:

### Overview

The Workshop on Applied Category Theory 2018 takes place in May 2018. A principal goal of this workshop is to bring early career researchers into the applied category theory community. Towards this goal, we are organising the Adjoint School.

The Adjoint School will run from January to April 2018. By the end of the school, each participant will:

• be familiar with the language, goals, and methods of four prominent, current research directions in applied category theory;
• have worked intensively on one of these research directions, mentored by an expert in the field; and
• know other early career researchers interested in applied category theory.

They will then attend the main workshop, well equipped to take part in discussions across the diversity of applied category theory.

### Structure

The Adjoint School comprises (1) an Online Reading Seminar from January to April 2018, and (2) a four day Research Week held at the Lorentz Center, Leiden, The Netherlands, from Monday April 23rd to Thursday April 26th.

In the Online Reading Seminar we will read papers on current research directions in applied category theory. The seminar will consist of eight iterations of a two week block. Each block will have one paper as assigned reading, two participants as co-leaders, and three phases:

• A presentation (over WebEx) on the assigned reading delivered by the two block co-leaders.
• Reading responses and discussion on a private forum, facilitated by Brendan Fong and Nina Otter.
• Publication of a blog post on the n-Category Café written by the co-leaders.

Each participant will be expected to co-lead one block.

The Adjoint School is taught by mentors John Baez, Aleks Kissinger, Martha Lewis, and Pawel Sobocinski. Each mentor will mentor a working group comprising four participants. During the second half of the Online Reading Seminar, these working groups will begin to meet with their mentor (again over video conference) to learn about open research problems related to their reading.

In late April, the participants and the mentors will convene for a four day Research Week at the Lorentz Center. After opening lectures by the mentors, the Research Week will be devoted to collaboration within the working groups. Morning and evening reporting sessions will keep the whole school informed of the research developments of each group.

The following week, participants will attend Applied Category Theory 2018, a discussion-based 60-attendee workshop at the Lorentz Center. Here they will have the chance to meet senior members across the applied category theory community and learn about ongoing research, as well as industry applications.

Following the school, successful working groups will be invited to contribute to a new, to be launched, CUP book series.

Meetings will be on Mondays; we will determine a time depending on the locations of the chosen participants.

### Research projects

John Baez: Semantics for open Petri nets and reaction networks
Petri nets and reaction networks are widely used to describe systems of interacting entities in computer science, chemistry and other fields, but the study of open Petri nets and reaction networks is new, and raise many new questions connected to Lawvere’s “functorial semantics”.

Aleks Kissinger: Unification of the logic of causality
Employ the framework of (pre-)causal categories to unite notions of causality and techniques for causal reasoning which occur in classical statistics, quantum foundations, and beyond.
Reading: Kissinger and Uijlen; Henson, Lal, and Pusey.

Martha Lewis: Compositional approaches to linguistics and cognition
Use compact closed categories to integrate compositional models of meaning with distributed, geometric, and other meaning representations in linguistics and cognitive science.

Pawel Sobocinski: Modelling of open and interconnected systems
Use Carboni and Walters’ bicategories of relations as a multidisciplinary algebra of open and interconnected systems.

### Applications

We hope that each working group will comprise both participants who specialise in category theory and in the relevant application field. As a prerequisite, those participants specialising in category theory should feel comfortable with the material found in Categories for the Working Mathematician or its equivalent; those specialising in applications should have a similar graduate-level introduction.

To apply, please fill out the form here. You will be asked to upload a single PDF file containing the following information:

• Your contact information and educational history.
• A brief paragraph explaining your interest in this course.
• A paragraph or two describing one of your favorite topics in category theory, or your application field.
• A ranked list of the papers you would most like to present, together with an explanation of your preferences. Note that the paper you present determines which working group you will join.

Anyone is welcome to apply, although preference may be given to current graduate students and postdocs. Women and members of other underrepresented groups within applied category theory are particularly encouraged to apply.

Some support will be available to help with the costs (flights, accommodation, food, childcare) of attending the Research Week and the Workshop on Applied Category Theory; please indicate in your application if you would like to be considered for such support.

If you have any questions, please feel free to contact Brendan Fong (bfo at mit dot edu) or Nina Otter (otter at maths dot ox dot ac dot uk).

## Applied Category Theory at UCR (Part 2)

21 September, 2017

I’m running a special session on applied category theory, and now the program is available:

Applied category theory, Fall Western Sectional Meeting of the AMS, 4-5 November 2017, U.C. Riverside.

This is going to be fun.

My former student Brendan Fong is now working with David Spivak at MIT, and they’re both coming. My collaborator John Foley at Metron is also coming: we’re working on the CASCADE project for designing networked systems.

Dmitry Vagner is coming from Duke: he wrote a paper with David and Eugene Lerman on operads and open dynamical systems. Christina Vaisilakopoulou, who has worked with David and Patrick Schultz on dynamical systems, has just joined our group at UCR, so she will also be here. And the three of them have worked with Ryan Wisnesky on algebraic databases. Ryan will not be here, but his colleague Peter Gates will: together with David they have a startup called Categorical Informatics, which uses category theory to build sophisticated databases.

That’s not everyone—for example, most of my students will be speaking at this special session, and other people too—but that gives you a rough sense of some people involved. The conference is on a weekend, but John Foley and David Spivak and Brendan Fong and Dmitry Vagner are staying on for longer, so we’ll have some long conversations… and Brendan will explain decorated corelations in my Tuesday afternoon network theory seminar.

Here’s the program. Click on talk titles to see abstracts. For a multi-author talk, the person with the asterisk after their name is doing the talking. All the talks will be in Room 268 of the Highlander Union Building or ‘HUB’.

### Saturday November 4, 2017, 9:00 a.m.-10:50 a.m.

9:00 a.m.
A higher-order temporal logic for dynamical systems.
David I. Spivak, MIT

10:00 a.m.
Algebras of open dynamical systems on the operad of wiring diagrams.
Dmitry Vagner*, Duke University
David I. Spivak, MIT
Eugene Lerman, University of Illinois at Urbana-Champaign

10:30 a.m.
Abstract dynamical systems.
Christina Vasilakopoulou*, University of California, Riverside
David Spivak, MIT
Patrick Schultz, MIT

### Saturday November 4, 2017, 3:00 p.m.-5:50 p.m.

3:00 p.m.
Black boxes and decorated corelations.
Brendan Fong, MIT

4:00 p.m.
Compositional modelling of open reaction networks.
Blake S. Pollard*, University of California, Riverside
John C. Baez, University of California, Riverside

4:30 p.m.
A bicategory of coarse-grained Markov processes.
Kenny Courser, University of California, Riverside

5:00 p.m.
A bicategorical syntax for pure state qubit quantum mechanics.
Daniel M. Cicala, University of California, Riverside

5:30 p.m.
Open systems in classical mechanics.
Adam Yassine, University of California Riverside

### Sunday November 5, 2017, 9:00 a.m.-10:50 a.m.

9:00 a.m.
Controllability and observability: diagrams and duality.
Jason Erbele, Victor Valley College

9:30 a.m.
Frobenius monoids, weak bimonoids, and corelations.
Brandon Coya, University of California, Riverside

10:00 a.m.
Compositional design and tasking of networks.
John D. Foley*, Metron, Inc.
John C. Baez, University of California, Riverside
Joseph Moeller, University of California, Riverside
Blake S. Pollard, University of California, Riverside

10:30 a.m.
Joseph Moeller*, University of California, Riverside
John Foley, Metron Inc.
John C. Baez, University of California, Riverside
Blake S. Pollard, University of California, Riverside

### Sunday November 5, 2017, 2:00 p.m.-4:50 p.m.

2:00 p.m.
Reeb graph smoothing via cosheaves.
Vin de Silva, Department of Mathematics, Pomona College

3:00 p.m.
Knowledge representation in bicategories of relations.
Evan Patterson*, Stanford University, Statistics Department

3:30 p.m.
The multiresolution analysis of flow graphs.
Steve Huntsman*, BAE Systems

4:00 p.m.
Data modeling and integration using the open source tool Algebraic Query Language (AQL).
Peter Y. Gates*, Categorical Informatics
Ryan Wisnesky, Categorical Informatics

## Applied Category Theory 2018

12 September, 2017

There will be a conference on applied category theory!

Applied Category Theory (ACT 2018). School 23–27 April 2018 and workshop 30 April–4 May 2018 at the Lorentz Center in Leiden, the Netherlands. Organized by Bob Coecke (Oxford), Brendan Fong (MIT), Aleks Kissinger (Nijmegen), Martha Lewis (Amsterdam), and Joshua Tan (Oxford).

The plenary speakers will be:

• Samson Abramsky (Oxford)
• John Baez (UC Riverside)
• Kathryn Hess (EPFL)
• David Spivak (MIT)

There will be a lot more to say as this progresses, but for now let me just quote from the conference website:

Applied Category Theory (ACT 2018) is a five-day workshop on applied category theory running from April 30 to May 4 at the Lorentz Center in Leiden, the Netherlands.

Towards an Integrative Science: in this workshop, we want to instigate a multi-disciplinary research program in which concepts, structures, and methods from one scientific discipline can be reused in another. The aim of the workshop is to (1) explore the use of category theory within and across different disciplines, (2) create a more cohesive and collaborative ACT community, especially among early-stage researchers, and (3) accelerate research by outlining common goals and open problems for the field.

While the workshop will host discussions on a wide range of applications of category theory, there will be four special tracks on exciting new developments in the field:

1. Dynamical systems and networks
2. Systems biology
3. Cognition and AI
4. Causality

Accompanying the workshop will be an Adjoint Research School for early-career researchers. This will comprise a 16 week online seminar, followed by a 4 day research meeting at the Lorentz Center in the week prior to ACT 2018. Applications to the school will open prior to October 1, and are due November 1. Admissions will be notified by November 15.

Sincerely,
The organizers

Bob Coecke (Oxford), Brendan Fong (MIT), Aleks Kissinger (Nijmegen), Martha Lewis (Amsterdam), and Joshua Tan (Oxford)

Category theory is a branch of mathematics originally developed to transport ideas from one branch of mathematics to another, e.g. from topology to algebra. Applied category theory refers to efforts to transport the ideas of category theory from mathematics to other disciplines in science, engineering, and industry.

This site originated from discussions at the Computational Category Theory Workshop at NIST on Sept. 28-29, 2015. It serves to collect and disseminate research, resources, and tools for the development of applied category theory, and hosts a blog for those involved in its study.

### The proposal: Towards an Integrative Science

Category theory was developed in the 1940s to translate ideas from one field of mathematics, e.g. topology, to another field of mathematics, e.g. algebra. More recently, category theory has become an unexpectedly useful and economical tool for modeling a range of different disciplines, including programming language theory [10], quantum mechanics [2], systems biology [12], complex networks [5], database theory [7], and dynamical systems [14].

A category consists of a collection of objects together with a collection of maps between those objects, satisfying certain rules. Topologists and geometers use category theory to describe the passage from one mathematical structure to another, while category theorists are also interested in categories for their own sake. In computer science and physics, many types of categories (e.g. topoi or monoidal categories) are used to give a formal semantics of domain-specific phenomena (e.g. automata [3], or regular languages [11], or quantum protocols [2]). In the applied category theory community, a long-articulated vision understands categories as mathematical workspaces for the experimental sciences, similar to how they are used in topology and geometry [13]. This has proved true in certain fields, including computer science and mathematical physics, and we believe that these results can be extended in an exciting direction: we believe that category theory has the potential to bridge specific different fields, and moreover that developments in such fields (e.g. automata) can be transferred successfully into other fields (e.g. systems biology) through category theory. Already, for example, the categorical modeling of quantum processes has helped solve an important open problem in natural language processing [9].

In this workshop, we want to instigate a multi-disciplinary research program in which concepts, structures, and methods from one discipline can be reused in another. Tangibly and in the short-term, we will bring together people from different disciplines in order to write an expository survey paper that grounds the varied research in applied category theory and lays out the parameters of the research program.

In formulating this research program, we are motivated by recent successes where category theory was used to model a wide range of phenomena across many disciplines, e.g. open dynamical systems (including open Markov processes and open chemical reaction networks), entropy and relative entropy [6], and descriptions of computer hardware [8]. Several talks will address some of these new developments. But we are also motivated by an open problem in applied category theory, one which was observed at the most recent workshop in applied category theory (Dagstuhl, Germany, in 2015): “a weakness of semantics/CT is that the definitions play a key role. Having the right definitions makes the theorems trivial, which is the opposite of hard subjects where they have combinatorial proofs of theorems (and simple definitions). […] In general, the audience agrees that people see category theorists only as reconstructing the things they knew already, and that is a disadvantage, because we do not give them a good reason to care enough” [1, pg. 61].

In this workshop, we wish to articulate a natural response to the above: instead of treating the reconstruction as a weakness, we should treat the use of categorical concepts as a natural part of transferring and integrating knowledge across disciplines. The restructuring employed in applied category theory cuts through jargon, helping to elucidate common themes across disciplines. Indeed, the drive for a common language and comparison of similar structures in algebra and topology is what led to the development category theory in the first place, and recent hints show that this approach is not only useful between mathematical disciplines, but between scientific ones as well. For example, the ‘Rosetta Stone’ of Baez and Stay demonstrates how symmetric monoidal closed categories capture the common structure between logic, computation, and physics [4].

[1] Samson Abramsky, John C. Baez, Fabio Gadducci, and Viktor Winschel. Categorical methods at the crossroads. Report from Dagstuhl Perspectives Workshop 14182, 2014.

[2] Samson Abramsky and Bob Coecke. A categorical semantics of quantum protocols. In Handbook of Quantum Logic and Quantum Structures. Elsevier, Amsterdam, 2009.

[3] Michael A. Arbib and Ernest G. Manes. A categorist’s view of automata and systems. In Ernest G. Manes, editor, Category Theory Applied to Computation and Control. Springer, Berlin, 2005.

[4] John C. Baez and Mike STay. Physics, topology, logic and computation: a Rosetta stone. In Bob Coecke, editor, New Structures for Physics. Springer, Berlin, 2011.

[5] John C. Baez and Brendan Fong. A compositional framework for passive linear networks. arXiv e-prints, 2015.

[6] John C. Baez, Tobias Fritz, and Tom Leinster. A characterization of entropy in terms of information loss. Entropy, 13(11):1945–1957, 2011.

[7] Michael Fleming, Ryan Gunther, and Robert Rosebrugh. A database of categories. Journal of Symbolic Computing, 35(2):127–135, 2003.

[8] Dan R. Ghica and Achim Jung. Categorical semantics of digital circuits. In Ruzica Piskac and Muralidhar Talupur, editors, Proceedings of the 16th Conference on Formal Methods in Computer-Aided Design. Springer, Berlin, 2016.

[9] Dimitri Kartsaklis, Mehrnoosh Sadrzadeh, Stephen Pulman, and Bob Coecke. Reasoning about meaning in natural language with compact closed categories and Frobenius algebras. In Logic and Algebraic Structures in Quantum Computing and Information. Cambridge University Press, Cambridge, 2013.

[10] Eugenio Moggi. Notions of computation and monads. Information and Computation, 93(1):55–92, 1991.

[11] Nicholas Pippenger. Regular languages and Stone duality. Theory of Computing Systems 30(2):121–134, 1997.

[12] Robert Rosen. The representation of biological systems from the standpoint of the theory of categories. Bulletin of Mathematical Biophysics, 20(4):317–341, 1958.

[13] David I. Spivak. Category Theory for Scientists. MIT Press, Cambridge MA, 2014.

[14] David I. Spivak, Christina Vasilakopoulou, and Patrick Schultz. Dynamical systems and sheaves. arXiv e-prints, 2016.

## Postdoc in Applied Category Theory

8 September, 2017

guest post by Spencer Breiner

### One Year Postdoc Position at Carnegie Mellon/NIST

We are seeking an early-career researcher with a background in category theory, functional programming and/or electrical engineering for a one-year post-doctoral position supported by an Early-concept Grant (EAGER) from the NSF’s Systems Science program. The position will be managed through Carnegie Mellon University (PI: Eswaran Subrahmanian), but the position itself will be located at the US National Institute for Standards and Technology (NIST), located in Gaithersburg, Maryland outside of Washington, DC.

The project aims to develop a compositional semantics for electrical networks which is suitable for system prediction, analysis and control. This work will extend existing methods for linear circuits (featured on this blog!) to include (i) probabilistic estimates of future consumption and (ii) top-down incentives for load management. We will model a multi-layered system of such “distributed energy resources” including loads and generators (e.g., solar array vs. power plant), different types of resource aggregation (e.g., apartment to apartment building), and across several time scales. We hope to demonstrate that such a system can balance local load and generation in order to minimize expected instability at higher levels of the electrical grid.

This post is available full-time (40 hours/5 days per week) for 12 months, and can begin as early as October 1st.

## Applied Category Theory at UCR

6 April, 2017

The American Mathematical Society is having a meeting here at U. C. Riverside during the weekend of November 4th and 5th, 2017. I’m organizing a session on Applied Category Theory, and I’m looking for people to give talks.

The goal is to start a conversation about applications of category theory, not within pure math or fundamental physics, but to other branches of science and engineering—especially those where the use of category theory is not already well-established! For example, my students and I have been applying category theory to chemistry, electrical engineering, control theory and Markov processes.

Alas, we have no funds for travel and lodging. If you’re interested in giving a talk, please submit an abstract here:

General information about abstracts, American Mathematical Society.

More precisely, please read the information there and then click on the link on that page to submit an abstract. It should then magically fly through cyberspace to me! Abstracts are due September 12th, but the sooner you submit one, the greater the chance that we’ll have space.

For the program of the whole conference, go here:

Fall Western Sectional Meeting, U. C. Riverside, Riverside, California, 4–5 November 2017.

We’ll be having some interesting plenary talks:

• Paul Balmer, UCLA, An invitation to tensor-triangular geometry.

• Pavel Etingof, MIT, Double affine Hecke algebras and their applications.

• Monica Vazirani, U.C. Davis, Combinatorics, categorification, and crystals.

## Category Theory Course Notes

11 March, 2016

My grad students and I have been using a lot of category theory in our work on networks in engineering, chemistry and biology. So I decided to teach an introductory course on category theory, and it was surprisingly popular: 25 grad students registered for it! Clearly there’s a lot of interest in the subject, and we don’t regularly teach a course on it at U. C. Riverside.

Here are the notes from my course. In my earlier fall Fall 2015 seminar, I had tried to explain how category theory unifies mathematics, without getting into lots of technical details. This time I tried to give a systematic introduction to the subject, leading up to a little taste of topos theory. But many proofs were offloaded to another more informal seminar, for which notes are not available.

When I started teaching this course, I imagined that the notes might someday grow into a book I’d always dreamt of: an introduction to category theory that includes lots of examples, talks to the reader in a friendly way, and explains what’s ‘really going on’. However, while teaching the course, I noticed that Emily Riehl has written a book like this, probably better than I ever could. Even better, her book is free online and will be published by Dover:

• Emily Riehl, Category Theory in Context, 2014.

So, I don’t feel much urge to write that book anymore. But there might still be room for a more quirky book on category theory that only I could write. It would probably need to include not only this ‘standard’ material but more on applications.

If you discover any errors in the notes please email me, and I’ll add them to the list of errors.

You can get all 10 weeks of notes in a single file here:

Or, you can look at individual weeks:

Week 1 (Jan. 5 and 7) – The definition of a category. Some familiar categories. Various kinds of categories, including monoids, groupoids, groups, preorders, equivalence relations and posets. The definition of a functor. Doing mathematics inside a category: isomorphisms, monomorphisms and epimorphisms.

Week 2 (Jan. 12 and 14) – Doing mathematics inside a category: an isomorphism is a monomorphism and epimorphism, but not necessarily conversely. Products. Any object isomorphic to a product can also be a product. Products are unique up to isomorphism. Coproducts. What products and coproducts are like in various familiar categories. General limits and colimits. Examples: products and coproducts, equalizers and coequalizers, pullbacks and pushouts, terminal and initial objects.

Week 3 (Jan. 19 and 21) – Equalizers and coequalizers, and what they look like in $\textrm{Set}$ and other familiar categories. Pullbacks and pushouts, and what they look like in $\textrm{Set}.$ Composing pullback squares.

Week 4 (Jan. 26 and 28) – Doing mathematics between categories. Faithful, full, and essentially surjective functors. Forgetful functors: what it means for a functor to forget nothing, forget properties, forget structure or forget stuff. Transformations between functors. Natural transformations. Functor categories. Natural isomorphisms. In a category with binary products, the product becomes a functor, and the commutative and associative laws hold up to natural isomorphism. Cartesian categories. In a cartesian category, the left and right unit laws also hold up to natural isomorphism. A $G$-set is a functor from a group $G$ to $\textrm{Set}.$ What is a natural transformation between such functors?

Week 5 (Feb. 2 and 4) – A $G$-set is a functor from a group $G$ to $\textrm{Set},$ and a natural transformation between such functors is a map of $G$-sets. Equivalences of categories. Adjoint functors: the rough idea. The hom-functor. Adjoint functors: the definition. Examples: the left adjoint of the forgetful functor from $\textrm{Grp}$ to $\textrm{Set}.$ The left adjoint of the forgetful functor from $\textrm{Vect}_k$ to $\textrm{Set}.$ The forgetful functor from $\textrm{Top}$ to $\textrm{Set}$ has both a left and right adjoint. If a category $C$ has binary products, the diagonal functor from $C$ to $C \times C$ has a right adjoint. If it has binary coproducts, the diagonal functor has a left adjoint.

Week 6 (Feb. 9 and 11) – Diagrams in a category as functors. Cones as natural transformations. The process of taking limits as a right adjoint. The process of taking colimits as a left adjoint. Left adjoints preserve colimits; right adjoints preserve limits. Examples: the ‘free group’ functor from sets to groups preserve coproducts, while the forgetful functor from groups to sets preserves products. The composite of left adjoints is a left adjoint; the composite of right adjoints is a right adjoint. The unit and counit of a pair of adjoint functors.

Week 7 (Feb. 16 and 18) – Adjunctions. The naturality of the isomorphism $\textrm{hom}(Fc,d) \cong \textrm{hom}(c,Ud)$ in an adjunction. Given an adjunction, we can recover this isomorphism and its inverse from the unit and counit. Toward topos theory: cartesian closed categories and subobject classifiers. The definition of cartesian closed category, or ‘ccc’. Examples of cartesian closed categories. In a cartesian closed category with coproducts, the product distributes over the coproduct, and exponentiation distributes over the product.

Week 8 (Feb. 23) – Internalization. The concept of a group in a cartesian category. Any pair of objects $X, Y$ in a cartesian closed category has an ‘internal’ hom, the object $X^Y,$ as well as the usual ‘external’ hom, the set $\textrm{hom}(X,Y).$ Evaluation and coevaluation. Internal composition. In a category with a terminal object, we can define the set of elements of any object.

Week 8 (Feb. 25) – Guest lecture by Christina Osborne on symmetric monoidal categories.

Week 9 (Mar. 1 and 3) – For any category $C$ with a terminal object, elements define a functor $\textrm{elt} : C \to \textrm{Set}.$ If $C$ is cartesian, this functor preserves finite products. If $C$ is cartesian closed, $\textrm{elt}(Y^X) \cong \hom(X,Y),$ so it converts the internal hom into the external hom. The ‘name’ of a morphism. Subobjects. The subobject classifier in $\textrm{Set}.$ The general definition of subobject classifier in any category with finite limits. The definition of a topos. Examples of topoi, including the topos of graphs.

Week 10 (Mar. 8 and 10) – The subobject classifier in the topos of graphs. Any topos has finite colimits. Any morphism in a topos has an epi-mono factorization, which is unique up to a unique isomorphism. The image of a morphism in topos. The poset $\textrm{Sub}(X),$ whose elements are subobjects of an object $X$ in a topos. The correspondence between set theory and logic: given a set $X,$ subsets of $X$ correspond to predicates defined for elements of $X,$ intersection corresponds to ‘and’, union corresponds to ‘or’, the set $X$ itself corresponds to ‘true’, and the empty set corresponds to ‘false’. The intersection of subsets of is their product in $\textrm{Sub}(X),$ their union is their coproduct in $\textrm{Sub}(X),$ the set $X$ is the terminal object in $\textrm{Sub}(X),$ and the empty set is the initial object. A lattice is a poset with finite limits and finite colimits, and a Heyting algebra is a lattice that is also cartesian closed. For any object $X$ in any topos, $\textrm{Sub}(X)$ is a Heyting algebra. If we think of these elements of $\textrm{Sub}(X)$ as predicates, the exponential is ‘implication’.

Where does topos theory go from here?

All the notes are handwritten, by Christina Osborne and Samuel Britton. I’d consider paying someone to TeX them up! But as you see, there are a lot of diagrams…. so you should only try it if you want to learn category theory while practicing your TikZ. And if you try it, you should let us know – it would be silly to have more than one person doing the same job, while chopping the job into parts might work well.

## Category Theory for Better Spreadsheets

5 February, 2014

Since one goal of Azimuth is to connect mathematicians to projects that can more immediately help the world, I want to pass this on. It’s a press release put out by Jocelyn Paine, who has blogged about applied category theory on the n-Category Café. I think he’s a serious guy, so I hope we can help him out!

Spreadsheet researcher Jocelyn Ireson-Paine has launched an Indiegogo campaign to fund a project to make spreadsheets safer. It will show how to write spreadsheets that are easier to read and less error-prone than when written in Excel. This is important because spreadsheet errors have cost some companies millions of pounds, even causing resignations and share-price crashes. An error in one spreadsheet, an economic model written in 2010 by Harvard economists Carmen Reinhart and Kenneth Rogoff, has even been blamed for tax rises and public-sector cuts. If he gets funding, Jocelyn will re-engineer this spreadsheet. He hopes that, because of its notoriety, this will catch public attention.

Reinhart and Rogoff’s spreadsheet was part of a paper on the association between debt and economic growth. They concluded that in countries where debt exceeds 90% of gross domestic product, growth is notably lower. But in spring 2013, University of Massachusetts student Thomas Herndon found they had omitted data when calculating an average. Because their paper’s conclusion supported governments’ austerity programmes, much criticism followed. They even received hate email blaming them for tax rises and public-sector cuts.

Jocelyn said, “The error probably didn’t change the results much. But better software would have made the nature of the error clearer, as well as the economics calculations, thus averting ill-informed and hurtful media criticism. Indeed, it might have avoided the error altogether.”

Jocelyn’s project will use two ideas. One is “literate programming”. Normally, a programmer writes a program first, then adds comments explaining how it works. But in literate programming, the programmer becomes an essayist. He or she first writes the explanation, then inserts the calculations as if putting equations into a maths essay. In ordinary spreadsheets, you’re lucky to get any documentation at all; in literate spreadsheets, documentation comes first.

The other idea is “modularity”. This means building spreadsheets from self-contained parts which can be developed, tested, and documented independently of one another. This gives the spreadsheet’s author less to think about, making mistakes less likely. It also makes it easier to replace parts that do have mistakes.

Jocelyn has embodied these ideas in a piece of software named Excelsior. He said, “‘Excelsior’ means ‘higher’ in Latin, and ‘upwards!’ in Longfellow’s poem. I think of it as meaning ‘upwards from Excel’. In fact, though, it’s the name of a wonderful Oxford café where I used to work on my ideas.”

Jocelyn also wants to show how advanced maths benefits computing. Some of his inspiration came from a paper he found on a friend’s desk in the Oxford University Department of Computer Science. Written by professor Joseph Goguen, this used a branch of maths called category theory to elucidate what it means for something to be part of a system, and how the behaviour of a system arises from the behaviours of its parts. Jocelyn said, “The ideas in the paper were extremely general, applying to many different areas. And when you think of modules as parts, they even apply to spreadsheets. This shows the value of abstraction.”

### For more

Postal: 23 Stratfield Road, Oxford, OX2 7BG, UK.
Tel: 07768 534 091.

Jocelyn’s bio: http://www.j-paine.org/bio.html

Jocelyn’s personal website, for academic and general stuff: http://www.j-paine.org/

Background information: links to all topics mentioned can be found at the end of Paine’s campaign text at

These include literate programming, modularity, the Reinhart-Rogoff spreadsheet, category theory, and many horror stories about the damage caused by spreadsheet errors.

## Category Theory for Scientists

23 May, 2013

At last—a textbook on category theory for scientists! And it’s free!

• David Spivak, Category Theory for Scientists.

It’s based on a course the author taught:

This course is an attempt to extol the virtues of a new branch of mathematics, called category theory, which was invented for powerful communication of ideas between different fields and subfields within mathematics. By powerful communication of ideas I actually mean something precise. Different branches of mathematics can be formalized into categories. These categories can then be connected together by functors. And the sense in which these functors provide powerful communication of ideas is that facts and theorems proven in one category can be transferred through a connecting functor to yield proofs of an analogous theorem in another category. A functor is like a conductor of mathematical truth.

I believe that the language and toolset of category theory can be useful throughout science. We build scientific understanding by developing models, and category theory is the study of basic conceptual building blocks and how they cleanly fit together to make such models. Certain structures and conceptual frameworks show up again and again in our understanding of reality. No one would dispute that vector spaces are ubiquitous. But so are hierarchies, symmetries, actions of agents on objects, data models, global behavior emerging as the aggregate of local behavior, self-similarity, and the effect of methodological context.

Some ideas are so common that our use of them goes virtually undetected, such as set-theoretic intersections. For example, when we speak of a material that is both lightweight and ductile, we are intersecting two sets. But what is the use of even mentioning this set-theoretic fact? The answer is that when we formalize our ideas, our understanding is almost always clarified. Our ability to communicate with others is enhanced, and the possibility for developing new insights expands. And if we are ever to get to the point that we can input our ideas into computers, we will need to be able to formalize these ideas first.

It is my hope that this course will offer scientists a new vocabulary in which to think and communicate, and a new pipeline to the vast array of theorems that exist and are considered immensely powerful within mathematics. These theorems have not made their way out into the world of science, but they are directly applicable there. Hierarchies are partial orders, symmetries are group elements, data models are categories, agent actions are monoid actions, local-to-global principles are sheaves, self-similarity is modeled by operads, context can be modeled by monads.

He asks readers from different subjects for help in finding new ways to apply category theory to those subjects. And that’s the right attitude to take when reading this book. I’ve found categories immensely valuable in my work. But it took effort to learn category theory and see how it can apply to different subjects. People are just starting to figure out these things, so don’t expect instant solutions to the problems in your own favorite field.

But Spivak does the best job I’ve seen so far at explaining category theory as a general-purpose tool for thinking clearly. Since I’m busy using category theory to clarify the relationships between fields like chemistry, population biology, electrical engineering and control theory, this subject is very much on my mind.

## A Bicategory of Decorated Cospans

8 July, 2017

My students are trying to piece together general theory of networks, inspired by many examples. A good general theory should clarify and unify these examples. What some people call network theory, I’d just call ‘applied graph invariant theory’: they come up with a way to calculate numbers from graphs, they calculate these numbers for graphs that show up in nature, and then they try to draw conclusions about this. That’s fine as far as it goes, but there’s a lot more to network theory!

There are many kinds of networks. You can usually create big networks of a given kind by sticking together smaller networks of this kind. The networks usually do something, and the behavior of the whole is usually determined by the behavior of the parts and how the parts are stuck together.

So, we should think of networks of a given kind as morphisms in a category, or more generally elements of an algebra of some operad, and define a map sending each such network to its behavior. Then we can study this map mathematically!

All these insights (and many more) are made precise in Fong’s theory of ‘decorated cospans’:

• Brendan Fong, The Algebra of Open and Interconnected Systems, Ph.D. thesis, University of Oxford, 2016. (Blog article here.)

Kenny Courser is starting to look at the next thing: how one network can turn into another. For example, a network might change over time, or we might want to simplify a complicated network somehow. If a network is morphism, a process where one network turns into another could be a ‘2-morphism’: that is, a morphism between morphisms. Just as categories have objects and morphisms, bicategories have objects, morphisms and 2-morphisms.

So, Kenny is looking at bicategories. As a first step, Kenny took Brendan’s setup and souped it up to define ‘decorated cospan bicategories’:

• Kenny Courser, Decorated cospan bicategories, Theory and Applications of Categories 32 (2017), 985–1027.

In this paper, he showed that these bicategories are often ‘symmetric monoidal’. This means that you can not only stick networks together end to end, you can also set them side by side or cross one over the other—and similarly for processes that turn one network into another! A symmetric monoidal bicategory is a somewhat fearsome structure, so Kenny used some clever machinery developed by Mike Shulman to get the job done:

• Mike Shulman, Constructing symmetric monoidal bicategories.

I would love to talk about the details, but they’re a bit technical so I think I’d better talk about something more basic. Namely: what’s a decorated cospan category and what’s a decorated cospan bicategory?

First: what’s a decorated cospan? A cospan in some category $C$ is a diagram like this:

where the objects and morphisms are all in $C.$ For example, if $C$ is the category of sets, we’ve got two sets $X$ and $Y$ mapped to a set $\Gamma.$

In a ‘decorated’ cospan, the object $\Gamma$ is equipped or, as we like to say, ‘decorated’ with extra structure. For example:

Here the set $\Gamma$ consists of 3 points—but it’s decorated with a graph whose edges are labelled by numbers! You could use this to describe an electrical circuit made of resistors. The set $X$ would then be the set of ‘input terminals’, and $Y$ the set of ‘output terminals’.

In this example, and indeed in many others, there’s no serious difference between inputs and outputs. We could reflect the picture, switching the roles of $X$ and $Y,$ and the inputs would become outputs and vice versa. One reason for distinguishing them is that we can then attach the outputs of one circuit to the inputs of another and build a larger circuit. If we think of our circuit as a morphism from the input set $X$ to the output set $Y,$ this process of attaching circuits to form larger ones can be seen as composing morphisms in a category.

In other words, if we get the math set up right, we can compose a decorated cospan from $X$ to $Y$ and a decorated cospan from $Y$ to $Z$ and get a decorated cospan from $X$ to $Z.$ So with luck, we get a category with objects of $C$ as objects, and decorated cospans between these guys as morphisms!

For example, we can compose this:

and this:

to get this:

What did I mean by saying ‘with luck’? Well, there’s not really any luck involved, but we need some assumptions for all this to work. Before we even get to the decorations, we need to be able to compose cospans. We can do this whenever our cospans live in a category with pushouts. In category theory, a pushout is how we glue two things together.

So, suppose our category $C$ has pushouts. IF we then have two cospans in $C,$ one from $X$ to $Y$ and one from $Y$ to $Z:$

we can take a pushout:

and get a cospan from $X$ to $Z:$

All this is fine and dandy, but there’s a slight catch: the pushout is only defined up to isomorphism, so we can’t expect this process of composing cospans to be associative: it will only be associative up to isomorphism.

What does that mean? What’s an isomorphism of cospans?

I’m glad you asked. A map of cospans is a diagram like this:

where the two triangles commmute. You can see two cospans in this picture; the morphism $f$ provides the map from one to the other. If $f$ is an isomorphism, then this is an isomorphism of cospans.

To get around this problem, we can work with a category where the morphisms aren’t cospans, but isomorphism classes of cospans. That’s what Brendan did, and it’s fine for many purposes.

But back around 1972, when Bénabou was first inventing bicategories, he noticed that you could also create a bicategory with

• objects of $C$ as objects,
• spans in $C$ as morphisms, and
• maps of spans in $C$ as 2-morphisms.

Bicategories are perfectly happy for composition of 1-morphisms to be associative only up to isomorphism, so this solves the problem in a somewhat nicer way. (Taking equivalence classes of things when you don’t absolutely need to is regarded with some disdain in category theory, because it often means you’re throwing out information—and when you throw out information, you often regret it later.)

So, if you’re interested in decorated cospan categories, and you’re willing to work with bicategories, you should consider thinking about decorated cospan bicategories. And now, thanks to Kenny Courser’s work, you can!

He showed how the decorations work in the bicategorical approach: for example, he proved that whenever $C$ has finite colimits and

$F : (C,+) \to (\mathrm{Set}, \times)$

is a lax symmetric monoidal functor, you get a symmetric monoidal bicategory where a morphism is a cospan in $C:$

with the object $\Gamma$ decorated by an element of $F(\Gamma).$

Proving this took some virtuosic work in category theory. The key turns out to be this glorious diagram:

For the explanation, check out Proposition 4.1 in his paper.

I’ll talk more about applications of cospan bicategories when I blog about some other papers Kenny Courser and Daniel Cicala are writing.