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.
Hi, for some project (unrelated to CT), I am studying real matrices which satisfy
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 is the matrix representation of the laplacian operator associated with a weighted graph. The vertices of the graph index the rows (and columns) of , and there is an edge between two distinct vertices whenever , the weight of this edge being . The quantity is equal to the sum of weights of all edges incident to .
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 . The difference , where runs over interior vertices, accounts for the sum of weights of "boundary edges" connecting 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.
I don't understand one key sentence in your description. I'd hope that we have
for all interior vertices .
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.
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.
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 and .
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 and .
Yes that's right.
Here is an example
image.png
The usual laplacian of the whole graph is the matrix
And if I "discard" the exterior vertices and , I obtain the submatrix
which is "super-laplacian".
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.
Open graphs are one of the basic examples in structured cospan theory, so they appear in all introductions to structured cospans.
I explained a bit more the motivation behind my question in this topic
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
If anyone doesn't mind, I'll do like David Egolf, and use this thread to think out loud.
So, I reread the definition of a structured cospan. And before even using them, I need to figure out which category 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 .
I'll start with informally stated requirements for the kind of graphs I need, and then I'll choose the most appropriate category . 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 denote the source and target map, is the involution that reverse edges, and is the weight function.
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 .
The other part that troubles me is the weight , because it refers directly to . I remember that attributes were handled a specific way in ACSets.
Ok, I re-read this blog post. I could present my schema as a profunctor between the category consisting of and , and the singleton category, with single object . And then a graph would be an attributed c-set on this schema, i.e. some -cell etc. I guess this framework is useful to obtain general results about ac-sets, e.g., closure under colimits.
Anyway, I'll stay low-brow, and define my category explicitly.
An object of is specified by
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.)
Oh thanks. I'll follow your advice. So an object of is specified by
For morphisms, I see two options.
The most obvious one. A morphism from to is specified by functions and such that source and target functions are compatible (, ), involutions are compatible (), and weights are preserved ().
Weights are accumulated. A morphism from to is specified by functions as above, except for the preservation of weight. Instead,
I may need to think a bit more about my use case to decide which one is the best.
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 , possibly with multiple edges with the same endpoints, it has laplacian matrix . The off-diagonal entries of aggregate the weights. Also, I can almost go the other way around: given a laplacian matrix , I can build a graph (with at most one edge between any two distinct vertices) which has as laplacian matrix.This situation feels like an adjunction.
So I'll stick with option 2 for my morphisms.
Now, to use the structured cospan machinery, it suffices that I
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 from to . I want to build a coequalizer graph . Let's define
where is a short-hand notation for the equivalence relation on generated by iff there exists such that and . And similarly for . The source and target maps can be defined consistenly on , the involution as well (thanks to John's advice).
The weight function is not so obvious, because of my choice of morphism
Actually, we have no choice. An edge is an equivalence class (subset of edges in ). I define its weight as the sum of weights of its members, . This is the only way to define it if I want the quotient map to satisfy the weight aggregation rule.
I'll skip the details on checking that , so defined, is indeed a coequalizer.
Alright, now, the functor . It maps a finite set to the the graph with as set of vertices, and empty set of edges. The right adjoint is the functor that maps a graph to its set of vertices. Again, I'll skip checking the details (that they are functors, and adjoint to each other).
Finally, I obtain a symmetric monoidal double category of open graphs.
Ok, now the fun part, defining the laplacian. In algebraic graph theory, we can define the laplacian by considering the vector space of functions on vertices, of functions on edges, equipping them with the obvious inner products, defining the discrete differential by
and the laplacian as
where is the adjoint of .
Thanks to the categorical perspective, I want to try the following strategy:
Not sure, if this is the right approach. Even if I have an open cochain complex, how do I obtain a "laplacian"?
We usually get a graph Laplacian by making (resp. ) into inner product spaces such that vertices (resp. edges) form an orthonormal basis. This lets you define an operator by
(i.e. is the adjoint operator of ). Then we get a Laplacian on by and one on by taking .
By the way, the people I know write for your and for what I just called .
Yes. This gives me another idea. So we want define inner product spaces and , and a linear map when is an open graph, i.e. a horizontal 1-morphism in .
So, maybe, we want to define symmetric monoidal double functors into a well-chosen sym mon double category , and a transformation that satisfy some good properties.
I will try to define using the structured cospan construction, .
Let's try with the category specified by:
I claim is closed under finite colimits. Indeed, Orthogonal direct sums provide coproducts. Cokernel of is provided by the projection on the orthogonal complement of the image of in .
Now, I want to define a functor that preserve finite colimits.
Given a finite set , I define to be the free vector space equipped with the unique inner product that makes an orthonormal basis.
I don't think is a left adjoint, because, intuitively, the right adjoint would need to pick an orthonormal basis. So I'll check directly if preserve finite colimits.
It seems clear to me that preserve finite coproducts, so I'll focus on coequalizers.
Consider two parallel functions between finite sets, and their coequalizer.
image.png
We have to check that the linear map is a cokernel of .
is a cokernel
We conclude that preserves finite colimits.
Wrapping everything up, the structured cospan construction gives a sym monoidal double
category . Concretely,
I want to define a (sym mon double) functor .
Both double categories have the same vertical category , so the object and vertical parts of are clear.
Focus on the horizontal part. Consider an open graph , i.e. a cospan in
The core idea is to send a graph to the vector space of real functions on the vertices of , equipped with the obvious inner product . If is morphism in , the linear map is defined, for all
The functor so defined is contravariant.
Thus, from the cospan in , we obtain a cospan in
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)
What would an element of this "space" look like? Concretely, it is a function on the vertices of the graph , together with its restrictions and .
This whole thing is going a bit out of control, but let's continue with 2-cells.
Consider the 2-cell in
image.png
where is a morphism in , and are functions.
We define a 2-cell (diagram in )
image.png
In this diagram represents the linear map that sends any functions on the vertices of to the function on the vertices of . And similarly for .
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.
Now, I am realizing that arrives in . But I have not verified if is eligible for the structured cospan construction.
is ok
There are lots of other laws (vertical/horizontal compositions, ...) to check in order to state that is a sym monoidal double functor.
I'll take a break on the details of here, possibly coming back to it when I am more confident that the end is worth it.
Ok, I think I went too fast into double category territory and got lost. I'll take a step back.
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.
I tried, but a Zulip option prevents me from deleting my own messages if they are more than 1 day old.
Oh, I guess you're right.
Alright, I may have a more appropriate approach. Here is the general outline.
I have my category of graphs (weighted multigraph, with edge involution, and morphisms that aggregate weights), and the associated double category of open graphs.
Let be the category of finite dimensional inner product spaces with linear maps. I'll consider the double category of cospans in .
Next, I want to define double functors
Then, I want to define (double) natural transformations
Finally, I'll obtain my "open graph laplacian" as the composition
Similarly, I'll obtain the "edge laplacian", as .
definition
This one was trickier than I thought.
definition
definition
definition
Let be the category of finite dimensional inner product spaces with linear maps.
These are arbitrary linear maps I guess, not preserving the inner product?
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 , because it's a reasonably convenient way to make each edge "bidirectional": you can reverse an edge from a vertex $$v$ to a vertex and get one going from to , 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 to 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?
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 , I'm giving an explicit formulation, which I derived from the usual adjoint of a linear map.
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.
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 . I had to explicitly "kill" these self-loops. The space is that of functions on the edges of that are anti-symmetric with respect to the involution, and which assigns to self-loops.
Moreover, in the usual graph-theoretic laplacian, self-loops are also killed, because the differential on this edge is automatically zero.
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.
Now, I want to have a look at what does. Composing all things together, we obtain this diagram
image.png
Let . We obtain, for any vertex
where
For instance, for the graph that is line of 4 vertices, the two endpoints being exterior vertices, we obtain, as a matrix
which is indeed "super-laplacian".
I made a mistake in my definitions: the transformation is not natural ...
counter-example
I think that's because I allow too many graph morphisms in .
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 , 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 - it's much nicer to let if that works, or maybe if you demand that your graphs are finite - which you probably need, for all your sums to converge!
I'll do that!
I found this paper. The authors introduce a generalized graph laplacian. They also consider graphs with boundaries, which they call -graphs.
They even define a category of -graphs, with a notion of "harmonic morphisms". That might be the kind of morphisms I need for my construction to be "natural".
This is interesting.
An harmonic morphism between graphs has a degree function, . This degree function comes up when relating the laplacians of and .
Namely, writing for the pullback map,
for all and .
In short notation,
with the small caveat that acts diagonally. So it "almost" commutes.
I'm guessing this is a case of a 2-dimensional categorical structure
image.png
So, by restricting graph morphisms to be harmonic, my candidate for the natural transformation of the double functor into itself should satisfy the following kind of "naturalness"
image.png
Interesting stuff!
Peva Blanchard said:
An harmonic morphism between graphs has a degree function, . This degree function comes up when relating the laplacians of and .
Namely, writing for the pullback map,
for all and .
Is that the only definition of , or does it also have some other characterization? From the name "degree", I'd guess might be the number of vertices in that maps to the vertex of - that's a bit like the degree of a continuous map.
Btw, it's worth noting that for a map between finite graphs, we not only have a pullback but also a pushforward , which is also very useful. The idea is that is the sum of over all vertices that maps to .
I'm wondering if the definition of harmonic morphism might be cleaner in terms of the pushforward, like this:
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.)
John Baez said:
Is that the only definition of , 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 between weighted graphs, is a usual graph morphism together with the condition that for any vertex in , with its image in , for any edge in that starts at , the sum of weights of the edges in over that start at is proportional to the weight of , and this coefficient of proportionality is the same for all . In symbols,
The function is the degree function.
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.
John Baez said:
I'm wondering if the definition of harmonic morphism might be cleaner in terms of the pushforward, like this:
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.
Okay. I'm glad the degree is not extra structure you have to choose, but something defined in terms of the map of graphs.
The following characterization of harmonic morphisms is helpful.
A graph morphism is harmonic iff
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:
Should I consider the presheaves over the category of graphs with harmonic morphisms? sounds daunting...
Mmh, maybe there is a work-around. I need push-outs only for horizontal composition.
So, maybe
Mmh, but ... I would still need horizontal composition of 2-cells.
You say "category of graphs with harmonic morphisms is not closed under pushouts" and you propose this example: the pushout of
where
and .
But are the morphisms and harmonic?
Oh indeed. I think they are. Since is just a point, its laplacian is the matrix . So, the pullback of any harmonic function along any morphism out of is trivially harmonic. Actually the pullback of any function along any morphism out of is trivially harmonic.
But it feels like a convention issue.
There might be a way out.
I want to consider cospans (with and being discrete finite graph) in the usual graph category.
But, I restrict the 2-cells to be of the form
image.png
where are functions, and is a graph morphism such that
I'll call these 2-cells: harmonic 2-cells.
Then, I want to check if these kinds of 2-cells compose well horizontally.
image.png
I.e., assuming and are harmonic 2-cells, is it true that the 2-cell is also harmonic?
It does not work. Since and , and should be harmonic over , and must have well-defined degrees over , and they must match.
Ok, I see two paths:
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.
I think I see what you mean. I think the phenomenon at hand is roughly the following.
A harmonic morphism is about "locally relating diffusion (or random walks) on the two spaces". Or, pulling back a random walk on to a random walk on .
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 on and : even if they match at , , if their derivatives at don't match, the resulting function has a singularity at .
In this figure
image
and match "vertex-wise", but may not match "degree-wise".
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 on and : even if they match at , , if their derivatives at don't match, the resulting function has a singularity at .
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 are something like smooth manifolds with boundary equipped with harmonic functions . 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.
I think I found a trick. I'll define the category of finite sets, with "harmonic functions".
Objects are finite sets. And a "harmonic function" from to is a pair where is a usual function, and is a function. I am interpreting as the degree function of , although there is no laplacian to work with.
Composition of and is given by the usual function composition for the function part, and its degree by a "chain rule"
Then, I can define a 2-cell of open graphs to be
such that matches on , and on , both with respect to vertices, and the degrees. I.e., for all and ,
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.
I haven't had time to understand this right, but I want to advocate using harmonious as a technical term somewhere.
Alright, so I think I have a sound framework. Let's recap.
I'm using the category of graphs as presheaves over the usual schema , and with positive edge function . We impose no condition on preserving the weights.
Then we define
Interestingly, the transformation has a "twisted" naturalness condition
(I still need to check rigorously all the double category theoretic conditions, though).
Next are some paths I wish to explore.
(Baby) cohomological stuff. I think we can define functors 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.
Damn, I should learn to never celebrate too early. It seems that my laplacian is not compatible with horizontal composition.
Given the composition (using push-outs) of open graphs
image.png
the effect of is described by this diagram
image.png
In particular, I expected that
where are the restriction maps to and respectively.
But, by construction, for all and . Whereas, restricting to is not necessarily zero.
The underlying reason is: when we glue to graphs and along a specified subset of vertices to obtain a new graph , then is no longer a subset of exterior vertices in .
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.
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.)
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.
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!
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.
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.
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.
@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.
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 organized as a line of 5 vertices . can be seen as the horizontal composition of two graphs:
With the definitions above, the laplacian matrices are
(resp. ) contains the same relevant data as the sub-matrix of corresponding to the indices (resp. ). But also contains the data about vertex , and how it connects to the interior vertices of and .
But if we use the usual definitions of laplacians for and , we have
And we can see that is really obtained by gluing these two matrices on the vertex .
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.
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.
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 . Partition the vertices , and let and be the corresponding (full) subgraphs. Then the graph laplacian of can be written, in matrix form, as
Consider the Schur complement
Then is a laplacian matrix.
What I find interesting is:
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 is given by
Such an open graph can be thought as a loose arrow from to (weighted sets).
To compose two open graphs and , we glue the output and input half-edges together to obtain an open graph .
Next, I want to define functors and 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.
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, assigns to the open graph the span
where
Continuing the analogy, will describe configuration of currents on my open graph. So assigns to the open graph the span
where
I think the functors and are oplax. The intuition is that, given two open graphs and , we obtain map of spans from the span to the pullback span that "forgets" the voltage drop along edges from . Hence, this map is not invertible.
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
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 and .
I picture the transformation as translating the "voltage/potential"-based picture () into the "current"-based picture (). More formally, I have a map of spans
image.png
where
The transformation 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 on the edges of (input, output and internal). For input (resp output) edges, the corresponding voltage drop is simply
For a vertex of , the potential is defined as
where
Finally, my laplacian is . It takes voltage/potential configuration and gives a new voltage/potential configuration where the voltage drop along input/output edges remain the same, and
I am interpreting as an excess of current at vertex . 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 )
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.
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.
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.
I was actually browsing through your work. Thank you for pointing out the paper!
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
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)
They may make these Feynman graphs into morphisms of a (double) category. I'm not sure! They should do it.
Oh this is very interesting!
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 ports as a pattern of composition to obtain a -ary operation.
Sligthly more formally
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)
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.
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.
My picture of as voltage/potential and as current configurations seems related to the Section about Lagrangian relations.
Yes. For more on this stuff see my nLab page
A lot of this found its way into my paper with Brendan, but a lot did not.
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 . Partition the vertices , and let and be the corresponding (full) subgraphs. Then the graph laplacian of can be written, in matrix form, as
Consider the Schur complement
Then is a laplacian matrix.
What I find interesting is:
- is a super-laplacian matrix
- It is as if taking the Schur complement "integrates out" the "surrounding graph" .
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.