category_theory.monoidal.coherence
⟷
Mathlib.Tactic.CategoryTheory.Coherence
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)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(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
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison, Yuma Mizuno, Oleksandr Manzyuk
-/
import CategoryTheory.Monoidal.Free.Coherence
-import CategoryTheory.Bicategory.CoherenceTactic
+import Tactic.CategoryTheory.BicategoryCoherence
#align_import category_theory.monoidal.coherence from "leanprover-community/mathlib"@"7e5137f579de09a059a5ce98f364a04e221aabf0"
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -102,7 +102,7 @@ instance liftHomTensor {W X Y Z : C} [LiftObj W] [LiftObj X] [LiftObj Y] [LiftOb
where lift := LiftHom.lift f ⊗ LiftHom.lift g
#align category_theory.monoidal_category.lift_hom_tensor CategoryTheory.MonoidalCategory.liftHomTensor
-/- ./././Mathport/Syntax/Translate/Command.lean:404:30: infer kinds are unsupported in Lean 4: #[`Hom] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:400:30: infer kinds are unsupported in Lean 4: #[`Hom] [] -/
-- We could likely turn this into a `Prop` valued existential if that proves useful.
/-- A typeclass carrying a choice of monoidal structural isomorphism between two objects.
Used by the `⊗≫` monoidal composition operator, and the `coherence` tactic.
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -102,7 +102,7 @@ instance liftHomTensor {W X Y Z : C} [LiftObj W] [LiftObj X] [LiftObj Y] [LiftOb
where lift := LiftHom.lift f ⊗ LiftHom.lift g
#align category_theory.monoidal_category.lift_hom_tensor CategoryTheory.MonoidalCategory.liftHomTensor
-/- ./././Mathport/Syntax/Translate/Command.lean:394:30: infer kinds are unsupported in Lean 4: #[`Hom] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:404:30: infer kinds are unsupported in Lean 4: #[`Hom] [] -/
-- We could likely turn this into a `Prop` valued existential if that proves useful.
/-- A typeclass carrying a choice of monoidal structural isomorphism between two objects.
Used by the `⊗≫` monoidal composition operator, and the `coherence` tactic.
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,8 +3,8 @@ Copyright (c) 2022. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison, Yuma Mizuno, Oleksandr Manzyuk
-/
-import Mathbin.CategoryTheory.Monoidal.Free.Coherence
-import Mathbin.CategoryTheory.Bicategory.CoherenceTactic
+import CategoryTheory.Monoidal.Free.Coherence
+import CategoryTheory.Bicategory.CoherenceTactic
#align_import category_theory.monoidal.coherence from "leanprover-community/mathlib"@"7e5137f579de09a059a5ce98f364a04e221aabf0"
@@ -102,7 +102,7 @@ instance liftHomTensor {W X Y Z : C} [LiftObj W] [LiftObj X] [LiftObj Y] [LiftOb
where lift := LiftHom.lift f ⊗ LiftHom.lift g
#align category_theory.monoidal_category.lift_hom_tensor CategoryTheory.MonoidalCategory.liftHomTensor
-/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`Hom] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:394:30: infer kinds are unsupported in Lean 4: #[`Hom] [] -/
-- We could likely turn this into a `Prop` valued existential if that proves useful.
/-- A typeclass carrying a choice of monoidal structural isomorphism between two objects.
Used by the `⊗≫` monoidal composition operator, and the `coherence` tactic.
@@ -300,7 +300,7 @@ unsafe def mk_project_map_expr (e : expr) : tactic expr :=
(CategoryTheory.MonoidalCategory.LiftHom.lift $(e)))
#align tactic.mk_project_map_expr tactic.mk_project_map_expr
-/- ./././Mathport/Syntax/Translate/Expr.lean:336:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:337:4: warning: unsupported (TODO): `[tacs] -/
-- PLEASE REPORT THIS TO MATHPORT DEVS, THIS SHOULD NOT HAPPEN.
-- failed to format: unknown constant 'term.pseudo.antiquot'
/-- Coherence tactic for monoidal categories. -/ unsafe
@@ -365,9 +365,9 @@ theorem assoc_liftHom {W X Y Z : C} [LiftObj W] [LiftObj X] [LiftObj Y] (f : W
(Category.assoc _ _ _).symm
#align tactic.coherence.assoc_lift_hom Tactic.Coherence.assoc_liftHom
-/- ./././Mathport/Syntax/Translate/Expr.lean:336:4: warning: unsupported (TODO): `[tacs] -/
-/- ./././Mathport/Syntax/Translate/Expr.lean:336:4: warning: unsupported (TODO): `[tacs] -/
-/- ./././Mathport/Syntax/Translate/Expr.lean:336:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:337:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:337:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:337:4: warning: unsupported (TODO): `[tacs] -/
/-- Internal tactic used in `coherence`.
Rewrites an equation `f = g` as `f₀ ≫ f₁ = g₀ ≫ g₁`,
@@ -400,8 +400,8 @@ end Coherence
open Coherence
-/- ./././Mathport/Syntax/Translate/Expr.lean:336:4: warning: unsupported (TODO): `[tacs] -/
-/- ./././Mathport/Syntax/Translate/Expr.lean:336:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:337:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:337:4: warning: unsupported (TODO): `[tacs] -/
/-- The main part of `coherence` tactic. -/
unsafe def coherence_loop : tactic Unit := do
-- To prove an equality `f = g` in a monoidal category,
@@ -443,8 +443,8 @@ unsafe def coherence_loop : tactic Unit := do
coherence_loop
#align tactic.coherence_loop tactic.coherence_loop
-/- ./././Mathport/Syntax/Translate/Expr.lean:336:4: warning: unsupported (TODO): `[tacs] -/
-/- ./././Mathport/Syntax/Translate/Expr.lean:336:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:337:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:337:4: warning: unsupported (TODO): `[tacs] -/
/-- Use the coherence theorem for monoidal categories to solve equations in a monoidal equation,
where the two sides only differ by replacing strings of monoidal structural morphisms
(that is, associators, unitors, and identities)
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,15 +2,12 @@
Copyright (c) 2022. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison, Yuma Mizuno, Oleksandr Manzyuk
-
-! This file was ported from Lean 3 source module category_theory.monoidal.coherence
-! leanprover-community/mathlib commit 7e5137f579de09a059a5ce98f364a04e221aabf0
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.CategoryTheory.Monoidal.Free.Coherence
import Mathbin.CategoryTheory.Bicategory.CoherenceTactic
+#align_import category_theory.monoidal.coherence from "leanprover-community/mathlib"@"7e5137f579de09a059a5ce98f364a04e221aabf0"
+
/-!
# A `coherence` tactic for monoidal categories, and `⊗≫` (composition up to associators)
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -105,7 +105,7 @@ instance liftHomTensor {W X Y Z : C} [LiftObj W] [LiftObj X] [LiftObj Y] [LiftOb
where lift := LiftHom.lift f ⊗ LiftHom.lift g
#align category_theory.monoidal_category.lift_hom_tensor CategoryTheory.MonoidalCategory.liftHomTensor
-/- ./././Mathport/Syntax/Translate/Command.lean:394:30: infer kinds are unsupported in Lean 4: #[`Hom] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`Hom] [] -/
-- We could likely turn this into a `Prop` valued existential if that proves useful.
/-- A typeclass carrying a choice of monoidal structural isomorphism between two objects.
Used by the `⊗≫` monoidal composition operator, and the `coherence` tactic.
@@ -244,7 +244,6 @@ def monoidalComp {W X Y Z : C} [LiftObj X] [LiftObj Y] [MonoidalCoherence X Y] (
f ≫ MonoidalCoherence.hom X Y ≫ g
#align category_theory.monoidal_category.monoidal_comp CategoryTheory.MonoidalCategory.monoidalComp
--- mathport name: «expr ⊗≫ »
infixr:80 " ⊗≫ " => monoidalComp
-- type as \ot \gg
@@ -255,7 +254,6 @@ def monoidalIsoComp {W X Y Z : C} [LiftObj X] [LiftObj Y] [MonoidalCoherence X Y
f ≪≫ asIso (MonoidalCoherence.hom X Y) ≪≫ g
#align category_theory.monoidal_category.monoidal_iso_comp CategoryTheory.MonoidalCategory.monoidalIsoComp
--- mathport name: «expr ≪⊗≫ »
infixr:80 " ≪⊗≫ " => monoidalIsoComp
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/7e5137f579de09a059a5ce98f364a04e221aabf0
@@ -305,7 +305,7 @@ unsafe def mk_project_map_expr (e : expr) : tactic expr :=
(CategoryTheory.MonoidalCategory.LiftHom.lift $(e)))
#align tactic.mk_project_map_expr tactic.mk_project_map_expr
-/- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:336:4: warning: unsupported (TODO): `[tacs] -/
-- PLEASE REPORT THIS TO MATHPORT DEVS, THIS SHOULD NOT HAPPEN.
-- failed to format: unknown constant 'term.pseudo.antiquot'
/-- Coherence tactic for monoidal categories. -/ unsafe
@@ -370,9 +370,9 @@ theorem assoc_liftHom {W X Y Z : C} [LiftObj W] [LiftObj X] [LiftObj Y] (f : W
(Category.assoc _ _ _).symm
#align tactic.coherence.assoc_lift_hom Tactic.Coherence.assoc_liftHom
-/- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
-/- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
-/- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:336:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:336:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:336:4: warning: unsupported (TODO): `[tacs] -/
/-- Internal tactic used in `coherence`.
Rewrites an equation `f = g` as `f₀ ≫ f₁ = g₀ ≫ g₁`,
@@ -405,8 +405,8 @@ end Coherence
open Coherence
-/- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
-/- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:336:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:336:4: warning: unsupported (TODO): `[tacs] -/
/-- The main part of `coherence` tactic. -/
unsafe def coherence_loop : tactic Unit := do
-- To prove an equality `f = g` in a monoidal category,
@@ -448,8 +448,8 @@ unsafe def coherence_loop : tactic Unit := do
coherence_loop
#align tactic.coherence_loop tactic.coherence_loop
-/- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
-/- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:336:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:336:4: warning: unsupported (TODO): `[tacs] -/
/-- Use the coherence theorem for monoidal categories to solve equations in a monoidal equation,
where the two sides only differ by replacing strings of monoidal structural morphisms
(that is, associators, unitors, and identities)
mathlib commit https://github.com/leanprover-community/mathlib/commit/7e5137f579de09a059a5ce98f364a04e221aabf0
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison, Yuma Mizuno, Oleksandr Manzyuk
! This file was ported from Lean 3 source module category_theory.monoidal.coherence
-! leanprover-community/mathlib commit 4d0b6301ef962e6bd74462998943ce38b7adb132
+! leanprover-community/mathlib commit 7e5137f579de09a059a5ce98f364a04e221aabf0
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -14,6 +14,9 @@ import Mathbin.CategoryTheory.Bicategory.CoherenceTactic
/-!
# A `coherence` tactic for monoidal categories, and `⊗≫` (composition up to associators)
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
We provide a `coherence` tactic,
which proves equations where the two sides differ by replacing
strings of monoidal structural morphisms with other such strings.
mathlib commit https://github.com/leanprover-community/mathlib/commit/31c24aa72e7b3e5ed97a8412470e904f82b81004
@@ -303,6 +303,7 @@ unsafe def mk_project_map_expr (e : expr) : tactic expr :=
#align tactic.mk_project_map_expr tactic.mk_project_map_expr
/- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
+-- PLEASE REPORT THIS TO MATHPORT DEVS, THIS SHOULD NOT HAPPEN.
-- failed to format: unknown constant 'term.pseudo.antiquot'
/-- Coherence tactic for monoidal categories. -/ unsafe
def
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -102,7 +102,7 @@ instance liftHomTensor {W X Y Z : C} [LiftObj W] [LiftObj X] [LiftObj Y] [LiftOb
where lift := LiftHom.lift f ⊗ LiftHom.lift g
#align category_theory.monoidal_category.lift_hom_tensor CategoryTheory.MonoidalCategory.liftHomTensor
-/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`Hom] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:394:30: infer kinds are unsupported in Lean 4: #[`Hom] [] -/
-- We could likely turn this into a `Prop` valued existential if that proves useful.
/-- A typeclass carrying a choice of monoidal structural isomorphism between two objects.
Used by the `⊗≫` monoidal composition operator, and the `coherence` tactic.
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -273,10 +273,8 @@ example {W X Y Z : C} (f : W ⟶ (X ⊗ Y) ⊗ Z) : W ⟶ X ⊗ Y ⊗ Z :=
f ⊗≫ 𝟙 _
@[simp]
-theorem monoidalComp_refl {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z) : f ⊗≫ g = f ≫ g :=
- by
- dsimp [monoidal_comp]
- simp
+theorem monoidalComp_refl {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z) : f ⊗≫ g = f ≫ g := by
+ dsimp [monoidal_comp]; simp
#align category_theory.monoidal_category.monoidal_comp_refl CategoryTheory.MonoidalCategory.monoidalComp_refl
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/09079525fd01b3dda35e96adaa08d2f943e1648c
@@ -102,7 +102,7 @@ instance liftHomTensor {W X Y Z : C} [LiftObj W] [LiftObj X] [LiftObj Y] [LiftOb
where lift := LiftHom.lift f ⊗ LiftHom.lift g
#align category_theory.monoidal_category.lift_hom_tensor CategoryTheory.MonoidalCategory.liftHomTensor
-/- ./././Mathport/Syntax/Translate/Command.lean:388:30: infer kinds are unsupported in Lean 4: #[`Hom] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`Hom] [] -/
-- We could likely turn this into a `Prop` valued existential if that proves useful.
/-- A typeclass carrying a choice of monoidal structural isomorphism between two objects.
Used by the `⊗≫` monoidal composition operator, and the `coherence` tactic.
mathlib commit https://github.com/leanprover-community/mathlib/commit/4c586d291f189eecb9d00581aeb3dd998ac34442
@@ -304,7 +304,7 @@ unsafe def mk_project_map_expr (e : expr) : tactic expr :=
(CategoryTheory.MonoidalCategory.LiftHom.lift $(e)))
#align tactic.mk_project_map_expr tactic.mk_project_map_expr
-/- ./././Mathport/Syntax/Translate/Expr.lean:334:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
-- failed to format: unknown constant 'term.pseudo.antiquot'
/-- Coherence tactic for monoidal categories. -/ unsafe
def
@@ -338,7 +338,7 @@ unsafe def pure_coherence : tactic Unit :=
monoidal_coherence <|> bicategorical_coherence
#align tactic.pure_coherence tactic.pure_coherence
-/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:72:18: unsupported non-interactive tactic tactic.pure_coherence -/
+/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:69:18: unsupported non-interactive tactic tactic.pure_coherence -/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
@@ -368,9 +368,9 @@ theorem assoc_liftHom {W X Y Z : C} [LiftObj W] [LiftObj X] [LiftObj Y] (f : W
(Category.assoc _ _ _).symm
#align tactic.coherence.assoc_lift_hom Tactic.Coherence.assoc_liftHom
-/- ./././Mathport/Syntax/Translate/Expr.lean:334:4: warning: unsupported (TODO): `[tacs] -/
-/- ./././Mathport/Syntax/Translate/Expr.lean:334:4: warning: unsupported (TODO): `[tacs] -/
-/- ./././Mathport/Syntax/Translate/Expr.lean:334:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
/-- Internal tactic used in `coherence`.
Rewrites an equation `f = g` as `f₀ ≫ f₁ = g₀ ≫ g₁`,
@@ -383,7 +383,7 @@ unsafe def liftable_prefixes : tactic Unit := do
(try sorry >> sorry) >> try sorry
#align tactic.coherence.liftable_prefixes tactic.coherence.liftable_prefixes
-/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:72:18: unsupported non-interactive tactic tactic.coherence.liftable_prefixes -/
+/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:69:18: unsupported non-interactive tactic tactic.coherence.liftable_prefixes -/
example {W X Y Z : C} (f : Y ⟶ Z) (g) (w : False) : (λ_ _).Hom ≫ f = g :=
by
run_tac
@@ -403,8 +403,8 @@ end Coherence
open Coherence
-/- ./././Mathport/Syntax/Translate/Expr.lean:334:4: warning: unsupported (TODO): `[tacs] -/
-/- ./././Mathport/Syntax/Translate/Expr.lean:334:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
/-- The main part of `coherence` tactic. -/
unsafe def coherence_loop : tactic Unit := do
-- To prove an equality `f = g` in a monoidal category,
@@ -446,8 +446,8 @@ unsafe def coherence_loop : tactic Unit := do
coherence_loop
#align tactic.coherence_loop tactic.coherence_loop
-/- ./././Mathport/Syntax/Translate/Expr.lean:334:4: warning: unsupported (TODO): `[tacs] -/
-/- ./././Mathport/Syntax/Translate/Expr.lean:334:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
/-- Use the coherence theorem for monoidal categories to solve equations in a monoidal equation,
where the two sides only differ by replacing strings of monoidal structural morphisms
(that is, associators, unitors, and identities)
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
@@ -262,7 +262,8 @@ elab_rules : tactic
MonoidalCategory.whiskerRight_tensor, MonoidalCategory.whiskerRight_id,
MonoidalCategory.whiskerLeft_comp, MonoidalCategory.whiskerLeft_id,
MonoidalCategory.comp_whiskerRight, MonoidalCategory.id_whiskerRight,
- MonoidalCategory.whisker_assoc];
+ MonoidalCategory.whisker_assoc,
+ MonoidalCategory.id_tensorHom, MonoidalCategory.tensorHom_id];
-- I'm not sure if `tensorHom` should be expanded.
try simp only [MonoidalCategory.tensorHom_def]
))
I realized that the monoid composition ⊗≫
can be defined without depending on the free monoid category, and that it is still useful.
@@ -6,11 +6,12 @@ Authors: Scott Morrison, Yuma Mizuno, Oleksandr Manzyuk
import Mathlib.CategoryTheory.Monoidal.Free.Basic
import Mathlib.Lean.Meta
import Mathlib.Tactic.CategoryTheory.BicategoryCoherence
+import Mathlib.Tactic.CategoryTheory.MonoidalComp
#align_import category_theory.monoidal.coherence from "leanprover-community/mathlib"@"f187f1074fa1857c94589cc653c786cadc4c35ff"
/-!
-# A `coherence` tactic for monoidal categories, and `⊗≫` (composition up to associators)
+# A `coherence` tactic for monoidal categories
We provide a `coherence` tactic,
which proves equations where the two sides differ by replacing
@@ -22,9 +23,6 @@ which proves that any two morphisms (with the same source and target)
in a monoidal category which are built out of associators and unitors
are equal.
-We also provide `f ⊗≫ g`, the `monoidal_comp` operation,
-which automatically inserts associators and unitors as needed
-to make the target of `f` match the source of `g`.
-/
set_option autoImplicit true
@@ -100,124 +98,6 @@ instance LiftHom_tensor {W X Y Z : C} [LiftObj W] [LiftObj X] [LiftObj Y] [LiftO
(f : W ⟶ X) (g : Y ⟶ Z) [LiftHom f] [LiftHom g] : LiftHom (f ⊗ g) where
lift := LiftHom.lift f ⊗ LiftHom.lift g
-/--
-A typeclass carrying a choice of monoidal structural isomorphism between two objects.
-Used by the `⊗≫` monoidal composition operator, and the `coherence` tactic.
--/
--- We could likely turn this into a `Prop` valued existential if that proves useful.
-class MonoidalCoherence (X Y : C) [LiftObj X] [LiftObj Y] where
- hom : X ⟶ Y
- [isIso : IsIso hom]
-
-attribute [instance] MonoidalCoherence.isIso
-
-namespace MonoidalCoherence
-
-@[simps]
-instance refl (X : C) [LiftObj X] : MonoidalCoherence X X := ⟨𝟙 _⟩
-
-@[simps]
-instance whiskerLeft (X Y Z : C) [LiftObj X] [LiftObj Y] [LiftObj Z] [MonoidalCoherence Y Z] :
- MonoidalCoherence (X ⊗ Y) (X ⊗ Z) :=
- ⟨X ◁ MonoidalCoherence.hom⟩
-
-@[simps]
-instance whiskerRight (X Y Z : C) [LiftObj X] [LiftObj Y] [LiftObj Z] [MonoidalCoherence X Y] :
- MonoidalCoherence (X ⊗ Z) (Y ⊗ Z) :=
- ⟨MonoidalCoherence.hom ▷ Z⟩
-
-@[simps]
-instance tensor_right (X Y : C) [LiftObj X] [LiftObj Y] [MonoidalCoherence (𝟙_ C) Y] :
- MonoidalCoherence X (X ⊗ Y) :=
- ⟨(ρ_ X).inv ≫ X ◁ MonoidalCoherence.hom⟩
-
-@[simps]
-instance tensor_right' (X Y : C) [LiftObj X] [LiftObj Y] [MonoidalCoherence Y (𝟙_ C)] :
- MonoidalCoherence (X ⊗ Y) X :=
- ⟨X ◁ MonoidalCoherence.hom ≫ (ρ_ X).hom⟩
-
-@[simps]
-instance left (X Y : C) [LiftObj X] [LiftObj Y] [MonoidalCoherence X Y] :
- MonoidalCoherence (𝟙_ C ⊗ X) Y :=
- ⟨(λ_ X).hom ≫ MonoidalCoherence.hom⟩
-
-@[simps]
-instance left' (X Y : C) [LiftObj X] [LiftObj Y] [MonoidalCoherence X Y] :
- MonoidalCoherence X (𝟙_ C ⊗ Y) :=
- ⟨MonoidalCoherence.hom ≫ (λ_ Y).inv⟩
-
-@[simps]
-instance right (X Y : C) [LiftObj X] [LiftObj Y] [MonoidalCoherence X Y] :
- MonoidalCoherence (X ⊗ 𝟙_ C) Y :=
- ⟨(ρ_ X).hom ≫ MonoidalCoherence.hom⟩
-
-@[simps]
-instance right' (X Y : C) [LiftObj X] [LiftObj Y] [MonoidalCoherence X Y] :
- MonoidalCoherence X (Y ⊗ 𝟙_ C) :=
- ⟨MonoidalCoherence.hom ≫ (ρ_ Y).inv⟩
-
-@[simps]
-instance assoc (X Y Z W : C) [LiftObj W] [LiftObj X] [LiftObj Y] [LiftObj Z]
- [MonoidalCoherence (X ⊗ (Y ⊗ Z)) W] : MonoidalCoherence ((X ⊗ Y) ⊗ Z) W :=
- ⟨(α_ X Y Z).hom ≫ MonoidalCoherence.hom⟩
-
-@[simps]
-instance assoc' (W X Y Z : C) [LiftObj W] [LiftObj X] [LiftObj Y] [LiftObj Z]
- [MonoidalCoherence W (X ⊗ (Y ⊗ Z))] : MonoidalCoherence W ((X ⊗ Y) ⊗ Z) :=
- ⟨MonoidalCoherence.hom ≫ (α_ X Y Z).inv⟩
-
-end MonoidalCoherence
-
-/-- Construct an isomorphism between two objects in a monoidal category
-out of unitors and associators. -/
-def monoidalIso (X Y : C) [LiftObj X] [LiftObj Y] [MonoidalCoherence X Y] : X ≅ Y :=
- asIso MonoidalCoherence.hom
-
-example (X : C) : X ≅ (X ⊗ (𝟙_ C ⊗ 𝟙_ C)) := monoidalIso _ _
-
-example (X1 X2 X3 X4 X5 X6 X7 X8 X9 : C) :
- (𝟙_ C ⊗ (X1 ⊗ X2 ⊗ ((X3 ⊗ X4) ⊗ X5)) ⊗ X6 ⊗ (X7 ⊗ X8 ⊗ X9)) ≅
- (X1 ⊗ (X2 ⊗ X3) ⊗ X4 ⊗ (X5 ⊗ (𝟙_ C ⊗ X6) ⊗ X7) ⊗ X8 ⊗ X9) :=
- monoidalIso _ _
-
-/-- Notation for identities up to unitors and associators. -/
-scoped[CategoryTheory.MonoidalCategory] notation " ⊗𝟙 " =>
- Mathlib.Tactic.Coherence.MonoidalCoherence.hom -- type as \ot 𝟙
-
-/-- Compose two morphisms in a monoidal category,
-inserting unitors and associators between as necessary. -/
-def monoidalComp {W X Y Z : C} [LiftObj X] [LiftObj Y]
- [MonoidalCoherence X Y] (f : W ⟶ X) (g : Y ⟶ Z) : W ⟶ Z :=
- f ≫ MonoidalCoherence.hom ≫ g
-
-@[inherit_doc Mathlib.Tactic.Coherence.monoidalComp]
-scoped[CategoryTheory.MonoidalCategory] infixr:80 " ⊗≫ " =>
- Mathlib.Tactic.Coherence.monoidalComp -- type as \ot \gg
-
-/-- Compose two isomorphisms in a monoidal category,
-inserting unitors and associators between as necessary. -/
-noncomputable def monoidalIsoComp {W X Y Z : C} [LiftObj X] [LiftObj Y]
- [MonoidalCoherence X Y] (f : W ≅ X) (g : Y ≅ Z) : W ≅ Z :=
- f ≪≫ asIso MonoidalCoherence.hom ≪≫ g
-
-@[inherit_doc Mathlib.Tactic.Coherence.monoidalIsoComp]
-scoped[CategoryTheory.MonoidalCategory] infixr:80 " ≪⊗≫ " =>
- Mathlib.Tactic.Coherence.monoidalIsoComp -- type as \ll \ot \gg
-
-example {U V W X Y : C} (f : U ⟶ V ⊗ (W ⊗ X)) (g : (V ⊗ W) ⊗ X ⟶ Y) : U ⟶ Y := f ⊗≫ g
-
--- To automatically insert unitors/associators at the beginning or end,
--- you can use `f ⊗≫ 𝟙 _`
-example {W X Y Z : C} (f : W ⟶ (X ⊗ Y) ⊗ Z) : W ⟶ X ⊗ (Y ⊗ Z) := f ⊗≫ 𝟙 _
-
-@[simp] lemma monoidalComp_refl {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z) :
- f ⊗≫ g = f ≫ g := by
- simp [monoidalComp]
-
-example {U V W X Y : C} (f : U ⟶ V ⊗ (W ⊗ X)) (g : (V ⊗ W) ⊗ X ⟶ Y) :
- f ⊗≫ g = f ≫ (α_ _ _ _).inv ≫ g := by
- simp [MonoidalCategory.tensorHom_def, monoidalComp]
-
end lifting
open Lean Meta Elab Tactic
Since the coherence tactic assume that a certain defeq property holds for structural morphisms in a monoidal category and their corresponding morphisms in the free monoidal category, we want free monoidal categories to have the whiskering operators as primitives.
This PR also simplified the proof of the coherence theorem, and removed some porting notes.
@@ -90,11 +90,11 @@ instance LiftHom_comp {X Y Z : C} [LiftObj X] [LiftObj Y] [LiftObj Z] (f : X ⟶
instance liftHom_WhiskerLeft (X : C) [LiftObj X] {Y Z : C} [LiftObj Y] [LiftObj Z]
(f : Y ⟶ Z) [LiftHom f] : LiftHom (X ◁ f) where
- lift := 𝟙 (LiftObj.lift X) ⊗ LiftHom.lift f
+ lift := LiftObj.lift X ◁ LiftHom.lift f
instance liftHom_WhiskerRight {X Y : C} (f : X ⟶ Y) [LiftObj X] [LiftObj Y] [LiftHom f]
{Z : C} [LiftObj Z] : LiftHom (f ▷ Z) where
- lift := LiftHom.lift f ⊗ 𝟙 (LiftObj.lift Z)
+ lift := LiftHom.lift f ▷ LiftObj.lift Z
instance LiftHom_tensor {W X Y Z : C} [LiftObj W] [LiftObj X] [LiftObj Y] [LiftObj Z]
(f : W ⟶ X) (g : Y ⟶ Z) [LiftHom f] [LiftHom g] : LiftHom (f ⊗ g) where
@@ -119,22 +119,22 @@ instance refl (X : C) [LiftObj X] : MonoidalCoherence X X := ⟨𝟙 _⟩
@[simps]
instance whiskerLeft (X Y Z : C) [LiftObj X] [LiftObj Y] [LiftObj Z] [MonoidalCoherence Y Z] :
MonoidalCoherence (X ⊗ Y) (X ⊗ Z) :=
- ⟨𝟙 X ⊗ MonoidalCoherence.hom⟩
+ ⟨X ◁ MonoidalCoherence.hom⟩
@[simps]
instance whiskerRight (X Y Z : C) [LiftObj X] [LiftObj Y] [LiftObj Z] [MonoidalCoherence X Y] :
MonoidalCoherence (X ⊗ Z) (Y ⊗ Z) :=
- ⟨MonoidalCoherence.hom ⊗ 𝟙 Z⟩
+ ⟨MonoidalCoherence.hom ▷ Z⟩
@[simps]
instance tensor_right (X Y : C) [LiftObj X] [LiftObj Y] [MonoidalCoherence (𝟙_ C) Y] :
MonoidalCoherence X (X ⊗ Y) :=
- ⟨(ρ_ X).inv ≫ (𝟙 X ⊗ MonoidalCoherence.hom)⟩
+ ⟨(ρ_ X).inv ≫ X ◁ MonoidalCoherence.hom⟩
@[simps]
instance tensor_right' (X Y : C) [LiftObj X] [LiftObj Y] [MonoidalCoherence Y (𝟙_ C)] :
MonoidalCoherence (X ⊗ Y) X :=
- ⟨(𝟙 X ⊗ MonoidalCoherence.hom) ≫ (ρ_ X).hom⟩
+ ⟨X ◁ MonoidalCoherence.hom ≫ (ρ_ X).hom⟩
@[simps]
instance left (X Y : C) [LiftObj X] [LiftObj Y] [MonoidalCoherence X Y] :
@@ -412,9 +412,5 @@ elab_rules : tactic
Mathlib.Tactic.BicategoryCoherence.BicategoricalCoherence.hom',
monoidalComp]);
whisker_simps (config := {failIfUnchanged := false});
- monoidal_simps (config := {failIfUnchanged := false});
- -- Workaround until we define the whiskerings as the primitives in free monoidal categories.
- simp (config := {failIfUnchanged := false}) only
- [← MonoidalCategory.id_tensorHom, ← MonoidalCategory.tensorHom_id]
- ))
+ monoidal_simps (config := {failIfUnchanged := false})))
coherence_loop
@@ -180,6 +180,10 @@ example (X1 X2 X3 X4 X5 X6 X7 X8 X9 : C) :
(X1 ⊗ (X2 ⊗ X3) ⊗ X4 ⊗ (X5 ⊗ (𝟙_ C ⊗ X6) ⊗ X7) ⊗ X8 ⊗ X9) :=
monoidalIso _ _
+/-- Notation for identities up to unitors and associators. -/
+scoped[CategoryTheory.MonoidalCategory] notation " ⊗𝟙 " =>
+ Mathlib.Tactic.Coherence.MonoidalCoherence.hom -- type as \ot 𝟙
+
/-- Compose two morphisms in a monoidal category,
inserting unitors and associators between as necessary. -/
def monoidalComp {W X Y Z : C} [LiftObj X] [LiftObj Y]
@@ -90,11 +90,11 @@ instance LiftHom_comp {X Y Z : C} [LiftObj X] [LiftObj Y] [LiftObj Z] (f : X ⟶
instance liftHom_WhiskerLeft (X : C) [LiftObj X] {Y Z : C} [LiftObj Y] [LiftObj Z]
(f : Y ⟶ Z) [LiftHom f] : LiftHom (X ◁ f) where
- lift := LiftObj.lift X ◁ LiftHom.lift f
+ lift := 𝟙 (LiftObj.lift X) ⊗ LiftHom.lift f
instance liftHom_WhiskerRight {X Y : C} (f : X ⟶ Y) [LiftObj X] [LiftObj Y] [LiftHom f]
{Z : C} [LiftObj Z] : LiftHom (f ▷ Z) where
- lift := LiftHom.lift f ▷ LiftObj.lift Z
+ lift := LiftHom.lift f ⊗ 𝟙 (LiftObj.lift Z)
instance LiftHom_tensor {W X Y Z : C} [LiftObj W] [LiftObj X] [LiftObj Y] [LiftObj Z]
(f : W ⟶ X) (g : Y ⟶ Z) [LiftHom f] [LiftHom g] : LiftHom (f ⊗ g) where
@@ -129,12 +129,12 @@ instance whiskerRight (X Y Z : C) [LiftObj X] [LiftObj Y] [LiftObj Z] [MonoidalC
@[simps]
instance tensor_right (X Y : C) [LiftObj X] [LiftObj Y] [MonoidalCoherence (𝟙_ C) Y] :
MonoidalCoherence X (X ⊗ Y) :=
- ⟨(ρ_ X).inv ≫ (X ◁ MonoidalCoherence.hom)⟩
+ ⟨(ρ_ X).inv ≫ (𝟙 X ⊗ MonoidalCoherence.hom)⟩
@[simps]
instance tensor_right' (X Y : C) [LiftObj X] [LiftObj Y] [MonoidalCoherence Y (𝟙_ C)] :
MonoidalCoherence (X ⊗ Y) X :=
- ⟨(X ◁ MonoidalCoherence.hom) ≫ (ρ_ X).hom⟩
+ ⟨(𝟙 X ⊗ MonoidalCoherence.hom) ≫ (ρ_ X).hom⟩
@[simps]
instance left (X Y : C) [LiftObj X] [LiftObj Y] [MonoidalCoherence X Y] :
@@ -362,6 +362,27 @@ def coherence_loop (maxSteps := 37) : TacticM Unit :=
-- and whose second terms can be identified by recursively called `coherence`.
coherence_loop maxSteps'
+open Lean.Parser.Tactic
+
+/--
+Simp lemmas for rewriting a hom in monoical categories into a normal form.
+-/
+syntax (name := monoidal_simps) "monoidal_simps" (config)? : tactic
+
+@[inherit_doc monoidal_simps]
+elab_rules : tactic
+| `(tactic| monoidal_simps $[$cfg]?) => do
+ evalTactic (← `(tactic|
+ simp $[$cfg]? only [
+ Category.assoc, MonoidalCategory.tensor_whiskerLeft, MonoidalCategory.id_whiskerLeft,
+ MonoidalCategory.whiskerRight_tensor, MonoidalCategory.whiskerRight_id,
+ MonoidalCategory.whiskerLeft_comp, MonoidalCategory.whiskerLeft_id,
+ MonoidalCategory.comp_whiskerRight, MonoidalCategory.id_whiskerRight,
+ MonoidalCategory.whisker_assoc];
+ -- I'm not sure if `tensorHom` should be expanded.
+ try simp only [MonoidalCategory.tensorHom_def]
+ ))
+
/--
Use the coherence theorem for monoidal categories to solve equations in a monoidal equation,
where the two sides only differ by replacing strings of monoidal structural morphisms
@@ -386,6 +407,10 @@ elab_rules : tactic
Mathlib.Tactic.BicategoryCoherence.BicategoricalCoherence.hom,
Mathlib.Tactic.BicategoryCoherence.BicategoricalCoherence.hom',
monoidalComp]);
- whisker_simps (config := {failIfUnchanged := false})
+ whisker_simps (config := {failIfUnchanged := false});
+ monoidal_simps (config := {failIfUnchanged := false});
+ -- Workaround until we define the whiskerings as the primitives in free monoidal categories.
+ simp (config := {failIfUnchanged := false}) only
+ [← MonoidalCategory.id_tensorHom, ← MonoidalCategory.tensorHom_id]
))
coherence_loop
@@ -88,6 +88,14 @@ instance LiftHom_comp {X Y Z : C} [LiftObj X] [LiftObj Y] [LiftObj Z] (f : X ⟶
[LiftHom f] [LiftHom g] : LiftHom (f ≫ g) where
lift := LiftHom.lift f ≫ LiftHom.lift g
+instance liftHom_WhiskerLeft (X : C) [LiftObj X] {Y Z : C} [LiftObj Y] [LiftObj Z]
+ (f : Y ⟶ Z) [LiftHom f] : LiftHom (X ◁ f) where
+ lift := LiftObj.lift X ◁ LiftHom.lift f
+
+instance liftHom_WhiskerRight {X Y : C} (f : X ⟶ Y) [LiftObj X] [LiftObj Y] [LiftHom f]
+ {Z : C} [LiftObj Z] : LiftHom (f ▷ Z) where
+ lift := LiftHom.lift f ▷ LiftObj.lift Z
+
instance LiftHom_tensor {W X Y Z : C} [LiftObj W] [LiftObj X] [LiftObj Y] [LiftObj Z]
(f : W ⟶ X) (g : Y ⟶ Z) [LiftHom f] [LiftHom g] : LiftHom (f ⊗ g) where
lift := LiftHom.lift f ⊗ LiftHom.lift g
@@ -109,19 +117,24 @@ namespace MonoidalCoherence
instance refl (X : C) [LiftObj X] : MonoidalCoherence X X := ⟨𝟙 _⟩
@[simps]
-instance tensor (X Y Z : C) [LiftObj X] [LiftObj Y] [LiftObj Z] [MonoidalCoherence Y Z] :
+instance whiskerLeft (X Y Z : C) [LiftObj X] [LiftObj Y] [LiftObj Z] [MonoidalCoherence Y Z] :
MonoidalCoherence (X ⊗ Y) (X ⊗ Z) :=
⟨𝟙 X ⊗ MonoidalCoherence.hom⟩
+@[simps]
+instance whiskerRight (X Y Z : C) [LiftObj X] [LiftObj Y] [LiftObj Z] [MonoidalCoherence X Y] :
+ MonoidalCoherence (X ⊗ Z) (Y ⊗ Z) :=
+ ⟨MonoidalCoherence.hom ⊗ 𝟙 Z⟩
+
@[simps]
instance tensor_right (X Y : C) [LiftObj X] [LiftObj Y] [MonoidalCoherence (𝟙_ C) Y] :
MonoidalCoherence X (X ⊗ Y) :=
- ⟨(ρ_ X).inv ≫ (𝟙 X ⊗ MonoidalCoherence.hom)⟩
+ ⟨(ρ_ X).inv ≫ (X ◁ MonoidalCoherence.hom)⟩
@[simps]
instance tensor_right' (X Y : C) [LiftObj X] [LiftObj Y] [MonoidalCoherence Y (𝟙_ C)] :
MonoidalCoherence (X ⊗ Y) X :=
- ⟨(𝟙 X ⊗ MonoidalCoherence.hom) ≫ (ρ_ X).hom⟩
+ ⟨(X ◁ MonoidalCoherence.hom) ≫ (ρ_ X).hom⟩
@[simps]
instance left (X Y : C) [LiftObj X] [LiftObj Y] [MonoidalCoherence X Y] :
@@ -199,7 +212,7 @@ example {W X Y Z : C} (f : W ⟶ (X ⊗ Y) ⊗ Z) : W ⟶ X ⊗ (Y ⊗ Z) := f
example {U V W X Y : C} (f : U ⟶ V ⊗ (W ⊗ X)) (g : (V ⊗ W) ⊗ X ⟶ Y) :
f ⊗≫ g = f ≫ (α_ _ _ _).inv ≫ g := by
- simp [monoidalComp]
+ simp [MonoidalCategory.tensorHom_def, monoidalComp]
end lifting
@@ -227,7 +240,7 @@ def mkProjectMapExpr (e : Expr) : TermElabM Expr := do
/-- Coherence tactic for monoidal categories. -/
def monoidal_coherence (g : MVarId) : TermElabM Unit := g.withContext do
withOptions (fun opts => synthInstance.maxSize.set opts
- (max 256 (synthInstance.maxSize.get opts))) do
+ (max 512 (synthInstance.maxSize.get opts))) do
-- TODO: is this `dsimp only` step necessary? It doesn't appear to be in the tests below.
let (ty, _) ← dsimp (← g.getType) (← Simp.Context.ofNames [] true)
let some (_, lhs, rhs) := (← whnfR ty).eq? | exception g "Not an equation of morphisms."
@@ -3,7 +3,8 @@ Copyright (c) 2022. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison, Yuma Mizuno, Oleksandr Manzyuk
-/
-import Mathlib.CategoryTheory.Monoidal.Free.Coherence
+import Mathlib.CategoryTheory.Monoidal.Free.Basic
+import Mathlib.Lean.Meta
import Mathlib.Tactic.CategoryTheory.BicategoryCoherence
#align_import category_theory.monoidal.coherence from "leanprover-community/mathlib"@"f187f1074fa1857c94589cc653c786cadc4c35ff"
For error messages that span multiple lines, now we can use the new "string gap" escape sequence (a \
at the end of the line, which causes all the whitespace at the beginning of the next line ignored), rather than using append operations or hacks involving {
and }
for s!
and m!
strings.
Style-wise, we suggest for long messages that the body of the message start on the next line if possible, by starting the message with a string gap sequence. This eliminates needing to decide whether to indent continuing lines at the "
or at the next column. For example:
logError m!"\
Tactic 'more_magic' cannot \
apply expression{indentD e}\n\
due to some reason or another."
Note that to get whitespace to appear between one line and the next, you include it before the \
.
@@ -329,8 +329,8 @@ def coherence_loop (maxSteps := 37) : TacticM Unit :=
-- Otherwise, rearrange so we have a maximal prefix of each side
-- that is built out of unitors and associators:
evalTactic (← `(tactic| liftable_prefixes)) <|>
- exception' ("Something went wrong in the `coherence` tactic: " ++
- "is the target an equation in a monoidal category?")
+ exception' "Something went wrong in the `coherence` tactic: \
+ is the target an equation in a monoidal category?"
-- The goal should now look like `f₀ ≫ f₁ = g₀ ≫ g₁`,
liftMetaTactic MVarId.congrCore
-- and now we have two goals `f₀ = g₀` and `f₁ = g₁`.
These inductive types carry data, so these should be functionCase
not theorem_case
.
It seems that mathport didn't do this.
@@ -49,7 +49,7 @@ It must be the case that `projectObj id (LiftObj.lift x) = x` by defeq. -/
class LiftObj (X : C) where
protected lift : FreeMonoidalCategory C
-instance LiftObj_unit : LiftObj (𝟙_ C) := ⟨Unit⟩
+instance LiftObj_unit : LiftObj (𝟙_ C) := ⟨unit⟩
instance LiftObj_tensor (X Y : C) [LiftObj X] [LiftObj Y] : LiftObj (X ⊗ Y) where
lift := LiftObj.lift X ⊗ LiftObj.lift Y
This RP introduces adjunctions and adjoint equivalences in bicategories, and shows that a (non-adjoint) equivalence can be promoted to an adjoint equivalence by upgrading the counit.
The constructor of adjoint equivalences only requires the left triangle identities since I will plan to show that it implies the right triangle identities in a separate PR.
@@ -172,8 +172,9 @@ def monoidalComp {W X Y Z : C} [LiftObj X] [LiftObj Y]
[MonoidalCoherence X Y] (f : W ⟶ X) (g : Y ⟶ Z) : W ⟶ Z :=
f ≫ MonoidalCoherence.hom ≫ g
-@[inherit_doc monoidalComp]
-infixr:80 " ⊗≫ " => monoidalComp -- type as \ot \gg
+@[inherit_doc Mathlib.Tactic.Coherence.monoidalComp]
+scoped[CategoryTheory.MonoidalCategory] infixr:80 " ⊗≫ " =>
+ Mathlib.Tactic.Coherence.monoidalComp -- type as \ot \gg
/-- Compose two isomorphisms in a monoidal category,
inserting unitors and associators between as necessary. -/
@@ -181,8 +182,9 @@ noncomputable def monoidalIsoComp {W X Y Z : C} [LiftObj X] [LiftObj Y]
[MonoidalCoherence X Y] (f : W ≅ X) (g : Y ≅ Z) : W ≅ Z :=
f ≪≫ asIso MonoidalCoherence.hom ≪≫ g
-@[inherit_doc monoidalIsoComp]
-infixr:80 " ≪⊗≫ " => monoidalIsoComp -- type as \ot \gg
+@[inherit_doc Mathlib.Tactic.Coherence.monoidalIsoComp]
+scoped[CategoryTheory.MonoidalCategory] infixr:80 " ≪⊗≫ " =>
+ Mathlib.Tactic.Coherence.monoidalIsoComp -- type as \ll \ot \gg
example {U V W X Y : C} (f : U ⟶ V ⊗ (W ⊗ X)) (g : (V ⊗ W) ⊗ X ⟶ Y) : U ⟶ Y := f ⊗≫ g
@@ -366,7 +368,10 @@ syntax (name := coherence) "coherence" : tactic
elab_rules : tactic
| `(tactic| coherence) => do
evalTactic (← `(tactic|
- (simp (config := {failIfUnchanged := false}) only [bicategoricalComp, monoidalComp]);
+ (simp (config := {failIfUnchanged := false}) only [bicategoricalComp,
+ Mathlib.Tactic.BicategoryCoherence.BicategoricalCoherence.hom,
+ Mathlib.Tactic.BicategoryCoherence.BicategoricalCoherence.hom',
+ monoidalComp]);
whisker_simps (config := {failIfUnchanged := false})
))
coherence_loop
The major change here is adapting to simp
failing if it makes no progress.
The vast majority of the redundant simp
s found due to this change were extracted to #6632.
Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@@ -287,9 +287,11 @@ elab (name := liftable_prefixes) "liftable_prefixes" : tactic => do
withOptions (fun opts => synthInstance.maxSize.set opts
(max 256 (synthInstance.maxSize.get opts))) do
evalTactic (← `(tactic|
- simp only [monoidalComp, Category.assoc, MonoidalCoherence.hom] <;>
+ (simp (config := {failIfUnchanged := false}) only
+ [monoidalComp, Category.assoc, MonoidalCoherence.hom]) <;>
(apply (cancel_epi (𝟙 _)).1 <;> try infer_instance) <;>
- simp only [assoc_liftHom, Mathlib.Tactic.BicategoryCoherence.assoc_liftHom₂]))
+ (simp (config := {failIfUnchanged := false}) only
+ [assoc_liftHom, Mathlib.Tactic.BicategoryCoherence.assoc_liftHom₂])))
lemma insert_id_lhs {C : Type*} [Category C] {X Y : C} (f g : X ⟶ Y) (w : f ≫ 𝟙 _ = g) :
f = g := by
@@ -364,8 +366,7 @@ syntax (name := coherence) "coherence" : tactic
elab_rules : tactic
| `(tactic| coherence) => do
evalTactic (← `(tactic|
- simp only [bicategoricalComp];
- simp only [monoidalComp];
- try whisker_simps
+ (simp (config := {failIfUnchanged := false}) only [bicategoricalComp, monoidalComp]);
+ whisker_simps (config := {failIfUnchanged := false})
))
coherence_loop
Autoimplicits are highly controversial and also defeat the performance-improving work in #6474.
The intent of this PR is to make autoImplicit
opt-in on a per-file basis, by disabling it in the lakefile and enabling it again with set_option autoImplicit true
in the few files that rely on it.
That also keeps this PR small, as opposed to attempting to "fix" files to not need it any more.
I claim that many of the uses of autoImplicit
in these files are accidental; situations such as:
variables
are in scope, but pasting the lemma in the wrong sectionHaving set_option autoImplicit false
as the default prevents these types of mistake being made in the 90% of files where autoImplicit
s are not used at all, and causes them to be caught by CI during review.
I think there were various points during the port where we encouraged porters to delete the universes u v
lines; I think having autoparams for universe variables only would cover a lot of the cases we actually use them, while avoiding any real shortcomings.
A Zulip poll (after combining overlapping votes accordingly) was in favor of this change with 5:5:18
as the no:dontcare:yes
vote ratio.
While this PR was being reviewed, a handful of files gained some more likely-accidental autoImplicits. In these places, set_option autoImplicit true
has been placed locally within a section, rather than at the top of the file.
@@ -26,6 +26,8 @@ which automatically inserts associators and unitors as needed
to make the target of `f` match the source of `g`.
-/
+set_option autoImplicit true
+
-- Porting note: restore when ported
-- import Mathlib.CategoryTheory.Bicategory.CoherenceTactic
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -289,11 +289,11 @@ elab (name := liftable_prefixes) "liftable_prefixes" : tactic => do
(apply (cancel_epi (𝟙 _)).1 <;> try infer_instance) <;>
simp only [assoc_liftHom, Mathlib.Tactic.BicategoryCoherence.assoc_liftHom₂]))
-lemma insert_id_lhs {C : Type _} [Category C] {X Y : C} (f g : X ⟶ Y) (w : f ≫ 𝟙 _ = g) :
+lemma insert_id_lhs {C : Type*} [Category C] {X Y : C} (f g : X ⟶ Y) (w : f ≫ 𝟙 _ = g) :
f = g := by
simpa using w
-lemma insert_id_rhs {C : Type _} [Category C] {X Y : C} (f g : X ⟶ Y) (w : f = g ≫ 𝟙 _) :
+lemma insert_id_rhs {C : Type*} [Category C] {X Y : C} (f g : X ⟶ Y) (w : f = g ≫ 𝟙 _) :
f = g := by
simpa using w
@@ -2,15 +2,12 @@
Copyright (c) 2022. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison, Yuma Mizuno, Oleksandr Manzyuk
-
-! This file was ported from Lean 3 source module category_theory.monoidal.coherence
-! leanprover-community/mathlib commit f187f1074fa1857c94589cc653c786cadc4c35ff
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.CategoryTheory.Monoidal.Free.Coherence
import Mathlib.Tactic.CategoryTheory.BicategoryCoherence
+#align_import category_theory.monoidal.coherence from "leanprover-community/mathlib"@"f187f1074fa1857c94589cc653c786cadc4c35ff"
+
/-!
# A `coherence` tactic for monoidal categories, and `⊗≫` (composition up to associators)
@@ -292,11 +292,13 @@ elab (name := liftable_prefixes) "liftable_prefixes" : tactic => do
(apply (cancel_epi (𝟙 _)).1 <;> try infer_instance) <;>
simp only [assoc_liftHom, Mathlib.Tactic.BicategoryCoherence.assoc_liftHom₂]))
-lemma insert_id_lhs {C : Type _} [Category C] {X Y : C} (f g : X ⟶ Y) (w : f ≫ 𝟙 _ = g) : f = g :=
-by simpa using w
+lemma insert_id_lhs {C : Type _} [Category C] {X Y : C} (f g : X ⟶ Y) (w : f ≫ 𝟙 _ = g) :
+ f = g := by
+ simpa using w
-lemma insert_id_rhs {C : Type _} [Category C] {X Y : C} (f g : X ⟶ Y) (w : f = g ≫ 𝟙 _) : f = g :=
-by simpa using w
+lemma insert_id_rhs {C : Type _} [Category C] {X Y : C} (f g : X ⟶ Y) (w : f = g ≫ 𝟙 _) :
+ f = g := by
+ simpa using w
/-- If either the lhs or rhs is not a composition, compose it on the right with an identity. -/
def insertTrailingIds (g : MVarId) : MetaM MVarId := do
@@ -9,6 +9,7 @@ Authors: Scott Morrison, Yuma Mizuno, Oleksandr Manzyuk
! if you have ported upstream changes.
-/
import Mathlib.CategoryTheory.Monoidal.Free.Coherence
+import Mathlib.Tactic.CategoryTheory.BicategoryCoherence
/-!
# A `coherence` tactic for monoidal categories, and `⊗≫` (composition up to associators)
@@ -40,6 +41,7 @@ open CategoryTheory FreeMonoidalCategory
namespace Mathlib.Tactic.Coherence
variable {C : Type u} [Category.{v} C] [MonoidalCategory C]
+open scoped MonoidalCategory
noncomputable section lifting
@@ -241,6 +243,8 @@ def monoidal_coherence (g : MVarId) : TermElabM Unit := g.withContext do
Use `pure_coherence` instead, which is a frontend to this one. -/
elab "monoidal_coherence" : tactic => do monoidal_coherence (← getMainGoal)
+open Mathlib.Tactic.BicategoryCoherence
+
/--
`pure_coherence` uses the coherence theorem for monoidal categories to prove the goal.
It can prove any equality made up only of associators, unitors, and identities.
@@ -255,12 +259,9 @@ which can also cope with identities of the form
`a ≫ f ≫ b ≫ g ≫ c = a' ≫ f ≫ b' ≫ g ≫ c'`
where `a = a'`, `b = b'`, and `c = c'` can be proved using `pure_coherence`
-/
-macro (name := pure_coherence) "pure_coherence" : tactic =>
- `(tactic| monoidal_coherence)
-
--- Porting note: restore this when `category_theory.bicategory.coherence` is ported.
--- macro (name := pure_coherence') "pure_coherence" : tactic =>
--- `(tactic| bicategory_coherence)
+elab (name := pure_coherence) "pure_coherence" : tactic => do
+ let g ← getMainGoal
+ monoidal_coherence g <|> bicategory_coherence g
/--
Auxiliary simp lemma for the `coherence` tactic:
@@ -271,7 +272,7 @@ built out of unitors and associators.
-- They are intentional, to ensure that `simp only [assoc_LiftHom]` only left associates
-- monoidal structural morphisms.
@[nolint unusedArguments]
-lemma assoc_LiftHom {W X Y Z : C} [LiftObj W] [LiftObj X] [LiftObj Y]
+lemma assoc_liftHom {W X Y Z : C} [LiftObj W] [LiftObj X] [LiftObj Y]
(f : W ⟶ X) (g : X ⟶ Y) (h : Y ⟶ Z) [LiftHom f] [LiftHom g] :
f ≫ (g ≫ h) = (f ≫ g) ≫ h :=
(Category.assoc _ _ _).symm
@@ -289,9 +290,7 @@ elab (name := liftable_prefixes) "liftable_prefixes" : tactic => do
evalTactic (← `(tactic|
simp only [monoidalComp, Category.assoc, MonoidalCoherence.hom] <;>
(apply (cancel_epi (𝟙 _)).1 <;> try infer_instance) <;>
- -- TODO add `Bicategory.Coherence.assoc_LiftHom₂` when
- -- `category_theory.bicategory.coherence` is ported.
- simp only [assoc_LiftHom]))
+ simp only [assoc_liftHom, Mathlib.Tactic.BicategoryCoherence.assoc_liftHom₂]))
lemma insert_id_lhs {C : Type _} [Category C] {X Y : C} (f g : X ⟶ Y) (w : f ≫ 𝟙 _ = g) : f = g :=
by simpa using w
@@ -332,7 +331,7 @@ def coherence_loop (maxSteps := 37) : TacticM Unit :=
-- and now we have two goals `f₀ = g₀` and `f₁ = g₁`.
-- Discharge the first using `coherence`,
evalTactic (← `(tactic| { pure_coherence })) <|>
- exception' "`coherence` tactic failed, subgoal not true in the free monoidal_category"
+ exception' "`coherence` tactic failed, subgoal not true in the free monoidal category"
-- Then check that either `g₀` is identically `g₁`,
evalTactic (← `(tactic| rfl)) <|> do
-- or that both are compositions,
@@ -364,10 +363,8 @@ syntax (name := coherence) "coherence" : tactic
elab_rules : tactic
| `(tactic| coherence) => do
evalTactic (← `(tactic|
- -- Porting note: restore this when `category_theory.bicategory.coherence` is ported.
- -- simp only [bicategorical_comp];
- simp only [monoidalComp]
- -- Porting note: restore this when `category_theory.bicategory.coherence` is ported.
- -- try bicategory.whisker_simps
+ simp only [bicategoricalComp];
+ simp only [monoidalComp];
+ try whisker_simps
))
coherence_loop
@@ -283,14 +283,15 @@ Rewrites an equation `f = g` as `f₀ ≫ f₁ = g₀ ≫ g₁`,
where `f₀` and `g₀` are maximal prefixes of `f` and `g` (possibly after reassociating)
which are "liftable" (i.e. expressible as compositions of unitors and associators).
-/
-macro (name := liftable_prefixes) "liftable_prefixes" : tactic => do
- -- TODO we used to set the max instance search depth higher. Is this still needed?
- `(tactic|
+elab (name := liftable_prefixes) "liftable_prefixes" : tactic => do
+ withOptions (fun opts => synthInstance.maxSize.set opts
+ (max 256 (synthInstance.maxSize.get opts))) do
+ evalTactic (← `(tactic|
simp only [monoidalComp, Category.assoc, MonoidalCoherence.hom] <;>
(apply (cancel_epi (𝟙 _)).1 <;> try infer_instance) <;>
-- TODO add `Bicategory.Coherence.assoc_LiftHom₂` when
-- `category_theory.bicategory.coherence` is ported.
- simp only [assoc_LiftHom])
+ simp only [assoc_LiftHom]))
lemma insert_id_lhs {C : Type _} [Category C] {X Y : C} (f g : X ⟶ Y) (w : f ≫ 𝟙 _ = g) : f = g :=
by simpa using w
@@ -212,7 +212,7 @@ def exception' (msg : MessageData) : TacticM Unit := do
-- There might not be any goals
throwError msg
-/-- Auxilliary definition for `monoidal_coherence`. -/
+/-- Auxiliary definition for `monoidal_coherence`. -/
-- We could construct this expression directly without using `elabTerm`,
-- but it would require preparing many implicit arguments by hand.
def mkProjectMapExpr (e : Expr) : TermElabM Expr := do
This is a by-hand port of category_theory.monoidal.coherence
, which is blocking things like https://tqft.net/mathlib4/2023-05-26/representation_theory.group_cohomology.basic.pdf.
It does not include a port of the coherence tactic for bicategories, but this is not actually used in mathlib yet.
Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Kyle Miller <kmill31415@gmail.com>
All dependencies are ported!