algebra.category.Ring.basic
⟷
Mathlib.Algebra.Category.Ring.Basic
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(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
@@ -309,7 +309,8 @@ instance hasForgetToCommSemiRingCat : HasForget₂ CommRingCat CommSemiRingCat :
#align CommRing.has_forget_to_CommSemiRing CommRingCat.hasForgetToCommSemiRingCat
-/
-instance : Full (forget₂ CommRingCat CommSemiRingCat) where preimage X Y f := f
+instance : CategoryTheory.Functor.Full (forget₂ CommRingCat CommSemiRingCat)
+ where preimage X Y f := f
end CommRingCat
@@ -410,7 +411,8 @@ def ringEquivIsoCommRingIso {X Y : Type u} [CommRing X] [CommRing Y] :
-/
#print RingCat.forget_reflects_isos /-
-instance RingCat.forget_reflects_isos : ReflectsIsomorphisms (forget RingCat.{u})
+instance RingCat.forget_reflects_isos :
+ CategoryTheory.Functor.ReflectsIsomorphisms (forget RingCat.{u})
where reflects X Y f _ := by
skip
let i := as_iso ((forget RingCat).map f)
@@ -420,7 +422,8 @@ instance RingCat.forget_reflects_isos : ReflectsIsomorphisms (forget RingCat.{u}
-/
#print CommRingCat.forget_reflects_isos /-
-instance CommRingCat.forget_reflects_isos : ReflectsIsomorphisms (forget CommRingCat.{u})
+instance CommRingCat.forget_reflects_isos :
+ CategoryTheory.Functor.ReflectsIsomorphisms (forget CommRingCat.{u})
where reflects X Y f _ := by
skip
let i := as_iso ((forget CommRingCat).map f)
@@ -448,5 +451,6 @@ theorem CommRingCat.ringHom_comp_eq_comp {R S T : Type _} [CommRing R] [CommRing
-- which can cause typeclass loops:
attribute [local instance] reflects_isomorphisms_forget₂
-example : ReflectsIsomorphisms (forget₂ RingCat AddCommGroupCat) := by infer_instance
+example : CategoryTheory.Functor.ReflectsIsomorphisms (forget₂ RingCat AddCommGroupCat) := by
+ infer_instance
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -3,8 +3,8 @@ Copyright (c) 2018 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison, Johannes Hölzl, Yury Kudryashov
-/
-import Algebra.Category.Group.Basic
-import CategoryTheory.ConcreteCategory.ReflectsIsomorphisms
+import Algebra.Category.GroupCat.Basic
+import CategoryTheory.ConcreteCategory.ReflectsIso
import CategoryTheory.Elementwise
import Algebra.Ring.Equiv
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,10 +3,10 @@ Copyright (c) 2018 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison, Johannes Hölzl, Yury Kudryashov
-/
-import Mathbin.Algebra.Category.Group.Basic
-import Mathbin.CategoryTheory.ConcreteCategory.ReflectsIsomorphisms
-import Mathbin.CategoryTheory.Elementwise
-import Mathbin.Algebra.Ring.Equiv
+import Algebra.Category.Group.Basic
+import CategoryTheory.ConcreteCategory.ReflectsIsomorphisms
+import CategoryTheory.Elementwise
+import Algebra.Ring.Equiv
#align_import algebra.category.Ring.basic from "leanprover-community/mathlib"@"dbdf71cee7bb20367cb7e37279c08b0c218cf967"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,17 +2,14 @@
Copyright (c) 2018 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison, Johannes Hölzl, Yury Kudryashov
-
-! This file was ported from Lean 3 source module algebra.category.Ring.basic
-! leanprover-community/mathlib commit dbdf71cee7bb20367cb7e37279c08b0c218cf967
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Algebra.Category.Group.Basic
import Mathbin.CategoryTheory.ConcreteCategory.ReflectsIsomorphisms
import Mathbin.CategoryTheory.Elementwise
import Mathbin.Algebra.Ring.Equiv
+#align_import algebra.category.Ring.basic from "leanprover-community/mathlib"@"dbdf71cee7bb20367cb7e37279c08b0c218cf967"
+
/-!
# Category instances for semiring, ring, comm_semiring, and comm_ring.
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -76,11 +76,13 @@ def ofHom {R S : Type u} [Semiring R] [Semiring S] (f : R →+* S) : of R ⟶ of
#align SemiRing.of_hom SemiRingCat.ofHom
-/
+#print SemiRingCat.ofHom_apply /-
@[simp]
theorem ofHom_apply {R S : Type u} [Semiring R] [Semiring S] (f : R →+* S) (x : R) :
ofHom f x = f x :=
rfl
#align SemiRing.of_hom_apply SemiRingCat.ofHom_apply
+-/
instance : Inhabited SemiRingCat :=
⟨of PUnit⟩
@@ -95,17 +97,21 @@ theorem coe_of (R : Type u) [Semiring R] : (SemiRingCat.of R : Type u) = R :=
#align SemiRing.coe_of SemiRingCat.coe_of
-/
+#print SemiRingCat.hasForgetToMonCat /-
instance hasForgetToMonCat : HasForget₂ SemiRingCat MonCat :=
BundledHom.mkHasForget₂ (fun R hR => @MonoidWithZero.toMonoid R (@Semiring.toMonoidWithZero R hR))
(fun R₁ R₂ => RingHom.toMonoidHom) fun _ _ _ => rfl
#align SemiRing.has_forget_to_Mon SemiRingCat.hasForgetToMonCat
+-/
+#print SemiRingCat.hasForgetToAddCommMonCat /-
instance hasForgetToAddCommMonCat : HasForget₂ SemiRingCat AddCommMonCat
where-- can't use bundled_hom.mk_has_forget₂, since AddCommMon is an induced category
forget₂ :=
{ obj := fun R => AddCommMonCat.of R
map := fun R₁ R₂ f => RingHom.toAddMonoidHom f }
#align SemiRing.has_forget_to_AddCommMon SemiRingCat.hasForgetToAddCommMonCat
+-/
end SemiRingCat
@@ -159,16 +165,20 @@ theorem coe_of (R : Type u) [Ring R] : (RingCat.of R : Type u) = R :=
#align Ring.coe_of RingCat.coe_of
-/
+#print RingCat.hasForgetToSemiRingCat /-
instance hasForgetToSemiRingCat : HasForget₂ RingCat SemiRingCat :=
BundledHom.forget₂ _ _
#align Ring.has_forget_to_SemiRing RingCat.hasForgetToSemiRingCat
+-/
+#print RingCat.hasForgetToAddCommGroupCat /-
instance hasForgetToAddCommGroupCat : HasForget₂ RingCat AddCommGroupCat
where-- can't use bundled_hom.mk_has_forget₂, since AddCommGroup is an induced category
forget₂ :=
{ obj := fun R => AddCommGroupCat.of R
map := fun R₁ R₂ f => RingHom.toAddMonoidHom f }
#align Ring.has_forget_to_AddCommGroup RingCat.hasForgetToAddCommGroupCat
+-/
end RingCat
@@ -222,15 +232,19 @@ theorem coe_of (R : Type u) [CommSemiring R] : (CommSemiRingCat.of R : Type u) =
#align CommSemiRing.coe_of CommSemiRingCat.coe_of
-/
+#print CommSemiRingCat.hasForgetToSemiRingCat /-
instance hasForgetToSemiRingCat : HasForget₂ CommSemiRingCat SemiRingCat :=
BundledHom.forget₂ _ _
#align CommSemiRing.has_forget_to_SemiRing CommSemiRingCat.hasForgetToSemiRingCat
+-/
+#print CommSemiRingCat.hasForgetToCommMonCat /-
/-- The forgetful functor from commutative rings to (multiplicative) commutative monoids. -/
instance hasForgetToCommMonCat : HasForget₂ CommSemiRingCat CommMonCat :=
HasForget₂.mk' (fun R : CommSemiRingCat => CommMonCat.of R) (fun R => rfl)
(fun R₁ R₂ f => f.toMonoidHom) (by tidy)
#align CommSemiRing.has_forget_to_CommMon CommSemiRingCat.hasForgetToCommMonCat
+-/
end CommSemiRingCat
@@ -284,15 +298,19 @@ theorem coe_of (R : Type u) [CommRing R] : (CommRingCat.of R : Type u) = R :=
#align CommRing.coe_of CommRingCat.coe_of
-/
+#print CommRingCat.hasForgetToRingCat /-
instance hasForgetToRingCat : HasForget₂ CommRingCat RingCat :=
BundledHom.forget₂ _ _
#align CommRing.has_forget_to_Ring CommRingCat.hasForgetToRingCat
+-/
+#print CommRingCat.hasForgetToCommSemiRingCat /-
/-- The forgetful functor from commutative rings to (multiplicative) commutative monoids. -/
instance hasForgetToCommSemiRingCat : HasForget₂ CommRingCat CommSemiRingCat :=
HasForget₂.mk' (fun R : CommRingCat => CommSemiRingCat.of R) (fun R => rfl) (fun R₁ R₂ f => f)
(by tidy)
#align CommRing.has_forget_to_CommSemiRing CommRingCat.hasForgetToCommSemiRingCat
+-/
instance : Full (forget₂ CommRingCat CommSemiRingCat) where preimage X Y f := f
@@ -308,6 +326,7 @@ namespace RingEquiv
variable {X Y : Type u}
+#print RingEquiv.toRingCatIso /-
/-- Build an isomorphism in the category `Ring` from a `ring_equiv` between `ring`s. -/
@[simps]
def toRingCatIso [Ring X] [Ring Y] (e : X ≃+* Y) : RingCat.of X ≅ RingCat.of Y
@@ -315,7 +334,9 @@ def toRingCatIso [Ring X] [Ring Y] (e : X ≃+* Y) : RingCat.of X ≅ RingCat.of
Hom := e.toRingHom
inv := e.symm.toRingHom
#align ring_equiv.to_Ring_iso RingEquiv.toRingCatIso
+-/
+#print RingEquiv.toCommRingCatIso /-
/-- Build an isomorphism in the category `CommRing` from a `ring_equiv` between `comm_ring`s. -/
@[simps]
def toCommRingCatIso [CommRing X] [CommRing Y] (e : X ≃+* Y) : CommRingCat.of X ≅ CommRingCat.of Y
@@ -323,11 +344,13 @@ def toCommRingCatIso [CommRing X] [CommRing Y] (e : X ≃+* Y) : CommRingCat.of
Hom := e.toRingHom
inv := e.symm.toRingHom
#align ring_equiv.to_CommRing_iso RingEquiv.toCommRingCatIso
+-/
end RingEquiv
namespace CategoryTheory.Iso
+#print CategoryTheory.Iso.ringCatIsoToRingEquiv /-
/-- Build a `ring_equiv` from an isomorphism in the category `Ring`. -/
def ringCatIsoToRingEquiv {X Y : RingCat} (i : X ≅ Y) : X ≃+* Y
where
@@ -338,7 +361,9 @@ def ringCatIsoToRingEquiv {X Y : RingCat} (i : X ≅ Y) : X ≃+* Y
map_add' := by tidy
map_mul' := by tidy
#align category_theory.iso.Ring_iso_to_ring_equiv CategoryTheory.Iso.ringCatIsoToRingEquiv
+-/
+#print CategoryTheory.Iso.commRingCatIsoToRingEquiv /-
/-- Build a `ring_equiv` from an isomorphism in the category `CommRing`. -/
def commRingCatIsoToRingEquiv {X Y : CommRingCat} (i : X ≅ Y) : X ≃+* Y
where
@@ -349,6 +374,7 @@ def commRingCatIsoToRingEquiv {X Y : CommRingCat} (i : X ≅ Y) : X ≃+* Y
map_add' := by tidy
map_mul' := by tidy
#align category_theory.iso.CommRing_iso_to_ring_equiv CategoryTheory.Iso.commRingCatIsoToRingEquiv
+-/
#print CategoryTheory.Iso.commRingIsoToRingEquiv_toRingHom /-
@[simp]
@@ -366,13 +392,16 @@ theorem commRingIsoToRingEquiv_symm_toRingHom {X Y : CommRingCat} (i : X ≅ Y)
end CategoryTheory.Iso
+#print ringEquivIsoRingIso /-
/-- Ring equivalences between `ring`s are the same as (isomorphic to) isomorphisms in `Ring`. -/
def ringEquivIsoRingIso {X Y : Type u} [Ring X] [Ring Y] : X ≃+* Y ≅ RingCat.of X ≅ RingCat.of Y
where
Hom e := e.toRingCatIso
inv i := i.ringCatIsoToRingEquiv
#align ring_equiv_iso_Ring_iso ringEquivIsoRingIso
+-/
+#print ringEquivIsoCommRingIso /-
/-- Ring equivalences between `comm_ring`s are the same as (isomorphic to) isomorphisms
in `CommRing`. -/
def ringEquivIsoCommRingIso {X Y : Type u} [CommRing X] [CommRing Y] :
@@ -381,6 +410,7 @@ def ringEquivIsoCommRingIso {X Y : Type u} [CommRing X] [CommRing Y] :
Hom e := e.toCommRingCatIso
inv i := i.commRingCatIsoToRingEquiv
#align ring_equiv_iso_CommRing_iso ringEquivIsoCommRingIso
+-/
#print RingCat.forget_reflects_isos /-
instance RingCat.forget_reflects_isos : ReflectsIsomorphisms (forget RingCat.{u})
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -189,18 +189,18 @@ deriving instance LargeCategory, ConcreteCategory for CommSemiRingCat
instance : CoeSort CommSemiRingCat (Type _) :=
Bundled.hasCoeToSort
-#print CommSemiRing.of /-
+#print CommSemiRingCat.of /-
/-- Construct a bundled CommSemiRing from the underlying type and typeclass. -/
def of (R : Type u) [CommSemiring R] : CommSemiRingCat :=
Bundled.of R
-#align CommSemiRing.of CommSemiRing.of
+#align CommSemiRing.of CommSemiRingCat.of
-/
-#print CommSemiRing.ofHom /-
+#print CommSemiRingCat.ofHom /-
/-- Typecheck a `ring_hom` as a morphism in `CommSemiRing`. -/
def ofHom {R S : Type u} [CommSemiring R] [CommSemiring S] (f : R →+* S) : of R ⟶ of S :=
f
-#align CommSemiRing.of_hom CommSemiRing.ofHom
+#align CommSemiRing.of_hom CommSemiRingCat.ofHom
-/
@[simp]
@@ -215,22 +215,22 @@ instance : Inhabited CommSemiRingCat :=
instance (R : CommSemiRingCat) : CommSemiring R :=
R.str
-#print CommSemiRing.coe_of /-
+#print CommSemiRingCat.coe_of /-
@[simp]
-theorem coe_of (R : Type u) [CommSemiring R] : (CommSemiRing.of R : Type u) = R :=
+theorem coe_of (R : Type u) [CommSemiring R] : (CommSemiRingCat.of R : Type u) = R :=
rfl
-#align CommSemiRing.coe_of CommSemiRing.coe_of
+#align CommSemiRing.coe_of CommSemiRingCat.coe_of
-/
instance hasForgetToSemiRingCat : HasForget₂ CommSemiRingCat SemiRingCat :=
BundledHom.forget₂ _ _
-#align CommSemiRing.has_forget_to_SemiRing CommSemiRing.hasForgetToSemiRingCat
+#align CommSemiRing.has_forget_to_SemiRing CommSemiRingCat.hasForgetToSemiRingCat
/-- The forgetful functor from commutative rings to (multiplicative) commutative monoids. -/
instance hasForgetToCommMonCat : HasForget₂ CommSemiRingCat CommMonCat :=
HasForget₂.mk' (fun R : CommSemiRingCat => CommMonCat.of R) (fun R => rfl)
(fun R₁ R₂ f => f.toMonoidHom) (by tidy)
-#align CommSemiRing.has_forget_to_CommMon CommSemiRing.hasForgetToCommMonCat
+#align CommSemiRing.has_forget_to_CommMon CommSemiRingCat.hasForgetToCommMonCat
end CommSemiRingCat
@@ -290,7 +290,7 @@ instance hasForgetToRingCat : HasForget₂ CommRingCat RingCat :=
/-- The forgetful functor from commutative rings to (multiplicative) commutative monoids. -/
instance hasForgetToCommSemiRingCat : HasForget₂ CommRingCat CommSemiRingCat :=
- HasForget₂.mk' (fun R : CommRingCat => CommSemiRing.of R) (fun R => rfl) (fun R₁ R₂ f => f)
+ HasForget₂.mk' (fun R : CommRingCat => CommSemiRingCat.of R) (fun R => rfl) (fun R₁ R₂ f => f)
(by tidy)
#align CommRing.has_forget_to_CommSemiRing CommRingCat.hasForgetToCommSemiRingCat
mathlib commit https://github.com/leanprover-community/mathlib/commit/c471da714c044131b90c133701e51b877c246677
@@ -95,21 +95,17 @@ theorem coe_of (R : Type u) [Semiring R] : (SemiRingCat.of R : Type u) = R :=
#align SemiRing.coe_of SemiRingCat.coe_of
-/
-#print SemiRingCat.hasForgetToMonCat /-
instance hasForgetToMonCat : HasForget₂ SemiRingCat MonCat :=
BundledHom.mkHasForget₂ (fun R hR => @MonoidWithZero.toMonoid R (@Semiring.toMonoidWithZero R hR))
(fun R₁ R₂ => RingHom.toMonoidHom) fun _ _ _ => rfl
#align SemiRing.has_forget_to_Mon SemiRingCat.hasForgetToMonCat
--/
-#print SemiRingCat.hasForgetToAddCommMonCat /-
instance hasForgetToAddCommMonCat : HasForget₂ SemiRingCat AddCommMonCat
where-- can't use bundled_hom.mk_has_forget₂, since AddCommMon is an induced category
forget₂ :=
{ obj := fun R => AddCommMonCat.of R
map := fun R₁ R₂ f => RingHom.toAddMonoidHom f }
#align SemiRing.has_forget_to_AddCommMon SemiRingCat.hasForgetToAddCommMonCat
--/
end SemiRingCat
@@ -163,20 +159,16 @@ theorem coe_of (R : Type u) [Ring R] : (RingCat.of R : Type u) = R :=
#align Ring.coe_of RingCat.coe_of
-/
-#print RingCat.hasForgetToSemiRingCat /-
instance hasForgetToSemiRingCat : HasForget₂ RingCat SemiRingCat :=
BundledHom.forget₂ _ _
#align Ring.has_forget_to_SemiRing RingCat.hasForgetToSemiRingCat
--/
-#print RingCat.hasForgetToAddCommGroupCat /-
instance hasForgetToAddCommGroupCat : HasForget₂ RingCat AddCommGroupCat
where-- can't use bundled_hom.mk_has_forget₂, since AddCommGroup is an induced category
forget₂ :=
{ obj := fun R => AddCommGroupCat.of R
map := fun R₁ R₂ f => RingHom.toAddMonoidHom f }
#align Ring.has_forget_to_AddCommGroup RingCat.hasForgetToAddCommGroupCat
--/
end RingCat
@@ -230,19 +222,15 @@ theorem coe_of (R : Type u) [CommSemiring R] : (CommSemiRing.of R : Type u) = R
#align CommSemiRing.coe_of CommSemiRing.coe_of
-/
-#print CommSemiRing.hasForgetToSemiRingCat /-
instance hasForgetToSemiRingCat : HasForget₂ CommSemiRingCat SemiRingCat :=
BundledHom.forget₂ _ _
#align CommSemiRing.has_forget_to_SemiRing CommSemiRing.hasForgetToSemiRingCat
--/
-#print CommSemiRing.hasForgetToCommMonCat /-
/-- The forgetful functor from commutative rings to (multiplicative) commutative monoids. -/
instance hasForgetToCommMonCat : HasForget₂ CommSemiRingCat CommMonCat :=
HasForget₂.mk' (fun R : CommSemiRingCat => CommMonCat.of R) (fun R => rfl)
(fun R₁ R₂ f => f.toMonoidHom) (by tidy)
#align CommSemiRing.has_forget_to_CommMon CommSemiRing.hasForgetToCommMonCat
--/
end CommSemiRingCat
@@ -296,19 +284,15 @@ theorem coe_of (R : Type u) [CommRing R] : (CommRingCat.of R : Type u) = R :=
#align CommRing.coe_of CommRingCat.coe_of
-/
-#print CommRingCat.hasForgetToRingCat /-
instance hasForgetToRingCat : HasForget₂ CommRingCat RingCat :=
BundledHom.forget₂ _ _
#align CommRing.has_forget_to_Ring CommRingCat.hasForgetToRingCat
--/
-#print CommRingCat.hasForgetToCommSemiRingCat /-
/-- The forgetful functor from commutative rings to (multiplicative) commutative monoids. -/
instance hasForgetToCommSemiRingCat : HasForget₂ CommRingCat CommSemiRingCat :=
HasForget₂.mk' (fun R : CommRingCat => CommSemiRing.of R) (fun R => rfl) (fun R₁ R₂ f => f)
(by tidy)
#align CommRing.has_forget_to_CommSemiRing CommRingCat.hasForgetToCommSemiRingCat
--/
instance : Full (forget₂ CommRingCat CommSemiRingCat) where preimage X Y f := f
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -125,10 +125,10 @@ namespace RingCat
instance : BundledHom.ParentProjection @Ring.toSemiring :=
⟨⟩
-/- ./././Mathport/Syntax/Translate/Command.lean:42:9: unsupported derive handler λ Ring,
+/- ./././Mathport/Syntax/Translate/Command.lean:43:9: unsupported derive handler λ Ring,
has_coe_to_sort[has_coe_to_sort] Ring (Type*) -/
deriving instance
- «./././Mathport/Syntax/Translate/Command.lean:42:9: unsupported derive handler λ Ring,
+ «./././Mathport/Syntax/Translate/Command.lean:43:9: unsupported derive handler λ Ring,
has_coe_to_sort[has_coe_to_sort] Ring (Type*)», LargeCategory, ConcreteCategory for RingCat
#print RingCat.of /-
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -211,13 +211,11 @@ def ofHom {R S : Type u} [CommSemiring R] [CommSemiring S] (f : R →+* S) : of
#align CommSemiRing.of_hom CommSemiRing.ofHom
-/
-/- warning: CommSemiRing.of_hom_apply clashes with [anonymous] -> [anonymous]
-Case conversion may be inaccurate. Consider using '#align CommSemiRing.of_hom_apply [anonymous]ₓ'. -/
@[simp]
-theorem [anonymous] {R S : Type u} [CommSemiring R] [CommSemiring S] (f : R →+* S) (x : R) :
+theorem ofHom_apply {R S : Type u} [CommSemiring R] [CommSemiring S] (f : R →+* S) (x : R) :
ofHom f x = f x :=
rfl
-#align CommSemiRing.of_hom_apply [anonymous]
+#align CommSemiRing.of_hom_apply CommSemiRingCat.ofHom_apply
instance : Inhabited CommSemiRingCat :=
⟨of PUnit⟩
@@ -279,13 +277,11 @@ def ofHom {R S : Type u} [CommRing R] [CommRing S] (f : R →+* S) : of R ⟶ of
#align CommRing.of_hom CommRingCat.ofHom
-/
-/- warning: CommRing.of_hom_apply clashes with [anonymous] -> [anonymous]
-Case conversion may be inaccurate. Consider using '#align CommRing.of_hom_apply [anonymous]ₓ'. -/
@[simp]
-theorem [anonymous] {R S : Type u} [CommRing R] [CommRing S] (f : R →+* S) (x : R) :
+theorem ofHom_apply {R S : Type u} [CommRing R] [CommRing S] (f : R →+* S) (x : R) :
ofHom f x = f x :=
rfl
-#align CommRing.of_hom_apply [anonymous]
+#align CommRing.of_hom_apply CommRingCat.ofHom_apply
instance : Inhabited CommRingCat :=
⟨of PUnit⟩
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -76,9 +76,6 @@ def ofHom {R S : Type u} [Semiring R] [Semiring S] (f : R →+* S) : of R ⟶ of
#align SemiRing.of_hom SemiRingCat.ofHom
-/
-/- warning: SemiRing.of_hom_apply -> SemiRingCat.ofHom_apply is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align SemiRing.of_hom_apply SemiRingCat.ofHom_applyₓ'. -/
@[simp]
theorem ofHom_apply {R S : Type u} [Semiring R] [Semiring S] (f : R →+* S) (x : R) :
ofHom f x = f x :=
@@ -215,11 +212,6 @@ def ofHom {R S : Type u} [CommSemiring R] [CommSemiring S] (f : R →+* S) : of
-/
/- warning: CommSemiRing.of_hom_apply clashes with [anonymous] -> [anonymous]
-warning: CommSemiRing.of_hom_apply -> [anonymous] is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u}} {S : Type.{u}} [_inst_1 : CommSemiring.{u} R] [_inst_2 : CommSemiring.{u} S] (f : RingHom.{u, u} R S (Semiring.toNonAssocSemiring.{u} R (CommSemiring.toSemiring.{u} R _inst_1)) (Semiring.toNonAssocSemiring.{u} S (CommSemiring.toSemiring.{u} S _inst_2))) (x : R), Eq.{succ u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommSemiring.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommSemiring.{u}) (CommSemiRing.of.{u} S _inst_2)) (coeFn.{succ u, succ u} (Quiver.Hom.{succ u, succ u} CommSemiRingCat.{u} (CategoryTheory.CategoryStruct.toQuiver.{u, succ u} CommSemiRingCat.{u} (CategoryTheory.Category.toCategoryStruct.{u, succ u} CommSemiRingCat.{u} CommSemiRingCat.largeCategory.{u})) (CommSemiRing.of.{u} R _inst_1) (CommSemiRing.of.{u} S _inst_2)) (fun (_x : RingHom.{u, u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommSemiring.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommSemiring.{u}) (CommSemiRing.of.{u} R _inst_1)) (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommSemiring.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommSemiring.{u}) (CommSemiRing.of.{u} S _inst_2)) (Semiring.toNonAssocSemiring.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommSemiring.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommSemiring.{u}) (CommSemiRing.of.{u} R _inst_1)) (CommSemiring.toSemiring.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommSemiring.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommSemiring.{u}) (CommSemiRing.of.{u} R _inst_1)) (CategoryTheory.Bundled.str.{u, u} CommSemiring.{u} (CommSemiRing.of.{u} R _inst_1)))) (Semiring.toNonAssocSemiring.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommSemiring.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommSemiring.{u}) (CommSemiRing.of.{u} S _inst_2)) (CommSemiring.toSemiring.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommSemiring.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommSemiring.{u}) (CommSemiRing.of.{u} S _inst_2)) (CategoryTheory.Bundled.str.{u, u} CommSemiring.{u} (CommSemiRing.of.{u} S _inst_2))))) => (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommSemiring.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommSemiring.{u}) (CommSemiRing.of.{u} R _inst_1)) -> (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommSemiring.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommSemiring.{u}) (CommSemiRing.of.{u} S _inst_2))) (RingHom.hasCoeToFun.{u, u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommSemiring.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommSemiring.{u}) (CommSemiRing.of.{u} R _inst_1)) (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommSemiring.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommSemiring.{u}) (CommSemiRing.of.{u} S _inst_2)) (Semiring.toNonAssocSemiring.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommSemiring.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommSemiring.{u}) (CommSemiRing.of.{u} R _inst_1)) (CommSemiring.toSemiring.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommSemiring.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommSemiring.{u}) (CommSemiRing.of.{u} R _inst_1)) (CategoryTheory.Bundled.str.{u, u} CommSemiring.{u} (CommSemiRing.of.{u} R _inst_1)))) (Semiring.toNonAssocSemiring.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommSemiring.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommSemiring.{u}) (CommSemiRing.of.{u} S _inst_2)) (CommSemiring.toSemiring.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommSemiring.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommSemiring.{u}) (CommSemiRing.of.{u} S _inst_2)) (CategoryTheory.Bundled.str.{u, u} CommSemiring.{u} (CommSemiRing.of.{u} S _inst_2))))) (CommSemiRing.ofHom.{u} R S _inst_1 _inst_2 f) x) (coeFn.{succ u, succ u} (RingHom.{u, u} R S (Semiring.toNonAssocSemiring.{u} R (CommSemiring.toSemiring.{u} R _inst_1)) (Semiring.toNonAssocSemiring.{u} S (CommSemiring.toSemiring.{u} S _inst_2))) (fun (_x : RingHom.{u, u} R S (Semiring.toNonAssocSemiring.{u} R (CommSemiring.toSemiring.{u} R _inst_1)) (Semiring.toNonAssocSemiring.{u} S (CommSemiring.toSemiring.{u} S _inst_2))) => R -> S) (RingHom.hasCoeToFun.{u, u} R S (Semiring.toNonAssocSemiring.{u} R (CommSemiring.toSemiring.{u} R _inst_1)) (Semiring.toNonAssocSemiring.{u} S (CommSemiring.toSemiring.{u} S _inst_2))) f x)
-but is expected to have type
- forall {R : Type.{u}} {S : Type.{v}}, (Nat -> R -> S) -> Nat -> (List.{u} R) -> (List.{v} S)
Case conversion may be inaccurate. Consider using '#align CommSemiRing.of_hom_apply [anonymous]ₓ'. -/
@[simp]
theorem [anonymous] {R S : Type u} [CommSemiring R] [CommSemiring S] (f : R →+* S) (x : R) :
@@ -288,11 +280,6 @@ def ofHom {R S : Type u} [CommRing R] [CommRing S] (f : R →+* S) : of R ⟶ of
-/
/- warning: CommRing.of_hom_apply clashes with [anonymous] -> [anonymous]
-warning: CommRing.of_hom_apply -> [anonymous] is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u}} {S : Type.{u}} [_inst_1 : CommRing.{u} R] [_inst_2 : CommRing.{u} S] (f : RingHom.{u, u} R S (NonAssocRing.toNonAssocSemiring.{u} R (Ring.toNonAssocRing.{u} R (CommRing.toRing.{u} R _inst_1))) (NonAssocRing.toNonAssocSemiring.{u} S (Ring.toNonAssocRing.{u} S (CommRing.toRing.{u} S _inst_2)))) (x : R), Eq.{succ u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} S _inst_2)) (coeFn.{succ u, succ u} (Quiver.Hom.{succ u, succ u} CommRingCat.{u} (CategoryTheory.CategoryStruct.toQuiver.{u, succ u} CommRingCat.{u} (CategoryTheory.Category.toCategoryStruct.{u, succ u} CommRingCat.{u} CommRingCat.largeCategory.{u})) (CommRingCat.of.{u} R _inst_1) (CommRingCat.of.{u} S _inst_2)) (fun (_x : RingHom.{u, u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} R _inst_1)) (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} S _inst_2)) (Semiring.toNonAssocSemiring.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} R _inst_1)) (Ring.toSemiring.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} R _inst_1)) (CommRing.toRing.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} R _inst_1)) (CategoryTheory.Bundled.str.{u, u} CommRing.{u} (CommRingCat.of.{u} R _inst_1))))) (Semiring.toNonAssocSemiring.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} S _inst_2)) (Ring.toSemiring.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} S _inst_2)) (CommRing.toRing.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} S _inst_2)) (CategoryTheory.Bundled.str.{u, u} CommRing.{u} (CommRingCat.of.{u} S _inst_2)))))) => (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} R _inst_1)) -> (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} S _inst_2))) (RingHom.hasCoeToFun.{u, u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} R _inst_1)) (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} S _inst_2)) (Semiring.toNonAssocSemiring.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} R _inst_1)) (Ring.toSemiring.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} R _inst_1)) (CommRing.toRing.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} R _inst_1)) (CategoryTheory.Bundled.str.{u, u} CommRing.{u} (CommRingCat.of.{u} R _inst_1))))) (Semiring.toNonAssocSemiring.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} S _inst_2)) (Ring.toSemiring.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} S _inst_2)) (CommRing.toRing.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} S _inst_2)) (CategoryTheory.Bundled.str.{u, u} CommRing.{u} (CommRingCat.of.{u} S _inst_2)))))) (CommRingCat.ofHom.{u} R S _inst_1 _inst_2 f) x) (coeFn.{succ u, succ u} (RingHom.{u, u} R S (NonAssocRing.toNonAssocSemiring.{u} R (Ring.toNonAssocRing.{u} R (CommRing.toRing.{u} R _inst_1))) (NonAssocRing.toNonAssocSemiring.{u} S (Ring.toNonAssocRing.{u} S (CommRing.toRing.{u} S _inst_2)))) (fun (_x : RingHom.{u, u} R S (NonAssocRing.toNonAssocSemiring.{u} R (Ring.toNonAssocRing.{u} R (CommRing.toRing.{u} R _inst_1))) (NonAssocRing.toNonAssocSemiring.{u} S (Ring.toNonAssocRing.{u} S (CommRing.toRing.{u} S _inst_2)))) => R -> S) (RingHom.hasCoeToFun.{u, u} R S (NonAssocRing.toNonAssocSemiring.{u} R (Ring.toNonAssocRing.{u} R (CommRing.toRing.{u} R _inst_1))) (NonAssocRing.toNonAssocSemiring.{u} S (Ring.toNonAssocRing.{u} S (CommRing.toRing.{u} S _inst_2)))) f x)
-but is expected to have type
- forall {R : Type.{u}} {S : Type.{v}}, (Nat -> R -> S) -> Nat -> (List.{u} R) -> (List.{v} S)
Case conversion may be inaccurate. Consider using '#align CommRing.of_hom_apply [anonymous]ₓ'. -/
@[simp]
theorem [anonymous] {R S : Type u} [CommRing R] [CommRing S] (f : R →+* S) (x : R) :
@@ -341,12 +328,6 @@ namespace RingEquiv
variable {X Y : Type u}
-/- warning: ring_equiv.to_Ring_iso -> RingEquiv.toRingCatIso is a dubious translation:
-lean 3 declaration is
- forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : Ring.{u1} X] [_inst_2 : Ring.{u1} Y], (RingEquiv.{u1, u1} X Y (Distrib.toHasMul.{u1} X (Ring.toDistrib.{u1} X _inst_1)) (Distrib.toHasAdd.{u1} X (Ring.toDistrib.{u1} X _inst_1)) (Distrib.toHasMul.{u1} Y (Ring.toDistrib.{u1} Y _inst_2)) (Distrib.toHasAdd.{u1} Y (Ring.toDistrib.{u1} Y _inst_2))) -> (CategoryTheory.Iso.{u1, succ u1} RingCat.{u1} RingCat.largeCategory.{u1} (RingCat.of.{u1} X _inst_1) (RingCat.of.{u1} Y _inst_2))
-but is expected to have type
- forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : Ring.{u1} X] [_inst_2 : Ring.{u1} Y], (RingEquiv.{u1, u1} X Y (NonUnitalNonAssocRing.toMul.{u1} X (NonAssocRing.toNonUnitalNonAssocRing.{u1} X (Ring.toNonAssocRing.{u1} X _inst_1))) (NonUnitalNonAssocRing.toMul.{u1} Y (NonAssocRing.toNonUnitalNonAssocRing.{u1} Y (Ring.toNonAssocRing.{u1} Y _inst_2))) (Distrib.toAdd.{u1} X (NonUnitalNonAssocSemiring.toDistrib.{u1} X (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} X (NonAssocRing.toNonUnitalNonAssocRing.{u1} X (Ring.toNonAssocRing.{u1} X _inst_1))))) (Distrib.toAdd.{u1} Y (NonUnitalNonAssocSemiring.toDistrib.{u1} Y (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} Y (NonAssocRing.toNonUnitalNonAssocRing.{u1} Y (Ring.toNonAssocRing.{u1} Y _inst_2)))))) -> (CategoryTheory.Iso.{u1, succ u1} RingCat.{u1} instRingCatLargeCategory.{u1} (RingCat.of.{u1} X _inst_1) (RingCat.of.{u1} Y _inst_2))
-Case conversion may be inaccurate. Consider using '#align ring_equiv.to_Ring_iso RingEquiv.toRingCatIsoₓ'. -/
/-- Build an isomorphism in the category `Ring` from a `ring_equiv` between `ring`s. -/
@[simps]
def toRingCatIso [Ring X] [Ring Y] (e : X ≃+* Y) : RingCat.of X ≅ RingCat.of Y
@@ -355,12 +336,6 @@ def toRingCatIso [Ring X] [Ring Y] (e : X ≃+* Y) : RingCat.of X ≅ RingCat.of
inv := e.symm.toRingHom
#align ring_equiv.to_Ring_iso RingEquiv.toRingCatIso
-/- warning: ring_equiv.to_CommRing_iso -> RingEquiv.toCommRingCatIso is a dubious translation:
-lean 3 declaration is
- forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : CommRing.{u1} X] [_inst_2 : CommRing.{u1} Y], (RingEquiv.{u1, u1} X Y (Distrib.toHasMul.{u1} X (Ring.toDistrib.{u1} X (CommRing.toRing.{u1} X _inst_1))) (Distrib.toHasAdd.{u1} X (Ring.toDistrib.{u1} X (CommRing.toRing.{u1} X _inst_1))) (Distrib.toHasMul.{u1} Y (Ring.toDistrib.{u1} Y (CommRing.toRing.{u1} Y _inst_2))) (Distrib.toHasAdd.{u1} Y (Ring.toDistrib.{u1} Y (CommRing.toRing.{u1} Y _inst_2)))) -> (CategoryTheory.Iso.{u1, succ u1} CommRingCat.{u1} CommRingCat.largeCategory.{u1} (CommRingCat.of.{u1} X _inst_1) (CommRingCat.of.{u1} Y _inst_2))
-but is expected to have type
- forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : CommRing.{u1} X] [_inst_2 : CommRing.{u1} Y], (RingEquiv.{u1, u1} X Y (NonUnitalNonAssocRing.toMul.{u1} X (NonAssocRing.toNonUnitalNonAssocRing.{u1} X (Ring.toNonAssocRing.{u1} X (CommRing.toRing.{u1} X _inst_1)))) (NonUnitalNonAssocRing.toMul.{u1} Y (NonAssocRing.toNonUnitalNonAssocRing.{u1} Y (Ring.toNonAssocRing.{u1} Y (CommRing.toRing.{u1} Y _inst_2)))) (Distrib.toAdd.{u1} X (NonUnitalNonAssocSemiring.toDistrib.{u1} X (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} X (NonAssocRing.toNonUnitalNonAssocRing.{u1} X (Ring.toNonAssocRing.{u1} X (CommRing.toRing.{u1} X _inst_1)))))) (Distrib.toAdd.{u1} Y (NonUnitalNonAssocSemiring.toDistrib.{u1} Y (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} Y (NonAssocRing.toNonUnitalNonAssocRing.{u1} Y (Ring.toNonAssocRing.{u1} Y (CommRing.toRing.{u1} Y _inst_2))))))) -> (CategoryTheory.Iso.{u1, succ u1} CommRingCat.{u1} instCommRingCatLargeCategory.{u1} (CommRingCat.of.{u1} X _inst_1) (CommRingCat.of.{u1} Y _inst_2))
-Case conversion may be inaccurate. Consider using '#align ring_equiv.to_CommRing_iso RingEquiv.toCommRingCatIsoₓ'. -/
/-- Build an isomorphism in the category `CommRing` from a `ring_equiv` between `comm_ring`s. -/
@[simps]
def toCommRingCatIso [CommRing X] [CommRing Y] (e : X ≃+* Y) : CommRingCat.of X ≅ CommRingCat.of Y
@@ -373,12 +348,6 @@ end RingEquiv
namespace CategoryTheory.Iso
-/- warning: category_theory.iso.Ring_iso_to_ring_equiv -> CategoryTheory.Iso.ringCatIsoToRingEquiv is a dubious translation:
-lean 3 declaration is
- forall {X : RingCat.{u1}} {Y : RingCat.{u1}}, (CategoryTheory.Iso.{u1, succ u1} RingCat.{u1} RingCat.largeCategory.{u1} X Y) -> (RingEquiv.{u1, u1} (coeSort.{succ (succ u1), succ (succ u1)} RingCat.{u1} Type.{u1} RingCat.hasCoeToSort.{u1} X) (coeSort.{succ (succ u1), succ (succ u1)} RingCat.{u1} Type.{u1} RingCat.hasCoeToSort.{u1} Y) (Distrib.toHasMul.{u1} (coeSort.{succ (succ u1), succ (succ u1)} RingCat.{u1} Type.{u1} RingCat.hasCoeToSort.{u1} X) (Ring.toDistrib.{u1} (coeSort.{succ (succ u1), succ (succ u1)} RingCat.{u1} Type.{u1} RingCat.hasCoeToSort.{u1} X) (RingCat.ring.{u1} X))) (Distrib.toHasAdd.{u1} (coeSort.{succ (succ u1), succ (succ u1)} RingCat.{u1} Type.{u1} RingCat.hasCoeToSort.{u1} X) (Ring.toDistrib.{u1} (coeSort.{succ (succ u1), succ (succ u1)} RingCat.{u1} Type.{u1} RingCat.hasCoeToSort.{u1} X) (RingCat.ring.{u1} X))) (Distrib.toHasMul.{u1} (coeSort.{succ (succ u1), succ (succ u1)} RingCat.{u1} Type.{u1} RingCat.hasCoeToSort.{u1} Y) (Ring.toDistrib.{u1} (coeSort.{succ (succ u1), succ (succ u1)} RingCat.{u1} Type.{u1} RingCat.hasCoeToSort.{u1} Y) (RingCat.ring.{u1} Y))) (Distrib.toHasAdd.{u1} (coeSort.{succ (succ u1), succ (succ u1)} RingCat.{u1} Type.{u1} RingCat.hasCoeToSort.{u1} Y) (Ring.toDistrib.{u1} (coeSort.{succ (succ u1), succ (succ u1)} RingCat.{u1} Type.{u1} RingCat.hasCoeToSort.{u1} Y) (RingCat.ring.{u1} Y))))
-but is expected to have type
- forall {X : RingCat.{u1}} {Y : RingCat.{u1}}, (CategoryTheory.Iso.{u1, succ u1} RingCat.{u1} instRingCatLargeCategory.{u1} X Y) -> (RingEquiv.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} X) (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} Y) (NonUnitalNonAssocRing.toMul.{u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} X) (NonAssocRing.toNonUnitalNonAssocRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} X) (Ring.toNonAssocRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} X) (RingCat.instRingα_1.{u1} X)))) (NonUnitalNonAssocRing.toMul.{u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} Y) (NonAssocRing.toNonUnitalNonAssocRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} Y) (Ring.toNonAssocRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} Y) (RingCat.instRingα_1.{u1} Y)))) (Distrib.toAdd.{u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} X) (NonUnitalNonAssocSemiring.toDistrib.{u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} X) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} X) (NonAssocRing.toNonUnitalNonAssocRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} X) (Ring.toNonAssocRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} X) (RingCat.instRingα_1.{u1} X)))))) (Distrib.toAdd.{u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} Y) (NonUnitalNonAssocSemiring.toDistrib.{u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} Y) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} Y) (NonAssocRing.toNonUnitalNonAssocRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} Y) (Ring.toNonAssocRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} Y) (RingCat.instRingα_1.{u1} Y)))))))
-Case conversion may be inaccurate. Consider using '#align category_theory.iso.Ring_iso_to_ring_equiv CategoryTheory.Iso.ringCatIsoToRingEquivₓ'. -/
/-- Build a `ring_equiv` from an isomorphism in the category `Ring`. -/
def ringCatIsoToRingEquiv {X Y : RingCat} (i : X ≅ Y) : X ≃+* Y
where
@@ -390,12 +359,6 @@ def ringCatIsoToRingEquiv {X Y : RingCat} (i : X ≅ Y) : X ≃+* Y
map_mul' := by tidy
#align category_theory.iso.Ring_iso_to_ring_equiv CategoryTheory.Iso.ringCatIsoToRingEquiv
-/- warning: category_theory.iso.CommRing_iso_to_ring_equiv -> CategoryTheory.Iso.commRingCatIsoToRingEquiv is a dubious translation:
-lean 3 declaration is
- forall {X : CommRingCat.{u1}} {Y : CommRingCat.{u1}}, (CategoryTheory.Iso.{u1, succ u1} CommRingCat.{u1} CommRingCat.largeCategory.{u1} X Y) -> (RingEquiv.{u1, u1} (coeSort.{succ (succ u1), succ (succ u1)} CommRingCat.{u1} Type.{u1} CommRingCat.hasCoeToSort.{u1} X) (coeSort.{succ (succ u1), succ (succ u1)} CommRingCat.{u1} Type.{u1} CommRingCat.hasCoeToSort.{u1} Y) (Distrib.toHasMul.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommRingCat.{u1} Type.{u1} CommRingCat.hasCoeToSort.{u1} X) (Ring.toDistrib.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommRingCat.{u1} Type.{u1} CommRingCat.hasCoeToSort.{u1} X) (CommRing.toRing.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommRingCat.{u1} Type.{u1} CommRingCat.hasCoeToSort.{u1} X) (CommRingCat.commRing.{u1} X)))) (Distrib.toHasAdd.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommRingCat.{u1} Type.{u1} CommRingCat.hasCoeToSort.{u1} X) (Ring.toDistrib.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommRingCat.{u1} Type.{u1} CommRingCat.hasCoeToSort.{u1} X) (CommRing.toRing.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommRingCat.{u1} Type.{u1} CommRingCat.hasCoeToSort.{u1} X) (CommRingCat.commRing.{u1} X)))) (Distrib.toHasMul.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommRingCat.{u1} Type.{u1} CommRingCat.hasCoeToSort.{u1} Y) (Ring.toDistrib.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommRingCat.{u1} Type.{u1} CommRingCat.hasCoeToSort.{u1} Y) (CommRing.toRing.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommRingCat.{u1} Type.{u1} CommRingCat.hasCoeToSort.{u1} Y) (CommRingCat.commRing.{u1} Y)))) (Distrib.toHasAdd.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommRingCat.{u1} Type.{u1} CommRingCat.hasCoeToSort.{u1} Y) (Ring.toDistrib.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommRingCat.{u1} Type.{u1} CommRingCat.hasCoeToSort.{u1} Y) (CommRing.toRing.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommRingCat.{u1} Type.{u1} CommRingCat.hasCoeToSort.{u1} Y) (CommRingCat.commRing.{u1} Y)))))
-but is expected to have type
- forall {X : CommRingCat.{u1}} {Y : CommRingCat.{u1}}, (CategoryTheory.Iso.{u1, succ u1} CommRingCat.{u1} instCommRingCatLargeCategory.{u1} X Y) -> (RingEquiv.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} X) (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} Y) (NonUnitalNonAssocRing.toMul.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} X) (NonAssocRing.toNonUnitalNonAssocRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} X) (Ring.toNonAssocRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} X) (CommRing.toRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} X) (CommRingCat.instCommRingα_1.{u1} X))))) (NonUnitalNonAssocRing.toMul.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} Y) (NonAssocRing.toNonUnitalNonAssocRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} Y) (Ring.toNonAssocRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} Y) (CommRing.toRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} Y) (CommRingCat.instCommRingα_1.{u1} Y))))) (Distrib.toAdd.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} X) (NonUnitalNonAssocSemiring.toDistrib.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} X) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} X) (NonAssocRing.toNonUnitalNonAssocRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} X) (Ring.toNonAssocRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} X) (CommRing.toRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} X) (CommRingCat.instCommRingα_1.{u1} X))))))) (Distrib.toAdd.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} Y) (NonUnitalNonAssocSemiring.toDistrib.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} Y) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} Y) (NonAssocRing.toNonUnitalNonAssocRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} Y) (Ring.toNonAssocRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} Y) (CommRing.toRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} Y) (CommRingCat.instCommRingα_1.{u1} Y))))))))
-Case conversion may be inaccurate. Consider using '#align category_theory.iso.CommRing_iso_to_ring_equiv CategoryTheory.Iso.commRingCatIsoToRingEquivₓ'. -/
/-- Build a `ring_equiv` from an isomorphism in the category `CommRing`. -/
def commRingCatIsoToRingEquiv {X Y : CommRingCat} (i : X ≅ Y) : X ≃+* Y
where
@@ -423,12 +386,6 @@ theorem commRingIsoToRingEquiv_symm_toRingHom {X Y : CommRingCat} (i : X ≅ Y)
end CategoryTheory.Iso
-/- warning: ring_equiv_iso_Ring_iso -> ringEquivIsoRingIso is a dubious translation:
-lean 3 declaration is
- forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : Ring.{u1} X] [_inst_2 : Ring.{u1} Y], CategoryTheory.Iso.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1} (RingEquiv.{u1, u1} X Y (Distrib.toHasMul.{u1} X (Ring.toDistrib.{u1} X _inst_1)) (Distrib.toHasAdd.{u1} X (Ring.toDistrib.{u1} X _inst_1)) (Distrib.toHasMul.{u1} Y (Ring.toDistrib.{u1} Y _inst_2)) (Distrib.toHasAdd.{u1} Y (Ring.toDistrib.{u1} Y _inst_2))) (CategoryTheory.Iso.{u1, succ u1} RingCat.{u1} RingCat.largeCategory.{u1} (RingCat.of.{u1} X _inst_1) (RingCat.of.{u1} Y _inst_2))
-but is expected to have type
- forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : Ring.{u1} X] [_inst_2 : Ring.{u1} Y], CategoryTheory.Iso.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1} (RingEquiv.{u1, u1} X Y (NonUnitalNonAssocRing.toMul.{u1} X (NonAssocRing.toNonUnitalNonAssocRing.{u1} X (Ring.toNonAssocRing.{u1} X _inst_1))) (NonUnitalNonAssocRing.toMul.{u1} Y (NonAssocRing.toNonUnitalNonAssocRing.{u1} Y (Ring.toNonAssocRing.{u1} Y _inst_2))) (Distrib.toAdd.{u1} X (NonUnitalNonAssocSemiring.toDistrib.{u1} X (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} X (NonAssocRing.toNonUnitalNonAssocRing.{u1} X (Ring.toNonAssocRing.{u1} X _inst_1))))) (Distrib.toAdd.{u1} Y (NonUnitalNonAssocSemiring.toDistrib.{u1} Y (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} Y (NonAssocRing.toNonUnitalNonAssocRing.{u1} Y (Ring.toNonAssocRing.{u1} Y _inst_2)))))) (CategoryTheory.Iso.{u1, succ u1} RingCat.{u1} instRingCatLargeCategory.{u1} (RingCat.of.{u1} X _inst_1) (RingCat.of.{u1} Y _inst_2))
-Case conversion may be inaccurate. Consider using '#align ring_equiv_iso_Ring_iso ringEquivIsoRingIsoₓ'. -/
/-- Ring equivalences between `ring`s are the same as (isomorphic to) isomorphisms in `Ring`. -/
def ringEquivIsoRingIso {X Y : Type u} [Ring X] [Ring Y] : X ≃+* Y ≅ RingCat.of X ≅ RingCat.of Y
where
@@ -436,12 +393,6 @@ def ringEquivIsoRingIso {X Y : Type u} [Ring X] [Ring Y] : X ≃+* Y ≅ RingCat
inv i := i.ringCatIsoToRingEquiv
#align ring_equiv_iso_Ring_iso ringEquivIsoRingIso
-/- warning: ring_equiv_iso_CommRing_iso -> ringEquivIsoCommRingIso is a dubious translation:
-lean 3 declaration is
- forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : CommRing.{u1} X] [_inst_2 : CommRing.{u1} Y], CategoryTheory.Iso.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1} (RingEquiv.{u1, u1} X Y (Distrib.toHasMul.{u1} X (Ring.toDistrib.{u1} X (CommRing.toRing.{u1} X _inst_1))) (Distrib.toHasAdd.{u1} X (Ring.toDistrib.{u1} X (CommRing.toRing.{u1} X _inst_1))) (Distrib.toHasMul.{u1} Y (Ring.toDistrib.{u1} Y (CommRing.toRing.{u1} Y _inst_2))) (Distrib.toHasAdd.{u1} Y (Ring.toDistrib.{u1} Y (CommRing.toRing.{u1} Y _inst_2)))) (CategoryTheory.Iso.{u1, succ u1} CommRingCat.{u1} CommRingCat.largeCategory.{u1} (CommRingCat.of.{u1} X _inst_1) (CommRingCat.of.{u1} Y _inst_2))
-but is expected to have type
- forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : CommRing.{u1} X] [_inst_2 : CommRing.{u1} Y], CategoryTheory.Iso.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1} (RingEquiv.{u1, u1} X Y (NonUnitalNonAssocRing.toMul.{u1} X (NonAssocRing.toNonUnitalNonAssocRing.{u1} X (Ring.toNonAssocRing.{u1} X (CommRing.toRing.{u1} X _inst_1)))) (NonUnitalNonAssocRing.toMul.{u1} Y (NonAssocRing.toNonUnitalNonAssocRing.{u1} Y (Ring.toNonAssocRing.{u1} Y (CommRing.toRing.{u1} Y _inst_2)))) (Distrib.toAdd.{u1} X (NonUnitalNonAssocSemiring.toDistrib.{u1} X (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} X (NonAssocRing.toNonUnitalNonAssocRing.{u1} X (Ring.toNonAssocRing.{u1} X (CommRing.toRing.{u1} X _inst_1)))))) (Distrib.toAdd.{u1} Y (NonUnitalNonAssocSemiring.toDistrib.{u1} Y (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} Y (NonAssocRing.toNonUnitalNonAssocRing.{u1} Y (Ring.toNonAssocRing.{u1} Y (CommRing.toRing.{u1} Y _inst_2))))))) (CategoryTheory.Iso.{u1, succ u1} CommRingCat.{u1} instCommRingCatLargeCategory.{u1} (CommRingCat.of.{u1} X _inst_1) (CommRingCat.of.{u1} Y _inst_2))
-Case conversion may be inaccurate. Consider using '#align ring_equiv_iso_CommRing_iso ringEquivIsoCommRingIsoₓ'. -/
/-- Ring equivalences between `comm_ring`s are the same as (isomorphic to) isomorphisms
in `CommRing`. -/
def ringEquivIsoCommRingIso {X Y : Type u} [CommRing X] [CommRing Y] :
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -410,20 +410,14 @@ def commRingCatIsoToRingEquiv {X Y : CommRingCat} (i : X ≅ Y) : X ≃+* Y
#print CategoryTheory.Iso.commRingIsoToRingEquiv_toRingHom /-
@[simp]
theorem commRingIsoToRingEquiv_toRingHom {X Y : CommRingCat} (i : X ≅ Y) :
- i.commRingCatIsoToRingEquiv.toRingHom = i.Hom :=
- by
- ext
- rfl
+ i.commRingCatIsoToRingEquiv.toRingHom = i.Hom := by ext; rfl
#align category_theory.iso.CommRing_iso_to_ring_equiv_to_ring_hom CategoryTheory.Iso.commRingIsoToRingEquiv_toRingHom
-/
#print CategoryTheory.Iso.commRingIsoToRingEquiv_symm_toRingHom /-
@[simp]
theorem commRingIsoToRingEquiv_symm_toRingHom {X Y : CommRingCat} (i : X ≅ Y) :
- i.commRingCatIsoToRingEquiv.symm.toRingHom = i.inv :=
- by
- ext
- rfl
+ i.commRingCatIsoToRingEquiv.symm.toRingHom = i.inv := by ext; rfl
#align category_theory.iso.CommRing_iso_to_ring_equiv_symm_to_ring_hom CategoryTheory.Iso.commRingIsoToRingEquiv_symm_toRingHom
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -77,10 +77,7 @@ def ofHom {R S : Type u} [Semiring R] [Semiring S] (f : R →+* S) : of R ⟶ of
-/
/- warning: SemiRing.of_hom_apply -> SemiRingCat.ofHom_apply is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {S : Type.{u1}} [_inst_1 : Semiring.{u1} R] [_inst_2 : Semiring.{u1} S] (f : RingHom.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2)) (x : R), Eq.{succ u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Semiring.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Semiring.{u1}) (SemiRingCat.of.{u1} S _inst_2)) (coeFn.{succ u1, succ u1} (Quiver.Hom.{succ u1, succ u1} SemiRingCat.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} SemiRingCat.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} SemiRingCat.{u1} SemiRingCat.largeCategory.{u1})) (SemiRingCat.of.{u1} R _inst_1) (SemiRingCat.of.{u1} S _inst_2)) (fun (_x : RingHom.{u1, u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Semiring.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Semiring.{u1}) (SemiRingCat.of.{u1} R _inst_1)) (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Semiring.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Semiring.{u1}) (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Semiring.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Semiring.{u1}) (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.str.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Semiring.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Semiring.{u1}) (SemiRingCat.of.{u1} S _inst_2)) (CategoryTheory.Bundled.str.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)))) => (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Semiring.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Semiring.{u1}) (SemiRingCat.of.{u1} R _inst_1)) -> (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Semiring.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Semiring.{u1}) (SemiRingCat.of.{u1} S _inst_2))) (RingHom.hasCoeToFun.{u1, u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Semiring.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Semiring.{u1}) (SemiRingCat.of.{u1} R _inst_1)) (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Semiring.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Semiring.{u1}) (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Semiring.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Semiring.{u1}) (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.str.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Semiring.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Semiring.{u1}) (SemiRingCat.of.{u1} S _inst_2)) (CategoryTheory.Bundled.str.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)))) (SemiRingCat.ofHom.{u1} R S _inst_1 _inst_2 f) x) (coeFn.{succ u1, succ u1} (RingHom.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2)) (fun (_x : RingHom.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2)) => R -> S) (RingHom.hasCoeToFun.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2)) f x)
-but is expected to have type
- forall {R : Type.{u1}} {S : Type.{u1}} [_inst_1 : Semiring.{u1} R] [_inst_2 : Semiring.{u1} S] (f : RingHom.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2)) (x : R), Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) => CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) x) (FunLike.coe.{succ u1, succ u1, succ u1} (RingHom.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} S _inst_2)))) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (fun (_x : CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) => CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) _x) (MulHomClass.toFunLike.{u1, u1, u1} (RingHom.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} S _inst_2)))) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (NonUnitalNonAssocSemiring.toMul.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} R _inst_1))))) (NonUnitalNonAssocSemiring.toMul.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} S _inst_2))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u1, u1} (RingHom.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} S _inst_2)))) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} S _inst_2)))) (RingHomClass.toNonUnitalRingHomClass.{u1, u1, u1} (RingHom.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} S _inst_2)))) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} S _inst_2))) (RingHom.instRingHomClassRingHom.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} S _inst_2))))))) (SemiRingCat.ofHom.{u1} R S _inst_1 _inst_2 f) x) (FunLike.coe.{succ u1, succ u1, succ u1} (RingHom.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2)) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : R) => S) _x) (MulHomClass.toFunLike.{u1, u1, u1} (RingHom.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2)) R S (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{u1, u1, u1} (RingHom.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2)) R S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{u1, u1, u1} (RingHom.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2)) R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2) (RingHom.instRingHomClassRingHom.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2))))) f x)
+<too large>
Case conversion may be inaccurate. Consider using '#align SemiRing.of_hom_apply SemiRingCat.ofHom_applyₓ'. -/
@[simp]
theorem ofHom_apply {R S : Type u} [Semiring R] [Semiring S] (f : R →+* S) (x : R) :
mathlib commit https://github.com/leanprover-community/mathlib/commit/95a87616d63b3cb49d3fe678d416fbe9c4217bf4
@@ -80,7 +80,7 @@ def ofHom {R S : Type u} [Semiring R] [Semiring S] (f : R →+* S) : of R ⟶ of
lean 3 declaration is
forall {R : Type.{u1}} {S : Type.{u1}} [_inst_1 : Semiring.{u1} R] [_inst_2 : Semiring.{u1} S] (f : RingHom.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2)) (x : R), Eq.{succ u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Semiring.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Semiring.{u1}) (SemiRingCat.of.{u1} S _inst_2)) (coeFn.{succ u1, succ u1} (Quiver.Hom.{succ u1, succ u1} SemiRingCat.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} SemiRingCat.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} SemiRingCat.{u1} SemiRingCat.largeCategory.{u1})) (SemiRingCat.of.{u1} R _inst_1) (SemiRingCat.of.{u1} S _inst_2)) (fun (_x : RingHom.{u1, u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Semiring.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Semiring.{u1}) (SemiRingCat.of.{u1} R _inst_1)) (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Semiring.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Semiring.{u1}) (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Semiring.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Semiring.{u1}) (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.str.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Semiring.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Semiring.{u1}) (SemiRingCat.of.{u1} S _inst_2)) (CategoryTheory.Bundled.str.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)))) => (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Semiring.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Semiring.{u1}) (SemiRingCat.of.{u1} R _inst_1)) -> (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Semiring.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Semiring.{u1}) (SemiRingCat.of.{u1} S _inst_2))) (RingHom.hasCoeToFun.{u1, u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Semiring.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Semiring.{u1}) (SemiRingCat.of.{u1} R _inst_1)) (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Semiring.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Semiring.{u1}) (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Semiring.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Semiring.{u1}) (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.str.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Semiring.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Semiring.{u1}) (SemiRingCat.of.{u1} S _inst_2)) (CategoryTheory.Bundled.str.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)))) (SemiRingCat.ofHom.{u1} R S _inst_1 _inst_2 f) x) (coeFn.{succ u1, succ u1} (RingHom.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2)) (fun (_x : RingHom.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2)) => R -> S) (RingHom.hasCoeToFun.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2)) f x)
but is expected to have type
- forall {R : Type.{u1}} {S : Type.{u1}} [_inst_1 : Semiring.{u1} R] [_inst_2 : Semiring.{u1} S] (f : RingHom.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2)) (x : R), Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) => CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) x) (FunLike.coe.{succ u1, succ u1, succ u1} (RingHom.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} S _inst_2)))) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (fun (_x : CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) => CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) _x) (MulHomClass.toFunLike.{u1, u1, u1} (RingHom.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} S _inst_2)))) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (NonUnitalNonAssocSemiring.toMul.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} R _inst_1))))) (NonUnitalNonAssocSemiring.toMul.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} S _inst_2))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u1, u1} (RingHom.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} S _inst_2)))) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} S _inst_2)))) (RingHomClass.toNonUnitalRingHomClass.{u1, u1, u1} (RingHom.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} S _inst_2)))) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} S _inst_2))) (RingHom.instRingHomClassRingHom.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} S _inst_2))))))) (SemiRingCat.ofHom.{u1} R S _inst_1 _inst_2 f) x) (FunLike.coe.{succ u1, succ u1, succ u1} (RingHom.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2)) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) _x) (MulHomClass.toFunLike.{u1, u1, u1} (RingHom.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2)) R S (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{u1, u1, u1} (RingHom.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2)) R S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{u1, u1, u1} (RingHom.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2)) R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2) (RingHom.instRingHomClassRingHom.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2))))) f x)
+ forall {R : Type.{u1}} {S : Type.{u1}} [_inst_1 : Semiring.{u1} R] [_inst_2 : Semiring.{u1} S] (f : RingHom.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2)) (x : R), Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) => CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) x) (FunLike.coe.{succ u1, succ u1, succ u1} (RingHom.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} S _inst_2)))) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (fun (_x : CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) => CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) _x) (MulHomClass.toFunLike.{u1, u1, u1} (RingHom.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} S _inst_2)))) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (NonUnitalNonAssocSemiring.toMul.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} R _inst_1))))) (NonUnitalNonAssocSemiring.toMul.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} S _inst_2))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u1, u1} (RingHom.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} S _inst_2)))) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} S _inst_2)))) (RingHomClass.toNonUnitalRingHomClass.{u1, u1, u1} (RingHom.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} S _inst_2)))) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} S _inst_2))) (RingHom.instRingHomClassRingHom.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} S _inst_2))))))) (SemiRingCat.ofHom.{u1} R S _inst_1 _inst_2 f) x) (FunLike.coe.{succ u1, succ u1, succ u1} (RingHom.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2)) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : R) => S) _x) (MulHomClass.toFunLike.{u1, u1, u1} (RingHom.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2)) R S (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{u1, u1, u1} (RingHom.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2)) R S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{u1, u1, u1} (RingHom.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2)) R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2) (RingHom.instRingHomClassRingHom.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2))))) f x)
Case conversion may be inaccurate. Consider using '#align SemiRing.of_hom_apply SemiRingCat.ofHom_applyₓ'. -/
@[simp]
theorem ofHom_apply {R S : Type u} [Semiring R] [Semiring S] (f : R →+* S) (x : R) :
mathlib commit https://github.com/leanprover-community/mathlib/commit/0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison, Johannes Hölzl, Yury Kudryashov
! This file was ported from Lean 3 source module algebra.category.Ring.basic
-! leanprover-community/mathlib commit 34b2a989ad80bce3a5de749d935a4f23726e26e9
+! leanprover-community/mathlib commit dbdf71cee7bb20367cb7e37279c08b0c218cf967
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -16,6 +16,9 @@ import Mathbin.Algebra.Ring.Equiv
/-!
# Category instances for semiring, ring, comm_semiring, and comm_ring.
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
We introduce the bundled categories:
* `SemiRing`
* `Ring`
mathlib commit https://github.com/leanprover-community/mathlib/commit/e3fb84046afd187b710170887195d50bada934ee
@@ -29,75 +29,99 @@ universe u v
open CategoryTheory
+#print SemiRingCat /-
/-- The category of semirings. -/
-def SemiRing : Type (u + 1) :=
+def SemiRingCat : Type (u + 1) :=
Bundled Semiring
-#align SemiRing SemiRing
+#align SemiRing SemiRingCat
+-/
-namespace SemiRing
+namespace SemiRingCat
+#print SemiRingCat.AssocRingHom /-
/-- `ring_hom` doesn't actually assume associativity. This alias is needed to make the category
theory machinery work. We use the same trick in `category_theory.Mon.assoc_monoid_hom`. -/
abbrev AssocRingHom (M N : Type _) [Semiring M] [Semiring N] :=
RingHom M N
-#align SemiRing.assoc_ring_hom SemiRing.AssocRingHom
+#align SemiRing.assoc_ring_hom SemiRingCat.AssocRingHom
+-/
+#print SemiRingCat.bundledHom /-
instance bundledHom : BundledHom AssocRingHom :=
⟨fun M N [Semiring M] [Semiring N] => @RingHom.toFun M N _ _, fun M [Semiring M] =>
@RingHom.id M _, fun M N P [Semiring M] [Semiring N] [Semiring P] => @RingHom.comp M N P _ _ _,
fun M N [Semiring M] [Semiring N] => @RingHom.coe_inj M N _ _⟩
-#align SemiRing.bundled_hom SemiRing.bundledHom
+#align SemiRing.bundled_hom SemiRingCat.bundledHom
+-/
-deriving instance LargeCategory, ConcreteCategory for SemiRing
+deriving instance LargeCategory, ConcreteCategory for SemiRingCat
-instance : CoeSort SemiRing (Type _) :=
+instance : CoeSort SemiRingCat (Type _) :=
Bundled.hasCoeToSort
+#print SemiRingCat.of /-
/-- Construct a bundled SemiRing from the underlying type and typeclass. -/
-def of (R : Type u) [Semiring R] : SemiRing :=
+def of (R : Type u) [Semiring R] : SemiRingCat :=
Bundled.of R
-#align SemiRing.of SemiRing.of
+#align SemiRing.of SemiRingCat.of
+-/
+#print SemiRingCat.ofHom /-
/-- Typecheck a `ring_hom` as a morphism in `SemiRing`. -/
def ofHom {R S : Type u} [Semiring R] [Semiring S] (f : R →+* S) : of R ⟶ of S :=
f
-#align SemiRing.of_hom SemiRing.ofHom
+#align SemiRing.of_hom SemiRingCat.ofHom
+-/
+/- warning: SemiRing.of_hom_apply -> SemiRingCat.ofHom_apply is a dubious translation:
+lean 3 declaration is
+ forall {R : Type.{u1}} {S : Type.{u1}} [_inst_1 : Semiring.{u1} R] [_inst_2 : Semiring.{u1} S] (f : RingHom.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2)) (x : R), Eq.{succ u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Semiring.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Semiring.{u1}) (SemiRingCat.of.{u1} S _inst_2)) (coeFn.{succ u1, succ u1} (Quiver.Hom.{succ u1, succ u1} SemiRingCat.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} SemiRingCat.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} SemiRingCat.{u1} SemiRingCat.largeCategory.{u1})) (SemiRingCat.of.{u1} R _inst_1) (SemiRingCat.of.{u1} S _inst_2)) (fun (_x : RingHom.{u1, u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Semiring.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Semiring.{u1}) (SemiRingCat.of.{u1} R _inst_1)) (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Semiring.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Semiring.{u1}) (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Semiring.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Semiring.{u1}) (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.str.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Semiring.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Semiring.{u1}) (SemiRingCat.of.{u1} S _inst_2)) (CategoryTheory.Bundled.str.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)))) => (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Semiring.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Semiring.{u1}) (SemiRingCat.of.{u1} R _inst_1)) -> (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Semiring.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Semiring.{u1}) (SemiRingCat.of.{u1} S _inst_2))) (RingHom.hasCoeToFun.{u1, u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Semiring.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Semiring.{u1}) (SemiRingCat.of.{u1} R _inst_1)) (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Semiring.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Semiring.{u1}) (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Semiring.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Semiring.{u1}) (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.str.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (coeSort.{succ (succ u1), succ (succ u1)} (CategoryTheory.Bundled.{u1, u1} Semiring.{u1}) Type.{u1} (CategoryTheory.Bundled.hasCoeToSort.{u1, u1} Semiring.{u1}) (SemiRingCat.of.{u1} S _inst_2)) (CategoryTheory.Bundled.str.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)))) (SemiRingCat.ofHom.{u1} R S _inst_1 _inst_2 f) x) (coeFn.{succ u1, succ u1} (RingHom.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2)) (fun (_x : RingHom.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2)) => R -> S) (RingHom.hasCoeToFun.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2)) f x)
+but is expected to have type
+ forall {R : Type.{u1}} {S : Type.{u1}} [_inst_1 : Semiring.{u1} R] [_inst_2 : Semiring.{u1} S] (f : RingHom.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2)) (x : R), Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) => CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) x) (FunLike.coe.{succ u1, succ u1, succ u1} (RingHom.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} S _inst_2)))) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (fun (_x : CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) => CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) _x) (MulHomClass.toFunLike.{u1, u1, u1} (RingHom.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} S _inst_2)))) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (NonUnitalNonAssocSemiring.toMul.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} R _inst_1))))) (NonUnitalNonAssocSemiring.toMul.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} S _inst_2))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u1, u1} (RingHom.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} S _inst_2)))) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} S _inst_2)))) (RingHomClass.toNonUnitalRingHomClass.{u1, u1, u1} (RingHom.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} S _inst_2)))) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} S _inst_2))) (RingHom.instRingHomClassRingHom.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} R _inst_1)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Semiring.{u1} (SemiRingCat.of.{u1} S _inst_2)) (SemiRingCat.instSemiringα.{u1} (SemiRingCat.of.{u1} S _inst_2))))))) (SemiRingCat.ofHom.{u1} R S _inst_1 _inst_2 f) x) (FunLike.coe.{succ u1, succ u1, succ u1} (RingHom.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2)) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) _x) (MulHomClass.toFunLike.{u1, u1, u1} (RingHom.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2)) R S (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{u1, u1, u1} (RingHom.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2)) R S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{u1, u1, u1} (RingHom.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2)) R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2) (RingHom.instRingHomClassRingHom.{u1, u1} R S (Semiring.toNonAssocSemiring.{u1} R _inst_1) (Semiring.toNonAssocSemiring.{u1} S _inst_2))))) f x)
+Case conversion may be inaccurate. Consider using '#align SemiRing.of_hom_apply SemiRingCat.ofHom_applyₓ'. -/
@[simp]
theorem ofHom_apply {R S : Type u} [Semiring R] [Semiring S] (f : R →+* S) (x : R) :
ofHom f x = f x :=
rfl
-#align SemiRing.of_hom_apply SemiRing.ofHom_apply
+#align SemiRing.of_hom_apply SemiRingCat.ofHom_apply
-instance : Inhabited SemiRing :=
+instance : Inhabited SemiRingCat :=
⟨of PUnit⟩
-instance (R : SemiRing) : Semiring R :=
+instance (R : SemiRingCat) : Semiring R :=
R.str
+#print SemiRingCat.coe_of /-
@[simp]
-theorem coe_of (R : Type u) [Semiring R] : (SemiRing.of R : Type u) = R :=
+theorem coe_of (R : Type u) [Semiring R] : (SemiRingCat.of R : Type u) = R :=
rfl
-#align SemiRing.coe_of SemiRing.coe_of
+#align SemiRing.coe_of SemiRingCat.coe_of
+-/
-instance hasForgetToMon : HasForget₂ SemiRing MonCat :=
+#print SemiRingCat.hasForgetToMonCat /-
+instance hasForgetToMonCat : HasForget₂ SemiRingCat MonCat :=
BundledHom.mkHasForget₂ (fun R hR => @MonoidWithZero.toMonoid R (@Semiring.toMonoidWithZero R hR))
(fun R₁ R₂ => RingHom.toMonoidHom) fun _ _ _ => rfl
-#align SemiRing.has_forget_to_Mon SemiRing.hasForgetToMon
+#align SemiRing.has_forget_to_Mon SemiRingCat.hasForgetToMonCat
+-/
-instance hasForgetToAddCommMon : HasForget₂ SemiRing AddCommMonCat
+#print SemiRingCat.hasForgetToAddCommMonCat /-
+instance hasForgetToAddCommMonCat : HasForget₂ SemiRingCat AddCommMonCat
where-- can't use bundled_hom.mk_has_forget₂, since AddCommMon is an induced category
forget₂ :=
{ obj := fun R => AddCommMonCat.of R
map := fun R₁ R₂ f => RingHom.toAddMonoidHom f }
-#align SemiRing.has_forget_to_AddCommMon SemiRing.hasForgetToAddCommMon
+#align SemiRing.has_forget_to_AddCommMon SemiRingCat.hasForgetToAddCommMonCat
+-/
-end SemiRing
+end SemiRingCat
+#print RingCat /-
/-- The category of rings. -/
def RingCat : Type (u + 1) :=
Bundled Ring
#align Ring RingCat
+-/
namespace RingCat
@@ -110,15 +134,19 @@ deriving instance
«./././Mathport/Syntax/Translate/Command.lean:42:9: unsupported derive handler λ Ring,
has_coe_to_sort[has_coe_to_sort] Ring (Type*)», LargeCategory, ConcreteCategory for RingCat
+#print RingCat.of /-
/-- Construct a bundled Ring from the underlying type and typeclass. -/
def of (R : Type u) [Ring R] : RingCat :=
Bundled.of R
#align Ring.of RingCat.of
+-/
+#print RingCat.ofHom /-
/-- Typecheck a `ring_hom` as a morphism in `Ring`. -/
def ofHom {R S : Type u} [Ring R] [Ring S] (f : R →+* S) : of R ⟶ of S :=
f
#align Ring.of_hom RingCat.ofHom
+-/
@[simp]
theorem ofHom_apply {R S : Type u} [Ring R] [Ring S] (f : R →+* S) (x : R) : ofHom f x = f x :=
@@ -131,82 +159,109 @@ instance : Inhabited RingCat :=
instance (R : RingCat) : Ring R :=
R.str
+#print RingCat.coe_of /-
@[simp]
theorem coe_of (R : Type u) [Ring R] : (RingCat.of R : Type u) = R :=
rfl
#align Ring.coe_of RingCat.coe_of
+-/
-instance hasForgetToSemiRing : HasForget₂ RingCat SemiRing :=
+#print RingCat.hasForgetToSemiRingCat /-
+instance hasForgetToSemiRingCat : HasForget₂ RingCat SemiRingCat :=
BundledHom.forget₂ _ _
-#align Ring.has_forget_to_SemiRing RingCat.hasForgetToSemiRing
+#align Ring.has_forget_to_SemiRing RingCat.hasForgetToSemiRingCat
+-/
-instance hasForgetToAddCommGroup : HasForget₂ RingCat AddCommGroupCat
+#print RingCat.hasForgetToAddCommGroupCat /-
+instance hasForgetToAddCommGroupCat : HasForget₂ RingCat AddCommGroupCat
where-- can't use bundled_hom.mk_has_forget₂, since AddCommGroup is an induced category
forget₂ :=
{ obj := fun R => AddCommGroupCat.of R
map := fun R₁ R₂ f => RingHom.toAddMonoidHom f }
-#align Ring.has_forget_to_AddCommGroup RingCat.hasForgetToAddCommGroup
+#align Ring.has_forget_to_AddCommGroup RingCat.hasForgetToAddCommGroupCat
+-/
end RingCat
+#print CommSemiRingCat /-
/-- The category of commutative semirings. -/
-def CommSemiRing : Type (u + 1) :=
+def CommSemiRingCat : Type (u + 1) :=
Bundled CommSemiring
-#align CommSemiRing CommSemiRing
+#align CommSemiRing CommSemiRingCat
+-/
-namespace CommSemiRing
+namespace CommSemiRingCat
instance : BundledHom.ParentProjection @CommSemiring.toSemiring :=
⟨⟩
-deriving instance LargeCategory, ConcreteCategory for CommSemiRing
+deriving instance LargeCategory, ConcreteCategory for CommSemiRingCat
-instance : CoeSort CommSemiRing (Type _) :=
+instance : CoeSort CommSemiRingCat (Type _) :=
Bundled.hasCoeToSort
+#print CommSemiRing.of /-
/-- Construct a bundled CommSemiRing from the underlying type and typeclass. -/
-def of (R : Type u) [CommSemiring R] : CommSemiRing :=
+def of (R : Type u) [CommSemiring R] : CommSemiRingCat :=
Bundled.of R
#align CommSemiRing.of CommSemiRing.of
+-/
+#print CommSemiRing.ofHom /-
/-- Typecheck a `ring_hom` as a morphism in `CommSemiRing`. -/
def ofHom {R S : Type u} [CommSemiring R] [CommSemiring S] (f : R →+* S) : of R ⟶ of S :=
f
#align CommSemiRing.of_hom CommSemiRing.ofHom
+-/
+/- warning: CommSemiRing.of_hom_apply clashes with [anonymous] -> [anonymous]
+warning: CommSemiRing.of_hom_apply -> [anonymous] is a dubious translation:
+lean 3 declaration is
+ forall {R : Type.{u}} {S : Type.{u}} [_inst_1 : CommSemiring.{u} R] [_inst_2 : CommSemiring.{u} S] (f : RingHom.{u, u} R S (Semiring.toNonAssocSemiring.{u} R (CommSemiring.toSemiring.{u} R _inst_1)) (Semiring.toNonAssocSemiring.{u} S (CommSemiring.toSemiring.{u} S _inst_2))) (x : R), Eq.{succ u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommSemiring.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommSemiring.{u}) (CommSemiRing.of.{u} S _inst_2)) (coeFn.{succ u, succ u} (Quiver.Hom.{succ u, succ u} CommSemiRingCat.{u} (CategoryTheory.CategoryStruct.toQuiver.{u, succ u} CommSemiRingCat.{u} (CategoryTheory.Category.toCategoryStruct.{u, succ u} CommSemiRingCat.{u} CommSemiRingCat.largeCategory.{u})) (CommSemiRing.of.{u} R _inst_1) (CommSemiRing.of.{u} S _inst_2)) (fun (_x : RingHom.{u, u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommSemiring.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommSemiring.{u}) (CommSemiRing.of.{u} R _inst_1)) (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommSemiring.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommSemiring.{u}) (CommSemiRing.of.{u} S _inst_2)) (Semiring.toNonAssocSemiring.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommSemiring.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommSemiring.{u}) (CommSemiRing.of.{u} R _inst_1)) (CommSemiring.toSemiring.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommSemiring.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommSemiring.{u}) (CommSemiRing.of.{u} R _inst_1)) (CategoryTheory.Bundled.str.{u, u} CommSemiring.{u} (CommSemiRing.of.{u} R _inst_1)))) (Semiring.toNonAssocSemiring.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommSemiring.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommSemiring.{u}) (CommSemiRing.of.{u} S _inst_2)) (CommSemiring.toSemiring.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommSemiring.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommSemiring.{u}) (CommSemiRing.of.{u} S _inst_2)) (CategoryTheory.Bundled.str.{u, u} CommSemiring.{u} (CommSemiRing.of.{u} S _inst_2))))) => (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommSemiring.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommSemiring.{u}) (CommSemiRing.of.{u} R _inst_1)) -> (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommSemiring.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommSemiring.{u}) (CommSemiRing.of.{u} S _inst_2))) (RingHom.hasCoeToFun.{u, u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommSemiring.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommSemiring.{u}) (CommSemiRing.of.{u} R _inst_1)) (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommSemiring.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommSemiring.{u}) (CommSemiRing.of.{u} S _inst_2)) (Semiring.toNonAssocSemiring.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommSemiring.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommSemiring.{u}) (CommSemiRing.of.{u} R _inst_1)) (CommSemiring.toSemiring.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommSemiring.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommSemiring.{u}) (CommSemiRing.of.{u} R _inst_1)) (CategoryTheory.Bundled.str.{u, u} CommSemiring.{u} (CommSemiRing.of.{u} R _inst_1)))) (Semiring.toNonAssocSemiring.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommSemiring.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommSemiring.{u}) (CommSemiRing.of.{u} S _inst_2)) (CommSemiring.toSemiring.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommSemiring.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommSemiring.{u}) (CommSemiRing.of.{u} S _inst_2)) (CategoryTheory.Bundled.str.{u, u} CommSemiring.{u} (CommSemiRing.of.{u} S _inst_2))))) (CommSemiRing.ofHom.{u} R S _inst_1 _inst_2 f) x) (coeFn.{succ u, succ u} (RingHom.{u, u} R S (Semiring.toNonAssocSemiring.{u} R (CommSemiring.toSemiring.{u} R _inst_1)) (Semiring.toNonAssocSemiring.{u} S (CommSemiring.toSemiring.{u} S _inst_2))) (fun (_x : RingHom.{u, u} R S (Semiring.toNonAssocSemiring.{u} R (CommSemiring.toSemiring.{u} R _inst_1)) (Semiring.toNonAssocSemiring.{u} S (CommSemiring.toSemiring.{u} S _inst_2))) => R -> S) (RingHom.hasCoeToFun.{u, u} R S (Semiring.toNonAssocSemiring.{u} R (CommSemiring.toSemiring.{u} R _inst_1)) (Semiring.toNonAssocSemiring.{u} S (CommSemiring.toSemiring.{u} S _inst_2))) f x)
+but is expected to have type
+ forall {R : Type.{u}} {S : Type.{v}}, (Nat -> R -> S) -> Nat -> (List.{u} R) -> (List.{v} S)
+Case conversion may be inaccurate. Consider using '#align CommSemiRing.of_hom_apply [anonymous]ₓ'. -/
@[simp]
-theorem ofHom_apply {R S : Type u} [CommSemiring R] [CommSemiring S] (f : R →+* S) (x : R) :
+theorem [anonymous] {R S : Type u} [CommSemiring R] [CommSemiring S] (f : R →+* S) (x : R) :
ofHom f x = f x :=
rfl
-#align CommSemiRing.of_hom_apply CommSemiRing.ofHom_apply
+#align CommSemiRing.of_hom_apply [anonymous]
-instance : Inhabited CommSemiRing :=
+instance : Inhabited CommSemiRingCat :=
⟨of PUnit⟩
-instance (R : CommSemiRing) : CommSemiring R :=
+instance (R : CommSemiRingCat) : CommSemiring R :=
R.str
+#print CommSemiRing.coe_of /-
@[simp]
theorem coe_of (R : Type u) [CommSemiring R] : (CommSemiRing.of R : Type u) = R :=
rfl
#align CommSemiRing.coe_of CommSemiRing.coe_of
+-/
-instance hasForgetToSemiRing : HasForget₂ CommSemiRing SemiRing :=
+#print CommSemiRing.hasForgetToSemiRingCat /-
+instance hasForgetToSemiRingCat : HasForget₂ CommSemiRingCat SemiRingCat :=
BundledHom.forget₂ _ _
-#align CommSemiRing.has_forget_to_SemiRing CommSemiRing.hasForgetToSemiRing
+#align CommSemiRing.has_forget_to_SemiRing CommSemiRing.hasForgetToSemiRingCat
+-/
+#print CommSemiRing.hasForgetToCommMonCat /-
/-- The forgetful functor from commutative rings to (multiplicative) commutative monoids. -/
-instance hasForgetToCommMon : HasForget₂ CommSemiRing CommMonCat :=
- HasForget₂.mk' (fun R : CommSemiRing => CommMonCat.of R) (fun R => rfl)
+instance hasForgetToCommMonCat : HasForget₂ CommSemiRingCat CommMonCat :=
+ HasForget₂.mk' (fun R : CommSemiRingCat => CommMonCat.of R) (fun R => rfl)
(fun R₁ R₂ f => f.toMonoidHom) (by tidy)
-#align CommSemiRing.has_forget_to_CommMon CommSemiRing.hasForgetToCommMon
+#align CommSemiRing.has_forget_to_CommMon CommSemiRing.hasForgetToCommMonCat
+-/
-end CommSemiRing
+end CommSemiRingCat
+#print CommRingCat /-
/-- The category of commutative rings. -/
def CommRingCat : Type (u + 1) :=
Bundled CommRing
#align CommRing CommRingCat
+-/
namespace CommRingCat
@@ -218,21 +273,32 @@ deriving instance LargeCategory, ConcreteCategory for CommRingCat
instance : CoeSort CommRingCat (Type _) :=
Bundled.hasCoeToSort
+#print CommRingCat.of /-
/-- Construct a bundled CommRing from the underlying type and typeclass. -/
def of (R : Type u) [CommRing R] : CommRingCat :=
Bundled.of R
#align CommRing.of CommRingCat.of
+-/
+#print CommRingCat.ofHom /-
/-- Typecheck a `ring_hom` as a morphism in `CommRing`. -/
def ofHom {R S : Type u} [CommRing R] [CommRing S] (f : R →+* S) : of R ⟶ of S :=
f
#align CommRing.of_hom CommRingCat.ofHom
+-/
+/- warning: CommRing.of_hom_apply clashes with [anonymous] -> [anonymous]
+warning: CommRing.of_hom_apply -> [anonymous] is a dubious translation:
+lean 3 declaration is
+ forall {R : Type.{u}} {S : Type.{u}} [_inst_1 : CommRing.{u} R] [_inst_2 : CommRing.{u} S] (f : RingHom.{u, u} R S (NonAssocRing.toNonAssocSemiring.{u} R (Ring.toNonAssocRing.{u} R (CommRing.toRing.{u} R _inst_1))) (NonAssocRing.toNonAssocSemiring.{u} S (Ring.toNonAssocRing.{u} S (CommRing.toRing.{u} S _inst_2)))) (x : R), Eq.{succ u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} S _inst_2)) (coeFn.{succ u, succ u} (Quiver.Hom.{succ u, succ u} CommRingCat.{u} (CategoryTheory.CategoryStruct.toQuiver.{u, succ u} CommRingCat.{u} (CategoryTheory.Category.toCategoryStruct.{u, succ u} CommRingCat.{u} CommRingCat.largeCategory.{u})) (CommRingCat.of.{u} R _inst_1) (CommRingCat.of.{u} S _inst_2)) (fun (_x : RingHom.{u, u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} R _inst_1)) (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} S _inst_2)) (Semiring.toNonAssocSemiring.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} R _inst_1)) (Ring.toSemiring.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} R _inst_1)) (CommRing.toRing.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} R _inst_1)) (CategoryTheory.Bundled.str.{u, u} CommRing.{u} (CommRingCat.of.{u} R _inst_1))))) (Semiring.toNonAssocSemiring.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} S _inst_2)) (Ring.toSemiring.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} S _inst_2)) (CommRing.toRing.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} S _inst_2)) (CategoryTheory.Bundled.str.{u, u} CommRing.{u} (CommRingCat.of.{u} S _inst_2)))))) => (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} R _inst_1)) -> (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} S _inst_2))) (RingHom.hasCoeToFun.{u, u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} R _inst_1)) (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} S _inst_2)) (Semiring.toNonAssocSemiring.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} R _inst_1)) (Ring.toSemiring.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} R _inst_1)) (CommRing.toRing.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} R _inst_1)) (CategoryTheory.Bundled.str.{u, u} CommRing.{u} (CommRingCat.of.{u} R _inst_1))))) (Semiring.toNonAssocSemiring.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} S _inst_2)) (Ring.toSemiring.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} S _inst_2)) (CommRing.toRing.{u} (coeSort.{succ (succ u), succ (succ u)} (CategoryTheory.Bundled.{u, u} CommRing.{u}) Type.{u} (CategoryTheory.Bundled.hasCoeToSort.{u, u} CommRing.{u}) (CommRingCat.of.{u} S _inst_2)) (CategoryTheory.Bundled.str.{u, u} CommRing.{u} (CommRingCat.of.{u} S _inst_2)))))) (CommRingCat.ofHom.{u} R S _inst_1 _inst_2 f) x) (coeFn.{succ u, succ u} (RingHom.{u, u} R S (NonAssocRing.toNonAssocSemiring.{u} R (Ring.toNonAssocRing.{u} R (CommRing.toRing.{u} R _inst_1))) (NonAssocRing.toNonAssocSemiring.{u} S (Ring.toNonAssocRing.{u} S (CommRing.toRing.{u} S _inst_2)))) (fun (_x : RingHom.{u, u} R S (NonAssocRing.toNonAssocSemiring.{u} R (Ring.toNonAssocRing.{u} R (CommRing.toRing.{u} R _inst_1))) (NonAssocRing.toNonAssocSemiring.{u} S (Ring.toNonAssocRing.{u} S (CommRing.toRing.{u} S _inst_2)))) => R -> S) (RingHom.hasCoeToFun.{u, u} R S (NonAssocRing.toNonAssocSemiring.{u} R (Ring.toNonAssocRing.{u} R (CommRing.toRing.{u} R _inst_1))) (NonAssocRing.toNonAssocSemiring.{u} S (Ring.toNonAssocRing.{u} S (CommRing.toRing.{u} S _inst_2)))) f x)
+but is expected to have type
+ forall {R : Type.{u}} {S : Type.{v}}, (Nat -> R -> S) -> Nat -> (List.{u} R) -> (List.{v} S)
+Case conversion may be inaccurate. Consider using '#align CommRing.of_hom_apply [anonymous]ₓ'. -/
@[simp]
-theorem ofHom_apply {R S : Type u} [CommRing R] [CommRing S] (f : R →+* S) (x : R) :
+theorem [anonymous] {R S : Type u} [CommRing R] [CommRing S] (f : R →+* S) (x : R) :
ofHom f x = f x :=
rfl
-#align CommRing.of_hom_apply CommRingCat.ofHom_apply
+#align CommRing.of_hom_apply [anonymous]
instance : Inhabited CommRingCat :=
⟨of PUnit⟩
@@ -240,22 +306,28 @@ instance : Inhabited CommRingCat :=
instance (R : CommRingCat) : CommRing R :=
R.str
+#print CommRingCat.coe_of /-
@[simp]
theorem coe_of (R : Type u) [CommRing R] : (CommRingCat.of R : Type u) = R :=
rfl
#align CommRing.coe_of CommRingCat.coe_of
+-/
-instance hasForgetToRing : HasForget₂ CommRingCat RingCat :=
+#print CommRingCat.hasForgetToRingCat /-
+instance hasForgetToRingCat : HasForget₂ CommRingCat RingCat :=
BundledHom.forget₂ _ _
-#align CommRing.has_forget_to_Ring CommRingCat.hasForgetToRing
+#align CommRing.has_forget_to_Ring CommRingCat.hasForgetToRingCat
+-/
+#print CommRingCat.hasForgetToCommSemiRingCat /-
/-- The forgetful functor from commutative rings to (multiplicative) commutative monoids. -/
-instance hasForgetToCommSemiRing : HasForget₂ CommRingCat CommSemiRing :=
+instance hasForgetToCommSemiRingCat : HasForget₂ CommRingCat CommSemiRingCat :=
HasForget₂.mk' (fun R : CommRingCat => CommSemiRing.of R) (fun R => rfl) (fun R₁ R₂ f => f)
(by tidy)
-#align CommRing.has_forget_to_CommSemiRing CommRingCat.hasForgetToCommSemiRing
+#align CommRing.has_forget_to_CommSemiRing CommRingCat.hasForgetToCommSemiRingCat
+-/
-instance : Full (forget₂ CommRingCat CommSemiRing) where preimage X Y f := f
+instance : Full (forget₂ CommRingCat CommSemiRingCat) where preimage X Y f := f
end CommRingCat
@@ -269,28 +341,46 @@ namespace RingEquiv
variable {X Y : Type u}
+/- warning: ring_equiv.to_Ring_iso -> RingEquiv.toRingCatIso is a dubious translation:
+lean 3 declaration is
+ forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : Ring.{u1} X] [_inst_2 : Ring.{u1} Y], (RingEquiv.{u1, u1} X Y (Distrib.toHasMul.{u1} X (Ring.toDistrib.{u1} X _inst_1)) (Distrib.toHasAdd.{u1} X (Ring.toDistrib.{u1} X _inst_1)) (Distrib.toHasMul.{u1} Y (Ring.toDistrib.{u1} Y _inst_2)) (Distrib.toHasAdd.{u1} Y (Ring.toDistrib.{u1} Y _inst_2))) -> (CategoryTheory.Iso.{u1, succ u1} RingCat.{u1} RingCat.largeCategory.{u1} (RingCat.of.{u1} X _inst_1) (RingCat.of.{u1} Y _inst_2))
+but is expected to have type
+ forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : Ring.{u1} X] [_inst_2 : Ring.{u1} Y], (RingEquiv.{u1, u1} X Y (NonUnitalNonAssocRing.toMul.{u1} X (NonAssocRing.toNonUnitalNonAssocRing.{u1} X (Ring.toNonAssocRing.{u1} X _inst_1))) (NonUnitalNonAssocRing.toMul.{u1} Y (NonAssocRing.toNonUnitalNonAssocRing.{u1} Y (Ring.toNonAssocRing.{u1} Y _inst_2))) (Distrib.toAdd.{u1} X (NonUnitalNonAssocSemiring.toDistrib.{u1} X (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} X (NonAssocRing.toNonUnitalNonAssocRing.{u1} X (Ring.toNonAssocRing.{u1} X _inst_1))))) (Distrib.toAdd.{u1} Y (NonUnitalNonAssocSemiring.toDistrib.{u1} Y (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} Y (NonAssocRing.toNonUnitalNonAssocRing.{u1} Y (Ring.toNonAssocRing.{u1} Y _inst_2)))))) -> (CategoryTheory.Iso.{u1, succ u1} RingCat.{u1} instRingCatLargeCategory.{u1} (RingCat.of.{u1} X _inst_1) (RingCat.of.{u1} Y _inst_2))
+Case conversion may be inaccurate. Consider using '#align ring_equiv.to_Ring_iso RingEquiv.toRingCatIsoₓ'. -/
/-- Build an isomorphism in the category `Ring` from a `ring_equiv` between `ring`s. -/
@[simps]
-def toRingIso [Ring X] [Ring Y] (e : X ≃+* Y) : RingCat.of X ≅ RingCat.of Y
+def toRingCatIso [Ring X] [Ring Y] (e : X ≃+* Y) : RingCat.of X ≅ RingCat.of Y
where
Hom := e.toRingHom
inv := e.symm.toRingHom
-#align ring_equiv.to_Ring_iso RingEquiv.toRingIso
-
+#align ring_equiv.to_Ring_iso RingEquiv.toRingCatIso
+
+/- warning: ring_equiv.to_CommRing_iso -> RingEquiv.toCommRingCatIso is a dubious translation:
+lean 3 declaration is
+ forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : CommRing.{u1} X] [_inst_2 : CommRing.{u1} Y], (RingEquiv.{u1, u1} X Y (Distrib.toHasMul.{u1} X (Ring.toDistrib.{u1} X (CommRing.toRing.{u1} X _inst_1))) (Distrib.toHasAdd.{u1} X (Ring.toDistrib.{u1} X (CommRing.toRing.{u1} X _inst_1))) (Distrib.toHasMul.{u1} Y (Ring.toDistrib.{u1} Y (CommRing.toRing.{u1} Y _inst_2))) (Distrib.toHasAdd.{u1} Y (Ring.toDistrib.{u1} Y (CommRing.toRing.{u1} Y _inst_2)))) -> (CategoryTheory.Iso.{u1, succ u1} CommRingCat.{u1} CommRingCat.largeCategory.{u1} (CommRingCat.of.{u1} X _inst_1) (CommRingCat.of.{u1} Y _inst_2))
+but is expected to have type
+ forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : CommRing.{u1} X] [_inst_2 : CommRing.{u1} Y], (RingEquiv.{u1, u1} X Y (NonUnitalNonAssocRing.toMul.{u1} X (NonAssocRing.toNonUnitalNonAssocRing.{u1} X (Ring.toNonAssocRing.{u1} X (CommRing.toRing.{u1} X _inst_1)))) (NonUnitalNonAssocRing.toMul.{u1} Y (NonAssocRing.toNonUnitalNonAssocRing.{u1} Y (Ring.toNonAssocRing.{u1} Y (CommRing.toRing.{u1} Y _inst_2)))) (Distrib.toAdd.{u1} X (NonUnitalNonAssocSemiring.toDistrib.{u1} X (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} X (NonAssocRing.toNonUnitalNonAssocRing.{u1} X (Ring.toNonAssocRing.{u1} X (CommRing.toRing.{u1} X _inst_1)))))) (Distrib.toAdd.{u1} Y (NonUnitalNonAssocSemiring.toDistrib.{u1} Y (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} Y (NonAssocRing.toNonUnitalNonAssocRing.{u1} Y (Ring.toNonAssocRing.{u1} Y (CommRing.toRing.{u1} Y _inst_2))))))) -> (CategoryTheory.Iso.{u1, succ u1} CommRingCat.{u1} instCommRingCatLargeCategory.{u1} (CommRingCat.of.{u1} X _inst_1) (CommRingCat.of.{u1} Y _inst_2))
+Case conversion may be inaccurate. Consider using '#align ring_equiv.to_CommRing_iso RingEquiv.toCommRingCatIsoₓ'. -/
/-- Build an isomorphism in the category `CommRing` from a `ring_equiv` between `comm_ring`s. -/
@[simps]
-def toCommRingIso [CommRing X] [CommRing Y] (e : X ≃+* Y) : CommRingCat.of X ≅ CommRingCat.of Y
+def toCommRingCatIso [CommRing X] [CommRing Y] (e : X ≃+* Y) : CommRingCat.of X ≅ CommRingCat.of Y
where
Hom := e.toRingHom
inv := e.symm.toRingHom
-#align ring_equiv.to_CommRing_iso RingEquiv.toCommRingIso
+#align ring_equiv.to_CommRing_iso RingEquiv.toCommRingCatIso
end RingEquiv
namespace CategoryTheory.Iso
+/- warning: category_theory.iso.Ring_iso_to_ring_equiv -> CategoryTheory.Iso.ringCatIsoToRingEquiv is a dubious translation:
+lean 3 declaration is
+ forall {X : RingCat.{u1}} {Y : RingCat.{u1}}, (CategoryTheory.Iso.{u1, succ u1} RingCat.{u1} RingCat.largeCategory.{u1} X Y) -> (RingEquiv.{u1, u1} (coeSort.{succ (succ u1), succ (succ u1)} RingCat.{u1} Type.{u1} RingCat.hasCoeToSort.{u1} X) (coeSort.{succ (succ u1), succ (succ u1)} RingCat.{u1} Type.{u1} RingCat.hasCoeToSort.{u1} Y) (Distrib.toHasMul.{u1} (coeSort.{succ (succ u1), succ (succ u1)} RingCat.{u1} Type.{u1} RingCat.hasCoeToSort.{u1} X) (Ring.toDistrib.{u1} (coeSort.{succ (succ u1), succ (succ u1)} RingCat.{u1} Type.{u1} RingCat.hasCoeToSort.{u1} X) (RingCat.ring.{u1} X))) (Distrib.toHasAdd.{u1} (coeSort.{succ (succ u1), succ (succ u1)} RingCat.{u1} Type.{u1} RingCat.hasCoeToSort.{u1} X) (Ring.toDistrib.{u1} (coeSort.{succ (succ u1), succ (succ u1)} RingCat.{u1} Type.{u1} RingCat.hasCoeToSort.{u1} X) (RingCat.ring.{u1} X))) (Distrib.toHasMul.{u1} (coeSort.{succ (succ u1), succ (succ u1)} RingCat.{u1} Type.{u1} RingCat.hasCoeToSort.{u1} Y) (Ring.toDistrib.{u1} (coeSort.{succ (succ u1), succ (succ u1)} RingCat.{u1} Type.{u1} RingCat.hasCoeToSort.{u1} Y) (RingCat.ring.{u1} Y))) (Distrib.toHasAdd.{u1} (coeSort.{succ (succ u1), succ (succ u1)} RingCat.{u1} Type.{u1} RingCat.hasCoeToSort.{u1} Y) (Ring.toDistrib.{u1} (coeSort.{succ (succ u1), succ (succ u1)} RingCat.{u1} Type.{u1} RingCat.hasCoeToSort.{u1} Y) (RingCat.ring.{u1} Y))))
+but is expected to have type
+ forall {X : RingCat.{u1}} {Y : RingCat.{u1}}, (CategoryTheory.Iso.{u1, succ u1} RingCat.{u1} instRingCatLargeCategory.{u1} X Y) -> (RingEquiv.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} X) (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} Y) (NonUnitalNonAssocRing.toMul.{u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} X) (NonAssocRing.toNonUnitalNonAssocRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} X) (Ring.toNonAssocRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} X) (RingCat.instRingα_1.{u1} X)))) (NonUnitalNonAssocRing.toMul.{u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} Y) (NonAssocRing.toNonUnitalNonAssocRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} Y) (Ring.toNonAssocRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} Y) (RingCat.instRingα_1.{u1} Y)))) (Distrib.toAdd.{u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} X) (NonUnitalNonAssocSemiring.toDistrib.{u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} X) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} X) (NonAssocRing.toNonUnitalNonAssocRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} X) (Ring.toNonAssocRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} X) (RingCat.instRingα_1.{u1} X)))))) (Distrib.toAdd.{u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} Y) (NonUnitalNonAssocSemiring.toDistrib.{u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} Y) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} Y) (NonAssocRing.toNonUnitalNonAssocRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} Y) (Ring.toNonAssocRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} Ring.{u1} Y) (RingCat.instRingα_1.{u1} Y)))))))
+Case conversion may be inaccurate. Consider using '#align category_theory.iso.Ring_iso_to_ring_equiv CategoryTheory.Iso.ringCatIsoToRingEquivₓ'. -/
/-- Build a `ring_equiv` from an isomorphism in the category `Ring`. -/
-def ringIsoToRingEquiv {X Y : RingCat} (i : X ≅ Y) : X ≃+* Y
+def ringCatIsoToRingEquiv {X Y : RingCat} (i : X ≅ Y) : X ≃+* Y
where
toFun := i.Hom
invFun := i.inv
@@ -298,10 +388,16 @@ def ringIsoToRingEquiv {X Y : RingCat} (i : X ≅ Y) : X ≃+* Y
right_inv := by tidy
map_add' := by tidy
map_mul' := by tidy
-#align category_theory.iso.Ring_iso_to_ring_equiv CategoryTheory.Iso.ringIsoToRingEquiv
-
+#align category_theory.iso.Ring_iso_to_ring_equiv CategoryTheory.Iso.ringCatIsoToRingEquiv
+
+/- warning: category_theory.iso.CommRing_iso_to_ring_equiv -> CategoryTheory.Iso.commRingCatIsoToRingEquiv is a dubious translation:
+lean 3 declaration is
+ forall {X : CommRingCat.{u1}} {Y : CommRingCat.{u1}}, (CategoryTheory.Iso.{u1, succ u1} CommRingCat.{u1} CommRingCat.largeCategory.{u1} X Y) -> (RingEquiv.{u1, u1} (coeSort.{succ (succ u1), succ (succ u1)} CommRingCat.{u1} Type.{u1} CommRingCat.hasCoeToSort.{u1} X) (coeSort.{succ (succ u1), succ (succ u1)} CommRingCat.{u1} Type.{u1} CommRingCat.hasCoeToSort.{u1} Y) (Distrib.toHasMul.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommRingCat.{u1} Type.{u1} CommRingCat.hasCoeToSort.{u1} X) (Ring.toDistrib.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommRingCat.{u1} Type.{u1} CommRingCat.hasCoeToSort.{u1} X) (CommRing.toRing.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommRingCat.{u1} Type.{u1} CommRingCat.hasCoeToSort.{u1} X) (CommRingCat.commRing.{u1} X)))) (Distrib.toHasAdd.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommRingCat.{u1} Type.{u1} CommRingCat.hasCoeToSort.{u1} X) (Ring.toDistrib.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommRingCat.{u1} Type.{u1} CommRingCat.hasCoeToSort.{u1} X) (CommRing.toRing.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommRingCat.{u1} Type.{u1} CommRingCat.hasCoeToSort.{u1} X) (CommRingCat.commRing.{u1} X)))) (Distrib.toHasMul.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommRingCat.{u1} Type.{u1} CommRingCat.hasCoeToSort.{u1} Y) (Ring.toDistrib.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommRingCat.{u1} Type.{u1} CommRingCat.hasCoeToSort.{u1} Y) (CommRing.toRing.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommRingCat.{u1} Type.{u1} CommRingCat.hasCoeToSort.{u1} Y) (CommRingCat.commRing.{u1} Y)))) (Distrib.toHasAdd.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommRingCat.{u1} Type.{u1} CommRingCat.hasCoeToSort.{u1} Y) (Ring.toDistrib.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommRingCat.{u1} Type.{u1} CommRingCat.hasCoeToSort.{u1} Y) (CommRing.toRing.{u1} (coeSort.{succ (succ u1), succ (succ u1)} CommRingCat.{u1} Type.{u1} CommRingCat.hasCoeToSort.{u1} Y) (CommRingCat.commRing.{u1} Y)))))
+but is expected to have type
+ forall {X : CommRingCat.{u1}} {Y : CommRingCat.{u1}}, (CategoryTheory.Iso.{u1, succ u1} CommRingCat.{u1} instCommRingCatLargeCategory.{u1} X Y) -> (RingEquiv.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} X) (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} Y) (NonUnitalNonAssocRing.toMul.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} X) (NonAssocRing.toNonUnitalNonAssocRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} X) (Ring.toNonAssocRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} X) (CommRing.toRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} X) (CommRingCat.instCommRingα_1.{u1} X))))) (NonUnitalNonAssocRing.toMul.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} Y) (NonAssocRing.toNonUnitalNonAssocRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} Y) (Ring.toNonAssocRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} Y) (CommRing.toRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} Y) (CommRingCat.instCommRingα_1.{u1} Y))))) (Distrib.toAdd.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} X) (NonUnitalNonAssocSemiring.toDistrib.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} X) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} X) (NonAssocRing.toNonUnitalNonAssocRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} X) (Ring.toNonAssocRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} X) (CommRing.toRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} X) (CommRingCat.instCommRingα_1.{u1} X))))))) (Distrib.toAdd.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} Y) (NonUnitalNonAssocSemiring.toDistrib.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} Y) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} Y) (NonAssocRing.toNonUnitalNonAssocRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} Y) (Ring.toNonAssocRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} Y) (CommRing.toRing.{u1} (CategoryTheory.Bundled.α.{u1, u1} CommRing.{u1} Y) (CommRingCat.instCommRingα_1.{u1} Y))))))))
+Case conversion may be inaccurate. Consider using '#align category_theory.iso.CommRing_iso_to_ring_equiv CategoryTheory.Iso.commRingCatIsoToRingEquivₓ'. -/
/-- Build a `ring_equiv` from an isomorphism in the category `CommRing`. -/
-def commRingIsoToRingEquiv {X Y : CommRingCat} (i : X ≅ Y) : X ≃+* Y
+def commRingCatIsoToRingEquiv {X Y : CommRingCat} (i : X ≅ Y) : X ≃+* Y
where
toFun := i.Hom
invFun := i.inv
@@ -309,42 +405,59 @@ def commRingIsoToRingEquiv {X Y : CommRingCat} (i : X ≅ Y) : X ≃+* Y
right_inv := by tidy
map_add' := by tidy
map_mul' := by tidy
-#align category_theory.iso.CommRing_iso_to_ring_equiv CategoryTheory.Iso.commRingIsoToRingEquiv
+#align category_theory.iso.CommRing_iso_to_ring_equiv CategoryTheory.Iso.commRingCatIsoToRingEquiv
+#print CategoryTheory.Iso.commRingIsoToRingEquiv_toRingHom /-
@[simp]
theorem commRingIsoToRingEquiv_toRingHom {X Y : CommRingCat} (i : X ≅ Y) :
- i.commRingIsoToRingEquiv.toRingHom = i.Hom :=
+ i.commRingCatIsoToRingEquiv.toRingHom = i.Hom :=
by
ext
rfl
#align category_theory.iso.CommRing_iso_to_ring_equiv_to_ring_hom CategoryTheory.Iso.commRingIsoToRingEquiv_toRingHom
+-/
+#print CategoryTheory.Iso.commRingIsoToRingEquiv_symm_toRingHom /-
@[simp]
theorem commRingIsoToRingEquiv_symm_toRingHom {X Y : CommRingCat} (i : X ≅ Y) :
- i.commRingIsoToRingEquiv.symm.toRingHom = i.inv :=
+ i.commRingCatIsoToRingEquiv.symm.toRingHom = i.inv :=
by
ext
rfl
#align category_theory.iso.CommRing_iso_to_ring_equiv_symm_to_ring_hom CategoryTheory.Iso.commRingIsoToRingEquiv_symm_toRingHom
+-/
end CategoryTheory.Iso
+/- warning: ring_equiv_iso_Ring_iso -> ringEquivIsoRingIso is a dubious translation:
+lean 3 declaration is
+ forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : Ring.{u1} X] [_inst_2 : Ring.{u1} Y], CategoryTheory.Iso.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1} (RingEquiv.{u1, u1} X Y (Distrib.toHasMul.{u1} X (Ring.toDistrib.{u1} X _inst_1)) (Distrib.toHasAdd.{u1} X (Ring.toDistrib.{u1} X _inst_1)) (Distrib.toHasMul.{u1} Y (Ring.toDistrib.{u1} Y _inst_2)) (Distrib.toHasAdd.{u1} Y (Ring.toDistrib.{u1} Y _inst_2))) (CategoryTheory.Iso.{u1, succ u1} RingCat.{u1} RingCat.largeCategory.{u1} (RingCat.of.{u1} X _inst_1) (RingCat.of.{u1} Y _inst_2))
+but is expected to have type
+ forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : Ring.{u1} X] [_inst_2 : Ring.{u1} Y], CategoryTheory.Iso.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1} (RingEquiv.{u1, u1} X Y (NonUnitalNonAssocRing.toMul.{u1} X (NonAssocRing.toNonUnitalNonAssocRing.{u1} X (Ring.toNonAssocRing.{u1} X _inst_1))) (NonUnitalNonAssocRing.toMul.{u1} Y (NonAssocRing.toNonUnitalNonAssocRing.{u1} Y (Ring.toNonAssocRing.{u1} Y _inst_2))) (Distrib.toAdd.{u1} X (NonUnitalNonAssocSemiring.toDistrib.{u1} X (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} X (NonAssocRing.toNonUnitalNonAssocRing.{u1} X (Ring.toNonAssocRing.{u1} X _inst_1))))) (Distrib.toAdd.{u1} Y (NonUnitalNonAssocSemiring.toDistrib.{u1} Y (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} Y (NonAssocRing.toNonUnitalNonAssocRing.{u1} Y (Ring.toNonAssocRing.{u1} Y _inst_2)))))) (CategoryTheory.Iso.{u1, succ u1} RingCat.{u1} instRingCatLargeCategory.{u1} (RingCat.of.{u1} X _inst_1) (RingCat.of.{u1} Y _inst_2))
+Case conversion may be inaccurate. Consider using '#align ring_equiv_iso_Ring_iso ringEquivIsoRingIsoₓ'. -/
/-- Ring equivalences between `ring`s are the same as (isomorphic to) isomorphisms in `Ring`. -/
def ringEquivIsoRingIso {X Y : Type u} [Ring X] [Ring Y] : X ≃+* Y ≅ RingCat.of X ≅ RingCat.of Y
where
- Hom e := e.toRingIso
- inv i := i.ringIsoToRingEquiv
+ Hom e := e.toRingCatIso
+ inv i := i.ringCatIsoToRingEquiv
#align ring_equiv_iso_Ring_iso ringEquivIsoRingIso
+/- warning: ring_equiv_iso_CommRing_iso -> ringEquivIsoCommRingIso is a dubious translation:
+lean 3 declaration is
+ forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : CommRing.{u1} X] [_inst_2 : CommRing.{u1} Y], CategoryTheory.Iso.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1} (RingEquiv.{u1, u1} X Y (Distrib.toHasMul.{u1} X (Ring.toDistrib.{u1} X (CommRing.toRing.{u1} X _inst_1))) (Distrib.toHasAdd.{u1} X (Ring.toDistrib.{u1} X (CommRing.toRing.{u1} X _inst_1))) (Distrib.toHasMul.{u1} Y (Ring.toDistrib.{u1} Y (CommRing.toRing.{u1} Y _inst_2))) (Distrib.toHasAdd.{u1} Y (Ring.toDistrib.{u1} Y (CommRing.toRing.{u1} Y _inst_2)))) (CategoryTheory.Iso.{u1, succ u1} CommRingCat.{u1} CommRingCat.largeCategory.{u1} (CommRingCat.of.{u1} X _inst_1) (CommRingCat.of.{u1} Y _inst_2))
+but is expected to have type
+ forall {X : Type.{u1}} {Y : Type.{u1}} [_inst_1 : CommRing.{u1} X] [_inst_2 : CommRing.{u1} Y], CategoryTheory.Iso.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1} (RingEquiv.{u1, u1} X Y (NonUnitalNonAssocRing.toMul.{u1} X (NonAssocRing.toNonUnitalNonAssocRing.{u1} X (Ring.toNonAssocRing.{u1} X (CommRing.toRing.{u1} X _inst_1)))) (NonUnitalNonAssocRing.toMul.{u1} Y (NonAssocRing.toNonUnitalNonAssocRing.{u1} Y (Ring.toNonAssocRing.{u1} Y (CommRing.toRing.{u1} Y _inst_2)))) (Distrib.toAdd.{u1} X (NonUnitalNonAssocSemiring.toDistrib.{u1} X (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} X (NonAssocRing.toNonUnitalNonAssocRing.{u1} X (Ring.toNonAssocRing.{u1} X (CommRing.toRing.{u1} X _inst_1)))))) (Distrib.toAdd.{u1} Y (NonUnitalNonAssocSemiring.toDistrib.{u1} Y (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} Y (NonAssocRing.toNonUnitalNonAssocRing.{u1} Y (Ring.toNonAssocRing.{u1} Y (CommRing.toRing.{u1} Y _inst_2))))))) (CategoryTheory.Iso.{u1, succ u1} CommRingCat.{u1} instCommRingCatLargeCategory.{u1} (CommRingCat.of.{u1} X _inst_1) (CommRingCat.of.{u1} Y _inst_2))
+Case conversion may be inaccurate. Consider using '#align ring_equiv_iso_CommRing_iso ringEquivIsoCommRingIsoₓ'. -/
/-- Ring equivalences between `comm_ring`s are the same as (isomorphic to) isomorphisms
in `CommRing`. -/
def ringEquivIsoCommRingIso {X Y : Type u} [CommRing X] [CommRing Y] :
X ≃+* Y ≅ CommRingCat.of X ≅ CommRingCat.of Y
where
- Hom e := e.toCommRingIso
- inv i := i.commRingIsoToRingEquiv
+ Hom e := e.toCommRingCatIso
+ inv i := i.commRingCatIsoToRingEquiv
#align ring_equiv_iso_CommRing_iso ringEquivIsoCommRingIso
+#print RingCat.forget_reflects_isos /-
instance RingCat.forget_reflects_isos : ReflectsIsomorphisms (forget RingCat.{u})
where reflects X Y f _ := by
skip
@@ -352,7 +465,9 @@ instance RingCat.forget_reflects_isos : ReflectsIsomorphisms (forget RingCat.{u}
let e : X ≃+* Y := { f, i.to_equiv with }
exact ⟨(is_iso.of_iso e.to_Ring_iso).1⟩
#align Ring.forget_reflects_isos RingCat.forget_reflects_isos
+-/
+#print CommRingCat.forget_reflects_isos /-
instance CommRingCat.forget_reflects_isos : ReflectsIsomorphisms (forget CommRingCat.{u})
where reflects X Y f _ := by
skip
@@ -360,16 +475,21 @@ instance CommRingCat.forget_reflects_isos : ReflectsIsomorphisms (forget CommRin
let e : X ≃+* Y := { f, i.to_equiv with }
exact ⟨(is_iso.of_iso e.to_CommRing_iso).1⟩
#align CommRing.forget_reflects_isos CommRingCat.forget_reflects_isos
+-/
+#print CommRingCat.comp_eq_ring_hom_comp /-
theorem CommRingCat.comp_eq_ring_hom_comp {R S T : CommRingCat} (f : R ⟶ S) (g : S ⟶ T) :
f ≫ g = g.comp f :=
rfl
#align CommRing.comp_eq_ring_hom_comp CommRingCat.comp_eq_ring_hom_comp
+-/
+#print CommRingCat.ringHom_comp_eq_comp /-
theorem CommRingCat.ringHom_comp_eq_comp {R S T : Type _} [CommRing R] [CommRing S] [CommRing T]
(f : R →+* S) (g : S →+* T) : g.comp f = CommRingCat.ofHom f ≫ CommRingCat.ofHom g :=
rfl
#align CommRing.ring_hom_comp_eq_comp CommRingCat.ringHom_comp_eq_comp
+-/
-- It would be nice if we could have the following,
-- but it requires making `reflects_isomorphisms_forget₂` an instance,
mathlib commit https://github.com/leanprover-community/mathlib/commit/290a7ba01fbcab1b64757bdaa270d28f4dcede35
@@ -80,15 +80,15 @@ theorem coe_of (R : Type u) [Semiring R] : (SemiRing.of R : Type u) = R :=
rfl
#align SemiRing.coe_of SemiRing.coe_of
-instance hasForgetToMon : HasForget₂ SemiRing Mon :=
+instance hasForgetToMon : HasForget₂ SemiRing MonCat :=
BundledHom.mkHasForget₂ (fun R hR => @MonoidWithZero.toMonoid R (@Semiring.toMonoidWithZero R hR))
(fun R₁ R₂ => RingHom.toMonoidHom) fun _ _ _ => rfl
#align SemiRing.has_forget_to_Mon SemiRing.hasForgetToMon
-instance hasForgetToAddCommMon : HasForget₂ SemiRing AddCommMon
+instance hasForgetToAddCommMon : HasForget₂ SemiRing AddCommMonCat
where-- can't use bundled_hom.mk_has_forget₂, since AddCommMon is an induced category
forget₂ :=
- { obj := fun R => AddCommMon.of R
+ { obj := fun R => AddCommMonCat.of R
map := fun R₁ R₂ f => RingHom.toAddMonoidHom f }
#align SemiRing.has_forget_to_AddCommMon SemiRing.hasForgetToAddCommMon
@@ -196,8 +196,8 @@ instance hasForgetToSemiRing : HasForget₂ CommSemiRing SemiRing :=
#align CommSemiRing.has_forget_to_SemiRing CommSemiRing.hasForgetToSemiRing
/-- The forgetful functor from commutative rings to (multiplicative) commutative monoids. -/
-instance hasForgetToCommMon : HasForget₂ CommSemiRing CommMon :=
- HasForget₂.mk' (fun R : CommSemiRing => CommMon.of R) (fun R => rfl)
+instance hasForgetToCommMon : HasForget₂ CommSemiRing CommMonCat :=
+ HasForget₂.mk' (fun R : CommSemiRing => CommMonCat.of R) (fun R => rfl)
(fun R₁ R₂ f => f.toMonoidHom) (by tidy)
#align CommSemiRing.has_forget_to_CommMon CommSemiRing.hasForgetToCommMon
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
Functor.Full
a Prop (#12449)
Before this PR, Functor.Full
contained the data of the preimage of maps by a full functor F
. This PR makes Functor.Full
a proposition. This is to prevent any diamond to appear.
The lemma Functor.image_preimage
is also renamed Functor.map_preimage
.
Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>
@@ -488,7 +488,7 @@ instance hasForgetToCommSemiRingCat : HasForget₂ CommRingCat CommSemiRingCat :
set_option linter.uppercaseLean3 false in
#align CommRing.has_forget_to_CommSemiRing CommRingCat.hasForgetToCommSemiRingCat
-instance : (forget₂ CommRingCat CommSemiRingCat).Full where preimage {X Y} f := f
+instance : (forget₂ CommRingCat CommSemiRingCat).Full where map_surjective f := ⟨f, rfl⟩
end CommRingCat
@@ -134,12 +134,11 @@ theorem ofHom_apply {R S : Type u} [Semiring R] [Semiring S] (f : R →+* S) (x
set_option linter.uppercaseLean3 false in
#align SemiRing.of_hom_apply SemiRingCat.ofHom_apply
-set_option autoImplicit true in
/--
Ring equivalence are isomorphisms in category of semirings
-/
@[simps]
-def _root_.RingEquiv.toSemiRingCatIso [Semiring X] [Semiring Y] (e : X ≃+* Y) :
+def _root_.RingEquiv.toSemiRingCatIso {X Y : Type u} [Semiring X] [Semiring Y] (e : X ≃+* Y) :
SemiRingCat.of X ≅ SemiRingCat.of Y where
hom := e.toRingHom
inv := e.symm.toRingHom
@@ -355,13 +354,12 @@ instance hasForgetToCommMonCat : HasForget₂ CommSemiRingCat CommMonCat :=
set_option linter.uppercaseLean3 false in
#align CommSemiRing.has_forget_to_CommMon CommSemiRingCat.hasForgetToCommMonCat
-set_option autoImplicit true in
/--
Ring equivalence are isomorphisms in category of commutative semirings
-/
@[simps]
-def _root_.RingEquiv.toCommSemiRingCatIso [CommSemiring X] [CommSemiring Y] (e : X ≃+* Y) :
- CommSemiRingCat.of X ≅ CommSemiRingCat.of Y where
+def _root_.RingEquiv.toCommSemiRingCatIso {X Y : Type u} [CommSemiring X] [CommSemiring Y]
+ (e : X ≃+* Y) : CommSemiRingCat.of X ≅ CommSemiRingCat.of Y where
hom := e.toRingHom
inv := e.symm.toRingHom
These notions on functors are now Functor.Full
, Functor.Faithful
, Functor.EssSurj
, Functor.IsEquivalence
, Functor.ReflectsIsomorphisms
. Deprecated aliases are introduced for the previous names.
@@ -144,7 +144,7 @@ def _root_.RingEquiv.toSemiRingCatIso [Semiring X] [Semiring Y] (e : X ≃+* Y)
hom := e.toRingHom
inv := e.symm.toRingHom
-instance forgetReflectIsos : ReflectsIsomorphisms (forget SemiRingCat) where
+instance forgetReflectIsos : (forget SemiRingCat).ReflectsIsomorphisms where
reflects {X Y} f _ := by
let i := asIso ((forget SemiRingCat).map f)
let ff : X →+* Y := f
@@ -365,7 +365,7 @@ def _root_.RingEquiv.toCommSemiRingCatIso [CommSemiring X] [CommSemiring Y] (e :
hom := e.toRingHom
inv := e.symm.toRingHom
-instance forgetReflectIsos : ReflectsIsomorphisms (forget CommSemiRingCat) where
+instance forgetReflectIsos : (forget CommSemiRingCat).ReflectsIsomorphisms where
reflects {X Y} f _ := by
let i := asIso ((forget CommSemiRingCat).map f)
let ff : X →+* Y := f
@@ -490,7 +490,7 @@ instance hasForgetToCommSemiRingCat : HasForget₂ CommRingCat CommSemiRingCat :
set_option linter.uppercaseLean3 false in
#align CommRing.has_forget_to_CommSemiRing CommRingCat.hasForgetToCommSemiRingCat
-instance : Full (forget₂ CommRingCat CommSemiRingCat) where preimage {X Y} f := f
+instance : (forget₂ CommRingCat CommSemiRingCat).Full where preimage {X Y} f := f
end CommRingCat
@@ -574,7 +574,7 @@ def ringEquivIsoCommRingIso {X Y : Type u} [CommRing X] [CommRing Y] :
set_option linter.uppercaseLean3 false in
#align ring_equiv_iso_CommRing_iso ringEquivIsoCommRingIso
-instance RingCat.forget_reflects_isos : ReflectsIsomorphisms (forget RingCat.{u}) where
+instance RingCat.forget_reflects_isos : (forget RingCat.{u}).ReflectsIsomorphisms where
reflects {X Y} f _ := by
let i := asIso ((forget RingCat).map f)
let ff : X →+* Y := f
@@ -583,7 +583,7 @@ instance RingCat.forget_reflects_isos : ReflectsIsomorphisms (forget RingCat.{u}
set_option linter.uppercaseLean3 false in
#align Ring.forget_reflects_isos RingCat.forget_reflects_isos
-instance CommRingCat.forget_reflects_isos : ReflectsIsomorphisms (forget CommRingCat.{u}) where
+instance CommRingCat.forget_reflects_isos : (forget CommRingCat.{u}).ReflectsIsomorphisms where
reflects {X Y} f _ := by
let i := asIso ((forget CommRingCat).map f)
let ff : X →+* Y := f
@@ -610,4 +610,4 @@ set_option linter.uppercaseLean3 false in
-- Porting note: This was the case in mathlib3, perhaps it is different now?
attribute [local instance] reflectsIsomorphisms_forget₂
-example : ReflectsIsomorphisms (forget₂ RingCat AddCommGroupCat) := by infer_instance
+example : (forget₂ RingCat AddCommGroupCat).ReflectsIsomorphisms := by infer_instance
SemiRingCat
and RingCat
reducible (#11595)
Since both SemiRingCat
and RingCat
are wrappers around a structure instance, there should be no advantage to making default
transparency.
@@ -25,7 +25,7 @@ universe u v
open CategoryTheory
/-- The category of semirings. -/
-def SemiRingCat : Type (u + 1) :=
+abbrev SemiRingCat : Type (u + 1) :=
Bundled Semiring
set_option linter.uppercaseLean3 false in
#align SemiRing SemiRingCat
@@ -51,31 +51,17 @@ instance bundledHom : BundledHom AssocRingHom where
set_option linter.uppercaseLean3 false in
#align SemiRing.bundled_hom SemiRingCat.bundledHom
-deriving instance LargeCategory for SemiRingCat
-
-- Porting note: deriving fails for ConcreteCategory, adding instance manually.
--deriving instance LargeCategory, ConcreteCategory for SemiRingCat
-- see https://github.com/leanprover-community/mathlib4/issues/5020
-instance : ConcreteCategory SemiRingCat := by
- dsimp [SemiRingCat]
- infer_instance
-
-instance : CoeSort SemiRingCat (Type*) where
- coe X := X.α
-
-- Porting note: Hinting to Lean that `forget R` and `R` are the same
unif_hint forget_obj_eq_coe (R : SemiRingCat) where ⊢
(forget SemiRingCat).obj R ≟ R
instance instSemiring (X : SemiRingCat) : Semiring X := X.str
-instance instSemiring' (X : SemiRingCat) : Semiring <| (forget SemiRingCat).obj X := X.str
-
instance instFunLike {X Y : SemiRingCat} : FunLike (X ⟶ Y) X Y :=
- -- Note: this is apparently _not_ defeq to RingHom.instFunLike with reducible and instance
- -- transparency. It seems that `(CategoryTheory.forget SemiRingCat).toPrefunctor` is not
- -- unfolding during unification
ConcreteCategory.instFunLike
-- Porting note (#10754): added instance
@@ -168,7 +154,7 @@ instance forgetReflectIsos : ReflectsIsomorphisms (forget SemiRingCat) where
end SemiRingCat
/-- The category of rings. -/
-def RingCat : Type (u + 1) :=
+abbrev RingCat : Type (u + 1) :=
Bundled Ring
set_option linter.uppercaseLean3 false in
#align Ring RingCat
@@ -181,14 +167,6 @@ instance : BundledHom.ParentProjection @Ring.toSemiring :=
-- Porting note: Another place where mathlib had derived a concrete category
-- but this does not work here, so we add the instance manually.
-- see https://github.com/leanprover-community/mathlib4/issues/5020
-deriving instance LargeCategory for RingCat
-
-instance : ConcreteCategory RingCat := by
- dsimp [RingCat]
- infer_instance
-
-instance : CoeSort RingCat (Type*) where
- coe X := X.α
instance (X : RingCat) : Ring X := X.str
@@ -198,8 +176,6 @@ unif_hint forget_obj_eq_coe (R : RingCat) where ⊢
instance instRing (X : RingCat) : Ring X := X.str
-instance instRing' (X : RingCat) : Ring <| (forget RingCat).obj X := X.str
-
instance instFunLike {X Y : RingCat} : FunLike (X ⟶ Y) X Y :=
-- Note: this is apparently _not_ defeq to RingHom.instFunLike with reducible transparency
ConcreteCategory.instFunLike
... or reduce its scope (the full removal is not as obvious).
@@ -20,9 +20,6 @@ We introduce the bundled categories:
along with the relevant forgetful functors between them.
-/
-set_option autoImplicit true
-
-
universe u v
open CategoryTheory
@@ -92,7 +89,8 @@ lemma coe_id {X : SemiRingCat} : (𝟙 X : X → X) = id := rfl
lemma coe_comp {X Y Z : SemiRingCat} {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g : X → Z) = g ∘ f := rfl
-- porting note (#10756): added lemma
-@[simp] lemma forget_map (f : X ⟶ Y) : (forget SemiRingCat).map f = (f : X → Y) := rfl
+@[simp] lemma forget_map {X Y : SemiRingCat} (f : X ⟶ Y) :
+ (forget SemiRingCat).map f = (f : X → Y) := rfl
lemma ext {X Y : SemiRingCat} {f g : X ⟶ Y} (w : ∀ x : X, f x = g x) : f = g :=
RingHom.ext w
@@ -150,6 +148,7 @@ theorem ofHom_apply {R S : Type u} [Semiring R] [Semiring S] (f : R →+* S) (x
set_option linter.uppercaseLean3 false in
#align SemiRing.of_hom_apply SemiRingCat.ofHom_apply
+set_option autoImplicit true in
/--
Ring equivalence are isomorphisms in category of semirings
-/
@@ -216,7 +215,7 @@ lemma coe_id {X : RingCat} : (𝟙 X : X → X) = id := rfl
lemma coe_comp {X Y Z : RingCat} {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g : X → Z) = g ∘ f := rfl
-- porting note (#10756): added lemma
-@[simp] lemma forget_map (f : X ⟶ Y) : (forget RingCat).map f = (f : X → Y) := rfl
+@[simp] lemma forget_map {X Y : RingCat} (f : X ⟶ Y) : (forget RingCat).map f = (f : X → Y) := rfl
lemma ext {X Y : RingCat} {f g : X ⟶ Y} (w : ∀ x : X, f x = g x) : f = g :=
RingHom.ext w
@@ -322,7 +321,8 @@ lemma coe_id {X : CommSemiRingCat} : (𝟙 X : X → X) = id := rfl
lemma coe_comp {X Y Z : CommSemiRingCat} {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g : X → Z) = g ∘ f := rfl
-- porting note (#10756): added lemma
-@[simp] lemma forget_map (f : X ⟶ Y) : (forget CommSemiRingCat).map f = (f : X → Y) := rfl
+@[simp] lemma forget_map {X Y : CommSemiRingCat} (f : X ⟶ Y) :
+ (forget CommSemiRingCat).map f = (f : X → Y) := rfl
lemma ext {X Y : CommSemiRingCat} {f g : X ⟶ Y} (w : ∀ x : X, f x = g x) : f = g :=
RingHom.ext w
@@ -379,6 +379,7 @@ instance hasForgetToCommMonCat : HasForget₂ CommSemiRingCat CommMonCat :=
set_option linter.uppercaseLean3 false in
#align CommSemiRing.has_forget_to_CommMon CommSemiRingCat.hasForgetToCommMonCat
+set_option autoImplicit true in
/--
Ring equivalence are isomorphisms in category of commutative semirings
-/
@@ -442,7 +443,8 @@ lemma coe_id {X : CommRingCat} : (𝟙 X : X → X) = id := rfl
lemma coe_comp {X Y Z : CommRingCat} {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g : X → Z) = g ∘ f := rfl
-- porting note (#10756): added lemma
-@[simp] lemma forget_map (f : X ⟶ Y) : (forget CommRingCat).map f = (f : X → Y) := rfl
+@[simp] lemma forget_map {X Y : CommRingCat} (f : X ⟶ Y) :
+ (forget CommRingCat).map f = (f : X → Y) := rfl
lemma ext {X Y : CommRingCat} {f g : X ⟶ Y} (w : ∀ x : X, f x = g x) : f = g :=
RingHom.ext w
Homogenises porting notes via capitalisation and addition of whitespace.
It makes the following changes:
@@ -56,7 +56,7 @@ set_option linter.uppercaseLean3 false in
deriving instance LargeCategory for SemiRingCat
---Porting note: deriving fails for ConcreteCategory, adding instance manually.
+-- Porting note: deriving fails for ConcreteCategory, adding instance manually.
--deriving instance LargeCategory, ConcreteCategory for SemiRingCat
-- see https://github.com/leanprover-community/mathlib4/issues/5020
In this pull request, I have systematically eliminated the leading whitespace preceding the colon (:
) within all unlabelled or unclassified porting notes. This adjustment facilitates a more efficient review process for the remaining notes by ensuring no entries are overlooked due to formatting inconsistencies.
@@ -67,7 +67,7 @@ instance : ConcreteCategory SemiRingCat := by
instance : CoeSort SemiRingCat (Type*) where
coe X := X.α
--- Porting note : Hinting to Lean that `forget R` and `R` are the same
+-- Porting note: Hinting to Lean that `forget R` and `R` are the same
unif_hint forget_obj_eq_coe (R : SemiRingCat) where ⊢
(forget SemiRingCat).obj R ≟ R
@@ -193,7 +193,7 @@ instance : CoeSort RingCat (Type*) where
instance (X : RingCat) : Ring X := X.str
--- Porting note : Hinting to Lean that `forget R` and `R` are the same
+-- Porting note: Hinting to Lean that `forget R` and `R` are the same
unif_hint forget_obj_eq_coe (R : RingCat) where ⊢
(forget RingCat).obj R ≟ R
@@ -298,7 +298,7 @@ instance : CoeSort CommSemiRingCat (Type*) where
instance (X : CommSemiRingCat) : CommSemiring X := X.str
--- Porting note : Hinting to Lean that `forget R` and `R` are the same
+-- Porting note: Hinting to Lean that `forget R` and `R` are the same
unif_hint forget_obj_eq_coe (R : CommSemiRingCat) where ⊢
(forget CommSemiRingCat).obj R ≟ R
@@ -419,7 +419,7 @@ instance : ConcreteCategory CommRingCat := by
instance : CoeSort CommRingCat (Type*) where
coe X := X.α
--- Porting note : Hinting to Lean that `forget R` and `R` are the same
+-- Porting note: Hinting to Lean that `forget R` and `R` are the same
unif_hint forget_obj_eq_coe (R : CommRingCat) where ⊢
(forget CommRingCat).obj R ≟ R
@@ -557,7 +557,7 @@ def commRingCatIsoToRingEquiv {X Y : CommRingCat} (i : X ≅ Y) : X ≃+* Y :=
set_option linter.uppercaseLean3 false in
#align category_theory.iso.CommRing_iso_to_ring_equiv CategoryTheory.Iso.commRingCatIsoToRingEquiv
--- Porting note : make this high priority to short circuit simplifier
+-- Porting note: make this high priority to short circuit simplifier
@[simp (high)]
theorem commRingIsoToRingEquiv_toRingHom {X Y : CommRingCat} (i : X ≅ Y) :
i.commRingCatIsoToRingEquiv.toRingHom = i.hom := by
@@ -566,7 +566,7 @@ theorem commRingIsoToRingEquiv_toRingHom {X Y : CommRingCat} (i : X ≅ Y) :
set_option linter.uppercaseLean3 false in
#align category_theory.iso.CommRing_iso_to_ring_equiv_to_ring_hom CategoryTheory.Iso.commRingIsoToRingEquiv_toRingHom
--- Porting note : make this high priority to short circuit simplifier
+-- Porting note: make this high priority to short circuit simplifier
@[simp (high)]
theorem commRingIsoToRingEquiv_symm_toRingHom {X Y : CommRingCat} (i : X ≅ Y) :
i.commRingCatIsoToRingEquiv.symm.toRingHom = i.inv := by
@@ -91,7 +91,7 @@ lemma coe_id {X : SemiRingCat} : (𝟙 X : X → X) = id := rfl
-- Porting note (#10756): added lemma
lemma coe_comp {X Y Z : SemiRingCat} {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g : X → Z) = g ∘ f := rfl
--- porting note: added
+-- porting note (#10756): added lemma
@[simp] lemma forget_map (f : X ⟶ Y) : (forget SemiRingCat).map f = (f : X → Y) := rfl
lemma ext {X Y : SemiRingCat} {f g : X ⟶ Y} (w : ∀ x : X, f x = g x) : f = g :=
@@ -215,7 +215,7 @@ lemma coe_id {X : RingCat} : (𝟙 X : X → X) = id := rfl
-- Porting note (#10756): added lemma
lemma coe_comp {X Y Z : RingCat} {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g : X → Z) = g ∘ f := rfl
--- porting note: added
+-- porting note (#10756): added lemma
@[simp] lemma forget_map (f : X ⟶ Y) : (forget RingCat).map f = (f : X → Y) := rfl
lemma ext {X Y : RingCat} {f g : X ⟶ Y} (w : ∀ x : X, f x = g x) : f = g :=
@@ -321,7 +321,7 @@ lemma coe_id {X : CommSemiRingCat} : (𝟙 X : X → X) = id := rfl
-- Porting note (#10756): added lemma
lemma coe_comp {X Y Z : CommSemiRingCat} {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g : X → Z) = g ∘ f := rfl
--- porting note: added
+-- porting note (#10756): added lemma
@[simp] lemma forget_map (f : X ⟶ Y) : (forget CommSemiRingCat).map f = (f : X → Y) := rfl
lemma ext {X Y : CommSemiRingCat} {f g : X ⟶ Y} (w : ∀ x : X, f x = g x) : f = g :=
@@ -441,7 +441,7 @@ lemma coe_id {X : CommRingCat} : (𝟙 X : X → X) = id := rfl
-- Porting note (#10756): added lemma
lemma coe_comp {X Y Z : CommRingCat} {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g : X → Z) = g ∘ f := rfl
--- porting note: added
+-- porting note (#10756): added lemma
@[simp] lemma forget_map (f : X ⟶ Y) : (forget CommRingCat).map f = (f : X → Y) := rfl
lemma ext {X Y : CommRingCat} {f g : X ⟶ Y} (w : ∀ x : X, f x = g x) : f = g :=
@@ -85,10 +85,10 @@ instance instFunLike {X Y : SemiRingCat} : FunLike (X ⟶ Y) X Y :=
instance instRingHomClass {X Y : SemiRingCat} : RingHomClass (X ⟶ Y) X Y :=
RingHom.instRingHomClass
--- porting note: added
+-- Porting note (#10756): added lemma
lemma coe_id {X : SemiRingCat} : (𝟙 X : X → X) = id := rfl
--- porting note: added
+-- Porting note (#10756): added lemma
lemma coe_comp {X Y Z : SemiRingCat} {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g : X → Z) = g ∘ f := rfl
-- porting note: added
@@ -209,10 +209,10 @@ instance instFunLike {X Y : RingCat} : FunLike (X ⟶ Y) X Y :=
instance instRingHomClass {X Y : RingCat} : RingHomClass (X ⟶ Y) X Y :=
RingHom.instRingHomClass
--- porting note: added
+-- Porting note (#10756): added lemma
lemma coe_id {X : RingCat} : (𝟙 X : X → X) = id := rfl
--- porting note: added
+-- Porting note (#10756): added lemma
lemma coe_comp {X Y Z : RingCat} {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g : X → Z) = g ∘ f := rfl
-- porting note: added
@@ -315,10 +315,10 @@ instance instFunLike {X Y : CommSemiRingCat} : FunLike (X ⟶ Y) X Y :=
instance instRingHomClass {X Y : CommSemiRingCat} : RingHomClass (X ⟶ Y) X Y :=
RingHom.instRingHomClass
--- porting note: added
+-- Porting note (#10756): added lemma
lemma coe_id {X : CommSemiRingCat} : (𝟙 X : X → X) = id := rfl
--- porting note: added
+-- Porting note (#10756): added lemma
lemma coe_comp {X Y Z : CommSemiRingCat} {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g : X → Z) = g ∘ f := rfl
-- porting note: added
@@ -435,10 +435,10 @@ instance instFunLike {X Y : CommRingCat} : FunLike (X ⟶ Y) X Y :=
instance instRingHomClass {X Y : CommRingCat} : RingHomClass (X ⟶ Y) X Y :=
RingHom.instRingHomClass
--- porting note: added
+-- Porting note (#10756): added lemma
lemma coe_id {X : CommRingCat} : (𝟙 X : X → X) = id := rfl
--- porting note: added
+-- Porting note (#10756): added lemma
lemma coe_comp {X Y Z : CommRingCat} {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g : X → Z) = g ∘ f := rfl
-- porting note: added
@@ -81,7 +81,7 @@ instance instFunLike {X Y : SemiRingCat} : FunLike (X ⟶ Y) X Y :=
-- unfolding during unification
ConcreteCategory.instFunLike
--- Porting note: added
+-- Porting note (#10754): added instance
instance instRingHomClass {X Y : SemiRingCat} : RingHomClass (X ⟶ Y) X Y :=
RingHom.instRingHomClass
@@ -205,7 +205,7 @@ instance instFunLike {X Y : RingCat} : FunLike (X ⟶ Y) X Y :=
-- Note: this is apparently _not_ defeq to RingHom.instFunLike with reducible transparency
ConcreteCategory.instFunLike
--- Porting note: added
+-- Porting note (#10754): added instance
instance instRingHomClass {X Y : RingCat} : RingHomClass (X ⟶ Y) X Y :=
RingHom.instRingHomClass
@@ -311,7 +311,7 @@ instance instFunLike {X Y : CommSemiRingCat} : FunLike (X ⟶ Y) X Y :=
-- Note: this is apparently _not_ defeq to RingHom.instFunLike with reducible transparency
ConcreteCategory.instFunLike
--- Porting note: added
+-- Porting note (#10754): added instance
instance instRingHomClass {X Y : CommSemiRingCat} : RingHomClass (X ⟶ Y) X Y :=
RingHom.instRingHomClass
@@ -431,7 +431,7 @@ instance instFunLike {X Y : CommRingCat} : FunLike (X ⟶ Y) X Y :=
-- Note: this is apparently _not_ defeq to RingHom.instFunLike with reducible transparency
ConcreteCategory.instFunLike
--- Porting note: added
+-- Porting note (#10754): added instance
instance instRingHomClass {X Y : CommRingCat} : RingHomClass (X ⟶ Y) X Y :=
RingHom.instRingHomClass
The FunLike hierarchy is very big and gets scanned through each time we need a coercion (via the CoeFun
instance). It looks like unbundled inheritance suits Lean 4 better here. The only class that still extends FunLike
is EquivLike
, since that has a custom coe_injective'
field that is easier to implement. All other classes should take FunLike
or EquivLike
as a parameter.
Previously, morphism classes would be Type
-valued and extend FunLike
:
/-- `MyHomClass F A B` states that `F` is a type of `MyClass.op`-preserving morphisms.
You should extend this class when you extend `MyHom`. -/
class MyHomClass (F : Type*) (A B : outParam <| Type*) [MyClass A] [MyClass B]
extends FunLike F A B :=
(map_op : ∀ (f : F) (x y : A), f (MyClass.op x y) = MyClass.op (f x) (f y))
After this PR, they should be Prop
-valued and take FunLike
as a parameter:
/-- `MyHomClass F A B` states that `F` is a type of `MyClass.op`-preserving morphisms.
You should extend this class when you extend `MyHom`. -/
class MyHomClass (F : Type*) (A B : outParam <| Type*) [MyClass A] [MyClass B]
[FunLike F A B] : Prop :=
(map_op : ∀ (f : F) (x y : A), f (MyClass.op x y) = MyClass.op (f x) (f y))
(Note that A B
stay marked as outParam
even though they are not purely required to be so due to the FunLike
parameter already filling them in. This is required to see through type synonyms, which is important in the category theory library. Also, I think keeping them as outParam
is slightly faster.)
Similarly, MyEquivClass
should take EquivLike
as a parameter.
As a result, every mention of [MyHomClass F A B]
should become [FunLike F A B] [MyHomClass F A B]
.
While overall this gives some great speedups, there are some cases that are noticeably slower. In particular, a failing application of a lemma such as map_mul
is more expensive. This is due to suboptimal processing of arguments. For example:
variable [FunLike F M N] [Mul M] [Mul N] (f : F) (x : M) (y : M)
theorem map_mul [MulHomClass F M N] : f (x * y) = f x * f y
example [AddHomClass F A B] : f (x * y) = f x * f y := map_mul f _ _
Before this PR, applying map_mul f
gives the goals [Mul ?M] [Mul ?N] [MulHomClass F ?M ?N]
. Since M
and N
are out_param
s, [MulHomClass F ?M ?N]
is synthesized first, supplies values for ?M
and ?N
and then the Mul M
and Mul N
instances can be found.
After this PR, the goals become [FunLike F ?M ?N] [Mul ?M] [Mul ?N] [MulHomClass F ?M ?N]
. Now [FunLike F ?M ?N]
is synthesized first, supplies values for ?M
and ?N
and then the Mul M
and Mul N
instances can be found, before trying MulHomClass F M N
which fails. Since the Mul
hierarchy is very big, this can be slow to fail, especially when there is no such Mul
instance.
A long-term but harder to achieve solution would be to specify the order in which instance goals get solved. For example, we'd like to change the arguments to map_mul
to look like [FunLike F M N] [Mul M] [Mul N] [highPriority <| MulHomClass F M N]
because MulHomClass
fails or succeeds much faster than the others.
As a consequence, the simpNF
linter is much slower since by design it tries and fails to apply many map_
lemmas. The same issue occurs a few times in existing calls to simp [map_mul]
, where map_mul
is tried "too soon" and fails. Thanks to the speedup of leanprover/lean4#2478 the impact is very limited, only in files that already were close to the timeout.
simp
not firing sometimesThis affects map_smulₛₗ
and related definitions. For simp
lemmas Lean apparently uses a slightly different mechanism to find instances, so that rw
can find every argument to map_smulₛₗ
successfully but simp
can't: leanprover/lean4#3701.
Especially in the category theory library, we might sometimes have a type A
which is also accessible as a synonym (Bundled A hA).1
. Instance synthesis doesn't always work if we have f : A →* B
but x * y : (Bundled A hA).1
or vice versa. This seems to be mostly fixed by keeping A B
as outParam
s in MulHomClass F A B
. (Presumably because Lean will do a definitional check A =?= (Bundled A hA).1
instead of using the syntax in the discrimination tree.)
The timeouts can be worked around for now by specifying which map_mul
we mean, either as map_mul f
for some explicit f
, or as e.g. MonoidHomClass.map_mul
.
map_smulₛₗ
not firing as simp
lemma can be worked around by going back to the pre-FunLike situation and making LinearMap.map_smulₛₗ
a simp
lemma instead of the generic map_smulₛₗ
. Writing simp [map_smulₛₗ _]
also works.
Co-authored-by: Matthew Ballard <matt@mrb.email> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Scott Morrison <scott@tqft.net> Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>
@@ -75,6 +75,12 @@ instance instSemiring (X : SemiRingCat) : Semiring X := X.str
instance instSemiring' (X : SemiRingCat) : Semiring <| (forget SemiRingCat).obj X := X.str
+instance instFunLike {X Y : SemiRingCat} : FunLike (X ⟶ Y) X Y :=
+ -- Note: this is apparently _not_ defeq to RingHom.instFunLike with reducible and instance
+ -- transparency. It seems that `(CategoryTheory.forget SemiRingCat).toPrefunctor` is not
+ -- unfolding during unification
+ ConcreteCategory.instFunLike
+
-- Porting note: added
instance instRingHomClass {X Y : SemiRingCat} : RingHomClass (X ⟶ Y) X Y :=
RingHom.instRingHomClass
@@ -195,6 +201,10 @@ instance instRing (X : RingCat) : Ring X := X.str
instance instRing' (X : RingCat) : Ring <| (forget RingCat).obj X := X.str
+instance instFunLike {X Y : RingCat} : FunLike (X ⟶ Y) X Y :=
+ -- Note: this is apparently _not_ defeq to RingHom.instFunLike with reducible transparency
+ ConcreteCategory.instFunLike
+
-- Porting note: added
instance instRingHomClass {X Y : RingCat} : RingHomClass (X ⟶ Y) X Y :=
RingHom.instRingHomClass
@@ -297,6 +307,10 @@ instance instCommSemiring (X : CommSemiRingCat) : CommSemiring X := X.str
instance instCommSemiring' (X : CommSemiRingCat) : CommSemiring <| (forget CommSemiRingCat).obj X :=
X.str
+instance instFunLike {X Y : CommSemiRingCat} : FunLike (X ⟶ Y) X Y :=
+ -- Note: this is apparently _not_ defeq to RingHom.instFunLike with reducible transparency
+ ConcreteCategory.instFunLike
+
-- Porting note: added
instance instRingHomClass {X Y : CommSemiRingCat} : RingHomClass (X ⟶ Y) X Y :=
RingHom.instRingHomClass
@@ -413,6 +427,10 @@ instance instCommRing (X : CommRingCat) : CommRing X := X.str
instance instCommRing' (X : CommRingCat) : CommRing <| (forget CommRingCat).obj X := X.str
+instance instFunLike {X Y : CommRingCat} : FunLike (X ⟶ Y) X Y :=
+ -- Note: this is apparently _not_ defeq to RingHom.instFunLike with reducible transparency
+ ConcreteCategory.instFunLike
+
-- Porting note: added
instance instRingHomClass {X Y : CommRingCat} : RingHomClass (X ⟶ Y) X Y :=
RingHom.instRingHomClass
@@ -435,6 +453,21 @@ def of (R : Type u) [CommRing R] : CommRingCat :=
set_option linter.uppercaseLean3 false in
#align CommRing.of CommRingCat.of
+instance instFunLike' {X : Type*} [CommRing X] {Y : CommRingCat} :
+ FunLike (CommRingCat.of X ⟶ Y) X Y :=
+ -- Note: this is apparently _not_ defeq to RingHom.instFunLike with reducible transparency
+ ConcreteCategory.instFunLike
+
+instance instFunLike'' {X : CommRingCat} {Y : Type*} [CommRing Y] :
+ FunLike (X ⟶ CommRingCat.of Y) X Y :=
+ -- Note: this is apparently _not_ defeq to RingHom.instFunLike with reducible transparency
+ ConcreteCategory.instFunLike
+
+instance instFunLike''' {X Y : Type _} [CommRing X] [CommRing Y] :
+ FunLike (CommRingCat.of X ⟶ CommRingCat.of Y) X Y :=
+ -- Note: this is apparently _not_ defeq to RingHom.instFunLike with reducible transparency
+ ConcreteCategory.instFunLike
+
/-- Typecheck a `RingHom` as a morphism in `CommRingCat`. -/
def ofHom {R S : Type u} [CommRing R] [CommRing S] (f : R →+* S) : of R ⟶ of S :=
f
@@ -513,28 +513,14 @@ end RingEquiv
namespace CategoryTheory.Iso
/-- Build a `RingEquiv` from an isomorphism in the category `RingCat`. -/
-def ringCatIsoToRingEquiv {X Y : RingCat} (i : X ≅ Y) : X ≃+* Y
- where
- toFun := i.hom
- invFun := i.inv
- -- Porting note: All these proofs were much easier in lean3.
- left_inv := fun x => show (i.hom ≫ i.inv) x = x by rw [i.hom_inv_id]; rfl
- right_inv := fun x => show (i.inv ≫ i.hom) x = x by rw [i.inv_hom_id]; rfl
- map_add' := fun x y => let ii : X →+* Y := i.hom; ii.map_add x y
- map_mul' := fun x y => let ii : X →+* Y := i.hom; ii.map_mul x y
+def ringCatIsoToRingEquiv {X Y : RingCat} (i : X ≅ Y) : X ≃+* Y :=
+ RingEquiv.ofHomInv i.hom i.inv i.hom_inv_id i.inv_hom_id
set_option linter.uppercaseLean3 false in
#align category_theory.iso.Ring_iso_to_ring_equiv CategoryTheory.Iso.ringCatIsoToRingEquiv
/-- Build a `RingEquiv` from an isomorphism in the category `CommRingCat`. -/
-def commRingCatIsoToRingEquiv {X Y : CommRingCat} (i : X ≅ Y) : X ≃+* Y
- where
- toFun := i.hom
- invFun := i.inv
- -- Porting note: All these proofs were much easier in lean3.
- left_inv := fun x => show (i.hom ≫ i.inv) x = x by rw [i.hom_inv_id]; rfl
- right_inv := fun x => show (i.inv ≫ i.hom) x = x by rw [i.inv_hom_id]; rfl
- map_add' := fun x y => let ii : X →+* Y := i.hom; ii.map_add x y
- map_mul' := fun x y => let ii : X →+* Y := i.hom; ii.map_mul x y
+def commRingCatIsoToRingEquiv {X Y : CommRingCat} (i : X ≅ Y) : X ≃+* Y :=
+ RingEquiv.ofHomInv i.hom i.inv i.hom_inv_id i.inv_hom_id
set_option linter.uppercaseLean3 false in
#align category_theory.iso.CommRing_iso_to_ring_equiv CategoryTheory.Iso.commRingCatIsoToRingEquiv
@@ -5,7 +5,6 @@ Authors: Scott Morrison, Johannes Hölzl, Yury Kudryashov
-/
import Mathlib.Algebra.Category.GroupCat.Basic
import Mathlib.CategoryTheory.ConcreteCategory.ReflectsIso
-import Mathlib.CategoryTheory.Elementwise
import Mathlib.Algebra.Ring.Equiv
#align_import algebra.category.Ring.basic from "leanprover-community/mathlib"@"34b2a989ad80bce3a5de749d935a4f23726e26e9"
FunLike
(#9833)
This follows up from #9785, which renamed FunLike
to DFunLike
, by introducing a new abbreviation FunLike F α β := DFunLike F α (fun _ => β)
, to make the non-dependent use of FunLike
easier.
I searched for the pattern DFunLike.*fun
and DFunLike.*λ
in all files to replace expressions of the form DFunLike F α (fun _ => β)
with FunLike F α β
. I did this everywhere except for extends
clauses for two reasons: it would conflict with #8386, and more importantly extends
must directly refer to a structure with no unfolding of def
s or abbrev
s.
@@ -107,7 +107,7 @@ set_option linter.uppercaseLean3 false in
@[simp]
lemma RingEquiv_coe_eq {X Y : Type _} [Semiring X] [Semiring Y] (e : X ≃+* Y) :
(@DFunLike.coe (SemiRingCat.of X ⟶ SemiRingCat.of Y) _ (fun _ => (forget SemiRingCat).obj _)
- ConcreteCategory.instDFunLike (e : X →+* Y) : X → Y) = ↑e :=
+ ConcreteCategory.instFunLike (e : X →+* Y) : X → Y) = ↑e :=
rfl
instance : Inhabited SemiRingCat :=
@@ -246,7 +246,7 @@ set_option linter.uppercaseLean3 false in
@[simp]
lemma RingEquiv_coe_eq {X Y : Type _} [Ring X] [Ring Y] (e : X ≃+* Y) :
(@DFunLike.coe (RingCat.of X ⟶ RingCat.of Y) _ (fun _ => (forget RingCat).obj _)
- ConcreteCategory.instDFunLike (e : X →+* Y) : X → Y) = ↑e :=
+ ConcreteCategory.instFunLike (e : X →+* Y) : X → Y) = ↑e :=
rfl
instance hasForgetToSemiRingCat : HasForget₂ RingCat SemiRingCat :=
@@ -330,7 +330,7 @@ set_option linter.uppercaseLean3 false in
lemma RingEquiv_coe_eq {X Y : Type _} [CommSemiring X] [CommSemiring Y] (e : X ≃+* Y) :
(@DFunLike.coe (CommSemiRingCat.of X ⟶ CommSemiRingCat.of Y) _
(fun _ => (forget CommSemiRingCat).obj _)
- ConcreteCategory.instDFunLike (e : X →+* Y) : X → Y) = ↑e :=
+ ConcreteCategory.instFunLike (e : X →+* Y) : X → Y) = ↑e :=
rfl
-- Porting note: I think this is now redundant.
@@ -445,7 +445,7 @@ set_option linter.uppercaseLean3 false in
@[simp]
lemma RingEquiv_coe_eq {X Y : Type _} [CommRing X] [CommRing Y] (e : X ≃+* Y) :
(@DFunLike.coe (CommRingCat.of X ⟶ CommRingCat.of Y) _ (fun _ => (forget CommRingCat).obj _)
- ConcreteCategory.instDFunLike (e : X →+* Y) : X → Y) = ↑e :=
+ ConcreteCategory.instFunLike (e : X →+* Y) : X → Y) = ↑e :=
rfl
-- Porting note: I think this is now redundant.
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>
@@ -106,8 +106,8 @@ set_option linter.uppercaseLean3 false in
@[simp]
lemma RingEquiv_coe_eq {X Y : Type _} [Semiring X] [Semiring Y] (e : X ≃+* Y) :
- (@FunLike.coe (SemiRingCat.of X ⟶ SemiRingCat.of Y) _ (fun _ => (forget SemiRingCat).obj _)
- ConcreteCategory.funLike (e : X →+* Y) : X → Y) = ↑e :=
+ (@DFunLike.coe (SemiRingCat.of X ⟶ SemiRingCat.of Y) _ (fun _ => (forget SemiRingCat).obj _)
+ ConcreteCategory.instDFunLike (e : X →+* Y) : X → Y) = ↑e :=
rfl
instance : Inhabited SemiRingCat :=
@@ -245,8 +245,8 @@ set_option linter.uppercaseLean3 false in
@[simp]
lemma RingEquiv_coe_eq {X Y : Type _} [Ring X] [Ring Y] (e : X ≃+* Y) :
- (@FunLike.coe (RingCat.of X ⟶ RingCat.of Y) _ (fun _ => (forget RingCat).obj _)
- ConcreteCategory.funLike (e : X →+* Y) : X → Y) = ↑e :=
+ (@DFunLike.coe (RingCat.of X ⟶ RingCat.of Y) _ (fun _ => (forget RingCat).obj _)
+ ConcreteCategory.instDFunLike (e : X →+* Y) : X → Y) = ↑e :=
rfl
instance hasForgetToSemiRingCat : HasForget₂ RingCat SemiRingCat :=
@@ -328,9 +328,9 @@ set_option linter.uppercaseLean3 false in
@[simp]
lemma RingEquiv_coe_eq {X Y : Type _} [CommSemiring X] [CommSemiring Y] (e : X ≃+* Y) :
- (@FunLike.coe (CommSemiRingCat.of X ⟶ CommSemiRingCat.of Y) _
+ (@DFunLike.coe (CommSemiRingCat.of X ⟶ CommSemiRingCat.of Y) _
(fun _ => (forget CommSemiRingCat).obj _)
- ConcreteCategory.funLike (e : X →+* Y) : X → Y) = ↑e :=
+ ConcreteCategory.instDFunLike (e : X →+* Y) : X → Y) = ↑e :=
rfl
-- Porting note: I think this is now redundant.
@@ -444,8 +444,8 @@ set_option linter.uppercaseLean3 false in
@[simp]
lemma RingEquiv_coe_eq {X Y : Type _} [CommRing X] [CommRing Y] (e : X ≃+* Y) :
- (@FunLike.coe (CommRingCat.of X ⟶ CommRingCat.of Y) _ (fun _ => (forget CommRingCat).obj _)
- ConcreteCategory.funLike (e : X →+* Y) : X → Y) = ↑e :=
+ (@DFunLike.coe (CommRingCat.of X ⟶ CommRingCat.of Y) _ (fun _ => (forget CommRingCat).obj _)
+ ConcreteCategory.instDFunLike (e : X →+* Y) : X → Y) = ↑e :=
rfl
-- Porting note: I think this is now redundant.
@@ -371,7 +371,7 @@ Ring equivalence are isomorphisms in category of commutative semirings
-/
@[simps]
def _root_.RingEquiv.toCommSemiRingCatIso [CommSemiring X] [CommSemiring Y] (e : X ≃+* Y) :
- SemiRingCat.of X ≅ SemiRingCat.of Y where
+ CommSemiRingCat.of X ≅ CommSemiRingCat.of Y where
hom := e.toRingHom
inv := e.symm.toRingHom
@@ -121,8 +121,8 @@ instance hasForgetToMonCat : HasForget₂ SemiRingCat MonCat :=
set_option linter.uppercaseLean3 false in
#align SemiRing.has_forget_to_Mon SemiRingCat.hasForgetToMonCat
-instance hasForgetToAddCommMonCat : HasForget₂ SemiRingCat AddCommMonCat
- where -- can't use BundledHom.mkHasForget₂, since AddCommMon is an induced category
+instance hasForgetToAddCommMonCat : HasForget₂ SemiRingCat AddCommMonCat where
+ -- can't use BundledHom.mkHasForget₂, since AddCommMon is an induced category
forget₂ :=
{ obj := fun R => AddCommMonCat.of R
-- Porting note: This doesn't work without the `(_ := _)` trick.
@@ -254,8 +254,8 @@ instance hasForgetToSemiRingCat : HasForget₂ RingCat SemiRingCat :=
set_option linter.uppercaseLean3 false in
#align Ring.has_forget_to_SemiRing RingCat.hasForgetToSemiRingCat
-instance hasForgetToAddCommGroupCat : HasForget₂ RingCat AddCommGroupCat
- where -- can't use BundledHom.mkHasForget₂, since AddCommGroup is an induced category
+instance hasForgetToAddCommGroupCat : HasForget₂ RingCat AddCommGroupCat where
+ -- can't use BundledHom.mkHasForget₂, since AddCommGroup is an induced category
forget₂ :=
{ obj := fun R => AddCommGroupCat.of R
-- Porting note: use `(_ := _)` similar to above.
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.
@@ -21,6 +21,8 @@ We introduce the bundled categories:
along with the relevant forgetful functors between them.
-/
+set_option autoImplicit true
+
universe u v
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -41,7 +41,7 @@ namespace SemiRingCat
/-- `RingHom` doesn't actually assume associativity. This alias is needed to make the category
theory machinery work. We use the same trick in `MonCat.AssocMonoidHom`. -/
-abbrev AssocRingHom (M N : Type _) [Semiring M] [Semiring N] :=
+abbrev AssocRingHom (M N : Type*) [Semiring M] [Semiring N] :=
RingHom M N
set_option linter.uppercaseLean3 false in
#align SemiRing.assoc_ring_hom SemiRingCat.AssocRingHom
@@ -63,7 +63,7 @@ instance : ConcreteCategory SemiRingCat := by
dsimp [SemiRingCat]
infer_instance
-instance : CoeSort SemiRingCat (Type _) where
+instance : CoeSort SemiRingCat (Type*) where
coe X := X.α
-- Porting note : Hinting to Lean that `forget R` and `R` are the same
@@ -181,7 +181,7 @@ instance : ConcreteCategory RingCat := by
dsimp [RingCat]
infer_instance
-instance : CoeSort RingCat (Type _) where
+instance : CoeSort RingCat (Type*) where
coe X := X.α
instance (X : RingCat) : Ring X := X.str
@@ -282,7 +282,7 @@ instance : ConcreteCategory CommSemiRingCat := by
dsimp [CommSemiRingCat]
infer_instance
-instance : CoeSort CommSemiRingCat (Type _) where
+instance : CoeSort CommSemiRingCat (Type*) where
coe X := X.α
instance (X : CommSemiRingCat) : CommSemiring X := X.str
@@ -401,7 +401,7 @@ instance : ConcreteCategory CommRingCat := by
dsimp [CommRingCat]
infer_instance
-instance : CoeSort CommRingCat (Type _) where
+instance : CoeSort CommRingCat (Type*) where
coe X := X.α
-- Porting note : Hinting to Lean that `forget R` and `R` are the same
@@ -135,7 +135,7 @@ set_option linter.uppercaseLean3 false in
#align SemiRing.of_hom SemiRingCat.ofHom
-- Porting note: `simpNF` should not trigger on `rfl` lemmas.
--- see https://github.com/leanprover-community/mathlib4/issues/5081
+-- see https://github.com/leanprover/std4/issues/86
@[simp, nolint simpNF]
theorem ofHom_apply {R S : Type u} [Semiring R] [Semiring S] (f : R →+* S) (x : R) :
ofHom f x = f x :=
@@ -2,17 +2,14 @@
Copyright (c) 2018 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison, Johannes Hölzl, Yury Kudryashov
-
-! This file was ported from Lean 3 source module algebra.category.Ring.basic
-! leanprover-community/mathlib commit 34b2a989ad80bce3a5de749d935a4f23726e26e9
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Algebra.Category.GroupCat.Basic
import Mathlib.CategoryTheory.ConcreteCategory.ReflectsIso
import Mathlib.CategoryTheory.Elementwise
import Mathlib.Algebra.Ring.Equiv
+#align_import algebra.category.Ring.basic from "leanprover-community/mathlib"@"34b2a989ad80bce3a5de749d935a4f23726e26e9"
+
/-!
# Category instances for `Semiring`, `Ring`, `CommSemiring`, and `CommRing`.
This is the second half of the changes originally in #5699, removing all occurrences of ;
after a space and implementing a linter rule to enforce it.
In most cases this 2-character substring has a space after it, so the following command was run first:
find . -type f -name "*.lean" -exec sed -i -E 's/ ; /; /g' {} \;
The remaining cases were few enough in number that they were done manually.
@@ -522,8 +522,8 @@ def ringCatIsoToRingEquiv {X Y : RingCat} (i : X ≅ Y) : X ≃+* Y
-- Porting note: All these proofs were much easier in lean3.
left_inv := fun x => show (i.hom ≫ i.inv) x = x by rw [i.hom_inv_id]; rfl
right_inv := fun x => show (i.inv ≫ i.hom) x = x by rw [i.inv_hom_id]; rfl
- map_add' := fun x y => let ii : X →+* Y := i.hom ; ii.map_add x y
- map_mul' := fun x y => let ii : X →+* Y := i.hom ; ii.map_mul x y
+ map_add' := fun x y => let ii : X →+* Y := i.hom; ii.map_add x y
+ map_mul' := fun x y => let ii : X →+* Y := i.hom; ii.map_mul x y
set_option linter.uppercaseLean3 false in
#align category_theory.iso.Ring_iso_to_ring_equiv CategoryTheory.Iso.ringCatIsoToRingEquiv
@@ -535,8 +535,8 @@ def commRingCatIsoToRingEquiv {X Y : CommRingCat} (i : X ≅ Y) : X ≃+* Y
-- Porting note: All these proofs were much easier in lean3.
left_inv := fun x => show (i.hom ≫ i.inv) x = x by rw [i.hom_inv_id]; rfl
right_inv := fun x => show (i.inv ≫ i.hom) x = x by rw [i.inv_hom_id]; rfl
- map_add' := fun x y => let ii : X →+* Y := i.hom ; ii.map_add x y
- map_mul' := fun x y => let ii : X →+* Y := i.hom ; ii.map_mul x y
+ map_add' := fun x y => let ii : X →+* Y := i.hom; ii.map_add x y
+ map_mul' := fun x y => let ii : X →+* Y := i.hom; ii.map_mul x y
set_option linter.uppercaseLean3 false in
#align category_theory.iso.CommRing_iso_to_ring_equiv CategoryTheory.Iso.commRingCatIsoToRingEquiv
@@ -69,11 +69,17 @@ instance : ConcreteCategory SemiRingCat := by
instance : CoeSort SemiRingCat (Type _) where
coe X := X.α
-instance (X : SemiRingCat) : Semiring X := X.str
+-- Porting note : Hinting to Lean that `forget R` and `R` are the same
+unif_hint forget_obj_eq_coe (R : SemiRingCat) where ⊢
+ (forget SemiRingCat).obj R ≟ R
--- porting note: this instance was not necessary in mathlib
-instance {X Y : SemiRingCat} : CoeFun (X ⟶ Y) fun _ => X → Y where
- coe (f : X →+* Y) := f
+instance instSemiring (X : SemiRingCat) : Semiring X := X.str
+
+instance instSemiring' (X : SemiRingCat) : Semiring <| (forget SemiRingCat).obj X := X.str
+
+-- Porting note: added
+instance instRingHomClass {X Y : SemiRingCat} : RingHomClass (X ⟶ Y) X Y :=
+ RingHom.instRingHomClass
-- porting note: added
lemma coe_id {X : SemiRingCat} : (𝟙 X : X → X) = id := rfl
@@ -131,7 +137,9 @@ def ofHom {R S : Type u} [Semiring R] [Semiring S] (f : R →+* S) : of R ⟶ of
set_option linter.uppercaseLean3 false in
#align SemiRing.of_hom SemiRingCat.ofHom
-@[simp]
+-- Porting note: `simpNF` should not trigger on `rfl` lemmas.
+-- see https://github.com/leanprover-community/mathlib4/issues/5081
+@[simp, nolint simpNF]
theorem ofHom_apply {R S : Type u} [Semiring R] [Semiring S] (f : R →+* S) (x : R) :
ofHom f x = f x :=
rfl
@@ -181,9 +189,17 @@ instance : CoeSort RingCat (Type _) where
instance (X : RingCat) : Ring X := X.str
--- porting note: this instance was not necessary in mathlib
-instance {X Y : RingCat} : CoeFun (X ⟶ Y) fun _ => X → Y where
- coe (f : X →+* Y) := f
+-- Porting note : Hinting to Lean that `forget R` and `R` are the same
+unif_hint forget_obj_eq_coe (R : RingCat) where ⊢
+ (forget RingCat).obj R ≟ R
+
+instance instRing (X : RingCat) : Ring X := X.str
+
+instance instRing' (X : RingCat) : Ring <| (forget RingCat).obj X := X.str
+
+-- Porting note: added
+instance instRingHomClass {X Y : RingCat} : RingHomClass (X ⟶ Y) X Y :=
+ RingHom.instRingHomClass
-- porting note: added
lemma coe_id {X : RingCat} : (𝟙 X : X → X) = id := rfl
@@ -274,9 +290,18 @@ instance : CoeSort CommSemiRingCat (Type _) where
instance (X : CommSemiRingCat) : CommSemiring X := X.str
--- porting note: this instance was not necessary in mathlib
-instance {X Y : CommSemiRingCat} : CoeFun (X ⟶ Y) fun _ => X → Y where
- coe (f : X →+* Y) := f
+-- Porting note : Hinting to Lean that `forget R` and `R` are the same
+unif_hint forget_obj_eq_coe (R : CommSemiRingCat) where ⊢
+ (forget CommSemiRingCat).obj R ≟ R
+
+instance instCommSemiring (X : CommSemiRingCat) : CommSemiring X := X.str
+
+instance instCommSemiring' (X : CommSemiRingCat) : CommSemiring <| (forget CommSemiRingCat).obj X :=
+ X.str
+
+-- Porting note: added
+instance instRingHomClass {X Y : CommSemiRingCat} : RingHomClass (X ⟶ Y) X Y :=
+ RingHom.instRingHomClass
-- porting note: added
lemma coe_id {X : CommSemiRingCat} : (𝟙 X : X → X) = id := rfl
@@ -382,11 +407,17 @@ instance : ConcreteCategory CommRingCat := by
instance : CoeSort CommRingCat (Type _) where
coe X := X.α
-instance (X : CommRingCat) : CommRing X := X.str
+-- Porting note : Hinting to Lean that `forget R` and `R` are the same
+unif_hint forget_obj_eq_coe (R : CommRingCat) where ⊢
+ (forget CommRingCat).obj R ≟ R
+
+instance instCommRing (X : CommRingCat) : CommRing X := X.str
+
+instance instCommRing' (X : CommRingCat) : CommRing <| (forget CommRingCat).obj X := X.str
--- porting note: this instance was not necessary in mathlib
-instance {X Y : CommRingCat} : CoeFun (X ⟶ Y) fun _ => X → Y where
- coe (f : X →+* Y) := f
+-- Porting note: added
+instance instRingHomClass {X Y : CommRingCat} : RingHomClass (X ⟶ Y) X Y :=
+ RingHom.instRingHomClass
-- porting note: added
lemma coe_id {X : CommRingCat} : (𝟙 X : X → X) = id := rfl
@@ -60,6 +60,7 @@ deriving instance LargeCategory for SemiRingCat
--Porting note: deriving fails for ConcreteCategory, adding instance manually.
--deriving instance LargeCategory, ConcreteCategory for SemiRingCat
+-- see https://github.com/leanprover-community/mathlib4/issues/5020
instance : ConcreteCategory SemiRingCat := by
dsimp [SemiRingCat]
@@ -168,6 +169,7 @@ instance : BundledHom.ParentProjection @Ring.toSemiring :=
-- Porting note: Another place where mathlib had derived a concrete category
-- but this does not work here, so we add the instance manually.
+-- see https://github.com/leanprover-community/mathlib4/issues/5020
deriving instance LargeCategory for RingCat
instance : ConcreteCategory RingCat := by
@@ -260,6 +262,7 @@ instance : BundledHom.ParentProjection @CommSemiring.toSemiring :=
⟨⟩
-- Porting note: again, deriving fails for concrete category instances.
+-- see https://github.com/leanprover-community/mathlib4/issues/5020
deriving instance LargeCategory for CommSemiRingCat
instance : ConcreteCategory CommSemiRingCat := by
@@ -369,6 +372,7 @@ instance : BundledHom.ParentProjection @CommRing.toRing :=
⟨⟩
-- Porting note: deriving fails for concrete category.
+-- see https://github.com/leanprover-community/mathlib4/issues/5020
deriving instance LargeCategory for CommRingCat
instance : ConcreteCategory CommRingCat := by
@@ -98,6 +98,12 @@ theorem coe_of (R : Type u) [Semiring R] : (SemiRingCat.of R : Type u) = R :=
set_option linter.uppercaseLean3 false in
#align SemiRing.coe_of SemiRingCat.coe_of
+@[simp]
+lemma RingEquiv_coe_eq {X Y : Type _} [Semiring X] [Semiring Y] (e : X ≃+* Y) :
+ (@FunLike.coe (SemiRingCat.of X ⟶ SemiRingCat.of Y) _ (fun _ => (forget SemiRingCat).obj _)
+ ConcreteCategory.funLike (e : X →+* Y) : X → Y) = ↑e :=
+ rfl
+
instance : Inhabited SemiRingCat :=
⟨of PUnit⟩
@@ -131,6 +137,9 @@ theorem ofHom_apply {R S : Type u} [Semiring R] [Semiring S] (f : R →+* S) (x
set_option linter.uppercaseLean3 false in
#align SemiRing.of_hom_apply SemiRingCat.ofHom_apply
+/--
+Ring equivalence are isomorphisms in category of semirings
+-/
@[simps]
def _root_.RingEquiv.toSemiRingCatIso [Semiring X] [Semiring Y] (e : X ≃+* Y) :
SemiRingCat.of X ≅ SemiRingCat.of Y where
@@ -217,6 +226,12 @@ theorem coe_of (R : Type u) [Ring R] : (RingCat.of R : Type u) = R :=
set_option linter.uppercaseLean3 false in
#align Ring.coe_of RingCat.coe_of
+@[simp]
+lemma RingEquiv_coe_eq {X Y : Type _} [Ring X] [Ring Y] (e : X ≃+* Y) :
+ (@FunLike.coe (RingCat.of X ⟶ RingCat.of Y) _ (fun _ => (forget RingCat).obj _)
+ ConcreteCategory.funLike (e : X →+* Y) : X → Y) = ↑e :=
+ rfl
+
instance hasForgetToSemiRingCat : HasForget₂ RingCat SemiRingCat :=
BundledHom.forget₂ _ _
set_option linter.uppercaseLean3 false in
@@ -239,7 +254,7 @@ def CommSemiRingCat : Type (u + 1) :=
set_option linter.uppercaseLean3 false in
#align CommSemiRing CommSemiRingCat
-namespace CommSemiRing
+namespace CommSemiRingCat
instance : BundledHom.ParentProjection @CommSemiring.toSemiring :=
⟨⟩
@@ -276,13 +291,20 @@ lemma ext {X Y : CommSemiRingCat} {f g : X ⟶ Y} (w : ∀ x : X, f x = g x) : f
def of (R : Type u) [CommSemiring R] : CommSemiRingCat :=
Bundled.of R
set_option linter.uppercaseLean3 false in
-#align CommSemiRing.of CommSemiRing.of
+#align CommSemiRing.of CommSemiRingCat.of
/-- Typecheck a `RingHom` as a morphism in `CommSemiRingCat`. -/
def ofHom {R S : Type u} [CommSemiring R] [CommSemiring S] (f : R →+* S) : of R ⟶ of S :=
f
set_option linter.uppercaseLean3 false in
-#align CommSemiRing.of_hom CommSemiRing.ofHom
+#align CommSemiRing.of_hom CommSemiRingCat.ofHom
+
+@[simp]
+lemma RingEquiv_coe_eq {X Y : Type _} [CommSemiring X] [CommSemiring Y] (e : X ≃+* Y) :
+ (@FunLike.coe (CommSemiRingCat.of X ⟶ CommSemiRingCat.of Y) _
+ (fun _ => (forget CommSemiRingCat).obj _)
+ ConcreteCategory.funLike (e : X →+* Y) : X → Y) = ↑e :=
+ rfl
-- Porting note: I think this is now redundant.
-- @[simp]
@@ -299,15 +321,15 @@ instance (R : CommSemiRingCat) : CommSemiring R :=
R.str
@[simp]
-theorem coe_of (R : Type u) [CommSemiring R] : (CommSemiRing.of R : Type u) = R :=
+theorem coe_of (R : Type u) [CommSemiring R] : (CommSemiRingCat.of R : Type u) = R :=
rfl
set_option linter.uppercaseLean3 false in
-#align CommSemiRing.coe_of CommSemiRing.coe_of
+#align CommSemiRing.coe_of CommSemiRingCat.coe_of
instance hasForgetToSemiRingCat : HasForget₂ CommSemiRingCat SemiRingCat :=
BundledHom.forget₂ _ _
set_option linter.uppercaseLean3 false in
-#align CommSemiRing.has_forget_to_SemiRing CommSemiRing.hasForgetToSemiRingCat
+#align CommSemiRing.has_forget_to_SemiRing CommSemiRingCat.hasForgetToSemiRingCat
/-- The forgetful functor from commutative rings to (multiplicative) commutative monoids. -/
instance hasForgetToCommMonCat : HasForget₂ CommSemiRingCat CommMonCat :=
@@ -315,9 +337,11 @@ instance hasForgetToCommMonCat : HasForget₂ CommSemiRingCat CommMonCat :=
-- Porting note: `(_ := _)` trick
(fun {R₁ R₂} f => RingHom.toMonoidHom (α := R₁) (β := R₂) f) (by rfl)
set_option linter.uppercaseLean3 false in
-#align CommSemiRing.has_forget_to_CommMon CommSemiRing.hasForgetToCommMonCat
-
+#align CommSemiRing.has_forget_to_CommMon CommSemiRingCat.hasForgetToCommMonCat
+/--
+Ring equivalence are isomorphisms in category of commutative semirings
+-/
@[simps]
def _root_.RingEquiv.toCommSemiRingCatIso [CommSemiring X] [CommSemiring Y] (e : X ≃+* Y) :
SemiRingCat.of X ≅ SemiRingCat.of Y where
@@ -331,7 +355,7 @@ instance forgetReflectIsos : ReflectsIsomorphisms (forget CommSemiRingCat) where
let e : X ≃+* Y := { ff, i.toEquiv with }
exact ⟨(IsIso.of_iso e.toSemiRingCatIso).1⟩
-end CommSemiRing
+end CommSemiRingCat
/-- The category of commutative rings. -/
def CommRingCat : Type (u + 1) :=
@@ -384,6 +408,12 @@ def ofHom {R S : Type u} [CommRing R] [CommRing S] (f : R →+* S) : of R ⟶ of
set_option linter.uppercaseLean3 false in
#align CommRing.of_hom CommRingCat.ofHom
+@[simp]
+lemma RingEquiv_coe_eq {X Y : Type _} [CommRing X] [CommRing Y] (e : X ≃+* Y) :
+ (@FunLike.coe (CommRingCat.of X ⟶ CommRingCat.of Y) _ (fun _ => (forget CommRingCat).obj _)
+ ConcreteCategory.funLike (e : X →+* Y) : X → Y) = ↑e :=
+ rfl
+
-- Porting note: I think this is now redundant.
-- @[simp]
-- theorem ofHom_apply {R S : Type u} [CommRing R] [CommRing S] (f : R →+* S) (x : R) :
@@ -411,7 +441,7 @@ set_option linter.uppercaseLean3 false in
/-- The forgetful functor from commutative rings to (multiplicative) commutative monoids. -/
instance hasForgetToCommSemiRingCat : HasForget₂ CommRingCat CommSemiRingCat :=
- HasForget₂.mk' (fun R : CommRingCat => CommSemiRing.of R) (fun R => rfl)
+ HasForget₂.mk' (fun R : CommRingCat => CommSemiRingCat.of R) (fun R => rfl)
(fun {R₁ R₂} f => f) (by rfl)
set_option linter.uppercaseLean3 false in
#align CommRing.has_forget_to_CommSemiRing CommRingCat.hasForgetToCommSemiRingCat
@@ -475,7 +505,8 @@ def commRingCatIsoToRingEquiv {X Y : CommRingCat} (i : X ≅ Y) : X ≃+* Y
set_option linter.uppercaseLean3 false in
#align category_theory.iso.CommRing_iso_to_ring_equiv CategoryTheory.Iso.commRingCatIsoToRingEquiv
-@[simp]
+-- Porting note : make this high priority to short circuit simplifier
+@[simp (high)]
theorem commRingIsoToRingEquiv_toRingHom {X Y : CommRingCat} (i : X ≅ Y) :
i.commRingCatIsoToRingEquiv.toRingHom = i.hom := by
ext
@@ -483,7 +514,8 @@ theorem commRingIsoToRingEquiv_toRingHom {X Y : CommRingCat} (i : X ≅ Y) :
set_option linter.uppercaseLean3 false in
#align category_theory.iso.CommRing_iso_to_ring_equiv_to_ring_hom CategoryTheory.Iso.commRingIsoToRingEquiv_toRingHom
-@[simp]
+-- Porting note : make this high priority to short circuit simplifier
+@[simp (high)]
theorem commRingIsoToRingEquiv_symm_toRingHom {X Y : CommRingCat} (i : X ≅ Y) :
i.commRingCatIsoToRingEquiv.symm.toRingHom = i.inv := by
ext
@@ -35,6 +35,11 @@ def SemiRingCat : Type (u + 1) :=
set_option linter.uppercaseLean3 false in
#align SemiRing SemiRingCat
+-- Porting note: typemax hack to fix universe complaints
+/-- An alias for `Semiring.{max u v}`, to deal around unification issues. -/
+@[nolint checkUnivs]
+abbrev SemiRingCatMax.{u1, u2} := SemiRingCat.{max u1 u2}
+
namespace SemiRingCat
/-- `RingHom` doesn't actually assume associativity. This alias is needed to make the category
@@ -126,6 +131,19 @@ theorem ofHom_apply {R S : Type u} [Semiring R] [Semiring S] (f : R →+* S) (x
set_option linter.uppercaseLean3 false in
#align SemiRing.of_hom_apply SemiRingCat.ofHom_apply
+@[simps]
+def _root_.RingEquiv.toSemiRingCatIso [Semiring X] [Semiring Y] (e : X ≃+* Y) :
+ SemiRingCat.of X ≅ SemiRingCat.of Y where
+ hom := e.toRingHom
+ inv := e.symm.toRingHom
+
+instance forgetReflectIsos : ReflectsIsomorphisms (forget SemiRingCat) where
+ reflects {X Y} f _ := by
+ let i := asIso ((forget SemiRingCat).map f)
+ let ff : X →+* Y := f
+ let e : X ≃+* Y := { ff, i.toEquiv with }
+ exact ⟨(IsIso.of_iso e.toSemiRingCatIso).1⟩
+
end SemiRingCat
/-- The category of rings. -/
@@ -299,6 +317,20 @@ instance hasForgetToCommMonCat : HasForget₂ CommSemiRingCat CommMonCat :=
set_option linter.uppercaseLean3 false in
#align CommSemiRing.has_forget_to_CommMon CommSemiRing.hasForgetToCommMonCat
+
+@[simps]
+def _root_.RingEquiv.toCommSemiRingCatIso [CommSemiring X] [CommSemiring Y] (e : X ≃+* Y) :
+ SemiRingCat.of X ≅ SemiRingCat.of Y where
+ hom := e.toRingHom
+ inv := e.symm.toRingHom
+
+instance forgetReflectIsos : ReflectsIsomorphisms (forget CommSemiRingCat) where
+ reflects {X Y} f _ := by
+ let i := asIso ((forget CommSemiRingCat).map f)
+ let ff : X →+* Y := f
+ let e : X ≃+* Y := { ff, i.toEquiv with }
+ exact ⟨(IsIso.of_iso e.toSemiRingCatIso).1⟩
+
end CommSemiRing
/-- The category of commutative rings. -/
@@ -14,13 +14,13 @@ import Mathlib.CategoryTheory.Elementwise
import Mathlib.Algebra.Ring.Equiv
/-!
-# Category instances for semiring, ring, comm_semiring, and comm_ring.
+# Category instances for `Semiring`, `Ring`, `CommSemiring`, and `CommRing`.
We introduce the bundled categories:
-* `SemiRing`
-* `Ring`
-* `CommSemiRing`
-* `CommRing`
+* `SemiRingCat`
+* `RingCat`
+* `CommSemiRingCat`
+* `CommRingCat`
along with the relevant forgetful functors between them.
-/
@@ -37,17 +37,17 @@ set_option linter.uppercaseLean3 false in
namespace SemiRingCat
-/-- `ring_hom` doesn't actually assume associativity. This alias is needed to make the category
-theory machinery work. We use the same trick in `category_theory.Mon.assoc_monoid_hom`. -/
+/-- `RingHom` doesn't actually assume associativity. This alias is needed to make the category
+theory machinery work. We use the same trick in `MonCat.AssocMonoidHom`. -/
abbrev AssocRingHom (M N : Type _) [Semiring M] [Semiring N] :=
RingHom M N
set_option linter.uppercaseLean3 false in
#align SemiRing.assoc_ring_hom SemiRingCat.AssocRingHom
instance bundledHom : BundledHom AssocRingHom where
- toFun := fun {M N} _ _ f => f
- id := fun {A} _ => RingHom.id _
- comp := fun {M N L} _ _ _ f g => f.comp g
+ toFun _ _ f := f
+ id _ := RingHom.id _
+ comp _ _ _ f g := f.comp g
set_option linter.uppercaseLean3 false in
#align SemiRing.bundled_hom SemiRingCat.bundledHom
@@ -99,9 +99,8 @@ instance : Inhabited SemiRingCat :=
instance hasForgetToMonCat : HasForget₂ SemiRingCat MonCat :=
BundledHom.mkHasForget₂
(fun R hR => @MonoidWithZero.toMonoid R (@Semiring.toMonoidWithZero R hR))
- (fun {_ _} =>
- RingHom.toMonoidHom)
- (fun _ => rfl) -- (fun R₁ R₂ => RingHom.toMonoidHom) fun _ _ _ => rfl
+ (fun {_ _} => RingHom.toMonoidHom)
+ (fun _ => rfl)
set_option linter.uppercaseLean3 false in
#align SemiRing.has_forget_to_Mon SemiRingCat.hasForgetToMonCat
@@ -114,7 +113,7 @@ instance hasForgetToAddCommMonCat : HasForget₂ SemiRingCat AddCommMonCat
set_option linter.uppercaseLean3 false in
#align SemiRing.has_forget_to_AddCommMon SemiRingCat.hasForgetToAddCommMonCat
-/-- Typecheck a `RingHom` as a morphism in `SemiRing`. -/
+/-- Typecheck a `RingHom` as a morphism in `SemiRingCat`. -/
def ofHom {R S : Type u} [Semiring R] [Semiring S] (f : R →+* S) : of R ⟶ of S :=
f
set_option linter.uppercaseLean3 false in
@@ -169,13 +168,13 @@ lemma coe_comp {X Y Z : RingCat} {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g : X →
lemma ext {X Y : RingCat} {f g : X ⟶ Y} (w : ∀ x : X, f x = g x) : f = g :=
RingHom.ext w
-/-- Construct a bundled `Ring` from the underlying type and typeclass. -/
+/-- Construct a bundled `RingCat` from the underlying type and typeclass. -/
def of (R : Type u) [Ring R] : RingCat :=
Bundled.of R
set_option linter.uppercaseLean3 false in
#align Ring.of RingCat.of
-/-- Typecheck a `RingHom` as a morphism in `Ring`. -/
+/-- Typecheck a `RingHom` as a morphism in `RingCat`. -/
def ofHom {R S : Type u} [Ring R] [Ring S] (f : R →+* S) : of R ⟶ of S :=
f
set_option linter.uppercaseLean3 false in
@@ -255,13 +254,13 @@ lemma coe_comp {X Y Z : CommSemiRingCat} {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g
lemma ext {X Y : CommSemiRingCat} {f g : X ⟶ Y} (w : ∀ x : X, f x = g x) : f = g :=
RingHom.ext w
-/-- Construct a bundled `CommSemiRing` from the underlying type and typeclass. -/
+/-- Construct a bundled `CommSemiRingCat` from the underlying type and typeclass. -/
def of (R : Type u) [CommSemiring R] : CommSemiRingCat :=
Bundled.of R
set_option linter.uppercaseLean3 false in
#align CommSemiRing.of CommSemiRing.of
-/-- Typecheck a `RingHom` as a morphism in `CommSemiRing`. -/
+/-- Typecheck a `RingHom` as a morphism in `CommSemiRingCat`. -/
def ofHom {R S : Type u} [CommSemiring R] [CommSemiring S] (f : R →+* S) : of R ⟶ of S :=
f
set_option linter.uppercaseLean3 false in
@@ -341,13 +340,13 @@ lemma coe_comp {X Y Z : CommRingCat} {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g : X
lemma ext {X Y : CommRingCat} {f g : X ⟶ Y} (w : ∀ x : X, f x = g x) : f = g :=
RingHom.ext w
-/-- Construct a bundled `CommRing` from the underlying type and typeclass. -/
+/-- Construct a bundled `CommRingCat` from the underlying type and typeclass. -/
def of (R : Type u) [CommRing R] : CommRingCat :=
Bundled.of R
set_option linter.uppercaseLean3 false in
#align CommRing.of CommRingCat.of
-/-- Typecheck a `RingHom` as a morphism in `CommRing`. -/
+/-- Typecheck a `RingHom` as a morphism in `CommRingCat`. -/
def ofHom {R S : Type u} [CommRing R] [CommRing S] (f : R →+* S) : of R ⟶ of S :=
f
set_option linter.uppercaseLean3 false in
@@ -396,7 +395,7 @@ namespace RingEquiv
variable {X Y : Type u}
-/-- Build an isomorphism in the category `RingCat` from a `RingEquiv` between `Ring`s. -/
+/-- Build an isomorphism in the category `RingCat` from a `RingEquiv` between `RingCat`s. -/
@[simps]
def toRingCatIso [Ring X] [Ring Y] (e : X ≃+* Y) : RingCat.of X ≅ RingCat.of Y
where
@@ -405,7 +404,7 @@ def toRingCatIso [Ring X] [Ring Y] (e : X ≃+* Y) : RingCat.of X ≅ RingCat.of
set_option linter.uppercaseLean3 false in
#align ring_equiv.to_Ring_iso RingEquiv.toRingCatIso
-/-- Build an isomorphism in the category `CommRingCat` from a `RingEquiv` between `CommRing`s. -/
+/-- Build an isomorphism in the category `CommRingCat` from a `RingEquiv` between `CommRingCat`s. -/
@[simps]
def toCommRingCatIso [CommRing X] [CommRing Y] (e : X ≃+* Y) : CommRingCat.of X ≅ CommRingCat.of Y
where
@@ -424,21 +423,21 @@ def ringCatIsoToRingEquiv {X Y : RingCat} (i : X ≅ Y) : X ≃+* Y
toFun := i.hom
invFun := i.inv
-- Porting note: All these proofs were much easier in lean3.
- left_inv := fun x => show (i.hom ≫ i.inv) x = x by rw [i.hom_inv_id] ; rfl
- right_inv := fun x => show (i.inv ≫ i.hom) x = x by rw [i.inv_hom_id] ; rfl
+ left_inv := fun x => show (i.hom ≫ i.inv) x = x by rw [i.hom_inv_id]; rfl
+ right_inv := fun x => show (i.inv ≫ i.hom) x = x by rw [i.inv_hom_id]; rfl
map_add' := fun x y => let ii : X →+* Y := i.hom ; ii.map_add x y
map_mul' := fun x y => let ii : X →+* Y := i.hom ; ii.map_mul x y
set_option linter.uppercaseLean3 false in
#align category_theory.iso.Ring_iso_to_ring_equiv CategoryTheory.Iso.ringCatIsoToRingEquiv
-/-- Build a `RingEquiv` from an isomorphism in the category `CommRing`. -/
+/-- Build a `RingEquiv` from an isomorphism in the category `CommRingCat`. -/
def commRingCatIsoToRingEquiv {X Y : CommRingCat} (i : X ≅ Y) : X ≃+* Y
where
toFun := i.hom
invFun := i.inv
-- Porting note: All these proofs were much easier in lean3.
- left_inv := fun x => show (i.hom ≫ i.inv) x = x by rw [i.hom_inv_id] ; rfl
- right_inv := fun x => show (i.inv ≫ i.hom) x = x by rw [i.inv_hom_id] ; rfl
+ left_inv := fun x => show (i.hom ≫ i.inv) x = x by rw [i.hom_inv_id]; rfl
+ right_inv := fun x => show (i.inv ≫ i.hom) x = x by rw [i.inv_hom_id]; rfl
map_add' := fun x y => let ii : X →+* Y := i.hom ; ii.map_add x y
map_mul' := fun x y => let ii : X →+* Y := i.hom ; ii.map_mul x y
set_option linter.uppercaseLean3 false in
@@ -462,7 +461,8 @@ set_option linter.uppercaseLean3 false in
end CategoryTheory.Iso
-/-- Ring equivalences between `Ring`s are the same as (isomorphic to) isomorphisms in `RingCat`. -/
+/-- Ring equivalences between `RingCat`s are the same as (isomorphic to) isomorphisms in
+`RingCat`. -/
def ringEquivIsoRingIso {X Y : Type u} [Ring X] [Ring Y] : X ≃+* Y ≅ RingCat.of X ≅ RingCat.of Y
where
hom e := e.toRingCatIso
@@ -470,7 +470,7 @@ def ringEquivIsoRingIso {X Y : Type u} [Ring X] [Ring Y] : X ≃+* Y ≅ RingCat
set_option linter.uppercaseLean3 false in
#align ring_equiv_iso_Ring_iso ringEquivIsoRingIso
-/-- Ring equivalences between `CommRing`s are the same as (isomorphic to) isomorphisms
+/-- Ring equivalences between `CommRingCat`s are the same as (isomorphic to) isomorphisms
in `CommRingCat`. -/
def ringEquivIsoCommRingIso {X Y : Type u} [CommRing X] [CommRing Y] :
X ≃+* Y ≅ CommRingCat.of X ≅ CommRingCat.of Y
@@ -480,8 +480,7 @@ def ringEquivIsoCommRingIso {X Y : Type u} [CommRing X] [CommRing Y] :
set_option linter.uppercaseLean3 false in
#align ring_equiv_iso_CommRing_iso ringEquivIsoCommRingIso
-instance RingCat.forget_reflects_isos : ReflectsIsomorphisms (forget RingCat.{u})
- where
+instance RingCat.forget_reflects_isos : ReflectsIsomorphisms (forget RingCat.{u}) where
reflects {X Y} f _ := by
let i := asIso ((forget RingCat).map f)
let ff : X →+* Y := f
@@ -490,8 +489,7 @@ instance RingCat.forget_reflects_isos : ReflectsIsomorphisms (forget RingCat.{u}
set_option linter.uppercaseLean3 false in
#align Ring.forget_reflects_isos RingCat.forget_reflects_isos
-instance CommRingCat.forget_reflects_isos : ReflectsIsomorphisms (forget CommRingCat.{u})
- where
+instance CommRingCat.forget_reflects_isos : ReflectsIsomorphisms (forget CommRingCat.{u}) where
reflects {X Y} f _ := by
let i := asIso ((forget CommRingCat).map f)
let ff : X →+* Y := f
This is a replacement for https://github.com/leanprover-community/mathlib4/pull/3105 which makes use of the refactors proposed in https://github.com/leanprover-community/mathlib4/pull/3900.
I'm happy to just merge this into #3105 if that's preferred, but since it depends on a refactor I thought I'd keep it separate for now.
Co-authored-by: Adam Topaz <adamtopaz@users.noreply.github.com> Co-authored-by: adamtopaz <github@adamtopaz.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au> Co-authored-by: Johan Commelin <johan@commelin.net>
The unported dependencies are