Polarities (Part 5)
Azimuth 2024-11-14
Today I’d like to dig a little deeper into some ideas from Part 2. I’ve been talking about causal loop diagrams. Very roughly speaking, a causal loop diagram is a graph with labeled edges. I showed how to ‘pull back’ and ‘push forward’ these labels along maps of graphs. But it turns out that to make pulling back and pushing forward functorial, we need to take two very different approaches to graphs with labeled edges:
- We can ignore the meaning of the edge labels—treat them as elements of an arbitrary set—and declare that a map between labeled graphs is any map of graphs that preserves these labels. That makes pulling back easy.
Or we can think of the labels as something we can add, and declare that when a bunch of edges map to a single edge, we add their labels. This makes pushing forward easy. But for this, we had better use graphs with edges labeled by elements of a commutative monoid, so we can add the labels—and for the sums to be well-defined, we should work with finite graphs.
While approach 2 is more complicated, I believe it’s more useful for the applications I’ve been talking about. I explained in Part 2 that for these applications we want graphs with edges labeled by elements of a rig. The commutative monoid I’m talking about in approach 2 is the one coming from addition in this rig. Multiplication in this rig gives another monoid, which is important for other purposes, as explained in Part 1.
I might as well explain both approaches, 1 and 2, because they’re worth comparing. We’ll see they’re ‘dual’ in a certain way!
I’m afraid this post may not make much sense unless you’re reasonably comfortable with category theory. You see, today I feel the need to strip away the veils and talk in a way that more closely resembles how I’m thinking about this stuff. For example, I’ll show that approach 1 gives a ‘discrete fibration’, while approach 2 gives a ‘discrete opfibration’. These are concepts that warm the hearts of category theorists. I’ll explain them. But if they don’t warm your heart, don’t give up: future posts in this thread are unlikely to rely on the technical details of this one!
Graphs with edges labeled by elements of a set
For any set L there is a category of L-labeled graphs where:
• an object is a graph together with an L-labeling
• a morphism is a map of graphs that preserves the L-labeling: each edge is mapped to an edge with the same label.
We can also think about L-labelings in a fancier way. There is a graph with one vertex and with one edge for each element of L. An L-labeling of a graph the same as a map of graphs
Using this, we can see that the category of L-labeled graphs is the slice category that is, the category of graphs equipped with a map to
There is a functor
that sends each L-labeled graph to its underlying graph. It just forgets the labeling of edges.
In fact this functor is a ‘discrete fibration’, and this is why we can pull back L-labelings along maps of graphs.
Let me explain this. For each the fiber of over is the set of L-labelings of that graph. It’s called a fiber because the formula for it resembles the formula for other things called ‘fibers’:
In general the fibers of a functor are categories, but for a so-called ‘faithful’ functor they are categories where the only morphisms are identity functors, so we can treat them as sets. The functor is indeed faithful: a map of L-labeled graphs is uniquely determined by its underlying map of graphs. Thus, I’m treating the fiber as a set.
In fact we have an isomorphism
Why? Here’s why: elements of correspond to L-labelings of which in turn correspond to maps from to
Thus, we can treat the fiber as the result of applying the functor
to the graph This makes the fiber contravariantly functorial. That is, any map of graphs
gives rise to a map
which in turn gives a map we could call
We say this map lets us pull back any L-labeling of along any map of graphs to get an L-labeling of
Thus, we’ve defined the fiber not just on graphs, but on maps between graphs—and it’s a contravariant functor! This functor deserves the name
Category theorists would summarize the whole situation by saying three things:
1) The functor assigning to each graph its fiber is representable by .
This means
as functors from to
2) The category of L-labeled graphs is the category of elements of the contravariant functor
This means:
• an L-labeled graph amounts to the same thing as a graph together with an element
• a map of L-labeled graphs from to is the same as a map of graphs such that
3) By general theory, it follows that the functor is a discrete fibration. This means that for each L-labeled graph and each map of graphs there exists a unique map of L-labeled graphs such that
This implies As a further consequence, is the result of pulling back along
These three facts, 1)–3), mean the whole situation is peachy-keen and we have a vast arsenal of tools available to work with it!
Graphs with edges labeled by elements of a commutative monoid
Things work quite differently if we try to push forward L-labeled graphs along maps of graphs. We can’t do it when our map sends two or more edges with different labels to a single edge: there’s no way to decide which label to use!
Luckily we can take a different approach when our set L of labels is a commutative monoid. We just add the labels. And as I explained in Part 2, this is exactly what we want in applications. If infinitely many edges get mapped to the same edge it may not make sense to add their labels, but we can avoid that simply by restricting attention to finite graphs (i.e. graphs with finitely many vertices and edges).
So, let’s see what happens in this approach. We need to switch from our previous category of L-labeled graphs to a new category, which I’ll call the category of L-graphs. But then everything works nicely.
For any commutative monoid L there is a category where:
• an object is an L-graph: a finite graph together with an L-labeling
• a morphism is a map of L-graphs: that is, a map between their underlying graphs such that the L-labeling of each edge in the target graph is the sum of the L-labelings of the edges that map to it.
There is a functor
that sends each L-graph to its underlying graph.
As we’ll see, this functor is a ‘discrete opfibration’, and this lets us ‘push forward’ L-labelings along maps of graphs.
Let me explain what that means. The whole story is parallel to the previous one, but different in various ways.
Like the functor the functor is faithful: a map between L-graphs is uniquely determined by its underlying map between graphs. This is easy to see from the definitions.
Thus we can think of the fibers of as sets, and the fiber of over a graph is
This is simply the set of L-labelings of
Further, is a discrete opfibration. This means that for each L-graph and each map of finite graphs there exists a unique map of L-graphs such that Again, this is easy to see from the definitions.
As a further spinoff, because we must have
Thus, any map between finite graphs
gives rise to a map between fibers
that sends to defined as above. We say this map lets us push forward any L-labeling of along to get an L-labeling of
Thus, we’ve now defined the fiber not just on finite graphs but on maps between them—and it’s a covariant functor! This functor deserves the name
Category theorists would summarize the whole situation by saying two things:
1) The category of L-graphs is the category of elements of the covariant functor
This means:
• an L-graph amounts to the same thing as a finite graph together with an element
• a map of L-labeled graphs from to is the same as a map of graphs such that
2) By general theory, it follows that the functor is a discrete opfibration.
Note: we just have two facts this time, not three. That’s because the covariant functor is not representable, while the contravariant functor was. The reason is that the procedures this time use the fact that our set of labels is a commutative monoid. It’s possible I’m missing a trick or two.
Still, pulling back and pushing forward labelings are remarkably parallel!