Commit 2025-09-25 12:38 7ef00670
View on Github →feat(CategoryTheory/Monoidal): Add commutative comonoid objects (#29919) This PR adds commutative comonoid objects and removes the problematic global comonoid instance (see #29657).
Main changes
1. Add CommComonObj class
Added Mathlib/CategoryTheory/Monoidal/CommComon_.lean defining commutative comonoids.
This captures the mathematical notion that swapping the two copies produced by comultiplication gives the same result. In cartesian categories, all comonoids are automatically commutative (copying data has no preferred order).
2. Remove global ComonObj instance for unit object
The global ComonObj (𝟙_ C) instance interfered in related proofs. This PR removes it and updates affected code:
Bicategory/Monad/Basic.lean: Now usesComonObj.instTensorUnitfor the identity monad's comonad structureMonoidal/Bimon_.lean: Added explicit proofs the global instance previously resolved, verifying unit morphisms preserve comonoid structure