algebra.category.Mon.colimits
⟷
Mathlib.Algebra.Category.MonCat.Colimits
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)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -3,7 +3,7 @@ Copyright (c) 2019 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison
-/
-import Algebra.Category.Mon.Basic
+import Algebra.Category.MonCat.Basic
import CategoryTheory.Limits.HasLimits
import CategoryTheory.ConcreteCategory.Elementwise
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,9 +3,9 @@ Copyright (c) 2019 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison
-/
-import Mathbin.Algebra.Category.Mon.Basic
-import Mathbin.CategoryTheory.Limits.HasLimits
-import Mathbin.CategoryTheory.ConcreteCategory.Elementwise
+import Algebra.Category.Mon.Basic
+import CategoryTheory.Limits.HasLimits
+import CategoryTheory.ConcreteCategory.Elementwise
#align_import algebra.category.Mon.colimits from "leanprover-community/mathlib"@"08b63ab58a6ec1157ebeafcbbe6c7a3fb3c9f6d5"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,16 +2,13 @@
Copyright (c) 2019 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.colimits
-! leanprover-community/mathlib commit 08b63ab58a6ec1157ebeafcbbe6c7a3fb3c9f6d5
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Algebra.Category.Mon.Basic
import Mathbin.CategoryTheory.Limits.HasLimits
import Mathbin.CategoryTheory.ConcreteCategory.Elementwise
+#align_import algebra.category.Mon.colimits from "leanprover-community/mathlib"@"08b63ab58a6ec1157ebeafcbbe6c7a3fb3c9f6d5"
+
/-!
# The category of monoids has all colimits.
mathlib commit https://github.com/leanprover-community/mathlib/commit/9240e8be927a0955b9a82c6c85ef499ee3a626b8
@@ -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.colimits
-! leanprover-community/mathlib commit 70fd9563a21e7b963887c9360bd29b2393e6225a
+! leanprover-community/mathlib commit 08b63ab58a6ec1157ebeafcbbe6c7a3fb3c9f6d5
! 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.ConcreteCategory.Elementwise
/-!
# The category of monoids has all colimits.
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
We do this construction knowing nothing about monoids.
In particular, I want to claim that this file could be produced by a python script
that just looks at the output of `#print monoid`:
mathlib commit https://github.com/leanprover-community/mathlib/commit/fdc286cc6967a012f41b87f76dcd2797b53152af
@@ -52,6 +52,7 @@ and the identifications given by the morphisms in the diagram.
variable {J : Type v} [SmallCategory J] (F : J ⥤ MonCat.{v})
+#print MonCat.Colimits.Prequotient /-
/-- An inductive type representing all monoid expressions (without relations)
on a collection of types indexed by the objects of `J`.
-/
@@ -62,12 +63,14 @@ inductive Prequotient-- There's always `of`
| one : prequotient
| mul : prequotient → prequotient → prequotient
#align Mon.colimits.prequotient MonCat.Colimits.Prequotient
+-/
instance : Inhabited (Prequotient F) :=
⟨Prequotient.one⟩
open Prequotient
+#print MonCat.Colimits.Relation /-
/-- The relation on `prequotient` saying when two expressions are equal
because of the monoid laws, or
because one element is mapped to another by a morphism in the diagram.
@@ -97,7 +100,9 @@ inductive Relation : Prequotient F → Prequotient F → Prop-- Make it an equiv
| one_mul : ∀ x, relation (mul one x) x
| mul_one : ∀ x, relation (mul x one) x
#align Mon.colimits.relation MonCat.Colimits.Relation
+-/
+#print MonCat.Colimits.colimitSetoid /-
/-- The setoid corresponding to monoid expressions modulo monoid relations and identifications.
-/
def colimitSetoid : Setoid (Prequotient F)
@@ -105,16 +110,20 @@ def colimitSetoid : Setoid (Prequotient F)
R := Relation F
iseqv := ⟨Relation.refl, Relation.symm, Relation.trans⟩
#align Mon.colimits.colimit_setoid MonCat.Colimits.colimitSetoid
+-/
attribute [instance] colimit_setoid
+#print MonCat.Colimits.ColimitType /-
/-- The underlying type of the colimit of a diagram in `Mon`.
-/
def ColimitType : Type v :=
Quotient (colimitSetoid F)
deriving Inhabited
#align Mon.colimits.colimit_type MonCat.Colimits.ColimitType
+-/
+#print MonCat.Colimits.monoidColimitType /-
instance monoidColimitType : Monoid (ColimitType F)
where
mul := by
@@ -157,28 +166,38 @@ instance monoidColimitType : Monoid (ColimitType F)
apply relation.mul_one
rfl
#align Mon.colimits.monoid_colimit_type MonCat.Colimits.monoidColimitType
+-/
+#print MonCat.Colimits.quot_one /-
@[simp]
theorem quot_one : Quot.mk Setoid.r one = (1 : ColimitType F) :=
rfl
#align Mon.colimits.quot_one MonCat.Colimits.quot_one
+-/
+#print MonCat.Colimits.quot_mul /-
@[simp]
theorem quot_mul (x y) :
Quot.mk Setoid.r (mul x y) = (Quot.mk Setoid.r x * Quot.mk Setoid.r y : ColimitType F) :=
rfl
#align Mon.colimits.quot_mul MonCat.Colimits.quot_mul
+-/
+#print MonCat.Colimits.colimit /-
/-- The bundled monoid giving the colimit of a diagram. -/
def colimit : MonCat :=
⟨ColimitType F, by infer_instance⟩
#align Mon.colimits.colimit MonCat.Colimits.colimit
+-/
+#print MonCat.Colimits.coconeFun /-
/-- The function from a given monoid in the diagram to the colimit monoid. -/
def coconeFun (j : J) (x : F.obj j) : ColimitType F :=
Quot.mk _ (of j x)
#align Mon.colimits.cocone_fun MonCat.Colimits.coconeFun
+-/
+#print MonCat.Colimits.coconeMorphism /-
/-- The monoid homomorphism from a given monoid in the diagram to the colimit monoid. -/
def coconeMorphism (j : J) : F.obj j ⟶ colimit F
where
@@ -186,7 +205,9 @@ def coconeMorphism (j : J) : F.obj j ⟶ colimit F
map_one' := Quot.sound (Relation.one _)
map_mul' x y := Quot.sound (Relation.mul _ _ _)
#align Mon.colimits.cocone_morphism MonCat.Colimits.coconeMorphism
+-/
+#print MonCat.Colimits.cocone_naturality /-
@[simp]
theorem cocone_naturality {j j' : J} (f : j ⟶ j') :
F.map f ≫ coconeMorphism F j' = coconeMorphism F j :=
@@ -195,19 +216,25 @@ theorem cocone_naturality {j j' : J} (f : j ⟶ j') :
apply Quot.sound
apply Relation.Map
#align Mon.colimits.cocone_naturality MonCat.Colimits.cocone_naturality
+-/
+#print MonCat.Colimits.cocone_naturality_components /-
@[simp]
theorem cocone_naturality_components (j j' : J) (f : j ⟶ j') (x : F.obj j) :
(coconeMorphism F j') (F.map f x) = (coconeMorphism F j) x := by rw [← cocone_naturality F f];
rfl
#align Mon.colimits.cocone_naturality_components MonCat.Colimits.cocone_naturality_components
+-/
+#print MonCat.Colimits.colimitCocone /-
/-- The cocone over the proposed colimit monoid. -/
def colimitCocone : Cocone F where
pt := colimit F
ι := { app := coconeMorphism F }
#align Mon.colimits.colimit_cocone MonCat.Colimits.colimitCocone
+-/
+#print MonCat.Colimits.descFunLift /-
/-- The function from the free monoid on the diagram to the cone point of any other cocone. -/
@[simp]
def descFunLift (s : Cocone F) : Prequotient F → s.pt
@@ -215,7 +242,9 @@ def descFunLift (s : Cocone F) : Prequotient F → s.pt
| one => 1
| mul x y => desc_fun_lift x * desc_fun_lift y
#align Mon.colimits.desc_fun_lift MonCat.Colimits.descFunLift
+-/
+#print MonCat.Colimits.descFun /-
/-- The function from the colimit monoid to the cone point of any other cocone. -/
def descFun (s : Cocone F) : ColimitType F → s.pt :=
by
@@ -246,7 +275,9 @@ def descFun (s : Cocone F) : ColimitType F → s.pt :=
-- mul_one
· rw [mul_one]
#align Mon.colimits.desc_fun MonCat.Colimits.descFun
+-/
+#print MonCat.Colimits.descMorphism /-
/-- The monoid homomorphism from the colimit monoid to the cone point of any other cocone. -/
def descMorphism (s : Cocone F) : colimit F ⟶ s.pt
where
@@ -254,7 +285,9 @@ def descMorphism (s : Cocone F) : colimit F ⟶ s.pt
map_one' := rfl
map_mul' x y := by induction x <;> induction y <;> rfl
#align Mon.colimits.desc_morphism MonCat.Colimits.descMorphism
+-/
+#print MonCat.Colimits.colimitIsColimit /-
/-- Evidence that the proposed colimit is the colimit. -/
def colimitIsColimit : IsColimit (colimitCocone F)
where
@@ -271,7 +304,9 @@ def colimitIsColimit : IsColimit (colimitCocone F)
· simp [*]
rfl
#align Mon.colimits.colimit_is_colimit MonCat.Colimits.colimitIsColimit
+-/
+#print MonCat.Colimits.hasColimits_monCat /-
instance hasColimits_monCat : HasColimits MonCat
where HasColimitsOfShape J 𝒥 :=
{
@@ -280,6 +315,7 @@ instance hasColimits_monCat : HasColimits MonCat
{ Cocone := colimit_cocone F
IsColimit := colimit_is_colimit F } }
#align Mon.colimits.has_colimits_Mon MonCat.Colimits.hasColimits_monCat
+-/
end MonCat.Colimits
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -111,7 +111,8 @@ attribute [instance] colimit_setoid
/-- The underlying type of the colimit of a diagram in `Mon`.
-/
def ColimitType : Type v :=
- Quotient (colimitSetoid F)deriving Inhabited
+ Quotient (colimitSetoid F)
+deriving Inhabited
#align Mon.colimits.colimit_type MonCat.Colimits.ColimitType
instance monoidColimitType : Monoid (ColimitType F)
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -197,9 +197,7 @@ theorem cocone_naturality {j j' : J} (f : j ⟶ j') :
@[simp]
theorem cocone_naturality_components (j j' : J) (f : j ⟶ j') (x : F.obj j) :
- (coconeMorphism F j') (F.map f x) = (coconeMorphism F j) x :=
- by
- rw [← cocone_naturality F f]
+ (coconeMorphism F j') (F.map f x) = (coconeMorphism F j) x := by rw [← cocone_naturality F f];
rfl
#align Mon.colimits.cocone_naturality_components MonCat.Colimits.cocone_naturality_components
mathlib commit https://github.com/leanprover-community/mathlib/commit/290a7ba01fbcab1b64757bdaa270d28f4dcede35
@@ -40,7 +40,7 @@ open CategoryTheory
open CategoryTheory.Limits
-namespace Mon.Colimits
+namespace MonCat.Colimits
/-!
We build the colimit of a diagram in `Mon` by constructing the
@@ -50,7 +50,7 @@ and the identifications given by the morphisms in the diagram.
-/
-variable {J : Type v} [SmallCategory J] (F : J ⥤ Mon.{v})
+variable {J : Type v} [SmallCategory J] (F : J ⥤ MonCat.{v})
/-- An inductive type representing all monoid expressions (without relations)
on a collection of types indexed by the objects of `J`.
@@ -61,7 +61,7 @@ inductive Prequotient-- There's always `of`
| one : prequotient
| mul : prequotient → prequotient → prequotient
-#align Mon.colimits.prequotient Mon.Colimits.Prequotient
+#align Mon.colimits.prequotient MonCat.Colimits.Prequotient
instance : Inhabited (Prequotient F) :=
⟨Prequotient.one⟩
@@ -96,7 +96,7 @@ inductive Relation : Prequotient F → Prequotient F → Prop-- Make it an equiv
| mul_assoc : ∀ x y z, relation (mul (mul x y) z) (mul x (mul y z))
| one_mul : ∀ x, relation (mul one x) x
| mul_one : ∀ x, relation (mul x one) x
-#align Mon.colimits.relation Mon.Colimits.Relation
+#align Mon.colimits.relation MonCat.Colimits.Relation
/-- The setoid corresponding to monoid expressions modulo monoid relations and identifications.
-/
@@ -104,7 +104,7 @@ def colimitSetoid : Setoid (Prequotient F)
where
R := Relation F
iseqv := ⟨Relation.refl, Relation.symm, Relation.trans⟩
-#align Mon.colimits.colimit_setoid Mon.Colimits.colimitSetoid
+#align Mon.colimits.colimit_setoid MonCat.Colimits.colimitSetoid
attribute [instance] colimit_setoid
@@ -112,7 +112,7 @@ attribute [instance] colimit_setoid
-/
def ColimitType : Type v :=
Quotient (colimitSetoid F)deriving Inhabited
-#align Mon.colimits.colimit_type Mon.Colimits.ColimitType
+#align Mon.colimits.colimit_type MonCat.Colimits.ColimitType
instance monoidColimitType : Monoid (ColimitType F)
where
@@ -155,28 +155,28 @@ instance monoidColimitType : Monoid (ColimitType F)
apply Quot.sound
apply relation.mul_one
rfl
-#align Mon.colimits.monoid_colimit_type Mon.Colimits.monoidColimitType
+#align Mon.colimits.monoid_colimit_type MonCat.Colimits.monoidColimitType
@[simp]
theorem quot_one : Quot.mk Setoid.r one = (1 : ColimitType F) :=
rfl
-#align Mon.colimits.quot_one Mon.Colimits.quot_one
+#align Mon.colimits.quot_one MonCat.Colimits.quot_one
@[simp]
theorem quot_mul (x y) :
Quot.mk Setoid.r (mul x y) = (Quot.mk Setoid.r x * Quot.mk Setoid.r y : ColimitType F) :=
rfl
-#align Mon.colimits.quot_mul Mon.Colimits.quot_mul
+#align Mon.colimits.quot_mul MonCat.Colimits.quot_mul
/-- The bundled monoid giving the colimit of a diagram. -/
-def colimit : Mon :=
+def colimit : MonCat :=
⟨ColimitType F, by infer_instance⟩
-#align Mon.colimits.colimit Mon.Colimits.colimit
+#align Mon.colimits.colimit MonCat.Colimits.colimit
/-- The function from a given monoid in the diagram to the colimit monoid. -/
def coconeFun (j : J) (x : F.obj j) : ColimitType F :=
Quot.mk _ (of j x)
-#align Mon.colimits.cocone_fun Mon.Colimits.coconeFun
+#align Mon.colimits.cocone_fun MonCat.Colimits.coconeFun
/-- The monoid homomorphism from a given monoid in the diagram to the colimit monoid. -/
def coconeMorphism (j : J) : F.obj j ⟶ colimit F
@@ -184,7 +184,7 @@ def coconeMorphism (j : J) : F.obj j ⟶ colimit F
toFun := coconeFun F j
map_one' := Quot.sound (Relation.one _)
map_mul' x y := Quot.sound (Relation.mul _ _ _)
-#align Mon.colimits.cocone_morphism Mon.Colimits.coconeMorphism
+#align Mon.colimits.cocone_morphism MonCat.Colimits.coconeMorphism
@[simp]
theorem cocone_naturality {j j' : J} (f : j ⟶ j') :
@@ -193,7 +193,7 @@ theorem cocone_naturality {j j' : J} (f : j ⟶ j') :
ext
apply Quot.sound
apply Relation.Map
-#align Mon.colimits.cocone_naturality Mon.Colimits.cocone_naturality
+#align Mon.colimits.cocone_naturality MonCat.Colimits.cocone_naturality
@[simp]
theorem cocone_naturality_components (j j' : J) (f : j ⟶ j') (x : F.obj j) :
@@ -201,13 +201,13 @@ theorem cocone_naturality_components (j j' : J) (f : j ⟶ j') (x : F.obj j) :
by
rw [← cocone_naturality F f]
rfl
-#align Mon.colimits.cocone_naturality_components Mon.Colimits.cocone_naturality_components
+#align Mon.colimits.cocone_naturality_components MonCat.Colimits.cocone_naturality_components
/-- The cocone over the proposed colimit monoid. -/
def colimitCocone : Cocone F where
pt := colimit F
ι := { app := coconeMorphism F }
-#align Mon.colimits.colimit_cocone Mon.Colimits.colimitCocone
+#align Mon.colimits.colimit_cocone MonCat.Colimits.colimitCocone
/-- The function from the free monoid on the diagram to the cone point of any other cocone. -/
@[simp]
@@ -215,7 +215,7 @@ def descFunLift (s : Cocone F) : Prequotient F → s.pt
| of j x => (s.ι.app j) x
| one => 1
| mul x y => desc_fun_lift x * desc_fun_lift y
-#align Mon.colimits.desc_fun_lift Mon.Colimits.descFunLift
+#align Mon.colimits.desc_fun_lift MonCat.Colimits.descFunLift
/-- The function from the colimit monoid to the cone point of any other cocone. -/
def descFun (s : Cocone F) : ColimitType F → s.pt :=
@@ -246,7 +246,7 @@ def descFun (s : Cocone F) : ColimitType F → s.pt :=
· rw [one_mul]
-- mul_one
· rw [mul_one]
-#align Mon.colimits.desc_fun Mon.Colimits.descFun
+#align Mon.colimits.desc_fun MonCat.Colimits.descFun
/-- The monoid homomorphism from the colimit monoid to the cone point of any other cocone. -/
def descMorphism (s : Cocone F) : colimit F ⟶ s.pt
@@ -254,7 +254,7 @@ def descMorphism (s : Cocone F) : colimit F ⟶ s.pt
toFun := descFun F s
map_one' := rfl
map_mul' x y := by induction x <;> induction y <;> rfl
-#align Mon.colimits.desc_morphism Mon.Colimits.descMorphism
+#align Mon.colimits.desc_morphism MonCat.Colimits.descMorphism
/-- Evidence that the proposed colimit is the colimit. -/
def colimitIsColimit : IsColimit (colimitCocone F)
@@ -271,16 +271,16 @@ def colimitIsColimit : IsColimit (colimitCocone F)
· simp [*]
· simp [*]
rfl
-#align Mon.colimits.colimit_is_colimit Mon.Colimits.colimitIsColimit
+#align Mon.colimits.colimit_is_colimit MonCat.Colimits.colimitIsColimit
-instance hasColimits_mon : HasColimits Mon
+instance hasColimits_monCat : HasColimits MonCat
where HasColimitsOfShape J 𝒥 :=
{
HasColimit := fun F =>
has_colimit.mk
{ Cocone := colimit_cocone F
IsColimit := colimit_is_colimit F } }
-#align Mon.colimits.has_colimits_Mon Mon.Colimits.hasColimits_mon
+#align Mon.colimits.has_colimits_Mon MonCat.Colimits.hasColimits_monCat
-end Mon.Colimits
+end MonCat.Colimits
mathlib commit https://github.com/leanprover-community/mathlib/commit/9da1b3534b65d9661eb8f42443598a92bbb49211
@@ -205,20 +205,20 @@ theorem cocone_naturality_components (j j' : J) (f : j ⟶ j') (x : F.obj j) :
/-- The cocone over the proposed colimit monoid. -/
def colimitCocone : Cocone F where
- x := colimit F
+ pt := colimit F
ι := { app := coconeMorphism F }
#align Mon.colimits.colimit_cocone Mon.Colimits.colimitCocone
/-- The function from the free monoid on the diagram to the cone point of any other cocone. -/
@[simp]
-def descFunLift (s : Cocone F) : Prequotient F → s.x
+def descFunLift (s : Cocone F) : Prequotient F → s.pt
| of j x => (s.ι.app j) x
| one => 1
| mul x y => desc_fun_lift x * desc_fun_lift y
#align Mon.colimits.desc_fun_lift Mon.Colimits.descFunLift
/-- The function from the colimit monoid to the cone point of any other cocone. -/
-def descFun (s : Cocone F) : ColimitType F → s.x :=
+def descFun (s : Cocone F) : ColimitType F → s.pt :=
by
fapply Quot.lift
· exact desc_fun_lift F s
@@ -249,7 +249,7 @@ def descFun (s : Cocone F) : ColimitType F → s.x :=
#align Mon.colimits.desc_fun Mon.Colimits.descFun
/-- The monoid homomorphism from the colimit monoid to the cone point of any other cocone. -/
-def descMorphism (s : Cocone F) : colimit F ⟶ s.x
+def descMorphism (s : Cocone F) : colimit F ⟶ s.pt
where
toFun := descFun F s
map_one' := rfl
mathlib commit https://github.com/leanprover-community/mathlib/commit/eb0cb4511aaef0da2462207b67358a0e1fe1e2ee
@@ -260,7 +260,7 @@ def descMorphism (s : Cocone F) : colimit F ⟶ s.x
def colimitIsColimit : IsColimit (colimitCocone F)
where
desc s := descMorphism F s
- uniq' s m w := by
+ uniq s m w := by
ext
induction x
induction x
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
Mostly automatic, with a few manual corrections.
@@ -119,7 +119,7 @@ set_option linter.uppercaseLean3 false in
attribute [instance] colimitSetoid
-/-- The underlying type of the colimit of a diagram in `Mon`.
+/-- The underlying type of the colimit of a diagram in `MonCat`.
-/
def ColimitType : Type v :=
Quotient (colimitSetoid F)
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>
@@ -218,8 +218,8 @@ def descFun (s : Cocone F) : ColimitType F → s.pt := by
| symm x y _ h => exact h.symm
| trans x y z _ _ h₁ h₂ => exact h₁.trans h₂
| map j j' f x => exact s.w_apply f x
- | mul j x y => exact map_mul _ _ _
- | one j => exact map_one _
+ | mul j x y => exact map_mul (s.ι.app j) x y
+ | one j => exact map_one (s.ι.app j)
| mul_1 x x' y _ h => exact congr_arg (· * _) h
| mul_2 x y y' _ h => exact congr_arg (_ * ·) h
| mul_assoc x y z => exact mul_assoc _ _ _
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>
@@ -254,7 +254,7 @@ def colimitIsColimit : IsColimit (colimitCocone F) where
· rw [quot_one, map_one]
rfl
· rw [quot_mul, map_mul, hx, hy]
- dsimp [descMorphism, FunLike.coe, descFun]
+ dsimp [descMorphism, DFunLike.coe, descFun]
simp only [← quot_mul, descFunLift]
set_option linter.uppercaseLean3 false in
#align Mon.colimits.colimit_is_colimit MonCat.Colimits.colimitIsColimit
@@ -132,11 +132,11 @@ instance : Inhabited (ColimitType F) := by
instance monoidColimitType : Monoid (ColimitType F) where
one := Quotient.mk _ one
- mul := Quotient.map₂ mul <| fun x x' rx y y' ry =>
+ mul := Quotient.map₂ mul fun x x' rx y y' ry =>
Setoid.trans (Relation.mul_1 _ _ y rx) (Relation.mul_2 x' _ _ ry)
- one_mul := Quotient.ind <| fun _ => Quotient.sound <| Relation.one_mul _
- mul_one := Quotient.ind <| fun _ => Quotient.sound <| Relation.mul_one _
- mul_assoc := Quotient.ind <| fun _ => Quotient.ind₂ <| fun _ _ =>
+ one_mul := Quotient.ind fun _ => Quotient.sound <| Relation.one_mul _
+ mul_one := Quotient.ind fun _ => Quotient.sound <| Relation.mul_one _
+ mul_assoc := Quotient.ind fun _ => Quotient.ind₂ fun _ _ =>
Quotient.sound <| Relation.mul_assoc _ _ _
set_option linter.uppercaseLean3 false in
#align Mon.colimits.monoid_colimit_type MonCat.Colimits.monoidColimitType
#print
remarks as only working in Lean 3 (#7183)
This also fixes some markdown issues.
@@ -14,23 +14,38 @@ import Mathlib.CategoryTheory.ConcreteCategory.Elementwise
We do this construction knowing nothing about monoids.
In particular, I want to claim that this file could be produced by a python script
-that just looks at the output of `#print monoid`:
-
- -- structure monoid : Type u → Type u
- -- fields:
- -- monoid.mul : Π {α : Type u} [c : monoid α], α → α → α
- -- monoid.mul_assoc : ∀ {α : Type u} [c : monoid α] (a b c_1 : α), a * b * c_1 = a * (b * c_1)
- -- monoid.one : Π (α : Type u) [c : monoid α], α
- -- monoid.one_mul : ∀ {α : Type u} [c : monoid α] (a : α), 1 * a = a
- -- monoid.mul_one : ∀ {α : Type u} [c : monoid α] (a : α), a * 1 = a
-
-and if we'd fed it the output of `#print comm_ring`, this file would instead build
+that just looks at what Lean 3's `#print monoid` printed a long time ago (it no longer looks like
+this due to the addition of `npow` fields):
+```
+structure monoid : Type u → Type u
+fields:
+monoid.mul : Π {M : Type u} [self : monoid M], M → M → M
+monoid.mul_assoc : ∀ {M : Type u} [self : monoid M] (a b c : M), a * b * c = a * (b * c)
+monoid.one : Π {M : Type u} [self : monoid M], M
+monoid.one_mul : ∀ {M : Type u} [self : monoid M] (a : M), 1 * a = a
+monoid.mul_one : ∀ {M : Type u} [self : monoid M] (a : M), a * 1 = a
+```
+
+and if we'd fed it the output of Lean 3's `#print comm_ring`, this file would instead build
colimits of commutative rings.
A slightly bolder claim is that we could do this with tactics, as well.
-Note: `Monoid` and `CommRing` are no longer flat structures in Mathlib4
-
+Note: `Monoid` and `CommRing` are no longer flat structures in Mathlib4, and so `#print Monoid`
+gives the less clear
+```
+inductive Monoid.{u} : Type u → Type u
+number of parameters: 1
+constructors:
+Monoid.mk : {M : Type u} →
+ [toSemigroup : Semigroup M] →
+ [toOne : One M] →
+ (∀ (a : M), 1 * a = a) →
+ (∀ (a : M), a * 1 = a) →
+ (npow : ℕ → M → M) →
+ autoParam (∀ (x : M), npow 0 x = 1) _auto✝ →
+ autoParam (∀ (n : ℕ) (x : M), npow (n + 1) x = x * npow n x) _auto✝¹ → Monoid M
+```
-/
@@ -55,8 +70,10 @@ variable {J : Type v} [SmallCategory J] (F : J ⥤ MonCat.{v})
/-- An inductive type representing all monoid expressions (without relations)
on a collection of types indexed by the objects of `J`.
-/
-inductive Prequotient-- There's always `of`
- | of : ∀ (j : J) (_ : F.obj j), Prequotient-- Then one generator for each operation
+inductive Prequotient
+ -- There's always `of`
+ | of : ∀ (j : J) (_ : F.obj j), Prequotient
+ -- Then one generator for each operation
| one : Prequotient
| mul : Prequotient → Prequotient → Prequotient
set_option linter.uppercaseLean3 false in
This isn't any shorter, but it removes a lot of sequential underscores!
@@ -196,19 +196,18 @@ def descFun (s : Cocone F) : ColimitType F → s.pt := by
fapply Quot.lift
· exact descFunLift F s
· intro x y r
- induction' r with _ _ _ _ h _ _ _ _ _ h₁ h₂ _ _ f x _ _ _ _ _ _ _ _ h _ _ _ _ h <;> try simp
- -- symm
- · exact h.symm
- -- trans
- · exact h₁.trans h₂
- -- map
- · exact s.w_apply f x
- -- mul_1
- · rw [h]
- -- mul_2
- · rw [h]
- -- mul_assoc
- · rw [mul_assoc]
+ induction r with
+ | refl x => rfl
+ | symm x y _ h => exact h.symm
+ | trans x y z _ _ h₁ h₂ => exact h₁.trans h₂
+ | map j j' f x => exact s.w_apply f x
+ | mul j x y => exact map_mul _ _ _
+ | one j => exact map_one _
+ | mul_1 x x' y _ h => exact congr_arg (· * _) h
+ | mul_2 x y y' _ h => exact congr_arg (_ * ·) h
+ | mul_assoc x y z => exact mul_assoc _ _ _
+ | one_mul x => exact one_mul _
+ | mul_one x => exact mul_one _
set_option linter.uppercaseLean3 false in
#align Mon.colimits.desc_fun MonCat.Colimits.descFun
@@ -243,8 +243,8 @@ def colimitIsColimit : IsColimit (colimitCocone F) where
set_option linter.uppercaseLean3 false in
#align Mon.colimits.colimit_is_colimit MonCat.Colimits.colimitIsColimit
-instance hasColimits_monCat : HasColimits MonCat
- where has_colimits_of_shape _ _ :=
+instance hasColimits_monCat : HasColimits MonCat where
+ has_colimits_of_shape _ _ :=
{ has_colimit := fun F =>
HasColimit.mk
{ cocone := colimitCocone F
Found while doing a larger refactor. This doesn't change any defeqs, and the new proofs make it obvious that there's nothing interesting going on here.
@@ -114,39 +114,13 @@ instance : Inhabited (ColimitType F) := by
infer_instance
instance monoidColimitType : Monoid (ColimitType F) where
- mul := by
- fapply @Quot.lift _ _ (ColimitType F → ColimitType F)
- · intro x
- fapply @Quot.lift
- · intro y
- exact Quot.mk _ (mul x y)
- · intro y y' r
- apply Quot.sound
- exact Relation.mul_2 _ _ _ r
- · intro x x' r
- funext y
- induction y using Quot.inductionOn
- dsimp
- apply Quot.sound
- apply Relation.mul_1 _ _ _ r
- one := Quot.mk _ one
- mul_assoc x y z := by
- induction x using Quot.inductionOn
- induction y using Quot.inductionOn
- induction z using Quot.inductionOn
- dsimp [HMul.hMul]
- apply Quot.sound
- apply Relation.mul_assoc
- one_mul x := by
- induction x using Quot.inductionOn
- dsimp
- apply Quot.sound
- apply Relation.one_mul
- mul_one x := by
- induction x using Quot.inductionOn
- dsimp
- apply Quot.sound
- apply Relation.mul_one
+ one := Quotient.mk _ one
+ mul := Quotient.map₂ mul <| fun x x' rx y y' ry =>
+ Setoid.trans (Relation.mul_1 _ _ y rx) (Relation.mul_2 x' _ _ ry)
+ one_mul := Quotient.ind <| fun _ => Quotient.sound <| Relation.one_mul _
+ mul_one := Quotient.ind <| fun _ => Quotient.sound <| Relation.mul_one _
+ mul_assoc := Quotient.ind <| fun _ => Quotient.ind₂ <| fun _ _ =>
+ Quotient.sound <| Relation.mul_assoc _ _ _
set_option linter.uppercaseLean3 false in
#align Mon.colimits.monoid_colimit_type MonCat.Colimits.monoidColimitType
@@ -2,16 +2,13 @@
Copyright (c) 2019 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.colimits
-! leanprover-community/mathlib commit 70fd9563a21e7b963887c9360bd29b2393e6225a
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Algebra.Category.MonCat.Basic
import Mathlib.CategoryTheory.Limits.HasLimits
import Mathlib.CategoryTheory.ConcreteCategory.Elementwise
+#align_import algebra.category.Mon.colimits from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
+
/-!
# The category of monoids has all colimits.
This PR is the result of running
find . -type f -name "*.lean" -exec sed -i -E 's/^( +)\. /\1· /' {} \;
find . -type f -name "*.lean" -exec sed -i -E 'N;s/^( +·)\n +(.*)$/\1 \2/;P;D' {} \;
which firstly replaces .
focusing dots with ·
and secondly removes isolated instances of such dots, unifying them with the following line. A new rule is placed in the style linter to verify this.
@@ -227,17 +227,17 @@ def descFun (s : Cocone F) : ColimitType F → s.pt := by
· intro x y r
induction' r with _ _ _ _ h _ _ _ _ _ h₁ h₂ _ _ f x _ _ _ _ _ _ _ _ h _ _ _ _ h <;> try simp
-- symm
- . exact h.symm
+ · exact h.symm
-- trans
- . exact h₁.trans h₂
+ · exact h₁.trans h₂
-- map
- . exact s.w_apply f x
+ · exact s.w_apply f x
-- mul_1
- . rw [h]
+ · rw [h]
-- mul_2
- . rw [h]
+ · rw [h]
-- mul_assoc
- . rw [mul_assoc]
+ · rw [mul_assoc]
set_option linter.uppercaseLean3 false in
#align Mon.colimits.desc_fun MonCat.Colimits.descFun
@@ -261,12 +261,12 @@ def colimitIsColimit : IsColimit (colimitCocone F) where
ext x
induction' x using Quot.inductionOn with x
induction' x with j x x y hx hy
- . change _ = s.ι.app j _
+ · change _ = s.ι.app j _
rw [← w j]
rfl
- . rw [quot_one, map_one]
+ · rw [quot_one, map_one]
rfl
- . rw [quot_mul, map_mul, hx, hy]
+ · rw [quot_mul, map_mul, hx, hy]
dsimp [descMorphism, FunLike.coe, descFun]
simp only [← quot_mul, descFunLift]
set_option linter.uppercaseLean3 false in
The unported dependencies are