Zulip Chat Archive
Stream: maths
Topic: rigid (autonomous) categories
Jakob von Raumer (Aug 05 2021 at 15:20):
Jakob von Raumer (Aug 05 2021 at 15:22):
Maybe that's interesting to any of the category theory formalisers here. Proving that adjoint mates of morphisms compose already seems super hard. Certainly makes the case that one carefully has to prove a lot of "sliding" lemmas for monoidal categories and/or write more tactics to somehow tackle these kinds of equalities.
Scott Morrison (Aug 11 2021 at 09:34):
@Jakob von Raumer, have a look at branch#rigid for my attempt at this. I also discovered that it is disappointingly hard. :-)
Jakob von Raumer (Aug 15 2021 at 20:30):
I now finished some of the complicated proofs, but I think it's an
Jakob von Raumer (Aug 15 2021 at 20:31):
I think its's not disappointingly hard but it's a nice challenge to come up with the infrastructure on both sides of the tactic monad to tackle those kinds of rewriting arguments...
Kyle Miller (Aug 15 2021 at 21:34):
I know it's sweeping a lot of coherence theorems under the rug, but it's funny how straightforward the string diagram version of the proof is in comparison:
Something I've wondered about is having some tool like Globular that could deal with more abstract diagrams (like the ^*
operator applied to a diagram) and which could input and output data that could be pasted into a tactic proof. It seems like no one should ever have to manually insert associators or left/right unitors... I've heard that in Metamath they take a similar approach to automation, where you can use tools to create proofs.
(Edit: Scott's mentioned this before, of course :smile:. I also just learned about homotopy.io by looking for previous mentions of Globular.)
Scott Morrison (Aug 15 2021 at 23:49):
Nicely done, @Jakob von Raumer!
Jakob von Raumer (Aug 16 2021 at 07:15):
@Kyle Miller Yes, I'd really like to have a widget for string diagram rewriting proofs! I already tried to motivate my students to do it as a master thesis, but I haven't found anyone so far. I'm not sure if it's worth pursuing in Lean 3 or if it's better to use the widget infrastructure @Wojciech Nawrocki is implementing in Lean 4.
Homotopy.io has one huge advantage when visualising the diagrams: They work in a strictly associative setting. I'm not entirely sure how applying an associator would change the visual representation...
Scott Morrison (Aug 16 2021 at 07:25):
When I last thought about this I was thinking about formalizing Jamie's definition of quasi-strict n-categories.
Scott Morrison (Aug 16 2021 at 07:26):
Much more approachable would be to just do the n=2 case, or perhaps just the monoidal category (2-category with only one 0-morphism) case.
Jakob von Raumer (Aug 16 2021 at 07:38):
@Markus Himmel said about his formalisation of the coherence theorem for monoidal categories that he doesn't think it's much easier to reason about strict monoidal categories, because you end up having transport terms all over the place...
Kyle Miller (Aug 16 2021 at 17:22):
@Jakob von Raumer Maybe this is too limiting, but I was imagining a tool for monoidal categories that pretends you're in a strictly associative setting, but then under-the-hood it would reassociate and introduce identities for you. You'd give the tool a list of allowed coupons and their signatures, and the data structure of a diagram is compatible compositions of products of coupons. Sometimes you'd want to bind wires together into a product wire, but that can be done with additional coupons, like one with two input wires for objects and and one output wire for object .
A while back I made some tool in LaTeX and python for drawing string diagram proofs for bialgebras:
All it does is draw things, and it's not very sophisticated (all wires are labeled by the same object), but I thought I'd show how these diagrams are written using a mini-language for compositions of coupons:
\begin{align*}
\pyc{diag("S; S")}
&= \pyc{diag("m*; e* S; e S; m")}
= \pyc{diag("m*; m* S; id S S; m id; m")}
= \pyc{diag("m*; id m*; id S S; id id S; id m; m")}\\
&=\pyc{diag("m*; id S; id m*; id sw; id id S; id m; m")}
=\pyc{diag("m*; id S; id m*; id S id; id sw; id m; m")}
=\pyc{diag("m*; id S; id m*; id S id; id m; m")} \\
&= \pyc{diag("m*; id S; id e*; id e; m")}
= \pyc{diag("id")}
\end{align*}
Ideally, this could have a graphical editor to help you move things around and apply axioms/2-morphisms.
Jakob von Raumer (Aug 16 2021 at 17:26):
Yes, that's roughly what I was imagining
Kyle Miller (Aug 16 2021 at 17:35):
If there were also a way to group coupons into subdiagrams (which can be thought of as composite coupons) then that would at least give a way to say where axioms can be applied. It's not as elegant as Globular, which seems to be able to efficiently compute where axioms can be applied without this additional structure, but at least it would be workable.
Jakob von Raumer (Aug 17 2021 at 08:18):
I'm formalising all these things with equalities, but I guess the formalisation should actually be agnostic as to whether it really is a category or a 2-category, meaning instead of rw
we'd need a version of rw
that builds 2-cells using whiskering...
Scott Morrison (Aug 17 2021 at 08:24):
Oh --- when I was talking about 2-categories above, I just meant to say that monoidal categories are precisely the 2-categories with a unique 0-morphism (and then shifting everything down a level). I wasn't intending to replace equality with some "richer" 2-morphism structure.
Scott Morrison (Aug 17 2021 at 08:25):
Jamie's version of monoidal categories is actually very simple: you no longer have a tensor-product-of-morphisms operation, but only composition and tensoring-with-identities, and these operations are strictly associative. You just have one interesting axiom, the exchange relation which lets you slide one coupon vertically past another one.
Scott Morrison (Aug 17 2021 at 08:27):
You can represent diagrams of this form as a list of triples (each triple corresponds to a horizontal slice of a diagram). Each triple contains a list of objects (the strings to the left of the coupon), a morphism (the coupon), and another list of objects (the strings to the right of the coupon).
Scott Morrison (Aug 17 2021 at 08:28):
Composition of diagrams is just concatenation of lists.
Scott Morrison (Aug 17 2021 at 08:29):
Globular / homotopy.io (at least when restricted to two dimensional diagrams) only have one "click-and-drag" operation, i.e. the exchange relation swapping the heights of two adjacent slices (when they don't obstruct each other).
Scott Morrison (Aug 17 2021 at 08:36):
Without aspiring (immediately) to have a widget interface, it could be really nice to write some tactics for working with this representation of monoidal diagrams. The key piece would be something that can take an expression in the usual (composition + tensor product) language of monoidal categories, and "look for it" in a Jamie-style diagram. (And then have a rewriter, that can rewrite a Jamie-style diagram by an equation written in the usual langauge.)
Scott Morrison (Aug 17 2021 at 08:36):
Does that make any sense? I feel the need to draw pictures and gesture at them. :-)
Jakob von Raumer (Aug 17 2021 at 09:15):
Scott Morrison said:
Oh --- when I was talking about 2-categories above, I just meant to say that monoidal categories are precisely the 2-categories with a unique 0-morphism (and then shifting everything down a level). I wasn't intending to replace equality with some "richer" 2-morphism structure.
I know, but the things I'm working with right now suggest them to be 2-cells instead. :shrug:
Jakob von Raumer (Aug 17 2021 at 09:19):
Scott Morrison said:
Without aspiring (immediately) to have a widget interface, it could be really nice to write some tactics for working with this representation of monoidal diagrams. The key piece would be something that can take an expression in the usual (composition + tensor product) language of monoidal categories, and "look for it" in a Jamie-style diagram. (And then have a rewriter, that can rewrite a Jamie-style diagram by an equation written in the usual langauge.)
Do you mean to use these tactics with a strictly associative tensor product, or to try and "bake the associators in"?
Jakob von Raumer (Aug 17 2021 at 09:26):
I'm just starting to prove that the left adjoint mate of the right adjoint mate of a morphism is the morphism itself, again a "sliding" proof:
tactic failed, there are unsolved goals
state:
C : Type uā,
_inst_1 : category C,
_inst_2 : monoidal_category C,
W X Y Z : C,
WX : exact_pairing W X,
YZ : exact_pairing Y Z
ā¢ (š (Z ā X) ā Ī·_ W X) ā«
(š (Z ā X) ā š W ā (Ī»_ X).inv) ā«
(š (Z ā X) ā š W ā Ī·_ Y Z ā š X) ā«
(š (Z ā X) ā š W ā (Ī±_ Y Z X).hom) ā«
(š (Z ā X) ā (Ī±_ W Y (Z ā X)).inv) ā«
(Ī±_ (Z ā X) (W ā Y) (Z ā X)).inv ā«
((Ī±_ (Z ā X) W Y).inv ā š (Z ā X)) ā«
(((Ī±_ Z X W).hom ā š Y) ā š (Z ā X)) ā«
(((š Z ā Īµ_ W X) ā š Y) ā š (Z ā X)) ā«
(((Ļ_ Z).hom ā š Y) ā š (Z ā X)) ā« (Īµ_ Y Z ā š (Z ā X)) =
(Ī±_ Z X (š_ C)).hom ā« ((Ī»_ Z).inv ā (Ļ_ X).hom) ā« (Ī±_ (š_ C) Z X).hom
What struck me as useful is that we do not only generate reassociated lemmas in the category composition but generate versions that can be used to rewrite when additional terms are tensored to the left and right of the lemmas, to prevent having to conjugate with tensor_comp
every time...
Jakob von Raumer (Aug 17 2021 at 13:27):
Scott Morrison said:
Without aspiring (immediately) to have a widget interface, it could be really nice to write some tactics for working with this representation of monoidal diagrams. The key piece would be something that can take an expression in the usual (composition + tensor product) language of monoidal categories, and "look for it" in a Jamie-style diagram. (And then have a rewriter, that can rewrite a Jamie-style diagram by an equation written in the usual langauge.)
Is the proof that the category of Jamie-Style categories is equivalent to monoidal categories a done deal?
Scott Morrison (Aug 17 2021 at 23:28):
Hmm, very good question.
Jakob von Raumer (Aug 18 2021 at 09:45):
Scott Morrison said:
You can represent diagrams of this form as a list of triples (each triple corresponds to a horizontal slice of a diagram). Each triple contains a list of objects (the strings to the left of the coupon), a morphism (the coupon), and another list of objects (the strings to the right of the coupon).
Just to make sure that I'm on the same page, you mean that the sliding of morphisms and would be represented by something like ?
Scott Morrison (Aug 18 2021 at 09:58):
Yes.
Scott Morrison (Aug 18 2021 at 09:59):
The point is that by not allowing exactly-side-by-side morphisms (as are produced by \otimes
), we can drastically reduce the number of axioms needed to describe a monoidal category.
Jakob von Raumer (Aug 18 2021 at 10:40):
Yes, but it solves a provlem which is orthogonal to the one of having to deal with associators, right?
Scott Morrison (Aug 18 2021 at 10:50):
I guess so. This formulation is (besides other things) strictifying the tensor product on objects, so I guess is no more helpful than strictification.
Jakob von Raumer (Aug 18 2021 at 11:16):
Doesn't it require strictification first? Or are we able to go back and forth between Jamie-style categories and monoidal categories without strictification by removing/adding the associators?
Jakob von Raumer (Aug 24 2021 at 12:43):
Do you think the rigid categories should be PR'ed? Or should I first instantiate them with FinVec? (Which needs a construction of the coevaluation map first...)
Scott Morrison (Aug 25 2021 at 00:39):
I would be very happy to have them PR'd even without an example, but FinVec would be lovely as well. (Small digestible PRs are great: big PRs are prone to either very long review, or not-that-great-a-job reviews.)
Jakob von Raumer (Aug 31 2021 at 16:16):
Scott Morrison said:
I would be very happy to have them PR'd even without an example, but FinVec would be lovely as well. (Small digestible PRs are great: big PRs are prone to either very long review, or not-that-great-a-job reviews.)
FinVect is done :octopus:
Jakob von Raumer (Aug 31 2021 at 16:31):
Can someone give me the rights to write on branches of mathlib?
Bryan Gin-ge Chen (Aug 31 2021 at 16:33):
Invite sent! https://github.com/leanprover-community/mathlib/invitations
Jakob von Raumer (Aug 31 2021 at 16:37):
Thanks!
Jakob von Raumer (Sep 01 2021 at 11:19):
Jakob von Raumer (Sep 01 2021 at 14:50):
No idea on how to prevent the linter from complaining about reassoc
creating non-simp-nf lemmas
Alex J. Best (Sep 01 2021 at 15:04):
What about swapping the order of the attributes simp and reassoc? so that reassoc comes first
Jakob von Raumer (Sep 01 2021 at 17:42):
Ah, that could work. Or adding the simp attribute after the declaration
Last updated: Dec 20 2023 at 11:08 UTC