I’ve started an informal online course based on this book on the Azimuth Forum. I’m getting pretty sick of the superficial quality of my interactions on social media. This could be a way to do something more interesting.

The idea is that you can read chapters of this book, discuss them, try the exercises in the book, ask and answer questions, and maybe team up to create software that implements some of the ideas. I’ll try to keep things moving forward. For example, I’ll explain some stuff and try to help answer questions that people are stuck on. I may also give some talks or run discussions on Google Hangouts or similar software—but only when I have time: I’m more of a text-based guy. I may get really busy some times, and leave the rest of you alone for a while. But I like writing about math for at least 15 minutes a day, and more when I have time. Furthermore, I’m obsessed with applied category theory and plan to stay that way for at least a few more years.

If this sounds interesting, let me know here—and please visit the Azimuth Forum and register! Use your full real name as your username, with no spaces. I will add spaces and that will become your username. Use a real working email address. If you don’t, the registration process may not work.

Over 70 people have registered so far, so this process will take a while.

The main advantage of the Forum over this blog is that you can initiate new threads and edit your comments. Like here you can write equations in LaTeX. Like here, that ability is severely limited: for example you can’t define macros, and you can’t use TikZ. (Maybe someone could fix that.) But equations are better typeset over there—and more importantly, the ability to edit comments makes it a lot easier to correct errors in your LaTeX.

Please let me know what you think.

What follows is the preface to Fong and Spivak’s book, just so you can get an idea of what it’s like.

Preface

Category theory is becoming a central hub for all of pure mathematics. It is unmatched in its ability to organize and layer abstractions, to find commonalities between structures of all sorts, and to facilitate communication between different mathematical communities. But it has also been branching out into science, informatics, and industry. We believe that it has the potential to be a major cohesive force in the world, building rigorous bridges between disparate worlds, both theoretical and practical. The motto at MIT is mens et manus, Latin for mind and hand. We believe that category theory—and pure math in general—has stayed in the realm of mind for too long; it is ripe to be brought to hand.

Purpose and audience

The purpose of this book is to offer a self-contained tour of applied category theory. It is an invitation to discover advanced topics in category theory through concrete real-world examples. Rather than try to give a comprehensive treatment of these topics—which include adjoint functors, enriched categories, proarrow equipments, toposes, and much more–we merely provide a taste. We want to give readers some insight into how it feels to work with these structures as well as some ideas about how they might show up in practice.

The audience for this book is quite diverse: anyone who finds the above description intriguing. This could include a motivated high school student who hasn’t seen calculus yet but has loved reading a weird book on mathematical logic they found at the library. Or a machine learning researcher who wants to understand what vector spaces, design theory, and dynamical systems could possibly have in common. Or a pure mathematician who wants to imagine what sorts of applications their work might have. Or a recently-retired programmer who’s always had an eerie feeling that category theory is what they’ve been looking for to tie it all together, but who’s found the usual books on the subject impenetrable.

For example, we find it something of a travesty that in 2018 there seems to be no introductory material available on monoidal categories. Even beautiful modern introductions to category theory, e.g. by Riehl or Leinster, do not include anything on this rather central topic. The basic idea is certainly not too abstract; modern human intuition seems to include a pre-theoretical understanding of monoidal categories that is just waiting to be formalized. Is there anyone who wouldn’t correctly understand the basic idea being communicated in the following diagram?

Many applied category theory topics seem to take monoidal categories as their jumping off point. So one aim of this book is to provide a reference—even if unconventional—for this important topic.

We hope this book inspires both new visions and new questions. We intend it to be self-contained in the sense that it is approachable with minimal prerequisites, but not in the sense that the complete story is told here. On the contrary, we hope that readers use this as an invitation to further reading, to orient themselves in what is becoming a large literature, and to discover new applications for themselves.

This book is, unashamedly, our take on the subject. While the abstract structures we explore are important to any category theorist, the specific topics have simply been chosen to our personal taste. Our examples are ones that we find simple but powerful, concrete but representative, entertaining but in a way that feels important and expansive at the same time. We hope our readers will enjoy themselves and learn a lot in the process.

How to read this book

The basic idea of category theory—which threads through every chapter—is that if one pays careful attention to structures and coherence, the resulting systems will be extremely reliable and interoperable. For example, a category involves several structures: a collection of objects, a collection of morphisms relating objects, and a formula for combining any chain of morphisms into a morphism. But these structures need to cohere or work together in a simple commonsense way: a chain of chains is a chain, so combining a chain of chains should be the same as combining the chain. That’s it!

We will see structures and coherence come up in pretty much every definition we give: “here are some things and here are how they fit together.” We ask the reader to be on the lookout for structures and coherence as they read the book, and to realize that as we layer abstraction on abstraction, it is the coherence that makes everything function like a well-oiled machine.

Each chapter in this book is motivated by a real-world topic, such as electrical circuits, control theory, cascade failures, information integration, and hybrid systems. These motivations lead us into and through various sorts of category-theoretic concepts.

We generally have one motivating idea and one category-theoretic purpose per chapter, and this forms the title of the chapter, e.g. Chapter 4 is “Collaborative design: profunctors, categorification, and monoidal categories.” In many math books, the difficulty is roughly a monotonically-increasing function of the page number. In this book, this occurs in each chapter, but not so much in the book as a whole. The chapters start out fairly easy and progress in difficulty.

The upshot is that if you find the end of a chapter very difficult, hope is certainly not lost: you can start on the next one and make good progress. This format lends itself to giving you a first taste now, but also leaving open the opportunity for you to come back at a later date and get more deeply into it. But by all means, if you have the gumption to work through each chapter to its end, we very much encourage that!

We include many exercises throughout the text. Usually these exercises are fairly straightforward; the only thing they demand is that the reader’s mind changes state from passive to active, rereads the previous paragraphs with intent, and puts the pieces together. A reader becomes a student when they work the exercises; until then they are more of a tourist, riding on a bus and listening off and on to the tour guide. Hey, there’s nothing wrong with that, but we do encourage you to get off the bus and make contact with the natives as often as you can.

76 Responses to Applied Category Theory Course

Great! It will take a while for your registration to go through, since David Tanzer (another member of the Azimut team) is doing that, and he’s probably not expecting a flood of applications on a late Sunday night in New York.

In what sense did you have “no luck”? Maybe I just haven’t gotten to your application yet: I’m flooded with them, and it’s taking time. Since you’re not revealing your identity here, I can’t tell the status of your applicatoin.

You should get a successful registration. Apparently, the mess that is WordPress didn’t like that extra text I wrote. Feel free
email me for a more detailed description of why I want to interact with this forum.

Hi! Unfortunately I’ll have to decline your application because you didn’t use your real name as username. Over on the Azimuth Forum we use our real identities. Please don’t be offended; just reapply! By the way: if you get an email when I decline your application, please let me know. Someone else was running this aspect of things and I don’t exactly know what someone sees if their application is declined.

Completely randomly, I ran into him yesterday at a social occasion. I don’t think he expected a complete stranger to say “Wait… are you the David Spivak who wrote a book on category theory?” He confirmed that he is not related to Michael.

I just registered on the forum and am looking forward to going through the book with other folks!

I have registered on the Azimuth forum, as DanSchmidt, and confirmed my email, but I can’t seem to find a way (on multiple browsers) to post or comment there. Am I missing something in the UI or is this a permissions issue? Of possible relevance, when I look at my profile my role is “Applicant”, rather than “Member” as I see in others’ profiles.

This sounds very interesting. I’m particularly interested in ways Category Theory can be applied to Machine Learning and Information Retrieval, and other topics related to CS & AI. I’ve been extremely curious for a while if Applied Category Theory could offer a better foundation for understanding theoretical aspects of Machine Learning/AI and hopefully provide new avenues for research and applications.

Another +1 for the opportunity to learn & discuss interactively. Some context: I’ve been a software engineer for 20+ years. I’m not a mathematician, though have a reasonable grounding in discrete maths (logic, sets, graphs). I’ve tried to get my head around category theory several times, though have always found the writing impenetrable (which – to be clear – I see as my limitation, not that of the authors). A brief skim of “seven sketches” holds promise of material presented in a way that’s accessible to me. But I still have questions. So the opportunity to discuss – and ask even the most basic questions – would be greatly appreciated.

(Note: I haven’t registered on Azimuth yet – only because I don’t want to create a ghost account if you decide not to proceed).

I’m definitely proceeding with the course. The course officially starts tomorrow! But people are already asking and answering questions about the first chapter of Seven Sketches. So, please register.

I really like the fact that you want to ask basic questions. If everyone is trying to show off and nobody dares ask basic questions, people won’t learn very much. Once people realized it’s okay to ask basic questions, learning will accelerate. So please help that happen!

I may try to sign up since I’ve always been interested in the field but didn’t have patience to learn much—I had already spent time learning some set and model theory, nonlinear dynamics and statistical mechanics, and applications to biology and social fields.

I sort of wonder if this is useful for even theoretial ecology or economics—species and population distributions—sometimes discussed on Azimuth, job finding or matching skills to jobs that need them; optimal budgeting including science funding—predicting what combinations of grants might lead to the best results for the world—and universities.

(One Wisconsin college is proposing to eliminate many liberal arts programs like philosophy, geosciences, arts, languages, in favor of marketing, computer graphics, management, etc. because they say these are what is needed .)

I’ve taken some MOOCs out of curiosity or refreshers in logic, physics, economics, psychology math but only passed and finished a few partly becuse they lack the social or peer support of a non-online college class. I’ve heard only 20% of MOOC takers finish them.

The text may be too abstract for me but if i could get in and through it , that would a be a unique opportunity.

I’ve taken some MOOCs out of curiosity or refreshers in logic, physics, economics, psychology math but only passed and finished a few partly becuse they lack the social or peer support of a non-online college class.

There seems to be plenty of peer support in this class: people are asking each other questions and answering them. See for example the discussion about the first chapter:

Thanks–your blog to me is like going to some art gallery –dazzling. (everything from climate, to chemical networks to transfinite logic.)

I’ll try to register and I guess I’ll see what the time constraints are–if i have time and whether there is a schedule i can keep up with. (I’m taking a very basic mooc on fractals from SFI now as a refresher, but even that i have trouble fitting in. )

Category theory could be taken more into account when crafting domain models and interfaces (or abstract classes) in imperative languages. Here is my proposition and a proof of concept of a simple syntax which could be used to do the trick https://github.com/kummahiih/python-domain-equations

Might be a midlife crisis, but I miss equation solving from my student time. The usual software rewriting paradigm is to throw the old code away, because it is usually easier to rethink the whole thing again than to modify the current code base. My only cure for it has been so far to write as small pieces as possible, because that way you have at least some pieces for reuse. That type equation thing might work, but it would take months to write so much code that you would be able to see the difference and after you have solved the problems there it would be really hard to try to solve the same problems again in a different way.

Here are all the lectures on Chapter 1, which is about adjoint functors between posets, and how they interact with meets and joins. We study the applications to logic – both classical logic based on subsets, and the nonstandard version of logic based on partitions. And we show how this math can be used to understand “generative effects”: situations where the whole is more than the sum of its parts!

My course on applied category theory is continuing! After a two-week break where the students did exercises, I’m back to lecturing about Fong and Spivak’s book Seven Sketches. Now we’re talking about “resource theories”. Resource theories help us answer questions like this:

1) Given what I have, is it possible to get what I want?

2) Given what I have, how much will it cost to get what I want?

3) Given what I have, how long will it take to get what I want?

4) Given what I have, what is the set of ways to get what I want?

We’re having fun bouncing between the relatively abstract world of monoidal preorders and their very concrete real-world applications to chemistry, scheduling, manufacturing and other topics. Here are the lectures so far:

To some extent this is just an excuse to (finally) introduce categories, functors, natural transformations, adjoint functors and Kan extensions. Great stuff, and databases are a great source of easy examples.

I wonder isn’t there a mistake? I started 1st lecture (about preorders), and it looked like it was about to talk a lot about preorders; but a few paragraphs later it just… ended!

And then there’s a link to questions, and there are ones that wasn’t mentioned in lecture. E.g. 3-rd says “What do mathematicians usually call the thing that Fong and Spivak call a poset?”, and you even said in lecture that you answered that question. But… you didn’t, if you enter word “math” in browser search, you won’t find an occurrence in the first lecture.

And in general, I’m surprised that lectures are soo tiny, did people succeed learning Category Theory from them?

There are about 3 “Azimuth sites”: the Azimuth Blog (here), the Azimuth Forum, and the Azimuth Wiki. To post comments on the Azimuth Forum you need to join the forum, and that’s what the ~300 students in the applied category theory course did. That course is done, though, so the Azimuth Forum is fairly quiet now.

How To Write Math Here:

You need the word 'latex' right after the first dollar sign, and it needs a space after it. Double dollar signs don't work, and other limitations apply, some described here. You can't preview comments here, but I'm happy to fix errors.