algebra.category.Semigroup.basic
⟷
Mathlib.Algebra.Category.SemigroupCat.Basic
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.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(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)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -304,7 +304,8 @@ def mulEquivIsoSemigroupCatIso {X Y : Type u} [Semigroup X] [Semigroup Y] :
#print MagmaCat.forgetReflectsIsos /-
@[to_additive]
-instance MagmaCat.forgetReflectsIsos : ReflectsIsomorphisms (forget MagmaCat.{u})
+instance MagmaCat.forgetReflectsIsos :
+ CategoryTheory.Functor.ReflectsIsomorphisms (forget MagmaCat.{u})
where reflects X Y f _ := by
skip
let i := as_iso ((forget MagmaCat).map f)
@@ -316,7 +317,8 @@ instance MagmaCat.forgetReflectsIsos : ReflectsIsomorphisms (forget MagmaCat.{u}
#print SemigroupCat.forgetReflectsIsos /-
@[to_additive]
-instance SemigroupCat.forgetReflectsIsos : ReflectsIsomorphisms (forget SemigroupCat.{u})
+instance SemigroupCat.forgetReflectsIsos :
+ CategoryTheory.Functor.ReflectsIsomorphisms (forget SemigroupCat.{u})
where reflects X Y f _ := by
skip
let i := as_iso ((forget SemigroupCat).map f)
@@ -333,5 +335,6 @@ reflect isomorphisms.
-/
-example : ReflectsIsomorphisms (forget₂ SemigroupCat MagmaCat) := by infer_instance
+example : CategoryTheory.Functor.ReflectsIsomorphisms (forget₂ SemigroupCat MagmaCat) := by
+ infer_instance
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -3,10 +3,10 @@ Copyright (c) 2021 Julian Kuelshammer. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Julian Kuelshammer
-/
-import Algebra.PemptyInstances
-import Algebra.Hom.Equiv.Basic
+import Algebra.PEmptyInstances
+import Algebra.Group.Equiv.Basic
import CategoryTheory.ConcreteCategory.BundledHom
-import CategoryTheory.Functor.ReflectsIsomorphisms
+import CategoryTheory.Functor.ReflectsIso
import CategoryTheory.Elementwise
#align_import algebra.category.Semigroup.basic from "leanprover-community/mathlib"@"728ef9dbb281241906f25cbeb30f90d83e0bb451"
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,11 +3,11 @@ Copyright (c) 2021 Julian Kuelshammer. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Julian Kuelshammer
-/
-import Mathbin.Algebra.PemptyInstances
-import Mathbin.Algebra.Hom.Equiv.Basic
-import Mathbin.CategoryTheory.ConcreteCategory.BundledHom
-import Mathbin.CategoryTheory.Functor.ReflectsIsomorphisms
-import Mathbin.CategoryTheory.Elementwise
+import Algebra.PemptyInstances
+import Algebra.Hom.Equiv.Basic
+import CategoryTheory.ConcreteCategory.BundledHom
+import CategoryTheory.Functor.ReflectsIsomorphisms
+import CategoryTheory.Elementwise
#align_import algebra.category.Semigroup.basic from "leanprover-community/mathlib"@"728ef9dbb281241906f25cbeb30f90d83e0bb451"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,11 +2,6 @@
Copyright (c) 2021 Julian Kuelshammer. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Julian Kuelshammer
-
-! This file was ported from Lean 3 source module algebra.category.Semigroup.basic
-! leanprover-community/mathlib commit 728ef9dbb281241906f25cbeb30f90d83e0bb451
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Algebra.PemptyInstances
import Mathbin.Algebra.Hom.Equiv.Basic
@@ -14,6 +9,8 @@ import Mathbin.CategoryTheory.ConcreteCategory.BundledHom
import Mathbin.CategoryTheory.Functor.ReflectsIsomorphisms
import Mathbin.CategoryTheory.Elementwise
+#align_import algebra.category.Semigroup.basic from "leanprover-community/mathlib"@"728ef9dbb281241906f25cbeb30f90d83e0bb451"
+
/-!
# Category instances for has_mul, has_add, semigroup and add_semigroup
mathlib commit https://github.com/leanprover-community/mathlib/commit/728ef9dbb281241906f25cbeb30f90d83e0bb451
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Julian Kuelshammer
! This file was ported from Lean 3 source module algebra.category.Semigroup.basic
-! leanprover-community/mathlib commit 47b51515e69f59bca5cf34ef456e6000fe205a69
+! leanprover-community/mathlib commit 728ef9dbb281241906f25cbeb30f90d83e0bb451
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -17,6 +17,9 @@ import Mathbin.CategoryTheory.Elementwise
/-!
# Category instances for has_mul, has_add, semigroup and add_semigroup
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
We introduce the bundled categories:
* `Magma`
* `AddMagma`
mathlib commit https://github.com/leanprover-community/mathlib/commit/9240e8be927a0955b9a82c6c85ef499ee3a626b8
@@ -37,80 +37,94 @@ universe u v
open CategoryTheory
+#print MagmaCat /-
/-- The category of magmas and magma morphisms. -/
-@[to_additive AddMagma]
-def Magma : Type (u + 1) :=
+@[to_additive AddMagmaCat]
+def MagmaCat : Type (u + 1) :=
Bundled Mul
-#align Magma Magma
-#align AddMagma AddMagma
+#align Magma MagmaCat
+#align AddMagma AddMagmaCat
+-/
/-- The category of additive magmas and additive magma morphisms. -/
-add_decl_doc AddMagma
+add_decl_doc AddMagmaCat
-namespace Magma
+namespace MagmaCat
+#print MagmaCat.bundledHom /-
@[to_additive]
instance bundledHom : BundledHom @MulHom :=
⟨@MulHom.toFun, @MulHom.id, @MulHom.comp, @MulHom.coe_inj⟩
-#align Magma.bundled_hom Magma.bundledHom
-#align AddMagma.bundled_hom AddMagma.bundledHom
+#align Magma.bundled_hom MagmaCat.bundledHom
+#align AddMagma.bundled_hom AddMagmaCat.bundledHom
+-/
-deriving instance LargeCategory, ConcreteCategory for Magma
+deriving instance LargeCategory, ConcreteCategory for MagmaCat
-attribute [to_additive] Magma.largeCategory Magma.concreteCategory
+attribute [to_additive] MagmaCat.largeCategory MagmaCat.concreteCategory
@[to_additive]
-instance : CoeSort Magma (Type _) :=
+instance : CoeSort MagmaCat (Type _) :=
Bundled.hasCoeToSort
+#print MagmaCat.of /-
/-- Construct a bundled `Magma` from the underlying type and typeclass. -/
@[to_additive]
-def of (M : Type u) [Mul M] : Magma :=
+def of (M : Type u) [Mul M] : MagmaCat :=
Bundled.of M
-#align Magma.of Magma.of
-#align AddMagma.of AddMagma.of
+#align Magma.of MagmaCat.of
+#align AddMagma.of AddMagmaCat.of
+-/
/-- Construct a bundled `AddMagma` from the underlying type and typeclass. -/
-add_decl_doc AddMagma.of
+add_decl_doc AddMagmaCat.of
+#print MagmaCat.ofHom /-
/-- Typecheck a `mul_hom` as a morphism in `Magma`. -/
@[to_additive]
def ofHom {X Y : Type u} [Mul X] [Mul Y] (f : X →ₙ* Y) : of X ⟶ of Y :=
f
-#align Magma.of_hom Magma.ofHom
-#align AddMagma.of_hom AddMagma.ofHom
+#align Magma.of_hom MagmaCat.ofHom
+#align AddMagma.of_hom AddMagmaCat.ofHom
+-/
/-- Typecheck a `add_hom` as a morphism in `AddMagma`. -/
-add_decl_doc AddMagma.ofHom
+add_decl_doc AddMagmaCat.ofHom
+#print MagmaCat.ofHom_apply /-
@[simp, to_additive]
theorem ofHom_apply {X Y : Type u} [Mul X] [Mul Y] (f : X →ₙ* Y) (x : X) : ofHom f x = f x :=
rfl
-#align Magma.of_hom_apply Magma.ofHom_apply
-#align AddMagma.of_hom_apply AddMagma.ofHom_apply
+#align Magma.of_hom_apply MagmaCat.ofHom_apply
+#align AddMagma.of_hom_apply AddMagmaCat.ofHom_apply
+-/
@[to_additive]
-instance : Inhabited Magma :=
- ⟨Magma.of PEmpty⟩
+instance : Inhabited MagmaCat :=
+ ⟨MagmaCat.of PEmpty⟩
@[to_additive]
-instance (M : Magma) : Mul M :=
+instance (M : MagmaCat) : Mul M :=
M.str
+#print MagmaCat.coe_of /-
@[simp, to_additive]
-theorem coe_of (R : Type u) [Mul R] : (Magma.of R : Type u) = R :=
+theorem coe_of (R : Type u) [Mul R] : (MagmaCat.of R : Type u) = R :=
rfl
-#align Magma.coe_of Magma.coe_of
-#align AddMagma.coe_of AddMagma.coe_of
+#align Magma.coe_of MagmaCat.coe_of
+#align AddMagma.coe_of AddMagmaCat.coe_of
+-/
-end Magma
+end MagmaCat
+#print SemigroupCat /-
/-- The category of semigroups and semigroup morphisms. -/
@[to_additive AddSemigroupCat]
def SemigroupCat : Type (u + 1) :=
Bundled Semigroup
#align Semigroup SemigroupCat
#align AddSemigroup AddSemigroupCat
+-/
/-- The category of additive semigroups and semigroup morphisms. -/
add_decl_doc AddSemigroupCat
@@ -129,32 +143,38 @@ attribute [to_additive] SemigroupCat.largeCategory SemigroupCat.concreteCategory
instance : CoeSort SemigroupCat (Type _) :=
Bundled.hasCoeToSort
+#print SemigroupCat.of /-
/-- Construct a bundled `Semigroup` from the underlying type and typeclass. -/
@[to_additive]
def of (M : Type u) [Semigroup M] : SemigroupCat :=
Bundled.of M
#align Semigroup.of SemigroupCat.of
#align AddSemigroup.of AddSemigroupCat.of
+-/
/-- Construct a bundled `AddSemigroup` from the underlying type and typeclass. -/
add_decl_doc AddSemigroupCat.of
+#print SemigroupCat.ofHom /-
/-- Typecheck a `mul_hom` as a morphism in `Semigroup`. -/
@[to_additive]
def ofHom {X Y : Type u} [Semigroup X] [Semigroup Y] (f : X →ₙ* Y) : of X ⟶ of Y :=
f
#align Semigroup.of_hom SemigroupCat.ofHom
#align AddSemigroup.of_hom AddSemigroupCat.ofHom
+-/
/-- Typecheck a `add_hom` as a morphism in `AddSemigroup`. -/
add_decl_doc AddSemigroupCat.ofHom
+#print SemigroupCat.ofHom_apply /-
@[simp, to_additive]
theorem ofHom_apply {X Y : Type u} [Semigroup X] [Semigroup Y] (f : X →ₙ* Y) (x : X) :
ofHom f x = f x :=
rfl
#align Semigroup.of_hom_apply SemigroupCat.ofHom_apply
#align AddSemigroup.of_hom_apply AddSemigroupCat.ofHom_apply
+-/
@[to_additive]
instance : Inhabited SemigroupCat :=
@@ -164,17 +184,21 @@ instance : Inhabited SemigroupCat :=
instance (M : SemigroupCat) : Semigroup M :=
M.str
+#print SemigroupCat.coe_of /-
@[simp, to_additive]
theorem coe_of (R : Type u) [Semigroup R] : (SemigroupCat.of R : Type u) = R :=
rfl
#align Semigroup.coe_of SemigroupCat.coe_of
#align AddSemigroup.coe_of AddSemigroupCat.coe_of
+-/
+#print SemigroupCat.hasForgetToMagmaCat /-
@[to_additive has_forget_to_AddMagma]
-instance hasForgetToMagma : HasForget₂ SemigroupCat Magma :=
+instance hasForgetToMagmaCat : HasForget₂ SemigroupCat MagmaCat :=
BundledHom.forget₂ _ _
-#align Semigroup.has_forget_to_Magma SemigroupCat.hasForgetToMagma
-#align AddSemigroup.has_forget_to_AddMagma AddSemigroupCat.hasForgetToAddMagma
+#align Semigroup.has_forget_to_Magma SemigroupCat.hasForgetToMagmaCat
+#align AddSemigroup.has_forget_to_AddMagma AddSemigroupCat.hasForgetToAddMagmaCat
+-/
end SemigroupCat
@@ -184,16 +208,18 @@ section
variable [Mul X] [Mul Y]
+#print MulEquiv.toMagmaCatIso /-
/-- Build an isomorphism in the category `Magma` from a `mul_equiv` between `has_mul`s. -/
-@[to_additive AddEquiv.toAddMagmaIso
+@[to_additive AddEquiv.toAddMagmaCatIso
"Build an isomorphism in the category `AddMagma` from\nan `add_equiv` between `has_add`s.",
simps]
-def MulEquiv.toMagmaIso (e : X ≃* Y) : Magma.of X ≅ Magma.of Y
+def MulEquiv.toMagmaCatIso (e : X ≃* Y) : MagmaCat.of X ≅ MagmaCat.of Y
where
Hom := e.toMulHom
inv := e.symm.toMulHom
-#align mul_equiv.to_Magma_iso MulEquiv.toMagmaIso
-#align add_equiv.to_AddMagma_iso AddEquiv.toAddMagmaIso
+#align mul_equiv.to_Magma_iso MulEquiv.toMagmaCatIso
+#align add_equiv.to_AddMagma_iso AddEquiv.toAddMagmaCatIso
+-/
end
@@ -201,90 +227,104 @@ section
variable [Semigroup X] [Semigroup Y]
+#print MulEquiv.toSemigroupCatIso /-
/-- Build an isomorphism in the category `Semigroup` from a `mul_equiv` between `semigroup`s. -/
-@[to_additive AddEquiv.toAddSemigroupIso
+@[to_additive AddEquiv.toAddSemigroupCatIso
"Build an isomorphism in the category\n`AddSemigroup` from an `add_equiv` between `add_semigroup`s.",
simps]
-def MulEquiv.toSemigroupIso (e : X ≃* Y) : SemigroupCat.of X ≅ SemigroupCat.of Y
+def MulEquiv.toSemigroupCatIso (e : X ≃* Y) : SemigroupCat.of X ≅ SemigroupCat.of Y
where
Hom := e.toMulHom
inv := e.symm.toMulHom
-#align mul_equiv.to_Semigroup_iso MulEquiv.toSemigroupIso
-#align add_equiv.to_AddSemigroup_iso AddEquiv.toAddSemigroupIso
+#align mul_equiv.to_Semigroup_iso MulEquiv.toSemigroupCatIso
+#align add_equiv.to_AddSemigroup_iso AddEquiv.toAddSemigroupCatIso
+-/
end
namespace CategoryTheory.Iso
+#print CategoryTheory.Iso.magmaCatIsoToMulEquiv /-
/-- Build a `mul_equiv` from an isomorphism in the category `Magma`. -/
@[to_additive AddMagma_iso_to_add_equiv
"Build an `add_equiv` from an isomorphism in the category\n`AddMagma`."]
-def magmaIsoToMulEquiv {X Y : Magma} (i : X ≅ Y) : X ≃* Y
+def magmaCatIsoToMulEquiv {X Y : MagmaCat} (i : X ≅ Y) : X ≃* Y
where
toFun := i.Hom
invFun := i.inv
left_inv x := by simp
right_inv y := by simp
map_mul' := by simp
-#align category_theory.iso.Magma_iso_to_mul_equiv CategoryTheory.Iso.magmaIsoToMulEquiv
-#align category_theory.iso.AddMagma_iso_to_add_equiv CategoryTheory.Iso.addMagmaIsoToAddEquiv
+#align category_theory.iso.Magma_iso_to_mul_equiv CategoryTheory.Iso.magmaCatIsoToMulEquiv
+#align category_theory.iso.AddMagma_iso_to_add_equiv CategoryTheory.Iso.addMagmaCatIsoToAddEquiv
+-/
+#print CategoryTheory.Iso.semigroupCatIsoToMulEquiv /-
/-- Build a `mul_equiv` from an isomorphism in the category `Semigroup`. -/
@[to_additive "Build an `add_equiv` from an isomorphism in the category\n`AddSemigroup`."]
-def semigroupIsoToMulEquiv {X Y : SemigroupCat} (i : X ≅ Y) : X ≃* Y
+def semigroupCatIsoToMulEquiv {X Y : SemigroupCat} (i : X ≅ Y) : X ≃* Y
where
toFun := i.Hom
invFun := i.inv
left_inv x := by simp
right_inv y := by simp
map_mul' := by simp
-#align category_theory.iso.Semigroup_iso_to_mul_equiv CategoryTheory.Iso.semigroupIsoToMulEquiv
-#align category_theory.iso.Semigroup_iso_to_add_equiv CategoryTheory.Iso.semigroupIsoToAddEquiv
+#align category_theory.iso.Semigroup_iso_to_mul_equiv CategoryTheory.Iso.semigroupCatIsoToMulEquiv
+#align category_theory.iso.Semigroup_iso_to_add_equiv CategoryTheory.Iso.addSemigroupCatIsoToAddEquiv
+-/
end CategoryTheory.Iso
+#print mulEquivIsoMagmaIso /-
/-- multiplicative equivalences between `has_mul`s are the same as (isomorphic to) isomorphisms
in `Magma` -/
@[to_additive addEquivIsoAddMagmaIso
"additive equivalences between `has_add`s are the same\nas (isomorphic to) isomorphisms in `AddMagma`"]
-def mulEquivIsoMagmaIso {X Y : Type u} [Mul X] [Mul Y] : X ≃* Y ≅ Magma.of X ≅ Magma.of Y
+def mulEquivIsoMagmaIso {X Y : Type u} [Mul X] [Mul Y] : X ≃* Y ≅ MagmaCat.of X ≅ MagmaCat.of Y
where
- Hom e := e.toMagmaIso
- inv i := i.magmaIsoToMulEquiv
+ Hom e := e.toMagmaCatIso
+ inv i := i.magmaCatIsoToMulEquiv
#align mul_equiv_iso_Magma_iso mulEquivIsoMagmaIso
#align add_equiv_iso_AddMagma_iso addEquivIsoAddMagmaIso
+-/
+#print mulEquivIsoSemigroupCatIso /-
/-- multiplicative equivalences between `semigroup`s are the same as (isomorphic to) isomorphisms
in `Semigroup` -/
-@[to_additive addEquivIsoAddSemigroupIso
+@[to_additive addEquivIsoAddSemigroupCatIso
"additive equivalences between `add_semigroup`s are\nthe same as (isomorphic to) isomorphisms in `AddSemigroup`"]
-def mulEquivIsoSemigroupIso {X Y : Type u} [Semigroup X] [Semigroup Y] :
+def mulEquivIsoSemigroupCatIso {X Y : Type u} [Semigroup X] [Semigroup Y] :
X ≃* Y ≅ SemigroupCat.of X ≅ SemigroupCat.of Y
where
- Hom e := e.toSemigroupIso
- inv i := i.semigroupIsoToMulEquiv
-#align mul_equiv_iso_Semigroup_iso mulEquivIsoSemigroupIso
-#align add_equiv_iso_AddSemigroup_iso addEquivIsoAddSemigroupIso
+ Hom e := e.toSemigroupCatIso
+ inv i := i.semigroupCatIsoToMulEquiv
+#align mul_equiv_iso_Semigroup_iso mulEquivIsoSemigroupCatIso
+#align add_equiv_iso_AddSemigroup_iso addEquivIsoAddSemigroupCatIso
+-/
+#print MagmaCat.forgetReflectsIsos /-
@[to_additive]
-instance Magma.forget_reflects_isos : ReflectsIsomorphisms (forget Magma.{u})
+instance MagmaCat.forgetReflectsIsos : ReflectsIsomorphisms (forget MagmaCat.{u})
where reflects X Y f _ := by
skip
- let i := as_iso ((forget Magma).map f)
+ let i := as_iso ((forget MagmaCat).map f)
let e : X ≃* Y := { f, i.to_equiv with }
exact ⟨(is_iso.of_iso e.to_Magma_iso).1⟩
-#align Magma.forget_reflects_isos Magma.forget_reflects_isos
-#align AddMagma.forget_reflects_isos AddMagma.forget_reflects_isos
+#align Magma.forget_reflects_isos MagmaCat.forgetReflectsIsos
+#align AddMagma.forget_reflects_isos AddMagmaCat.forgetReflectsIsos
+-/
+#print SemigroupCat.forgetReflectsIsos /-
@[to_additive]
-instance SemigroupCat.forget_reflects_isos : ReflectsIsomorphisms (forget SemigroupCat.{u})
+instance SemigroupCat.forgetReflectsIsos : ReflectsIsomorphisms (forget SemigroupCat.{u})
where reflects X Y f _ := by
skip
let i := as_iso ((forget SemigroupCat).map f)
let e : X ≃* Y := { f, i.to_equiv with }
exact ⟨(is_iso.of_iso e.to_Semigroup_iso).1⟩
-#align Semigroup.forget_reflects_isos SemigroupCat.forget_reflects_isos
-#align AddSemigroup.forget_reflects_isos AddSemigroupCat.forget_reflects_isos
+#align Semigroup.forget_reflects_isos SemigroupCat.forgetReflectsIsos
+#align AddSemigroup.forget_reflects_isos AddSemigroupCat.forgetReflectsIsos
+-/
/-!
Once we've shown that the forgetful functors to type reflect isomorphisms,
@@ -293,5 +333,5 @@ reflect isomorphisms.
-/
-example : ReflectsIsomorphisms (forget₂ SemigroupCat Magma) := by infer_instance
+example : ReflectsIsomorphisms (forget₂ SemigroupCat MagmaCat) := by infer_instance
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
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>
@@ -326,7 +326,8 @@ instance SemigroupCat.forgetReflectsIsos : (forget SemigroupCat.{u}).ReflectsIso
-- automatically reflects isomorphisms
-- we could have used `CategoryTheory.ConcreteCategory.ReflectsIso` alternatively
@[to_additive]
-instance SemigroupCat.forget₂Full : (forget₂ SemigroupCat MagmaCat).Full where preimage f := f
+instance SemigroupCat.forget₂_full : (forget₂ SemigroupCat MagmaCat).Full where
+ map_surjective f := ⟨f, rfl⟩
/-!
Once we've shown that the forgetful functors to type reflect isomorphisms,
These notions on functors are now Functor.Full
, Functor.Faithful
, Functor.EssSurj
, Functor.IsEquivalence
, Functor.ReflectsIsomorphisms
. Deprecated aliases are introduced for the previous names.
@@ -305,7 +305,7 @@ def mulEquivIsoSemigroupCatIso {X Y : Type u} [Semigroup X] [Semigroup Y] :
#align add_equiv_iso_AddSemigroup_iso addEquivIsoAddSemigroupCatIso
@[to_additive]
-instance MagmaCat.forgetReflectsIsos : ReflectsIsomorphisms (forget MagmaCat.{u}) where
+instance MagmaCat.forgetReflectsIsos : (forget MagmaCat.{u}).ReflectsIsomorphisms where
reflects {X Y} f _ := by
let i := asIso ((forget MagmaCat).map f)
let e : X ≃* Y := { f, i.toEquiv with }
@@ -314,7 +314,7 @@ instance MagmaCat.forgetReflectsIsos : ReflectsIsomorphisms (forget MagmaCat.{u}
#align AddMagma.forget_reflects_isos AddMagmaCat.forgetReflectsIsos
@[to_additive]
-instance SemigroupCat.forgetReflectsIsos : ReflectsIsomorphisms (forget SemigroupCat.{u}) where
+instance SemigroupCat.forgetReflectsIsos : (forget SemigroupCat.{u}).ReflectsIsomorphisms where
reflects {X Y} f _ := by
let i := asIso ((forget SemigroupCat).map f)
let e : X ≃* Y := { f, i.toEquiv with }
@@ -326,7 +326,7 @@ instance SemigroupCat.forgetReflectsIsos : ReflectsIsomorphisms (forget Semigrou
-- automatically reflects isomorphisms
-- we could have used `CategoryTheory.ConcreteCategory.ReflectsIso` alternatively
@[to_additive]
-instance SemigroupCat.forget₂Full : Full (forget₂ SemigroupCat MagmaCat) where preimage f := f
+instance SemigroupCat.forget₂Full : (forget₂ SemigroupCat MagmaCat).Full where preimage f := f
/-!
Once we've shown that the forgetful functors to type reflect isomorphisms,
@@ -334,4 +334,4 @@ we automatically obtain that the `forget₂` functors between our concrete categ
reflect isomorphisms.
-/
-example : ReflectsIsomorphisms (forget₂ SemigroupCat MagmaCat) := inferInstance
+example : (forget₂ SemigroupCat MagmaCat).ReflectsIsomorphisms := inferInstance
Mostly automatic, with a few manual corrections.
@@ -262,9 +262,9 @@ end
namespace CategoryTheory.Iso
-/-- Build a `MulEquiv` from an isomorphism in the category `Magma`. -/
+/-- Build a `MulEquiv` from an isomorphism in the category `MagmaCat`. -/
@[to_additive
- "Build an `AddEquiv` from an isomorphism in the category `AddMagma`."]
+ "Build an `AddEquiv` from an isomorphism in the category `AddMagmaCat`."]
def magmaCatIsoToMulEquiv {X Y : MagmaCat} (i : X ≅ Y) : X ≃* Y :=
MulHom.toMulEquiv i.hom i.inv i.hom_inv_id i.inv_hom_id
#align category_theory.iso.Magma_iso_to_mul_equiv CategoryTheory.Iso.magmaCatIsoToMulEquiv
@@ -281,10 +281,10 @@ def semigroupCatIsoToMulEquiv {X Y : SemigroupCat} (i : X ≅ Y) : X ≃* Y :=
end CategoryTheory.Iso
/-- multiplicative equivalences between `Mul`s are the same as (isomorphic to) isomorphisms
-in `Magma` -/
+in `MagmaCat` -/
@[to_additive
"additive equivalences between `Add`s are the same
- as (isomorphic to) isomorphisms in `AddMagma`"]
+ as (isomorphic to) isomorphisms in `AddMagmaCat`"]
def mulEquivIsoMagmaIso {X Y : Type u} [Mul X] [Mul Y] :
X ≃* Y ≅ MagmaCat.of X ≅ MagmaCat.of Y where
hom e := e.toMagmaCatIso
Homogenises porting notes via capitalisation and addition of whitespace.
It makes the following changes:
@@ -49,7 +49,7 @@ namespace MagmaCat
@[to_additive]
instance bundledHom : BundledHom @MulHom :=
⟨@MulHom.toFun, @MulHom.id, @MulHom.comp,
- --Porting note: was `@MulHom.coe_inj` which is deprecated
+ -- Porting note: was `@MulHom.coe_inj` which is deprecated
by intros; apply @DFunLike.coe_injective, by aesop_cat, by aesop_cat⟩
#align Magma.bundled_hom MagmaCat.bundledHom
#align AddMagma.bundled_hom AddMagmaCat.bundledHom
@@ -322,7 +322,7 @@ instance SemigroupCat.forgetReflectsIsos : ReflectsIsomorphisms (forget Semigrou
#align Semigroup.forget_reflects_isos SemigroupCat.forgetReflectsIsos
#align AddSemigroup.forget_reflects_isos AddSemigroupCat.forgetReflectsIsos
--- 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]
In this pull request, I have systematically eliminated the leading whitespace preceding the colon (:
) within all unlabelled or unclassified porting notes. This adjustment facilitates a more efficient review process for the remaining notes by ensuring no entries are overlooked due to formatting inconsistencies.
@@ -49,7 +49,7 @@ namespace MagmaCat
@[to_additive]
instance bundledHom : BundledHom @MulHom :=
⟨@MulHom.toFun, @MulHom.id, @MulHom.comp,
- --Porting note : was `@MulHom.coe_inj` which is deprecated
+ --Porting note: was `@MulHom.coe_inj` which is deprecated
by intros; apply @DFunLike.coe_injective, by aesop_cat, by aesop_cat⟩
#align Magma.bundled_hom MagmaCat.bundledHom
#align AddMagma.bundled_hom AddMagmaCat.bundledHom
@@ -66,7 +66,7 @@ attribute [to_additive] instMagmaCatLargeCategory instConcreteCategory
instance : CoeSort MagmaCat (Type*) where
coe X := X.α
--- Porting note : Hinting to Lean that `forget R` and `R` are the same
+-- Porting note: Hinting to Lean that `forget R` and `R` are the same
unif_hint forget_obj_eq_coe (R : MagmaCat) where ⊢
(forget MagmaCat).obj R ≟ R
unif_hint _root_.AddMagmaCat.forget_obj_eq_coe (R : AddMagmaCat) where ⊢
@@ -155,7 +155,7 @@ attribute [to_additive] instSemigroupCatLargeCategory SemigroupCat.instConcreteC
instance : CoeSort SemigroupCat (Type*) where
coe X := X.α
--- Porting note : Hinting to Lean that `forget R` and `R` are the same
+-- Porting note: Hinting to Lean that `forget R` and `R` are the same
unif_hint forget_obj_eq_coe (R : SemigroupCat) where ⊢
(forget SemigroupCat).obj R ≟ R
unif_hint _root_.AddSemigroupCat.forget_obj_eq_coe (R : AddSemigroupCat) where ⊢
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.
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]
.
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_param
s, [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 sometimesThis 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.
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 outParam
s 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.)
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>
@@ -75,6 +75,10 @@ unif_hint _root_.AddMagmaCat.forget_obj_eq_coe (R : AddMagmaCat) where ⊢
@[to_additive]
instance (X : MagmaCat) : Mul X := X.str
+@[to_additive]
+instance instFunLike (X Y : MagmaCat) : FunLike (X ⟶ Y) X Y :=
+ inferInstanceAs <| FunLike (X →ₙ* Y) X Y
+
@[to_additive]
instance instMulHomClass (X Y : MagmaCat) : MulHomClass (X ⟶ Y) X Y :=
inferInstanceAs <| MulHomClass (X →ₙ* Y) X Y
@@ -160,6 +164,10 @@ unif_hint _root_.AddSemigroupCat.forget_obj_eq_coe (R : AddSemigroupCat) where
@[to_additive]
instance (X : SemigroupCat) : Semigroup X := X.str
+@[to_additive]
+instance instFunLike (X Y : SemigroupCat) : FunLike (X ⟶ Y) X Y :=
+ inferInstanceAs <| FunLike (X →ₙ* Y) X Y
+
@[to_additive]
instance instMulHomClass (X Y : SemigroupCat) : MulHomClass (X ⟶ Y) X Y :=
inferInstanceAs <| MulHomClass (X →ₙ* Y) X Y
@@ -7,7 +7,6 @@ import Mathlib.Algebra.PEmptyInstances
import Mathlib.Algebra.Group.Equiv.Basic
import Mathlib.CategoryTheory.ConcreteCategory.BundledHom
import Mathlib.CategoryTheory.Functor.ReflectsIso
-import Mathlib.CategoryTheory.Elementwise
#align_import algebra.category.Semigroup.basic from "leanprover-community/mathlib"@"47b51515e69f59bca5cf34ef456e6000fe205a69"
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 def
s or abbrev
s.
@@ -99,7 +99,7 @@ theorem coe_of (R : Type u) [Mul R] : (MagmaCat.of R : Type u) = R :=
@[to_additive (attr := simp)]
lemma mulEquiv_coe_eq {X Y : Type _} [Mul X] [Mul Y] (e : X ≃* Y) :
(@DFunLike.coe (MagmaCat.of X ⟶ MagmaCat.of Y) _ (fun _ => (forget MagmaCat).obj _)
- ConcreteCategory.instDFunLike (e : X →ₙ* Y) : X → Y) = ↑e :=
+ ConcreteCategory.instFunLike (e : X →ₙ* Y) : X → Y) = ↑e :=
rfl
/-- Typecheck a `MulHom` as a morphism in `MagmaCat`. -/
@@ -184,7 +184,7 @@ theorem coe_of (R : Type u) [Semigroup R] : (SemigroupCat.of R : Type u) = R :=
@[to_additive (attr := simp)]
lemma mulEquiv_coe_eq {X Y : Type _} [Semigroup X] [Semigroup Y] (e : X ≃* Y) :
(@DFunLike.coe (SemigroupCat.of X ⟶ SemigroupCat.of Y) _ (fun _ => (forget SemigroupCat).obj _)
- ConcreteCategory.instDFunLike (e : X →ₙ* Y) : X → Y) = ↑e :=
+ ConcreteCategory.instFunLike (e : X →ₙ* Y) : X → Y) = ↑e :=
rfl
/-- Typecheck a `MulHom` as a morphism in `SemigroupCat`. -/
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>
@@ -51,7 +51,7 @@ namespace MagmaCat
instance bundledHom : BundledHom @MulHom :=
⟨@MulHom.toFun, @MulHom.id, @MulHom.comp,
--Porting note : was `@MulHom.coe_inj` which is deprecated
- by intros; apply @FunLike.coe_injective, by aesop_cat, by aesop_cat⟩
+ by intros; apply @DFunLike.coe_injective, by aesop_cat, by aesop_cat⟩
#align Magma.bundled_hom MagmaCat.bundledHom
#align AddMagma.bundled_hom AddMagmaCat.bundledHom
@@ -98,8 +98,8 @@ theorem coe_of (R : Type u) [Mul R] : (MagmaCat.of R : Type u) = R :=
@[to_additive (attr := simp)]
lemma mulEquiv_coe_eq {X Y : Type _} [Mul X] [Mul Y] (e : X ≃* Y) :
- (@FunLike.coe (MagmaCat.of X ⟶ MagmaCat.of Y) _ (fun _ => (forget MagmaCat).obj _)
- ConcreteCategory.funLike (e : X →ₙ* Y) : X → Y) = ↑e :=
+ (@DFunLike.coe (MagmaCat.of X ⟶ MagmaCat.of Y) _ (fun _ => (forget MagmaCat).obj _)
+ ConcreteCategory.instDFunLike (e : X →ₙ* Y) : X → Y) = ↑e :=
rfl
/-- Typecheck a `MulHom` as a morphism in `MagmaCat`. -/
@@ -183,8 +183,8 @@ theorem coe_of (R : Type u) [Semigroup R] : (SemigroupCat.of R : Type u) = R :=
@[to_additive (attr := simp)]
lemma mulEquiv_coe_eq {X Y : Type _} [Semigroup X] [Semigroup Y] (e : X ≃* Y) :
- (@FunLike.coe (SemigroupCat.of X ⟶ SemigroupCat.of Y) _ (fun _ => (forget SemigroupCat).obj _)
- ConcreteCategory.funLike (e : X →ₙ* Y) : X → Y) = ↑e :=
+ (@DFunLike.coe (SemigroupCat.of X ⟶ SemigroupCat.of Y) _ (fun _ => (forget SemigroupCat).obj _)
+ ConcreteCategory.instDFunLike (e : X →ₙ* Y) : X → Y) = ↑e :=
rfl
/-- Typecheck a `MulHom` as a morphism in `SemigroupCat`. -/
Hom
and file name (#8095)
I believe the file defining a type of morphisms belongs alongside the file defining the structure this morphism works on. So I would like to reorganize the files in the Mathlib.Algebra.Hom
folder so that e.g. Mathlib.Algebra.Hom.Ring
becomes Mathlib.Algebra.Ring.Hom
and Mathlib.Algebra.Hom.NonUnitalAlg
becomes Mathlib.Algebra.Algebra.NonUnitalHom
.
While fixing the imports I went ahead and sorted them for good luck.
The full list of changes is: renamed: Mathlib/Algebra/Hom/NonUnitalAlg.lean -> Mathlib/Algebra/Algebra/NonUnitalHom.lean renamed: Mathlib/Algebra/Hom/Aut.lean -> Mathlib/Algebra/Group/Aut.lean renamed: Mathlib/Algebra/Hom/Commute.lean -> Mathlib/Algebra/Group/Commute/Hom.lean renamed: Mathlib/Algebra/Hom/Embedding.lean -> Mathlib/Algebra/Group/Embedding.lean renamed: Mathlib/Algebra/Hom/Equiv/Basic.lean -> Mathlib/Algebra/Group/Equiv/Basic.lean renamed: Mathlib/Algebra/Hom/Equiv/TypeTags.lean -> Mathlib/Algebra/Group/Equiv/TypeTags.lean renamed: Mathlib/Algebra/Hom/Equiv/Units/Basic.lean -> Mathlib/Algebra/Group/Units/Equiv.lean renamed: Mathlib/Algebra/Hom/Equiv/Units/GroupWithZero.lean -> Mathlib/Algebra/GroupWithZero/Units/Equiv.lean renamed: Mathlib/Algebra/Hom/Freiman.lean -> Mathlib/Algebra/Group/Freiman.lean renamed: Mathlib/Algebra/Hom/Group/Basic.lean -> Mathlib/Algebra/Group/Hom/Basic.lean renamed: Mathlib/Algebra/Hom/Group/Defs.lean -> Mathlib/Algebra/Group/Hom/Defs.lean renamed: Mathlib/Algebra/Hom/GroupAction.lean -> Mathlib/GroupTheory/GroupAction/Hom.lean renamed: Mathlib/Algebra/Hom/GroupInstances.lean -> Mathlib/Algebra/Group/Hom/Instances.lean renamed: Mathlib/Algebra/Hom/Iterate.lean -> Mathlib/Algebra/GroupPower/IterateHom.lean renamed: Mathlib/Algebra/Hom/Centroid.lean -> Mathlib/Algebra/Ring/CentroidHom.lean renamed: Mathlib/Algebra/Hom/Ring/Basic.lean -> Mathlib/Algebra/Ring/Hom/Basic.lean renamed: Mathlib/Algebra/Hom/Ring/Defs.lean -> Mathlib/Algebra/Ring/Hom/Defs.lean renamed: Mathlib/Algebra/Hom/Units.lean -> Mathlib/Algebra/Group/Units/Hom.lean
Zulip thread: https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Reorganizing.20.60Mathlib.2EAlgebra.2EHom.60
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Julian Kuelshammer
-/
import Mathlib.Algebra.PEmptyInstances
-import Mathlib.Algebra.Hom.Equiv.Basic
+import Mathlib.Algebra.Group.Equiv.Basic
import Mathlib.CategoryTheory.ConcreteCategory.BundledHom
import Mathlib.CategoryTheory.Functor.ReflectsIso
import Mathlib.CategoryTheory.Elementwise
@@ -12,7 +12,7 @@ import Mathlib.CategoryTheory.Elementwise
#align_import algebra.category.Semigroup.basic from "leanprover-community/mathlib"@"47b51515e69f59bca5cf34ef456e6000fe205a69"
/-!
-# Category instances for has_mul, has_add, semigroup and add_semigroup
+# Category instances for `Mul`, `Add`, `Semigroup` and `AddSemigroup`
We introduce the bundled categories:
* `MagmaCat`
@@ -97,7 +97,7 @@ theorem coe_of (R : Type u) [Mul R] : (MagmaCat.of R : Type u) = R :=
#align AddMagma.coe_of AddMagmaCat.coe_of
@[to_additive (attr := simp)]
-lemma MulEquiv_coe_eq {X Y : Type _} [Mul X] [Mul Y] (e : X ≃* Y) :
+lemma mulEquiv_coe_eq {X Y : Type _} [Mul X] [Mul Y] (e : X ≃* Y) :
(@FunLike.coe (MagmaCat.of X ⟶ MagmaCat.of Y) _ (fun _ => (forget MagmaCat).obj _)
ConcreteCategory.funLike (e : X →ₙ* Y) : X → Y) = ↑e :=
rfl
@@ -182,7 +182,7 @@ theorem coe_of (R : Type u) [Semigroup R] : (SemigroupCat.of R : Type u) = R :=
#align AddSemigroup.coe_of AddSemigroupCat.coe_of
@[to_additive (attr := simp)]
-lemma MulEquiv_coe_eq {X Y : Type _} [Semigroup X] [Semigroup Y] (e : X ≃* Y) :
+lemma mulEquiv_coe_eq {X Y : Type _} [Semigroup X] [Semigroup Y] (e : X ≃* Y) :
(@FunLike.coe (SemigroupCat.of X ⟶ SemigroupCat.of Y) _ (fun _ => (forget SemigroupCat).obj _)
ConcreteCategory.funLike (e : X →ₙ* Y) : X → Y) = ↑e :=
rfl
@@ -224,13 +224,13 @@ variable [Mul X] [Mul Y]
/-- Build an isomorphism in the category `MagmaCat` from a `MulEquiv` between `Mul`s. -/
@[to_additive (attr := simps)
- "Build an isomorphism in the category `AddMagmaCat` from\nan `AddEquiv` between `Add`s."]
+ "Build an isomorphism in the category `AddMagmaCat` from an `AddEquiv` between `Add`s."]
def MulEquiv.toMagmaCatIso (e : X ≃* Y) : MagmaCat.of X ≅ MagmaCat.of Y where
hom := e.toMulHom
inv := e.symm.toMulHom
hom_inv_id := by
ext
- simp_rw [comp_apply, toMulHom_eq_coe, MagmaCat.MulEquiv_coe_eq, symm_apply_apply, id_apply]
+ simp_rw [comp_apply, toMulHom_eq_coe, MagmaCat.mulEquiv_coe_eq, symm_apply_apply, id_apply]
#align mul_equiv.to_Magma_iso MulEquiv.toMagmaCatIso
#align add_equiv.to_AddMagma_iso AddEquiv.toAddMagmaCatIso
@@ -241,10 +241,10 @@ section
variable [Semigroup X] [Semigroup Y]
-/-- Build an isomorphism in the category `Semigroup` from a `mul_equiv` between `semigroup`s. -/
+/-- Build an isomorphism in the category `Semigroup` from a `MulEquiv` between `Semigroup`s. -/
@[to_additive (attr := simps)
"Build an isomorphism in the category
- `AddSemigroup` from an `add_equiv` between `add_semigroup`s."]
+ `AddSemigroup` from an `AddEquiv` between `AddSemigroup`s."]
def MulEquiv.toSemigroupCatIso (e : X ≃* Y) : SemigroupCat.of X ≅ SemigroupCat.of Y where
hom := e.toMulHom
inv := e.symm.toMulHom
@@ -255,17 +255,17 @@ end
namespace CategoryTheory.Iso
-/-- Build a `mul_equiv` from an isomorphism in the category `Magma`. -/
+/-- Build a `MulEquiv` from an isomorphism in the category `Magma`. -/
@[to_additive
- "Build an `add_equiv` from an isomorphism in the category\n`AddMagma`."]
+ "Build an `AddEquiv` from an isomorphism in the category `AddMagma`."]
def magmaCatIsoToMulEquiv {X Y : MagmaCat} (i : X ≅ Y) : X ≃* Y :=
MulHom.toMulEquiv i.hom i.inv i.hom_inv_id i.inv_hom_id
#align category_theory.iso.Magma_iso_to_mul_equiv CategoryTheory.Iso.magmaCatIsoToMulEquiv
#align category_theory.iso.AddMagma_iso_to_add_equiv CategoryTheory.Iso.addMagmaCatIsoToAddEquiv
-/-- Build a `mul_equiv` from an isomorphism in the category `Semigroup`. -/
+/-- Build a `MulEquiv` from an isomorphism in the category `Semigroup`. -/
@[to_additive
- "Build an `add_equiv` from an isomorphism in the category\n`AddSemigroup`."]
+ "Build an `AddEquiv` from an isomorphism in the category `AddSemigroup`."]
def semigroupCatIsoToMulEquiv {X Y : SemigroupCat} (i : X ≅ Y) : X ≃* Y :=
MulHom.toMulEquiv i.hom i.inv i.hom_inv_id i.inv_hom_id
#align category_theory.iso.Semigroup_iso_to_mul_equiv CategoryTheory.Iso.semigroupCatIsoToMulEquiv
@@ -273,10 +273,10 @@ def semigroupCatIsoToMulEquiv {X Y : SemigroupCat} (i : X ≅ Y) : X ≃* Y :=
end CategoryTheory.Iso
-/-- multiplicative equivalences between `has_mul`s are the same as (isomorphic to) isomorphisms
+/-- multiplicative equivalences between `Mul`s are the same as (isomorphic to) isomorphisms
in `Magma` -/
@[to_additive
- "additive equivalences between `has_add`s are the same
+ "additive equivalences between `Add`s are the same
as (isomorphic to) isomorphisms in `AddMagma`"]
def mulEquivIsoMagmaIso {X Y : Type u} [Mul X] [Mul Y] :
X ≃* Y ≅ MagmaCat.of X ≅ MagmaCat.of Y where
@@ -285,10 +285,10 @@ def mulEquivIsoMagmaIso {X Y : Type u} [Mul X] [Mul Y] :
#align mul_equiv_iso_Magma_iso mulEquivIsoMagmaIso
#align add_equiv_iso_AddMagma_iso addEquivIsoAddMagmaIso
-/-- multiplicative equivalences between `semigroup`s are the same as (isomorphic to) isomorphisms
+/-- multiplicative equivalences between `Semigroup`s are the same as (isomorphic to) isomorphisms
in `Semigroup` -/
@[to_additive
- "additive equivalences between `add_semigroup`s are
+ "additive equivalences between `AddSemigroup`s are
the same as (isomorphic to) isomorphisms in `AddSemigroup`"]
def mulEquivIsoSemigroupCatIso {X Y : Type u} [Semigroup X] [Semigroup Y] :
X ≃* Y ≅ SemigroupCat.of X ≅ SemigroupCat.of Y where
@@ -300,7 +300,6 @@ def mulEquivIsoSemigroupCatIso {X Y : Type u} [Semigroup X] [Semigroup Y] :
@[to_additive]
instance MagmaCat.forgetReflectsIsos : ReflectsIsomorphisms (forget MagmaCat.{u}) where
reflects {X Y} f _ := by
- skip
let i := asIso ((forget MagmaCat).map f)
let e : X ≃* Y := { f, i.toEquiv with }
exact ⟨(IsIso.of_iso e.toMagmaCatIso).1⟩
@@ -310,7 +309,6 @@ instance MagmaCat.forgetReflectsIsos : ReflectsIsomorphisms (forget MagmaCat.{u}
@[to_additive]
instance SemigroupCat.forgetReflectsIsos : ReflectsIsomorphisms (forget SemigroupCat.{u}) where
reflects {X Y} f _ := by
- skip
let i := asIso ((forget SemigroupCat).map f)
let e : X ≃* Y := { f, i.toEquiv with }
exact ⟨(IsIso.of_iso e.toSemigroupCatIso).1⟩
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -64,7 +64,7 @@ instance instConcreteCategory : ConcreteCategory MagmaCat := BundledHom.concrete
attribute [to_additive] instMagmaCatLargeCategory instConcreteCategory
@[to_additive]
-instance : CoeSort MagmaCat (Type _) where
+instance : CoeSort MagmaCat (Type*) where
coe X := X.α
-- Porting note : Hinting to Lean that `forget R` and `R` are the same
@@ -149,7 +149,7 @@ instance instConcreteCategory : ConcreteCategory SemigroupCat :=
attribute [to_additive] instSemigroupCatLargeCategory SemigroupCat.instConcreteCategory
@[to_additive]
-instance : CoeSort SemigroupCat (Type _) where
+instance : CoeSort SemigroupCat (Type*) where
coe X := X.α
-- Porting note : Hinting to Lean that `forget R` and `R` are the same
@@ -2,11 +2,6 @@
Copyright (c) 2021 Julian Kuelshammer. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Julian Kuelshammer
-
-! This file was ported from Lean 3 source module algebra.category.Semigroup.basic
-! leanprover-community/mathlib commit 47b51515e69f59bca5cf34ef456e6000fe205a69
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Algebra.PEmptyInstances
import Mathlib.Algebra.Hom.Equiv.Basic
@@ -14,6 +9,8 @@ import Mathlib.CategoryTheory.ConcreteCategory.BundledHom
import Mathlib.CategoryTheory.Functor.ReflectsIso
import Mathlib.CategoryTheory.Elementwise
+#align_import algebra.category.Semigroup.basic from "leanprover-community/mathlib"@"47b51515e69f59bca5cf34ef456e6000fe205a69"
+
/-!
# Category instances for has_mul, has_add, semigroup and add_semigroup
@@ -111,7 +111,7 @@ def ofHom {X Y : Type u} [Mul X] [Mul Y] (f : X →ₙ* Y) : of X ⟶ of Y := f
#align Magma.of_hom MagmaCat.ofHom
#align AddMagma.of_hom AddMagmaCat.ofHom
-/-- Typecheck a `AddHom` as a morphism in `AddMagmaCat`. -/
+/-- Typecheck an `AddHom` as a morphism in `AddMagmaCat`. -/
add_decl_doc AddMagmaCat.ofHom
@[to_additive] -- Porting note: simp removed, simpNF says LHS simplifies to itself
@@ -197,7 +197,7 @@ def ofHom {X Y : Type u} [Semigroup X] [Semigroup Y] (f : X →ₙ* Y) : of X
#align Semigroup.of_hom SemigroupCat.ofHom
#align AddSemigroup.of_hom AddSemigroupCat.ofHom
-/-- Typecheck a `AddHom` as a morphism in `AddSemigroupCat`. -/
+/-- Typecheck an `AddHom` as a morphism in `AddSemigroupCat`. -/
add_decl_doc AddSemigroupCat.ofHom
@[to_additive] -- Porting note: simp removed, simpNF says LHS simplifies to itself
All dependencies are ported!