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: unit in monad


view this post on Zulip Hakimi Rashid (Oct 14 2020 at 07:43):

Hi everyone. I was wondering whether we can use monad unit natural transformation to form a vector space from a set for example from set of observations X=x1,x2,...,xnX = {x_1, x_2, ...,x_n} to vector of n-tuples x=[x1,x2,...,xn]\textbf{x} = [x_1,x_2,...,x_n], ηX:XVX\eta_{X}:X \to VX?

XX is the set of observations and VXVX is the vector space functor.

view this post on Zulip Hakimi Rashid (Oct 14 2020 at 09:18):

will this do the trick... first form cartesian product in set i.e xn=x1x2...xnx^{\otimes n} = x_1 \otimes x_2 \otimes ... \otimes x_n. Then use unit monad on the product to embed the product into vector space, ηxn:xnV(Xn)\eta_{x^{\otimes n}}: x^{\otimes n} \to V(X^{\otimes n}) forming vector of n-tuples?

view this post on Zulip Matteo Capucci (he/him) (Oct 14 2020 at 11:08):

For every field KK, there's an adjunction F:SetKVect:UF : \mathbf{Set} \leftrightarrows K\mathbf{Vect} : U where

The adjunction leans on the fact that a KK-linear combination of elements of XX is really a map of sets XKX \to K. This has the consequence that to give a map XU(V)X \to U(V) is equivalent to give a map F(X)VF(X) \to V, and viceversa (one says the two maps are transposes of each other), so FUF \dashv U.
Now, every adjunction gives rise to a monad on the 'left' (= the domain of the left adjoint) and a comonad on the 'right' (= the domain of the right adjoint).

To describe them, we need to introduce the unit and counit of an adjunction. The first, η:1UF\eta : 1 \to UF, is gotten by choosing ηX:XUF(X)\eta_X : X \to UF(X) to be the transpose of 1F(X):F(X)F(X)1_{F(X)} : F(X) \to F(X), for each X:SetX : \mathbf{Set}. The second, ε:FU1\varepsilon : FU \to 1, is just the dual construction: pick εV:FU(V)V\varepsilon_V : FU(V) \to V to be the transpose of 1U(V):U(V)U(V)1_{U(V)} : U(V) \to U(V).
So then the monad and comonad you get are (UF,η,UεF)(UF, \eta, U\varepsilon F) on Set\mathbf{Set} and (FU,ε,FηU)(FU, \varepsilon, F \eta U) on KVectK\mathbf{Vect}. They satisfy the required laws by virtue of the so-called 'triangle identities', which are identities which characterize the unit and counit of an adjunction.

view this post on Zulip Matteo Capucci (he/him) (Oct 14 2020 at 11:12):

So to answer your question, yes, we can! The monad UFUF (which is what you called VV) does exactly that: constructs the set of formal KK-linear combinations of elements of a set

view this post on Zulip Jules Hedges (Oct 14 2020 at 11:12):

More down to earth, VXVX is the vector space whose preferred basis is XX, and the unit map ηX\eta_X maps some element xXx \in X to the vector which, in the preferred basis, is written (0,,0,1,0,,0)(0, \ldots, 0, 1, 0, \ldots, 0) which picks out just that element

view this post on Zulip Hakimi Rashid (Oct 14 2020 at 12:16):

@Matteo Capucci & @Jules Hedges , thank you both for the answer. I am really new to category theory and have no formal higher math education. My background is in biological sciences . I need some time to digest both of your answer.

view this post on Zulip Matteo Capucci (he/him) (Oct 14 2020 at 12:21):

It's perfectly fine! Feel free to ask questions here, even the dumb-looking ones

view this post on Zulip Hakimi Rashid (Oct 14 2020 at 12:22):

will this do the trick... first form cartesian product in set i.e xn=x1x2...xnx^{\otimes n} = x_1 \otimes x_2 \otimes ... \otimes x_n. Then use unit monad on the product to embed the product into vector space, ηxn:xnV(Xn)\eta_{x^{\otimes n}}: x^{\otimes n} \to V(X^{\otimes n}) forming vector of n-tuples?

Is this the correct way? or ηX:XVX\eta_X:X\to VX will do just fine...

view this post on Zulip Matteo Capucci (he/him) (Oct 14 2020 at 12:25):

I don't know what you mean by \otimes

view this post on Zulip Hakimi Rashid (Oct 14 2020 at 12:35):

I mean cartesian product of the set... because what i understand from my reading so far... unit map will map only single element of the set. For example in the case of powerset monad PP, the unit ηX:XPX\eta_X:X\to PX will map single element xXx\in X to singleton subset {x}\{x\}. Thus, I think if we want to map a collection of elements say, x,y,zx,y,z to {x,y,z}\{x,y,z\} then we have to define the unit map as follows, $$\eta_{x,y,z): x\otimes y\otimes z \to \{x,y,z\}$$

view this post on Zulip Matteo Capucci (he/him) (Oct 14 2020 at 12:39):

Oh well it depends what you need to. The free vector space monad builds a vector space where XX is basis, as @Jules Hedges said. Then a vector there would be a combination of elements of XX, like 2x1+3x2x32x_1 + 3_x2 - x_3. This is a way for you to get a 'collection of elements'.
The unit maps pick 'trivial combinations', but that does mean KXK^X doesn't have more stuff in it

view this post on Zulip Matteo Capucci (he/him) (Oct 14 2020 at 12:40):

But I'm not sure I'm understanding what exactly bugs you here

view this post on Zulip Fabrizio Genovese (Oct 14 2020 at 12:46):

I think that what you want is just applying the functor F:SetVectF: \textbf{Set} \to \textbf{Vect} to XX. I don't think you need monad units to "build a vector space out of a set of examples"

view this post on Zulip Hakimi Rashid (Oct 14 2020 at 12:47):

owh... i need clarification that the unit map, ηX:XVX\eta_X:X\to VX will map the whole set X which consist of n elements to the n-tuples vector of vector space of n-dimension... not just pick only one element xXx\in X and form 1 dimensional vector [x].

view this post on Zulip Fabrizio Genovese (Oct 14 2020 at 12:47):

As Matteo pointed out, the monad unit will just identify some very special elements of FXFX given XX

view this post on Zulip Fabrizio Genovese (Oct 14 2020 at 12:48):

ηX\eta_X is a map of sets, so it doesn't form any vector space

view this post on Zulip Fabrizio Genovese (Oct 14 2020 at 12:48):

ηX\eta_X is taking any xXx \in X and mapping it to the "base vector" x\overrightarrow{x} in UFXUFX

view this post on Zulip Fabrizio Genovese (Oct 14 2020 at 12:50):

I think one source of confusion is this: Monads are endofunctors + some other stuff. Endo- means that they start and end in the same category, in this case Set\textbf{Set}.

view this post on Zulip Fabrizio Genovese (Oct 14 2020 at 12:50):

So the monad, as Matteo said, is formed by considering the functor SetFVectUSet\textbf{Set} \xrightarrow{F} \textbf{Vect} \xrightarrow{U} \textbf{Set}

view this post on Zulip Fabrizio Genovese (Oct 14 2020 at 12:51):

This functor takes a set XX, Generates a vector space FXFX using XX as basis, and then forgets that it is a vector space, and considers it just as a set. This is UFXUFX.

view this post on Zulip Fabrizio Genovese (Oct 14 2020 at 12:52):

ηX\eta_X goes from XX to UFXUFX. It is a function of sets. As I said, it maps any element of XX to its corresponding "base vector, now considered just as an element of a set", in UFXUFX

view this post on Zulip Hakimi Rashid (Oct 14 2020 at 12:55):

Fabrizio Genovese said:

This functor takes a set XX, Generates a vector space FXFX using XX as basis, and then forgets that it is a vector space, and considers it just as a set. This is UFXUFX.

If i understand you correctly, @Fabrizio Genovese , we can't do anything on UFX that we would like to do in vector space like measure norm, dot product and etc... right?

view this post on Zulip Fabrizio Genovese (Oct 14 2020 at 12:55):

This is correct, you are in the "wrong category" for that

view this post on Zulip Fabrizio Genovese (Oct 14 2020 at 12:56):

UFXUFX lives in Set\textbf{Set}, so you can just set-like things like counting elements, mapping them to other elements etc.

view this post on Zulip Fabrizio Genovese (Oct 14 2020 at 12:56):

To consider this kind of stuff, you actually want to operate on FXFX, which IS a vector space

view this post on Zulip Hakimi Rashid (Oct 14 2020 at 12:58):

Ok. Then what i need is just a Functor F:SetVectF: \textbf{Set} \to \textbf{Vect}.

view this post on Zulip Fabrizio Genovese (Oct 14 2020 at 12:58):

To be even more precise, you would probably work in Hilb\textbf{Hilb}, as vector spaces do not have a norm "per se", you have to put it on top of them

view this post on Zulip Fabrizio Genovese (Oct 14 2020 at 12:58):

There are all sorts of ways to relate Vect\textbf{Vect} to Hilb\textbf{Hilb}.

view this post on Zulip Fabrizio Genovese (Oct 14 2020 at 12:58):

Especially if your vector spaces are all finite-dimensional, as I suspect from your use case

view this post on Zulip Fabrizio Genovese (Oct 14 2020 at 12:59):

In that case you could work in the category FdVect\textbf{FdVect}, finite dimensional vector spaces, and you will have a canonical way to go from there to FdHilb\textbf{FdHilb}, finite dimensional Hilbert spaces

view this post on Zulip Fabrizio Genovese (Oct 14 2020 at 13:00):

I realize that all this seems pointless if you don't have a formal mathematical training

view this post on Zulip Fabrizio Genovese (Oct 14 2020 at 13:00):

But the whole point of category theory is that it can make very precise the context in which you are working in. So all this stuff that feels just like a pain in the butt at the moment will pay off big time when the infrastructure you are building gets complicated enough :grinning:

view this post on Zulip Hakimi Rashid (Oct 14 2020 at 13:22):

My aim is to formalize a framework where a single construction will capture all necessary pattern. we can then map this pattern to many different context to give meaning of that pattern in that context. I assume this can be achieved using functorial semantic similar to Lawvere. Am i on the right track then?

view this post on Zulip Morgan Rogers (he/him) (Oct 14 2020 at 13:40):

That's certainly a good approach; I hope you find the formalism you're looking for!

view this post on Zulip Hakimi Rashid (Oct 14 2020 at 13:50):

[Mod] Morgan Rogers said:

That's certainly a good approach; I hope you find the formalism you're looking for!

Thank you... i supposed the Lawvere functorial semantic is the way to go right?

view this post on Zulip Morgan Rogers (he/him) (Oct 14 2020 at 13:55):

Honestly it's a more general principle, but that's a good model!

view this post on Zulip Hakimi Rashid (Oct 14 2020 at 14:19):

Come to think of it... I think i ve read somewhere that there is a connection between Lawvere and Monad approach. This is just my hunch... If we can transfer from category of Set\textbf{Set} to FdHilb\textbf{FdHilb} using the functor F:SetFdHilbF:\textbf{Set}\to \textbf{FdHilb} then compute the inner product in FdHilb\textbf{FdHilb} then what we will get if we use the functor U:FdHilbSetU:\textbf{FdHilb} \to \textbf{Set} on the resulting inner product? can we somehow capture the inner product pattern from FdHilb back to Set?

view this post on Zulip Morgan Rogers (he/him) (Oct 14 2020 at 14:21):

What functor SetfdHilb\mathbf{Set} \to \mathbf{fdHilb} are you thinking of? Perhaps you should restrict to finite sets :)

view this post on Zulip Hakimi Rashid (Oct 14 2020 at 14:30):

[Mod] Morgan Rogers said:

What functor SetfdHilb\mathbf{Set} \to \mathbf{fdHilb} are you thinking of? Perhaps you should restrict to finite sets :)

I dont have any particular in mind.. perhaps similar functor F as mentioned by @Matteo Capucci ?

view this post on Zulip Morgan Rogers (he/him) (Oct 14 2020 at 14:33):

For infinite sets, the free vector space construction gives infinite-dimensional vector spaces, and as @Fabrizio Genovese pointed out, there are many (non-equivalent) ways to equip infinite-dimensional vector spaces with norms to produce Hilbert spaces.

view this post on Zulip Morgan Rogers (he/him) (Oct 14 2020 at 14:33):

(and the result in particular will not be fdHilb\mathbf{fdHilb}, where "fd" stands for finite dimensional :grinning_face_with_smiling_eyes: )

view this post on Zulip Fabrizio Genovese (Oct 14 2020 at 14:34):

Yes, in that case you should start from the category of finite sets

view this post on Zulip Hakimi Rashid (Oct 14 2020 at 14:35):

I have done some reading on Frobenius monad by Street. Can it somehow capture the inner product pattern of fdHilb?

view this post on Zulip Hakimi Rashid (Oct 14 2020 at 14:36):

say, if i start from category of finite set?

view this post on Zulip Morgan Rogers (he/him) (Oct 14 2020 at 14:47):

I'm not familiar with these myself; do you know of any examples of Frobenius monads on the category of finite sets?

view this post on Zulip Hakimi Rashid (Oct 14 2020 at 14:56):

To be honest.. i dont know. Just that, from the definition.. it kinda can somehow capture the inner product.

view this post on Zulip Morgan Rogers (he/him) (Oct 14 2020 at 15:00):

Start by identifying what exactly it is you want to build into your formalism. What is it that you want to do with the vector spaces? How do you use the norm in the examples you're familiar with? Once you've identified that, you can move into category theory, identifying the categories involved based on the data you're using, and identifying the categorical constructions you'll need based on those which you actually use when reasoning about the cases which are familiar to you.

view this post on Zulip Morgan Rogers (he/him) (Oct 14 2020 at 15:01):

This will mean that all of the category theory you do will be grounded in things you understand well, but you'll be able to leverage the abstraction whenever it's convenient to you.

view this post on Zulip Morgan Rogers (he/him) (Oct 14 2020 at 15:02):

The Frobenius monad paper seems too specific to be immediately relevant based on the information you've shared. Start from the bottom and work your way up rather than expecting to find the categorical gadget for you straight away :grinning_face_with_smiling_eyes:

view this post on Zulip Hakimi Rashid (Oct 14 2020 at 15:17):

Thank you for your advice... will try to find the answer to your questions first.

view this post on Zulip John Baez (Oct 14 2020 at 16:04):

Matteo Capucci said:

[...] a KK-linear combination of elements of XX is really a map of sets XKX \to K.

By the way, KXK^X is only the free vector space on XX when XX is a finite set. In algebra, "linear combination" means finite linear combination, so only when XX is finite can we treat every map of sets XKX \to K as a KK-linear combination of elements of XX.

In the general case the free vector space on XX , which I call K[X]K[X], can be identified with the vector space of functions XKX \to K that vanish except at finitely many points.

Any function XXX \to X' gives a linear map K[X]K[X]K[X] \to K[X'] and also a linear map KXKXK^{X'} \to K^{X}. So we have a covariant and a contravariant way to turn a set into a vector space, but for finite vector spaces these can be identified, so we get covariant and contravariant functors FinSetFinVect\mathsf{FinSet} \to \mathsf{FinVect} that agree on objects... very handy!

view this post on Zulip Matteo Capucci (he/him) (Oct 14 2020 at 16:15):

Gosh, you got me there. Classic me: discount the easy bits to go to the real meat, and overlook important details.

view this post on Zulip John Baez (Oct 14 2020 at 16:35):

I got this correction from someone else, once upon a time, so now I'm passing it on to you. :upside_down: I've been needing these covariant and contravariant functors and their interaction a lot in my work on finite-state Markov chains, so they're always on my mind now.

view this post on Zulip Hakimi Rashid (Oct 15 2020 at 02:02):

[Mod] Morgan Rogers said:

Start by identifying what exactly it is you want to build into your formalism. What is it that you want to do with the vector spaces? How do you use the norm in the examples you're familiar with? Once you've identified that, you can move into category theory, identifying the categories involved based on the data you're using, and identifying the categorical constructions you'll need based on those which you actually use when reasoning about the cases which are familiar to you.

I am working with a time series dataset sampled uniformly using multichannel sensors. Let's consider just 1 channel time series and called it X=x1,x2,...,xnX = {x_1,x_2,...,x_n}, we can embed this 1-d time series to higher dimension using delay embedding (Taken's theorem). Is this operation captured by the unit morphism?

Can the unit map be defined by composition of functions?

view this post on Zulip Hakimi Rashid (Oct 15 2020 at 02:12):

John Baez said:

Matteo Capucci said:

[...] a KK-linear combination of elements of XX is really a map of sets XKX \to K.

By the way, KXK^X is only the free vector space on XX when XX is a finite set. In algebra, "linear combination" means finite linear combination, so only when XX is finite can we treat every map of sets XKX \to K as a KK-linear combination of elements of XX.

In the general case the free vector space on XX , which I call K[X]K[X], can be identified with the vector space of functions XKX \to K that vanish except at finitely many points.

Any function XXX \to X' gives a linear map K[X]K[X]K[X] \to K[X'] and also a linear map KXKXK^{X'} \to K^{X}. So we have a covariant and a contravariant way to turn a set into a vector space, but for finite vector spaces these can be identified, so we get covariant and contravariant functors FinSetFinVect\mathsf{FinSet} \to \mathsf{FinVect} that agree on objects... very handy!

I am working with time series... so the category of FinSet\mathsf{FinSe}t should be appropriate, right?

view this post on Zulip John Baez (Oct 15 2020 at 02:26):

It depends on whether all the sets you're dealing with are finite or not.

view this post on Zulip John Baez (Oct 15 2020 at 02:28):

If you're doing stuff with computers maybe all your sets are finite. (Even so, sometimes thinking about this stuff mathematically brings in infinite sets.)

view this post on Zulip Morgan Rogers (he/him) (Oct 15 2020 at 09:09):

Hakimi Rashid said:

I am working with a time series dataset sampled uniformly using multichannel sensors. Let's consider just 1 channel time series and called it X=x1,x2,...,xnX = {x_1,x_2,...,x_n}, we can embed this 1-d time series to higher dimension using delay embedding (Taken's theorem). Is this operation captured by the unit morphism?

Succinctly, no. Specifying the data as you have is equivalent to giving a function XU(Rm)X \to U(\mathbb{R}^m), where UU is the forgetful functor VectSet\mathbf{Vect} \to \mathbf{Set} as above. The fact that this functor is the right adjoint in an adjunction means that this function must factor through the unit map XUF(X)X \to UF(X) along (the underlying function of) a linear map UF(X)U(Rm)UF(X) \to U(\mathbb{R}^m); specifically, this is the function which sends i=1naixi\sum_{i=1}^n a_i x_i to that same sum viewed as an element of Rm\mathbb{R}^m. This is purely linear algebra; all of the functions involved completely ignore the dynamic structure of the time series XX.

Takens' theorem uses ideas from Whitney's embedding theorem for embedding finite-dimensional real manifolds into higher dimensional Euclidean space. This result lies in differential geometry, and the linear structure of Rk\mathbb{R}^k is not really relevant here.

view this post on Zulip Morgan Rogers (he/him) (Oct 15 2020 at 09:16):

Can the unit map be defined by composition of functions?

I'm not really sure what you're asking here; the unit is intrinsic data of the adjunction. For example, if we take the one-element set {x}\{x\}, the unit map at {x}\{x\} is the function {x}Rx\{x\} \to \mathbb{R}x (the latter being the vector space of expressions of the form axax with aRa \in \mathbb{R}) sending xx to 1x1x; I don't see how this could be decomposed in any meaningful way.

view this post on Zulip Morgan Rogers (he/him) (Oct 15 2020 at 09:20):

It's plausible that there is another adjunction out there that could be helpful to you. Has anyone tried to make the Whitney embedding theorem functorial?

view this post on Zulip David Michael Roberts (Oct 15 2020 at 10:08):

Functorial wrt what maps? A cheap way to get an embedding of a compact manifold in a Euclidean space is to take a partition of unity subordinate to a good (say) open cover by charts. A good open cover by charts is more-or-less equivalent to a groupoid internal to the coproduct completion of the category Cart of cartesian spaces. The category of manifolds is some kind of colimit completion of this (eg inside the category of diffeological spaces = concrete sheaves on Cart). Alternatively, one can think of maps between manifolds as being certain anafunctors between these groupoids. It's presumably possible to think of some way of getting data including partitions of unity into this picture. Then the embedding of the manifold represented by one of these groupoids with a partition of unity could be constructed directly from the groupoid. The naive thing, assuming the partitions of unity are respected on the nose by anafunctors presumably loses too much. But I can imagine having some modulating data that allows for more flexibility.
Just some random thoughts.

view this post on Zulip Morgan Rogers (he/him) (Oct 15 2020 at 10:19):

That might be a bit of a deep dive terminology-wise for @Hakimi Rashid :sweat_smile:
I was wondering if we could restrict Whitney embedding in order to make it functorial with respect to smooth maps of manifolds. If so, perhaps that functor would have an adjoint, and the resulting adjunction might be closer to what Hakimi was looking for. I'm not super optimistic that such a functor or adjunction exists, given that the embedding as you (@David Michael Roberts) describe it involves a partition of unity (and selecting one of those involves a non-trivial choice!) but I hope this is at least an indication of how to make these ideas might be made categorical.

view this post on Zulip Hakimi Rashid (Oct 15 2020 at 10:25):

[Mod] Morgan Rogers said:

Hakimi Rashid said:

I am working with a time series dataset sampled uniformly using multichannel sensors. Let's consider just 1 channel time series and called it X=x1,x2,...,xnX = {x_1,x_2,...,x_n}, we can embed this 1-d time series to higher dimension using delay embedding (Taken's theorem). Is this operation captured by the unit morphism?

Succinctly, no. Specifying the data as you have is equivalent to giving a function XU(Rm)X \to U(\mathbb{R}^m), where UU is the forgetful functor VectSet\mathbf{Vect} \to \mathbf{Set} as above. The fact that this functor is the right adjoint in an adjunction means that this function must factor through the unit map XUF(X)X \to UF(X) along (the underlying function of) a linear map UF(X)U(Rm)UF(X) \to U(\mathbb{R}^m); specifically, this is the function which sends i=1naixi\sum_{i=1}^n a_i x_i to that same sum viewed as an element of Rm\mathbb{R}^m. This is purely linear algebra; all of the functions involved completely ignore the dynamic structure of the time series XX.

Takens' theorem uses ideas from Whitney's embedding theorem for embedding finite-dimensional real manifolds into higher dimensional Euclidean space. This result lies in differential geometry, and the linear structure of Rk\mathbb{R}^k is not really relevant here.

If i understand it correctly, the unit map will only embed n-element set XX into same n-dimension vector VX:=RnVX:=\R^n, and not any other arbitrary lower or higher dimension...?

view this post on Zulip Hakimi Rashid (Oct 15 2020 at 10:26):

[Mod] Morgan Rogers said:

That might be a bit of a deep dive terminology-wise for Hakimi Rashid :sweat_smile:

Unfortunately yes. I am still learning... quite a steep curve for me.

view this post on Zulip Morgan Rogers (he/him) (Oct 15 2020 at 11:48):

No worries. It's nice that you're making the effort to look for the connections! I wish you the best of luck :cartwheel:

view this post on Zulip Hakimi Rashid (Oct 16 2020 at 01:42):

I think I get some of it. If I want to know what is possible or not with the unit map, i have to know what is actually happening under the hood i.e, i have to decompose monad to adjunction between 2 categories, right?
so, for example, if we start from the category of Finset\mathbf{Finset}, apply functor F:FinsetVectF:\mathbf{Finset}\to \mathbf{Vect}, we get vectors of which our elements are the bases. In Vect\mathbf{Vect}, we can do dot product between 2 vectors, we get RnRnR\R^n \otimes \R^n\to \R. finally, we apply functor U:VectFinsetU:\mathbf{Vect} \to \mathbf{Finset} on the result to get back to our starting category.
So, in essence, what we have done cannot be captured by unit map alone. maybe unit composed with something, right?

view this post on Zulip Morgan Rogers (he/him) (Oct 16 2020 at 13:52):

It is only occurring me now that while we can look at the restriction of the free vector space functor to the category of finite sets, we can't restrict the monad: assuming that we're working over an infinite field (R\mathbb{R}), there is no forgetful functor U:VectFinSetU : \mathbf{Vect} \to \mathbf{FinSet}, since the underlying sets of the vector spaces are infinite...
But in any case, what's missing from your description is not that (we can still use the usual forgetful functor here), but rather a way to get from Rn\mathbb{R}^n to RnRn\mathbb{R}^n \otimes \mathbb{R}^n inside Vect\mathbf{Vect}; the obvious diagonal map is not linear!

view this post on Zulip Hakimi Rashid (Oct 16 2020 at 14:16):

[Mod] Morgan Rogers said:

It is only occurring me now that while we can look at the restriction of the free vector space functor to the category of finite sets, we can't restrict the monad: assuming that we're working over an infinite field (R\mathbb{R}), there is no forgetful functor U:VectFinSetU : \mathbf{Vect} \to \mathbf{FinSet}, since the underlying sets of the vector spaces are infinite...

I dont understand... I thought the underlying set is finite since we apply the free functor FF to finite set forming finite dimensional vector space? The field only serve as scalar coefficient right? am i missing something?

But in any case, what's missing from your description is not that (we can still use the usual forgetful functor here), but rather a way to get from Rn\mathbb{R}^n to RnRn\mathbb{R}^n \otimes \mathbb{R}^n inside Vect\mathbf{Vect}; the obvious diagonal map is not linear

Why do we need diagonal map? Why not linear?

view this post on Zulip Morgan Rogers (he/him) (Oct 16 2020 at 14:24):

The underlying set of the vector space is the set of elements of that space. So the underlying set of R\mathbb{R} is... R\mathbb{R}, without the additive and scalar multiplicative structure.

You're trying to describe the norm, or the square of the norm, on a space in terms of its inner product, right? If you want to describe the norm of an element xRnx \in \mathbb{R}^n using an inner product RnRnR\mathbb{R}^n \otimes \mathbb{R}^n \to \mathbb{R}, you need a way to map that xx to the element xxx \otimes x in RnRn\mathbb{R}^n \otimes \mathbb{R}^n. But the diagonal mapping xxxx \mapsto x \otimes x is not linear, so you can't perform this duplication operation in Vect\mathbf{Vect}.

view this post on Zulip Hakimi Rashid (Oct 16 2020 at 15:13):

So, we need more constructions than what Vect\mathbf{Vect} could provide to describe operation that we can do in vector space? Based on what you said about diagonal map... then, perhaps bialgebras?

view this post on Zulip Morgan Rogers (he/him) (Oct 16 2020 at 15:15):

That could work! :innocent:

view this post on Zulip John Baez (Oct 16 2020 at 15:17):

Picking a basis on a finite-dimensional vector space makes it into a commutative Frobenius algebra, where the comultiplication Δ:VVV\Delta : V \to V \otimes V has

Δ(ei)=eiei\Delta(e_i) = e_i \otimes e_i

and the multiplication m:VVVm : V\otimes V \to V has

m(eiej)=ei m(e_i \otimes e_j) = e_i if i=ji = j
m(eiej)=0 m(e_i \otimes e_j) = 0 if iji \ne j

view this post on Zulip Hakimi Rashid (Oct 16 2020 at 15:18):

i have read about frobenius algebra... frobenius object by definition have diagonals, and also comes with bilinear form. But how can we use in monad?

view this post on Zulip John Baez (Oct 16 2020 at 15:19):

This theme was explored further here

However, they may go straight to describing orthonormal bases in finite-dimensional Hilbert spaces. There should be a similar (but different) story for bases in finite-dimensional vector spaces.

view this post on Zulip John Baez (Oct 16 2020 at 15:20):

I don't know what "how can we use in monad?" means.

view this post on Zulip Hakimi Rashid (Oct 16 2020 at 15:22):

owh.. i typed before i saw your answer...

view this post on Zulip Hakimi Rashid (Oct 16 2020 at 15:24):

I have read paper by Street on Frobenius monad... could that capture the same thing but in monadic way? http://web.science.mq.edu.au/~street/Frob.pdf

view this post on Zulip John Baez (Oct 16 2020 at 15:32):

A Frobenius monad in Vect is called a Frobenius algebra; these were invented much earlier, and if you just want to talk about duplication of basis elements in a vector space (the map Δ\Delta described above, which sends eie_i to eieie_i \otimes e_i) you don't need fancy modern stuff about Frobenius monads.

view this post on Zulip John Baez (Oct 16 2020 at 15:33):

Street's paper is great but I don't see how it would help you. On the other hand, I don't really understand what you're trying to do.

view this post on Zulip Hakimi Rashid (Oct 16 2020 at 15:44):

My aim is to describe and formalize the analysis methods i used in the language of category theory. Maybe then, hopefully it can be turn into framework somehow and generalize to many context. I dont know if this possible...

view this post on Zulip Hakimi Rashid (Oct 16 2020 at 15:55):

Based on what ive read so far... there are 2 ways to do this... either using monad or using functorial semantic aka Lawvere theory, right? so, thats why i wanted to know more about monad and whether it can help to achieved that goal. Also, which way is better and simpler?

view this post on Zulip Morgan Rogers (he/him) (Oct 16 2020 at 16:43):

It sounds like you've read about 2 of the many ways of reaching generalizations through category theory. If the situation you're working with doesn't naturally involve a monad (which it doesn't appear to), it doesn't make sense to try to force one upon it. Monads (and other category-theoretic gadgets) can pop up in unexpected places, so you might encounter a relevant one later on, but the work of expressing all of the ingredients of your situation categorically has to come first. Once you know what ingredients are involved, it should become clearer what context you should be working in, and I'm sure there will be someone with relevant expertise here to help you.

view this post on Zulip Hakimi Rashid (Oct 17 2020 at 02:40):

[Mod] Morgan Rogers said:

It sounds like you've read about 2 of the many ways of reaching generalizations through category theory. If the situation you're working with doesn't naturally involve a monad (which it doesn't appear to), it doesn't make sense to try to force one upon it.[...]

What are other ways of reaching the goal? If you can list them, that would be really helpful. Maybe i can explore more options if things dont work out...

view this post on Zulip Morgan Rogers (he/him) (Oct 18 2020 at 09:32):

Step 1: Find the right categorical setting.

Step 2: Express the process categorically.

Step 3: Identify the key ingredients and distil them.

Step 4: Find the relevant literature.

There are steps beyond Step 4, regarding what you can do once you have a categorified version of your argument or construction in hand, but there's no point getting too far ahead. To give you fair warning: it's entirely possible that you could do the work of Steps 1 to 3 and find at Step 4 that from a categorical perspective, what's happening is a common phenomenon. This might seem disappointing at first, but:

  1. Congratulations! You've consolidated some mathematics, showing that a particular situation is a special case of something already well-known. You immediately have a wealth of examples which you can use your original situation to help you understand.
  2. Congratulations! You've put in the effort and learned some category theory relevant to some mathematics you are interested in.
  3. Congratulations! You have a broader perspective on your original situation, and the limitations of it. It will be much easier to see what extra ingredients you need to extend the categorical framework to perform further constructions or calculations.

view this post on Zulip Hakimi Rashid (Oct 18 2020 at 12:16):

Thanks a lot for the guidance and tips @[Mod] Morgan Rogers. I really appreciate it. Looks like there's gonna be lot of works and obstacles ahead... But I'm up for it. Thanks again.

view this post on Zulip John Baez (Oct 18 2020 at 15:53):

Yes, this sort of process often takes time. It's fun to recall examples:

When @Brendan Fong and I came up with a category-theoretic description of electrical circuits, I thought it would be easy since circuit diagrams look like string diagrams, a well-known tool in category theory. I worked out the basic idea in May 2010 here. But there were some "details" that seemed hard to check, so I gave this as a thesis project to Brendan. He developed a new technique, the theory of decorated cospans and decorated corelations, to fill in these "details". By February 2015 he finished a paper on decorated cospans and by April 2015 we came out with a paper solving the problem: A compositional framework for passive linear networks.

However, Brendan later realized that more use of decorated corelations would help explain some mysterious ad hoc steps in our construction. Our paper took a long time to referee, and when we finally got the referee's report, which demanded extensive changes, we rewrote the paper to include a lot more material on decorated corelations. The result was a much deeper paper, which we finished in November 2018. Also in 2018 Brendan came out with a a paper on decorated corelations.

It later turned out that there were some problems with the decorated cospan framework, which can be fixed in a number of ways. My favorite way is the theory of structured cospans, which @Kenny Courser did his thesis on. He finished his thesis in August 2020, and we wrote a paper on structured cospans based on this material, which is close to being published - we finished the first version in November 2019 but we're almost done dealing with the referee's corrections now, and with luck the editor will accept this new version!

This seems like a lot of work to figure out what's going on with electrical circuits - over a decade! Was it really worthwhile? I think so. Electrical circuits are interesting and it's good to understand them clearly. Further, the ideas apply to many other subjects: Brendan, @Blake Pollard and I wrote a paper applying them to Markov processes, Blake and I wrote a paper applying them to chemical reaction networks, @Jade Master and I wrote a paper applying them to Petri nets, and there are many more applications waiting to be developed.

view this post on Zulip John Baez (Oct 18 2020 at 16:22):

I really like @[Mod] Morgan Rogers' description of the process. I have never attempted to explain how to do applied category theory! I think one crucial prerequisite is to learn a lot of category theory and a lot about the subject you're trying to apply it to - and especially the mathematics of the subject you're trying to apply it to.

For example: someone might be very familiar with electrical circuits, but if they don't know some graph theory - especially the many different definitions of graph - it would be hard to get anywhere trying to apply category theory to electrical circuits.

view this post on Zulip Morgan Rogers (he/him) (Oct 18 2020 at 22:09):

Feel free to quote me on it if you think it's a useful description! It's a process that can be boiled down to a couple of sentences, but that hides the sheer amount of work and refinement that's involved. The beauty is that the hard work is also hidden in the finished product: once you have the right setting, everything starts to flow smoothly.