You're reading the public-facing archive of the Category Theory Zulip server.
To join the server you need an invite. Anybody can get an invite by contacting Matteo Capucci at name dot surname at gmail dot com.
For all things related to this archive refer to the same person.
Hi, I just noticed that the following (apparently common) conventions are incompatible with each other, if one works in a sufficiently general setting.
In a category , the composition operation is of type (as opposed to ).
A profunctor is defined as a functor (as opposed to ).
The former convention may be defended on the basis of the (very common) Leibniz convention for composition. The latter can be justified because this lets us view the bicategory of profunctors as an extension of (as well as of ), rather than an extension of or .
However, if one works in the enriched setting where the base monoidal category is not symmetric (or even where the base is a bicategory), then unfortunately the above conventions are incompatible. More precisely, one cannot view the representable presheaf as a profunctor (between and the unit category ). (In this general setting, one defines profunctor as a family of objects in the base monoidal category equipped with a suitable two-sided action; see e.g., Section 3 of Enriched categories and cohomology by Street.)
So how do you deal with this difficult situation?
personally i deal with it poorly
(sorry)
I define the first thing as you do when you say "as opposed to". I never use the to denote composition, but always the . This is because I mainly work with diagrams so writing to stand for is more intuitive for me. :slight_smile:
So how do you deal with this difficult situation?
I complain about it, try various conventions, get annoyed, and ultimately shrug my shoulders and decide to wait for civilization to collapse, hoping the next civilization adopts more consistent notation.
The ultimate problem is that we like to write to mean "do first then " as if we were reading from right to left, yet we write , with the arrow going from left to right.
So, one solution is to consistently write from left to right. This means we should use to mean "do first, then . This is not too hard for people to accept until we have to apply functions to arguments; then we should say
and most people find this upsetting, since they've been trained in the opposite convention (except when using calculators with reverse Polish notation). It's fun to think about how this convention would work:
The other convention is to systematically write from right to left, which also upsets people:
John Baez said:
most people find this upsetting, since they've been trained in the opposite convention (except when using calculators with reverse Polish notation).
Or C++:
x.f().g()
I think it'd be quite nice if we wrote for applied to , though I don't think I'd use that in a paper.
@Fabrizio Genovese
Could be less upsetting than the other possibilities? (My friends have teased me about this notation, so perhaps the answer is no.)
Here's my reasoning. There seem to be 4 possibilities (when writing in plain text on a computer):
(a)
(b)
(c)
(d) ,
I often use (a). The styles (a) and (c) have the advantage that they align with conventions for function composition, matrix multiplication, and so on. The styles (a) and (b) have the advantage that they align with conventions for judgements in type theory. The styles (a) and (d) have the advantage that the target is written more closely to f. This is nice because f's type is more like the type of its target than of its source. More precisely, only one of the two hom functors is covariant! This corresponds to a common goal-oriented approach to interactive proving and to vanilla functional programming. So, for all three matchings on the tetrahedral graph, (a)'s pair wins!
B is the only viable one for me.All the others have the great disadvantage to be read right to left, that in a left-to-right language is very confusing imho
In any case, as long as one chooses two symbols for composition (e.g. and or even better ) I don't see too much ambiguity in using both
"Let's consider the composition . Then on an element we compute ..." Makes perfect sense to me
So I don't really get what this fuss is about. You don't have to pick one convention and stick to it, it's not a religion. You can just be very opportunistic and use whatever you see fit whenever you see fit.
And, as usual, the point is: Notation should help you writing mathematics, not the other way around. So as long as something works for you (e.g. it helps you reasoning) then go for it :slight_smile:
((x)f)g makes a lot of sense: you start with x, you apply f to it, then you apply g. But we've all been trained to write g(f(x)) so it looks very unsettling to see ((x)f)g.
Fabrizio Genovese said:
B is the only viable one for me.All the others have the great disadvantage to be read right to left, that in a left-to-right language is very confusing imho
I think I see what you're saying.
For me, I read all of them from left to right, just the same way that I read the membership "" or the conditional probability "Prob(coin Y | bias X)" from left to right. For example, I read (A) as:
That way, halfway through reading, what's in my brain is:
This preference is very personal though!
John Baez said:
((x)f)g makes a lot of sense: you start with x, you apply f to it, then you apply g. But we've all been trained to write g(f(x)) so it looks very unsettling to see ((x)f)g.
No time to start a culture shift like the present.
You can find some old papers by Barr, I believe, if you want to see how good or bad an idea this might be.
I have no desire to spend any time trying to reform the world in this way.... well, except to raise the idea that there are other ways we could write.
Thanks for the comments. Yes, the diagrammatic order convention makes a lot of sense, so it is unfortunate that the other convention has become so common.
But the convention to define a profunctor as a functor also involves some “reversal”, so I am not sure if the diagrammatic order convention alone solves the problem completely...
For example, even using the diagrammatic order convention throughout (but using the above convention for profunctors), the composition of the profunctors and is given by , which might lead to some notational inconsistency sometime later.
I try to never write down a composition explictly exactly for this reason. The convention is cursed and alternative notation is not widespread.
My go-to alternatives are:
Of course I'm not always able to do it, but I strive.
I'm going to stand up for just not caring. I write in notes for myself and in papers, I think life's far too short to worry about something so tedious
I write things both ways; this is not something I actually lose sleep over. Nonetheless it's interesting to me how our conventions have become locked into this problem, so I enjoy talking about it once or twice a year.
Matrix multiplication is backwards too, but somehow nobody cares about that
Nathaniel Virgo said:
Or C++: x.f().g()
It's fun to think that OO notation had it right all along.
"Hello World!".length
:smiling_devil:
If you start with a vector and then you apply a linear map and then apply a linear map , the resulting vector is
So if you write your categorical composition as then you have to be careful that the matrix representing the linear map is
I think "nobody cares about that" because it's consistent with the other conventions that everyone uses. .
It would be very bad to write it the other way!
It's not consistent with the way you write diagrams in the category of vector spaces
Lots of people get upset about this, but it's just a special case of how function composition is backward; there's nothing special about matrix multiplication here.
Of course it is, because is how you write the composition of functions.
Jules seems to be pointing out that doing M first and then N is written MN when you do matrix multiplication, but I'm saying this annoying fact is just a fact about how we write the composition of anything.
In the the theory of Markov processes they multiply vectors by matrices on the right so in Jules' example they'd write for a vector v in .
They want to do it this way because they think about the relation between matrix multiplication and composing paths, and most people write for moving first along a path and then along a path .
That issue should come up in representation theory of quivers too, I guess?
It should, yes. Right now I forget what people usually do.
Anyway, I sometimes tell people if they can't deal with a problem like this they're not cut out for math.
If you think the order of composition is annoying, wait till you find out how many pointless meetings you have to do as an academic...
That's without counting people who write string diagrams starting from the bottom scanning left to right, and others who do it scanning right to left :-)
https://twitter.com/bblfish/status/1221425869899599873
@BartoszMilewski Best to read the article "Category Theory Using String Diagrams" last after going through Bartosz course and reading the bicategories of relations. Also annotate the diagrams in the article carefully, for it to make sense, and try writing a few equations like this https://twitter.com/bblfish/status/1221425869899599873/photo/1
- The 🐟 BabelFish (@bblfish)Right, and I'm left-handed, and people force me to write dragging my hand over the stuff I've just written.
Life is cruel.
String diagrams are different, people who write string diagrams bottom-to-top are Objectively Wrong and possibly heretical
I agree with that of course. When I become king they'll be punished.
But physicists starting with Feynman always write Feynman diagram bottom-to-top since t increases up the page in coordinates.
My advisor complained that physicists should use because is the independent variable.
Jules Hedges said:
String diagrams are different, people who write string diagrams bottom-to-top are Objectively Wrong and possibly heretical
Well, considering that this is the CQM convention and CQM is what made string diagrams popular in the first place, I'd say everyone else is wrong. In any case the right standard is clearly writing left-to-right, wrt clarity and space taken in papers.
James Dolan tries to do everything logically: he writes left-to-right and then top-to-bottom. So when he graphs things the first variable goes across the page and the second one goes down... I think.
Does writing string diagrams left-to-right mean that is left-to-right or ?
The title of this thread, "Imperfect world", is exactly right. We live in an imperfect world.
Oscar Cunningham said:
Does writing string diagrams left-to-right mean that is left-to-right or ?
is left to right, is top to bottom. The point is that in this way "the flow" of the diagram is left-to-right
(modulo snake equations etc, obviously)
That does seem like the nicest convention.
Okay, I'll get a job in Ulan Bator and learn Mongolian.
First lesson in Mongolian.
I always found mongolian script one of the most beautiful around. Unfortunately I don't think I'll ever find the time to learn mongolian, too many languages to tackle already T_T
Rongmin Lu said:
Oops... turns out Mongolian is written left-to-right, sorry! :sweat_smile:
Now I have to cancel my plane ticket!
Jules Hedges said:
Matrix multiplication is backwards too, but somehow nobody cares about that
My solution to this, which I use with good reason in my recent paper, is to primarily work with row vectors.