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: learning: questions

Topic: Span(Set): Can this idea be salvaged?


view this post on Zulip Eric Forgy (Jan 04 2021 at 01:07):

Hi,

I was working on a little "Intro to Span(Set) for Engineers" for my own education as well as to help motivate some other things I'm working on.

I noticed that if you have a span V:V: *\to * where * is a set with one element, you can compose it with itself to get the span V×V:V\times_* V: *\to * and (unless I made a mistake) it turns out that V×VV\times_* V is just the normal Cartesian product, i.e.
{}
V×V=V×V.V\times_* V = V\times V.
{}
I also noticed that if you have a span V:VVV: V\to V where the source and target are identity functions, you can compose it with itself to get the span V×VV:VVV\times_V V: V\to V. The set V×VVV\times_V V consists of elements (v1,v2)V×V(v_1,v_2)\in V\times V such that t(v1)=s(v2)t(v_1) = s(v_2), but s,ts,t are just identity functions so elements of V×VVV\times_V V are pairs (v,v)(v,v) and (unless I made a mistake)
{}
V×VVVV\times_V V \cong V
{}
so that considering isomorphism classes of spans, V:VVV:V\to V is an identity morphism.

I thought this could be a cute way to define a product V×VVV\times V\to V of elements of a set by forming a commuting diagram of spans

image.png

I want to get something morally like

v1v2={v1,if v1=v2,otherwise.\begin{aligned} v_1\, v_2 = \begin{cases} \quad v_1, & \text{if}\ v_1 = v_2 \\ \quad\emptyset, & \text{otherwise.} \end{cases}\end{aligned}

Considering isomorphism classes of spans, I want to replace that :point_of_information: diagram with

image.png

If v1=v2v_1 = v_2, I think the diagram is fine, but if v1v2v_1\ne v_2, it doesn't parse because \emptyset is not necessarily an element of VV.

In desperation, I tried augmenting VV with the empty set so I have a diagram

image.png

but this is starting to feel desparate and I'm about to accept that multiplying elements of a set via maps between spans is just a bad idea and I should drop it.

Is there any way to salvage this?

The motivation is that I am going to send my sets to algebras via a functor, i.e. VKVV \to K^V (functions from VV to a field KK). In this algebra, for every element iVi\in V we have a basis function eiKVe^i\in K^V such that
{}
ei(j)=δjie^i(j) = \delta^i_j
{}
with product
{}
eiej=δi,jei.e^i e^j = \delta^{i,j} e^i.
{}
So I think it would be interesting if we could define this product in Span(Set)\mathsf{Span(Set)} in terms of commuting diagrams. Since functors preserve commuting diagrams, then if I have a rule like that in Span(Set)\mathsf{Span(Set)} it gets preserved if I have a functor out of Span(Set).\mathsf{Span(Set)}.

Any ideas? Thank you :pray:

Edit: If it matters, the first diagram above :point_of_information: is piece of a natural transformation between functors
{}
F,G:NSpan(Set)F,G: \mathbb{N}\to\mathsf{Span(Set)}
{}
so I was hoping to say something morally like, "Multiplication of elements of a set is a natural transformation."

view this post on Zulip John Baez (Jan 04 2021 at 01:39):

Eric Forgy said:

Hi,

I was working on a little "Intro to Span(Set) for Engineers" for my own education as well as to help motivate some other things I'm working on.

I noticed that if you have a span V:V: *\to * where * is a set with one element, you can compose it with itself to get the span V×V:V\times_* V: *\to * and (unless I made a mistake) it turns out that V×VV\times_* V is just the normal Cartesian product, i.e.
{}
V×V=V×V.V\times_* V = V\times V.
{}

That's true! This fact is famous and can be generalized a lot.

view this post on Zulip John Baez (Jan 04 2021 at 01:41):

Eric Forgy said:

I also noticed that if you have a span V:VVV: V\to V where the source and target are identity functions...

That's called an identity span, it's an identity morphism in the category (or bicategory) of spans. This fact explains some of your observations.

view this post on Zulip John Baez (Jan 04 2021 at 01:49):

Eric Forgy said:

I thought this could be a cute way to define a product V×VVV\times V\to V of elements of a set by forming a commuting diagram of spans [...]

I want to get something morally like

v1v2={v1,if v1=v2,otherwise.\begin{aligned} v_1\, v_2 = \begin{cases} \quad v_1, & \text{if}\ v_1 = v_2 \\ \quad\emptyset, & \text{otherwise.} \end{cases}\end{aligned}

That's not something you should want. First, there are only two god-given ways to give a set VV a multiplication if we don't have any other structure to help us. One rule is this:

v1v2=v1 v_1\, v_2 = v_1

and the other is this

v1v2=v2 v_1 \, v_2 = v_2

Both rules are associative, so every set naturally becomes a semigroup in two different ways.

It's obvious that there are no other ways, since (by assumption) we don't have anything else to work with.

In particular, \emptyset is not even an element of VV.

On the other hand, if you want a partially defined multiplication on VV you could decree that v1v2v_1 \, v_2 equals v1v_1 when v1=v2v_1 = v_2 and decree that it's undefined otherwise. This makes any set into a semigroup object in the category of sets and partially defined functions. (That's an important category.) You seem to be trying to use \emptyset as a stand-in for "undefined".


view this post on Zulip John Baez (Jan 04 2021 at 01:53):

Note:

1) composition of morphisms in a category is partially defined, so the set of morphisms of any category becomes a semigroup object in the category of sets and partially defined maps.

2) given a semigroup object XX in the category of sets and partially defined maps, we can always give the free vector space on XX a product where we define the product of two elements of XX to be zero if it's undefined. This is an associative algebra without unit.

Combining tricks 1) and 2), any category gives an associative algebra without unit. (If the category is finite, this algebra actually has a unit.)

You, Eric, sometimes do this when your category is the category of paths in a graph.

view this post on Zulip Eric Forgy (Jan 04 2021 at 01:56):

John Baez said:

You seem to be trying to use \emptyset as a stand-in for "undefined".

Exactly. Yeah. I didn't know how to handle "undefined" and "empty" was the closest thing I could think of (and I see your next comment on "partial stuff") :+1:

view this post on Zulip John Baez (Jan 04 2021 at 01:58):

There's a lot of fun stuff to say about the category of sets and partially defined functions:

https://ncatlab.org/nlab/show/partial+function#idea

view this post on Zulip Eric Forgy (Jan 04 2021 at 01:58):

John Baez said:

You, Eric, sometimes do this when your category is the category of paths in a graph.

Yeah. That is exactly what I am trying to do. I'll think about it :raised_hands:

The usual definition of product of paths in a graph as concatenation (if defined) felt a little contrived so I was trying to come up with some arrow theoretic way to show that is the only thing that makes sense.

view this post on Zulip John Baez (Jan 04 2021 at 01:58):

There's nothing contrived about that.

view this post on Zulip John Baez (Jan 04 2021 at 01:59):

There's a forgetful functor from Cat to Graph, and its left adjoint sends each graph to the category where morphisms are paths of edges!

view this post on Zulip John Baez (Jan 04 2021 at 02:00):

That's the way to make precise this intuition: any graph gives a category where you can "freely compose" edges and get morphisms in the category.

view this post on Zulip Eric Forgy (Jan 04 2021 at 02:00):

John Baez said:

There's a forgetful functor from Cat to Graph, and its left adjoint sends each graph to the category where morphisms are paths of edges!

This sounds like the arrow theoretic justification I was looking for :blush:

view this post on Zulip John Baez (Jan 04 2021 at 02:01):

Yes!

view this post on Zulip John Baez (Jan 04 2021 at 02:02):

I was telling you about this a while back, right before you overloaded and told me you had to feed your family:

  1. Start with a graph G.
  2. Apply the "free category on a graph" functor F:GraphCatF: \mathsf{Graph} \to \mathsf{Cat} to get a category F(G)F(G) whose morphisms are paths in the graph GG.
  3. Apply the "nerve" functor N:CatSSetN: \mathsf{Cat} \to \mathsf{SSet}, which turns categories into simplicial sets. An n-simplex in N(F(G))N(F(G)) will be a length-n path in the graph GG.
  4. Apply the "cochains" functor C:SSetDGAC: \mathsf{SSet} \to \mathsf{DGA} to create the dga of cochains on your simplicial set.

view this post on Zulip John Baez (Jan 04 2021 at 02:02):

Step 2 is the left adjoint we're talking about right now.

view this post on Zulip John Baez (Jan 04 2021 at 02:06):

Btw, it's completely normal to overload and "shut down" when learning category theory. I do it all the time. There's just a limit to how much abstraction anyone can swallow in one sitting!

view this post on Zulip John Baez (Jan 04 2021 at 02:06):

It becomes downright painful... that means it's time to take a break.

view this post on Zulip Eric Forgy (Jan 04 2021 at 02:08):

Thank you for your help and thank you for your understanding :raised_hands:

view this post on Zulip John Baez (Jan 04 2021 at 02:14):

I've "hit the wall" so many times learning category theory, I know this is just part of the process. I actually think it involves growing new neurons - there's a kind of physical pain involved. (But then when you understand things it's lots of fun.)

view this post on Zulip Henry Story (Jan 04 2021 at 06:00):

That is very helpful for me too. I have slowly been growing the neurons for the concept of Simplicial Set by following work on higher dimensional networks and tying it to RDF. (I still need to learn about this "nerve" functor, which I noticed turns up a lot). Step 3 now looks very intriguing.
I wonder if those 4 steps are an answer to @Jacques Carette 's question in the underlying graphs thread on Zulip which arose from his experience building a proof relevant Category Theory library in Agda. (see StackExchange question).

view this post on Zulip Eric Forgy (Jan 04 2021 at 06:21):

John Baez said:

There's a lot of fun stuff to say about the category of sets and partially defined functions:

https://ncatlab.org/nlab/show/partial+function#idea

I actually had this page open :+1:

(but obviously hadn't absorbed it yet :sweat_smile: )

In particular:

The category Setpart\mathsf{Set_{part}} of sets and partial functions between them is important for understanding computation.

I'm also looking at: https://ncatlab.org/nlab/show/partial+map+classifier

This looks like what I was trying to do (I was on the fence whether to use \cup or \coprod):

A partial function f:ABf:A⇀B between two sets can be turned into a total function fˉ:AB\bar{f}:A→B_⊥ by adding a new element to BB and sending all aAa∈A that are not in the domain of definition of ff to this new value = “undefined” and the rest just to their value under ff.

I don't think it matters what you use for "undefined", but some symbol is probably better than \emptyset :+1:

view this post on Zulip Eric Forgy (Jan 04 2021 at 08:32):

This also looks interesting: https://ncatlab.org/nlab/show/maybe+monad

I'm not yet ready to give up on this idea of defining a product of elements of a set like

v1v2={v1,if v1=v2i.e. “undefined”,otherwise.\begin{aligned} v_1\, v_2 = \begin{cases} \quad v_1, & \text{if}\ v_1 = v_2 \\ \quad\perp\,\text{i.e. ``undefined''}, & \text{otherwise.} \end{cases}\end{aligned}

but I need some nice diagram to express it :thinking:

view this post on Zulip Eric Forgy (Jan 04 2021 at 08:55):

John Baez said:

  1. Start with a graph G.
  2. Apply the "free category on a graph" functor F:GraphCatF: \mathsf{Graph} \to \mathsf{Cat} to get a category F(G)F(G) whose morphisms are paths in the graph GG.
  3. Apply the "nerve" functor N:CatSSetN: \mathsf{Cat} \to \mathsf{SSet}, which turns categories into simplicial sets. An n-simplex in N(F(G))N(F(G)) will be a length-n path in the graph GG.
  4. Apply the "cochains" functor C:SSetDGAC: \mathsf{SSet} \to \mathsf{DGA} to create the dga of cochains on your simplicial set.

I know I am being stubborn, but I am trying to do something like this, but with steps 1. and 2. replaced by a functor
{}
G:NSpan(Set)G: \mathbb{N}\to\mathsf{Span(Set)}
{}
I like this because each nNn\in\mathbf{N} maps to directed paths of length nn (G(1)G(1) is a directed graph as an endomorphism) directly and is more closely related to the next category I'm looking at, which is

The whole picture (still ironing it out) is

NSpan(Set)Span(Alg)Ch,\mathbb{N}\to\mathsf{Span(Set)}\to\mathsf{Span(Alg)}\to \mathsf{Ch}^\bullet,

where the last step is cochain complexes. This is very intuitive to me.

view this post on Zulip Eric Forgy (Jan 04 2021 at 09:04):

It isn't necessary to get a product

vivj={vi,if i=ji.e. “undefined”,otherwise.\begin{aligned} v_i\, v_j = \begin{cases} \quad v_i, & \text{if}\ i = j \\ \quad\perp\,\text{i.e. ``undefined''}, & \text{otherwise.} \end{cases}\end{aligned}

in Span(Set)\mathsf{Span(Set)}, but the product in Span(Alg)\mathsf{Span(Alg)} is of that form, i.e.

eiej={ei,if i=j0,otherwise.\begin{aligned} e^i\, e^j = \begin{cases} \quad e^i, & \text{if}\ i = j \\ \quad 0, & \text{otherwise.} \end{cases}\end{aligned}

It just seems like there should be a clean way to do this with commuting diagrams with 0.\perp\mapsto 0.

view this post on Zulip Eric Forgy (Jan 04 2021 at 09:08):

Btw, vertices are thought of as paths of length 0. The corresponding product of edges (spans) is

ϵiϵj={(ϵi,ϵj)E×VEif t(ϵi)=s(ϵj)i.e. “undefined”,otherwise\begin{aligned} \epsilon_i\, \epsilon_j = \begin{cases} \quad (\epsilon_i,\epsilon_j)\in E\times_V E & \text{if}\ t(\epsilon_i) =s(\epsilon_j) \\ \quad\perp\,\text{i.e. ``undefined''}, & \text{otherwise} \end{cases}\end{aligned}

with the obvious generalization to directed paths.

view this post on Zulip Eric Forgy (Jan 04 2021 at 09:19):

Btw^2, the second functor Span(Set)Span(Alg)\mathsf{Span(Set)\to Span(Alg)} maps

view this post on Zulip Jacques Carette (Jan 04 2021 at 14:11):

What that thread says about the underlying graph functor is that it doesn't respect categorical equivalence. Which does make it a rather bad functor indeed, as it can see fine structure that isn't visible in context (i.e. there are equivalent categories, in the 2-category of categories, which the underlying graph functor sends to inequivalent graphs).

But all that means for its adjoint is that it isn't faithful. Not a big deal.

I can't help but wonder if the nerve functor is well-behaved though.

view this post on Zulip David Egolf (Jan 04 2021 at 17:45):

@Eric Forgy I'm only partially following this discussion. Is this what you mean by a functor GG?
-It maps from the category freely generated by starting with a single object * and a single non-identity morphism +1+1 on it
-It sends the single object to a set of vertices G()G(*), and the generating morphism to a graph (endospan) G(+1)G(+1) on that set
-Composition of morphisms in Span(Set)\mathsf{Span(Set)} corresponds to pullbacks of the apex (arrow) sets with respect to the source and target functions of the corresponding graphs. This involves taking a subset of the cartesian product of the apex sets, requiring each ordered pair in the result to satisfy the condition that the target of the first element matches the source of the second element. So, G(+2)=G(+1)G(+1)G(+2) = G(+1)G(+1) corresponds to the paths of length 2 in the graph G(+1)G(+1).
-In general G(+n)G(+n) is the paths of length nn on the graph G(+1)G(+1).

view this post on Zulip Eric Forgy (Jan 04 2021 at 17:50):

That is exactly right David :+1::blush:

view this post on Zulip David Egolf (Jan 04 2021 at 17:52):

Intuitively, that makes sense. I understand functors as often generating a "best interpretation of the source in the target context". The source in this case is a category that is all about relating a thing to itself in ways generated by one non-trivial way. The functor then picks a single set to relate to itself, and then picks a single generating non-trivial self-relationship on that set - namely the graph G(+1)G(+1). Given a way of composing this self-relationship (in this case we chose to do this by concatenating compatible arrows into paths), this then generates a sequence of additional self-relationships on the set (the paths of higher order on G(+1)G(+1)).

view this post on Zulip David Egolf (Jan 04 2021 at 17:54):

I don't (yet) know enough algebra to follow what you are saying about modules. I'd appreciate it if you could describe the equivalent to "graphs" you are trying to generate in some simpler terms. Maybe in terms of vector spaces?

view this post on Zulip David Egolf (Jan 04 2021 at 18:24):

Eric Forgy said:

Btw^2, the second functor Span(Set)Span(Alg)\mathsf{Span(Set)\to Span(Alg)} maps

I see. Where before we had a set of vertices, now we have the functions on that set to some field (assuming VV is a set and KK is a field), which forms an "algebra" with "scalar" multiplication of functions by KK and multiplications of functions with functions presumably corresponding to element-wise multiplication, so (fg)(x)=f(x)g(x)(fg)(x) = f(x)g(x).
Before, to make a graph we introduced another set, and associated it in two ways with the set of interest.
Now, we are introducing another algebra of functions and associating it in two ways with our algebra of functions of interest.

view this post on Zulip Eric Forgy (Jan 04 2021 at 18:35):

David Egolf said:

I don't (yet) know enough algebra to follow what you are saying about modules. I'd appreciate it if you could describe the equivalent to "graphs" you are trying to generate in some simpler terms. Maybe in terms of vector spaces?

Oh dear, I am not the best person (especially among this crowd) to explain modules, but as one engineer to another, modules are a lot like vector spaces. You can add modules together. You can tensor them (if they meet the "apex" condition), but instead of scalar multiplication, you have "ring action". You usually don't talk about "modules", you talk about "(left or right) RR-modules" or, like in my case, "(R,S)(R,S)-bimodules". In my case, I have more than just rings, I have commutative associative algebras (which are also rings) so I deal with AA-bimodules (which is short for (A,A)(A,A)-bimodule). In my case, I have an AA-bimodule denoted Ω\Omega. This means with two elements f,gAf,g\in A and αΩ\alpha\in \Omega, ff and gg can act on α\alpha (which I think of as multiplying on the left and right) giving a new module element fαgΩ1.f\,\alpha\, g\in\Omega^1.

The "apex" condition for tensor product of modules means that if you have an (R,S)(R,S)-bimodule Ω\Omega and an (S,T)(S,T)-bimodule Ω\Omega' you can tensor them over SS resulting in a new (R,T)(R,T)-bimodule ΩSΩ\Omega\otimes_S \Omega'.

Or, in my case, I have an AA-bimodule Ω\Omega so I can tensor it with itself to get a new AA-bimodule ΩAΩ\Omega\otimes_A\Omega. I can repeat this getting AA-bimodules ΩAn.\Omega^{\otimes_A n}.

This is VERY reminiscent of what happens with a functor G:NSpan(Set)G:\mathbb{N}\to\mathsf{Span(Set)}. A directed graph G(1)=E:VVG(1) = E:V\to V as an endomorphism in Span(Set)\mathsf{Span(Set)} can be composed with itself nn times resulting in G(n)=G(1)×Vn.G(n) = G(1)^{\times_V n}.

An AA-bimodule Ω\Omega can be thought of as an endomorphism in Span(Alg)\mathsf{Span(Alg)}, i.e. a span AΩA.A\leftarrow\Omega\rightarrow A.

This is what my functor
{}
Span(Set)Span(Alg)\mathsf{Span(Set)\to Span(Alg)}
{}
does. It takes a span (directed graph)
{}
VEVV\leftarrow E\rightarrow V
{}
and sends it to the span (KVK^V-bimodule)
{}
KVKEKV.K^V\leftarrow K^E\rightarrow K^V.

view this post on Zulip Eric Forgy (Jan 04 2021 at 18:49):

Since a functor
{}
G:NSpan(Set)G: \mathbb{N}\to\mathsf{Span(Set)}
{}
is completely determined by what it does to the one object * in N\mathbb{N} and what it does to the morphism 11 in N\mathbb{N}, i.e.
{}
G()=VG(\bullet) = V and G(1):E:VVG(1): E: V\to V
{}
the functor is basically a directed graph (as an endomorphism in Span(Set)).\mathsf{Span(Set)}).
So writing
{}
NSpan(Set)Span(Alg)\mathbb{N}\to\mathsf{Span(Set)\to Span(Alg)}
{}
tells us that starting with a directed graph E:VVE:V\to V, we can construct an AA-bimodule Ω\Omega with A=KV.A = K^V.

view this post on Zulip David Egolf (Jan 04 2021 at 18:52):

Thanks for explaining! I'll have to meditate on how "paths" on bimodules relate to something more concrete.

view this post on Zulip Eric Forgy (Jan 04 2021 at 19:00):

Coming full circle...

As you correctly noted, KVK^V is the algebra of functions VKV\to K for some field KK with product defined pointwise, i.e.
{}
(fg)(i)=f(i)g(i).(f\,g)(i) = f(i)\,g(i).
{}
But, since AA is constructed from a set VV, it means the elements of the set iVi\in V correspond to basis elements in AA I denote as eie^i such that
{}
ei(j)=δjie^i(j) = \delta^i_j
{}
which gives us the product of basis elements as
{}
(eiej)(k)=δkiδkj,(e^i\, e^j)(k) = \delta^i_k\,\delta^j_k,
{}
which can be written as
{}
eiej=δi,jeie^i\,e^j = \delta^{i,j} e^i
{}
or in other words
{}
eiej={ei,if i=j0,otherwise.\begin{aligned} e^i\, e^j = \begin{cases} \quad e^i, & \text{if}\ i = j \\ \quad 0, & \text{otherwise.} \end{cases}\end{aligned}
{}
However, since I have this nice functor Span(Set)Span(Alg)\mathsf{Span(Set)\to Span(Alg)}, I'm wondering if I can move this product back to Span(Set)\mathsf{Span(Set)}
{}
vivj={vi,if i=ji.e. “undefined”,otherwise.\begin{aligned} v_i\, v_j = \begin{cases} \quad v_i, & \text{if}\ i = j \\ \quad\perp\,\text{i.e. ``undefined''}, & \text{otherwise.} \end{cases}\end{aligned}
{}
but define it as a commuting diagram so that when I hit it with my functor Span(Set)Span(Alg)\mathsf{Span(Set)\to Span(Alg)}, we get the same product I know I want in Span(Alg).\mathsf{Span(Alg)}. This step isn't absolutely necessary because there is a natural way to get the product directly in Span(Alg)\mathsf{Span(Alg)} as described above, BUT it would be nice I think so I'm still trying to figure out a nice way to do it.

view this post on Zulip Eric Forgy (Jan 04 2021 at 19:03):

David Egolf said:

Thanks for explaining! I'll have to meditate on how "paths" on bimodules relate to something more concrete.

Once you understand that, you are well on your way to understanding discrete differential geometry (which is the point of all this) :+1: :blush:

view this post on Zulip Eric Forgy (Jan 04 2021 at 19:13):

A general element fA=KVf\in A = K^V can be written as
{}
f=iVf(i)eif = \sum_{i\in V} f(i)\, e^i
{}
These are "discrete 0-forms".
A general element αΩ=KE\alpha\in\Omega = K^E can be written as
{}
α=ϵEα(ϵ)eϵ\alpha = \sum_{\epsilon\in E} \alpha(\epsilon)\, e^\epsilon
{}
These are "discrete 1-forms".
A general element βΩAΩ\beta\in\Omega\otimes_A\Omega can be written as
{}
β=(ϵ1,ϵ2)E×VEβ(ϵ1,ϵ2)eϵ1Aϵ2\beta = \sum_{(\epsilon_1,\epsilon_2)\in E\times_V E} \beta(\epsilon_1,\epsilon_2)\, e^{\epsilon_1\otimes_A \epsilon_2}
{}
These are NOT "discrete 2-forms".
To get discrete 2-forms, we need the last functor
{}
Span(Alg)Ch\mathsf{Span(Alg)\to Ch^\bullet}
{}
which is super cool and I haven't talked much about yet (except there are comments sprinkled around here the last few weeks). I am pretty excited about all this. It is a beautiful story to tell and I've almost got everything tidied up (thanks to a lot of help from John and others here :pray: ).

view this post on Zulip David Egolf (Jan 04 2021 at 19:19):

It sounds cool! I don't know enough differential geometry to say much more, sadly.

One more question: If we have a functor FF from Span(Set)\mathsf{Span(Set)} to Span(Algebra)\mathsf{Span(Algebra)}, acting on the object:
VsEtVV \leftarrow_s E \rightarrow_t V,
what span does this become in Span(Algebra)\mathsf{Span(Algebra)}? You mentioned already how FF acts on the sets, but how does it act on the functions?

view this post on Zulip Eric Forgy (Jan 04 2021 at 19:31):

David Egolf said:

It sounds cool! I don't know enough differential geometry to say much more, sadly.

One more question: If we have a functor FF from Span(Set)\mathsf{Span(Set)} to Span(Algebra)\mathsf{Span(Algebra)}, acting on the object:
VsEtVV \leftarrow_s E \rightarrow_t V,
what span does this become in Span(Algebra)\mathsf{Span(Algebra)}? You mentioned already how FF acts on the sets, but how does it act on the functions?

You are now caught up to where I am currently writing up in my article :blush:

I should try to finish writing this up first. Of course when my paper is finished, I will share with anyone interested :blush:

Almost everything I've said so far (except the ACT lingo) is contained in an old paper of mine (with Urs - creator of the nLab and uber genius)):
{}

I think there is still large potential for DDG in applied scientific computation and one of the purposes for resurrecting the old paper is to add some exposition to make it more widely accessible, simplify / formalize the presentation in the language of CT, and extend it a bit with some new recent results I'm excited to share :+1:

Since we wrote that paper, I've demonstrated several uses spanning mathematical finance, fluid dynamics for climate science, and general stochastic partial differential equations, but everything I did was on blogs and discussion forums. Nothing was formally published. The original motivation was for computational electromagnetics although I haven't written about that yet (something I hope to change soon).

view this post on Zulip Eric Forgy (Jan 04 2021 at 19:39):

David Egolf said:

You mentioned already how FF acts on the sets, but how does it act on the functions?

One thing I can say real quick is that there are no "functions" in Span(Set)\mathsf{Span(Set)} :blush:

Span(Set)\mathsf{Span(Set)} consists of sets and spans so the functor just needs to know how to send a set to an algebra, i.e. VKVV\mapsto K^V, and how to send a span to a span, i.e. E:VVΩ:AA.E:V\to V\mapsto \Omega:A\to A.

This is one of the beautiful things about working with Span(Set)\mathsf{Span(Set)} instead of just Set.\mathsf{Set}. :+1:

view this post on Zulip David Egolf (Jan 04 2021 at 19:41):

Yes, that is what I meant. A span in Set contains functions and I was wondering how those ended up being reflected in the resulting span of algebras.

view this post on Zulip Eric Forgy (Jan 04 2021 at 19:42):

One more thing, any function f:XYf:X\to Y in Set\mathsf{Set} can be sent to a span X:XYX:X\to Y in Span(Set)\mathsf{Span(Set)} so there is also a functor
{}
SetSpan(Set).\mathsf{Set\to Span(Set)}.

view this post on Zulip Eric Forgy (Jan 04 2021 at 19:47):

There are actually two ways to send a function to a span. That one :point_of_information: is usually denoted f.f_*. You can also send f:XYf: X\to Y to a span X:YXX: Y\to X which is denoted f.f^*.

view this post on Zulip David Egolf (Jan 04 2021 at 19:47):

Here is one way that one could send a span of sets to a span of vector spaces (I don't know enough about algebras!):
-View a span as a diagram in Set
-Apply the free functor from Set to Vect to each part of that diagram
I think the resulting vector spaces will be isomorphic to the vector spaces generated by considering all linear maps from the original set to the field we're using.

view this post on Zulip Eric Forgy (Jan 04 2021 at 19:49):

I would probably try thinking of Span(Set)Span(Vect)\mathsf{Span(Set)\to Span(Vect)} to get a handle on it.

view this post on Zulip Eric Forgy (Jan 04 2021 at 19:51):

An algebra can be thought of as a vector space VV together with a product VVVV\otimes V\to V. So if you forget about the product, KVK^V is still a vector space constructed from a set.

view this post on Zulip Eric Forgy (Jan 04 2021 at 19:53):

Another way to get a vector space from a set is by taking formal linear combinations of elements of the set. This is denoted K[V]K[V] (I think - John recently explained this to me). KVK^V is dual to K[V].K[V].

view this post on Zulip Eric Forgy (Jan 04 2021 at 19:56):

You can actually do this all with K[V]K[V] rather than the dual space KVK^V. I chose the latter because, ultimately, the algebra KVK^V will be 0-cochains. If you start with K[V]K[V], you end up with chains. In our paper, we show both formulations.

view this post on Zulip David Egolf (Jan 04 2021 at 19:56):

I believe the "formal linear combinations" way of making a vector space from a set corresponds to applying the free functor I was mentioning.

view this post on Zulip Eric Forgy (Jan 04 2021 at 19:57):

David Egolf said:

I believe the "formal linear combinations" way of making a vector space from a set corresponds to applying the free functor I was mentioning.

There are TWO free functors :blush:

view this post on Zulip Eric Forgy (Jan 04 2021 at 19:58):

VKVV\mapsto K^V is also "free", i.e. obtained from [Edit: a the] forgetful functor VectSet\mathsf{Vect\to Set} :blush:

view this post on Zulip Eric Forgy (Jan 04 2021 at 19:59):

Every VVectV\in\mathsf{Vect} has a dual VVect.V^*\in\mathsf{Vect}.

view this post on Zulip Eric Forgy (Jan 04 2021 at 20:01):

KV=K[V].K^V = K[V]^*.

view this post on Zulip David Egolf (Jan 04 2021 at 20:02):

I think I get the flavor at least! Thanks for taking the time to explain.

view this post on Zulip Eric Forgy (Jan 04 2021 at 20:06):

As I've said in your stream on imaging systems, the more I learn about spans, the more I love them and think they should be taught early in science / engineering. I'm trying to write up some notes "for Scientists and Engineers" to make this more accessible :+1:

view this post on Zulip Eric Forgy (Jan 04 2021 at 20:09):

Another way to say "span" is "multi-valued partial function" :mind-blown:

view this post on Zulip Eric Forgy (Jan 04 2021 at 20:09):

So spans handle things in computation like "undefined".

view this post on Zulip Eric Forgy (Jan 04 2021 at 20:12):

Also, spans E:VVE:V\to V', unlike functions, can be reversed E:VV.E^\dagger:V'\to V.

view this post on Zulip Eric Forgy (Jan 04 2021 at 20:15):

So given a directed graph, as a span, E:VVE:V\to V, we also have the directed graph E:VVE^\dagger:V\to V with edges reversed. These reverse graphs get sent to reversed AA-bimodules allowing us to define inner products, etc.

view this post on Zulip Eric Forgy (Jan 04 2021 at 20:23):

So for every functor
{}
G:NSpan(Set)G:\mathbb{N}\to \mathsf{Span(Set)},
{}
we have another functor
{}
G:NSpan(Set)G^\dagger:\mathbb{N}\to\mathsf{Span(Set)}
{}
with
{}
G()=G()=VG^\dagger(\bullet) = G(\bullet)^\dagger = V
{}
and
{}
G(1)=G(1)=E:VVG^\dagger(1) = G(1)^\dagger = E^\dagger: V\to V
{}
which means we have a natural transformation
{}
:GG.\dagger: G\Rightarrow G^\dagger.
{}

And now I am explaining my entire paper, so I should just finish writing it :joy:

view this post on Zulip David Egolf (Jan 04 2021 at 22:17):

I've been trying to figure out what the "nerve" of a category is (mentioned above by John Baez). I think it is relevant to what you are doing here. Here is an explanation from "A Leisurely Introduction to Simplicial Sets" that I thought was helpful:
Nerve

The nerve appears to spit out paths of various lengths, which is what the functor GG does above.

view this post on Zulip Eric Forgy (Jan 04 2021 at 22:25):

Thanks for sharing that :+1: I hadn't looked at that definition (at least not recently). It definitely seems related. It appears to be a different (less elegant - imo) way to say "Functor NSpan(Set)\mathbb{N}\to\mathsf{Span(Set)}" :thinking:

view this post on Zulip Eric Forgy (Jan 04 2021 at 22:50):

As usual, the nLab is also pretty helpful :blush:

https://ncatlab.org/nlab/show/nerve

There, it has

N(C)nC1×C0n.N(\mathcal{C}_\bullet)_n \coloneqq \mathcal{C}_1^{\times_{\mathcal{C}_0}^n}.

It doesn't say so, but consider n=2n=2 with C1×C0C1C_1\times_{C_0} C_1. This is just a directed graph (as an "endospan") composed with itself twice.

Expressing this as a functor
{}
NSpan(Set)\mathbb{N}\to\mathsf{Span(Set)}
{}
is much cleaner :thinking:

view this post on Zulip Eric Forgy (Jan 04 2021 at 22:56):

So reviewing John's treasure map:

John Baez said:

  1. Start with a graph G.
  2. Apply the "free category on a graph" functor F:GraphCatF: \mathsf{Graph} \to \mathsf{Cat} to get a category F(G)F(G) whose morphisms are paths in the graph GG.
  3. Apply the "nerve" functor N:CatSSetN: \mathsf{Cat} \to \mathsf{SSet}, which turns categories into simplicial sets. An n-simplex in N(F(G))N(F(G)) will be a length-n path in the graph GG.
  4. Apply the "cochains" functor C:SSetDGAC: \mathsf{SSet} \to \mathsf{DGA} to create the dga of cochains on your simplicial set.

The functor
{}
NSpan(Set)\mathbb{N}\to\mathsf{Span(Set)}
{}
actually takes care of steps 1-3, i.e. we obtain a nerve, in one shot :+1:
That is what I call engineering efficiency :nerd:

view this post on Zulip Eric Forgy (Jan 04 2021 at 22:59):

The spans G(n)G(n) are secretly nn-simplices.

view this post on Zulip David Egolf (Jan 04 2021 at 23:04):

It's also worth noting that article also later gives another definition of the nerve:
Nerve V2

in this case it's the right adjoint of a functor that embeds Δ\Delta into the category Cat\mathsf{Cat} of small categories.
To get nn composable arrows in a category CC (which like a path of length nn) we can take a functor from the category [n]=0->1...->n. So, if we consider all functors from [n] to CC, this is like all the paths of length nn in CC.

view this post on Zulip Eric Forgy (Jan 04 2021 at 23:04):

I assume that "cochain" functor SSetDGA\mathsf{SSet\to DGA} involves that degeneracy map and this is where our stuff differs. The DGA\mathsf{DGA} s you obtain from that are not associative on cochains (which is something I've been blabbering about for decades but haven't been able to enunciate clearly).

view this post on Zulip Eric Forgy (Jan 04 2021 at 23:13):

Cool stuff :+1:

I wouldn't be surprised if there was some kind of adjunction relating what I'm doing to this nerve stuff :thinking:

view this post on Zulip Eric Forgy (Jan 04 2021 at 23:15):

I also have face and degeneracy maps, but I want these to be AA-bimodule morphisms so they do not touch the first or last vertex. They only touch internal vertices.

view this post on Zulip John Baez (Jan 05 2021 at 02:43):

Eric Forgy said:

This also looks interesting: https://ncatlab.org/nlab/show/maybe+monad

I'm not yet ready to give up on this idea of defining a product of elements of a set like

v1v2={v1,if v1=v2i.e. “undefined”,otherwise.\begin{aligned} v_1\, v_2 = \begin{cases} \quad v_1, & \text{if}\ v_1 = v_2 \\ \quad\perp\,\text{i.e. ``undefined''}, & \text{otherwise.} \end{cases}\end{aligned}

but I need some nice diagram to express it :thinking:

As you long as you admit that the multiplication map m:V×VVm: V \times V \to V by this formula is a partial function, there's nothing wrong with it.

view this post on Zulip John Baez (Jan 05 2021 at 02:45):

But if you're mainly using this to study composition of paths in a graph, and how that operation is partially defined, it's probably better to just admit that paths in a graph are morphisms in a category. Composition of morphisms in a category is always partially defined, but in a very well-behaved way, so that you don't really need to bring in partial functions to study it.

view this post on Zulip John Baez (Jan 05 2021 at 02:48):

Eric Forgy said:

VKVV\mapsto K^V is also "free", i.e. obtained from [Edit: a the] forgetful functor VectSet\mathsf{Vect\to Set} :blush:

I don't know what "obtained from" means, but this functor is not the left adjoint of the forgetful functor VectSet\mathsf{Vect\to Set}, so we don't call it "free".

The "free" functor from sets to vector spaces is VK[V]V \mapsto K[V], since that's the left adjoint of the forgetful functor VectSet\mathsf{Vect\to Set}.

VKVV\mapsto K^V is just VK[V]V \mapsto K[V] followed by taking duals.

view this post on Zulip John Baez (Jan 05 2021 at 02:54):

Jacques Carette said:

I can't help but wonder if the nerve functor is well-behaved though.

The nerve of a category, you mean? (There are lots of "nerves".) Yes, I'd say that's well-behaved: equivalent categories have homotopy equivalent nerves.

view this post on Zulip Eric Forgy (Jan 05 2021 at 08:46):

John Baez said:

The "free" functor from sets to vector spaces is VK[V]V \mapsto K[V], since that's the left adjoint of the forgetful functor VectSet\mathsf{Vect\to Set}.

VKVV\mapsto K^V is just VK[V]V \mapsto K[V] followed by taking duals.

Thanks for clarifying.

view this post on Zulip Eric Forgy (Jan 05 2021 at 08:55):

John Baez said:

But if you're mainly using this to study composition of paths in a graph, and how that operation is partially defined, it's probably better to just admit that paths in a graph are morphisms in a category. Composition of morphisms in a category is always partially defined, but in a very well-behaved way, so that you don't really need to bring in partial functions to study it.

Thanks. This does seem like the right way to go :+1:

Thinking of functors G:NSpan(Set)G: \mathbb{N}\to\mathsf{Span(Set)}, I tend to focus on G()=VG(\bullet) = V and G(1)=E:VVG(1) = E:V\to V and for directed edges and directed paths, it is natural to think of the "partial"ness as just rules for composition of morphisms, but I can't neglect the poor identity span G(0)=V:VVG(0) = V:V\to V. The rule I'm thinking about for product of vertices is probably just stemming from the composition of the identity span with itself. I'll think about it. Thanks for the tip :pray:

view this post on Zulip Eric Forgy (Jan 05 2021 at 08:59):

The only way to compose two vertices (0-paths) is if they are the same vertex.

view this post on Zulip Eric Forgy (Jan 05 2021 at 18:32):

Note: This looks relevant: https://golem.ph.utexas.edu/category/2014/05/categories_vs_algebras.html

view this post on Zulip David Egolf (Jan 05 2021 at 18:33):

I'm trying to understand the multiplication you want to put on graphs.
You gave this diagram:
multiplication

As we discussed, a span induces a graph, and so we can view the apex as corresponding to edges and the feet as vertices in some graph.
The top span then corresponds to some collection of edges V×VV \times V that share common sources and targets. This is a graph where every edge has the same source as target. Further, every edge has the same source and target as every other edge. So, this is a graph on a single vertex with V×V|V \times V| arrows going from and to that vertex.

The bottom span was formed by composing the identity span with itself, which is VidVidVV \leftarrow_{id} V \rightarrow_{id} V. John Baez notes above that this is an identity morphism in the category of spans (where we are viewing spans as morphisms). So, up to isomorphism, the bottom span is just the identity span:
multiplication V2

Viewing the bottom span as a graph, it is the graph on vertices VV having exactly one edge for each vertex, going from that vertex to itself.

So, a map from the top span to the bottom span must satisfy idm=v1sid \circ m = v_1 \circ s and idm=v2tid \circ m = v_2 \circ t. Since ss and tt send everything to *, this means we need m(e1,e2)=v1()=v2()m(e_1, e_2) = v_1() = v_2().

This multiplication function is then totally determined by a map v1:Vv_1: * \to V, which selects a single vertex. The multiplication mm then takes any two edges and sends them to the unique edge in the bottom graph associated with the vertex v1()v_1(*).

So, we do have a kind of multiplication m:V×VVm: V\times V \to V. For a given choice of mm, we get a multiplication rule that sends every pair of elements in VV to a single fixed element of VV.

This seems different than the rule you were proposing though, so maybe I'm thinking about this wrong.

view this post on Zulip Eric Forgy (Jan 05 2021 at 18:45):

Hi David. Thanks for thinking of this problem and your note :pray:

I drew those diagrams knowing they were incorrect and I was looking for the correct way to do it. Sorry I didn't make that more clear :pray:

view this post on Zulip Eric Forgy (Jan 05 2021 at 18:47):

I'm currently thinking about the identity span: VVVV\leftarrow V\rightarrow V. This can be thought of as "paths of length 0". Composing paths of length 0 results in paths of length 0 and the only way to compose a vertex with a vertex is if it is the same vertex :mind-blown:

view this post on Zulip Eric Forgy (Jan 05 2021 at 18:48):

I'm also looking at the article I just posted on category algebras. There they define exactly the multiplication I am thinking about.

view this post on Zulip David Egolf (Jan 05 2021 at 18:50):

Eric Forgy said:

I'm currently thinking about the identity span: VVVV\leftarrow V\rightarrow V. This can be thought of as "paths of length 0". Composing paths of length 0 results in paths of length 0 and the only way to compose a vertex with a vertex is if it is the same vertex :mind-blown:

Doesn't this specify a graph where there is one arrow starting and ending at each vertex? These would be paths of length 1.

view this post on Zulip Eric Forgy (Jan 05 2021 at 18:58):

For sure, V:VVV:V\to V corresponds to paths of length 0, but I see your point and don't have a good explanation :sweat_smile:

Given a directed graph (as a span) E:VVE:V\to V, composing with itself nn times gives E×Vn:VVE^{\times_V n}:V\to V which are paths of length nn.
What happens when n=0n=0?
When n=0n=0, we have the identity span V:VVV:V\to V and I think of E×V0=V.E^{\times_V 0} = V.
I don't know how to make this precise, but pretty sure it is true.

view this post on Zulip David Egolf (Jan 05 2021 at 19:09):

I think I get the idea though: You have parts of a graph that can't be stuck together (say the components of it). You want to make an analogy between this and the "perpendicularity" of basis vectors: in each case we have a collection of things that "go in different directions"?

view this post on Zulip David Egolf (Jan 05 2021 at 19:14):

For example, consider this graph from Wikipedia:
graph

It has three components. If we consider all the paths of length n, this is made up of three kinds of paths: Ones that start in the first component, ones that start in the second component, and ones that start in the third component. A vector space has a basis. All of its elements can be formed as linear combinations of the basis elements. There is no way to make elements generated by basis vector 1 from elements generated by basis vector 2.

Also, the number of paths that start in one component and end in a different component is zero. An orthogonal basis has inner product of zero between two different basis vectors. Maybe we can define an inner product between subgraphs of a graph based on the number of paths starting in one and ending in the other.

Maybe some analogy like this?

view this post on Zulip Eric Forgy (Jan 05 2021 at 19:16):

Maybe :blush:

view this post on Zulip David Egolf (Jan 05 2021 at 19:19):

On a related note, we can take the coproduct of two graphs to get the disjoint union of them.
The coproduct of two subspaces (for example those generated by two basis vectors) is their direct sum.

view this post on Zulip Eric Forgy (Jan 05 2021 at 19:20):

There are so many different ways to look at this. Conceptually, it is very simple and intuitive to me, but the hard part is exposition. A graph has stuff that can be multiplied, added together and tensored together. This stuff can be combined in certain ways to make it into a DGA (with inner product). A DGA with inner product is enough to write code and do physics simulations.

view this post on Zulip Eric Forgy (Jan 05 2021 at 19:21):

So starting with a directed graph, you can build a framework that allows you to do scientific computation. The rest is exposition.

view this post on Zulip Eric Forgy (Jan 05 2021 at 19:29):

Oh!

https://ncatlab.org/nlab/show/category+algebra#InTermsOfCompositionOfSpans

view this post on Zulip David Egolf (Jan 06 2021 at 18:38):

I was thinking a bit more about trying to put a sort of inner product on graphs. Have you considered using the intersection of graphs? If you are using a functor from graphs to vector spaces that maps intersections to intersections, that might be helpful. That is because the dimension of the intersection of the vector spaces spanned by two vectors viv_i and vjv_j is δij\delta_{ij} if viv_i and vjv_j are part of an orthonormal basis. That is, the dimension is one if vi=vjv_i = v_j and the dimension is zero otherwise, as long as viv_i and vjv_j are part of an orthonormal basis.

(feel free to ignore this should you already be past this point)

view this post on Zulip Eric Forgy (Jan 06 2021 at 18:58):

I've spent many years trying to put a physically meaningful inner products on graphs :blush:

The best way, imo, is what we did in our 2004 paper that I'm currently trying to re-express in CT language. It involves reversing edges in a directed graph. That is another reason why I am happy to be learning about spans because for every span E:VVE:V\to V, there is a related span E:VVE^\dagger: V\to V with all edges reversed. There is a kind of naive way to do this, but that doesn't give anything physically meaningful, but once you've defined inner product the naive way, there is a cool way to obtain more physically meaningful inner products as a deformation of the naive one. The most obvious, nontrivial, inner product on a certain simple graph, gives the Lorentzian inner product and your edges all become lightlike in a way that relates to Sorkin's causal sets. It is all a beautiful story that I've been failing to tell the world :sweat_smile:

view this post on Zulip Eric Forgy (Jan 06 2021 at 19:49):

I'm trying to take things one step at a time, but I hope to eventually end up talking about "dagger compact categories from graphs". The 1-category Span(Set)\mathsf{Span(Set)} is a dagger category and we know endomorphisms in Span(Set)\mathsf{Span(Set)} correspond to graphs. I believe (need to confirm), that the 1-category Span(Alg)\mathsf{Span(Alg)} (algebras and isomorphism classes of bimodules) is a dagger compact category so the third morphism in my chain, i.e. Span(Set)Span(Alg)\mathsf{Span(Set)\to Span(Alg)} gives dagger compact catgeories from graphs. Then I should be able to relate our old stuff to cool things like this:

view this post on Zulip Eric Forgy (Jan 06 2021 at 20:08):

I've been stuck the last several days though on the right way to express this "algebra of paths". nLab sends me to category algebra, which seems like the right direction, but I might need to "explode" Span(Set)\mathsf{Span(Set)} because I want to peer into the set of spans and consider the product of individual directed edges as composition. So now my head is spinning thinking about "pointed spans" etc :mind-blown:

view this post on Zulip Eric Forgy (Jan 06 2021 at 20:11):

Pointed spans bring me to displayed categories :mind-blown:

view this post on Zulip David Egolf (Jan 06 2021 at 20:50):

Interesting! I had not heard of dagger categories before!

I found a cool way of thinking about inner products in dagger categories here:
inner product in dagger category

which refers to this paper.

view this post on Zulip Eric Forgy (Jan 06 2021 at 21:40):

Thanks for the reference :+1:

view this post on Zulip Eric Forgy (Jan 06 2021 at 21:49):

I feel like part of what I am trying to do is reinvent this :point_of_information: No wonder I am struggling :sweat_smile:

view this post on Zulip John Baez (Jan 06 2021 at 22:09):

Ever since @Bob Coecke and Samson Abramsky's famous 2004 paper A categorical semantics of quantum protocols, dagger categories have become the standard framework for generalizing quantum mechanics using category theory. I gave an intro to some aspects of this stuff in 2004 here:

which was a paper written for philosophers of science.

view this post on Zulip Eric Forgy (Jan 06 2021 at 22:12):

It's all very cool. I'm still catching up after being away since around that time.

view this post on Zulip John Baez (Jan 06 2021 at 22:14):

Now Bob is involved in a company, Cambridge Quantum Computing, that uses this stuff. They've hired some people who work on categorical quantum mechanics, like Ross Duncan. So this stuff is becoming quite real.

view this post on Zulip Eric Forgy (Jan 06 2021 at 22:37):

Nice slide from this:

image.png

view this post on Zulip John Baez (Jan 06 2021 at 22:44):

Ah, Simon Willerton!

view this post on Zulip Tim Hosgood (Jan 07 2021 at 14:03):

what’s the category Var in that picture?

view this post on Zulip John Baez (Jan 07 2021 at 17:54):

This is a list of monoidal bicategories, not categories. The chart says what the objects, morphisms and 2-morphisms are.

view this post on Zulip John Baez (Jan 07 2021 at 17:59):

Willerton sketches the description of Var here:

The 2-category Var has spaces as its objects, has objects of the derived category D(X×Y)— considered as integral kernels — as its 1-morphisms from X to Y, and has morphisms in the derived category as its 2-morphisms.

view this post on Zulip Reid Barton (Jan 07 2021 at 18:22):

Var = varieties, or ...?

view this post on Zulip John Baez (Jan 07 2021 at 18:45):

For details try that paper by Willerton; I think he said "spaces" in the short description because the idea of "the derived category of coherent sheaves" works for a variety of different kinds of spaces. (Pun intended)

view this post on Zulip Eric Forgy (Jan 07 2021 at 22:05):

Out of curiosity, is it possible that some of those can be expressed as Span(C)\mathsf{Span}(C) for some CC sharing the same objects listed there, but simpler morphisms?

For example, I think Bim=?Span(Alg).\mathsf{Bim \overset{?}{=} Span(Alg)}.

Do

have any kind of meaning?

view this post on Zulip David Egolf (Jan 07 2021 at 23:32):

Looking on the nlab, it sounds like we can make a Span(C)\mathrm{Span}(C) 2-category when CC has pullbacks.

view this post on Zulip John Baez (Jan 08 2021 at 00:08):

Eric Forgy said:

For example, I think Bim=?Span(Alg).\mathsf{Bim \overset{?}{=} Span(Alg)}.

I don't think so: a span of algebras involves three algebras, while a bimodule involves two algebras and a bimodule.

I think there should be a nice juicy relation between Bim\mathsf{Bim} and $\mathsf{Span(Alg)}$$, but I'd be kinda amazed (and delighted) if it were an equivalence of categories, or bicategories.

view this post on Zulip John Baez (Jan 08 2021 at 00:10):

David Egolf said:

Looking on the nlab, it sounds like we can make a Span(C)\mathrm{Span}(C) 2-category when CC has pullbacks.

Yes. A bicategory, actually. (Sometimes the nLab uses 2-category to mean bicategory, but in Span(C)\mathbf{Span}(C) composition of 1-morphisms is not strictly associative so it's a bicategory.)

view this post on Zulip Eric Forgy (Jan 08 2021 at 00:36):

I was playing around with Span(Alg)\mathsf{Span(Alg)} a bit and in my usual cowboy fashion, convinced myself, but we know the chance I'm wrong is high :blush:

For sure, Span(Alg)\mathsf{Span(Alg)} involves three algebras, but I think those three KK-algebras could be simply AA, BB and AKB,A\otimes_K B, i.e. an (A,B)(A,B)-bimodule is a span
{}
AAKBBA\leftarrow A\otimes_K B\rightarrow B
{}
with the third algebra product in AKBA\otimes_K B given by
{}
(aKb)(aKb)=(aa)K(bb).(a\otimes_K b)\,(a'\otimes_K b') = (a\, a')\otimes_K (b\, b').
{}
It made intuitive since so I didn't question too deeply. I'm pretty sure this is the case for the AA-bimodules I'm working with, i.e.
{}
AAKAA.A\leftarrow A\otimes_K A\rightarrow A.
{}
Then composition is
{}
A(AKB)B(BKC)C.A\leftarrow (A\otimes_K B)\otimes_B(B\otimes_K C)\rightarrow C.

view this post on Zulip John Baez (Jan 08 2021 at 00:47):

So now it sounds like you're not saying Span(Alg)\mathsf{Span}(\mathsf{Alg}) is equivalent to Bim\mathsf{Bim}, but something weaker and more easy to believe: that there's a functor from Bim\mathsf{Bim} to Span(Alg)\mathsf{Span}(\mathsf{Alg}).

view this post on Zulip Eric Forgy (Jan 08 2021 at 00:48):

This makes sense to me because we can build it up like:

20210107_164632.jpg

view this post on Zulip John Baez (Jan 08 2021 at 00:48):

The problem is you aren't doing anything with the A,BA,B-bimodule.

view this post on Zulip John Baez (Jan 08 2021 at 00:48):

Here's what I'd do.

view this post on Zulip John Baez (Jan 08 2021 at 00:49):

I want to describe a functor from Bim\mathsf{Bim} to Span(Alg)\mathsf{Span}(\mathsf{Alg}).

view this post on Zulip John Baez (Jan 08 2021 at 00:49):

So say MM is an A,BA,B-bimodule, where AA and BB are algebras over some field and $$M$ is a vector space over that field.

view this post on Zulip John Baez (Jan 08 2021 at 00:50):

Saying that MM is a left AA-module say exactly that we have an algebra homomorphism AEnd(M)A \to \mathrm{End}(M)

view this post on Zulip John Baez (Jan 08 2021 at 00:51):

Saying that MM is a right BB-module says exactly that we have an algebra homomorphism BEnd(M)opB \to \mathrm{End}(M)^{op}.

view this post on Zulip John Baez (Jan 08 2021 at 00:52):

So an A,BA,B-bimodule gives a special sort of cospan of algebras:

AEnd(M)End(M)opBA \to \mathrm{End}(M) \otimes \mathrm{End}(M)^{op} \leftarrow B

view this post on Zulip John Baez (Jan 08 2021 at 00:52):

Oh, I'm getting a cospan. That's what I should have said all along, not span.

view this post on Zulip John Baez (Jan 08 2021 at 00:53):

I don't love this, but at least I'm using the bimodule MM, whereas you seemed to completely throw that out and only work with two algebras!

view this post on Zulip John Baez (Jan 08 2021 at 00:54):

Maybe you were actually doing something very different than turning a bimodule into a span of algebras.

view this post on Zulip Eric Forgy (Jan 08 2021 at 00:54):

AKBA\otimes_K B is an (A,B)(A,B)-bimodule :blush:

view this post on Zulip John Baez (Jan 08 2021 at 00:55):

Okay, but it's a very special bimodule; you're not giving a recipe to turn bimodules into spans of algebras, nor are you giving a recipe to turn spans of algebras into bimodules.

view this post on Zulip John Baez (Jan 08 2021 at 00:55):

You are giving a recipe, right now, to turn a pair of algebras into a bimodule of that pair of algebras.

view this post on Zulip John Baez (Jan 08 2021 at 00:56):

When you said

Eric Forgy said:

For example, I think Bim=?Span(Alg).\mathsf{Bim \overset{?}{=} Span(Alg)}.

I was hoping you'd at least have a functor going one way or the other between these two categories, but that's not what you're doing. Why? Because you're not giving a recipe to turn bimodules into spans of algebras, nor are you giving a recipe to turn spans of algebras into bimodules.

view this post on Zulip Eric Forgy (Jan 08 2021 at 00:56):

Yeah. That is what I'm working on now (and stuck). I have scribbled notes involving a functor Span(Set)Span(Alg).\mathsf{Span(Set)\to Span(Alg)}.

view this post on Zulip John Baez (Jan 08 2021 at 00:58):

A natural way to try to get one of those is to use a functor SetAlg\mathsf{Set} \to \mathsf{Alg}. But the nicest functor like that is actually contravariant, so you wind up getting a functor from Span(Set) to Cospan(Alg).

view this post on Zulip Eric Forgy (Jan 08 2021 at 01:07):

For example, given a span of sets VsEtV,V\overset{s}{\leftarrow} E\overset{t}{\rightarrow} V, I want to send elements ϵE\epsilon\in E and iVi\in V to elements eϵKEe^\epsilon\in K^E and eiKVe^i\in K^V defined by
{}
eϵi(ϵj)=δji,ϵi,ϵjEandei(j)=δji,i,jVe^{\epsilon_i}(\epsilon_j) = \delta^i_j,\quad\epsilon_i,\epsilon_j\in E\quad\text{and}\quad e^i(j) = \delta^i_j,\quad i,j\in V
{}
such that s,t:KEKVs,t:K^E\to K^V are given by
{}
s(eϵ):=es(ϵ)andt(eϵ)=et(ϵ).s(e^\epsilon) := e^{s(\epsilon)}\quad\text{and}\quad t(e^\epsilon) = e^{t(\epsilon)}.

view this post on Zulip Eric Forgy (Jan 08 2021 at 01:09):

ss and tt become like face maps in a cochain complex.

view this post on Zulip Eric Forgy (Jan 08 2021 at 01:15):

The idea is that I will have (I hope) a functor sending a span
{}
VsEtVV\overset{s}{\leftarrow} E\overset{t}{\rightarrow} V
{}
to a span
{}
KVsKEtKV.K^V\overset{s}{\leftarrow} K^E\overset{t}{\rightarrow} K^V.
{}
This span being a bimodule once I sort out the actions (which is part of the motivation of this stream).

view this post on Zulip Eric Forgy (Jan 08 2021 at 01:19):

I know what I want the actions to be, i.e.
{}

These are the actions I mentioned way above. The most natural way to think of this, i.e. what you suggested, is in terms of composition.

view this post on Zulip Eric Forgy (Jan 08 2021 at 01:20):

So I am chasing nLab definitions around related to category algebras.

view this post on Zulip Eric Forgy (Jan 08 2021 at 01:26):

I'm actually thinking I might need to "explode" my spans, i.e. consider Span(Set),\mathsf{Span(Set_*)}, so that each individual directed edge becomes a morphism and form a category algebra from that.

view this post on Zulip John Baez (Jan 08 2021 at 01:55):

I think the elegant way to do what you're suggesting is this. Note that given a field KK, the functor

SetAlg\mathsf{Set} \to \mathsf{Alg}

sending a set SS to the algebra KSK^S is contravariant, as I mentioned. That is, a function f:STf: S \to T gives an algebra homomorphism f:KTKSf^\ast : K^T \to K^S, defined by

f(g)=gff ^\ast (g) = g \circ f

for gKTg \in K^T. Thus, this functor maps a span of sets

SXTS \leftarrow X \to T

to a cospan of algebras

KSKXKT K^S \to K^X \to K^T

In particular, any graph is an endospan of sets

VEV V \leftarrow E \to V

so it gets send to an endo-cospan of algebras

KVKEKV K^V \rightarrow K^E \leftarrow K^V

view this post on Zulip Eric Forgy (Jan 08 2021 at 01:58):

Cool. Thanks. I'll think about this :+1:

view this post on Zulip John Baez (Jan 08 2021 at 01:59):

This procedure gives a functor from Span(Set)\mathsf{Span}(\mathsf{Set}) to Cospan(Alg)\mathsf{Cospan}(\mathsf{Alg}).

Trying to get a span of algebras from a span of sets is going against the tao of mathematics - I advise against that.

view this post on Zulip Eric Forgy (Jan 08 2021 at 01:59):

That definitely makes more sense than what I was trying to do with spans of algebras.

view this post on Zulip Eric Forgy (Jan 08 2021 at 05:33):

This is kind of cool and makes me feel I'm on the right track (thanks to you :pray: )

So with a directed graph (as a span) E:VVE:V\to V, let
{}
E(i,j):={ϵEs(ϵ)=i,t(ϵ)=j}.E(i,j) := \{\epsilon\in E | s(\epsilon) = i, t(\epsilon) = j\}.
{}
Pulling back eiKVe^i\in K^V to seiKEs^* e^i\in K^E gives
{}
(sei)(ϵ)=eis(ϵ)=δs(ϵ)i.(s^* e^i)(\epsilon) = e^i\circ s(\epsilon) = \delta^i_{s(\epsilon)}.
{}
How to express seis^* e^i in terms of basis elements eϵKEe^\epsilon\in K^E?
{}
This should consist of the sum of all eϵe^\epsilon where s(ϵ)=is(\epsilon) = i and there could be more than one of them.
So let me introduce a notation


ei,j=ϵE(i,j)eϵ.e^{i,j} = \sum_{\epsilon\in E(i,j)} e^\epsilon.


Then we have
{}
sei=jVei,j,s^* e^i = \sum_{j\in V} e^{i,j},
{}
where
{}
ei,j=0e^{i,j} = 0 if E(i,j)E(i,j) is empty.
{}
Similarly,
{}
tej=iVei,j.t^* e^j = \sum_{i\in V} e^{i,j}.
{}
This is interesting because I introduced this notation before when I was following your first course in network theory and converting everything to DDG. Specially, I needed this to follow what you were doing with electrical networks.

view this post on Zulip Eric Forgy (Jan 08 2021 at 05:49):

But this just raises more questions in my mind, because I always looked at ei,je^{i,j} as a tensor product eieje^i\otimes e^j, but if it is related to cospan, wouldn't it be closer to coproduct? :thinking: I was just reading about biproduct :thinking:

view this post on Zulip Eric Forgy (Jan 08 2021 at 20:48):

image.png

view this post on Zulip Eric Forgy (Jan 08 2021 at 20:50):

Is it possible that KE×VEKEKVKEK^{E\times_V E} \cong K^E\sqcup_{K^V} K^E?

view this post on Zulip Eric Forgy (Jan 08 2021 at 20:56):

(I was just starting to get a handle on spans - now I need to think about cospans and starting with little intuition again)

view this post on Zulip Eric Forgy (Jan 08 2021 at 21:07):

Intuitively, it would make more sense to me if KE×VEK^{E\times_V E} were equivalent to KEKVKEK^E\otimes_{K^V} K^E, but looking at that diagram :point_of_information: , if the apex wasn't labelled KE×VEK^{E\times_V E}, I'd be tempted to call that KEKVKEK^E\sqcup_{K^V} K^E :thinking:

This makes me think of biproducts again :thinking:

view this post on Zulip Eric Forgy (Jan 08 2021 at 21:19):

Finite Products are Biproducts in a Compact Closed Category
https://arxiv.org/abs/math/0604542

view this post on Zulip John Baez (Jan 08 2021 at 22:57):

Eric Forgy said:

Is it possible that KE×VEKEKVKEK^{E\times_V E} \cong K^E\sqcup_{K^V} K^E?

I believe so: that's why I guessed that the functor KK^- gives a functor from Span(Set)\mathsf{Span(Set)} to Cospan(Set)\mathsf{Cospan(Set)}. For this idea to work, KK^- needs to map pullbacks to pushouts.

view this post on Zulip John Baez (Jan 08 2021 at 22:58):

Here KK^- is my nickname for the contravariant functor from Set to Alg sending SS to KSK^S.

view this post on Zulip John Baez (Jan 08 2021 at 22:59):

If I were better at category theory I'd just instantly know if KK^- maps pullbacks to pushouts.

view this post on Zulip John Baez (Jan 08 2021 at 23:00):

A related fact is this: if you have any category C, and any object cCc \in C, the contravariant functor from C to Set sending x to the set hom(x,c) maps pullbacks to pushouts.

view this post on Zulip John Baez (Jan 08 2021 at 23:01):

In fact it maps any sort of limit to the corresponding sort of colimit.

view this post on Zulip John Baez (Jan 08 2021 at 23:01):

That's why I made my guess. But we're doing something a bit different, since although KSK^S has hom(S,K) as its underlying set, we're treating KSK^S as an algebra, not a mere set!!!

view this post on Zulip John Baez (Jan 08 2021 at 23:02):

https://ncatlab.org/nlab/show/hom-functor#preservation_of_limits

view this post on Zulip Eric Forgy (Jan 08 2021 at 23:16):

Very cool. That feels like progress :+1:

So is it the case that KK^- sends a span (pullback) E×VE:VVE\times_V E: V\to V to the cospan (pushout) KEKVKE:KVKVK^E\sqcup_{K^V} K^E: K^V\to K^V as sets? :thinking:

Then if I could show KEKVKE:KVKVKEKVKE:KVKVK^E\otimes_{K^V} K^E: K^V\to K^V\cong K^E\sqcup_{K^V} K^E: K^V\to K^V as sets, then we can construct the category algebra from that maybe since they are morphisms?

view this post on Zulip Eric Forgy (Jan 08 2021 at 23:20):

I keep coming back to the - maybe misguided - idea that we want to consider pointed sets so that spans E:VVE: V\to V become spans (E,ϵ):(V,i)(V,j),(E,\epsilon): (V,i)\to(V,j), i.e. each individual directed edge becomes a morphism. Then the category algebra of that seems like what I want.

view this post on Zulip John Baez (Jan 08 2021 at 23:20):

Eric Forgy said:

So is it the case that KK^- sends a span (pullback) E×VE:VVE\times_V E: V\to V to the cospan (pushout) KEKVKE:KVKVK^E\sqcup_{K^V} K^E: K^V\to K^V as sets? :thinking:

Yes, that's what I just said. But since I'm a mathematician, I said it more generally:

if you have any category C, and any object c∈C, the contravariant functor from C to Set sending x to the set hom(x,c) maps pullbacks to pushouts.

view this post on Zulip Eric Forgy (Jan 08 2021 at 23:21):

(was checking to make sure I understood :raised_hands: )

view this post on Zulip John Baez (Jan 08 2021 at 23:23):

Finite Products are Biproducts in a Compact Closed Category
https://arxiv.org/abs/math/0604542

By the way, the categories we're dealing with - like Set and Alg - are not compact closed. The most famous compact closed category is the category of finite-dimensional vector spaces made monoidal with the usual \otimes.

view this post on Zulip John Baez (Jan 08 2021 at 23:25):

The categories Set and Alg also do not have biproducts. CommAlg, the category of commutative algebras, has biproducts: \otimes is the biproduct of commutative algebras. Note that your algebras KSK^S are commutative, and you might want to take advantage of that.

view this post on Zulip Eric Forgy (Jan 08 2021 at 23:26):

Yeah. I am always (so far) dealing with commutative (associative, unital) algebras :+1:

view this post on Zulip John Baez (Jan 08 2021 at 23:28):

Actually scratch that - it's bullshit. The category of commutative algebras does NOT have biproducts.

view this post on Zulip John Baez (Jan 08 2021 at 23:29):

It has products and coproducts, but they are different: in a category with biproducts (like Vect) they are the same.

view this post on Zulip Eric Forgy (Jan 08 2021 at 23:34):

Is it possible to consider an (A,B)(A,B)-bimodule Ω\Omega an algebra?

What I'm thinking is that if we have amb,ambΩa\,m\, b, a'\,m\,b'\in\Omega, could we consider a product
{}
(amb)(amb)=(aa)m(bb)(a\,m\,b)(a'\,m\,b') = (a\,a')\,m\,(b\,b')
{}
? Not sure if that makes any sense.

view this post on Zulip Eric Forgy (Jan 08 2021 at 23:36):

I'm still wanting to consider a morphism Ω:AASpan(Alg)\Omega:A\to A\in\mathsf{Span(Alg)} as a bimodule.

view this post on Zulip Eric Forgy (Jan 08 2021 at 23:38):

(Maybe Span(Alg)\mathsf{Span(Alg_*)}.)

view this post on Zulip Eric Forgy (Jan 08 2021 at 23:42):

If αΩ\alpha\in\Omega and x,yAx,y\in A, it's tempting to work with spans (as sets?) (Ω,α):(A,x)(A,y)(\Omega,\alpha): (A,x)\to (A,y) instead of spans (as sets?) Ω:AA\Omega:A\to A and then consider category algebras.

view this post on Zulip Eric Forgy (Jan 09 2021 at 00:01):

If we do this, maybe we don't even need Span(Alg)\mathsf{Span(Alg)}. If I understand,
{}
Span(Set)\mathsf{Span(Set_*)}
{}
would consist of objects (V,i)(V,i) for iVSeti\in V\in\mathsf{Set} and (isomorphism classes of) spans
{}
(E,ϵ):(V,i)(V,j),(E,\epsilon): (V,i)\to (V,j),
{}
i.e. directed edges are morphisms. If EE and VV are understood, directed edges could be written as spans ϵ:ij.\epsilon: i\to j.

view this post on Zulip Eric Forgy (Jan 09 2021 at 00:07):

Composition of directed edges ϵ1:ij\epsilon_1:i\to j and ϵ2:jk\epsilon_2:j\to k follows
{}
ϵ1×jϵ2:ik.\epsilon_1\times_j\epsilon_2: i\to k.

view this post on Zulip Eric Forgy (Jan 09 2021 at 00:19):

The reason I consider this idea is that if directed edges are morphisms, then the category algebra gives the product I wanted (I think).

view this post on Zulip Eric Forgy (Jan 09 2021 at 00:34):

Similarly, vertices are also morphisms, i.e.
{}
(V,i):(V,i)(V,i)ori:ii.(V,i): (V,i)\to (V,i)\quad\text{or}\quad i: i\to i.

view this post on Zulip John Baez (Jan 09 2021 at 04:35):

Eric Forgy said:

Is it possible to consider an (A,B)(A,B)-bimodule Ω\Omega an algebra?

What I'm thinking is that if we have amb,ambΩa\,m\, b, a'\,m\,b'\in\Omega, could we consider a product
{}
(amb)(amb)=(aa)m(bb)(a\,m\,b)(a'\,m\,b') = (a\,a')\,m\,(b\,b')
{}
? Not sure if that makes any sense.

Not really: one problem is that you're only telling us how to multiply amba m b and amba' m' b' in the special case where m=mm = m', so it's not really a well-defined product!

The other problem is that everything about your formula for multiplication is just multiplication in AA and in BB, nothing about the bimodule.

So you practically might as well just leave out the bimodule and admit you're making ABA \otimes B into an algebra - that is a something you can really do.

view this post on Zulip John Baez (Jan 09 2021 at 04:47):

If you grab a book like Rings and Categories of Modules you can learn what's possible (and thus what's not).

view this post on Zulip Eric Forgy (Jan 09 2021 at 06:16):

Quivers and Path Algebras
https://sites.math.washington.edu/~julia/teaching/Sem_Fall2010/Jim_notes.pdf

https://ncatlab.org/nlab/show/category+algebra#for_bare_categories_discrete_geometry