Poly makes me happy and smart

polynomial functors
informal
Author
Published

2022-01-19

Abstract

There are many reasons people like math; Poly checks all the boxes. My colleague Valeria says our Topos blog posts are often too technical and asked me to write a ‘fluffier’ blog post about Poly, one with a few unicorns and sprinkles. So here goes! Caveat: the author retains the right to substitute kids for unicorns and substitute liver for sprinkles if it makes the story more true.

My colleague Valeria says our Topos blog posts are often too technical and asked me to write a ‘fluffier’ blog post about Poly, one with a few unicorns and sprinkles. So here goes! Caveat: the author retains the right to substitute kids for unicorns and substitute liver for sprinkles if it makes the story more true.

When I was a couple years old, I had a sort of Workbench toy which I called a “chopped liver machine” for some reason.

Me at the chopped live machine, 1980

My parents tell me I would sit for hours at a time with this toy, changing various aspects of the thing, hammering this or that into place, readjusting over there and seeing the effect. In my mind, I was working skillfully within some sort of simple but not-too-simple system, where the different aspects were well-articulated: the pieces interacted together meaningfully but without stepping on each other’s toes. I was affecting the world—making the most important chopped liver ever made—and doing so comfortably and in a state of little-kid flow, enabled by a system that had been set up just right.

Flow happens when the system and its user are well-aligned

Well, there’s a new chopped liver machine in town, and it’s called Poly. It’s still a workbench for kids, but bigger kids doing more relevant work with better chops. It’s a simple but not-too-simple system whose parts are gloriously well articulated. And my working hypothesis is that all the most important chopped liver can be made with this thing.

So what is Poly, and why do I think it’s so great? First of all, Poly is made of math, so it doesn’t require nearly as much hammering, and no livers are harmed by its use. Second, Poly is a huge outlier in the space of all mathematical objects: it has a tremendous amount of structure. It’s the sort of thing where you get out more than you put in. You say to the math-god (also known as the queen-and-servant) “hey, yeah, let’s see.. Could I please have your ‘representables’ with a side of ‘coproducts’?” And the math-queenservantgod thing says “Congratulations, you picked the best thing on the menu! We’re having a special today (and for all time) on this item: we’ll give you limits, colimits, exponentials, substitution product, another symmetric monoidal closed structure, three orthogonal factorization systems, and a coclosure operation free of charge.” Thine cup runneth over. The dish arrives with an abundance of different flavors, which are robust but graceful, interacting harmoniously in a rich concert of taste before settling down as deep fulfillment.

And yet Poly is also super weird and foreign in a certain way. Working with it is like learning to talk to mycelium or an octopus or a chiangian heptapod: one gets the feeling that it’s a sort of mega-genius, even while one struggles to understand its speech patterns which arrive as somehow backwards or inside out or quantum-esque or something. Early on when I was working with Poly’s backwards and inside-out language, I realized that despite its weirdness, the coproduct and product operations were somehow given by regular old familiar + and \times of polynomials. At that moment a wave of something between elation and awe passed through me: I was standing in front of something very special; I’d found a diamond in the rough. And since then, I’ve been visited by surprise upon surprise upon surprise. This play-school workbench has special drawers and dimensions hidden in plain sight.

For example: my field is called “category theory”; it turns out that categories are hidden in plain sight within Poly: categories are Poly’s comonoids. One of my favorite structures is called “an operad”; operads are hidden in plain sight within Poly: operads are Poly’s cartesian monoids. One of my favorite applications of category theory is about databases and how to migrate data between databases; database migrations are hidden in plain sight within Poly: they are Poly’s bicomodules. My other favorite application of category theory is about dynamical systems that interact in larger systems; dynamical systems are hidden within plain sight within Poly: they are Poly’s coalgebras. I think programming language theory is a really cool application of category theory, and many aspects of it (polynomial datatypes and their initial algebras and final coalgebras) are right there in Poly, not hidden at all but well-known. Deep learning is still a hot topic; the structure of a neural network is easily encoded in Poly. The list goes on and on.

Imagine you love traveling, and then one day you find a closet with a whole world inside of it. Like Narnia, it’s sometimes hard to explain to your friends what you’ve found, but it feels important to try. And this moment in history is not the first time humans have reported finding this place: in fact it’s a much-beloved closet.

My goal over the past two years and probably over the next several years is simply to connect the two worlds: to explore the wonders of Poly and report what I find to my earth friends, and to tell my great teacher Poly (or maybe Poly is a librarian) about earth to see which aspects of it make natural sense in Poly’s world. Often I learn a lot just by trying to understand Poly’s way of talking about things I intuitively know, like databases or dynamical systems. I am certain that thinking about Poly has made me smarter.

In sum, Poly is a unicorn. It’s a rideable, sprinkle-spreading unicorn made by the math-queenservantgod for collecting all the best things into one place.

Poly is a unicorn

It lives in a bourgening garden of structures—fertilized by its own sprinkles of joy—from which emerges a cornucopia of applicable ideas for us humans to use.

The last time I was this excited about a mathematical idea was when I first encountered category theory. And yet, as much as I adore category theory, the impact of Poly on my life has been at least 10x in terms of sheer potency and delight. I offer a sincere and heartfelt thank you to all those who have previously come upon this diamond in the rough and polished it for others to notice. It’s truly magnificent.