Zulip Chat Archive
Stream: Is there code for X?
Topic: Category of relations as monoidal category
Martin Biehl (Dec 29 2024 at 16:52):
I would like to implement a monoidal functor (I think it's basically what is called the contravariant power set functor) from to (or to the category of preorders and monotone functions).
For this I need definitions of as a monoidal category (with Cartesian product as monoidal product), and (seems to be implemented in mathlib4 here) or , and finally of the monoidal functor.
I am new to lean so I have a dumb initial question:
- Is this a easy thing to do or is this maybe hard for some reason? Or something in between?
More particularly:
- Is with the Cartesian product as the monoidal product implemented somewhere?
-
If not, is it a reasonable approach to start with RelCat from mathlib4 and turn it into a monoidal category maybe by using OfChosenFiniteProducts? Or is there a better way?
-
Would it make things a lot easier if I restricted myself to the category of finite sets and relations? I could do that for my usecase I think.
Joël Riou (Dec 29 2024 at 16:59):
Martin Biehl said:
(seems to be implemented in mathlib4 here)
We do not have the monoidal structure on Cat
, but it would be nice to use the results in the folder Mathlib.CategoryTheory.Products
.
Last updated: May 02 2025 at 03:31 UTC