Zulip Chat Archive
Stream: mathlib4
Topic: to_additive on MonoidalCategory
Jad Ghalayini (Oct 04 2025 at 18:12):
I'm trying to get my PhD thesis ported from my custom discretion library to mathlib, and in the process of doing so, need to introduce an additive version of monoidal categories to have an idiomatic way to equip a category with a chosen cocartesian structure. This could also open the door to formalization of general rig categories, someday.
In my PR #30150 (https://github.com/leanprover-community/mathlib4/pull/30150) I introduce AddMonoidalCategory as the to_additive version of MonoidalCategory, and tag most of the definitions and theorems in CategoryTheory/Monoidal/Category with to_additive. To avoid breaking changes, I also need to make some slight edits to CategoryTheory/Monoidal/Discrete.
@Yaël Dillies told me to start a discussion to acquire consensus on new names and notations. In particular:
- The
to_additiveversion ofMonoidalCategoryisAddMonoidalCategory - The
to_additiveversion oftensoris justadd. I didn't want to use something like "direct sum" since that's not necessarily what this is. - We use the notation
⊕ₒfor adding objects and⊕ₘfor adding morphisms. We don't use a bare⊕to avoid confusion with the sum of types - We use the notation
𝟘_ Cfor the unit of⊕ₒandα⁺, λ⁺, ρ⁺for the additive versions of the associator and unitors
I'd also like to take the opportunity to solicit community feedback on some other proposed syntax/naming for future PRs:
AddBraidedCategoryfor the additive version ofBraidedCategoryβ⁺for the additive version of the braiding morphismAddSymmetricCategoryfor the additive version ofSymmetricCategoryCocartesianMonoidalCategoryfor when⊕ₒis a coproduct on objectsAddFreeMonoidalCategoryfor the additive version ofFreeMonoidalCategory; to port coherence we need a properAddMonoidalCategoryinstance forDiscreteand anAddMonoidinstance forAddNormalMonoidalObject, which we should probably get along to making.⋉and⋊for the left and right ordered tensor products in aPremonoidalCategory; I wouldn't bother with additive versions since while we want anAddPremonoidalCategoryto simplify working withto_additivehaving one which is not also anAddMonoidalCategoryis somewhat unidiomatic- A
Central ftypeclass for whenf ⋉ g = f ⋊ gandg ⋉ f = g ⋊ ffor allg
Sina Hazratpour (Nov 26 2025 at 17:15):
I think I prefer CocartesianMonoidalCategory to CocartesianAddMonoidalCategory. Also, would there be a real confusion if we used ⊕? I mean the sum types do give the cocartesian monoidal structure on the category of types. What goes wrong if we overload this notation?
Sina Hazratpour (Nov 26 2025 at 17:25):
(Incidentally, for some project, I worked with internal semirings, so added the files AddMon_.lean and AddCommMon_.lean to my project, and once your PR is there, I'd be happy to add these to mathlib.)
Jad Ghalayini (Dec 13 2025 at 17:10):
Hello! Any updates on where this is at?
William Sørensen (Dec 14 2025 at 08:53):
I would also find this very useful for formalising the Cambridge category theory course
Sina Hazratpour (Dec 20 2025 at 08:40):
Jad Ghalayini said:
Hello! Any updates on where this is at?
currently, it's a private repo, but intend to release it soon; happy to coordinate with you to PR part of the code (AddMon_.lean, AddCommMon_.lean, SemiringObj, etc) to mathlib if you want.
Last updated: Dec 20 2025 at 21:32 UTC