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.
I thought I knew how to draw commutative diagrams directly in Zulip but have now forgotten.
The documentation says Zulip uses Katex: https://zulip.com/help/latex
I thought I could use the tikz-cd or CD environments, with or without including amscd, but they haven’t been working for me.
Thanks
I use the online diagram editor quiver, and take screenshots.
seems like the CD
environment works?
There we go thanks a lot
I’d like to focus on finding some better ways to draw diagrams today. I’m considering using a programming language like Python instead of a typesetting language like Latex.
I very much doubt that's going to be a good idea.
Better ways than what alternatives, and better in what ways? Tikz and Asymptote are the canonical languages for drawing mathematical diagrams; note that neither of them is LaTeX, though Tikz is implemented in LaTeX and Asymptote embeds LaTeX for very high-quality labelling features. It's not obvious what it would even mean to "use Python" for drawing diagrams; you'd be picking out some particular graphics libraries written in Python. But Asymptote, in particular, is a complete programming language that's designed specifically for drawing diagrams.
As a pedagogical exercise or as a product other people would use?
As a pedagogical exercise for yourself to internalize the concepts of how to represent and manipulate diagrams it could be quite useful. Just be ok that other people probably will not use it, as existing tools work pretty well. But also, take a look at wiggle.py
and other tools here, they can be used to make cool and beautiful string diagrams etc. One could look at the code and learn a bunch I suspect.
If instead you are looking to simply have an impact using tools in your area of expertise, you could reach out to the folks maintaining that repo above; I don't see any active issues, but who knows. Alternately if you know javascript, quiv.er has open issues, and I know from using it weekly that it could use some quality-of-life improvements for iOS devices, plus sometimes the export-to-latex option doesn't work reliably (the URIs it creates couldn't always be reimported). None of that is really "fun", of course. :)
I know from using it weekly that it could use some quality-of-life improvements for iOS devices
If you report them on GitHub, then there's a chance they can be fixed.
plus sometimes the export-to-latex option doesn't work reliably (the URIs it creates couldn't always be reimported)
This absolutely should not happen, and if you encounter such a situation, that's a serious bug. Please post a bug report if you encounter this again.
Done! It looks like the export-to-latex issues are just Issue #219. Thankfully all the URIs of my old diagrams work, so could not reproduce an error there. (How do you generate the b64-blob so that it will remain stable through future releases? That's cool.)
Eric M Downes said:
(How do you generate the b64-blob so that it will remain stable through future releases? That's cool.)
Essentially through careful design of the data structure used to represent pasting diagrams so that it could be extended backwards compatibly.
Sounds... categorical :) If you ever want to give a talk on the design / data structures you use, let us know! I for one would be psyched.
Julius Hamilton said:
I’d like to focus on finding some better ways to draw diagrams today. I’m considering using a programming language like Python instead of a typesetting language like Latex.
I'm developing a categorical editor at editor.viete.io. It allows exporting diagrams to SVG files. Perhaps the diagrams don't have the best design. I would appreciate any feedback on how to improve their look and feel.
Another tool that I released recently is a Visual Code extension for creating Mermaid diagrams from Python code: https://marketplace.visualstudio.com/items?itemName=viete.viete. The diagrams are more inspired by category theory than strictly categorical. May be it will be useful.
I’m experienced with Python so I’m sure there are some interesting things to try out. I’ve already found some relevant libraries.
That said, I just now was thinking about a mathematical formulation of “drawing diagrams”.
A category can be specified by two sets (Obj and Arr), one partial function , and two relations Dom and Cod. (I would like to see this expressed as a signature in first-order logic, soon).
To “draw” a category, the computer returns pixel values in a 2D-array; but there can be prior “layers” in how the data of the category is arranged before it gets converted to an image file. A 2D-array is a doubly-indexed set . What format do we want the data in before we use it to calculate the pixel values?
It would be cool to find an algorithm that does that - must think.
Its worth noting if you make the partial function that takes two arrows to their composite defined over the whole domain you need only a default zero/sink value; it's equivalent to a faithful projective functor that takes your original category to a monoid-with-zero. This construction is a [[category algebra]], and is a generalization of group and incidence algebras. (Sanity-check: you may wish to convince yourself that 0 with property is the only default value that ensures the resulting image is a monoid for general .)
And this is the data representation they used in projects like smallcats; don't know if others have used it, or a sparse version thereof.
Thanks.
Let me see if I can get a sketch of what this would be like.
In set theory, every defined mathematical object is a particular set. So if a category is a set of arrows and of objects, plus a partial operation (which is also a set, because functions are sets of ordered pairs), we can write out the exact set this category is (is equivalent to, is represented by).
Now, imagine there is an alternative, yet equivalent, definition of a category. Even if the change is subtle. For example, instead of saying there is a single set of arrows, we say that for each pair of objects, there is a set (a Hom-set) of arrows. And we continue building up the definition from here. (I actually don’t immediately see how you could define across all elements of distinct Hom-sets… you’d have to define a function which selects a Hom set and then selects an element in the Hom-set).
When we look at the defined object, as a set, do the two equivalent definitions of a category correspond to the exact same set, or just to isomorphic sets?
If the latter, I would want to study equivalence classes of sets, which are different “forms” or “presentations” of the same category. That is how one could explore “formats” for the data of some given category.
We can make this much simpler. The usual coding of the cartesian product in set theory is Kuratowski's: . However, we can equally well code up cartesian products as dependent functions: . You will find these two sets are isomorphic (they satisfy the same universal property), but if you choose and appropriately, you can find pairs of elements such that the representations of the pair under the two encodings are not isomorphic as sets (hint: ). In other words, the same pair does not necessarily determine the same set under two distinct encodings, even up to isomorphism.
That sounds like exactly what I’m looking to learn more about.
What is a “dependent” function as opposed to a function?
What does superscript mean here?
I think that is the product of with itself, excluding the diagonal set.
I think this pre-assumes the existence of the product, so I wonder if you are showing me that the definition of produces the same set as .
But then I think you say that the two sets are isomorphic, but the elements in the sets are not necessarily isomorphic.
He is using superscript here to denote an exponential object, which is an object isomorphic to the morphisms from the exponent object to the base object. This is guaranteed to exist in .
So concretely. The exponent uses notation . So is the set of all functions . He then restricts this set by the stuff after so that always assumes a value in and always assumes a value in .
Pretty much all I am doing is literally reading off what is called "set-builder notation" (with some common math notation like that you pick up with exposure) see Ch 2.1 in Newstead (which appears to be down rn...) one can learn all this and more in an intro proofs class, fwiw. (Unlike category theory courses, you can even take such a class with TAs and everything online!)
This is a really nice problem Nathan has set and its worthy of pouring over until you really understand it.
Here set builder notation
Julius Hamilton said:
I think that is the product of with itself, excluding the diagonal set.
Eric gave you some hints but I'll just come out with it: if is a set then means the product of that set with itself.
John Baez said:
Julius Hamilton said:
I think that is the product of with itself, excluding the diagonal set.
Eric gave you some hints but I'll just come out with it: if is a set then means the product of that set with itself.
In this instance I didn’t mean this but rather the set of functions , as Eric suggested. While isomorphic, for this example, the intentionality is important. (You don’t get a counter-example the way I suggested without exploiting the coding of functions.)
To me [[product]] is a concept defined up to canonical isomorphism, and the set of functions from {0,1} to X is a fine way to form the product of X with itself. But of course you're free to take a different attitude.
I am of the same opinion, but the conversation is specifically about encodings in naïve set theory and whether they agree elementwise
Okay, sorry - I should stay out of this then, I'll only confuse things. I just saw Julius asking what meant, and thought I'd help. Whoops.
Your contributions are always welcome!
Eric M Downes said:
Its worth noting if you make the partial function that takes two arrows to their composite defined over the whole domain you need only a default zero/sink value; it's equivalent to a faithful projective functor that takes your original category to a monoid-with-zero.
Could you explain how a sink value would be used in this scenario?
Could you provide some formal definitions, propositions or proofs regarding projective functors? I read that something being “projective” has to do with a “lifting” property that I haven’t learned yet.
This construction is the cayley table portion of a [[category algebra]], a generalization of group and incidence algebras;
Could you provide more detail about what “the Cayley table portion of a category algebra” is? I want to read that nlab article but there are too many unknown concepts in it for me now.
like a vector space with the morphisms of as unit vectors. (Sanity-check: you may wish to convince yourself that 0 with property is the only default value that ensures the resulting image is a monoid for general .)
Nathan Corbyn said:
We can make this much simpler. The usual coding of the cartesian product in set theory is Kuratowski's: . However, we can equally well code up cartesian products as dependent functions: . You will find these two sets are isomorphic (they satisfy the same universal property), but if you choose and appropriately, you can find pairs of elements such that the representations of the pair under the two encodings are not isomorphic as sets (hint: ). In other words, the same pair does not necessarily determine the same set under two distinct encodings, even up to isomorphism.
So you offer an alternative definition of the product as the set of all functions from to , such that and , and you say that the representation of the pair is not isomorphic under taken these encodings? For example, if , we have for all for , and for we have ?
I need to study this more to see that they are not isomorphic.
I want to understand how to formulate the “class of logically equivalent set theoretic encodings” of a given thing. For example, you provided two possible ways to encode products. Do we know how to find all possible encodings?
Julius Hamilton said:
Could you explain how a sink value would be used in this scenario?
In constructing a category algebra we use a functor that is injective on non-identity morphisms and surjective on objects; . For a generic functor the image need not be a category, however. And we want to study not something merely generated by .
Luckily, if you introduce the universal sink , and define, for all that could not have composed after in , then
introduces the bare minimum of extra crap with no arbitrary choices.
This means concretely that for small the image of the homset needs only be extended slightly to be closed under composition. And diagrams commuting “in” without commuting preimages in must do so trivially: the composites are or . This is a nice property to have.
If you pick anything other than I claim this will not hold in general, or not be self-consistent, and I have given you enough to confirm that. (If you’re stuck, consider the two object discrete category with 2 morphisms per object . Consider its image under to a monoid big enough to contain whatever morphisms you might want, including . What happens if ? Do you see why the other choices, besides even if self-consistent would require extra information to justify? Stretch goal: Is this choice “natural” in the technical sense?)
(For a category algebra over field , one also identifies , just like in vector spaces, but you don’t need to think about the group action by the field to see the above.)
I mentioned category algebras in this thread because they allow us to use standard tools from algebra to represent a category faithfully and simply without having to worry about partial operations or resorting to explicit sets beyond the homset we are given. but does preserve commuting diagrams, so in a sense the monoid of a category algebra is a natural choice for a simple data object (an array!) representing a diagram / category. (If you use the algebra you can express toggle switches etc for whether to display objects/morphisms.) This also opens up computer algorithms and tools like GAP, etc.
Could you provide some proofs about projective functors…
If you want to think about projectives my recommendation is to think about Wikipedia’s def. of a projective object instead. Worry about the left-lifting property later.
(If preserving epis sounds snoozeful, here is a fun example demonstrating that it can be a highly nontrivial (to prove) feature for a functor to have, despite the seeming plethora of left adjoints.)
If you really want proofs on projective functors, I can say they are used in the representation theory of modules because a projective functor decomposes as a direct sum of projective functors. Look here’s some notes But without knowing representation theory, I don’t think that will be useful to you at all and I don’t recommend that approach.
Could you provide more detail about what “the Cayley table” …
I would not use nLab to learn about Cayley tables. Pick instead almost any book on group theory. A Cayley table is a matrix whose -th entry is for some binary operator . So above and that entry would be .
The rows of a Cayley table for a group are also elements in a permutation representation of a (free transitive) left-action of that group. Like the cyclic group of order three (addition mod 3) is an abstract group, often represented as a set of three functions from … what exactly are those functions? What happens when you compose them? Now you start to see what a group action is. (Can you write out the two Cayley tables for the associated ring .)
Highly esteemed mathematician Richard Borcherds says that Cayley tables are not very useful because two very different-looking tables can describe the same group, and the graph isomorphism problem rears its ugly head here. For a pure mathematician I think they are mostly used as disposable teaching tools, but I use them for computing (as in “with a computer”) Moore closures of finite non-associative binary operators in parallel, and they are useful generally for summarizing finite binary operations…. People like tables and have programmed computers to digest them very efficiently! :)
Thank you for this extremely generous and detailed response, which I will study today.