Category Theory
Zulip Server
Archive

You're reading the public-facing archive of the Category Theory Zulip server.
To join the server you need an invite. Anybody can get an invite by contacting Matteo Capucci at name dot surname at gmail dot com.
For all things related to this archive refer to the same person.


Stream: theory: applied category theory

Topic: Laplacian of an open graph


view this post on Zulip Peva Blanchard (Nov 12 2025 at 06:13):

Hi, for some project (unrelated to CT), I am studying real matrices LL which satisfy

Laa0Lab0LaabaLab\begin{align*} L_{aa} &\ge 0 \\ L_{ab} &\le 0 \\ L_{aa} &\ge \sum_{b \ne a} |L_{ab}| \end{align*}

They look like laplacian matrices, the difference being that the third condition is an inequality instead of an equality. So I'm calling them super-laplacian matrices.

A laplacian matrix LL is the matrix representation of the laplacian operator associated with a weighted graph. The vertices of the graph index the rows (and columns) of LL, and there is an edge between two distinct vertices a,ba,b whenever Lab<0L_{ab} < 0, the weight of this edge being Lab|L_{ab}|. The quantity LaaL_{aa} is equal to the sum of weights of all edges incident to aa.

I think we can also interpret a super-laplacian matrix as a laplacian operator associated with some "open graph". Roughly speaking, such an open graph is a graph where some vertices are marked as "exterior" (the remaining vertices being "interior"). The interior vertices index the rows (and columns) of LL. The difference LaabaLabL_{aa} - \sum_{b\ne a} |L_{ab}|, where bb runs over interior vertices, accounts for the sum of weights of "boundary edges" connecting aa to exterior vertices.

I came up with a more formal definition, but, given the ACT literature about open systems, I wonder if this has been studied already.

view this post on Zulip John Baez (Nov 12 2025 at 11:31):

I don't understand one key sentence in your description. I'd hope that we have

Laa=baLabL_{aa} = \sum_{b\ne a} |L_{ab}|

for all interior vertices aa.

Anyway, I haven't seen this idea. It - or something similar, I haven't thought about it enough yet - looks very interesting. The spectral analysis of open graph Laplacians should be very cool if done right.

view this post on Zulip John Baez (Nov 12 2025 at 12:05):

The fact that I haven't seen it doesn't mean very much, though! If it appeared in the structured cospan literature I should have seen it, but if it appeared in the graph theory literature I would never have seen it.

view this post on Zulip James Deikun (Nov 12 2025 at 13:05):

I think by "interior vertices" was meant all the vertices corresponding to rows and columns of the matrix and "exterior vertices" was meant to refer to the notional vertices connected to the "unattached" edges.

I think a "super-laplacian" matrix is indeed a matrix that's an on-diagonal block of a laplacian matrix, and you can always realize it this way by adding one row and column. You add La=bLabL_{a{*}} = - \sum_{b \ne {*}} |L_{ab}| and Lb=0L_{{*}b} = 0.

view this post on Zulip Peva Blanchard (Nov 12 2025 at 17:42):

James Deikun said:

I think by "interior vertices" was meant all the vertices corresponding to rows and columns of the matrix and "exterior vertices" was meant to refer to the notional vertices connected to the "unattached" edges.

I think a "super-laplacian" matrix is indeed a matrix that's an on-diagonal block of a laplacian matrix, and you can always realize it this way by adding one row and column. You add La=bLabL_{a{*}} = - \sum_{b \ne {*}} |L_{ab}| and Lb=0L_{{*}b} = 0.

Yes that's right.

Here is an example
image.png

The usual laplacian of the whole graph is the matrix

Δ=abcxya31110b13101c11200x10010y01001\Delta = \begin{array}{c|ccc|cc} & a & b & c & x & y \\ \hline a & 3 & -1 & -1 & -1 & 0 \\ b & -1 & 3 & -1 & 0 & -1 \\ c & -1 & -1 & 2 & 0 & 0 \\ \hline x & -1 & 0 & 0 & 1 & 0 \\ y & 0 & -1 & 0 & 0 & 1 \end{array}

And if I "discard" the exterior vertices xx and yy, I obtain the submatrix

L=(311131112)L = \begin{pmatrix} 3 & -1 & -1 \\ -1 & 3 & -1 \\ -1 & -1 & 2 \end{pmatrix}

which is "super-laplacian".

view this post on Zulip Peva Blanchard (Nov 12 2025 at 17:43):

John Baez said:

Anyway, I haven't seen this idea. It - or something similar, I haven't thought about it enough yet - looks very interesting. The spectral analysis of open graph Laplacians should be very cool if done right.

Oh thanks. Well, if this is new, I might give it a try. I have some preliminary results about a (baby) co/homology. But my current formal definition of open graphs feel clumsy. I'll have a look at structured (or decorated?) cospans.

view this post on Zulip John Baez (Nov 12 2025 at 18:01):

Open graphs are one of the basic examples in structured cospan theory, so they appear in all introductions to structured cospans.

view this post on Zulip Peva Blanchard (Nov 13 2025 at 08:58):

I explained a bit more the motivation behind my question in this topic

view this post on Zulip JR (Nov 13 2025 at 19:07):

If this works it ought to (IMO) inform surgery on Riemannian manifolds. And vice versa. Like say (this is probably not the ideal reference) https://doi.org/10.1215/S0012-7094-06-13323-9

view this post on Zulip Peva Blanchard (Nov 14 2025 at 13:10):

If anyone doesn't mind, I'll do like David Egolf, and use this thread to think out loud.

Base category G\mathbb{G}

So, I reread the definition of a structured cospan. And before even using them, I need to figure out which category G\mathbb{G} of graphs I want to use. I will need this category to be closed under finite colimit, and I'll probably need a left adjoint L:FinSetGL : \text{FinSet} \to \mathbb{G}.

I'll start with informally stated requirements for the kind of graphs I need, and then I'll choose the most appropriate category G\mathbb{G}. My problem is about heat propagation. Equivalently, I'm picturing random walks on graphs.

So, in my situation, I think a graph is a diagram of sets
image.png
where s,ts,t denote the source and target map, ii is the involution that reverse edges, and ω\omega is the weight function.

view this post on Zulip Peva Blanchard (Nov 14 2025 at 13:16):

The part that troubles me is the involution. It has to satisfy some conditions

This last condition is a bit weird, as it refers to elements of EE.

view this post on Zulip Peva Blanchard (Nov 14 2025 at 13:18):

The other part that troubles me is the weight ω\omega, because it refers directly to (0,)(0,\infty). I remember that attributes were handled a specific way in ACSets.

view this post on Zulip Peva Blanchard (Nov 14 2025 at 13:59):

Ok, I re-read this blog post. I could present my schema as a profunctor SS between the category consisting of E,VE,V and i,s,ti,s,t, and the singleton category, with single object (0,)(0,\infty). And then a graph would be an attributed c-set on this schema, i.e. some 22-cell etc. I guess this framework is useful to obtain general results about ac-sets, e.g., closure under colimits.

view this post on Zulip Peva Blanchard (Nov 14 2025 at 14:09):

Anyway, I'll stay low-brow, and define my category G\mathbb{G} explicitly.

view this post on Zulip Peva Blanchard (Nov 14 2025 at 22:57):

An object GG of G\mathbb{G} is specified by

view this post on Zulip John Baez (Nov 14 2025 at 23:08):

That inequality will tend to prevent your category from having nice coequalizers.... I'd avoid that if I were you. (Equations are preserved by "quotient maps", inequalities not.)

view this post on Zulip Peva Blanchard (Nov 14 2025 at 23:12):

Oh thanks. I'll follow your advice. So an object GG of G\mathbb{G} is specified by

view this post on Zulip Peva Blanchard (Nov 14 2025 at 23:13):

For morphisms, I see two options.

  1. The most obvious one. A morphism from GG to HH is specified by functions f:V(G)V(H)f : V(G) \to V(H) and g:E(G)E(H)g : E(G) \to E(H) such that source and target functions are compatible (sg=fssg = fs, tg=fttg = ft), involutions are compatible (ig=giig = gi), and weights are preserved (ωg=ω\omega g = \omega).

  2. Weights are accumulated. A morphism from GG to HH is specified by functions f,gf , g as above, except for the preservation of weight. Instead,

ω(g(e))=e : g(e)=g(e)ω(e) \omega(g(e)) = \sum_{e' ~:~ g(e') = g(e)} \omega(e')

I may need to think a bit more about my use case to decide which one is the best.

view this post on Zulip Peva Blanchard (Nov 14 2025 at 23:55):

At the end, I would like to relate my graphs with laplacian matrices. From my small experience with computing graph laplacians, I noticed the following behaviour. Given a graph GG, possibly with multiple edges with the same endpoints, it has laplacian matrix Δ\Delta. The off-diagonal entries of Δ\Delta aggregate the weights. Also, I can almost go the other way around: given a laplacian matrix Δ\Delta, I can build a graph (with at most one edge between any two distinct vertices) which has Δ\Delta as laplacian matrix.This situation feels like an adjunction.

So I'll stick with option 2 for my morphisms.

view this post on Zulip Peva Blanchard (Nov 15 2025 at 00:23):

Now, to use the structured cospan machinery, it suffices that I

  1. check that G\mathbb{G} has finite colimits
  2. define a left-adjoint functor L:FinSetGL : \text{FinSet} \to \mathbb{G}

I believe 1 is true. For (finite) coproducts, I can do pointwise (finite) coproducts. This really amounts to putting a bunch of graphs next to each other. For coequalizers, consider two parallel morphisms a,ba,b from GG to HH. I want to build a coequalizer graph QQ. Let's define

V(Q)=V(H)/(a(x)=b(x))E(Q)=E(H)/(a(e)=b(e))\begin{align*} V(Q) &= V(H) / (a(x) = b(x)) \\ E(Q) &= E(H) / (a(e) = b(e)) \end{align*}

where (a(x)=b(x))(a(x) = b(x)) is a short-hand notation for the equivalence relation on V(H)V(H) generated by uvu \simeq v iff there exists xV(G)x \in V(G) such that u=a(x)u = a(x) and v=b(x)v = b(x). And similarly for (a(e)=b(e))(a(e) = b(e)). The source and target maps can be defined consistenly on E(Q)E(Q), the involution as well (thanks to John's advice).

The weight function is not so obvious, because of my choice of morphism

view this post on Zulip Peva Blanchard (Nov 15 2025 at 07:58):

Actually, we have no choice. An edge ϵE(Q)\epsilon \in E(Q) is an equivalence class (subset of edges in E(H)E(H)). I define its weight as the sum of weights of its members, ω(ϵ)=eϵω(e)\omega(\epsilon) = \sum_{e\in \epsilon} \omega(e). This is the only way to define it if I want the quotient map π:HQ\pi : H \to Q to satisfy the weight aggregation rule.

view this post on Zulip Peva Blanchard (Nov 15 2025 at 08:07):

I'll skip the details on checking that QQ, so defined, is indeed a coequalizer.

view this post on Zulip Peva Blanchard (Nov 15 2025 at 08:10):

Alright, now, the functor L:FinSetGL : \text{FinSet} \to \mathbb{G}. It maps a finite set VV to the the graph with VV as set of vertices, and empty set of edges. The right adjoint is the functor that maps a graph GG to its set of vertices. Again, I'll skip checking the details (that they are functors, and adjoint to each other).

view this post on Zulip Peva Blanchard (Nov 15 2025 at 08:16):

Open graphs

Finally, I obtain a symmetric monoidal double category Open(G)\text{Open}(\mathbb{G}) of open graphs.

view this post on Zulip Peva Blanchard (Nov 15 2025 at 08:25):

Associated vector spaces

Ok, now the fun part, defining the laplacian. In algebraic graph theory, we can define the laplacian by considering the vector space C0=[V,R]C^0 = [V,\mathbb{R}] of functions on vertices, C1=[E,R]C^1 = [E, \mathbb{R}] of functions on edges, equipping them with the obvious inner products, defining the discrete differential δ:C0C1\delta : C^0 \to C^1 by

δ(f):ef(s(e))f(t(e))\delta(f) : e \mapsto f(s(e)) - f(t(e))

and the laplacian Δ:C0C0\Delta : C^0 \to C^0 as

Δ=δδ \Delta = \delta^* \delta

where δ\delta^* is the adjoint of δ\delta.

view this post on Zulip Peva Blanchard (Nov 15 2025 at 08:36):

Thanks to the categorical perspective, I want to try the following strategy:

view this post on Zulip Peva Blanchard (Nov 15 2025 at 09:52):

Not sure, if this is the right approach. Even if I have an open cochain complex, how do I obtain a "laplacian"?

view this post on Zulip John Baez (Nov 15 2025 at 10:35):

We usually get a graph Laplacian by making C0C^0 (resp. C1C^1) into inner product spaces such that vertices (resp. edges) form an orthonormal basis. This lets you define an operator d:C1(G)C0(G)d: C^1(G) \to C^0(G) by

da,b=a,δb \langle d a, b \rangle = \langle a, \delta b \rangle

(i.e. dd is the adjoint operator of δ\delta). Then we get a Laplacian on C0(G)C^0(G) by Δ=dδ \Delta = d \delta and one on C1(G)C^1(G) by taking δd\delta d.

view this post on Zulip John Baez (Nov 15 2025 at 10:38):

By the way, the people I know write dd for your δ\delta and \partial for what I just called dd.

view this post on Zulip Peva Blanchard (Nov 15 2025 at 12:45):

Yes. This gives me another idea. So we want define inner product spaces C0(G)C^0(G) and C1(G)C^1(G), and a linear map d:C0(G)C1(G)d : C^0(G) \to C^1(G) when GG is an open graph, i.e. a horizontal 1-morphism in Open(G)\text{Open}(\mathbb{G}).

So, maybe, we want to define symmetric monoidal double functors C0,C1:Open(G)UC^0, C^1 : \text{Open}(\mathbb{G}) \to \mathbb{U} into a well-chosen sym mon double category U\mathbb{U}, and a transformation d:C0C1d: C^0 \Rightarrow C^1 that satisfy some good properties.

view this post on Zulip Peva Blanchard (Nov 15 2025 at 13:03):

Defining U=Open(V)\mathbb{U} = \text{Open}(\mathbb{V})

I will try to define U\mathbb{U} using the structured cospan construction, U=Open(V)\mathbb{U} = \text{Open}(\mathbb{V}).

Let's try with V\mathbb{V} the category specified by:

I claim V\mathbb{V} is closed under finite colimits. Indeed, Orthogonal direct sums provide coproducts. Cokernel of f:ABf : A \to B is provided by the projection on the orthogonal complement of the image of ff in BB.

view this post on Zulip Peva Blanchard (Nov 15 2025 at 13:29):

Now, I want to define a functor L:FinSetVL : \text{FinSet} \to \mathbb{V} that preserve finite colimits.

Given a finite set XX, I define L(X)L(X) to be the free vector space equipped with the unique inner product that makes XX an orthonormal basis.

I don't think LL is a left adjoint, because, intuitively, the right adjoint would need to pick an orthonormal basis. So I'll check directly if LL preserve finite colimits.

view this post on Zulip Peva Blanchard (Nov 15 2025 at 13:30):

It seems clear to me that LL preserve finite coproducts, so I'll focus on coequalizers.
Consider two parallel functions f,g:XYf,g : X \to Y between finite sets, and q:YQq : Y \to Q their coequalizer.
image.png

We have to check that the linear map Lq:L(Y)L(Q)Lq : L(Y) \to L(Q) is a cokernel of h=L(f)L(g)h = L(f) - L(g).

view this post on Zulip Peva Blanchard (Nov 15 2025 at 15:09):

LqLq is a cokernel

view this post on Zulip Peva Blanchard (Nov 15 2025 at 15:11):

We conclude that LL preserves finite colimits.

Wrapping everything up, the structured cospan construction gives a sym monoidal double
category U=Open(V)\mathbb{U} = \text{Open}(\mathbb{V}). Concretely,

view this post on Zulip Peva Blanchard (Nov 15 2025 at 15:45):

Functor C0C^0

I want to define a (sym mon double) functor C0:Open(G)Open(V)C^0 : \text{Open}(\mathbb{G}) \to \text{Open}(\mathbb{V}).
Both double categories have the same vertical category FinSet\text{FinSet}, so the object and vertical parts of C0C^0 are clear.

Focus on the horizontal part. Consider an open graph (X,G,Y)(X,G,Y), i.e. a cospan in G\mathbb{G}

L(X)GL(Y)L(X) \to G \leftarrow L(Y)

The core idea is to send a graph HGH \in \mathbb{G} to the vector space of real functions on the vertices of HH, equipped with the obvious inner product f,g=vf(v)g(v)\langle f, g \rangle = \sum_v f(v) g(v). If ϕ:HK\phi : H \to K is morphism in G\mathbb{G}, the linear map ψ=C0ϕ:C0KC0H\psi = C^0 \phi : C^0 K \to C^0 H is defined, for all fC0Kf \in C^0 K

ψ(f):(vV(H))f(ϕ(v))\psi(f) : (v \in V(H)) \to f( \phi(v) )

The functor so defined is contravariant.

view this post on Zulip Peva Blanchard (Nov 15 2025 at 15:45):

Thus, from the cospan in G\mathbb{G}, we obtain a cospan in Vop\mathbb{V}^{op}

C0(X)C0(G)C0(Y)C^0(X) \to C^0(G) \leftarrow C^0(Y)

Connecting with my original intent, I would like to consider this cospan as "the vector space of 0-cochains on the open graph". (But, of course, it is not an actual vector space)

view this post on Zulip Peva Blanchard (Nov 15 2025 at 15:47):

What would an element of this "space" look like? Concretely, it is a function ff on the vertices of the graph GG, together with its restrictions fXf|_X and fYf|_Y.

view this post on Zulip Peva Blanchard (Nov 15 2025 at 16:20):

This whole thing is going a bit out of control, but let's continue with 2-cells.
Consider the 2-cell in Open(G)\text{Open}(\mathbb{G})
image.png

where α:GH\alpha : G \to H is a morphism in G\mathbb{G}, f:XIf : X \to I and g:YJg : Y \to J are functions.

We define a 2-cell (diagram in Vop\mathbb{V}^{op})
image.png

In this diagram C0(α)C^0(\alpha) represents the linear map that sends any functions λ\lambda on the vertices of HH to the function λα\lambda\alpha on the vertices of GG. And similarly for C0(f),C0(g)C^0(f), C^0(g).

I won't write the details, but it seems that all the squares commute indeed. Basically, it's all about copying function values or restricting to subsets of vertices.

view this post on Zulip Peva Blanchard (Nov 15 2025 at 16:35):

Now, I am realizing that C0C^0 arrives in Open(Vop)\text{Open}(\mathbb{V}^{op}). But I have not verified if Vop\mathbb{V}^{op} is eligible for the structured cospan construction.

view this post on Zulip Peva Blanchard (Nov 15 2025 at 16:40):

Vop\mathbb{V}^{op} is ok

view this post on Zulip Peva Blanchard (Nov 15 2025 at 16:48):

There are lots of other laws (vertical/horizontal compositions, ...) to check in order to state that C0:Open(G)Open(Vop)C^0 : \text{Open}(\mathbb{G}) \to \text{Open}(\mathbb{V}^{op}) is a sym monoidal double functor.

I'll take a break on the details of C0C^0 here, possibly coming back to it when I am more confident that the end is worth it.

view this post on Zulip Peva Blanchard (Nov 16 2025 at 20:37):

Ok, I think I went too fast into double category territory and got lost. I'll take a step back.

view this post on Zulip John Baez (Nov 16 2025 at 22:13):

You can really delete comments by mousing to the right of them, clicking on the three dots that appear, and then clicking on "Delete message". Then we won't see these messages saying deleted.

view this post on Zulip Peva Blanchard (Nov 16 2025 at 22:18):

I tried, but a Zulip option prevents me from deleting my own messages if they are more than 1 day old.

view this post on Zulip John Baez (Nov 16 2025 at 22:19):

Oh, I guess you're right.

view this post on Zulip Peva Blanchard (Nov 17 2025 at 17:21):

Alright, I may have a more appropriate approach. Here is the general outline.

I have my category G\mathbb{G} of graphs (weighted multigraph, with edge involution, and morphisms that aggregate weights), and the associated double category Open(G)\text{Open}(\mathbb{G}) of open graphs.

Let V\mathbb{V} be the category of finite dimensional inner product spaces with linear maps. I'll consider the double category Cospan(V)\text{Cospan}(\mathbb{V}) of cospans in V\mathbb{V}.

Next, I want to define double functors

C0:Open(G)Cospan(V)C1:Open(G)Cospan(V)\begin{align*} C^0 : \text{Open}(\mathbb{G}) &\to \text{Cospan}(\mathbb{V}) \\ C^1 : \text{Open}(\mathbb{G}) &\to \text{Cospan}(\mathbb{V}) \end{align*}

Then, I want to define (double) natural transformations

d:C0C1d:C1C0\begin{align*} d : C^0 \Rightarrow C^1 \\ d^*: C^1 \Rightarrow C^0 \end{align*}

Finally, I'll obtain my "open graph laplacian" as the composition

Δ=dd:C0C0\Delta = d^*d : C^0 \Rightarrow C^0

Similarly, I'll obtain the "edge laplacian", as dd:C1C1dd^* : C^1 \Rightarrow C^1.

view this post on Zulip Peva Blanchard (Nov 17 2025 at 17:45):

Functor C0C^0

definition

view this post on Zulip Peva Blanchard (Nov 17 2025 at 17:57):

Functor C1C^1

This one was trickier than I thought.

definition

view this post on Zulip Peva Blanchard (Nov 17 2025 at 18:10):

Transformation d:C0C1d : C^0 \Rightarrow C^1

definition

view this post on Zulip Peva Blanchard (Nov 17 2025 at 18:14):

Transformation d:C1C0d^* : C^1 \Rightarrow C^0

definition

view this post on Zulip John Baez (Nov 17 2025 at 19:17):

Let V\mathbb{V} be the category of finite dimensional inner product spaces with linear maps.

These are arbitrary linear maps I guess, not preserving the inner product?

view this post on Zulip John Baez (Nov 17 2025 at 19:35):

this work of yours looks very interesting, though I have not gone through it all yet.

By the way, the edge involution may not be very important to all of this. I brought it into my paper Topological crystals, along with the annoying inequality i(e)ei(e) \ne e, because it's a reasonably convenient way to make each edge "bidirectional": you can reverse an edge from a vertex $$v$ to a vertex ww and get one going from ww to vv, and this new reversed edge is never the same as the original edge. The italicized clause only matters from edges from a vertex to itself. Without this clause you could have some edges from vv to vv that are their own reverses, and others that are not, and this can be confusing. But do these edges from a vertex to itself affect the graph Laplacian at all?

view this post on Zulip Peva Blanchard (Nov 17 2025 at 19:56):

John Baez said:

These are arbitrary linear maps I guess, not preserving the inner product?

Indeed, I'm not enforcing the linear maps to preserve the inner product. Actually, I'm not really using the inner product structures explicitly. For dd^*, I'm giving an explicit formulation, which I derived from the usual adjoint of a linear map.

view this post on Zulip Peva Blanchard (Nov 17 2025 at 19:57):

John Baez said:

this work of yours looks very interesting, though I have not gone through it all yet.

Thank you :) I havn't gone through it all either, as there are double categorical concepts I have to experiment with.

view this post on Zulip Peva Blanchard (Nov 17 2025 at 20:03):

John Baez said:

But do these edges from a vertex to itself affect the graph Laplacian at all?

Mmh, actually these self-loops caused me some issue in defining C1C^1. I had to explicitly "kill" these self-loops. The space C1GC^1G is that of functions cc on the edges of GG that are anti-symmetric with respect to the involution, and which assigns 00 to self-loops.

Moreover, in the usual graph-theoretic laplacian, self-loops are also killed, because the differential dfdf on this edge is automatically zero.

view this post on Zulip Peva Blanchard (Nov 17 2025 at 20:05):

I assumed bidirectional edges because of the original situation where I encountered these "super-laplacian matrices". Maybe they are not needed after all to define the open graph laplacian.

In graph theory, it is possible to define the laplacian matrix of a directed (multi)graph. This laplacian is not symmetric anymore, so the usual spectral analysis is not as convenient.

view this post on Zulip Peva Blanchard (Nov 17 2025 at 21:03):

Transformation Δ=dd\Delta = d^*d

Now, I want to have a look at what Δ\Delta does. Composing all things together, we obtain this diagram
image.png

Let ϕC0G\phi \in C^0G. We obtain, for any vertex vV(G)v \in V(G)

Δϕv=χ(v)(s(e)=vϕ(v)χ(t(e))ϕ(t(e)))\Delta \phi \cdot v = \chi(v) \cdot \left(\sum_{s(e) = v} \phi(v) - \chi(t(e)) \cdot \phi(t(e))\right)

where

χ(v)={1if v∉XY0if vXY\chi(v) = \begin{cases} 1 &\text{if } v \not\in X \cup Y \\ 0 &\text{if } v \in X \cup Y \end{cases}

For instance, for the graph GG that is line of 4 vertices, the two endpoints being exterior vertices, we obtain, as a matrix

Δ=(0000021001200000)\Delta = \begin{pmatrix} 0 & 0 & 0 & 0 \\ 0 & 2 & -1 & 0 \\ 0 & -1 & 2 & 0 \\ 0 & 0 & 0 & 0 \end{pmatrix}

which is indeed "super-laplacian".

view this post on Zulip Peva Blanchard (Nov 17 2025 at 21:11):

Bug

I made a mistake in my definitions: the transformation Δ\Delta is not natural ...

counter-example

I think that's because I allow too many graph morphisms in G\mathbb{G}.

view this post on Zulip John Baez (Nov 17 2025 at 21:57):

Peva Blanchard said:

John Baez said:

These are arbitrary linear maps I guess, not preserving the inner product?

Indeed, I'm not enforcing the linear maps to preserve the inner product. Actually, I'm not really using the inner product structures explicitly. For dd^*, I'm giving an explicit formulation, which I derived from the usual adjoint of a linear map.

Good, then don't include the inner product in the definition of the category V\mathbb{V} - it's much nicer to let V=Vect\mathbb{V} = \mathsf{Vect} if that works, or maybe FinVect\mathsf{FinVect} if you demand that your graphs are finite - which you probably need, for all your sums to converge!

view this post on Zulip Peva Blanchard (Nov 18 2025 at 17:24):

I'll do that!

view this post on Zulip Peva Blanchard (Nov 18 2025 at 17:26):

I found this paper. The authors introduce a generalized graph laplacian. They also consider graphs with boundaries, which they call \partial-graphs.

They even define a category of \partial-graphs, with a notion of "harmonic morphisms". That might be the kind of morphisms I need for my construction to be "natural".

view this post on Zulip Peva Blanchard (Nov 19 2025 at 06:46):

This is interesting.
An harmonic morphism α:GH\alpha : G \to H between graphs has a degree function, degα:V(G)R\deg_\alpha : V(G) \to \mathbb{R}. This degree function comes up when relating the laplacians of GG and HH.
Namely, writing α:C0HC0G\alpha^* : C^0H \to C^0G for the pullback map,

ΔGαψ(u)=degα(u)αΔHψ(u)\Delta_G \alpha^*\psi (u) = \deg_\alpha(u) \cdot \alpha^* \Delta_H \psi (u)

for all ψ:V(H)R\psi : V(H) \to \mathbb{R} and uV(G)u \in V(G).

view this post on Zulip Peva Blanchard (Nov 19 2025 at 06:48):

In short notation,

ΔGα=degααΔH\Delta_G \alpha^* = \deg_\alpha{} \cdot \alpha^* \Delta_H

with the small caveat that degα\deg_\alpha acts diagonally. So it "almost" commutes.

I'm guessing this is a case of a 2-dimensional categorical structure
image.png

view this post on Zulip Peva Blanchard (Nov 19 2025 at 07:00):

So, by restricting graph morphisms α\alpha to be harmonic, my candidate for the natural transformation Δ\Delta of the double functor C0C^0 into itself should satisfy the following kind of "naturalness"
image.png

view this post on Zulip John Baez (Nov 19 2025 at 10:52):

Interesting stuff!

Peva Blanchard said:

An harmonic morphism α:GH\alpha : G \to H between graphs has a degree function, degα:V(G)R\deg_\alpha : V(G) \to \mathbb{R}. This degree function comes up when relating the laplacians of GG and HH.
Namely, writing α:C0HC0G\alpha^* : C^0H \to C^0G for the pullback map,

ΔGαψ(u)=degα(u)αΔHψ(u)\Delta_G \alpha^*\psi (u) = \deg_\alpha(u) \cdot \alpha^* \Delta_H \psi (u)

for all ψ:V(H)R\psi : V(H) \to \mathbb{R} and uV(G)u \in V(G).

Is that the only definition of degα\mathrm{deg}_\alpha, or does it also have some other characterization? From the name "degree", I'd guess degα(u)\deg_\alpha(u) might be the number of vertices in GG that α\alpha maps to the vertex uu of HH - that's a bit like the degree of a continuous map.

view this post on Zulip John Baez (Nov 19 2025 at 11:07):

Btw, it's worth noting that for a map α ⁣:GH\alpha \colon G \to H between finite graphs, we not only have a pullback α:C0(H)C0(G)\alpha^\ast : C^0(H) \to C^0(G) but also a pushforward α:C0(G)C0(H)\alpha_\ast: C^0(G) \to C^0(H), which is also very useful. The idea is that α(ψ)(u)\alpha_\ast(\psi)(u) is the sum of ψ\psi over all vertices that α\alpha maps to uu.

I'm wondering if the definition of harmonic morphism might be cleaner in terms of the pushforward, like this:

ΔHα=αΔG \Delta_H \alpha_* = \alpha_* \Delta_G

I'm wondering if the "degree function" shows up because they're using the pullback instead of the pushfoward. (This is how degree functions sometimes show up, if I'm remembering correctly.)

view this post on Zulip Peva Blanchard (Nov 19 2025 at 12:16):

John Baez said:

Is that the only definition of degα\mathrm{deg}_\alpha, or does it also have some other characterization?

I wrote too hastily, but the relation with laplacian is not how the authors define the degree function.
The actual definition is embedded with the definition of a harmonic graph morphism.

A harmonic graph morphism α:GH\alpha : G \to H between weighted graphs, is a usual graph morphism together with the condition that for any vertex uu in GG, with x=α(u)x = \alpha(u) its image in HH, for any edge ϵ\epsilon in HH that starts at xx, the sum of weights of the edges ee in GG over ϵ\epsilon that start at uu is proportional to the weight of ϵ\epsilon, and this coefficient λ(u)\lambda(u) of proportionality is the same for all ϵ\epsilon. In symbols,

eE(G),s(e)=u,α(e)=ϵω(e)=λ(u)ω(ϵ)\sum_{e \in E(G), s(e)=u, \alpha(e)=\epsilon} \omega(e) = \lambda(u) \cdot \omega(\epsilon)

The function λ:V(G)R\lambda : V(G) \to \mathbb{R} is the degree function.

view this post on Zulip Peva Blanchard (Nov 19 2025 at 12:18):

The authors explicitly refer to analytic maps between Riemannian manifolds, as a source of inspiration for this definition; but I don't know enough about this topic.

view this post on Zulip Peva Blanchard (Nov 19 2025 at 12:20):

John Baez said:

I'm wondering if the definition of harmonic morphism might be cleaner in terms of the pushforward, like this:

ΔHα=αΔG \Delta_H \alpha_* = \alpha_* \Delta_G

I'm wondering if the "degree function" shows up because they're using the pullback instead of the pushfoward. (This is how degree functions sometimes show up, if I'm remembering correctly.)

I tried that! But, with the definition above, it does not work. I don't have an explicit counter-example, but the result is very easy to prove for pullbacks, so I guess pullbacks are the right things to consider.

view this post on Zulip John Baez (Nov 19 2025 at 12:49):

Okay. I'm glad the degree is not extra structure you have to choose, but something defined in terms of the map of graphs.

view this post on Zulip Peva Blanchard (Nov 19 2025 at 17:07):

The following characterization of harmonic morphisms is helpful.

A graph morphism α:GH\alpha : G \to H is harmonic iff

view this post on Zulip Peva Blanchard (Nov 19 2025 at 17:10):

But then, we have a bad news: the category of graphs with harmonic morphisms is not closed under pushouts.

counter-example

This means we cannot use the structured cospan construction :sad:

view this post on Zulip Peva Blanchard (Nov 19 2025 at 17:17):

Should I consider the presheaves over the category of graphs with harmonic morphisms? sounds daunting...

view this post on Zulip Peva Blanchard (Nov 19 2025 at 17:28):

Mmh, maybe there is a work-around. I need push-outs only for horizontal composition.
So, maybe

view this post on Zulip Peva Blanchard (Nov 19 2025 at 17:30):

Mmh, but ... I would still need horizontal composition of 2-cells.

view this post on Zulip John Baez (Nov 19 2025 at 22:19):

You say "category of graphs with harmonic morphisms is not closed under pushouts" and you propose this example: the pushout of

GKH G \leftarrow K \to H

where
G=baG = b \leftarrow a
H=acH = a \to c
and K=aK = a.

But are the morphisms KGK \to G and KHK \to H harmonic?

view this post on Zulip Peva Blanchard (Nov 20 2025 at 09:08):

Oh indeed. I think they are. Since KK is just a point, its laplacian is the matrix (0)(0). So, the pullback of any harmonic function along any morphism out of KK is trivially harmonic. Actually the pullback of any function along any morphism out of KK is trivially harmonic.

But it feels like a convention issue.

view this post on Zulip Peva Blanchard (Nov 20 2025 at 09:37):

There might be a way out.

I want to consider cospans XGYX \to G \leftarrow Y (with XX and YY being discrete finite graph) in the usual graph category.

But, I restrict the 2-cells to be of the form
image.png

where f,gf,g are functions, and α\alpha is a graph morphism such that

I'll call these 2-cells: harmonic 2-cells.

view this post on Zulip Peva Blanchard (Nov 20 2025 at 10:25):

Then, I want to check if these kinds of 2-cells compose well horizontally.
image.png

I.e., assuming (f,α,g)(f,\alpha,g) and (g,β,h)(g,\beta,h) are harmonic 2-cells, is it true that the 2-cell (f,γ,h)(f,\gamma,h) is also harmonic?

view this post on Zulip Peva Blanchard (Nov 20 2025 at 17:42):

It does not work. Since γG=α\gamma|_G = \alpha and γH=β\gamma|_H = \beta, and γ\gamma should be harmonic over JJ, α\alpha and β\beta must have well-defined degrees over JJ, and they must match.

view this post on Zulip Peva Blanchard (Nov 20 2025 at 17:53):

Ok, I see two paths:

view this post on Zulip John Baez (Nov 20 2025 at 22:57):

If it were me, I'd think hard about what's going on with this stuff, not worrying too much about the formalism involved until I understood what was going on, the stuff that the formalism should capture - and eventually it would all work out perfectly, because this particular stuff is bound to be beautiful. I know this is not very useful advice.

view this post on Zulip Peva Blanchard (Nov 21 2025 at 06:42):

I think I see what you mean. I think the phenomenon at hand is roughly the following.

A harmonic morphism GHG \to H is about "locally relating diffusion (or random walks) on the two spaces". Or, pulling back a random walk on HH to a random walk on GG.

Now, when composing open graphs (horizontally), we are gluing two spaces together along a specified subspace. But there must be a condition on the kinds of gluing I want, otherwise my harmonic morphisms won't go through.

It's like concatenating two differentiable functions α,β\alpha, \beta on [0,1][0,1] and [1,2][1,2]: even if they match at 11, α(1)=β(1)\alpha(1) = \beta(1), if their derivatives at 11 don't match, the resulting function has a singularity at 11.

In this figure
image

α\alpha and β\beta match "vertex-wise", but may not match "degree-wise".

view this post on Zulip John Baez (Nov 21 2025 at 09:13):

Now, when composing open graphs (horizontally), we are gluing two spaces together along a specified subspace. But there must be a condition on the kinds of gluing I want, otherwise my harmonic morphisms won't go through.

It's like concatenating two differentiable functions α,β\alpha, \beta on [0,1][0,1] and [1,2][1,2]: even if they match at 11, α(1)=β(1)\alpha(1) = \beta(1), if their derivatives at 11 don't match, the resulting function has a singularity at 11.

Right. This kind of issue shows up in a lot of places. In the study of PDE we don't usually demand that functions are harmonic on the boundary: instead, we impose boundary conditions. In TQFT, we don't glue smooth manifolds together along a boundary, because the result wouldn't be smooth: instead we thicken the boundary up to a 'collar' and glue the collars together.

Both issues would show up if one were trying to cook up a (double) category where the morphisms M:STM : S \to T are something like smooth manifolds MM with boundary M=ST\partial M = S \cup T equipped with harmonic functions f:MRf: M \to \mathbb{R}. That sounds like something people studying the Laplace equation would like to do - but they'd instantly run into issues like you're hitting. So they'd try to use tricks to deal with these issues.

view this post on Zulip Peva Blanchard (Nov 21 2025 at 10:48):

I think I found a trick. I'll define the category FinSetΔ\text{FinSet}_\Delta of finite sets, with "harmonic functions".

Objects are finite sets. And a "harmonic function" from XX to YY is a pair (f,degf)(f, \deg_f) where f:XYf : X \to Y is a usual function, and degf:X(0,)\deg_f : X \to (0,\infty) is a function. I am interpreting degf\deg_f as the degree function of ff, although there is no laplacian to work with.

Composition of f:XYf : X \to Y and g:YZg : Y \to Z is given by the usual function composition for the function part, and its degree by a "chain rule"

deggf(x)=degg(f(x))degf(x)\deg_{gf}(x) = \deg_g(f(x)) \cdot \deg_f(x)

view this post on Zulip Peva Blanchard (Nov 21 2025 at 10:55):

Then, I can define a 2-cell of open graphs to be

such that α\alpha matches (f,degf)(f,\deg_f) on XX, and (g,degg)(g,\deg_g) on YY, both with respect to vertices, and the degrees. I.e., for all xXx \in X and yYy\in Y,

α(x)=f(x), degα(x)=degf(x)α(y)=g(y), degα(y)=degg(y)\begin{align*} \alpha(x) = f(x), &~ \deg_\alpha(x) = \deg_f(x) \\ \alpha(y) = g(y), &~ \deg_\alpha(y) = \deg_g(y) \end{align*}

view this post on Zulip Peva Blanchard (Nov 21 2025 at 11:03):

I believe these 2-cells compose correctly horizontally, because the boundary condition now contains just enough information (vertex mapping, and degree) to guarantee a "harmonious" gluing.

view this post on Zulip John Baez (Nov 21 2025 at 12:33):

I haven't had time to understand this right, but I want to advocate using harmonious as a technical term somewhere.

view this post on Zulip Peva Blanchard (Nov 23 2025 at 10:56):

Alright, so I think I have a sound framework. Let's recap.

I'm using the category G\mathbb{G} of graphs as presheaves over the usual schema s,t:VEs,t : V \to E, and with positive edge function ω:E(0,)\omega : E \to (0,\infty). We impose no condition on preserving the weights.

Then we define

Interestingly, the transformation Δ\Delta has a "twisted" naturalness condition

Δα=degααΔ\Delta \alpha^* = \deg_\alpha{} \cdot \alpha^*\Delta

image.png

view this post on Zulip Peva Blanchard (Nov 23 2025 at 11:04):

(I still need to check rigorously all the double category theoretic conditions, though).

view this post on Zulip Peva Blanchard (Nov 23 2025 at 11:13):

Next are some paths I wish to explore.

(Baby) cohomological stuff. I think we can define functors H0,H1:OpenΔ(G)Span(V)coH^0, H^1 : \text{Open}_\Delta(\mathbb{G}) \to \text{Span}(\mathbb{V})^{co} that give the 0-th and 1st cohomology spaces of open graphs.

Spectral analysis. Studying eigenvalues of the open graph laplacian. E.g., Cheeger inequality.

I think we can relate these questions to the corresponding questions for usual graphs (not open), because an open graph is "just a graph with specified input and output vertices". But maybe they will have a special flavor from the perspective of open graphs.

view this post on Zulip Peva Blanchard (Nov 23 2025 at 17:27):

Damn, I should learn to never celebrate too early. It seems that my laplacian is not compatible with horizontal composition.

view this post on Zulip Peva Blanchard (Nov 23 2025 at 17:33):

Given the composition (using push-outs) of open graphs
image.png

the effect of Δ\Delta is described by this diagram
image.png

In particular, I expected that

ΔGπG=πGΔMΔHπH=πHΔM\begin{align*} \Delta_G \pi_G &= \pi_G \Delta_M \\ \Delta_H \pi_H &= \pi_H \Delta_M \end{align*}

where πG,πH\pi_G,\pi_H are the restriction maps to GG and HH respectively.

But, by construction, (ΔGϕ)(y)=0(\Delta_G \phi)(y) = 0 for all ϕC0G\phi \in C^0G and yYy \in Y. Whereas, restricting ΔMψ\Delta_M \psi to YY is not necessarily zero.

view this post on Zulip Peva Blanchard (Nov 23 2025 at 17:35):

The underlying reason is: when we glue to graphs GG and HH along a specified subset YY of vertices to obtain a new graph MM, then YY is no longer a subset of exterior vertices in MM.

view this post on Zulip David Egolf (he/him) (Nov 23 2025 at 18:45):

I've not been following in any kind of detail, so I hope it's okay to ask a basic question!

When I think of composing via pushouts, I think of working with objects where each object has an "input" and an "output". And I have the idea that the output of one object needs to match the input of the other: I think that matching input/output is what we're gluing along in the pushout. So then when we're done, we end up with a glued together object having the input of one object and the output of the other.

But in this case of graphs with "interior" and "exterior" vertices it does not immediately seem to me like there is an input and output. It's more like there is an "interface" of exterior vertices which can be glued (in only certain ways, I assume, to satisfy the description in the associated super-laplacian matrix?) to other interfaces.

So does it really make sense to compose cospans using pushouts in this case, where seemingly our objects don't come with clear "inputs" and "outputs"? I don't know what the standard kind of tool is to glue together things with interfaces, if the interfaces aren't necessarily nicely described in terms of an "input" part and an "output" part.

view this post on Zulip David Egolf (he/him) (Nov 23 2025 at 18:49):

I also wanted to say: I find the first idea you described above quite intriguing! It seems to me that this "super-laplacian" matrix describes a way to "zoom in" on part of a graph, and get a subgraph together with some partial information about how it connects to the rest of the graph.

Studying situations where we have only partial information about how the part relates to the whole (or other parts) sounds interesting to me. Or from a bit of a different angle, I'm interested in how to stitch together things where we have some partially specifying restriction on how to do so. (For example, in medical imaging it is common to combine local or low-quality reconstructions to form a more complete or higher-quality one.)

view this post on Zulip James Deikun (Nov 23 2025 at 19:15):

Pushing out things that hae any kind of part in common is a typical practice; it doesn't have to be "input" on one side and "output" on the other, though it can.

view this post on Zulip David Egolf (he/him) (Nov 23 2025 at 19:24):

James Deikun said:

Pushing out things that hae any kind of part in common is a typical practice; it doesn't have to be "input" on one side and "output" on the other, though it can.

That makes sense! I guess it seems to me that there could be a certain amount of arbitrary "directionality" involved in this case, though, if one is making a category where the morphisms are cospans. We need a source and target for each cospan, but if the two feet of the cospan are on "equal footing" (as opposed to the case where one foot is the "input" and one is the "output" for some application of interest) deciding which foot is the source and which is the target sounds a bit unsatisfying. But maybe this is fine in practice!

view this post on Zulip David Egolf (he/him) (Nov 23 2025 at 19:31):

Oh! I suppose one way to avoid making this unsatisfying choice would just be to have two morphisms for each cospan, one for each choice of source and target.

view this post on Zulip David Egolf (he/him) (Nov 23 2025 at 19:32):

More generally, if one can use this cospan approach to glue together things without "inputs" and "outputs" (instead having just an interface) by deciding for the moment which part of the interface should act as an "input" and which part of the interface should act as an "output" - then that's very cool! That sounds pretty powerful.

view this post on Zulip John Baez (Nov 23 2025 at 20:19):

Yeah, if you have an electrical circuit made of wires with resistors, capacitors and inductors on them, with some loose wires hanging out, the circuit doesn't know which wires you're considering "inputs" and which you're considering "outputs". It merely sets up a relation between the voltages and currents on these loose wires. And you can attach one circuit to another without caring what part of the interface is the "input" and what part is the "output".

This was the first example my student Brendan Fong did back around 2015 when he invented the theory of "decorated cospans" (cospans where the apex is equipped with some extra structure). Later my students and I handled Markov processes this way, and then Petri nets, and then stock-flow models for epidemiology, and so on. In all these examples the division of the interface into two parts, "input" and "output", is purely conventional. We can also divide the interface into more parts using a "multicospan"... or just one part.... depending on what's convenient.

The new DOTS (double operadic theory of systems) formalism that Topos is using for their ARIA grant for safeguarded AI uses these ideas and others - but one move they make is to always use just one interface. It turns out they can get away with that.

view this post on Zulip Peva Blanchard (Nov 24 2025 at 05:47):

@David Egolf (he/him) Just to add to what James and John said, an interesting feature of such structures is that you can easily flip inputs and outputs. And I think dagger categories formalize this.

view this post on Zulip Peva Blanchard (Nov 24 2025 at 06:16):

Speaking of patching things together, here is a more down-to-earth example of why my laplacian does not compose horizontally.

Say I have a (symmetric) graph MM organized as a line of 5 vertices {1,2,3,4,5}\{1,2,3,4,5\}. MM can be seen as the horizontal composition of two graphs:

With the definitions above, the laplacian matrices are

ΔG=(110120000)ΔH=(000021011)ΔM=(1112112112111)\begin{align*} \Delta_G &= \begin{pmatrix} 1 & -1 & 0 \\ -1 & 2 & 0 \\ 0 & 0 & 0 \end{pmatrix} \\ \Delta_H &= \begin{pmatrix} 0 & 0 & 0 \\ 0 & 2 & -1 \\ 0 & -1 & 1 \end{pmatrix}\\ \Delta_M &= \begin{pmatrix} 1 & -1 & & & \\ -1 & 2 & -1 & \\ & -1 & 2 & -1 & \\ & & -1 & 2 & -1 \\ & & & -1 & 1 \end{pmatrix} \end{align*}

view this post on Zulip Peva Blanchard (Nov 24 2025 at 06:18):

ΔG\Delta_G (resp. ΔH\Delta_H) contains the same relevant data as the sub-matrix of ΔM\Delta_M corresponding to the indices {1,2}×{1,2}\{1,2\} \times \{1,2\} (resp. {4,5}×{4,5}\{4,5\}\times\{4,5\}). But ΔM\Delta_M also contains the data about vertex 33, and how it connects to the interior vertices of GG and HH.

view this post on Zulip Peva Blanchard (Nov 24 2025 at 06:29):

But if we use the usual definitions of laplacians for GG and HH, we have

ΔG=(110121011)ΔH=(110121011)\begin{align*} \Delta_G &= \begin{pmatrix} 1 & -1 & 0 \\ -1 & 2 & -1 \\ 0 & -1 & 1 \end{pmatrix} \\ \Delta_H &= \begin{pmatrix} 1 & -1 & 0 \\ -1 & 2 & -1 \\ 0 & -1 & 1 \end{pmatrix} \end{align*}

And we can see that ΔM\Delta_M is really obtained by gluing these two matrices on the vertex 33.

view this post on Zulip Peva Blanchard (Nov 24 2025 at 06:55):

In my category of open graphs, I am gluing along a subset of vertices. Since a subset of vertices is basically a graph without any edges, I am losing all the information about those edges.

Maybe I should consider a more involved data to glue graphs along. Something like vertices together with dangling edges.

view this post on Zulip John Baez (Nov 24 2025 at 10:12):

In this problem I'd be inclined to try gluing together graphs only along dangling edges (also called "half-edges", since they have either a source or a target but not both). Gluing together two half-edges creates an edge.

I'm not promising that this works! - it just feels like a possible way out.

view this post on Zulip Peva Blanchard (Nov 27 2025 at 06:01):

I tried that, but did not manage to make it work.

So I dig a bit more into the literature, and found an interesting paper which discusses pseudo-inverse of laplacians and simplices. The part that interests me is their Property 5.

Consider a usual graph GG. Partition the vertices VG=VHVKV_G = V_H \sqcup V_K, and let HH and KK be the corresponding (full) subgraphs. Then the graph laplacian of GG can be written, in matrix form, as

ΔG=(ΔHBBΔK)\Delta_G = \begin{pmatrix} \Delta_H & -B \\ -B^\top & \Delta_K \end{pmatrix}

Consider the Schur complement

Δ^H=ΔHBΔK1B\widehat{\Delta}_H = \Delta_H - B \Delta_K^{-1} B^\top

Then Δ^H\widehat{\Delta}_H is a laplacian matrix.

What I find interesting is:

view this post on Zulip Peva Blanchard (Dec 06 2025 at 02:26):

So, I tried harder to work with graphs with half-edges, and it seems promising.

I'll focus on the horizontal (loose) part here.

An open graph (X,G,Y)(X,G,Y) is given by

Such an open graph can be thought as a loose arrow from XX to YY (weighted sets).
To compose two open graphs (X,G,Y)(X,G,Y) and (Y,H,Z)(Y,H,Z), we glue the output and input half-edges together to obtain an open graph (X,GYH,Z)(X, G \odot_Y H, Z).

view this post on Zulip Peva Blanchard (Dec 06 2025 at 02:37):

Next, I want to define functors C0C^0 and C1C^1 that will land in the horizontal category of spans of vector spaces. For that, I found it useful to think of potential, currents and conductivities.

C0C^0 as voltages

Usually, a voltage configuration on a graph is modeled as a real-valued function on its vertices. But here I have input and output edges. So, C0C^0 assigns to the open graph (X,G,Y)(X,G,Y) the span

UXUXVGUYUY U_X \leftarrow U_X \oplus V_G \oplus U_Y \to U_Y

where

C1C^1 as currents

Continuing the analogy, C1C^1 will describe configuration of currents on my open graph. So C1C^1 assigns to the open graph (X,G,Y)(X,G,Y) the span

EXEXEGEYEYE_X \leftarrow E_X \oplus E_G \oplus E_Y \to E_Y

where

view this post on Zulip Peva Blanchard (Dec 06 2025 at 02:45):

Horizontal composition

I think the functors C0C^0 and C1C^1 are oplax. The intuition is that, given two open graphs (X,G,Y)(X,G,Y) and (Y,H,Z)(Y,H,Z), we obtain map of spans from the span C0(X,GYH,Z)C^0(X, G \odot_Y H, Z) to the pullback span C0(X,G,Y)YC0(Y,H,Z)C^0(X,G,Y) \oplus_Y C^0(Y,H,Z) that "forgets" the voltage drop along edges from YY. Hence, this map is not invertible.

view this post on Zulip John Baez (Dec 06 2025 at 10:50):

This looks nice so far. By the way, I think it's good to distinguish between the (electric) potential at a vertex and the voltage along an edge. The voltage along a directed edge is the potential at its target minus the potential at its source (or maybe the other way around).

Wikipedia:

Voltage, also known as (electrical) potential difference, electric pressure, or electric tension, is the difference in electric potential between two points.

The electric potential at a vertex is not physically observable because if we add the same constant to the potential

view this post on Zulip Peva Blanchard (Dec 06 2025 at 13:19):

Yes, indeed I somehow needed to distinguish voltage along an edge and potential at a vertex. I'm thinking of edge weight as a conductivity (inverse resistance), so voltage drop and current are two encodings of the same information (by Ohm's law). But, as you mention, the potential at vertices has "more freedom". I found this distinction to help when defining the transformation d:C0C1d : C^0 \Rightarrow C^1 and d:C1C0d^* : C^1 \Rightarrow C^0.

view this post on Zulip Peva Blanchard (Dec 06 2025 at 13:28):

Transformation dd

I picture the transformation dd as translating the "voltage/potential"-based picture (C0C^0) into the "current"-based picture (C1C^1). More formally, I have a map of spans
image.png
where

view this post on Zulip Peva Blanchard (Dec 06 2025 at 13:48):

Transformation dd^*

The transformation dd^* goes the other way, translating currents to voltage/potential.
image.png

This map of span is more interesting. An element of its domain is basically a configuration of currents ii on the edges of GG (input, output and internal). For input (resp output) edges, the corresponding voltage drop is simply

ue=ωe1ieu_e = \omega^{-1}_e i_e

For a vertex vv of GG, the potential is defined as

ϕv=1κveE(v)ϵeie\phi_v = \frac{1}{\kappa_v} \sum_{e \in E(v)} \epsilon_e i_e

where

view this post on Zulip Peva Blanchard (Dec 06 2025 at 14:03):

Laplacian

Finally, my laplacian is Δ=dd\Delta = d^*d. It takes voltage/potential configuration (x,ψ,y)(x,\psi,y) and gives a new voltage/potential configuration (x,ϕ,y)(x, \phi, y) where the voltage drop x,yx,y along input/output edges remain the same, and

ϕv=1κveEG(v)ωe(ψ(se)ψ(te))1κveX(v)ωexe+1κveY(v)ωeye\phi_v = \frac{1}{\kappa_v} \sum_{e \in E_G(v)} \omega_e (\psi(s_e) - \psi(t_e)) - \frac{1}{\kappa_v}\sum_{e \in X(v)} \omega_e x_e + \frac{1}{\kappa_v} \sum_{e \in Y(v)} \omega_e y_e

I am interpreting κvϕv\kappa_v \phi_v as an excess of current at vertex vv. This view seems compatible with the Poisson equation relating the electrical charge and potential in electrostatics. Here, we have additional terms due to the input and output currents (i.e. voltage drops x,yx,y)

view this post on Zulip Peva Blanchard (Dec 06 2025 at 14:22):

Adding free wires

I just noticed that I was lacking an identity in my (horizontal) category of open graphs. I think it suffices to add "free wires" to my open graph, i.e. edge-like things that are not incident to any vertex. Or, to put it another way, a pairing of input and output half-edges. I want these wires just to transport currents.

view this post on Zulip Peva Blanchard (Dec 06 2025 at 14:38):

With this electric picture in mind, it is tempting to think about magnetism as well. Instead of a graph, we would have a simplicial complex with triangular faces. On these triangular faces would live magnetic fluxes, which would induce loopy currents (Faraday's law). But let's leave that for future investigations.

view this post on Zulip John Baez (Dec 06 2025 at 16:25):

As you may know, Brendan Fong and I did a study of open electric circuits where a lot of the deeper work started when we tried to get identity morphisms. You can always take a [[semicategory]] and formally throw in identities, but we didn't want to do that.

view this post on Zulip Peva Blanchard (Dec 06 2025 at 16:53):

I was actually browsing through your work. Thank you for pointing out the paper!

view this post on Zulip John Baez (Dec 06 2025 at 19:28):

To get identities in a category where morphisms are something like "graphs with half-edges", Joachim Kock goes further and allows what some people call "passing edges". These are edges that have neither a source nor target vertex.... they just pass through. The idea is that if you compose such a passing edge

---

with a half-edge

---o

you get a half-edge

------o

view this post on Zulip John Baez (Dec 06 2025 at 19:33):

It turns out to be quite easy to define "undirected graphs with half-edges and passing edges". Kock and Joyal call them Feynman graphs and define them in Section 2 of Feynman graphs, and nerve theorem for compact symmetric multicategories (extended abstract)

view this post on Zulip John Baez (Dec 06 2025 at 19:36):

They may make these Feynman graphs into morphisms of a (double) category. I'm not sure! They should do it.

view this post on Zulip Peva Blanchard (Dec 06 2025 at 22:04):

Oh this is very interesting!

view this post on Zulip Peva Blanchard (Dec 06 2025 at 22:12):

From what I understood, they do not consider Feynman graphs directly as morphisms in a category.
Instead, it seems that they consider a Feynman graph with nn ports as a pattern of composition to obtain a nn-ary operation.

Sligthly more formally

view this post on Zulip Peva Blanchard (Dec 06 2025 at 22:14):

So their formulation leans more on the "unbiased/non-directional" way of composing, in contrast with, e.g., the cospan construction which is more on the "directional" side (as noticed by @David Egolf (he/him) earlier)

view this post on Zulip Peva Blanchard (Dec 06 2025 at 22:20):

I think the formal definition of Feynman graphs may be what I need. Interestingly, they consider étale maps, whereas I considered, earlier, harmonious maps. I may be wrong, but it seems that étale maps are also harmonious maps.

view this post on Zulip Peva Blanchard (Dec 07 2025 at 03:55):

Reading John and Brendan's paper on circuits is also very instructive. It seems that I've just been redoing parts of it. E.g., the laplacian is "just" the self-adjoint operator associated with a Dirichlet form.

view this post on Zulip Peva Blanchard (Dec 07 2025 at 03:59):

My picture of C0C^0 as voltage/potential and C1C^1 as current configurations seems related to the Section about Lagrangian relations.

view this post on Zulip John Baez (Dec 07 2025 at 12:10):

Yes. For more on this C0,C1C^0, C^1 stuff see my nLab page

A lot of this found its way into my paper with Brendan, but a lot did not.

view this post on Zulip Cole Comfort (Dec 08 2025 at 01:11):

Peva Blanchard said:

I tried that, but did not manage to make it work.

So I dig a bit more into the literature, and found an interesting paper which discusses pseudo-inverse of laplacians and simplices. The part that interests me is their Property 5.

Consider a usual graph GG. Partition the vertices VG=VHVKV_G = V_H \sqcup V_K, and let HH and KK be the corresponding (full) subgraphs. Then the graph laplacian of GG can be written, in matrix form, as

ΔG=(ΔHBBΔK)\Delta_G = \begin{pmatrix} \Delta_H & -B \\ -B^\top & \Delta_K \end{pmatrix}

Consider the Schur complement

Δ^H=ΔHBΔK1B\widehat{\Delta}_H = \Delta_H - B \Delta_K^{-1} B^\top

Then Δ^H\widehat{\Delta}_H is a laplacian matrix.

What I find interesting is:

I haven't read the conversation in full detail, but maybe this would be interesting to you. We use the Schur complement in precisely this way to remove internal vertices from our labelled graphs in order to obtain a normal form for the compact closed category affine Lagrangian relations:

https://arxiv.org/pdf/2401.07914#proposition.35

This subsumes the star-mesh transformations of electrical circuits as well as the local complementation and pivoting of stabiliser quantum states.