algebra.category.Mon.basicMathlib.Algebra.Category.MonCat.Basic

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

feat(representation_theory/Rep): describe monoidal closed structure (#18148)

The monoidal closed structure on Rep k G defines an internal hom of representations; we show this agrees with representation.lin_hom. Moreover, the maps defining the hom-set bijection come from the tensor-hom adjunction for $k$-modules.

Diff
@@ -80,6 +80,8 @@ instance (M : Mon) : monoid M := M.str
 
 @[simp, to_additive] lemma coe_of (R : Type u) [monoid R] : (Mon.of R : Type u) = R := rfl
 
+@[to_additive] instance {G : Type*} [group G] : group (Mon.of G) := by assumption
+
 end Mon
 
 /-- The category of commutative monoids and monoid morphisms. -/

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(first ported)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -309,7 +309,8 @@ def mulEquivIsoCommMonCatIso {X Y : Type u} [CommMonoid X] [CommMonoid Y] :
 
 #print MonCat.forget_reflects_isos /-
 @[to_additive]
-instance MonCat.forget_reflects_isos : ReflectsIsomorphisms (forget MonCat.{u})
+instance MonCat.forget_reflects_isos :
+    CategoryTheory.Functor.ReflectsIsomorphisms (forget MonCat.{u})
     where reflects X Y f _ := by
     skip
     let i := as_iso ((forget MonCat).map f)
@@ -321,7 +322,8 @@ instance MonCat.forget_reflects_isos : ReflectsIsomorphisms (forget MonCat.{u})
 
 #print CommMonCat.forget_reflects_isos /-
 @[to_additive]
-instance CommMonCat.forget_reflects_isos : ReflectsIsomorphisms (forget CommMonCat.{u})
+instance CommMonCat.forget_reflects_isos :
+    CategoryTheory.Functor.ReflectsIsomorphisms (forget CommMonCat.{u})
     where reflects X Y f _ := by
     skip
     let i := as_iso ((forget CommMonCat).map f)
@@ -338,5 +340,6 @@ reflect isomorphisms.
 -/
 
 
-example : ReflectsIsomorphisms (forget₂ CommMonCat MonCat) := by infer_instance
+example : CategoryTheory.Functor.ReflectsIsomorphisms (forget₂ CommMonCat MonCat) := by
+  infer_instance
 
Diff
@@ -4,8 +4,8 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Scott Morrison
 -/
 import CategoryTheory.ConcreteCategory.BundledHom
-import Algebra.PunitInstances
-import CategoryTheory.Functor.ReflectsIsomorphisms
+import Algebra.PUnitInstances
+import CategoryTheory.Functor.ReflectsIso
 
 #align_import algebra.category.Mon.basic from "leanprover-community/mathlib"@"0caf3701139ef2e69c215717665361cda205a90b"
 
Diff
@@ -3,9 +3,9 @@ Copyright (c) 2018 Scott Morrison. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Scott Morrison
 -/
-import Mathbin.CategoryTheory.ConcreteCategory.BundledHom
-import Mathbin.Algebra.PunitInstances
-import Mathbin.CategoryTheory.Functor.ReflectsIsomorphisms
+import CategoryTheory.ConcreteCategory.BundledHom
+import Algebra.PunitInstances
+import CategoryTheory.Functor.ReflectsIsomorphisms
 
 #align_import algebra.category.Mon.basic from "leanprover-community/mathlib"@"0caf3701139ef2e69c215717665361cda205a90b"
 
Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2018 Scott Morrison. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Scott Morrison
-
-! This file was ported from Lean 3 source module algebra.category.Mon.basic
-! leanprover-community/mathlib commit 0caf3701139ef2e69c215717665361cda205a90b
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.CategoryTheory.ConcreteCategory.BundledHom
 import Mathbin.Algebra.PunitInstances
 import Mathbin.CategoryTheory.Functor.ReflectsIsomorphisms
 
+#align_import algebra.category.Mon.basic from "leanprover-community/mathlib"@"0caf3701139ef2e69c215717665361cda205a90b"
+
 /-!
 # Category instances for monoid, add_monoid, comm_monoid, and add_comm_monoid.
 
Diff
@@ -98,10 +98,12 @@ def ofHom {X Y : Type u} [Monoid X] [Monoid Y] (f : X →* Y) : of X ⟶ of Y :=
 /-- Typecheck a `add_monoid_hom` as a morphism in `AddMon`. -/
 add_decl_doc AddMonCat.ofHom
 
+#print MonCat.ofHom_apply /-
 @[simp]
 theorem ofHom_apply {X Y : Type u} [Monoid X] [Monoid Y] (f : X →* Y) (x : X) : ofHom f x = f x :=
   rfl
 #align Mon.of_hom_apply MonCat.ofHom_apply
+-/
 
 @[to_additive]
 instance : Inhabited MonCat :=
@@ -186,11 +188,13 @@ theorem coe_of (R : Type u) [CommMonoid R] : (CommMonCat.of R : Type u) = R :=
 #align AddCommMon.coe_of AddCommMonCat.coe_of
 -/
 
+#print CommMonCat.hasForgetToMonCat /-
 @[to_additive has_forget_to_AddMon]
 instance hasForgetToMonCat : HasForget₂ CommMonCat MonCat :=
   BundledHom.forget₂ _ _
 #align CommMon.has_forget_to_Mon CommMonCat.hasForgetToMonCat
 #align AddCommMon.has_forget_to_AddMon AddCommMonCat.hasForgetToAddMonCat
+-/
 
 @[to_additive]
 instance : Coe CommMonCat.{u} MonCat.{u} where coe := (forget₂ CommMonCat MonCat).obj
@@ -222,6 +226,7 @@ section
 
 variable [Monoid X] [Monoid Y]
 
+#print MulEquiv.toMonCatIso /-
 /-- Build an isomorphism in the category `Mon` from a `mul_equiv` between `monoid`s. -/
 @[to_additive AddEquiv.toAddMonCatIso
       "Build an isomorphism in the category `AddMon` from\nan `add_equiv` between `add_monoid`s.",
@@ -232,6 +237,7 @@ def MulEquiv.toMonCatIso (e : X ≃* Y) : MonCat.of X ≅ MonCat.of Y
   inv := e.symm.toMonoidHom
 #align mul_equiv.to_Mon_iso MulEquiv.toMonCatIso
 #align add_equiv.to_AddMon_iso AddEquiv.toAddMonCatIso
+-/
 
 end
 
@@ -239,6 +245,7 @@ section
 
 variable [CommMonoid X] [CommMonoid Y]
 
+#print MulEquiv.toCommMonCatIso /-
 /-- Build an isomorphism in the category `CommMon` from a `mul_equiv` between `comm_monoid`s. -/
 @[to_additive AddEquiv.toAddCommMonCatIso
       "Build an isomorphism in the category `AddCommMon`\nfrom an `add_equiv` between `add_comm_monoid`s.",
@@ -249,11 +256,13 @@ def MulEquiv.toCommMonCatIso (e : X ≃* Y) : CommMonCat.of X ≅ CommMonCat.of
   inv := e.symm.toMonoidHom
 #align mul_equiv.to_CommMon_iso MulEquiv.toCommMonCatIso
 #align add_equiv.to_AddCommMon_iso AddEquiv.toAddCommMonCatIso
+-/
 
 end
 
 namespace CategoryTheory.Iso
 
+#print CategoryTheory.Iso.monCatIsoToMulEquiv /-
 /-- Build a `mul_equiv` from an isomorphism in the category `Mon`. -/
 @[to_additive AddMon_iso_to_add_equiv
       "Build an `add_equiv` from an isomorphism in the category\n`AddMon`."]
@@ -261,16 +270,20 @@ def monCatIsoToMulEquiv {X Y : MonCat} (i : X ≅ Y) : X ≃* Y :=
   i.Hom.toMulEquiv i.inv i.hom_inv_id i.inv_hom_id
 #align category_theory.iso.Mon_iso_to_mul_equiv CategoryTheory.Iso.monCatIsoToMulEquiv
 #align category_theory.iso.AddMon_iso_to_add_equiv CategoryTheory.Iso.addMonCatIsoToAddEquiv
+-/
 
+#print CategoryTheory.Iso.commMonCatIsoToMulEquiv /-
 /-- Build a `mul_equiv` from an isomorphism in the category `CommMon`. -/
 @[to_additive "Build an `add_equiv` from an isomorphism in the category\n`AddCommMon`."]
 def commMonCatIsoToMulEquiv {X Y : CommMonCat} (i : X ≅ Y) : X ≃* Y :=
   i.Hom.toMulEquiv i.inv i.hom_inv_id i.inv_hom_id
 #align category_theory.iso.CommMon_iso_to_mul_equiv CategoryTheory.Iso.commMonCatIsoToMulEquiv
 #align category_theory.iso.CommMon_iso_to_add_equiv CategoryTheory.Iso.commMonCatIsoToAddEquiv
+-/
 
 end CategoryTheory.Iso
 
+#print mulEquivIsoMonCatIso /-
 /-- multiplicative equivalences between `monoid`s are the same as (isomorphic to) isomorphisms
 in `Mon` -/
 @[to_additive addEquivIsoAddMonCatIso
@@ -281,7 +294,9 @@ def mulEquivIsoMonCatIso {X Y : Type u} [Monoid X] [Monoid Y] : X ≃* Y ≅ Mon
   inv i := i.monCatIsoToMulEquiv
 #align mul_equiv_iso_Mon_iso mulEquivIsoMonCatIso
 #align add_equiv_iso_AddMon_iso addEquivIsoAddMonCatIso
+-/
 
+#print mulEquivIsoCommMonCatIso /-
 /-- multiplicative equivalences between `comm_monoid`s are the same as (isomorphic to) isomorphisms
 in `CommMon` -/
 @[to_additive addEquivIsoAddCommMonCatIso
@@ -293,6 +308,7 @@ def mulEquivIsoCommMonCatIso {X Y : Type u} [CommMonoid X] [CommMonoid Y] :
   inv i := i.commMonCatIsoToMulEquiv
 #align mul_equiv_iso_CommMon_iso mulEquivIsoCommMonCatIso
 #align add_equiv_iso_AddCommMon_iso addEquivIsoAddCommMonCatIso
+-/
 
 #print MonCat.forget_reflects_isos /-
 @[to_additive]
Diff
@@ -186,13 +186,11 @@ theorem coe_of (R : Type u) [CommMonoid R] : (CommMonCat.of R : Type u) = R :=
 #align AddCommMon.coe_of AddCommMonCat.coe_of
 -/
 
-#print CommMonCat.hasForgetToMonCat /-
 @[to_additive has_forget_to_AddMon]
 instance hasForgetToMonCat : HasForget₂ CommMonCat MonCat :=
   BundledHom.forget₂ _ _
 #align CommMon.has_forget_to_Mon CommMonCat.hasForgetToMonCat
 #align AddCommMon.has_forget_to_AddMon AddCommMonCat.hasForgetToAddMonCat
--/
 
 @[to_additive]
 instance : Coe CommMonCat.{u} MonCat.{u} where coe := (forget₂ CommMonCat MonCat).obj
Diff
@@ -211,7 +211,7 @@ example {R S : CommMonCat} (f : R ⟶ S) : (R : Type) → (S : Type) :=
 -- rather than `R.α` or (as we used to have) `↥(bundled.map comm_monoid.to_monoid R)`.
 example (R : CommMonCat.{u}) : R ⟶ R :=
   { toFun := fun x => by
-      match_target(R : Type u)
+      match_target (R : Type u)
       match_hyp x : (R : Type u)
       exact x * x
     map_one' := by simp
Diff
@@ -98,12 +98,6 @@ def ofHom {X Y : Type u} [Monoid X] [Monoid Y] (f : X →* Y) : of X ⟶ of Y :=
 /-- Typecheck a `add_monoid_hom` as a morphism in `AddMon`. -/
 add_decl_doc AddMonCat.ofHom
 
-/- warning: Mon.of_hom_apply -> MonCat.ofHom_apply is a dubious translation:
-lean 3 declaration is
-  forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : Monoid.{u1} X] [_inst_2 : Monoid.{u1} Y] (f : MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) (x : X), Eq.{succ u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} Y _inst_2)) (coeFn.{succ u1, succ u1} (Quiver.Hom.{succ u1, succ u1} MonCat.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} MonCat.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} MonCat.{u1} MonCat.largeCategory.{u1})) (MonCat.of.{u1} X _inst_1) (MonCat.of.{u1} Y _inst_2)) (fun (_x : MonoidHom.{u1, u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} X _inst_1)) (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} Y _inst_2)) (Monoid.toMulOneClass.{u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} X _inst_1)) (CategoryTheory.Bundled.str.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1))) (Monoid.toMulOneClass.{u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} Y _inst_2)) (CategoryTheory.Bundled.str.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)))) => (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} X _inst_1)) -> (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} Y _inst_2))) (MonoidHom.hasCoeToFun.{u1, u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} X _inst_1)) (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} Y _inst_2)) (Monoid.toMulOneClass.{u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} X _inst_1)) (CategoryTheory.Bundled.str.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1))) (Monoid.toMulOneClass.{u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} Y _inst_2)) (CategoryTheory.Bundled.str.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)))) (MonCat.ofHom.{u1} X Y _inst_1 _inst_2 f) x) (coeFn.{succ u1, succ u1} (MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) (fun (_x : MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) => X -> Y) (MonoidHom.hasCoeToFun.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) f x)
-but is expected to have type
-  forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : Monoid.{u1} X] [_inst_2 : Monoid.{u1} Y] (f : MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) (x : X), Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) => CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) x) (FunLike.coe.{succ u1, succ u1, succ u1} (MonoidHom.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} X _inst_1))) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} Y _inst_2)))) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (fun (_x : CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) => CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) _x) (MulHomClass.toFunLike.{u1, u1, u1} (MonoidHom.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} X _inst_1))) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} Y _inst_2)))) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (MulOneClass.toMul.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} X _inst_1)))) (MulOneClass.toMul.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} Y _inst_2)))) (MonoidHomClass.toMulHomClass.{u1, u1, u1} (MonoidHom.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} X _inst_1))) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} Y _inst_2)))) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} X _inst_1))) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} Y _inst_2))) (MonoidHom.monoidHomClass.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} X _inst_1))) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} Y _inst_2)))))) (MonCat.ofHom.{u1} X Y _inst_1 _inst_2 f) x) (FunLike.coe.{succ u1, succ u1, succ u1} (MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) X (fun (_x : X) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : X) => Y) _x) (MulHomClass.toFunLike.{u1, u1, u1} (MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) X Y (MulOneClass.toMul.{u1} X (Monoid.toMulOneClass.{u1} X _inst_1)) (MulOneClass.toMul.{u1} Y (Monoid.toMulOneClass.{u1} Y _inst_2)) (MonoidHomClass.toMulHomClass.{u1, u1, u1} (MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2) (MonoidHom.monoidHomClass.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)))) f x)
-Case conversion may be inaccurate. Consider using '#align Mon.of_hom_apply MonCat.ofHom_applyₓ'. -/
 @[simp]
 theorem ofHom_apply {X Y : Type u} [Monoid X] [Monoid Y] (f : X →* Y) (x : X) : ofHom f x = f x :=
   rfl
@@ -230,12 +224,6 @@ section
 
 variable [Monoid X] [Monoid Y]
 
-/- warning: mul_equiv.to_Mon_iso -> MulEquiv.toMonCatIso is a dubious translation:
-lean 3 declaration is
-  forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : Monoid.{u1} X] [_inst_2 : Monoid.{u1} Y], (MulEquiv.{u1, u1} X Y (MulOneClass.toHasMul.{u1} X (Monoid.toMulOneClass.{u1} X _inst_1)) (MulOneClass.toHasMul.{u1} Y (Monoid.toMulOneClass.{u1} Y _inst_2))) -> (CategoryTheory.Iso.{u1, succ u1} MonCat.{u1} MonCat.largeCategory.{u1} (MonCat.of.{u1} X _inst_1) (MonCat.of.{u1} Y _inst_2))
-but is expected to have type
-  forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : Monoid.{u1} X] [_inst_2 : Monoid.{u1} Y], (MulEquiv.{u1, u1} X Y (MulOneClass.toMul.{u1} X (Monoid.toMulOneClass.{u1} X _inst_1)) (MulOneClass.toMul.{u1} Y (Monoid.toMulOneClass.{u1} Y _inst_2))) -> (CategoryTheory.Iso.{u1, succ u1} MonCat.{u1} instMonCatLargeCategory.{u1} (MonCat.of.{u1} X _inst_1) (MonCat.of.{u1} Y _inst_2))
-Case conversion may be inaccurate. Consider using '#align mul_equiv.to_Mon_iso MulEquiv.toMonCatIsoₓ'. -/
 /-- Build an isomorphism in the category `Mon` from a `mul_equiv` between `monoid`s. -/
 @[to_additive AddEquiv.toAddMonCatIso
       "Build an isomorphism in the category `AddMon` from\nan `add_equiv` between `add_monoid`s.",
@@ -253,12 +241,6 @@ section
 
 variable [CommMonoid X] [CommMonoid Y]
 
-/- warning: mul_equiv.to_CommMon_iso -> MulEquiv.toCommMonCatIso is a dubious translation:
-lean 3 declaration is
-  forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : CommMonoid.{u1} X] [_inst_2 : CommMonoid.{u1} Y], (MulEquiv.{u1, u1} X Y (MulOneClass.toHasMul.{u1} X (Monoid.toMulOneClass.{u1} X (CommMonoid.toMonoid.{u1} X _inst_1))) (MulOneClass.toHasMul.{u1} Y (Monoid.toMulOneClass.{u1} Y (CommMonoid.toMonoid.{u1} Y _inst_2)))) -> (CategoryTheory.Iso.{u1, succ u1} CommMonCat.{u1} CommMonCat.largeCategory.{u1} (CommMonCat.of.{u1} X _inst_1) (CommMonCat.of.{u1} Y _inst_2))
-but is expected to have type
-  forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : CommMonoid.{u1} X] [_inst_2 : CommMonoid.{u1} Y], (MulEquiv.{u1, u1} X Y (MulOneClass.toMul.{u1} X (Monoid.toMulOneClass.{u1} X (CommMonoid.toMonoid.{u1} X _inst_1))) (MulOneClass.toMul.{u1} Y (Monoid.toMulOneClass.{u1} Y (CommMonoid.toMonoid.{u1} Y _inst_2)))) -> (CategoryTheory.Iso.{u1, succ u1} CommMonCat.{u1} instCommMonCatLargeCategory.{u1} (CommMonCat.of.{u1} X _inst_1) (CommMonCat.of.{u1} Y _inst_2))
-Case conversion may be inaccurate. Consider using '#align mul_equiv.to_CommMon_iso MulEquiv.toCommMonCatIsoₓ'. -/
 /-- Build an isomorphism in the category `CommMon` from a `mul_equiv` between `comm_monoid`s. -/
 @[to_additive AddEquiv.toAddCommMonCatIso
       "Build an isomorphism in the category `AddCommMon`\nfrom an `add_equiv` between `add_comm_monoid`s.",
@@ -274,12 +256,6 @@ end
 
 namespace CategoryTheory.Iso
 
-/- warning: category_theory.iso.Mon_iso_to_mul_equiv -> CategoryTheory.Iso.monCatIsoToMulEquiv is a dubious translation:
-lean 3 declaration is
-  forall {X : MonCat.{u1}} {Y : MonCat.{u1}}, (CategoryTheory.Iso.{u1, succ u1} MonCat.{u1} MonCat.largeCategory.{u1} X Y) -> (MulEquiv.{u1, u1} (coeSort.{succ (succ u1), succ (succ u1)} MonCat.{u1} Type.{u1} MonCat.hasCoeToSort.{u1} X) (coeSort.{succ (succ u1), succ (succ u1)} MonCat.{u1} Type.{u1} MonCat.hasCoeToSort.{u1} Y) (MulOneClass.toHasMul.{u1} (coeSort.{succ (succ u1), succ (succ u1)} MonCat.{u1} Type.{u1} MonCat.hasCoeToSort.{u1} X) (Monoid.toMulOneClass.{u1} (coeSort.{succ (succ u1), succ (succ u1)} MonCat.{u1} Type.{u1} MonCat.hasCoeToSort.{u1} X) (MonCat.monoid.{u1} X))) (MulOneClass.toHasMul.{u1} (coeSort.{succ (succ u1), succ (succ u1)} MonCat.{u1} Type.{u1} MonCat.hasCoeToSort.{u1} Y) (Monoid.toMulOneClass.{u1} (coeSort.{succ (succ u1), succ (succ u1)} MonCat.{u1} Type.{u1} MonCat.hasCoeToSort.{u1} Y) (MonCat.monoid.{u1} Y))))
-but is expected to have type
-  forall {X : MonCat.{u1}} {Y : MonCat.{u1}}, (CategoryTheory.Iso.{u1, succ u1} MonCat.{u1} instMonCatLargeCategory.{u1} X Y) -> (MulEquiv.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} X) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} Y) (MulOneClass.toMul.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} X) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} X) (MonCat.instMonoidα.{u1} X))) (MulOneClass.toMul.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} Y) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} Y) (MonCat.instMonoidα.{u1} Y))))
-Case conversion may be inaccurate. Consider using '#align category_theory.iso.Mon_iso_to_mul_equiv CategoryTheory.Iso.monCatIsoToMulEquivₓ'. -/
 /-- Build a `mul_equiv` from an isomorphism in the category `Mon`. -/
 @[to_additive AddMon_iso_to_add_equiv
       "Build an `add_equiv` from an isomorphism in the category\n`AddMon`."]
@@ -288,12 +264,6 @@ def monCatIsoToMulEquiv {X Y : MonCat} (i : X ≅ Y) : X ≃* Y :=
 #align category_theory.iso.Mon_iso_to_mul_equiv CategoryTheory.Iso.monCatIsoToMulEquiv
 #align category_theory.iso.AddMon_iso_to_add_equiv CategoryTheory.Iso.addMonCatIsoToAddEquiv
 
-/- warning: category_theory.iso.CommMon_iso_to_mul_equiv -> CategoryTheory.Iso.commMonCatIsoToMulEquiv is a dubious translation:
-lean 3 declaration is
-  forall {X : CommMonCat.{u1}} {Y : CommMonCat.{u1}}, (CategoryTheory.Iso.{u1, succ u1} CommMonCat.{u1} CommMonCat.largeCategory.{u1} X Y) -> (MulEquiv.{u1, u1} (coeSort.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.hasCoeToSort.{u1} X) (coeSort.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.hasCoeToSort.{u1} Y) (MulOneClass.toHasMul.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.hasCoeToSort.{u1} X) (Monoid.toMulOneClass.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.hasCoeToSort.{u1} X) (CommMonoid.toMonoid.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.hasCoeToSort.{u1} X) (CommMonCat.commMonoid.{u1} X)))) (MulOneClass.toHasMul.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.hasCoeToSort.{u1} Y) (Monoid.toMulOneClass.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.hasCoeToSort.{u1} Y) (CommMonoid.toMonoid.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.hasCoeToSort.{u1} Y) (CommMonCat.commMonoid.{u1} Y)))))
-but is expected to have type
-  forall {X : CommMonCat.{u1}} {Y : CommMonCat.{u1}}, (CategoryTheory.Iso.{u1, succ u1} CommMonCat.{u1} instCommMonCatLargeCategory.{u1} X Y) -> (MulEquiv.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} CommMonoid.{u1} X) (CategoryTheory.Bundled.α.{u1, u1} CommMonoid.{u1} Y) (MulOneClass.toMul.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommMonoid.{u1} X) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommMonoid.{u1} X) (CommMonoid.toMonoid.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommMonoid.{u1} X) (CommMonCat.instCommMonoidα.{u1} X)))) (MulOneClass.toMul.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommMonoid.{u1} Y) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommMonoid.{u1} Y) (CommMonoid.toMonoid.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommMonoid.{u1} Y) (CommMonCat.instCommMonoidα.{u1} Y)))))
-Case conversion may be inaccurate. Consider using '#align category_theory.iso.CommMon_iso_to_mul_equiv CategoryTheory.Iso.commMonCatIsoToMulEquivₓ'. -/
 /-- Build a `mul_equiv` from an isomorphism in the category `CommMon`. -/
 @[to_additive "Build an `add_equiv` from an isomorphism in the category\n`AddCommMon`."]
 def commMonCatIsoToMulEquiv {X Y : CommMonCat} (i : X ≅ Y) : X ≃* Y :=
@@ -303,12 +273,6 @@ def commMonCatIsoToMulEquiv {X Y : CommMonCat} (i : X ≅ Y) : X ≃* Y :=
 
 end CategoryTheory.Iso
 
-/- warning: mul_equiv_iso_Mon_iso -> mulEquivIsoMonCatIso is a dubious translation:
-lean 3 declaration is
-  forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : Monoid.{u1} X] [_inst_2 : Monoid.{u1} Y], CategoryTheory.Iso.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1} (MulEquiv.{u1, u1} X Y (MulOneClass.toHasMul.{u1} X (Monoid.toMulOneClass.{u1} X _inst_1)) (MulOneClass.toHasMul.{u1} Y (Monoid.toMulOneClass.{u1} Y _inst_2))) (CategoryTheory.Iso.{u1, succ u1} MonCat.{u1} MonCat.largeCategory.{u1} (MonCat.of.{u1} X _inst_1) (MonCat.of.{u1} Y _inst_2))
-but is expected to have type
-  forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : Monoid.{u1} X] [_inst_2 : Monoid.{u1} Y], CategoryTheory.Iso.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1} (MulEquiv.{u1, u1} X Y (MulOneClass.toMul.{u1} X (Monoid.toMulOneClass.{u1} X _inst_1)) (MulOneClass.toMul.{u1} Y (Monoid.toMulOneClass.{u1} Y _inst_2))) (CategoryTheory.Iso.{u1, succ u1} MonCat.{u1} instMonCatLargeCategory.{u1} (MonCat.of.{u1} X _inst_1) (MonCat.of.{u1} Y _inst_2))
-Case conversion may be inaccurate. Consider using '#align mul_equiv_iso_Mon_iso mulEquivIsoMonCatIsoₓ'. -/
 /-- multiplicative equivalences between `monoid`s are the same as (isomorphic to) isomorphisms
 in `Mon` -/
 @[to_additive addEquivIsoAddMonCatIso
@@ -320,12 +284,6 @@ def mulEquivIsoMonCatIso {X Y : Type u} [Monoid X] [Monoid Y] : X ≃* Y ≅ Mon
 #align mul_equiv_iso_Mon_iso mulEquivIsoMonCatIso
 #align add_equiv_iso_AddMon_iso addEquivIsoAddMonCatIso
 
-/- warning: mul_equiv_iso_CommMon_iso -> mulEquivIsoCommMonCatIso is a dubious translation:
-lean 3 declaration is
-  forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : CommMonoid.{u1} X] [_inst_2 : CommMonoid.{u1} Y], CategoryTheory.Iso.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1} (MulEquiv.{u1, u1} X Y (MulOneClass.toHasMul.{u1} X (Monoid.toMulOneClass.{u1} X (CommMonoid.toMonoid.{u1} X _inst_1))) (MulOneClass.toHasMul.{u1} Y (Monoid.toMulOneClass.{u1} Y (CommMonoid.toMonoid.{u1} Y _inst_2)))) (CategoryTheory.Iso.{u1, succ u1} CommMonCat.{u1} CommMonCat.largeCategory.{u1} (CommMonCat.of.{u1} X _inst_1) (CommMonCat.of.{u1} Y _inst_2))
-but is expected to have type
-  forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : CommMonoid.{u1} X] [_inst_2 : CommMonoid.{u1} Y], CategoryTheory.Iso.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1} (MulEquiv.{u1, u1} X Y (MulOneClass.toMul.{u1} X (Monoid.toMulOneClass.{u1} X (CommMonoid.toMonoid.{u1} X _inst_1))) (MulOneClass.toMul.{u1} Y (Monoid.toMulOneClass.{u1} Y (CommMonoid.toMonoid.{u1} Y _inst_2)))) (CategoryTheory.Iso.{u1, succ u1} CommMonCat.{u1} instCommMonCatLargeCategory.{u1} (CommMonCat.of.{u1} X _inst_1) (CommMonCat.of.{u1} Y _inst_2))
-Case conversion may be inaccurate. Consider using '#align mul_equiv_iso_CommMon_iso mulEquivIsoCommMonCatIsoₓ'. -/
 /-- multiplicative equivalences between `comm_monoid`s are the same as (isomorphic to) isomorphisms
 in `CommMon` -/
 @[to_additive addEquivIsoAddCommMonCatIso
Diff
@@ -102,7 +102,7 @@ add_decl_doc AddMonCat.ofHom
 lean 3 declaration is
   forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : Monoid.{u1} X] [_inst_2 : Monoid.{u1} Y] (f : MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) (x : X), Eq.{succ u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} Y _inst_2)) (coeFn.{succ u1, succ u1} (Quiver.Hom.{succ u1, succ u1} MonCat.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} MonCat.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} MonCat.{u1} MonCat.largeCategory.{u1})) (MonCat.of.{u1} X _inst_1) (MonCat.of.{u1} Y _inst_2)) (fun (_x : MonoidHom.{u1, u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} X _inst_1)) (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} Y _inst_2)) (Monoid.toMulOneClass.{u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} X _inst_1)) (CategoryTheory.Bundled.str.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1))) (Monoid.toMulOneClass.{u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} Y _inst_2)) (CategoryTheory.Bundled.str.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)))) => (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} X _inst_1)) -> (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} Y _inst_2))) (MonoidHom.hasCoeToFun.{u1, u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} X _inst_1)) (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} Y _inst_2)) (Monoid.toMulOneClass.{u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} X _inst_1)) (CategoryTheory.Bundled.str.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1))) (Monoid.toMulOneClass.{u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} Y _inst_2)) (CategoryTheory.Bundled.str.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)))) (MonCat.ofHom.{u1} X Y _inst_1 _inst_2 f) x) (coeFn.{succ u1, succ u1} (MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) (fun (_x : MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) => X -> Y) (MonoidHom.hasCoeToFun.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) f x)
 but is expected to have type
-  forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : Monoid.{u1} X] [_inst_2 : Monoid.{u1} Y] (f : MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) (x : X), Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) => CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) x) (FunLike.coe.{succ u1, succ u1, succ u1} (MonoidHom.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} X _inst_1))) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} Y _inst_2)))) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (fun (_x : CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) => CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) _x) (MulHomClass.toFunLike.{u1, u1, u1} (MonoidHom.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} X _inst_1))) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} Y _inst_2)))) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (MulOneClass.toMul.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} X _inst_1)))) (MulOneClass.toMul.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} Y _inst_2)))) (MonoidHomClass.toMulHomClass.{u1, u1, u1} (MonoidHom.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} X _inst_1))) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} Y _inst_2)))) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} X _inst_1))) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} Y _inst_2))) (MonoidHom.monoidHomClass.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} X _inst_1))) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} Y _inst_2)))))) (MonCat.ofHom.{u1} X Y _inst_1 _inst_2 f) x) (FunLike.coe.{succ u1, succ u1, succ u1} (MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) X (fun (_x : X) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : X) => Y) _x) (MulHomClass.toFunLike.{u1, u1, u1} (MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) X Y (MulOneClass.toMul.{u1} X (Monoid.toMulOneClass.{u1} X _inst_1)) (MulOneClass.toMul.{u1} Y (Monoid.toMulOneClass.{u1} Y _inst_2)) (MonoidHomClass.toMulHomClass.{u1, u1, u1} (MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2) (MonoidHom.monoidHomClass.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)))) f x)
+  forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : Monoid.{u1} X] [_inst_2 : Monoid.{u1} Y] (f : MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) (x : X), Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) => CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) x) (FunLike.coe.{succ u1, succ u1, succ u1} (MonoidHom.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} X _inst_1))) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} Y _inst_2)))) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (fun (_x : CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) => CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) _x) (MulHomClass.toFunLike.{u1, u1, u1} (MonoidHom.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} X _inst_1))) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} Y _inst_2)))) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (MulOneClass.toMul.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} X _inst_1)))) (MulOneClass.toMul.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} Y _inst_2)))) (MonoidHomClass.toMulHomClass.{u1, u1, u1} (MonoidHom.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} X _inst_1))) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} Y _inst_2)))) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} X _inst_1))) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} Y _inst_2))) (MonoidHom.monoidHomClass.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} X _inst_1))) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} Y _inst_2)))))) (MonCat.ofHom.{u1} X Y _inst_1 _inst_2 f) x) (FunLike.coe.{succ u1, succ u1, succ u1} (MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) X (fun (_x : X) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : X) => Y) _x) (MulHomClass.toFunLike.{u1, u1, u1} (MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) X Y (MulOneClass.toMul.{u1} X (Monoid.toMulOneClass.{u1} X _inst_1)) (MulOneClass.toMul.{u1} Y (Monoid.toMulOneClass.{u1} Y _inst_2)) (MonoidHomClass.toMulHomClass.{u1, u1, u1} (MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2) (MonoidHom.monoidHomClass.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)))) f x)
 Case conversion may be inaccurate. Consider using '#align Mon.of_hom_apply MonCat.ofHom_applyₓ'. -/
 @[simp]
 theorem ofHom_apply {X Y : Type u} [Monoid X] [Monoid Y] (f : X →* Y) (x : X) : ofHom f x = f x :=
Diff
@@ -102,7 +102,7 @@ add_decl_doc AddMonCat.ofHom
 lean 3 declaration is
   forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : Monoid.{u1} X] [_inst_2 : Monoid.{u1} Y] (f : MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) (x : X), Eq.{succ u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} Y _inst_2)) (coeFn.{succ u1, succ u1} (Quiver.Hom.{succ u1, succ u1} MonCat.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} MonCat.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} MonCat.{u1} MonCat.largeCategory.{u1})) (MonCat.of.{u1} X _inst_1) (MonCat.of.{u1} Y _inst_2)) (fun (_x : MonoidHom.{u1, u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} X _inst_1)) (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} Y _inst_2)) (Monoid.toMulOneClass.{u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} X _inst_1)) (CategoryTheory.Bundled.str.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1))) (Monoid.toMulOneClass.{u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} Y _inst_2)) (CategoryTheory.Bundled.str.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)))) => (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} X _inst_1)) -> (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} Y _inst_2))) (MonoidHom.hasCoeToFun.{u1, u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} X _inst_1)) (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} Y _inst_2)) (Monoid.toMulOneClass.{u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} X _inst_1)) (CategoryTheory.Bundled.str.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1))) (Monoid.toMulOneClass.{u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} Y _inst_2)) (CategoryTheory.Bundled.str.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)))) (MonCat.ofHom.{u1} X Y _inst_1 _inst_2 f) x) (coeFn.{succ u1, succ u1} (MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) (fun (_x : MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) => X -> Y) (MonoidHom.hasCoeToFun.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) f x)
 but is expected to have type
-  forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : Monoid.{u1} X] [_inst_2 : Monoid.{u1} Y] (f : MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) (x : X), Eq.{succ u1} (Prefunctor.obj.{succ u1, succ u1, succ u1, succ u1} MonCat.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} MonCat.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} MonCat.{u1} MonCat.largeCategory.{u1})) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u1, u1, succ u1, succ u1} MonCat.{u1} MonCat.largeCategory.{u1} Type.{u1} CategoryTheory.types.{u1} (CategoryTheory.forget.{succ u1, u1, u1} MonCat.{u1} MonCat.largeCategory.{u1} MonCat.concreteCategory.{u1})) (MonCat.of.{u1} Y _inst_2)) (Prefunctor.map.{succ u1, succ u1, succ u1, succ u1} MonCat.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} MonCat.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} MonCat.{u1} MonCat.largeCategory.{u1})) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u1, u1, succ u1, succ u1} MonCat.{u1} MonCat.largeCategory.{u1} Type.{u1} CategoryTheory.types.{u1} (CategoryTheory.forget.{succ u1, u1, u1} MonCat.{u1} MonCat.largeCategory.{u1} MonCat.concreteCategory.{u1})) (MonCat.of.{u1} X _inst_1) (MonCat.of.{u1} Y _inst_2) (MonCat.ofHom.{u1} X Y _inst_1 _inst_2 f) x) (FunLike.coe.{succ u1, succ u1, succ u1} (MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) X (fun (_x : X) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : X) => Y) _x) (MulHomClass.toFunLike.{u1, u1, u1} (MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) X Y (MulOneClass.toMul.{u1} X (Monoid.toMulOneClass.{u1} X _inst_1)) (MulOneClass.toMul.{u1} Y (Monoid.toMulOneClass.{u1} Y _inst_2)) (MonoidHomClass.toMulHomClass.{u1, u1, u1} (MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2) (MonoidHom.monoidHomClass.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)))) f x)
+  forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : Monoid.{u1} X] [_inst_2 : Monoid.{u1} Y] (f : MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) (x : X), Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) => CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) x) (FunLike.coe.{succ u1, succ u1, succ u1} (MonoidHom.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} X _inst_1))) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} Y _inst_2)))) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (fun (_x : CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) => CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) _x) (MulHomClass.toFunLike.{u1, u1, u1} (MonoidHom.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} X _inst_1))) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} Y _inst_2)))) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (MulOneClass.toMul.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} X _inst_1)))) (MulOneClass.toMul.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} Y _inst_2)))) (MonoidHomClass.toMulHomClass.{u1, u1, u1} (MonoidHom.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} X _inst_1))) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} Y _inst_2)))) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} X _inst_1))) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} Y _inst_2))) (MonoidHom.monoidHomClass.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} X _inst_1))) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)) (MonCat.instMonoidα.{u1} (MonCat.of.{u1} Y _inst_2)))))) (MonCat.ofHom.{u1} X Y _inst_1 _inst_2 f) x) (FunLike.coe.{succ u1, succ u1, succ u1} (MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) X (fun (_x : X) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : X) => Y) _x) (MulHomClass.toFunLike.{u1, u1, u1} (MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) X Y (MulOneClass.toMul.{u1} X (Monoid.toMulOneClass.{u1} X _inst_1)) (MulOneClass.toMul.{u1} Y (Monoid.toMulOneClass.{u1} Y _inst_2)) (MonoidHomClass.toMulHomClass.{u1, u1, u1} (MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2) (MonoidHom.monoidHomClass.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)))) f x)
 Case conversion may be inaccurate. Consider using '#align Mon.of_hom_apply MonCat.ofHom_applyₓ'. -/
 @[simp]
 theorem ofHom_apply {X Y : Type u} [Monoid X] [Monoid Y] (f : X →* Y) (x : X) : ofHom f x = f x :=
@@ -234,7 +234,7 @@ variable [Monoid X] [Monoid Y]
 lean 3 declaration is
   forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : Monoid.{u1} X] [_inst_2 : Monoid.{u1} Y], (MulEquiv.{u1, u1} X Y (MulOneClass.toHasMul.{u1} X (Monoid.toMulOneClass.{u1} X _inst_1)) (MulOneClass.toHasMul.{u1} Y (Monoid.toMulOneClass.{u1} Y _inst_2))) -> (CategoryTheory.Iso.{u1, succ u1} MonCat.{u1} MonCat.largeCategory.{u1} (MonCat.of.{u1} X _inst_1) (MonCat.of.{u1} Y _inst_2))
 but is expected to have type
-  forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : Monoid.{u1} X] [_inst_2 : Monoid.{u1} Y], (MulEquiv.{u1, u1} X Y (MulOneClass.toMul.{u1} X (Monoid.toMulOneClass.{u1} X _inst_1)) (MulOneClass.toMul.{u1} Y (Monoid.toMulOneClass.{u1} Y _inst_2))) -> (CategoryTheory.Iso.{u1, succ u1} MonCat.{u1} MonCat.largeCategory.{u1} (MonCat.of.{u1} X _inst_1) (MonCat.of.{u1} Y _inst_2))
+  forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : Monoid.{u1} X] [_inst_2 : Monoid.{u1} Y], (MulEquiv.{u1, u1} X Y (MulOneClass.toMul.{u1} X (Monoid.toMulOneClass.{u1} X _inst_1)) (MulOneClass.toMul.{u1} Y (Monoid.toMulOneClass.{u1} Y _inst_2))) -> (CategoryTheory.Iso.{u1, succ u1} MonCat.{u1} instMonCatLargeCategory.{u1} (MonCat.of.{u1} X _inst_1) (MonCat.of.{u1} Y _inst_2))
 Case conversion may be inaccurate. Consider using '#align mul_equiv.to_Mon_iso MulEquiv.toMonCatIsoₓ'. -/
 /-- Build an isomorphism in the category `Mon` from a `mul_equiv` between `monoid`s. -/
 @[to_additive AddEquiv.toAddMonCatIso
@@ -257,7 +257,7 @@ variable [CommMonoid X] [CommMonoid Y]
 lean 3 declaration is
   forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : CommMonoid.{u1} X] [_inst_2 : CommMonoid.{u1} Y], (MulEquiv.{u1, u1} X Y (MulOneClass.toHasMul.{u1} X (Monoid.toMulOneClass.{u1} X (CommMonoid.toMonoid.{u1} X _inst_1))) (MulOneClass.toHasMul.{u1} Y (Monoid.toMulOneClass.{u1} Y (CommMonoid.toMonoid.{u1} Y _inst_2)))) -> (CategoryTheory.Iso.{u1, succ u1} CommMonCat.{u1} CommMonCat.largeCategory.{u1} (CommMonCat.of.{u1} X _inst_1) (CommMonCat.of.{u1} Y _inst_2))
 but is expected to have type
-  forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : CommMonoid.{u1} X] [_inst_2 : CommMonoid.{u1} Y], (MulEquiv.{u1, u1} X Y (MulOneClass.toMul.{u1} X (Monoid.toMulOneClass.{u1} X (CommMonoid.toMonoid.{u1} X _inst_1))) (MulOneClass.toMul.{u1} Y (Monoid.toMulOneClass.{u1} Y (CommMonoid.toMonoid.{u1} Y _inst_2)))) -> (CategoryTheory.Iso.{u1, succ u1} CommMonCat.{u1} CommMonCat.largeCategory.{u1} (CommMonCat.of.{u1} X _inst_1) (CommMonCat.of.{u1} Y _inst_2))
+  forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : CommMonoid.{u1} X] [_inst_2 : CommMonoid.{u1} Y], (MulEquiv.{u1, u1} X Y (MulOneClass.toMul.{u1} X (Monoid.toMulOneClass.{u1} X (CommMonoid.toMonoid.{u1} X _inst_1))) (MulOneClass.toMul.{u1} Y (Monoid.toMulOneClass.{u1} Y (CommMonoid.toMonoid.{u1} Y _inst_2)))) -> (CategoryTheory.Iso.{u1, succ u1} CommMonCat.{u1} instCommMonCatLargeCategory.{u1} (CommMonCat.of.{u1} X _inst_1) (CommMonCat.of.{u1} Y _inst_2))
 Case conversion may be inaccurate. Consider using '#align mul_equiv.to_CommMon_iso MulEquiv.toCommMonCatIsoₓ'. -/
 /-- Build an isomorphism in the category `CommMon` from a `mul_equiv` between `comm_monoid`s. -/
 @[to_additive AddEquiv.toAddCommMonCatIso
@@ -278,7 +278,7 @@ namespace CategoryTheory.Iso
 lean 3 declaration is
   forall {X : MonCat.{u1}} {Y : MonCat.{u1}}, (CategoryTheory.Iso.{u1, succ u1} MonCat.{u1} MonCat.largeCategory.{u1} X Y) -> (MulEquiv.{u1, u1} (coeSort.{succ (succ u1), succ (succ u1)} MonCat.{u1} Type.{u1} MonCat.hasCoeToSort.{u1} X) (coeSort.{succ (succ u1), succ (succ u1)} MonCat.{u1} Type.{u1} MonCat.hasCoeToSort.{u1} Y) (MulOneClass.toHasMul.{u1} (coeSort.{succ (succ u1), succ (succ u1)} MonCat.{u1} Type.{u1} MonCat.hasCoeToSort.{u1} X) (Monoid.toMulOneClass.{u1} (coeSort.{succ (succ u1), succ (succ u1)} MonCat.{u1} Type.{u1} MonCat.hasCoeToSort.{u1} X) (MonCat.monoid.{u1} X))) (MulOneClass.toHasMul.{u1} (coeSort.{succ (succ u1), succ (succ u1)} MonCat.{u1} Type.{u1} MonCat.hasCoeToSort.{u1} Y) (Monoid.toMulOneClass.{u1} (coeSort.{succ (succ u1), succ (succ u1)} MonCat.{u1} Type.{u1} MonCat.hasCoeToSort.{u1} Y) (MonCat.monoid.{u1} Y))))
 but is expected to have type
-  forall {X : MonCat.{u1}} {Y : MonCat.{u1}}, (CategoryTheory.Iso.{u1, succ u1} MonCat.{u1} MonCat.largeCategory.{u1} X Y) -> (MulEquiv.{u1, u1} (CoeSort.coe.{succ (succ u1), succ (succ u1)} MonCat.{u1} Type.{u1} MonCat.instCoeSortMonCatType.{u1} X) (CoeSort.coe.{succ (succ u1), succ (succ u1)} MonCat.{u1} Type.{u1} MonCat.instCoeSortMonCatType.{u1} Y) (MulOneClass.toMul.{u1} (CoeSort.coe.{succ (succ u1), succ (succ u1)} MonCat.{u1} Type.{u1} MonCat.instCoeSortMonCatType.{u1} X) (Monoid.toMulOneClass.{u1} (CoeSort.coe.{succ (succ u1), succ (succ u1)} MonCat.{u1} Type.{u1} MonCat.instCoeSortMonCatType.{u1} X) (MonCat.instMonoidCoeMonCatTypeInstCoeSortMonCatType.{u1} X))) (MulOneClass.toMul.{u1} (CoeSort.coe.{succ (succ u1), succ (succ u1)} MonCat.{u1} Type.{u1} MonCat.instCoeSortMonCatType.{u1} Y) (Monoid.toMulOneClass.{u1} (CoeSort.coe.{succ (succ u1), succ (succ u1)} MonCat.{u1} Type.{u1} MonCat.instCoeSortMonCatType.{u1} Y) (MonCat.instMonoidCoeMonCatTypeInstCoeSortMonCatType.{u1} Y))))
+  forall {X : MonCat.{u1}} {Y : MonCat.{u1}}, (CategoryTheory.Iso.{u1, succ u1} MonCat.{u1} instMonCatLargeCategory.{u1} X Y) -> (MulEquiv.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} X) (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} Y) (MulOneClass.toMul.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} X) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} X) (MonCat.instMonoidα.{u1} X))) (MulOneClass.toMul.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} Y) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} Monoid.{u1} Y) (MonCat.instMonoidα.{u1} Y))))
 Case conversion may be inaccurate. Consider using '#align category_theory.iso.Mon_iso_to_mul_equiv CategoryTheory.Iso.monCatIsoToMulEquivₓ'. -/
 /-- Build a `mul_equiv` from an isomorphism in the category `Mon`. -/
 @[to_additive AddMon_iso_to_add_equiv
@@ -292,7 +292,7 @@ def monCatIsoToMulEquiv {X Y : MonCat} (i : X ≅ Y) : X ≃* Y :=
 lean 3 declaration is
   forall {X : CommMonCat.{u1}} {Y : CommMonCat.{u1}}, (CategoryTheory.Iso.{u1, succ u1} CommMonCat.{u1} CommMonCat.largeCategory.{u1} X Y) -> (MulEquiv.{u1, u1} (coeSort.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.hasCoeToSort.{u1} X) (coeSort.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.hasCoeToSort.{u1} Y) (MulOneClass.toHasMul.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.hasCoeToSort.{u1} X) (Monoid.toMulOneClass.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.hasCoeToSort.{u1} X) (CommMonoid.toMonoid.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.hasCoeToSort.{u1} X) (CommMonCat.commMonoid.{u1} X)))) (MulOneClass.toHasMul.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.hasCoeToSort.{u1} Y) (Monoid.toMulOneClass.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.hasCoeToSort.{u1} Y) (CommMonoid.toMonoid.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.hasCoeToSort.{u1} Y) (CommMonCat.commMonoid.{u1} Y)))))
 but is expected to have type
-  forall {X : CommMonCat.{u1}} {Y : CommMonCat.{u1}}, (CategoryTheory.Iso.{u1, succ u1} CommMonCat.{u1} CommMonCat.largeCategory.{u1} X Y) -> (MulEquiv.{u1, u1} (CoeSort.coe.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.instCoeSortCommMonCatType.{u1} X) (CoeSort.coe.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.instCoeSortCommMonCatType.{u1} Y) (MulOneClass.toMul.{u1} (CoeSort.coe.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.instCoeSortCommMonCatType.{u1} X) (Monoid.toMulOneClass.{u1} (CoeSort.coe.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.instCoeSortCommMonCatType.{u1} X) (CommMonoid.toMonoid.{u1} (CoeSort.coe.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.instCoeSortCommMonCatType.{u1} X) (CommMonCat.instCommMonoidCoeCommMonCatTypeInstCoeSortCommMonCatType.{u1} X)))) (MulOneClass.toMul.{u1} (CoeSort.coe.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.instCoeSortCommMonCatType.{u1} Y) (Monoid.toMulOneClass.{u1} (CoeSort.coe.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.instCoeSortCommMonCatType.{u1} Y) (CommMonoid.toMonoid.{u1} (CoeSort.coe.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.instCoeSortCommMonCatType.{u1} Y) (CommMonCat.instCommMonoidCoeCommMonCatTypeInstCoeSortCommMonCatType.{u1} Y)))))
+  forall {X : CommMonCat.{u1}} {Y : CommMonCat.{u1}}, (CategoryTheory.Iso.{u1, succ u1} CommMonCat.{u1} instCommMonCatLargeCategory.{u1} X Y) -> (MulEquiv.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} CommMonoid.{u1} X) (CategoryTheory.Bundled.α.{u1, u1} CommMonoid.{u1} Y) (MulOneClass.toMul.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommMonoid.{u1} X) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommMonoid.{u1} X) (CommMonoid.toMonoid.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommMonoid.{u1} X) (CommMonCat.instCommMonoidα.{u1} X)))) (MulOneClass.toMul.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommMonoid.{u1} Y) (Monoid.toMulOneClass.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommMonoid.{u1} Y) (CommMonoid.toMonoid.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommMonoid.{u1} Y) (CommMonCat.instCommMonoidα.{u1} Y)))))
 Case conversion may be inaccurate. Consider using '#align category_theory.iso.CommMon_iso_to_mul_equiv CategoryTheory.Iso.commMonCatIsoToMulEquivₓ'. -/
 /-- Build a `mul_equiv` from an isomorphism in the category `CommMon`. -/
 @[to_additive "Build an `add_equiv` from an isomorphism in the category\n`AddCommMon`."]
@@ -307,7 +307,7 @@ end CategoryTheory.Iso
 lean 3 declaration is
   forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : Monoid.{u1} X] [_inst_2 : Monoid.{u1} Y], CategoryTheory.Iso.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1} (MulEquiv.{u1, u1} X Y (MulOneClass.toHasMul.{u1} X (Monoid.toMulOneClass.{u1} X _inst_1)) (MulOneClass.toHasMul.{u1} Y (Monoid.toMulOneClass.{u1} Y _inst_2))) (CategoryTheory.Iso.{u1, succ u1} MonCat.{u1} MonCat.largeCategory.{u1} (MonCat.of.{u1} X _inst_1) (MonCat.of.{u1} Y _inst_2))
 but is expected to have type
-  forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : Monoid.{u1} X] [_inst_2 : Monoid.{u1} Y], CategoryTheory.Iso.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1} (MulEquiv.{u1, u1} X Y (MulOneClass.toMul.{u1} X (Monoid.toMulOneClass.{u1} X _inst_1)) (MulOneClass.toMul.{u1} Y (Monoid.toMulOneClass.{u1} Y _inst_2))) (CategoryTheory.Iso.{u1, succ u1} MonCat.{u1} MonCat.largeCategory.{u1} (MonCat.of.{u1} X _inst_1) (MonCat.of.{u1} Y _inst_2))
+  forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : Monoid.{u1} X] [_inst_2 : Monoid.{u1} Y], CategoryTheory.Iso.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1} (MulEquiv.{u1, u1} X Y (MulOneClass.toMul.{u1} X (Monoid.toMulOneClass.{u1} X _inst_1)) (MulOneClass.toMul.{u1} Y (Monoid.toMulOneClass.{u1} Y _inst_2))) (CategoryTheory.Iso.{u1, succ u1} MonCat.{u1} instMonCatLargeCategory.{u1} (MonCat.of.{u1} X _inst_1) (MonCat.of.{u1} Y _inst_2))
 Case conversion may be inaccurate. Consider using '#align mul_equiv_iso_Mon_iso mulEquivIsoMonCatIsoₓ'. -/
 /-- multiplicative equivalences between `monoid`s are the same as (isomorphic to) isomorphisms
 in `Mon` -/
@@ -324,7 +324,7 @@ def mulEquivIsoMonCatIso {X Y : Type u} [Monoid X] [Monoid Y] : X ≃* Y ≅ Mon
 lean 3 declaration is
   forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : CommMonoid.{u1} X] [_inst_2 : CommMonoid.{u1} Y], CategoryTheory.Iso.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1} (MulEquiv.{u1, u1} X Y (MulOneClass.toHasMul.{u1} X (Monoid.toMulOneClass.{u1} X (CommMonoid.toMonoid.{u1} X _inst_1))) (MulOneClass.toHasMul.{u1} Y (Monoid.toMulOneClass.{u1} Y (CommMonoid.toMonoid.{u1} Y _inst_2)))) (CategoryTheory.Iso.{u1, succ u1} CommMonCat.{u1} CommMonCat.largeCategory.{u1} (CommMonCat.of.{u1} X _inst_1) (CommMonCat.of.{u1} Y _inst_2))
 but is expected to have type
-  forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : CommMonoid.{u1} X] [_inst_2 : CommMonoid.{u1} Y], CategoryTheory.Iso.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1} (MulEquiv.{u1, u1} X Y (MulOneClass.toMul.{u1} X (Monoid.toMulOneClass.{u1} X (CommMonoid.toMonoid.{u1} X _inst_1))) (MulOneClass.toMul.{u1} Y (Monoid.toMulOneClass.{u1} Y (CommMonoid.toMonoid.{u1} Y _inst_2)))) (CategoryTheory.Iso.{u1, succ u1} CommMonCat.{u1} CommMonCat.largeCategory.{u1} (CommMonCat.of.{u1} X _inst_1) (CommMonCat.of.{u1} Y _inst_2))
+  forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : CommMonoid.{u1} X] [_inst_2 : CommMonoid.{u1} Y], CategoryTheory.Iso.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1} (MulEquiv.{u1, u1} X Y (MulOneClass.toMul.{u1} X (Monoid.toMulOneClass.{u1} X (CommMonoid.toMonoid.{u1} X _inst_1))) (MulOneClass.toMul.{u1} Y (Monoid.toMulOneClass.{u1} Y (CommMonoid.toMonoid.{u1} Y _inst_2)))) (CategoryTheory.Iso.{u1, succ u1} CommMonCat.{u1} instCommMonCatLargeCategory.{u1} (CommMonCat.of.{u1} X _inst_1) (CommMonCat.of.{u1} Y _inst_2))
 Case conversion may be inaccurate. Consider using '#align mul_equiv_iso_CommMon_iso mulEquivIsoCommMonCatIsoₓ'. -/
 /-- multiplicative equivalences between `comm_monoid`s are the same as (isomorphic to) isomorphisms
 in `CommMon` -/
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Scott Morrison
 
 ! This file was ported from Lean 3 source module algebra.category.Mon.basic
-! leanprover-community/mathlib commit c085f3044fe585c575e322bfab45b3633c48d820
+! leanprover-community/mathlib commit 0caf3701139ef2e69c215717665361cda205a90b
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -129,6 +129,9 @@ theorem coe_of (R : Type u) [Monoid R] : (MonCat.of R : Type u) = R :=
 #align AddMon.coe_of AddMonCat.coe_of
 -/
 
+@[to_additive]
+instance {G : Type _} [Group G] : Group (MonCat.of G) := by assumption
+
 end MonCat
 
 #print CommMonCat /-
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Scott Morrison
 
 ! This file was ported from Lean 3 source module algebra.category.Mon.basic
-! leanprover-community/mathlib commit 4125b9adf2e268d1cf438092d690a78f7c664743
+! leanprover-community/mathlib commit c085f3044fe585c575e322bfab45b3633c48d820
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -15,6 +15,9 @@ import Mathbin.CategoryTheory.Functor.ReflectsIsomorphisms
 /-!
 # Category instances for monoid, add_monoid, comm_monoid, and add_comm_monoid.
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 We introduce the bundled categories:
 * `Mon`
 * `AddMon`
Diff
@@ -28,70 +28,86 @@ universe u v
 
 open CategoryTheory
 
+#print MonCat /-
 /-- The category of monoids and monoid morphisms. -/
-@[to_additive AddMon]
-def Mon : Type (u + 1) :=
+@[to_additive AddMonCat]
+def MonCat : Type (u + 1) :=
   Bundled Monoid
-#align Mon Mon
-#align AddMon AddMon
+#align Mon MonCat
+#align AddMon AddMonCat
+-/
 
 /-- The category of additive monoids and monoid morphisms. -/
-add_decl_doc AddMon
+add_decl_doc AddMonCat
 
-namespace Mon
+namespace MonCat
 
+#print MonCat.AssocMonoidHom /-
 /-- `monoid_hom` doesn't actually assume associativity. This alias is needed to make the category
 theory machinery work. -/
 @[to_additive
       "`add_monoid_hom` doesn't actually assume associativity. This alias is needed to make\nthe category theory machinery work."]
 abbrev AssocMonoidHom (M N : Type _) [Monoid M] [Monoid N] :=
   MonoidHom M N
-#align Mon.assoc_monoid_hom Mon.AssocMonoidHom
-#align AddMon.assoc_add_monoid_hom AddMon.AssocAddMonoidHom
+#align Mon.assoc_monoid_hom MonCat.AssocMonoidHom
+#align AddMon.assoc_add_monoid_hom AddMonCat.AssocAddMonoidHom
+-/
 
+#print MonCat.bundledHom /-
 @[to_additive]
 instance bundledHom : BundledHom AssocMonoidHom :=
   ⟨fun M N [Monoid M] [Monoid N] => @MonoidHom.toFun M N _ _, fun M [Monoid M] => @MonoidHom.id M _,
     fun M N P [Monoid M] [Monoid N] [Monoid P] => @MonoidHom.comp M N P _ _ _,
     fun M N [Monoid M] [Monoid N] => @MonoidHom.coe_inj M N _ _⟩
-#align Mon.bundled_hom Mon.bundledHom
-#align AddMon.bundled_hom AddMon.bundledHom
+#align Mon.bundled_hom MonCat.bundledHom
+#align AddMon.bundled_hom AddMonCat.bundledHom
+-/
 
-deriving instance LargeCategory, ConcreteCategory for Mon
+deriving instance LargeCategory, ConcreteCategory for MonCat
 
-attribute [to_additive] Mon.largeCategory Mon.concreteCategory
+attribute [to_additive] MonCat.largeCategory MonCat.concreteCategory
 
 @[to_additive]
-instance : CoeSort Mon (Type _) :=
+instance : CoeSort MonCat (Type _) :=
   Bundled.hasCoeToSort
 
+#print MonCat.of /-
 /-- Construct a bundled `Mon` from the underlying type and typeclass. -/
 @[to_additive]
-def of (M : Type u) [Monoid M] : Mon :=
+def of (M : Type u) [Monoid M] : MonCat :=
   Bundled.of M
-#align Mon.of Mon.of
-#align AddMon.of AddMon.of
+#align Mon.of MonCat.of
+#align AddMon.of AddMonCat.of
+-/
 
 /-- Construct a bundled `Mon` from the underlying type and typeclass. -/
-add_decl_doc AddMon.of
+add_decl_doc AddMonCat.of
 
+#print MonCat.ofHom /-
 /-- Typecheck a `monoid_hom` as a morphism in `Mon`. -/
 @[to_additive]
 def ofHom {X Y : Type u} [Monoid X] [Monoid Y] (f : X →* Y) : of X ⟶ of Y :=
   f
-#align Mon.of_hom Mon.ofHom
-#align AddMon.of_hom AddMon.ofHom
+#align Mon.of_hom MonCat.ofHom
+#align AddMon.of_hom AddMonCat.ofHom
+-/
 
 /-- Typecheck a `add_monoid_hom` as a morphism in `AddMon`. -/
-add_decl_doc AddMon.ofHom
-
+add_decl_doc AddMonCat.ofHom
+
+/- warning: Mon.of_hom_apply -> MonCat.ofHom_apply is a dubious translation:
+lean 3 declaration is
+  forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : Monoid.{u1} X] [_inst_2 : Monoid.{u1} Y] (f : MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) (x : X), Eq.{succ u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} Y _inst_2)) (coeFn.{succ u1, succ u1} (Quiver.Hom.{succ u1, succ u1} MonCat.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} MonCat.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} MonCat.{u1} MonCat.largeCategory.{u1})) (MonCat.of.{u1} X _inst_1) (MonCat.of.{u1} Y _inst_2)) (fun (_x : MonoidHom.{u1, u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} X _inst_1)) (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} Y _inst_2)) (Monoid.toMulOneClass.{u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} X _inst_1)) (CategoryTheory.Bundled.str.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1))) (Monoid.toMulOneClass.{u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} Y _inst_2)) (CategoryTheory.Bundled.str.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)))) => (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} X _inst_1)) -> (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} Y _inst_2))) (MonoidHom.hasCoeToFun.{u1, u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} X _inst_1)) (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} Y _inst_2)) (Monoid.toMulOneClass.{u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} X _inst_1)) (CategoryTheory.Bundled.str.{u1, u1} Monoid.{u1} (MonCat.of.{u1} X _inst_1))) (Monoid.toMulOneClass.{u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Monoid.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Monoid.{u1}) (MonCat.of.{u1} Y _inst_2)) (CategoryTheory.Bundled.str.{u1, u1} Monoid.{u1} (MonCat.of.{u1} Y _inst_2)))) (MonCat.ofHom.{u1} X Y _inst_1 _inst_2 f) x) (coeFn.{succ u1, succ u1} (MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) (fun (_x : MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) => X -> Y) (MonoidHom.hasCoeToFun.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) f x)
+but is expected to have type
+  forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : Monoid.{u1} X] [_inst_2 : Monoid.{u1} Y] (f : MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) (x : X), Eq.{succ u1} (Prefunctor.obj.{succ u1, succ u1, succ u1, succ u1} MonCat.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} MonCat.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} MonCat.{u1} MonCat.largeCategory.{u1})) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u1, u1, succ u1, succ u1} MonCat.{u1} MonCat.largeCategory.{u1} Type.{u1} CategoryTheory.types.{u1} (CategoryTheory.forget.{succ u1, u1, u1} MonCat.{u1} MonCat.largeCategory.{u1} MonCat.concreteCategory.{u1})) (MonCat.of.{u1} Y _inst_2)) (Prefunctor.map.{succ u1, succ u1, succ u1, succ u1} MonCat.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} MonCat.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} MonCat.{u1} MonCat.largeCategory.{u1})) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u1, u1, succ u1, succ u1} MonCat.{u1} MonCat.largeCategory.{u1} Type.{u1} CategoryTheory.types.{u1} (CategoryTheory.forget.{succ u1, u1, u1} MonCat.{u1} MonCat.largeCategory.{u1} MonCat.concreteCategory.{u1})) (MonCat.of.{u1} X _inst_1) (MonCat.of.{u1} Y _inst_2) (MonCat.ofHom.{u1} X Y _inst_1 _inst_2 f) x) (FunLike.coe.{succ u1, succ u1, succ u1} (MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) X (fun (_x : X) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : X) => Y) _x) (MulHomClass.toFunLike.{u1, u1, u1} (MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) X Y (MulOneClass.toMul.{u1} X (Monoid.toMulOneClass.{u1} X _inst_1)) (MulOneClass.toMul.{u1} Y (Monoid.toMulOneClass.{u1} Y _inst_2)) (MonoidHomClass.toMulHomClass.{u1, u1, u1} (MonoidHom.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)) X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2) (MonoidHom.monoidHomClass.{u1, u1} X Y (Monoid.toMulOneClass.{u1} X _inst_1) (Monoid.toMulOneClass.{u1} Y _inst_2)))) f x)
+Case conversion may be inaccurate. Consider using '#align Mon.of_hom_apply MonCat.ofHom_applyₓ'. -/
 @[simp]
 theorem ofHom_apply {X Y : Type u} [Monoid X] [Monoid Y] (f : X →* Y) (x : X) : ofHom f x = f x :=
   rfl
-#align Mon.of_hom_apply Mon.ofHom_apply
+#align Mon.of_hom_apply MonCat.ofHom_apply
 
 @[to_additive]
-instance : Inhabited Mon :=
+instance : Inhabited MonCat :=
   ⟨-- The default instance for `monoid punit` is derived via `punit.comm_ring`,
         -- which breaks to_additive.
         @of
@@ -99,53 +115,59 @@ instance : Inhabited Mon :=
       @Group.toMonoid _ <| @CommGroup.toGroup _ PUnit.commGroup⟩
 
 @[to_additive]
-instance (M : Mon) : Monoid M :=
+instance (M : MonCat) : Monoid M :=
   M.str
 
+#print MonCat.coe_of /-
 @[simp, to_additive]
-theorem coe_of (R : Type u) [Monoid R] : (Mon.of R : Type u) = R :=
+theorem coe_of (R : Type u) [Monoid R] : (MonCat.of R : Type u) = R :=
   rfl
-#align Mon.coe_of Mon.coe_of
-#align AddMon.coe_of AddMon.coe_of
+#align Mon.coe_of MonCat.coe_of
+#align AddMon.coe_of AddMonCat.coe_of
+-/
 
-end Mon
+end MonCat
 
+#print CommMonCat /-
 /-- The category of commutative monoids and monoid morphisms. -/
-@[to_additive AddCommMon]
-def CommMon : Type (u + 1) :=
+@[to_additive AddCommMonCat]
+def CommMonCat : Type (u + 1) :=
   Bundled CommMonoid
-#align CommMon CommMon
-#align AddCommMon AddCommMon
+#align CommMon CommMonCat
+#align AddCommMon AddCommMonCat
+-/
 
 /-- The category of additive commutative monoids and monoid morphisms. -/
-add_decl_doc AddCommMon
+add_decl_doc AddCommMonCat
 
-namespace CommMon
+namespace CommMonCat
 
 @[to_additive]
 instance : BundledHom.ParentProjection CommMonoid.toMonoid :=
   ⟨⟩
 
-deriving instance LargeCategory, ConcreteCategory for CommMon
+deriving instance LargeCategory, ConcreteCategory for CommMonCat
 
-attribute [to_additive] CommMon.largeCategory CommMon.concreteCategory
+attribute [to_additive] CommMonCat.largeCategory CommMonCat.concreteCategory
 
 @[to_additive]
-instance : CoeSort CommMon (Type _) :=
+instance : CoeSort CommMonCat (Type _) :=
   Bundled.hasCoeToSort
 
+#print CommMonCat.of /-
 /-- Construct a bundled `CommMon` from the underlying type and typeclass. -/
 @[to_additive]
-def of (M : Type u) [CommMonoid M] : CommMon :=
+def of (M : Type u) [CommMonoid M] : CommMonCat :=
   Bundled.of M
-#align CommMon.of CommMon.of
-#align AddCommMon.of AddCommMon.of
+#align CommMon.of CommMonCat.of
+#align AddCommMon.of AddCommMonCat.of
+-/
 
 /-- Construct a bundled `AddCommMon` from the underlying type and typeclass. -/
-add_decl_doc AddCommMon.of
+add_decl_doc AddCommMonCat.of
 
 @[to_additive]
-instance : Inhabited CommMon :=
+instance : Inhabited CommMonCat :=
   ⟨-- The default instance for `comm_monoid punit` is derived via `punit.comm_ring`,
         -- which breaks to_additive.
         @of
@@ -153,37 +175,41 @@ instance : Inhabited CommMon :=
       @CommGroup.toCommMonoid _ PUnit.commGroup⟩
 
 @[to_additive]
-instance (M : CommMon) : CommMonoid M :=
+instance (M : CommMonCat) : CommMonoid M :=
   M.str
 
+#print CommMonCat.coe_of /-
 @[simp, to_additive]
-theorem coe_of (R : Type u) [CommMonoid R] : (CommMon.of R : Type u) = R :=
+theorem coe_of (R : Type u) [CommMonoid R] : (CommMonCat.of R : Type u) = R :=
   rfl
-#align CommMon.coe_of CommMon.coe_of
-#align AddCommMon.coe_of AddCommMon.coe_of
+#align CommMon.coe_of CommMonCat.coe_of
+#align AddCommMon.coe_of AddCommMonCat.coe_of
+-/
 
+#print CommMonCat.hasForgetToMonCat /-
 @[to_additive has_forget_to_AddMon]
-instance hasForgetToMon : HasForget₂ CommMon Mon :=
+instance hasForgetToMonCat : HasForget₂ CommMonCat MonCat :=
   BundledHom.forget₂ _ _
-#align CommMon.has_forget_to_Mon CommMon.hasForgetToMon
-#align AddCommMon.has_forget_to_AddMon AddCommMon.hasForgetToAddMon
+#align CommMon.has_forget_to_Mon CommMonCat.hasForgetToMonCat
+#align AddCommMon.has_forget_to_AddMon AddCommMonCat.hasForgetToAddMonCat
+-/
 
 @[to_additive]
-instance : Coe CommMon.{u} Mon.{u} where coe := (forget₂ CommMon Mon).obj
+instance : Coe CommMonCat.{u} MonCat.{u} where coe := (forget₂ CommMonCat MonCat).obj
 
-end CommMon
+end CommMonCat
 
 -- We verify that the coercions of morphisms to functions work correctly:
-example {R S : Mon} (f : R ⟶ S) : (R : Type) → (S : Type) :=
+example {R S : MonCat} (f : R ⟶ S) : (R : Type) → (S : Type) :=
   f
 
-example {R S : CommMon} (f : R ⟶ S) : (R : Type) → (S : Type) :=
+example {R S : CommMonCat} (f : R ⟶ S) : (R : Type) → (S : Type) :=
   f
 
 -- We verify that when constructing a morphism in `CommMon`,
 -- when we construct the `to_fun` field, the types are presented as `↥R`,
 -- rather than `R.α` or (as we used to have) `↥(bundled.map comm_monoid.to_monoid R)`.
-example (R : CommMon.{u}) : R ⟶ R :=
+example (R : CommMonCat.{u}) : R ⟶ R :=
   { toFun := fun x => by
       match_target(R : Type u)
       match_hyp x : (R : Type u)
@@ -198,16 +224,22 @@ section
 
 variable [Monoid X] [Monoid Y]
 
+/- warning: mul_equiv.to_Mon_iso -> MulEquiv.toMonCatIso is a dubious translation:
+lean 3 declaration is
+  forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : Monoid.{u1} X] [_inst_2 : Monoid.{u1} Y], (MulEquiv.{u1, u1} X Y (MulOneClass.toHasMul.{u1} X (Monoid.toMulOneClass.{u1} X _inst_1)) (MulOneClass.toHasMul.{u1} Y (Monoid.toMulOneClass.{u1} Y _inst_2))) -> (CategoryTheory.Iso.{u1, succ u1} MonCat.{u1} MonCat.largeCategory.{u1} (MonCat.of.{u1} X _inst_1) (MonCat.of.{u1} Y _inst_2))
+but is expected to have type
+  forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : Monoid.{u1} X] [_inst_2 : Monoid.{u1} Y], (MulEquiv.{u1, u1} X Y (MulOneClass.toMul.{u1} X (Monoid.toMulOneClass.{u1} X _inst_1)) (MulOneClass.toMul.{u1} Y (Monoid.toMulOneClass.{u1} Y _inst_2))) -> (CategoryTheory.Iso.{u1, succ u1} MonCat.{u1} MonCat.largeCategory.{u1} (MonCat.of.{u1} X _inst_1) (MonCat.of.{u1} Y _inst_2))
+Case conversion may be inaccurate. Consider using '#align mul_equiv.to_Mon_iso MulEquiv.toMonCatIsoₓ'. -/
 /-- Build an isomorphism in the category `Mon` from a `mul_equiv` between `monoid`s. -/
-@[to_additive AddEquiv.toAddMonIso
+@[to_additive AddEquiv.toAddMonCatIso
       "Build an isomorphism in the category `AddMon` from\nan `add_equiv` between `add_monoid`s.",
   simps]
-def MulEquiv.toMonIso (e : X ≃* Y) : Mon.of X ≅ Mon.of Y
+def MulEquiv.toMonCatIso (e : X ≃* Y) : MonCat.of X ≅ MonCat.of Y
     where
   Hom := e.toMonoidHom
   inv := e.symm.toMonoidHom
-#align mul_equiv.to_Mon_iso MulEquiv.toMonIso
-#align add_equiv.to_AddMon_iso AddEquiv.toAddMonIso
+#align mul_equiv.to_Mon_iso MulEquiv.toMonCatIso
+#align add_equiv.to_AddMon_iso AddEquiv.toAddMonCatIso
 
 end
 
@@ -215,80 +247,114 @@ section
 
 variable [CommMonoid X] [CommMonoid Y]
 
+/- warning: mul_equiv.to_CommMon_iso -> MulEquiv.toCommMonCatIso is a dubious translation:
+lean 3 declaration is
+  forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : CommMonoid.{u1} X] [_inst_2 : CommMonoid.{u1} Y], (MulEquiv.{u1, u1} X Y (MulOneClass.toHasMul.{u1} X (Monoid.toMulOneClass.{u1} X (CommMonoid.toMonoid.{u1} X _inst_1))) (MulOneClass.toHasMul.{u1} Y (Monoid.toMulOneClass.{u1} Y (CommMonoid.toMonoid.{u1} Y _inst_2)))) -> (CategoryTheory.Iso.{u1, succ u1} CommMonCat.{u1} CommMonCat.largeCategory.{u1} (CommMonCat.of.{u1} X _inst_1) (CommMonCat.of.{u1} Y _inst_2))
+but is expected to have type
+  forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : CommMonoid.{u1} X] [_inst_2 : CommMonoid.{u1} Y], (MulEquiv.{u1, u1} X Y (MulOneClass.toMul.{u1} X (Monoid.toMulOneClass.{u1} X (CommMonoid.toMonoid.{u1} X _inst_1))) (MulOneClass.toMul.{u1} Y (Monoid.toMulOneClass.{u1} Y (CommMonoid.toMonoid.{u1} Y _inst_2)))) -> (CategoryTheory.Iso.{u1, succ u1} CommMonCat.{u1} CommMonCat.largeCategory.{u1} (CommMonCat.of.{u1} X _inst_1) (CommMonCat.of.{u1} Y _inst_2))
+Case conversion may be inaccurate. Consider using '#align mul_equiv.to_CommMon_iso MulEquiv.toCommMonCatIsoₓ'. -/
 /-- Build an isomorphism in the category `CommMon` from a `mul_equiv` between `comm_monoid`s. -/
-@[to_additive AddEquiv.toAddCommMonIso
+@[to_additive AddEquiv.toAddCommMonCatIso
       "Build an isomorphism in the category `AddCommMon`\nfrom an `add_equiv` between `add_comm_monoid`s.",
   simps]
-def MulEquiv.toCommMonIso (e : X ≃* Y) : CommMon.of X ≅ CommMon.of Y
+def MulEquiv.toCommMonCatIso (e : X ≃* Y) : CommMonCat.of X ≅ CommMonCat.of Y
     where
   Hom := e.toMonoidHom
   inv := e.symm.toMonoidHom
-#align mul_equiv.to_CommMon_iso MulEquiv.toCommMonIso
-#align add_equiv.to_AddCommMon_iso AddEquiv.toAddCommMonIso
+#align mul_equiv.to_CommMon_iso MulEquiv.toCommMonCatIso
+#align add_equiv.to_AddCommMon_iso AddEquiv.toAddCommMonCatIso
 
 end
 
 namespace CategoryTheory.Iso
 
+/- warning: category_theory.iso.Mon_iso_to_mul_equiv -> CategoryTheory.Iso.monCatIsoToMulEquiv is a dubious translation:
+lean 3 declaration is
+  forall {X : MonCat.{u1}} {Y : MonCat.{u1}}, (CategoryTheory.Iso.{u1, succ u1} MonCat.{u1} MonCat.largeCategory.{u1} X Y) -> (MulEquiv.{u1, u1} (coeSort.{succ (succ u1), succ (succ u1)} MonCat.{u1} Type.{u1} MonCat.hasCoeToSort.{u1} X) (coeSort.{succ (succ u1), succ (succ u1)} MonCat.{u1} Type.{u1} MonCat.hasCoeToSort.{u1} Y) (MulOneClass.toHasMul.{u1} (coeSort.{succ (succ u1), succ (succ u1)} MonCat.{u1} Type.{u1} MonCat.hasCoeToSort.{u1} X) (Monoid.toMulOneClass.{u1} (coeSort.{succ (succ u1), succ (succ u1)} MonCat.{u1} Type.{u1} MonCat.hasCoeToSort.{u1} X) (MonCat.monoid.{u1} X))) (MulOneClass.toHasMul.{u1} (coeSort.{succ (succ u1), succ (succ u1)} MonCat.{u1} Type.{u1} MonCat.hasCoeToSort.{u1} Y) (Monoid.toMulOneClass.{u1} (coeSort.{succ (succ u1), succ (succ u1)} MonCat.{u1} Type.{u1} MonCat.hasCoeToSort.{u1} Y) (MonCat.monoid.{u1} Y))))
+but is expected to have type
+  forall {X : MonCat.{u1}} {Y : MonCat.{u1}}, (CategoryTheory.Iso.{u1, succ u1} MonCat.{u1} MonCat.largeCategory.{u1} X Y) -> (MulEquiv.{u1, u1} (CoeSort.coe.{succ (succ u1), succ (succ u1)} MonCat.{u1} Type.{u1} MonCat.instCoeSortMonCatType.{u1} X) (CoeSort.coe.{succ (succ u1), succ (succ u1)} MonCat.{u1} Type.{u1} MonCat.instCoeSortMonCatType.{u1} Y) (MulOneClass.toMul.{u1} (CoeSort.coe.{succ (succ u1), succ (succ u1)} MonCat.{u1} Type.{u1} MonCat.instCoeSortMonCatType.{u1} X) (Monoid.toMulOneClass.{u1} (CoeSort.coe.{succ (succ u1), succ (succ u1)} MonCat.{u1} Type.{u1} MonCat.instCoeSortMonCatType.{u1} X) (MonCat.instMonoidCoeMonCatTypeInstCoeSortMonCatType.{u1} X))) (MulOneClass.toMul.{u1} (CoeSort.coe.{succ (succ u1), succ (succ u1)} MonCat.{u1} Type.{u1} MonCat.instCoeSortMonCatType.{u1} Y) (Monoid.toMulOneClass.{u1} (CoeSort.coe.{succ (succ u1), succ (succ u1)} MonCat.{u1} Type.{u1} MonCat.instCoeSortMonCatType.{u1} Y) (MonCat.instMonoidCoeMonCatTypeInstCoeSortMonCatType.{u1} Y))))
+Case conversion may be inaccurate. Consider using '#align category_theory.iso.Mon_iso_to_mul_equiv CategoryTheory.Iso.monCatIsoToMulEquivₓ'. -/
 /-- Build a `mul_equiv` from an isomorphism in the category `Mon`. -/
 @[to_additive AddMon_iso_to_add_equiv
       "Build an `add_equiv` from an isomorphism in the category\n`AddMon`."]
-def monIsoToMulEquiv {X Y : Mon} (i : X ≅ Y) : X ≃* Y :=
+def monCatIsoToMulEquiv {X Y : MonCat} (i : X ≅ Y) : X ≃* Y :=
   i.Hom.toMulEquiv i.inv i.hom_inv_id i.inv_hom_id
-#align category_theory.iso.Mon_iso_to_mul_equiv CategoryTheory.Iso.monIsoToMulEquiv
-#align category_theory.iso.AddMon_iso_to_add_equiv CategoryTheory.Iso.addMonIsoToAddEquiv
-
+#align category_theory.iso.Mon_iso_to_mul_equiv CategoryTheory.Iso.monCatIsoToMulEquiv
+#align category_theory.iso.AddMon_iso_to_add_equiv CategoryTheory.Iso.addMonCatIsoToAddEquiv
+
+/- warning: category_theory.iso.CommMon_iso_to_mul_equiv -> CategoryTheory.Iso.commMonCatIsoToMulEquiv is a dubious translation:
+lean 3 declaration is
+  forall {X : CommMonCat.{u1}} {Y : CommMonCat.{u1}}, (CategoryTheory.Iso.{u1, succ u1} CommMonCat.{u1} CommMonCat.largeCategory.{u1} X Y) -> (MulEquiv.{u1, u1} (coeSort.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.hasCoeToSort.{u1} X) (coeSort.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.hasCoeToSort.{u1} Y) (MulOneClass.toHasMul.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.hasCoeToSort.{u1} X) (Monoid.toMulOneClass.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.hasCoeToSort.{u1} X) (CommMonoid.toMonoid.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.hasCoeToSort.{u1} X) (CommMonCat.commMonoid.{u1} X)))) (MulOneClass.toHasMul.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.hasCoeToSort.{u1} Y) (Monoid.toMulOneClass.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.hasCoeToSort.{u1} Y) (CommMonoid.toMonoid.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.hasCoeToSort.{u1} Y) (CommMonCat.commMonoid.{u1} Y)))))
+but is expected to have type
+  forall {X : CommMonCat.{u1}} {Y : CommMonCat.{u1}}, (CategoryTheory.Iso.{u1, succ u1} CommMonCat.{u1} CommMonCat.largeCategory.{u1} X Y) -> (MulEquiv.{u1, u1} (CoeSort.coe.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.instCoeSortCommMonCatType.{u1} X) (CoeSort.coe.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.instCoeSortCommMonCatType.{u1} Y) (MulOneClass.toMul.{u1} (CoeSort.coe.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.instCoeSortCommMonCatType.{u1} X) (Monoid.toMulOneClass.{u1} (CoeSort.coe.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.instCoeSortCommMonCatType.{u1} X) (CommMonoid.toMonoid.{u1} (CoeSort.coe.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.instCoeSortCommMonCatType.{u1} X) (CommMonCat.instCommMonoidCoeCommMonCatTypeInstCoeSortCommMonCatType.{u1} X)))) (MulOneClass.toMul.{u1} (CoeSort.coe.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.instCoeSortCommMonCatType.{u1} Y) (Monoid.toMulOneClass.{u1} (CoeSort.coe.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.instCoeSortCommMonCatType.{u1} Y) (CommMonoid.toMonoid.{u1} (CoeSort.coe.{succ (succ u1), succ (succ u1)} CommMonCat.{u1} Type.{u1} CommMonCat.instCoeSortCommMonCatType.{u1} Y) (CommMonCat.instCommMonoidCoeCommMonCatTypeInstCoeSortCommMonCatType.{u1} Y)))))
+Case conversion may be inaccurate. Consider using '#align category_theory.iso.CommMon_iso_to_mul_equiv CategoryTheory.Iso.commMonCatIsoToMulEquivₓ'. -/
 /-- Build a `mul_equiv` from an isomorphism in the category `CommMon`. -/
 @[to_additive "Build an `add_equiv` from an isomorphism in the category\n`AddCommMon`."]
-def commMonIsoToMulEquiv {X Y : CommMon} (i : X ≅ Y) : X ≃* Y :=
+def commMonCatIsoToMulEquiv {X Y : CommMonCat} (i : X ≅ Y) : X ≃* Y :=
   i.Hom.toMulEquiv i.inv i.hom_inv_id i.inv_hom_id
-#align category_theory.iso.CommMon_iso_to_mul_equiv CategoryTheory.Iso.commMonIsoToMulEquiv
-#align category_theory.iso.CommMon_iso_to_add_equiv CategoryTheory.Iso.commMonIsoToAddEquiv
+#align category_theory.iso.CommMon_iso_to_mul_equiv CategoryTheory.Iso.commMonCatIsoToMulEquiv
+#align category_theory.iso.CommMon_iso_to_add_equiv CategoryTheory.Iso.commMonCatIsoToAddEquiv
 
 end CategoryTheory.Iso
 
+/- warning: mul_equiv_iso_Mon_iso -> mulEquivIsoMonCatIso is a dubious translation:
+lean 3 declaration is
+  forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : Monoid.{u1} X] [_inst_2 : Monoid.{u1} Y], CategoryTheory.Iso.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1} (MulEquiv.{u1, u1} X Y (MulOneClass.toHasMul.{u1} X (Monoid.toMulOneClass.{u1} X _inst_1)) (MulOneClass.toHasMul.{u1} Y (Monoid.toMulOneClass.{u1} Y _inst_2))) (CategoryTheory.Iso.{u1, succ u1} MonCat.{u1} MonCat.largeCategory.{u1} (MonCat.of.{u1} X _inst_1) (MonCat.of.{u1} Y _inst_2))
+but is expected to have type
+  forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : Monoid.{u1} X] [_inst_2 : Monoid.{u1} Y], CategoryTheory.Iso.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1} (MulEquiv.{u1, u1} X Y (MulOneClass.toMul.{u1} X (Monoid.toMulOneClass.{u1} X _inst_1)) (MulOneClass.toMul.{u1} Y (Monoid.toMulOneClass.{u1} Y _inst_2))) (CategoryTheory.Iso.{u1, succ u1} MonCat.{u1} MonCat.largeCategory.{u1} (MonCat.of.{u1} X _inst_1) (MonCat.of.{u1} Y _inst_2))
+Case conversion may be inaccurate. Consider using '#align mul_equiv_iso_Mon_iso mulEquivIsoMonCatIsoₓ'. -/
 /-- multiplicative equivalences between `monoid`s are the same as (isomorphic to) isomorphisms
 in `Mon` -/
-@[to_additive addEquivIsoAddMonIso
+@[to_additive addEquivIsoAddMonCatIso
       "additive equivalences between `add_monoid`s are the same\nas (isomorphic to) isomorphisms in `AddMon`"]
-def mulEquivIsoMonIso {X Y : Type u} [Monoid X] [Monoid Y] : X ≃* Y ≅ Mon.of X ≅ Mon.of Y
+def mulEquivIsoMonCatIso {X Y : Type u} [Monoid X] [Monoid Y] : X ≃* Y ≅ MonCat.of X ≅ MonCat.of Y
     where
-  Hom e := e.toMonIso
-  inv i := i.monIsoToMulEquiv
-#align mul_equiv_iso_Mon_iso mulEquivIsoMonIso
-#align add_equiv_iso_AddMon_iso addEquivIsoAddMonIso
-
+  Hom e := e.toMonCatIso
+  inv i := i.monCatIsoToMulEquiv
+#align mul_equiv_iso_Mon_iso mulEquivIsoMonCatIso
+#align add_equiv_iso_AddMon_iso addEquivIsoAddMonCatIso
+
+/- warning: mul_equiv_iso_CommMon_iso -> mulEquivIsoCommMonCatIso is a dubious translation:
+lean 3 declaration is
+  forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : CommMonoid.{u1} X] [_inst_2 : CommMonoid.{u1} Y], CategoryTheory.Iso.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1} (MulEquiv.{u1, u1} X Y (MulOneClass.toHasMul.{u1} X (Monoid.toMulOneClass.{u1} X (CommMonoid.toMonoid.{u1} X _inst_1))) (MulOneClass.toHasMul.{u1} Y (Monoid.toMulOneClass.{u1} Y (CommMonoid.toMonoid.{u1} Y _inst_2)))) (CategoryTheory.Iso.{u1, succ u1} CommMonCat.{u1} CommMonCat.largeCategory.{u1} (CommMonCat.of.{u1} X _inst_1) (CommMonCat.of.{u1} Y _inst_2))
+but is expected to have type
+  forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : CommMonoid.{u1} X] [_inst_2 : CommMonoid.{u1} Y], CategoryTheory.Iso.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1} (MulEquiv.{u1, u1} X Y (MulOneClass.toMul.{u1} X (Monoid.toMulOneClass.{u1} X (CommMonoid.toMonoid.{u1} X _inst_1))) (MulOneClass.toMul.{u1} Y (Monoid.toMulOneClass.{u1} Y (CommMonoid.toMonoid.{u1} Y _inst_2)))) (CategoryTheory.Iso.{u1, succ u1} CommMonCat.{u1} CommMonCat.largeCategory.{u1} (CommMonCat.of.{u1} X _inst_1) (CommMonCat.of.{u1} Y _inst_2))
+Case conversion may be inaccurate. Consider using '#align mul_equiv_iso_CommMon_iso mulEquivIsoCommMonCatIsoₓ'. -/
 /-- multiplicative equivalences between `comm_monoid`s are the same as (isomorphic to) isomorphisms
 in `CommMon` -/
-@[to_additive addEquivIsoAddCommMonIso
+@[to_additive addEquivIsoAddCommMonCatIso
       "additive equivalences between `add_comm_monoid`s are\nthe same as (isomorphic to) isomorphisms in `AddCommMon`"]
-def mulEquivIsoCommMonIso {X Y : Type u} [CommMonoid X] [CommMonoid Y] :
-    X ≃* Y ≅ CommMon.of X ≅ CommMon.of Y
+def mulEquivIsoCommMonCatIso {X Y : Type u} [CommMonoid X] [CommMonoid Y] :
+    X ≃* Y ≅ CommMonCat.of X ≅ CommMonCat.of Y
     where
-  Hom e := e.toCommMonIso
-  inv i := i.commMonIsoToMulEquiv
-#align mul_equiv_iso_CommMon_iso mulEquivIsoCommMonIso
-#align add_equiv_iso_AddCommMon_iso addEquivIsoAddCommMonIso
+  Hom e := e.toCommMonCatIso
+  inv i := i.commMonCatIsoToMulEquiv
+#align mul_equiv_iso_CommMon_iso mulEquivIsoCommMonCatIso
+#align add_equiv_iso_AddCommMon_iso addEquivIsoAddCommMonCatIso
 
+#print MonCat.forget_reflects_isos /-
 @[to_additive]
-instance Mon.forget_reflects_isos : ReflectsIsomorphisms (forget Mon.{u})
+instance MonCat.forget_reflects_isos : ReflectsIsomorphisms (forget MonCat.{u})
     where reflects X Y f _ := by
     skip
-    let i := as_iso ((forget Mon).map f)
+    let i := as_iso ((forget MonCat).map f)
     let e : X ≃* Y := { f, i.to_equiv with }
     exact ⟨(is_iso.of_iso e.to_Mon_iso).1⟩
-#align Mon.forget_reflects_isos Mon.forget_reflects_isos
-#align AddMon.forget_reflects_isos AddMon.forget_reflects_isos
+#align Mon.forget_reflects_isos MonCat.forget_reflects_isos
+#align AddMon.forget_reflects_isos AddMonCat.forget_reflects_isos
+-/
 
+#print CommMonCat.forget_reflects_isos /-
 @[to_additive]
-instance CommMon.forget_reflects_isos : ReflectsIsomorphisms (forget CommMon.{u})
+instance CommMonCat.forget_reflects_isos : ReflectsIsomorphisms (forget CommMonCat.{u})
     where reflects X Y f _ := by
     skip
-    let i := as_iso ((forget CommMon).map f)
+    let i := as_iso ((forget CommMonCat).map f)
     let e : X ≃* Y := { f, i.to_equiv with }
     exact ⟨(is_iso.of_iso e.to_CommMon_iso).1⟩
-#align CommMon.forget_reflects_isos CommMon.forget_reflects_isos
-#align AddCommMon.forget_reflects_isos AddCommMon.forget_reflects_isos
+#align CommMon.forget_reflects_isos CommMonCat.forget_reflects_isos
+#align AddCommMon.forget_reflects_isos AddCommMonCat.forget_reflects_isos
+-/
 
 /-!
 Once we've shown that the forgetful functors to type reflect isomorphisms,
@@ -297,5 +363,5 @@ reflect isomorphisms.
 -/
 
 
-example : ReflectsIsomorphisms (forget₂ CommMon Mon) := by infer_instance
+example : ReflectsIsomorphisms (forget₂ CommMonCat MonCat) := by infer_instance
 

Changes in mathlib4

mathlib3
mathlib4
chore(CategoryTheory): make Functor.Full a Prop (#12449)

Before this PR, Functor.Full contained the data of the preimage of maps by a full functor F. This PR makes Functor.Full a proposition. This is to prevent any diamond to appear.

The lemma Functor.image_preimage is also renamed Functor.map_preimage.

Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>

Diff
@@ -409,6 +409,7 @@ set_option linter.uppercaseLean3 false in
 -- automatically reflects isomorphisms
 -- we could have used `CategoryTheory.ConcreteCategory.ReflectsIso` alternatively
 @[to_additive]
-instance CommMonCat.forget₂Full : (forget₂ CommMonCat MonCat).Full where preimage f := f
+instance CommMonCat.forget₂_full : (forget₂ CommMonCat MonCat).Full where
+  map_surjective f := ⟨f, rfl⟩
 
 example : (forget₂ CommMonCat MonCat).ReflectsIsomorphisms := inferInstance
chore: move tests in MonCat to a test file (#11511)

The unused tactic linter flagged the final example that this PR moves since it contains match_target and guard_hyp.

Diff
@@ -284,28 +284,6 @@ lemma ofHom_apply {X Y : Type u} [CommMonoid X] [CommMonoid Y] (f : X →* Y) (x
 
 end CommMonCat
 
--- We verify that the coercions of morphisms to functions work correctly:
-example {R S : MonCat} (f : R ⟶ S) : ↑R → ↑S := f
-
--- Porting note: it's essential that simp lemmas for `→*` apply to morphisms.
-example {R S : MonCat} (i : R ⟶ S) (r : R) (h : r = 1) : i r = 1 := by simp [h]
-
-example {R S : CommMonCat} (f : R ⟶ S) : ↑R → ↑S := f
-
-example {R S : CommMonCat} (i : R ⟶ S) (r : R) (h : r = 1) : i r = 1 := by simp [h]
-
--- We verify that when constructing a morphism in `CommMonCat`,
--- when we construct the `toFun` field, the types are presented as `↑R`.
-example (R : CommMonCat.{u}) : R ⟶ R :=
-  { toFun := fun x => by
-      match_target (R : Type u)
-      guard_hyp x : (R : Type u)
-      exact x * x
-    map_one' := by simp
-    map_mul' := fun x y => by
-      dsimp
-      rw [mul_assoc x y (x * y), ← mul_assoc y x y, mul_comm y x, mul_assoc, mul_assoc] }
-
 variable {X Y : Type u}
 
 section
chore(CategoryTheory): move Full, Faithful, EssSurj, IsEquivalence and ReflectsIsomorphisms to the Functor namespace (#11985)

These notions on functors are now Functor.Full, Functor.Faithful, Functor.EssSurj, Functor.IsEquivalence, Functor.ReflectsIsomorphisms. Deprecated aliases are introduced for the previous names.

Diff
@@ -402,7 +402,7 @@ the same as (isomorphic to) isomorphisms in `AddCommMonCat` -/
 add_decl_doc addEquivIsoAddCommMonCatIso
 
 @[to_additive]
-instance MonCat.forget_reflects_isos : ReflectsIsomorphisms (forget MonCat.{u}) where
+instance MonCat.forget_reflects_isos : (forget MonCat.{u}).ReflectsIsomorphisms where
   reflects {X Y} f _ := by
     let i := asIso ((forget MonCat).map f)
     -- Again a problem that exists already creeps into other things leanprover/lean4#2644
@@ -415,7 +415,7 @@ set_option linter.uppercaseLean3 false in
 #align AddMon.forget_reflects_isos AddMonCat.forget_reflects_isos
 
 @[to_additive]
-instance CommMonCat.forget_reflects_isos : ReflectsIsomorphisms (forget CommMonCat.{u}) where
+instance CommMonCat.forget_reflects_isos : (forget CommMonCat.{u}).ReflectsIsomorphisms where
   reflects {X Y} f _ := by
     let i := asIso ((forget CommMonCat).map f)
     let e : X ≃* Y := MulEquiv.mk i.toEquiv
@@ -431,6 +431,6 @@ set_option linter.uppercaseLean3 false in
 -- automatically reflects isomorphisms
 -- we could have used `CategoryTheory.ConcreteCategory.ReflectsIso` alternatively
 @[to_additive]
-instance CommMonCat.forget₂Full : Full (forget₂ CommMonCat MonCat) where preimage f := f
+instance CommMonCat.forget₂Full : (forget₂ CommMonCat MonCat).Full where preimage f := f
 
-example : ReflectsIsomorphisms (forget₂ CommMonCat MonCat) := inferInstance
+example : (forget₂ CommMonCat MonCat).ReflectsIsomorphisms := inferInstance
doc(Algebra,AlgebraicGeometry): remove mathlib3 names in doc comments (#11955)

Mostly automatic, with a few manual corrections.

Diff
@@ -240,7 +240,7 @@ set_option linter.uppercaseLean3 false in
 set_option linter.uppercaseLean3 false in
 #align AddCommMon.of AddCommMonCat.of
 
-/-- Construct a bundled `AddCommMon` from the underlying type and typeclass. -/
+/-- Construct a bundled `AddCommMonCat` from the underlying type and typeclass. -/
 add_decl_doc AddCommMonCat.of
 
 @[to_additive]
chore: remove more autoImplicit (#11336)

... or reduce its scope (the full removal is not as obvious).

Diff
@@ -20,9 +20,6 @@ We introduce the bundled categories:
 along with the relevant forgetful functors between them.
 -/
 
-set_option autoImplicit true
-
-
 universe u v
 
 open CategoryTheory
@@ -102,7 +99,8 @@ lemma coe_id {X : MonCat} : (𝟙 X : X → X) = id := rfl
 lemma coe_comp {X Y Z : MonCat} {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g : X → Z) = g ∘ f := rfl
 
 -- porting note (#10756): added lemma
-@[to_additive (attr := simp)] lemma forget_map (f : X ⟶ Y) : (forget MonCat).map f = f := rfl
+@[to_additive (attr := simp)] lemma forget_map {X Y : MonCat} (f : X ⟶ Y) :
+    (forget MonCat).map f = f := rfl
 
 @[to_additive (attr := ext)]
 lemma ext {X Y : MonCat} {f g : X ⟶ Y} (w : ∀ x : X, f x = g x) : f = g :=
style: homogenise porting notes (#11145)

Homogenises porting notes via capitalisation and addition of whitespace.

It makes the following changes:

  • converts "--porting note" into "-- Porting note";
  • converts "porting note" into "Porting note".
Diff
@@ -153,14 +153,14 @@ lemma ofHom_apply {X Y : Type u} [Monoid X] [Monoid Y] (f : X →* Y) (x : X) :
 set_option linter.uppercaseLean3 false in
 #align Mon.of_hom_apply MonCat.ofHom_apply
 
----- porting note: added to ease the port of `RepresentationTheory.Action.Basic`
+---- Porting note: added to ease the port of `RepresentationTheory.Action.Basic`
 @[to_additive]
 instance (X Y : MonCat.{u}) : One (X ⟶ Y) := ⟨ofHom 1⟩
 
 @[to_additive (attr := simp)]
 lemma oneHom_apply (X Y : MonCat.{u}) (x : X) : (1 : X ⟶ Y) x = 1 := rfl
 
----- porting note: added to ease the port of `RepresentationTheory.Action.Basic`
+---- Porting note: added to ease the port of `RepresentationTheory.Action.Basic`
 @[to_additive (attr := simp)]
 lemma one_of {A : Type*} [Monoid A] : (1 : MonCat.of A) = (1 : A) := rfl
 
@@ -272,7 +272,7 @@ set_option linter.uppercaseLean3 false in
 @[to_additive]
 instance : Coe CommMonCat.{u} MonCat.{u} where coe := (forget₂ CommMonCat MonCat).obj
 
--- porting note: this was added to make automation work (it already exists for MonCat)
+-- Porting note: this was added to make automation work (it already exists for MonCat)
 /-- Typecheck a `MonoidHom` as a morphism in `CommMonCat`. -/
 @[to_additive]
 def ofHom {X Y : Type u} [CommMonoid X] [CommMonoid Y] (f : X →* Y) : of X ⟶ of Y := f
@@ -429,7 +429,7 @@ set_option linter.uppercaseLean3 false in
 set_option linter.uppercaseLean3 false in
 #align AddCommMon.forget_reflects_isos AddCommMonCat.forget_reflects_isos
 
--- porting note: this was added in order to ensure that `forget₂ CommMonCat MonCat`
+-- Porting note: this was added in order to ensure that `forget₂ CommMonCat MonCat`
 -- automatically reflects isomorphisms
 -- we could have used `CategoryTheory.ConcreteCategory.ReflectsIso` alternatively
 @[to_additive]
chore: classify added lemma porting notes (#10791)

Classifies by adding number (#10756) to porting notes claiming added lemma.

Diff
@@ -93,15 +93,15 @@ instance instFunLike (X Y : MonCat) : FunLike (X ⟶ Y) X Y :=
 instance instMonoidHomClass (X Y : MonCat) : MonoidHomClass (X ⟶ Y) X Y :=
   inferInstanceAs <| MonoidHomClass (X →* Y) X Y
 
--- porting note: added
+-- porting note (#10756): added lemma
 @[to_additive (attr := simp)]
 lemma coe_id {X : MonCat} : (𝟙 X : X → X) = id := rfl
 
--- porting note: added
+-- porting note (#10756): added lemma
 @[to_additive (attr := simp)]
 lemma coe_comp {X Y Z : MonCat} {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g : X → Z) = g ∘ f := rfl
 
--- porting note: added
+-- porting note (#10756): added lemma
 @[to_additive (attr := simp)] lemma forget_map (f : X ⟶ Y) : (forget MonCat).map f = f := rfl
 
 @[to_additive (attr := ext)]
@@ -215,15 +215,15 @@ instance {X Y : CommMonCat} : CoeFun (X ⟶ Y) fun _ => X → Y where
 instance instFunLike (X Y : CommMonCat) : FunLike (X ⟶ Y) X Y :=
   show FunLike (X →* Y) X Y by infer_instance
 
--- porting note: added
+-- porting note (#10756): added lemma
 @[to_additive (attr := simp)]
 lemma coe_id {X : CommMonCat} : (𝟙 X : X → X) = id := rfl
 
--- porting note: added
+-- porting note (#10756): added lemma
 @[to_additive (attr := simp)]
 lemma coe_comp {X Y Z : CommMonCat} {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g : X → Z) = g ∘ f := rfl
 
--- porting note: added
+-- porting note (#10756): added lemma
 @[to_additive (attr := simp)]
 lemma forget_map {X Y : CommMonCat} (f : X ⟶ Y) :
     (forget CommMonCat).map f = (f : X → Y) :=
chore: add issue number to instance was not necessary porting notes (#10671)

Adds issue number (#10670) to porting notes claiming instance was not necessary.

Diff
@@ -80,7 +80,7 @@ instance : CoeSort MonCat (Type*) where
 @[to_additive]
 instance (X : MonCat) : Monoid X := X.str
 
--- porting note: this instance was not necessary in mathlib
+-- porting note (#10670): this instance was not necessary in mathlib
 @[to_additive]
 instance {X Y : MonCat} : CoeFun (X ⟶ Y) fun _ => X → Y where
   coe (f : X →* Y) := f
@@ -206,7 +206,7 @@ instance : CoeSort CommMonCat (Type*) where
 @[to_additive]
 instance (X : CommMonCat) : CommMonoid X := X.str
 
--- porting note: this instance was not necessary in mathlib
+-- porting note (#10670): this instance was not necessary in mathlib
 @[to_additive]
 instance {X Y : CommMonCat} : CoeFun (X ⟶ Y) fun _ => X → Y where
   coe (f : X →* Y) := f
chore: tidy various files (#10453)
Diff
@@ -10,7 +10,7 @@ import Mathlib.CategoryTheory.Functor.ReflectsIso
 #align_import algebra.category.Mon.basic from "leanprover-community/mathlib"@"0caf3701139ef2e69c215717665361cda205a90b"
 
 /-!
-# Category instances for monoid, add_monoid, comm_monoid, and add_comm_monoid.
+# Category instances for `Monoid`, `AddMonoid`, `CommMonoid`, and `AddCommMmonoid`.
 
 We introduce the bundled categories:
 * `MonCat`
refactor(Data/FunLike): use unbundled inheritance from FunLike (#8386)

The FunLike hierarchy is very big and gets scanned through each time we need a coercion (via the CoeFun instance). It looks like unbundled inheritance suits Lean 4 better here. The only class that still extends FunLike is EquivLike, since that has a custom coe_injective' field that is easier to implement. All other classes should take FunLike or EquivLike as a parameter.

Zulip thread

Important changes

Previously, morphism classes would be Type-valued and extend FunLike:

/-- `MyHomClass F A B` states that `F` is a type of `MyClass.op`-preserving morphisms.
You should extend this class when you extend `MyHom`. -/
class MyHomClass (F : Type*) (A B : outParam <| Type*) [MyClass A] [MyClass B]
  extends FunLike F A B :=
(map_op : ∀ (f : F) (x y : A), f (MyClass.op x y) = MyClass.op (f x) (f y))

After this PR, they should be Prop-valued and take FunLike as a parameter:

/-- `MyHomClass F A B` states that `F` is a type of `MyClass.op`-preserving morphisms.
You should extend this class when you extend `MyHom`. -/
class MyHomClass (F : Type*) (A B : outParam <| Type*) [MyClass A] [MyClass B]
  [FunLike F A B] : Prop :=
(map_op : ∀ (f : F) (x y : A), f (MyClass.op x y) = MyClass.op (f x) (f y))

(Note that A B stay marked as outParam even though they are not purely required to be so due to the FunLike parameter already filling them in. This is required to see through type synonyms, which is important in the category theory library. Also, I think keeping them as outParam is slightly faster.)

Similarly, MyEquivClass should take EquivLike as a parameter.

As a result, every mention of [MyHomClass F A B] should become [FunLike F A B] [MyHomClass F A B].

Remaining issues

Slower (failing) search

While overall this gives some great speedups, there are some cases that are noticeably slower. In particular, a failing application of a lemma such as map_mul is more expensive. This is due to suboptimal processing of arguments. For example:

variable [FunLike F M N] [Mul M] [Mul N] (f : F) (x : M) (y : M)

theorem map_mul [MulHomClass F M N] : f (x * y) = f x * f y

example [AddHomClass F A B] : f (x * y) = f x * f y := map_mul f _ _

Before this PR, applying map_mul f gives the goals [Mul ?M] [Mul ?N] [MulHomClass F ?M ?N]. Since M and N are out_params, [MulHomClass F ?M ?N] is synthesized first, supplies values for ?M and ?N and then the Mul M and Mul N instances can be found.

After this PR, the goals become [FunLike F ?M ?N] [Mul ?M] [Mul ?N] [MulHomClass F ?M ?N]. Now [FunLike F ?M ?N] is synthesized first, supplies values for ?M and ?N and then the Mul M and Mul N instances can be found, before trying MulHomClass F M N which fails. Since the Mul hierarchy is very big, this can be slow to fail, especially when there is no such Mul instance.

A long-term but harder to achieve solution would be to specify the order in which instance goals get solved. For example, we'd like to change the arguments to map_mul to look like [FunLike F M N] [Mul M] [Mul N] [highPriority <| MulHomClass F M N] because MulHomClass fails or succeeds much faster than the others.

As a consequence, the simpNF linter is much slower since by design it tries and fails to apply many map_ lemmas. The same issue occurs a few times in existing calls to simp [map_mul], where map_mul is tried "too soon" and fails. Thanks to the speedup of leanprover/lean4#2478 the impact is very limited, only in files that already were close to the timeout.

simp not firing sometimes

This affects map_smulₛₗ and related definitions. For simp lemmas Lean apparently uses a slightly different mechanism to find instances, so that rw can find every argument to map_smulₛₗ successfully but simp can't: leanprover/lean4#3701.

Missing instances due to unification failing

Especially in the category theory library, we might sometimes have a type A which is also accessible as a synonym (Bundled A hA).1. Instance synthesis doesn't always work if we have f : A →* B but x * y : (Bundled A hA).1 or vice versa. This seems to be mostly fixed by keeping A B as outParams in MulHomClass F A B. (Presumably because Lean will do a definitional check A =?= (Bundled A hA).1 instead of using the syntax in the discrimination tree.)

Workaround for issues

The timeouts can be worked around for now by specifying which map_mul we mean, either as map_mul f for some explicit f, or as e.g. MonoidHomClass.map_mul.

map_smulₛₗ not firing as simp lemma can be worked around by going back to the pre-FunLike situation and making LinearMap.map_smulₛₗ a simp lemma instead of the generic map_smulₛₗ. Writing simp [map_smulₛₗ _] also works.

Co-authored-by: Matthew Ballard <matt@mrb.email> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Scott Morrison <scott@tqft.net> Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>

Diff
@@ -86,8 +86,12 @@ instance {X Y : MonCat} : CoeFun (X ⟶ Y) fun _ => X → Y where
   coe (f : X →* Y) := f
 
 @[to_additive]
-instance Hom_FunLike (X Y : MonCat) : FunLike (X ⟶ Y) X Y :=
-  show FunLike (X →* Y) X Y by infer_instance
+instance instFunLike (X Y : MonCat) : FunLike (X ⟶ Y) X Y :=
+  inferInstanceAs <| FunLike (X →* Y) X Y
+
+@[to_additive]
+instance instMonoidHomClass (X Y : MonCat) : MonoidHomClass (X ⟶ Y) X Y :=
+  inferInstanceAs <| MonoidHomClass (X →* Y) X Y
 
 -- porting note: added
 @[to_additive (attr := simp)]
@@ -208,7 +212,7 @@ instance {X Y : CommMonCat} : CoeFun (X ⟶ Y) fun _ => X → Y where
   coe (f : X →* Y) := f
 
 @[to_additive]
-instance Hom_FunLike (X Y : CommMonCat) : FunLike (X ⟶ Y) X Y :=
+instance instFunLike (X Y : CommMonCat) : FunLike (X ⟶ Y) X Y :=
   show FunLike (X →* Y) X Y by infer_instance
 
 -- porting note: added
refactor(*): abbreviation for non-dependent FunLike (#9833)

This follows up from #9785, which renamed FunLike to DFunLike, by introducing a new abbreviation FunLike F α β := DFunLike F α (fun _ => β), to make the non-dependent use of FunLike easier.

I searched for the pattern DFunLike.*fun and DFunLike.*λ in all files to replace expressions of the form DFunLike F α (fun _ => β) with FunLike F α β. I did this everywhere except for extends clauses for two reasons: it would conflict with #8386, and more importantly extends must directly refer to a structure with no unfolding of defs or abbrevs.

Diff
@@ -86,8 +86,8 @@ instance {X Y : MonCat} : CoeFun (X ⟶ Y) fun _ => X → Y where
   coe (f : X →* Y) := f
 
 @[to_additive]
-instance Hom_DFunLike (X Y : MonCat) : DFunLike (X ⟶ Y) X (fun _ => Y) :=
-  show DFunLike (X →* Y) X (fun _ => Y) by infer_instance
+instance Hom_FunLike (X Y : MonCat) : FunLike (X ⟶ Y) X Y :=
+  show FunLike (X →* Y) X Y by infer_instance
 
 -- porting note: added
 @[to_additive (attr := simp)]
@@ -208,8 +208,8 @@ instance {X Y : CommMonCat} : CoeFun (X ⟶ Y) fun _ => X → Y where
   coe (f : X →* Y) := f
 
 @[to_additive]
-instance Hom_DFunLike (X Y : CommMonCat) : DFunLike (X ⟶ Y) X (fun _ => Y) :=
-  show DFunLike (X →* Y) X (fun _ => Y) by infer_instance
+instance Hom_FunLike (X Y : CommMonCat) : FunLike (X ⟶ Y) X Y :=
+  show FunLike (X →* Y) X Y by infer_instance
 
 -- porting note: added
 @[to_additive (attr := simp)]
chore(*): rename FunLike to DFunLike (#9785)

This prepares for the introduction of a non-dependent synonym of FunLike, which helps a lot with keeping #8386 readable.

This is entirely search-and-replace in 680197f combined with manual fixes in 4145626, e900597 and b8428f8. The commands that generated this change:

sed -i 's/\bFunLike\b/DFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\btoFunLike\b/toDFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/import Mathlib.Data.DFunLike/import Mathlib.Data.FunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\bHom_FunLike\b/Hom_DFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean     
sed -i 's/\binstFunLike\b/instDFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\bfunLike\b/instDFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\btoo many metavariables to apply `fun_like.has_coe_to_fun`/too many metavariables to apply `DFunLike.hasCoeToFun`/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean

Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>

Diff
@@ -86,8 +86,8 @@ instance {X Y : MonCat} : CoeFun (X ⟶ Y) fun _ => X → Y where
   coe (f : X →* Y) := f
 
 @[to_additive]
-instance Hom_FunLike (X Y : MonCat) : FunLike (X ⟶ Y) X (fun _ => Y) :=
-  show FunLike (X →* Y) X (fun _ => Y) by infer_instance
+instance Hom_DFunLike (X Y : MonCat) : DFunLike (X ⟶ Y) X (fun _ => Y) :=
+  show DFunLike (X →* Y) X (fun _ => Y) by infer_instance
 
 -- porting note: added
 @[to_additive (attr := simp)]
@@ -208,8 +208,8 @@ instance {X Y : CommMonCat} : CoeFun (X ⟶ Y) fun _ => X → Y where
   coe (f : X →* Y) := f
 
 @[to_additive]
-instance Hom_FunLike (X Y : CommMonCat) : FunLike (X ⟶ Y) X (fun _ => Y) :=
-  show FunLike (X →* Y) X (fun _ => Y) by infer_instance
+instance Hom_DFunLike (X Y : CommMonCat) : DFunLike (X ⟶ Y) X (fun _ => Y) :=
+  show DFunLike (X →* Y) X (fun _ => Y) by infer_instance
 
 -- porting note: added
 @[to_additive (attr := simp)]
chore: split RepresentationTheory.Action in multiple files (#8660)

Splits Mathlib.RepresentationTheory.Action in multiple files.

Diff
@@ -149,14 +149,14 @@ lemma ofHom_apply {X Y : Type u} [Monoid X] [Monoid Y] (f : X →* Y) (x : X) :
 set_option linter.uppercaseLean3 false in
 #align Mon.of_hom_apply MonCat.ofHom_apply
 
----- porting note: added to ease the port of `RepresentationTheory.Action`
+---- porting note: added to ease the port of `RepresentationTheory.Action.Basic`
 @[to_additive]
 instance (X Y : MonCat.{u}) : One (X ⟶ Y) := ⟨ofHom 1⟩
 
 @[to_additive (attr := simp)]
 lemma oneHom_apply (X Y : MonCat.{u}) (x : X) : (1 : X ⟶ Y) x = 1 := rfl
 
----- porting note: added to ease the port of `RepresentationTheory.Action`
+---- porting note: added to ease the port of `RepresentationTheory.Action.Basic`
 @[to_additive (attr := simp)]
 lemma one_of {A : Type*} [Monoid A] : (1 : MonCat.of A) = (1 : A) := rfl
 
Revert "chore: revert #7703 (#7710)"

This reverts commit f3695eb2.

Diff
@@ -403,7 +403,9 @@ add_decl_doc addEquivIsoAddCommMonCatIso
 instance MonCat.forget_reflects_isos : ReflectsIsomorphisms (forget MonCat.{u}) where
   reflects {X Y} f _ := by
     let i := asIso ((forget MonCat).map f)
-    let e : X ≃* Y := MulEquiv.mk i.toEquiv (by aesop)
+    -- Again a problem that exists already creeps into other things leanprover/lean4#2644
+    -- this used to be `by aesop`; see next declaration
+    let e : X ≃* Y := MulEquiv.mk i.toEquiv (MonoidHom.map_mul (show MonoidHom X Y from f))
     exact IsIso.of_iso e.toMonCatIso
 set_option linter.uppercaseLean3 false in
 #align Mon.forget_reflects_isos MonCat.forget_reflects_isos
chore: revert #7703 (#7710)

This reverts commit 26eb2b0a.

Diff
@@ -403,9 +403,7 @@ add_decl_doc addEquivIsoAddCommMonCatIso
 instance MonCat.forget_reflects_isos : ReflectsIsomorphisms (forget MonCat.{u}) where
   reflects {X Y} f _ := by
     let i := asIso ((forget MonCat).map f)
-    -- Again a problem that exists already creeps into other things leanprover/lean4#2644
-    -- this used to be `by aesop`; see next declaration
-    let e : X ≃* Y := MulEquiv.mk i.toEquiv (MonoidHom.map_mul (show MonoidHom X Y from f))
+    let e : X ≃* Y := MulEquiv.mk i.toEquiv (by aesop)
     exact IsIso.of_iso e.toMonCatIso
 set_option linter.uppercaseLean3 false in
 #align Mon.forget_reflects_isos MonCat.forget_reflects_isos
chore: bump toolchain to v4.2.0-rc2 (#7703)

This includes all the changes from #7606.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -403,7 +403,9 @@ add_decl_doc addEquivIsoAddCommMonCatIso
 instance MonCat.forget_reflects_isos : ReflectsIsomorphisms (forget MonCat.{u}) where
   reflects {X Y} f _ := by
     let i := asIso ((forget MonCat).map f)
-    let e : X ≃* Y := MulEquiv.mk i.toEquiv (by aesop)
+    -- Again a problem that exists already creeps into other things leanprover/lean4#2644
+    -- this used to be `by aesop`; see next declaration
+    let e : X ≃* Y := MulEquiv.mk i.toEquiv (MonoidHom.map_mul (show MonoidHom X Y from f))
     exact IsIso.of_iso e.toMonCatIso
 set_option linter.uppercaseLean3 false in
 #align Mon.forget_reflects_isos MonCat.forget_reflects_isos
chore: exactly 4 spaces in subsequent lines for def (#7321)

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -370,7 +370,7 @@ end CategoryTheory.Iso
 in `MonCat` -/
 @[to_additive addEquivIsoAddMonCatIso]
 def mulEquivIsoMonCatIso {X Y : Type u} [Monoid X] [Monoid Y] :
-  X ≃* Y ≅ MonCat.of X ≅ MonCat.of Y where
+    X ≃* Y ≅ MonCat.of X ≅ MonCat.of Y where
   hom e := e.toMonCatIso
   inv i := i.monCatIsoToMulEquiv
 set_option linter.uppercaseLean3 false in
chore: only four spaces for subsequent lines (#7286)

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -145,7 +145,7 @@ add_decl_doc AddMonCat.ofHom
 
 @[to_additive (attr := simp)]
 lemma ofHom_apply {X Y : Type u} [Monoid X] [Monoid Y] (f : X →* Y) (x : X) :
-  (ofHom f) x = f x := rfl
+    (ofHom f) x = f x := rfl
 set_option linter.uppercaseLean3 false in
 #align Mon.of_hom_apply MonCat.ofHom_apply
 
@@ -278,7 +278,7 @@ add_decl_doc AddCommMonCat.ofHom
 
 @[to_additive (attr := simp)]
 lemma ofHom_apply {X Y : Type u} [CommMonoid X] [CommMonoid Y] (f : X →* Y) (x : X) :
-  (ofHom f) x = f x := rfl
+    (ofHom f) x = f x := rfl
 
 end CommMonCat
 
fix: disable autoImplicit globally (#6528)

Autoimplicits are highly controversial and also defeat the performance-improving work in #6474.

The intent of this PR is to make autoImplicit opt-in on a per-file basis, by disabling it in the lakefile and enabling it again with set_option autoImplicit true in the few files that rely on it.

That also keeps this PR small, as opposed to attempting to "fix" files to not need it any more.

I claim that many of the uses of autoImplicit in these files are accidental; situations such as:

  • Assuming variables are in scope, but pasting the lemma in the wrong section
  • Pasting in a lemma from a scratch file without checking to see if the variable names are consistent with the rest of the file
  • Making a copy-paste error between lemmas and forgetting to add an explicit arguments.

Having set_option autoImplicit false as the default prevents these types of mistake being made in the 90% of files where autoImplicits are not used at all, and causes them to be caught by CI during review.

I think there were various points during the port where we encouraged porters to delete the universes u v lines; I think having autoparams for universe variables only would cover a lot of the cases we actually use them, while avoiding any real shortcomings.

A Zulip poll (after combining overlapping votes accordingly) was in favor of this change with 5:5:18 as the no:dontcare:yes vote ratio.

While this PR was being reviewed, a handful of files gained some more likely-accidental autoImplicits. In these places, set_option autoImplicit true has been placed locally within a section, rather than at the top of the file.

Diff
@@ -20,6 +20,8 @@ We introduce the bundled categories:
 along with the relevant forgetful functors between them.
 -/
 
+set_option autoImplicit true
+
 
 universe u v
 
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -42,7 +42,7 @@ namespace MonCat
 /-- `MonoidHom` doesn't actually assume associativity. This alias is needed to make the category
 theory machinery work. -/
 @[to_additive]
-abbrev AssocMonoidHom (M N : Type _) [Monoid M] [Monoid N] :=
+abbrev AssocMonoidHom (M N : Type*) [Monoid M] [Monoid N] :=
   MonoidHom M N
 set_option linter.uppercaseLean3 false in
 #align Mon.assoc_monoid_hom MonCat.AssocMonoidHom
@@ -72,7 +72,7 @@ instance concreteCategory : ConcreteCategory MonCat :=
   BundledHom.concreteCategory _
 
 @[to_additive]
-instance : CoeSort MonCat (Type _) where
+instance : CoeSort MonCat (Type*) where
   coe X := X.α
 
 @[to_additive]
@@ -156,14 +156,14 @@ lemma oneHom_apply (X Y : MonCat.{u}) (x : X) : (1 : X ⟶ Y) x = 1 := rfl
 
 ---- porting note: added to ease the port of `RepresentationTheory.Action`
 @[to_additive (attr := simp)]
-lemma one_of {A : Type _} [Monoid A] : (1 : MonCat.of A) = (1 : A) := rfl
+lemma one_of {A : Type*} [Monoid A] : (1 : MonCat.of A) = (1 : A) := rfl
 
 @[to_additive (attr := simp)]
-lemma mul_of {A : Type _} [Monoid A] (a b : A) :
+lemma mul_of {A : Type*} [Monoid A] (a b : A) :
     @HMul.hMul (MonCat.of A) (MonCat.of A) (MonCat.of A) _ a b = a * b := rfl
 
 @[to_additive]
-instance {G : Type _} [Group G] : Group (MonCat.of G) := by assumption
+instance {G : Type*} [Group G] : Group (MonCat.of G) := by assumption
 
 end MonCat
 
@@ -194,7 +194,7 @@ instance concreteCategory : ConcreteCategory CommMonCat := by
   infer_instance
 
 @[to_additive]
-instance : CoeSort CommMonCat (Type _) where
+instance : CoeSort CommMonCat (Type*) where
   coe X := X.α
 
 @[to_additive]
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2018 Scott Morrison. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Scott Morrison
-
-! This file was ported from Lean 3 source module algebra.category.Mon.basic
-! leanprover-community/mathlib commit 0caf3701139ef2e69c215717665361cda205a90b
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.CategoryTheory.ConcreteCategory.BundledHom
 import Mathlib.Algebra.PUnitInstances
 import Mathlib.CategoryTheory.Functor.ReflectsIso
 
+#align_import algebra.category.Mon.basic from "leanprover-community/mathlib"@"0caf3701139ef2e69c215717665361cda205a90b"
+
 /-!
 # Category instances for monoid, add_monoid, comm_monoid, and add_comm_monoid.
 
chore: cleanup whitespace (#5988)

Grepping for [^ .:{-] [^ :] and reviewing the results. Once I started I couldn't stop. :-)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -58,7 +58,7 @@ add_decl_doc AddMonCat.AssocAddMonoidHom
 
 @[to_additive]
 instance bundledHom : BundledHom AssocMonoidHom where
-  toFun  {X Y} _ _ f := ⇑f
+  toFun {X Y} _ _ f := ⇑f
   id _ := MonoidHom.id _
   comp _ _ _ := MonoidHom.comp
 set_option linter.uppercaseLean3 false in
feat: port Algebra.Category.Semigroup.Basic (#4857)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>

Diff
@@ -69,6 +69,7 @@ set_option linter.uppercaseLean3 false in
 deriving instance LargeCategory for MonCat
 attribute [to_additive instAddMonCatLargeCategory] instMonCatLargeCategory
 
+-- Porting note: https://github.com/leanprover-community/mathlib4/issues/5020
 @[to_additive]
 instance concreteCategory : ConcreteCategory MonCat :=
   BundledHom.concreteCategory _
@@ -189,6 +190,7 @@ instance : BundledHom.ParentProjection @CommMonoid.toMonoid := ⟨⟩
 deriving instance LargeCategory for CommMonCat
 attribute [to_additive instAddCommMonCatLargeCategory] instCommMonCatLargeCategory
 
+-- Porting note: https://github.com/leanprover-community/mathlib4/issues/5020
 @[to_additive]
 instance concreteCategory : ConcreteCategory CommMonCat := by
   dsimp only [CommMonCat]
chore: fix grammar 1/3 (#5001)

All of these are doc fixes

Diff
@@ -140,7 +140,7 @@ set_option linter.uppercaseLean3 false in
 set_option linter.uppercaseLean3 false in
 #align AddMon.of_hom AddMonCat.ofHom
 
-/-- Typecheck a `AddMonoidHom` as a morphism in `AddMonCat`. -/
+/-- Typecheck an `AddMonoidHom` as a morphism in `AddMonCat`. -/
 add_decl_doc AddMonCat.ofHom
 
 @[to_additive (attr := simp)]
@@ -272,7 +272,7 @@ instance : Coe CommMonCat.{u} MonCat.{u} where coe := (forget₂ CommMonCat MonC
 @[to_additive]
 def ofHom {X Y : Type u} [CommMonoid X] [CommMonoid Y] (f : X →* Y) : of X ⟶ of Y := f
 
-/-- Typecheck a `AddMonoidHom` as a morphism in `AddCommMonCat`. -/
+/-- Typecheck an `AddMonoidHom` as a morphism in `AddCommMonCat`. -/
 add_decl_doc AddCommMonCat.ofHom
 
 @[to_additive (attr := simp)]
chore: formatting issues (#4947)

Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au> Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>

Diff
@@ -87,7 +87,7 @@ instance {X Y : MonCat} : CoeFun (X ⟶ Y) fun _ => X → Y where
 
 @[to_additive]
 instance Hom_FunLike (X Y : MonCat) : FunLike (X ⟶ Y) X (fun _ => Y) :=
-show FunLike (X →* Y) X (fun _ => Y) by infer_instance
+  show FunLike (X →* Y) X (fun _ => Y) by infer_instance
 
 -- porting note: added
 @[to_additive (attr := simp)]
@@ -208,7 +208,7 @@ instance {X Y : CommMonCat} : CoeFun (X ⟶ Y) fun _ => X → Y where
 
 @[to_additive]
 instance Hom_FunLike (X Y : CommMonCat) : FunLike (X ⟶ Y) X (fun _ => Y) :=
-show FunLike (X →* Y) X (fun _ => Y) by infer_instance
+  show FunLike (X →* Y) X (fun _ => Y) by infer_instance
 
 -- porting note: added
 @[to_additive (attr := simp)]
feat: port RepresentationTheory.Action (#4700)

Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com> Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com> Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>

Diff
@@ -149,6 +149,21 @@ lemma ofHom_apply {X Y : Type u} [Monoid X] [Monoid Y] (f : X →* Y) (x : X) :
 set_option linter.uppercaseLean3 false in
 #align Mon.of_hom_apply MonCat.ofHom_apply
 
+---- porting note: added to ease the port of `RepresentationTheory.Action`
+@[to_additive]
+instance (X Y : MonCat.{u}) : One (X ⟶ Y) := ⟨ofHom 1⟩
+
+@[to_additive (attr := simp)]
+lemma oneHom_apply (X Y : MonCat.{u}) (x : X) : (1 : X ⟶ Y) x = 1 := rfl
+
+---- porting note: added to ease the port of `RepresentationTheory.Action`
+@[to_additive (attr := simp)]
+lemma one_of {A : Type _} [Monoid A] : (1 : MonCat.of A) = (1 : A) := rfl
+
+@[to_additive (attr := simp)]
+lemma mul_of {A : Type _} [Monoid A] (a b : A) :
+    @HMul.hMul (MonCat.of A) (MonCat.of A) (MonCat.of A) _ a b = a * b := rfl
+
 @[to_additive]
 instance {G : Type _} [Group G] : Group (MonCat.of G) := by assumption
 
feat: port Algebra.Category.Mon.FilteredColimits (#4094)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -85,6 +85,10 @@ instance (X : MonCat) : Monoid X := X.str
 instance {X Y : MonCat} : CoeFun (X ⟶ Y) fun _ => X → Y where
   coe (f : X →* Y) := f
 
+@[to_additive]
+instance Hom_FunLike (X Y : MonCat) : FunLike (X ⟶ Y) X (fun _ => Y) :=
+show FunLike (X →* Y) X (fun _ => Y) by infer_instance
+
 -- porting note: added
 @[to_additive (attr := simp)]
 lemma coe_id {X : MonCat} : (𝟙 X : X → X) = id := rfl
@@ -187,6 +191,10 @@ instance (X : CommMonCat) : CommMonoid X := X.str
 instance {X Y : CommMonCat} : CoeFun (X ⟶ Y) fun _ => X → Y where
   coe (f : X →* Y) := f
 
+@[to_additive]
+instance Hom_FunLike (X Y : CommMonCat) : FunLike (X ⟶ Y) X (fun _ => Y) :=
+show FunLike (X →* Y) X (fun _ => Y) by infer_instance
+
 -- porting note: added
 @[to_additive (attr := simp)]
 lemma coe_id {X : CommMonCat} : (𝟙 X : X → X) = id := rfl
feat: port Algebra.Category.Mon.Limits (#3073)

Co-authored-by: Jason Yuen <jason_yuen2007@hotmail.com> Co-authored-by: int-y1 <jason_yuen2007@hotmail.com> Co-authored-by: Matthew Ballard <matt@mrb.email> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Floris van Doorn <fpvdoorn@gmail.com>

Diff
@@ -94,7 +94,7 @@ lemma coe_id {X : MonCat} : (𝟙 X : X → X) = id := rfl
 lemma coe_comp {X Y Z : MonCat} {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g : X → Z) = g ∘ f := rfl
 
 -- porting note: added
-@[simp] lemma forget_map (f : X ⟶ Y) : (forget MonCat).map f = f := rfl
+@[to_additive (attr := simp)] lemma forget_map (f : X ⟶ Y) : (forget MonCat).map f = f := rfl
 
 @[to_additive (attr := ext)]
 lemma ext {X Y : MonCat} {f g : X ⟶ Y} (w : ∀ x : X, f x = g x) : f = g :=
@@ -402,6 +402,7 @@ set_option linter.uppercaseLean3 false in
 -- porting note: this was added in order to ensure that `forget₂ CommMonCat MonCat`
 -- automatically reflects isomorphisms
 -- we could have used `CategoryTheory.ConcreteCategory.ReflectsIso` alternatively
-instance : Full (forget₂ CommMonCat MonCat) where preimage f := f
+@[to_additive]
+instance CommMonCat.forget₂Full : Full (forget₂ CommMonCat MonCat) where preimage f := f
 
 example : ReflectsIsomorphisms (forget₂ CommMonCat MonCat) := inferInstance
chore: refactor of concrete categories (#3900)

I think the ports

didn't quite get things right, and also have some variation between them. This PR tries to straighten things out.

Major changes:

  • Have the coercion to type be via X.\a, and put attribute @[coe] on this.
  • Make sure the coercion from morphisms to functions means that simp lemmas about the underlying bundled morphisms apply directly.
    • This means we drop lemmas like
    lemma Hom.map_mul {X Y : MonCat} (f : X ⟶ Y) (x y : X) : ((forget MonCat).map f) (x * y) = f x * f y
    
    • But at the expense of adding lemmas like
    lemma coe_comp {X Y Z : MonCat} {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g : X → Z) = g ∘ f := rfl
    

Overall I'm pretty happy, and it allows me to unstick the long stuck https://github.com/leanprover-community/mathlib4/pull/3105.

This is not everything I want to do to refactor these files, but once I was satisfied that I can move forward with RingCat, I want to get this merged so we can unblock porting progress. I'll promise to come back to this soon! :-)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au>

Diff
@@ -66,19 +66,39 @@ set_option linter.uppercaseLean3 false in
 set_option linter.uppercaseLean3 false in
 #align AddMon.bundled_hom AddMonCat.bundledHom
 
-instance largeCategory : LargeCategory MonCat := by
-  dsimp only [MonCat]
-  infer_instance
+deriving instance LargeCategory for MonCat
+attribute [to_additive instAddMonCatLargeCategory] instMonCatLargeCategory
 
+@[to_additive]
 instance concreteCategory : ConcreteCategory MonCat :=
   BundledHom.concreteCategory _
 
-attribute [to_additive] MonCat.largeCategory MonCat.concreteCategory
+@[to_additive]
+instance : CoeSort MonCat (Type _) where
+  coe X := X.α
 
 @[to_additive]
-instance : CoeSort MonCat (Type _) := by
-  dsimp only [MonCat]
-  infer_instance
+instance (X : MonCat) : Monoid X := X.str
+
+-- porting note: this instance was not necessary in mathlib
+@[to_additive]
+instance {X Y : MonCat} : CoeFun (X ⟶ Y) fun _ => X → Y where
+  coe (f : X →* Y) := f
+
+-- porting note: added
+@[to_additive (attr := simp)]
+lemma coe_id {X : MonCat} : (𝟙 X : X → X) = id := rfl
+
+-- porting note: added
+@[to_additive (attr := simp)]
+lemma coe_comp {X Y Z : MonCat} {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g : X → Z) = g ∘ f := rfl
+
+-- porting note: added
+@[simp] lemma forget_map (f : X ⟶ Y) : (forget MonCat).map f = f := rfl
+
+@[to_additive (attr := ext)]
+lemma ext {X Y : MonCat} {f g : X ⟶ Y} (w : ∀ x : X, f x = g x) : f = g :=
+  MonoidHom.ext w
 
 /-- Construct a bundled `MonCat` from the underlying type and typeclass. -/
 @[to_additive]
@@ -89,33 +109,18 @@ set_option linter.uppercaseLean3 false in
 set_option linter.uppercaseLean3 false in
 #align AddMon.of AddMonCat.of
 
-/-- Construct a bundled `MonCat` from the underlying type and typeclass. -/
+/-- Construct a bundled `AddMonCat` from the underlying type and typeclass. -/
 add_decl_doc AddMonCat.of
 
-/-- Typecheck a `MonoidHom` as a morphism in `MonCat`. -/
+-- Porting note: removed `@[simp]` here, as it makes it harder to tell when to apply
+-- bundled or unbundled lemmas.
+-- (This change seems dangerous!)
 @[to_additive]
-def ofHom {X Y : Type u} [Monoid X] [Monoid Y] (f : X →* Y) : of X ⟶ of Y :=
-  f
-set_option linter.uppercaseLean3 false in
-#align Mon.of_hom MonCat.ofHom
+theorem coe_of (R : Type u) [Monoid R] : (MonCat.of R : Type u) = R := rfl
 set_option linter.uppercaseLean3 false in
-#align AddMon.of_hom AddMonCat.ofHom
-
-/-- Typecheck a `AddMonoidHom` as a morphism in `AddMonCat`. -/
-add_decl_doc AddMonCat.ofHom
-
--- porting note: this instance was not necessary in mathlib
-@[to_additive]
-instance {X Y : MonCat} : CoeFun (X ⟶ Y) fun _ => X → Y :=
-  ConcreteCategory.hasCoeToFun
-
--- porting note: in mathlib the LHS was `(⇑ofHom f) x`; the coercion was unfolded
--- to make the simp lemma work
-@[to_additive (attr := simp) _root_.AddMonCat.ofHom_apply]
-lemma ofHom_apply {X Y : Type u} [Monoid X] [Monoid Y] (f : X →* Y) (x : X) :
-  ((forget MonCat).map (MonCat.ofHom f)) x = f x := rfl
+#align Mon.coe_of MonCat.coe_of
 set_option linter.uppercaseLean3 false in
-#align Mon.of_hom_apply MonCat.ofHom_apply
+#align AddMon.coe_of AddMonCat.coe_of
 
 @[to_additive]
 instance : Inhabited MonCat :=
@@ -123,41 +128,25 @@ instance : Inhabited MonCat :=
   ⟨@of PUnit (@DivInvMonoid.toMonoid _ (@Group.toDivInvMonoid _
     (@CommGroup.toGroup _ PUnit.commGroup)))⟩
 
+/-- Typecheck a `MonoidHom` as a morphism in `MonCat`. -/
 @[to_additive]
-instance (M : MonCat) : Monoid M :=
-  M.str
-
-@[to_additive (attr := simp)]
-theorem coe_of (R : Type u) [Monoid R] : (MonCat.of R : Type u) = R :=
-  rfl
+def ofHom {X Y : Type u} [Monoid X] [Monoid Y] (f : X →* Y) : of X ⟶ of Y := f
 set_option linter.uppercaseLean3 false in
-#align Mon.coe_of MonCat.coe_of
+#align Mon.of_hom MonCat.ofHom
 set_option linter.uppercaseLean3 false in
-#align AddMon.coe_of AddMonCat.coe_of
-
-@[to_additive]
-instance {G : Type _} [Group G] : Group (MonCat.of G) := by assumption
-
--- porting note: this was added to ease the port
-/-- the morphism in `MonCat` associated to a `MonoidHom` -/
-@[to_additive (attr := simp)]
-def Hom.mk {X Y : MonCat} (f : X →* Y) : X ⟶ Y := f
+#align AddMon.of_hom AddMonCat.ofHom
 
-/-- the morphism in `AddMonCat` associated to a `AddMonoidHom` -/
-add_decl_doc AddMonCat.Hom.mk
+/-- Typecheck a `AddMonoidHom` as a morphism in `AddMonCat`. -/
+add_decl_doc AddMonCat.ofHom
 
--- porting note: this lemma was added to make automation work in `MonCat.forget_reflects_isos`
 @[to_additive (attr := simp)]
-lemma Hom.map_mul {X Y : MonCat} (f : X ⟶ Y) (x y : X) :
-  ((forget MonCat).map f) (x * y) =
-    f x * f y := by
-  apply MonoidHom.map_mul (show MonoidHom X Y from f)
+lemma ofHom_apply {X Y : Type u} [Monoid X] [Monoid Y] (f : X →* Y) (x : X) :
+  (ofHom f) x = f x := rfl
+set_option linter.uppercaseLean3 false in
+#align Mon.of_hom_apply MonCat.ofHom_apply
 
--- porting note: added as a complement to `Hom.map_mul`
-@[to_additive (attr := simp)]
-lemma Hom.map_one {X Y : MonCat} (f : X ⟶ Y) :
-  ((forget MonCat).map f) (1 : X) = (1 : Y) := by
-  apply MonoidHom.map_one (show MonoidHom X Y from f)
+@[to_additive]
+instance {G : Type _} [Group G] : Group (MonCat.of G) := by assumption
 
 end MonCat
 
@@ -178,20 +167,43 @@ namespace CommMonCat
 @[to_additive]
 instance : BundledHom.ParentProjection @CommMonoid.toMonoid := ⟨⟩
 
-instance largeCategory : LargeCategory CommMonCat := by
-  dsimp only [CommMonCat]
-  infer_instance
+deriving instance LargeCategory for CommMonCat
+attribute [to_additive instAddCommMonCatLargeCategory] instCommMonCatLargeCategory
 
+@[to_additive]
 instance concreteCategory : ConcreteCategory CommMonCat := by
   dsimp only [CommMonCat]
   infer_instance
 
-attribute [to_additive] CommMonCat.largeCategory CommMonCat.concreteCategory
+@[to_additive]
+instance : CoeSort CommMonCat (Type _) where
+  coe X := X.α
 
 @[to_additive]
-instance : CoeSort CommMonCat (Type _) := by
-  dsimp only [CommMonCat]
-  infer_instance
+instance (X : CommMonCat) : CommMonoid X := X.str
+
+-- porting note: this instance was not necessary in mathlib
+@[to_additive]
+instance {X Y : CommMonCat} : CoeFun (X ⟶ Y) fun _ => X → Y where
+  coe (f : X →* Y) := f
+
+-- porting note: added
+@[to_additive (attr := simp)]
+lemma coe_id {X : CommMonCat} : (𝟙 X : X → X) = id := rfl
+
+-- porting note: added
+@[to_additive (attr := simp)]
+lemma coe_comp {X Y Z : CommMonCat} {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g : X → Z) = g ∘ f := rfl
+
+-- porting note: added
+@[to_additive (attr := simp)]
+lemma forget_map {X Y : CommMonCat} (f : X ⟶ Y) :
+    (forget CommMonCat).map f = (f : X → Y) :=
+  rfl
+
+@[to_additive (attr := ext)]
+lemma ext {X Y : CommMonCat} {f g : X ⟶ Y} (w : ∀ x : X, f x = g x) : f = g :=
+  MonoidHom.ext w
 
 /-- Construct a bundled `CommMonCat` from the underlying type and typeclass. -/
 @[to_additive]
@@ -210,11 +222,10 @@ instance : Inhabited CommMonCat :=
   -- The default instance for `CommMonoid PUnit` is derived via `CommRing` which breaks to_additive
   ⟨@of PUnit (@CommGroup.toCommMonoid _ PUnit.commGroup)⟩
 
+-- Porting note: removed `@[simp]` here, as it makes it harder to tell when to apply
+-- bundled or unbundled lemmas.
+-- (This change seems dangerous!)
 @[to_additive]
-instance (M : CommMonCat) : CommMonoid M :=
-  M.str
-
-@[to_additive (attr := simp)]
 theorem coe_of (R : Type u) [CommMonoid R] : (CommMonCat.of R : Type u) = R :=
   rfl
 set_option linter.uppercaseLean3 false in
@@ -233,72 +244,44 @@ set_option linter.uppercaseLean3 false in
 @[to_additive]
 instance : Coe CommMonCat.{u} MonCat.{u} where coe := (forget₂ CommMonCat MonCat).obj
 
--- porting note: this instance was not necessary in mathlib
-@[to_additive]
-instance {X Y : CommMonCat} : CoeFun (X ⟶ Y) fun _ => X → Y :=
-  ConcreteCategory.hasCoeToFun
-
--- porting note: this was added to make automation work
+-- porting note: this was added to make automation work (it already exists for MonCat)
 /-- Typecheck a `MonoidHom` as a morphism in `CommMonCat`. -/
 @[to_additive]
-def ofHom {X Y : Type u} [CommMonoid X] [CommMonoid Y] (f : X →* Y) : of X ⟶ of Y :=
-  f
+def ofHom {X Y : Type u} [CommMonoid X] [CommMonoid Y] (f : X →* Y) : of X ⟶ of Y := f
 
 /-- Typecheck a `AddMonoidHom` as a morphism in `AddCommMonCat`. -/
 add_decl_doc AddCommMonCat.ofHom
 
--- porting note: this was added to make automation work in `MulEquiv.toCommMonCatIso`
-@[to_additive (attr := simp) _root_.AddCommMonCat.ofHom_apply]
-lemma ofHom_apply {X Y : Type u} [CommMonoid X] [CommMonoid Y] (f : X →* Y) (x : X) :
-  ((forget CommMonCat).map (CommMonCat.ofHom f)) x = f x := rfl
-
--- porting note: this was added to make the following examples work
-/-- the morphism in `CommMonCat` associated to a `MonoidHom` -/
-@[to_additive (attr := simp)]
-def Hom.mk {X Y : CommMonCat} (f : X →* Y) : X ⟶ Y := f
-
-/-- the morphism in `AddCommMonCat` associated to a `AddMonoidHom` -/
-add_decl_doc AddCommMonCat.Hom.mk
-
--- porting note: this lemma was added to make automation work in `CommMonCat.forget_reflects_isos`
-@[to_additive (attr := simp)]
-lemma Hom.map_mul {X Y : CommMonCat} (f : X ⟶ Y) (x y : X) :
-  ((forget CommMonCat).map f) (x * y) = f x * f y := by
-  apply MonoidHom.map_mul (show MonoidHom X Y from f)
-
--- porting note: added as a complement to `Hom.map_mul`
 @[to_additive (attr := simp)]
-lemma Hom.map_one {X Y : CommMonCat} (f : X ⟶ Y) :
-  ((forget CommMonCat).map f) (1 : X) = (1 : Y) := by
-  apply MonoidHom.map_one (show MonoidHom X Y from f)
+lemma ofHom_apply {X Y : Type u} [CommMonoid X] [CommMonoid Y] (f : X →* Y) (x : X) :
+  (ofHom f) x = f x := rfl
 
 end CommMonCat
 
 -- We verify that the coercions of morphisms to functions work correctly:
 example {R S : MonCat} (f : R ⟶ S) : ↑R → ↑S := f
 
+-- Porting note: it's essential that simp lemmas for `→*` apply to morphisms.
+example {R S : MonCat} (i : R ⟶ S) (r : R) (h : r = 1) : i r = 1 := by simp [h]
+
 example {R S : CommMonCat} (f : R ⟶ S) : ↑R → ↑S := f
 
+example {R S : CommMonCat} (i : R ⟶ S) (r : R) (h : r = 1) : i r = 1 := by simp [h]
+
 -- We verify that when constructing a morphism in `CommMonCat`,
--- when we construct the `toFun` field, the types are presented as `↥R`,
--- rather than `R.α` or (as we used to have) `↥(bundled.map comm_monoid.to_monoid R)`.
+-- when we construct the `toFun` field, the types are presented as `↑R`.
 example (R : CommMonCat.{u}) : R ⟶ R :=
-  -- porting note: the constructor `CommMonCat.Hom.mk` was added to make this example work
-  CommMonCat.Hom.mk
-    { toFun := fun x => by
-        match_target (R : Type u)
-        -- porting note: is there an equivalent of `match_hyp` in Lean4?
-        --match_hyp x : (R : Type u)
-        exact x * x
-      map_one' := by simp
-      map_mul' := fun x y => by
-        dsimp
-        rw [mul_assoc x y (x * y), ← mul_assoc y x y, mul_comm y x, mul_assoc, mul_assoc] }
+  { toFun := fun x => by
+      match_target (R : Type u)
+      guard_hyp x : (R : Type u)
+      exact x * x
+    map_one' := by simp
+    map_mul' := fun x y => by
+      dsimp
+      rw [mul_assoc x y (x * y), ← mul_assoc y x y, mul_comm y x, mul_assoc, mul_assoc] }
 
 variable {X Y : Type u}
 
-attribute [local ext] ConcreteCategory.hom_ext
-
 section
 
 variable [Monoid X] [Monoid Y]
@@ -408,7 +391,7 @@ instance CommMonCat.forget_reflects_isos : ReflectsIsomorphisms (forget CommMonC
   reflects {X Y} f _ := by
     let i := asIso ((forget CommMonCat).map f)
     let e : X ≃* Y := MulEquiv.mk i.toEquiv
-    -- porting note: same remark as for `MonCat.forget_reflects_iso`
+      -- Porting FIXME: this would ideally be `by aesop`, as in `MonCat.forget_reflects_isos`
       (MonoidHom.map_mul (show MonoidHom X Y from f))
     exact IsIso.of_iso e.toCommMonCatIso
 set_option linter.uppercaseLean3 false in
feat: forward-port #18148 (#3104)

Co-authored-by: 101damnations <101damnations@github.com> Co-authored-by: Scott Morrison <scott@tqft.net>

Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Scott Morrison
 
 ! This file was ported from Lean 3 source module algebra.category.Mon.basic
-! leanprover-community/mathlib commit 4125b9adf2e268d1cf438092d690a78f7c664743
+! leanprover-community/mathlib commit 0caf3701139ef2e69c215717665361cda205a90b
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -135,6 +135,9 @@ set_option linter.uppercaseLean3 false in
 set_option linter.uppercaseLean3 false in
 #align AddMon.coe_of AddMonCat.coe_of
 
+@[to_additive]
+instance {G : Type _} [Group G] : Group (MonCat.of G) := by assumption
+
 -- porting note: this was added to ease the port
 /-- the morphism in `MonCat` associated to a `MonoidHom` -/
 @[to_additive (attr := simp)]
feat: port Algebra.Category.Group.Basic (#3036)
Diff
@@ -294,6 +294,8 @@ example (R : CommMonCat.{u}) : R ⟶ R :=
 
 variable {X Y : Type u}
 
+attribute [local ext] ConcreteCategory.hom_ext
+
 section
 
 variable [Monoid X] [Monoid Y]
feat: port Algebra.Category.Mon.Basic (#2902)

Co-authored-by: Joël Riou <joel.riou@universite-paris-saclay.fr>

Dependencies 3 + 227

228 files ported (98.7%)
85132 lines ported (98.8%)
Show graph

The unported dependencies are