Profile cover photo
Profile photo
John Baez

Post is pinned.Post has attachment
Applied Category Theory - An Online Course

Two weeks ago I started teaching an online course based on this free book:

• Brendan Fong and David Spivak, Seven Sketches in Compositionality: An Invitation to Applied Category Theory,

It's eating up the time I used to spend on G+. But I'm happy with that, because over 250 people have registered, and a bunch of them are very energetic. It's exciting!

Four days I week I write short "lectures" on the book. If you take the course you can read those lectures, read the book, try the exercises in the book and the puzzles I create, and discuss everything with me and the other students! The best part of the course, in my opinion, is the conversations. People are starting to dream up projects to work on together.

If this sounds interesting, go here and register in the box at upper left:

Use your full real name as your username, with no spaces. I will get back to you, so use a working email address. You can move through the course at your own pace: all the discussions can go on indefinitely.

Brendan Fong was my grad student; now he's doing a postdoc at MIT with David Spivak. They're at the cutting edge of applied category theory, and I"m having a lot of fun working through their book by teaching it. Here is the preface to their book, just so you can get an idea of what it’s like.


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 diagram below?

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.
Add a comment...

Post has attachment
Rapid response

If Trump fires special counsel Robert Mueller or Rod Rosenstein, our response in the hours following will dictate what happens next. That's why is preparing to hold emergency rallies if they're needed — over 900 of them, in every state of the USA, with 350,000 RSVPs to date!

Find the rally near you and get ready to join it if necessary:
Commenting is disabled for this post.

Post has attachment
Category theory applied to integer arithmetic

In my course on applied category theory, Matthew Doty proposed the following puzzle. It may be overkill to prove it using adjoint functors, but if you're a category theorist you'll want to do it that way! For details:
Add a comment...

Post has attachment
Out of the body

You're flying a fighter jet. Moment of intense acceleration pull you back in your seat with a force up to 12 times that of gravity. It's grueling work, and it requires full concentration, but you've trained for it.

Then something happens that you didn't train for.

You suddenly find yourself on the wing of your plane. You don't know how you got there. Looking into the cockpit, you see a pilot flying the plane. Looking closer, you see it's you! You don't know what to do.

Yes, this really happens. Out-of-the-body experiences can be triggered by high g forces:

In this great show you'll hear from pilots Tim Sestak and Dan Fulgham on what it's like to lose your body while flying a plane at high speeds. Then you'll hear from Dr. James Whinnery, who studies this phenomenon by placing pilots in giant centrifuges and monitoring their brain activity! He did it 500 times. And 40 times, when pilots blacked out from accleration pulling blood from their brain, they had out-of-the-body experiences.

I'm convinced that out-of-the-body experiences are real. Real experiences, nothing that violates the usual laws of physics. The brain is capable of amazing things. If it weren't, you wouldn't last a day. You have a mental model of yourself that keeps track of your location and your surroundings. When this goes awry, strange things happen.
Add a comment...

Post has attachment
What the Eyeballs Did

This is an impressively energetic song by Radiohead frontman Thom Yorke and his other band, called Atoms for Peace. Their first album was magnificent. The second felt a bit listless to me. But here the bass player takes the lead - a dude named Flea formerly from the Red Hot Chili Peppers.

The rhythm he plays is muscular and propulsive. It's crazy tricky, too - but you only notice that if you really listen to it and try to sing it to yourself. Radiohead does that too sometimes; they've got songs in 5/4, and songs that switch between several time signatures - but the good thing is that they do it in a smooth way that non-musicians don't even consciously notice. I'm a math-head myself, so I really enjoy the numbers lurking behind the music, but it's best if we keep that layer hidden from those who don't enjoy it!

On top of that, this song has some great synthesizers, that sound like massed horns making heavy clouds of sound. And around 3:13 a new layer of drums appears that play a samba-like rhythm, and then morph into percussive guitar.

And on top of all that, it has some seriously intimidating lyrics. As usual for rock lyrics, they don't quite stand on their own as poetry on the printed page - at least not for me. But the point is that you should hear glimpses of them peeking around the music... and try to associate them to the title: What the Eyeballs Did.

As you probably know, they say the internet is all about "eyeballs" - that is, the attention economy, where you try to gather up millions of people, mine their data, sell it, and stuff their brains with propaganda. As the marketing director of Cambridge Analytica said:

The two fundamental human drivers when it comes to taking information on board effectively are hopes and fears, and many of those are unspoken and the even unconscious -- you didn't know that was a fear until you saw something that just evoked that reaction from you. And our job is to drop the bucket further down the well than anybody else to understand what are those really deep-seated underlying fears, concerns. There is no good fighting an election campaign on the facts because actually it's all about emotion.

We see unfortunates asking questions like this:

Can anyone explain what "total eyeball share" means in the following context: "Recent Studies and Internet usage analysis from show this website has a commanding Total Eyeball Share for all Canadian job sites."

They haven't caught on yet... it's all about eyeballs. And what did the eyeballs do? Listen to the song. It starts like this:

The blood and hell coming down from the sky
Just picked on you
No recourse, no reason, no right
No way out, no
In the dark storm prying out there
Behind the screen

See? "The dark storm prying out there, behind the screen" - trying to reach you. And it ends like this:

What the eyeballs did
They ran and they hid
It's not like it feels
Just that's how it is

Does that make sense? I don't know. I think so. But you have to admit it's a good, scary song title. Just like "Atoms for Peace" is a great name for a band. It started as the title of a speech by Eisenhower:

Add a comment...

Post has attachment
Trump: serious threat

When retired 4-star general publicly says this about the President, you know we're in trouble!

McCaffrey, 75, is a soldier who has been awarded two Silver Stars, three Purple Hearts and two Distinguished Service Crosses. Reporters asked him why we wrote this tweet, and he said:

“I’ve been fairly critical of the president for a variety of reasons,” he said, “but it was his not wanting to stand with the British over intelligence about those murders carried out by the Russians."

Last week Trump fired his Secretary of State, Rex Tillerson, right after Tillerson said this:

"We have full confidence in the UK's investigation and its assessment that Russia was likely responsible for the nerve agent attack that took place in Salisbury last week. There is never a justification for this type of attack -- the attempted murder of a private citizen on the soil of a sovereign nation -- and we are outraged that Russia appears to have again engaged in such behavior. From Ukraine to Syria -- and now the UK -- Russia continues to be an irresponsible force of instability in the world, acting with open disregard for the sovereignty of other states and the life of their citizens."

Even more damning is the fact that John Kelly claimed he told Tillerson about the firing before Tillerson said this... but then Steve Goldstein, who worked for Tillerson, said this was false. Trump then fired Goldstein! For details:

And of course all this is just one of dozens of facts suggesting that Putin has Trump under his thumb. For just some of the evidence, go here:

All this only goes up to March 2017! There's a lot more by now.

For more on McCaffrey's tweet go here:
Commenting is disabled for this post.

Post has attachment
"America will triumph over you."

Never before has a former director of the CIA said something like this to the President of the US. Things are heating up.
Commenting is disabled for this post.

Post has attachment
When comets hit white dwarfs

A white dwarf is a star that's run out of fuel and is slowly cooling down... but still very hot thanks to the energy it got from gravity crushing it down. White dwarfs should have atmospheres that are almost pure hydrogen and helium, since heavier elements quickly sink down further. But about a quarter have noticeable amounts of heavier elements in their atmosphere. How did those get there?

Alexander Stephan and other scientists at UCLA argue that they come from comets! More precisely, large icy objects like those in the Kuiper belt of our Solar System, beyond the orbit of Pluto.

But it takes work to explain how so many of these objects hit white dwarfs.

The theory is that these white dwarfs are in binary star systems. When the star that becomes the white dwarf begins to die it emits a lot of gas and loses mass - we know that's how it works. So, the Kuiper belt objects orbiting it start to move further out. There are lots of these things. So, some will interact gravitationally with the other star in binary system and get thrown this way and that... and eventually some will hit the white dwarf!

The scientists did detailed computer simulations to check that this could account for what we see. Even more exciting: sometimes Neptune-like planets will hit the white dwarf! And indeed we see some white dwarfs that have a lot more heavy elements in their atmosphere.

By running large Monte Carlo simulations, Stephan and collaborators demonstrate that this scenario can successfully produce accretion of both Neptune-like planets and Kuiper-belt-analog objects. Their simulation results indicate that ~1% of all white dwarfs should accrete Neptune-like planets, and ~7.5% of all white dwarfs should accrete Kuiper-belt-analog objects.

While these fractions are broadly consistent with observations, it’s hard to say with certainty whether this model is correct, as observations are scant. Only ~200 polluted white dwarfs have been observed, and of these, only ~15 have had detailed abundance measurements made. Next steps for understanding white-dwarf pollution certainly must include gathering more observations of polluted white dwarfs and establishing the statistics of what is polluting them.

Also, 7.5% is a lot less than 25%.

I got this from here:

Add a comment...

Post has attachment
Memories of Hawking

I first saw Hawking when I was an undergrad at Princeton, sometime around 1981. I heard he was going to speak at the Institute for Advanced Studies - a bunch of buildings in the woods past the golf course. Back then it was easy to get in, even in the middle of the night: sometime my friends and I would walk over and admire the oriental rugs and the bust of Einstein. Now it's not so easy. But anyway, I went over and sat myself among the eager crowd of physicists waiting to hear what Hawking would say.

He gave a lecture on virtual black holes. He argued that microscopic virtual black hole / anti-black hole pairs were constantly forming and annihilating in the vacuum... just like other particles are always doing... but with a difference: they would gradually increase the entropy of the universe. This process, he claimed, made the future fundamentally different than the past.

This was wildly heretical - and later Hawking himself ceased to believe it. But it was a reasonable extrapolation of his earlier work on the decay of black holes. He had showed black holes emit thermal radiation and slowly shrink away. This process seems to increase the entropy of the universe. So, it made some sense that the same thing could happen with virtual black holes.

I barely understood his lecture, since while I'd been studying quantum field theory on my own, and taking a course on general relativity, I was far from an expert on either, and he was combining them in a brand-new way. Still, it was exciting. By the end of my undergraduate years I decided to work on quantum gravity. I eventually did, years later.

I saw him a few other times, including in the math department cafeteria in Cambridge. I was always too intimidated to talk to him - which was, anyway, a complicated and slow process, involving first a human translator who could understand his barely audible speech, and then later, as his disease progressed and technology improved, a computer.

One time that really sticks in my mind is the general relativity conference in Dublin in 2004. This is when he changed his mind about black holes increasing the entropy of the universe as they decay. There was a huge crowd in attendance, and reporters, who were kept at the back. People were trying to sneak in, so guards were checking IDs. There was a kind of circus-like atmosphere that's rare in physics conferences.

The photo shows Hawking in front of a copy of the famous bet he and Kip Thorne made against John Preskill. They bet that information was lost in black holes. Preskill bet they did not. The prize was an encyclopedia. Preskill won that bet, and chose an encyclopedia of baseball facts. Here you see him waving that encyclopedia over his head, which he won after Stephen Hawking gave his talk arguing that, contrary to his earlier claims, the entropy of the universe does not go up when black holes emit Hawking radiation.

This photo appeared in Time magazine. For more on this Dublin meeting, including some photos of my own, see this:

Back in the 1970s, Hawking revolutionized quantum gravity and inspired everyone in that subject. His discovery of Hawking radiation is one of the few solidly accepted predictions about how quantum mechanics and gravity combine to yield strange new phenomena. It's been checked in many ways - calculations, not experiments, though experiments have been done on analogous physical systems.

But the can of worms opened up by this discovery has not yet been sorted out. In recent years, the so-called "firewall paradox" showed we're still far from understanding it. This paradox comes, in part, from accepting the claim that black hole decay does not increase the entropy of the universe. So, maybe Hawking was right in the first place.

There's a lot of thinking left to be done. He will no longer be with us to help out. Individuals come and go, but the grand tale continues.
Add a comment...

Post has attachment
Big numbers in knot theory

A link is a bunch of knots, possibly entangled with each other. How many steps does it take to get from one picture of a link to another picture of the same link? In 2011, two mathematicians gave this upper bound:

2 ↑↑ ((10 ↑ 1,000,000) ↑ n)

where n is the total number of crossings in both pictures.

In other words: take 2 to the power 2 to the power 2 to the power 2... where the number of 2's in this "tower of powers" is.... 10 to the n millionth power!

For more, read my blog article:

Add a comment...
Wait while more posts are being loaded