category_theory.discrete_categoryMathlib.CategoryTheory.DiscreteCategory

This file has been ported!

Changes since the initial port

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

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(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)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Stephen Morgan, Scott Morrison, Floris van Doorn
 -/
 import CategoryTheory.EqToHom
-import Data.Ulift
+import Data.ULift
 
 #align_import category_theory.discrete_category from "leanprover-community/mathlib"@"23aa88e32dcc9d2a24cca7bc23268567ed4cd7d6"
 
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2017 Scott Morrison. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Stephen Morgan, Scott Morrison, Floris van Doorn
 -/
-import Mathbin.CategoryTheory.EqToHom
-import Mathbin.Data.Ulift
+import CategoryTheory.EqToHom
+import Data.Ulift
 
 #align_import category_theory.discrete_category from "leanprover-community/mathlib"@"23aa88e32dcc9d2a24cca7bc23268567ed4cd7d6"
 
@@ -102,7 +102,7 @@ instance [Inhabited α] : Inhabited (Discrete α) :=
 instance [Subsingleton α] : Subsingleton (Discrete α) :=
   ⟨by intros; ext; apply Subsingleton.elim⟩
 
-/- ./././Mathport/Syntax/Translate/Expr.lean:336:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:337:4: warning: unsupported (TODO): `[tacs] -/
 /-- A simple tactic to run `cases` on any `discrete α` hypotheses. -/
 unsafe def _root_.tactic.discrete_cases : tactic Unit :=
   sorry
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2017 Scott Morrison. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Stephen Morgan, Scott Morrison, Floris van Doorn
-
-! This file was ported from Lean 3 source module category_theory.discrete_category
-! leanprover-community/mathlib commit 23aa88e32dcc9d2a24cca7bc23268567ed4cd7d6
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.CategoryTheory.EqToHom
 import Mathbin.Data.Ulift
 
+#align_import category_theory.discrete_category from "leanprover-community/mathlib"@"23aa88e32dcc9d2a24cca7bc23268567ed4cd7d6"
+
 /-!
 # Discrete categories
 
Diff
@@ -182,15 +182,19 @@ def functor {I : Type u₁} (F : I → C) : Discrete I ⥤ C
 #align category_theory.discrete.functor CategoryTheory.Discrete.functor
 -/
 
+#print CategoryTheory.Discrete.functor_obj /-
 @[simp]
 theorem functor_obj {I : Type u₁} (F : I → C) (i : I) :
     (Discrete.functor F).obj (Discrete.mk i) = F i :=
   rfl
 #align category_theory.discrete.functor_obj CategoryTheory.Discrete.functor_obj
+-/
 
+#print CategoryTheory.Discrete.functor_map /-
 theorem functor_map {I : Type u₁} (F : I → C) {i : Discrete I} (f : i ⟶ i) :
     (Discrete.functor F).map f = 𝟙 (F i.as) := by tidy
 #align category_theory.discrete.functor_map CategoryTheory.Discrete.functor_map
+-/
 
 #print CategoryTheory.Discrete.functorComp /-
 /-- The discrete functor induced by a composition of maps can be written as a
@@ -204,6 +208,7 @@ def functorComp {I : Type u₁} {J : Type u₁'} (f : J → C) (g : I → J) :
 -/
 
 /- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[] -/
+#print CategoryTheory.Discrete.natTrans /-
 /-- For functors out of a discrete category,
 a natural transformation is just a collection of maps,
 as the naturality squares are trivial.
@@ -217,8 +222,10 @@ def natTrans {I : Type u₁} {F G : Discrete I ⥤ C} (f : ∀ i : Discrete I, F
       "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[]";
     cases g; simp
 #align category_theory.discrete.nat_trans CategoryTheory.Discrete.natTrans
+-/
 
 /- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[] -/
+#print CategoryTheory.Discrete.natIso /-
 /-- For functors out of a discrete category,
 a natural isomorphism is just a collection of isomorphisms,
 as the naturality squares are trivial.
@@ -230,13 +237,17 @@ def natIso {I : Type u₁} {F G : Discrete I ⥤ C} (f : ∀ i : Discrete I, F.o
       "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[]";
     cases g; simp
 #align category_theory.discrete.nat_iso CategoryTheory.Discrete.natIso
+-/
 
+#print CategoryTheory.Discrete.natIso_app /-
 @[simp]
 theorem natIso_app {I : Type u₁} {F G : Discrete I ⥤ C} (f : ∀ i : Discrete I, F.obj i ≅ G.obj i)
     (i : Discrete I) : (Discrete.natIso f).app i = f i := by tidy
 #align category_theory.discrete.nat_iso_app CategoryTheory.Discrete.natIso_app
+-/
 
 /- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[] -/
+#print CategoryTheory.Discrete.natIsoFunctor /-
 /-- Every functor `F` from a discrete category is naturally isomorphic (actually, equal) to
   `discrete.functor (F.obj)`. -/
 @[simp]
@@ -246,16 +257,20 @@ def natIsoFunctor {I : Type u₁} {F : Discrete I ⥤ C} : F ≅ Discrete.functo
       "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[]";
     rfl
 #align category_theory.discrete.nat_iso_functor CategoryTheory.Discrete.natIsoFunctor
+-/
 
+#print CategoryTheory.Discrete.compNatIsoDiscrete /-
 /-- Composing `discrete.functor F` with another functor `G` amounts to composing `F` with `G.obj` -/
 @[simp]
 def compNatIsoDiscrete {I : Type u₁} {D : Type u₃} [Category.{v₃} D] (F : I → C) (G : C ⥤ D) :
     Discrete.functor F ⋙ G ≅ Discrete.functor (G.obj ∘ F) :=
   natIso fun i => Iso.refl _
 #align category_theory.discrete.comp_nat_iso_discrete CategoryTheory.Discrete.compNatIsoDiscrete
+-/
 
 /- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[] -/
 /- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[] -/
+#print CategoryTheory.Discrete.equivalence /-
 /-- We can promote a type-level `equiv` to
 an equivalence between the corresponding `discrete` categories.
 -/
@@ -279,7 +294,9 @@ def equivalence {I : Type u₁} {J : Type u₂} (e : I ≃ J) : Discrete I ≌ D
             "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[]";
           simp)
 #align category_theory.discrete.equivalence CategoryTheory.Discrete.equivalence
+-/
 
+#print CategoryTheory.Discrete.equivOfEquivalence /-
 /-- We can convert an equivalence of `discrete` categories to a type-level `equiv`. -/
 @[simps]
 def equivOfEquivalence {α : Type u₁} {β : Type u₂} (h : Discrete α ≌ Discrete β) : α ≃ β
@@ -289,6 +306,7 @@ def equivOfEquivalence {α : Type u₁} {β : Type u₂} (h : Discrete α ≌ Di
   left_inv a := by simpa using eq_of_hom (h.unit_iso.app (discrete.mk a)).2
   right_inv a := by simpa using eq_of_hom (h.counit_iso.app (discrete.mk a)).1
 #align category_theory.discrete.equiv_of_equivalence CategoryTheory.Discrete.equivOfEquivalence
+-/
 
 end Discrete
 
@@ -301,6 +319,7 @@ open Opposite
 /- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[] -/
 /- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:69:18: unsupported non-interactive tactic tactic.op_induction' -/
 /- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[] -/
+#print CategoryTheory.Discrete.opposite /-
 /-- A discrete category is equivalent to its opposite category. -/
 @[simps functor_obj_as inverse_obj]
 protected def opposite (α : Type u₁) : (Discrete α)ᵒᵖ ≌ Discrete α :=
@@ -323,9 +342,11 @@ protected def opposite (α : Type u₁) : (Discrete α)ᵒᵖ ≌ Discrete α :=
       _
   tidy
 #align category_theory.discrete.opposite CategoryTheory.Discrete.opposite
+-/
 
 variable {C : Type u₂} [Category.{v₂} C]
 
+#print CategoryTheory.Discrete.functor_map_id /-
 @[simp]
 theorem functor_map_id (F : Discrete J ⥤ C) {j : Discrete J} (f : j ⟶ j) : F.map f = 𝟙 (F.obj j) :=
   by
@@ -333,6 +354,7 @@ theorem functor_map_id (F : Discrete J ⥤ C) {j : Discrete J} (f : j ⟶ j) : F
   rw [h]
   simp
 #align category_theory.discrete.functor_map_id CategoryTheory.Discrete.functor_map_id
+-/
 
 end Discrete
 
Diff
@@ -105,7 +105,7 @@ instance [Inhabited α] : Inhabited (Discrete α) :=
 instance [Subsingleton α] : Subsingleton (Discrete α) :=
   ⟨by intros; ext; apply Subsingleton.elim⟩
 
-/- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:336:4: warning: unsupported (TODO): `[tacs] -/
 /-- A simple tactic to run `cases` on any `discrete α` hypotheses. -/
 unsafe def _root_.tactic.discrete_cases : tactic Unit :=
   sorry
Diff
@@ -103,7 +103,7 @@ instance [Inhabited α] : Inhabited (Discrete α) :=
   ⟨⟨default⟩⟩
 
 instance [Subsingleton α] : Subsingleton (Discrete α) :=
-  ⟨by intros ; ext; apply Subsingleton.elim⟩
+  ⟨by intros; ext; apply Subsingleton.elim⟩
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
 /-- A simple tactic to run `cases` on any `discrete α` hypotheses. -/
Diff
@@ -182,24 +182,12 @@ def functor {I : Type u₁} (F : I → C) : Discrete I ⥤ C
 #align category_theory.discrete.functor CategoryTheory.Discrete.functor
 -/
 
-/- warning: category_theory.discrete.functor_obj -> CategoryTheory.Discrete.functor_obj is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u1, u3} C] {I : Type.{u2}} (F : I -> C) (i : I), Eq.{succ u3} C (CategoryTheory.Functor.obj.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1 (CategoryTheory.Discrete.functor.{u1, u2, u3} C _inst_1 I F) (CategoryTheory.Discrete.mk.{u2} I i)) (F i)
-but is expected to have type
-  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u1, u3} C] {I : Type.{u2}} (F : I -> C) (i : I), Eq.{succ u3} C (Prefunctor.obj.{succ u2, succ u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.CategoryStruct.toQuiver.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.Category.toCategoryStruct.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I))) C (CategoryTheory.CategoryStruct.toQuiver.{u1, u3} C (CategoryTheory.Category.toCategoryStruct.{u1, u3} C _inst_1)) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1 (CategoryTheory.Discrete.functor.{u1, u2, u3} C _inst_1 I F)) (CategoryTheory.Discrete.mk.{u2} I i)) (F i)
-Case conversion may be inaccurate. Consider using '#align category_theory.discrete.functor_obj CategoryTheory.Discrete.functor_objₓ'. -/
 @[simp]
 theorem functor_obj {I : Type u₁} (F : I → C) (i : I) :
     (Discrete.functor F).obj (Discrete.mk i) = F i :=
   rfl
 #align category_theory.discrete.functor_obj CategoryTheory.Discrete.functor_obj
 
-/- warning: category_theory.discrete.functor_map -> CategoryTheory.Discrete.functor_map is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u1, u3} C] {I : Type.{u2}} (F : I -> C) {i : CategoryTheory.Discrete.{u2} I} (f : Quiver.Hom.{succ u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.CategoryStruct.toQuiver.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.Category.toCategoryStruct.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I))) i i), Eq.{succ u1} (Quiver.Hom.{succ u1, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u3} C (CategoryTheory.Category.toCategoryStruct.{u1, u3} C _inst_1)) (CategoryTheory.Functor.obj.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1 (CategoryTheory.Discrete.functor.{u1, u2, u3} C _inst_1 I F) i) (CategoryTheory.Functor.obj.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1 (CategoryTheory.Discrete.functor.{u1, u2, u3} C _inst_1 I F) i)) (CategoryTheory.Functor.map.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1 (CategoryTheory.Discrete.functor.{u1, u2, u3} C _inst_1 I F) i i f) (CategoryTheory.CategoryStruct.id.{u1, u3} C (CategoryTheory.Category.toCategoryStruct.{u1, u3} C _inst_1) (F (CategoryTheory.Discrete.as.{u2} I i)))
-but is expected to have type
-  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u1, u3} C] {I : Type.{u2}} (F : I -> C) {i : CategoryTheory.Discrete.{u2} I} (f : Quiver.Hom.{succ u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.CategoryStruct.toQuiver.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.Category.toCategoryStruct.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I))) i i), Eq.{succ u1} (Quiver.Hom.{succ u1, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u3} C (CategoryTheory.Category.toCategoryStruct.{u1, u3} C _inst_1)) (Prefunctor.obj.{succ u2, succ u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.CategoryStruct.toQuiver.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.Category.toCategoryStruct.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I))) C (CategoryTheory.CategoryStruct.toQuiver.{u1, u3} C (CategoryTheory.Category.toCategoryStruct.{u1, u3} C _inst_1)) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1 (CategoryTheory.Discrete.functor.{u1, u2, u3} C _inst_1 I F)) i) (Prefunctor.obj.{succ u2, succ u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.CategoryStruct.toQuiver.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.Category.toCategoryStruct.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I))) C (CategoryTheory.CategoryStruct.toQuiver.{u1, u3} C (CategoryTheory.Category.toCategoryStruct.{u1, u3} C _inst_1)) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1 (CategoryTheory.Discrete.functor.{u1, u2, u3} C _inst_1 I F)) i)) (Prefunctor.map.{succ u2, succ u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.CategoryStruct.toQuiver.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.Category.toCategoryStruct.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I))) C (CategoryTheory.CategoryStruct.toQuiver.{u1, u3} C (CategoryTheory.Category.toCategoryStruct.{u1, u3} C _inst_1)) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1 (CategoryTheory.Discrete.functor.{u1, u2, u3} C _inst_1 I F)) i i f) (CategoryTheory.CategoryStruct.id.{u1, u3} C (CategoryTheory.Category.toCategoryStruct.{u1, u3} C _inst_1) (F (CategoryTheory.Discrete.as.{u2} I i)))
-Case conversion may be inaccurate. Consider using '#align category_theory.discrete.functor_map CategoryTheory.Discrete.functor_mapₓ'. -/
 theorem functor_map {I : Type u₁} (F : I → C) {i : Discrete I} (f : i ⟶ i) :
     (Discrete.functor F).map f = 𝟙 (F i.as) := by tidy
 #align category_theory.discrete.functor_map CategoryTheory.Discrete.functor_map
@@ -215,12 +203,6 @@ def functorComp {I : Type u₁} {J : Type u₁'} (f : J → C) (g : I → J) :
 #align category_theory.discrete.functor_comp CategoryTheory.Discrete.functorComp
 -/
 
-/- warning: category_theory.discrete.nat_trans -> CategoryTheory.Discrete.natTrans is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u1, u3} C] {I : Type.{u2}} {F : CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1} {G : CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1}, (forall (i : CategoryTheory.Discrete.{u2} I), Quiver.Hom.{succ u1, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u3} C (CategoryTheory.Category.toCategoryStruct.{u1, u3} C _inst_1)) (CategoryTheory.Functor.obj.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1 F i) (CategoryTheory.Functor.obj.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1 G i)) -> (Quiver.Hom.{succ (max u2 u1), max u2 u1 u2 u3} (CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1) (CategoryTheory.CategoryStruct.toQuiver.{max u2 u1, max u2 u1 u2 u3} (CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1) (CategoryTheory.Category.toCategoryStruct.{max u2 u1, max u2 u1 u2 u3} (CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1) (CategoryTheory.Functor.category.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1))) F G)
-but is expected to have type
-  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u1, u3} C] {I : Type.{u2}} {F : CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1} {G : CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1}, (forall (i : CategoryTheory.Discrete.{u2} I), Quiver.Hom.{succ u1, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u3} C (CategoryTheory.Category.toCategoryStruct.{u1, u3} C _inst_1)) (Prefunctor.obj.{succ u2, succ u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.CategoryStruct.toQuiver.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.Category.toCategoryStruct.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I))) C (CategoryTheory.CategoryStruct.toQuiver.{u1, u3} C (CategoryTheory.Category.toCategoryStruct.{u1, u3} C _inst_1)) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1 F) i) (Prefunctor.obj.{succ u2, succ u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.CategoryStruct.toQuiver.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.Category.toCategoryStruct.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I))) C (CategoryTheory.CategoryStruct.toQuiver.{u1, u3} C (CategoryTheory.Category.toCategoryStruct.{u1, u3} C _inst_1)) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1 G) i)) -> (Quiver.Hom.{max (succ u2) (succ u1), max (max u2 u3) u1} (CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1) (CategoryTheory.CategoryStruct.toQuiver.{max u2 u1, max (max u2 u3) u1} (CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1) (CategoryTheory.Category.toCategoryStruct.{max u2 u1, max (max u2 u3) u1} (CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1) (CategoryTheory.Functor.category.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1))) F G)
-Case conversion may be inaccurate. Consider using '#align category_theory.discrete.nat_trans CategoryTheory.Discrete.natTransₓ'. -/
 /- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[] -/
 /-- For functors out of a discrete category,
 a natural transformation is just a collection of maps,
@@ -236,12 +218,6 @@ def natTrans {I : Type u₁} {F G : Discrete I ⥤ C} (f : ∀ i : Discrete I, F
     cases g; simp
 #align category_theory.discrete.nat_trans CategoryTheory.Discrete.natTrans
 
-/- warning: category_theory.discrete.nat_iso -> CategoryTheory.Discrete.natIso is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u1, u3} C] {I : Type.{u2}} {F : CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1} {G : CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1}, (forall (i : CategoryTheory.Discrete.{u2} I), CategoryTheory.Iso.{u1, u3} C _inst_1 (CategoryTheory.Functor.obj.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1 F i) (CategoryTheory.Functor.obj.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1 G i)) -> (CategoryTheory.Iso.{max u2 u1, max u2 u1 u2 u3} (CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1) (CategoryTheory.Functor.category.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1) F G)
-but is expected to have type
-  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u1, u3} C] {I : Type.{u2}} {F : CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1} {G : CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1}, (forall (i : CategoryTheory.Discrete.{u2} I), CategoryTheory.Iso.{u1, u3} C _inst_1 (Prefunctor.obj.{succ u2, succ u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.CategoryStruct.toQuiver.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.Category.toCategoryStruct.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I))) C (CategoryTheory.CategoryStruct.toQuiver.{u1, u3} C (CategoryTheory.Category.toCategoryStruct.{u1, u3} C _inst_1)) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1 F) i) (Prefunctor.obj.{succ u2, succ u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.CategoryStruct.toQuiver.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.Category.toCategoryStruct.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I))) C (CategoryTheory.CategoryStruct.toQuiver.{u1, u3} C (CategoryTheory.Category.toCategoryStruct.{u1, u3} C _inst_1)) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1 G) i)) -> (CategoryTheory.Iso.{max u2 u1, max (max u2 u3) u1} (CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1) (CategoryTheory.Functor.category.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1) F G)
-Case conversion may be inaccurate. Consider using '#align category_theory.discrete.nat_iso CategoryTheory.Discrete.natIsoₓ'. -/
 /- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[] -/
 /-- For functors out of a discrete category,
 a natural isomorphism is just a collection of isomorphisms,
@@ -255,23 +231,11 @@ def natIso {I : Type u₁} {F G : Discrete I ⥤ C} (f : ∀ i : Discrete I, F.o
     cases g; simp
 #align category_theory.discrete.nat_iso CategoryTheory.Discrete.natIso
 
-/- warning: category_theory.discrete.nat_iso_app -> CategoryTheory.Discrete.natIso_app is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u1, u3} C] {I : Type.{u2}} {F : CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1} {G : CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1} (f : forall (i : CategoryTheory.Discrete.{u2} I), CategoryTheory.Iso.{u1, u3} C _inst_1 (CategoryTheory.Functor.obj.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1 F i) (CategoryTheory.Functor.obj.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1 G i)) (i : CategoryTheory.Discrete.{u2} I), Eq.{succ u1} (CategoryTheory.Iso.{u1, u3} C _inst_1 (CategoryTheory.Functor.obj.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1 F i) (CategoryTheory.Functor.obj.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1 G i)) (CategoryTheory.Iso.app.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1 F G (CategoryTheory.Discrete.natIso.{u1, u2, u3} C _inst_1 I F G f) i) (f i)
-but is expected to have type
-  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u1, u3} C] {I : Type.{u2}} {F : CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1} {G : CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1} (f : forall (i : CategoryTheory.Discrete.{u2} I), CategoryTheory.Iso.{u1, u3} C _inst_1 (Prefunctor.obj.{succ u2, succ u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.CategoryStruct.toQuiver.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.Category.toCategoryStruct.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I))) C (CategoryTheory.CategoryStruct.toQuiver.{u1, u3} C (CategoryTheory.Category.toCategoryStruct.{u1, u3} C _inst_1)) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1 F) i) (Prefunctor.obj.{succ u2, succ u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.CategoryStruct.toQuiver.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.Category.toCategoryStruct.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I))) C (CategoryTheory.CategoryStruct.toQuiver.{u1, u3} C (CategoryTheory.Category.toCategoryStruct.{u1, u3} C _inst_1)) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1 G) i)) (i : CategoryTheory.Discrete.{u2} I), Eq.{succ u1} (CategoryTheory.Iso.{u1, u3} C _inst_1 (Prefunctor.obj.{succ u2, succ u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.CategoryStruct.toQuiver.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.Category.toCategoryStruct.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I))) C (CategoryTheory.CategoryStruct.toQuiver.{u1, u3} C (CategoryTheory.Category.toCategoryStruct.{u1, u3} C _inst_1)) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1 F) i) (Prefunctor.obj.{succ u2, succ u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.CategoryStruct.toQuiver.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.Category.toCategoryStruct.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I))) C (CategoryTheory.CategoryStruct.toQuiver.{u1, u3} C (CategoryTheory.Category.toCategoryStruct.{u1, u3} C _inst_1)) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1 G) i)) (CategoryTheory.Iso.app.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1 F G (CategoryTheory.Discrete.natIso.{u1, u2, u3} C _inst_1 I F G f) i) (f i)
-Case conversion may be inaccurate. Consider using '#align category_theory.discrete.nat_iso_app CategoryTheory.Discrete.natIso_appₓ'. -/
 @[simp]
 theorem natIso_app {I : Type u₁} {F G : Discrete I ⥤ C} (f : ∀ i : Discrete I, F.obj i ≅ G.obj i)
     (i : Discrete I) : (Discrete.natIso f).app i = f i := by tidy
 #align category_theory.discrete.nat_iso_app CategoryTheory.Discrete.natIso_app
 
-/- warning: category_theory.discrete.nat_iso_functor -> CategoryTheory.Discrete.natIsoFunctor is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u1, u3} C] {I : Type.{u2}} {F : CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1}, CategoryTheory.Iso.{max u2 u1, max u2 u1 u2 u3} (CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1) (CategoryTheory.Functor.category.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1) F (CategoryTheory.Discrete.functor.{u1, u2, u3} C _inst_1 I (Function.comp.{succ u2, succ u2, succ u3} I (CategoryTheory.Discrete.{u2} I) C (CategoryTheory.Functor.obj.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1 F) (CategoryTheory.Discrete.mk.{u2} I)))
-but is expected to have type
-  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u1, u3} C] {I : Type.{u2}} {F : CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1}, CategoryTheory.Iso.{max u2 u1, max (max u2 u3) u1} (CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1) (CategoryTheory.Functor.category.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1) F (CategoryTheory.Discrete.functor.{u1, u2, u3} C _inst_1 I (Function.comp.{succ u2, succ u2, succ u3} I (CategoryTheory.Discrete.{u2} I) C (Prefunctor.obj.{succ u2, succ u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.CategoryStruct.toQuiver.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.Category.toCategoryStruct.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I))) C (CategoryTheory.CategoryStruct.toQuiver.{u1, u3} C (CategoryTheory.Category.toCategoryStruct.{u1, u3} C _inst_1)) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1 F)) (CategoryTheory.Discrete.mk.{u2} I)))
-Case conversion may be inaccurate. Consider using '#align category_theory.discrete.nat_iso_functor CategoryTheory.Discrete.natIsoFunctorₓ'. -/
 /- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[] -/
 /-- Every functor `F` from a discrete category is naturally isomorphic (actually, equal) to
   `discrete.functor (F.obj)`. -/
@@ -283,12 +247,6 @@ def natIsoFunctor {I : Type u₁} {F : Discrete I ⥤ C} : F ≅ Discrete.functo
     rfl
 #align category_theory.discrete.nat_iso_functor CategoryTheory.Discrete.natIsoFunctor
 
-/- warning: category_theory.discrete.comp_nat_iso_discrete -> CategoryTheory.Discrete.compNatIsoDiscrete is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u4}} [_inst_1 : CategoryTheory.Category.{u1, u4} C] {I : Type.{u3}} {D : Type.{u5}} [_inst_2 : CategoryTheory.Category.{u2, u5} D] (F : I -> C) (G : CategoryTheory.Functor.{u1, u2, u4, u5} C _inst_1 D _inst_2), CategoryTheory.Iso.{max u3 u2, max u3 u2 u3 u5} (CategoryTheory.Functor.{u3, u2, u3, u5} (CategoryTheory.Discrete.{u3} I) (CategoryTheory.discreteCategory.{u3} I) D _inst_2) (CategoryTheory.Functor.category.{u3, u2, u3, u5} (CategoryTheory.Discrete.{u3} I) (CategoryTheory.discreteCategory.{u3} I) D _inst_2) (CategoryTheory.Functor.comp.{u3, u1, u2, u3, u4, u5} (CategoryTheory.Discrete.{u3} I) (CategoryTheory.discreteCategory.{u3} I) C _inst_1 D _inst_2 (CategoryTheory.Discrete.functor.{u1, u3, u4} C _inst_1 I F) G) (CategoryTheory.Discrete.functor.{u2, u3, u5} D _inst_2 I (Function.comp.{succ u3, succ u4, succ u5} I C D (CategoryTheory.Functor.obj.{u1, u2, u4, u5} C _inst_1 D _inst_2 G) F))
-but is expected to have type
-  forall {C : Type.{u4}} [_inst_1 : CategoryTheory.Category.{u1, u4} C] {I : Type.{u3}} {D : Type.{u5}} [_inst_2 : CategoryTheory.Category.{u2, u5} D] (F : I -> C) (G : CategoryTheory.Functor.{u1, u2, u4, u5} C _inst_1 D _inst_2), CategoryTheory.Iso.{max u3 u2, max (max (max u5 u3) u2) u3} (CategoryTheory.Functor.{u3, u2, u3, u5} (CategoryTheory.Discrete.{u3} I) (CategoryTheory.discreteCategory.{u3} I) D _inst_2) (CategoryTheory.Functor.category.{u3, u2, u3, u5} (CategoryTheory.Discrete.{u3} I) (CategoryTheory.discreteCategory.{u3} I) D _inst_2) (CategoryTheory.Functor.comp.{u3, u1, u2, u3, u4, u5} (CategoryTheory.Discrete.{u3} I) (CategoryTheory.discreteCategory.{u3} I) C _inst_1 D _inst_2 (CategoryTheory.Discrete.functor.{u1, u3, u4} C _inst_1 I F) G) (CategoryTheory.Discrete.functor.{u2, u3, u5} D _inst_2 I (Function.comp.{succ u3, succ u4, succ u5} I C D (Prefunctor.obj.{succ u1, succ u2, u4, u5} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u4} C (CategoryTheory.Category.toCategoryStruct.{u1, u4} C _inst_1)) D (CategoryTheory.CategoryStruct.toQuiver.{u2, u5} D (CategoryTheory.Category.toCategoryStruct.{u2, u5} D _inst_2)) (CategoryTheory.Functor.toPrefunctor.{u1, u2, u4, u5} C _inst_1 D _inst_2 G)) F))
-Case conversion may be inaccurate. Consider using '#align category_theory.discrete.comp_nat_iso_discrete CategoryTheory.Discrete.compNatIsoDiscreteₓ'. -/
 /-- Composing `discrete.functor F` with another functor `G` amounts to composing `F` with `G.obj` -/
 @[simp]
 def compNatIsoDiscrete {I : Type u₁} {D : Type u₃} [Category.{v₃} D] (F : I → C) (G : C ⥤ D) :
@@ -296,12 +254,6 @@ def compNatIsoDiscrete {I : Type u₁} {D : Type u₃} [Category.{v₃} D] (F :
   natIso fun i => Iso.refl _
 #align category_theory.discrete.comp_nat_iso_discrete CategoryTheory.Discrete.compNatIsoDiscrete
 
-/- warning: category_theory.discrete.equivalence -> CategoryTheory.Discrete.equivalence is a dubious translation:
-lean 3 declaration is
-  forall {I : Type.{u1}} {J : Type.{u2}}, (Equiv.{succ u1, succ u2} I J) -> (CategoryTheory.Equivalence.{u1, u2, u1, u2} (CategoryTheory.Discrete.{u1} I) (CategoryTheory.discreteCategory.{u1} I) (CategoryTheory.Discrete.{u2} J) (CategoryTheory.discreteCategory.{u2} J))
-but is expected to have type
-  forall {I : Type.{u1}} {J : Type.{u2}}, (Equiv.{succ u1, succ u2} I J) -> (CategoryTheory.Equivalence.{u1, u2, u1, u2} (CategoryTheory.Discrete.{u1} I) (CategoryTheory.Discrete.{u2} J) (CategoryTheory.discreteCategory.{u1} I) (CategoryTheory.discreteCategory.{u2} J))
-Case conversion may be inaccurate. Consider using '#align category_theory.discrete.equivalence CategoryTheory.Discrete.equivalenceₓ'. -/
 /- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[] -/
 /- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[] -/
 /-- We can promote a type-level `equiv` to
@@ -328,12 +280,6 @@ def equivalence {I : Type u₁} {J : Type u₂} (e : I ≃ J) : Discrete I ≌ D
           simp)
 #align category_theory.discrete.equivalence CategoryTheory.Discrete.equivalence
 
-/- warning: category_theory.discrete.equiv_of_equivalence -> CategoryTheory.Discrete.equivOfEquivalence is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}}, (CategoryTheory.Equivalence.{u1, u2, u1, u2} (CategoryTheory.Discrete.{u1} α) (CategoryTheory.discreteCategory.{u1} α) (CategoryTheory.Discrete.{u2} β) (CategoryTheory.discreteCategory.{u2} β)) -> (Equiv.{succ u1, succ u2} α β)
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}}, (CategoryTheory.Equivalence.{u1, u2, u1, u2} (CategoryTheory.Discrete.{u1} α) (CategoryTheory.Discrete.{u2} β) (CategoryTheory.discreteCategory.{u1} α) (CategoryTheory.discreteCategory.{u2} β)) -> (Equiv.{succ u1, succ u2} α β)
-Case conversion may be inaccurate. Consider using '#align category_theory.discrete.equiv_of_equivalence CategoryTheory.Discrete.equivOfEquivalenceₓ'. -/
 /-- We can convert an equivalence of `discrete` categories to a type-level `equiv`. -/
 @[simps]
 def equivOfEquivalence {α : Type u₁} {β : Type u₂} (h : Discrete α ≌ Discrete β) : α ≃ β
@@ -352,12 +298,6 @@ variable {J : Type v₁}
 
 open Opposite
 
-/- warning: category_theory.discrete.opposite -> CategoryTheory.Discrete.opposite is a dubious translation:
-lean 3 declaration is
-  forall (α : Type.{u1}), CategoryTheory.Equivalence.{u1, u1, u1, u1} (Opposite.{succ u1} (CategoryTheory.Discrete.{u1} α)) (CategoryTheory.Category.opposite.{u1, u1} (CategoryTheory.Discrete.{u1} α) (CategoryTheory.discreteCategory.{u1} α)) (CategoryTheory.Discrete.{u1} α) (CategoryTheory.discreteCategory.{u1} α)
-but is expected to have type
-  forall (α : Type.{u1}), CategoryTheory.Equivalence.{u1, u1, u1, u1} (Opposite.{succ u1} (CategoryTheory.Discrete.{u1} α)) (CategoryTheory.Discrete.{u1} α) (CategoryTheory.Category.opposite.{u1, u1} (CategoryTheory.Discrete.{u1} α) (CategoryTheory.discreteCategory.{u1} α)) (CategoryTheory.discreteCategory.{u1} α)
-Case conversion may be inaccurate. Consider using '#align category_theory.discrete.opposite CategoryTheory.Discrete.oppositeₓ'. -/
 /- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[] -/
 /- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:69:18: unsupported non-interactive tactic tactic.op_induction' -/
 /- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[] -/
@@ -386,12 +326,6 @@ protected def opposite (α : Type u₁) : (Discrete α)ᵒᵖ ≌ Discrete α :=
 
 variable {C : Type u₂} [Category.{v₂} C]
 
-/- warning: category_theory.discrete.functor_map_id -> CategoryTheory.Discrete.functor_map_id is a dubious translation:
-lean 3 declaration is
-  forall {J : Type.{u1}} {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u2, u3} C] (F : CategoryTheory.Functor.{u1, u2, u1, u3} (CategoryTheory.Discrete.{u1} J) (CategoryTheory.discreteCategory.{u1} J) C _inst_1) {j : CategoryTheory.Discrete.{u1} J} (f : Quiver.Hom.{succ u1, u1} (CategoryTheory.Discrete.{u1} J) (CategoryTheory.CategoryStruct.toQuiver.{u1, u1} (CategoryTheory.Discrete.{u1} J) (CategoryTheory.Category.toCategoryStruct.{u1, u1} (CategoryTheory.Discrete.{u1} J) (CategoryTheory.discreteCategory.{u1} J))) j j), Eq.{succ u2} (Quiver.Hom.{succ u2, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) (CategoryTheory.Functor.obj.{u1, u2, u1, u3} (CategoryTheory.Discrete.{u1} J) (CategoryTheory.discreteCategory.{u1} J) C _inst_1 F j) (CategoryTheory.Functor.obj.{u1, u2, u1, u3} (CategoryTheory.Discrete.{u1} J) (CategoryTheory.discreteCategory.{u1} J) C _inst_1 F j)) (CategoryTheory.Functor.map.{u1, u2, u1, u3} (CategoryTheory.Discrete.{u1} J) (CategoryTheory.discreteCategory.{u1} J) C _inst_1 F j j f) (CategoryTheory.CategoryStruct.id.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1) (CategoryTheory.Functor.obj.{u1, u2, u1, u3} (CategoryTheory.Discrete.{u1} J) (CategoryTheory.discreteCategory.{u1} J) C _inst_1 F j))
-but is expected to have type
-  forall {J : Type.{u1}} {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u2, u3} C] (F : CategoryTheory.Functor.{u1, u2, u1, u3} (CategoryTheory.Discrete.{u1} J) (CategoryTheory.discreteCategory.{u1} J) C _inst_1) {j : CategoryTheory.Discrete.{u1} J} (f : Quiver.Hom.{succ u1, u1} (CategoryTheory.Discrete.{u1} J) (CategoryTheory.CategoryStruct.toQuiver.{u1, u1} (CategoryTheory.Discrete.{u1} J) (CategoryTheory.Category.toCategoryStruct.{u1, u1} (CategoryTheory.Discrete.{u1} J) (CategoryTheory.discreteCategory.{u1} J))) j j), Eq.{succ u2} (Quiver.Hom.{succ u2, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) (Prefunctor.obj.{succ u1, succ u2, u1, u3} (CategoryTheory.Discrete.{u1} J) (CategoryTheory.CategoryStruct.toQuiver.{u1, u1} (CategoryTheory.Discrete.{u1} J) (CategoryTheory.Category.toCategoryStruct.{u1, u1} (CategoryTheory.Discrete.{u1} J) (CategoryTheory.discreteCategory.{u1} J))) C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) (CategoryTheory.Functor.toPrefunctor.{u1, u2, u1, u3} (CategoryTheory.Discrete.{u1} J) (CategoryTheory.discreteCategory.{u1} J) C _inst_1 F) j) (Prefunctor.obj.{succ u1, succ u2, u1, u3} (CategoryTheory.Discrete.{u1} J) (CategoryTheory.CategoryStruct.toQuiver.{u1, u1} (CategoryTheory.Discrete.{u1} J) (CategoryTheory.Category.toCategoryStruct.{u1, u1} (CategoryTheory.Discrete.{u1} J) (CategoryTheory.discreteCategory.{u1} J))) C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) (CategoryTheory.Functor.toPrefunctor.{u1, u2, u1, u3} (CategoryTheory.Discrete.{u1} J) (CategoryTheory.discreteCategory.{u1} J) C _inst_1 F) j)) (Prefunctor.map.{succ u1, succ u2, u1, u3} (CategoryTheory.Discrete.{u1} J) (CategoryTheory.CategoryStruct.toQuiver.{u1, u1} (CategoryTheory.Discrete.{u1} J) (CategoryTheory.Category.toCategoryStruct.{u1, u1} (CategoryTheory.Discrete.{u1} J) (CategoryTheory.discreteCategory.{u1} J))) C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) (CategoryTheory.Functor.toPrefunctor.{u1, u2, u1, u3} (CategoryTheory.Discrete.{u1} J) (CategoryTheory.discreteCategory.{u1} J) C _inst_1 F) j j f) (CategoryTheory.CategoryStruct.id.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1) (Prefunctor.obj.{succ u1, succ u2, u1, u3} (CategoryTheory.Discrete.{u1} J) (CategoryTheory.CategoryStruct.toQuiver.{u1, u1} (CategoryTheory.Discrete.{u1} J) (CategoryTheory.Category.toCategoryStruct.{u1, u1} (CategoryTheory.Discrete.{u1} J) (CategoryTheory.discreteCategory.{u1} J))) C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) (CategoryTheory.Functor.toPrefunctor.{u1, u2, u1, u3} (CategoryTheory.Discrete.{u1} J) (CategoryTheory.discreteCategory.{u1} J) C _inst_1 F) j))
-Case conversion may be inaccurate. Consider using '#align category_theory.discrete.functor_map_id CategoryTheory.Discrete.functor_map_idₓ'. -/
 @[simp]
 theorem functor_map_id (F : Discrete J ⥤ C) {j : Discrete J} (f : j ⟶ j) : F.map f = 𝟙 (F.obj j) :=
   by
Diff
@@ -60,10 +60,7 @@ structure Discrete (α : Type u₁) where
 
 #print CategoryTheory.Discrete.mk_as /-
 @[simp]
-theorem Discrete.mk_as {α : Type u₁} (X : Discrete α) : Discrete.mk X.as = X :=
-  by
-  ext
-  rfl
+theorem Discrete.mk_as {α : Type u₁} (X : Discrete α) : Discrete.mk X.as = X := by ext; rfl
 #align category_theory.discrete.mk_as CategoryTheory.Discrete.mk_as
 -/
 
@@ -94,12 +91,7 @@ instance discreteCategory (α : Type u₁) : SmallCategory (Discrete α)
     where
   Hom X Y := ULift (PLift (X.as = Y.as))
   id X := ULift.up (PLift.up rfl)
-  comp X Y Z g f := by
-    cases X
-    cases Y
-    cases Z
-    rcases f with ⟨⟨⟨⟩⟩⟩
-    exact g
+  comp X Y Z g f := by cases X; cases Y; cases Z; rcases f with ⟨⟨⟨⟩⟩⟩; exact g
 #align category_theory.discrete_category CategoryTheory.discreteCategory
 -/
 
@@ -111,10 +103,7 @@ instance [Inhabited α] : Inhabited (Discrete α) :=
   ⟨⟨default⟩⟩
 
 instance [Subsingleton α] : Subsingleton (Discrete α) :=
-  ⟨by
-    intros
-    ext
-    apply Subsingleton.elim⟩
+  ⟨by intros ; ext; apply Subsingleton.elim⟩
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
 /-- A simple tactic to run `cases` on any `discrete α` hypotheses. -/
@@ -141,10 +130,7 @@ theorem eq_of_hom {X Y : Discrete α} (i : X ⟶ Y) : X.as = Y.as :=
 /-- Promote an equation between the wrapped terms in `X Y : discrete α` to a morphism `X ⟶ Y`
 in the discrete category. -/
 abbrev eqToHom {X Y : Discrete α} (h : X.as = Y.as) : X ⟶ Y :=
-  eqToHom
-    (by
-      ext
-      exact h)
+  eqToHom (by ext; exact h)
 #align category_theory.discrete.eq_to_hom CategoryTheory.Discrete.eqToHom
 -/
 
@@ -152,10 +138,7 @@ abbrev eqToHom {X Y : Discrete α} (h : X.as = Y.as) : X ⟶ Y :=
 /-- Promote an equation between the wrapped terms in `X Y : discrete α` to an isomorphism `X ≅ Y`
 in the discrete category. -/
 abbrev eqToIso {X Y : Discrete α} (h : X.as = Y.as) : X ≅ Y :=
-  eqToIso
-    (by
-      ext
-      exact h)
+  eqToIso (by ext; exact h)
 #align category_theory.discrete.eq_to_iso CategoryTheory.Discrete.eqToIso
 -/
 
@@ -192,12 +175,10 @@ instance {I : Type u₁} {i j : Discrete I} (f : i ⟶ j) : IsIso f :=
 def functor {I : Type u₁} (F : I → C) : Discrete I ⥤ C
     where
   obj := F ∘ Discrete.as
-  map X Y f :=
-    by
+  map X Y f := by
     trace
-      "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[]"
-    cases f
-    exact 𝟙 (F X)
+      "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[]";
+    cases f; exact 𝟙 (F X)
 #align category_theory.discrete.functor CategoryTheory.Discrete.functor
 -/
 
@@ -249,12 +230,10 @@ as the naturality squares are trivial.
 def natTrans {I : Type u₁} {F G : Discrete I ⥤ C} (f : ∀ i : Discrete I, F.obj i ⟶ G.obj i) : F ⟶ G
     where
   app := f
-  naturality' X Y g :=
-    by
+  naturality' X Y g := by
     trace
-      "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[]"
-    cases g
-    simp
+      "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[]";
+    cases g; simp
 #align category_theory.discrete.nat_trans CategoryTheory.Discrete.natTrans
 
 /- warning: category_theory.discrete.nat_iso -> CategoryTheory.Discrete.natIso is a dubious translation:
@@ -270,12 +249,10 @@ as the naturality squares are trivial.
 -/
 @[simps]
 def natIso {I : Type u₁} {F G : Discrete I ⥤ C} (f : ∀ i : Discrete I, F.obj i ≅ G.obj i) : F ≅ G :=
-  NatIso.ofComponents f fun X Y g =>
-    by
+  NatIso.ofComponents f fun X Y g => by
     trace
-      "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[]"
-    cases g
-    simp
+      "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[]";
+    cases g; simp
 #align category_theory.discrete.nat_iso CategoryTheory.Discrete.natIso
 
 /- warning: category_theory.discrete.nat_iso_app -> CategoryTheory.Discrete.natIso_app is a dubious translation:
@@ -300,10 +277,9 @@ Case conversion may be inaccurate. Consider using '#align category_theory.discre
   `discrete.functor (F.obj)`. -/
 @[simp]
 def natIsoFunctor {I : Type u₁} {F : Discrete I ⥤ C} : F ≅ Discrete.functor (F.obj ∘ Discrete.mk) :=
-  natIso fun i =>
-    by
+  natIso fun i => by
     trace
-      "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[]"
+      "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[]";
     rfl
 #align category_theory.discrete.nat_iso_functor CategoryTheory.Discrete.natIsoFunctor
 
@@ -341,14 +317,14 @@ def equivalence {I : Type u₁} {J : Type u₂} (e : I ≃ J) : Discrete I ≌ D
       eqToIso
         (by
           trace
-            "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[]"
+            "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[]";
           simp)
   counitIso :=
     Discrete.natIso fun j =>
       eqToIso
         (by
           trace
-            "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[]"
+            "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[]";
           simp)
 #align category_theory.discrete.equivalence CategoryTheory.Discrete.equivalence
 
@@ -392,19 +368,17 @@ protected def opposite (α : Type u₁) : (Discrete α)ᵒᵖ ≌ Discrete α :=
   let F : Discrete α ⥤ (Discrete α)ᵒᵖ := Discrete.functor fun x => op (Discrete.mk x)
   refine'
     equivalence.mk (functor.left_op F) F _
-      (discrete.nat_iso fun X =>
-        by
+      (discrete.nat_iso fun X => by
         trace
-          "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[]"
+          "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[]";
         simp [F])
   refine'
     nat_iso.of_components
-      (fun X =>
-        by
+      (fun X => by
         run_tac
-          tactic.op_induction'
+          tactic.op_induction';
         trace
-          "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[]"
+          "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[]";
         simp [F])
       _
   tidy
@@ -421,10 +395,7 @@ Case conversion may be inaccurate. Consider using '#align category_theory.discre
 @[simp]
 theorem functor_map_id (F : Discrete J ⥤ C) {j : Discrete J} (f : j ⟶ j) : F.map f = 𝟙 (F.obj j) :=
   by
-  have h : f = 𝟙 j := by
-    cases f
-    cases f
-    ext
+  have h : f = 𝟙 j := by cases f; cases f; ext
   rw [h]
   simp
 #align category_theory.discrete.functor_map_id CategoryTheory.Discrete.functor_map_id
Diff
@@ -116,7 +116,7 @@ instance [Subsingleton α] : Subsingleton (Discrete α) :=
     ext
     apply Subsingleton.elim⟩
 
-/- ./././Mathport/Syntax/Translate/Expr.lean:334:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
 /-- A simple tactic to run `cases` on any `discrete α` hypotheses. -/
 unsafe def _root_.tactic.discrete_cases : tactic Unit :=
   sorry
@@ -185,7 +185,7 @@ variable {C : Type u₂} [Category.{v₂} C]
 instance {I : Type u₁} {i j : Discrete I} (f : i ⟶ j) : IsIso f :=
   ⟨⟨eqToHom (eq_of_hom f).symm, by tidy⟩⟩
 
-/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:76:14: unsupported tactic `discrete_cases #[] -/
+/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[] -/
 #print CategoryTheory.Discrete.functor /-
 /-- Any function `I → C` gives a functor `discrete I ⥤ C`.
 -/
@@ -195,7 +195,7 @@ def functor {I : Type u₁} (F : I → C) : Discrete I ⥤ C
   map X Y f :=
     by
     trace
-      "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:76:14: unsupported tactic `discrete_cases #[]"
+      "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[]"
     cases f
     exact 𝟙 (F X)
 #align category_theory.discrete.functor CategoryTheory.Discrete.functor
@@ -240,7 +240,7 @@ lean 3 declaration is
 but is expected to have type
   forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u1, u3} C] {I : Type.{u2}} {F : CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1} {G : CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1}, (forall (i : CategoryTheory.Discrete.{u2} I), Quiver.Hom.{succ u1, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u3} C (CategoryTheory.Category.toCategoryStruct.{u1, u3} C _inst_1)) (Prefunctor.obj.{succ u2, succ u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.CategoryStruct.toQuiver.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.Category.toCategoryStruct.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I))) C (CategoryTheory.CategoryStruct.toQuiver.{u1, u3} C (CategoryTheory.Category.toCategoryStruct.{u1, u3} C _inst_1)) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1 F) i) (Prefunctor.obj.{succ u2, succ u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.CategoryStruct.toQuiver.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.Category.toCategoryStruct.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I))) C (CategoryTheory.CategoryStruct.toQuiver.{u1, u3} C (CategoryTheory.Category.toCategoryStruct.{u1, u3} C _inst_1)) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1 G) i)) -> (Quiver.Hom.{max (succ u2) (succ u1), max (max u2 u3) u1} (CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1) (CategoryTheory.CategoryStruct.toQuiver.{max u2 u1, max (max u2 u3) u1} (CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1) (CategoryTheory.Category.toCategoryStruct.{max u2 u1, max (max u2 u3) u1} (CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1) (CategoryTheory.Functor.category.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1))) F G)
 Case conversion may be inaccurate. Consider using '#align category_theory.discrete.nat_trans CategoryTheory.Discrete.natTransₓ'. -/
-/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:76:14: unsupported tactic `discrete_cases #[] -/
+/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[] -/
 /-- For functors out of a discrete category,
 a natural transformation is just a collection of maps,
 as the naturality squares are trivial.
@@ -252,7 +252,7 @@ def natTrans {I : Type u₁} {F G : Discrete I ⥤ C} (f : ∀ i : Discrete I, F
   naturality' X Y g :=
     by
     trace
-      "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:76:14: unsupported tactic `discrete_cases #[]"
+      "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[]"
     cases g
     simp
 #align category_theory.discrete.nat_trans CategoryTheory.Discrete.natTrans
@@ -263,7 +263,7 @@ lean 3 declaration is
 but is expected to have type
   forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u1, u3} C] {I : Type.{u2}} {F : CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1} {G : CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1}, (forall (i : CategoryTheory.Discrete.{u2} I), CategoryTheory.Iso.{u1, u3} C _inst_1 (Prefunctor.obj.{succ u2, succ u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.CategoryStruct.toQuiver.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.Category.toCategoryStruct.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I))) C (CategoryTheory.CategoryStruct.toQuiver.{u1, u3} C (CategoryTheory.Category.toCategoryStruct.{u1, u3} C _inst_1)) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1 F) i) (Prefunctor.obj.{succ u2, succ u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.CategoryStruct.toQuiver.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.Category.toCategoryStruct.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I))) C (CategoryTheory.CategoryStruct.toQuiver.{u1, u3} C (CategoryTheory.Category.toCategoryStruct.{u1, u3} C _inst_1)) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1 G) i)) -> (CategoryTheory.Iso.{max u2 u1, max (max u2 u3) u1} (CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1) (CategoryTheory.Functor.category.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1) F G)
 Case conversion may be inaccurate. Consider using '#align category_theory.discrete.nat_iso CategoryTheory.Discrete.natIsoₓ'. -/
-/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:76:14: unsupported tactic `discrete_cases #[] -/
+/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[] -/
 /-- For functors out of a discrete category,
 a natural isomorphism is just a collection of isomorphisms,
 as the naturality squares are trivial.
@@ -273,7 +273,7 @@ def natIso {I : Type u₁} {F G : Discrete I ⥤ C} (f : ∀ i : Discrete I, F.o
   NatIso.ofComponents f fun X Y g =>
     by
     trace
-      "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:76:14: unsupported tactic `discrete_cases #[]"
+      "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[]"
     cases g
     simp
 #align category_theory.discrete.nat_iso CategoryTheory.Discrete.natIso
@@ -295,7 +295,7 @@ lean 3 declaration is
 but is expected to have type
   forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u1, u3} C] {I : Type.{u2}} {F : CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1}, CategoryTheory.Iso.{max u2 u1, max (max u2 u3) u1} (CategoryTheory.Functor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1) (CategoryTheory.Functor.category.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1) F (CategoryTheory.Discrete.functor.{u1, u2, u3} C _inst_1 I (Function.comp.{succ u2, succ u2, succ u3} I (CategoryTheory.Discrete.{u2} I) C (Prefunctor.obj.{succ u2, succ u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.CategoryStruct.toQuiver.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.Category.toCategoryStruct.{u2, u2} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I))) C (CategoryTheory.CategoryStruct.toQuiver.{u1, u3} C (CategoryTheory.Category.toCategoryStruct.{u1, u3} C _inst_1)) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u2, u3} (CategoryTheory.Discrete.{u2} I) (CategoryTheory.discreteCategory.{u2} I) C _inst_1 F)) (CategoryTheory.Discrete.mk.{u2} I)))
 Case conversion may be inaccurate. Consider using '#align category_theory.discrete.nat_iso_functor CategoryTheory.Discrete.natIsoFunctorₓ'. -/
-/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:76:14: unsupported tactic `discrete_cases #[] -/
+/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[] -/
 /-- Every functor `F` from a discrete category is naturally isomorphic (actually, equal) to
   `discrete.functor (F.obj)`. -/
 @[simp]
@@ -303,7 +303,7 @@ def natIsoFunctor {I : Type u₁} {F : Discrete I ⥤ C} : F ≅ Discrete.functo
   natIso fun i =>
     by
     trace
-      "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:76:14: unsupported tactic `discrete_cases #[]"
+      "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[]"
     rfl
 #align category_theory.discrete.nat_iso_functor CategoryTheory.Discrete.natIsoFunctor
 
@@ -326,8 +326,8 @@ lean 3 declaration is
 but is expected to have type
   forall {I : Type.{u1}} {J : Type.{u2}}, (Equiv.{succ u1, succ u2} I J) -> (CategoryTheory.Equivalence.{u1, u2, u1, u2} (CategoryTheory.Discrete.{u1} I) (CategoryTheory.Discrete.{u2} J) (CategoryTheory.discreteCategory.{u1} I) (CategoryTheory.discreteCategory.{u2} J))
 Case conversion may be inaccurate. Consider using '#align category_theory.discrete.equivalence CategoryTheory.Discrete.equivalenceₓ'. -/
-/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:76:14: unsupported tactic `discrete_cases #[] -/
-/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:76:14: unsupported tactic `discrete_cases #[] -/
+/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[] -/
+/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[] -/
 /-- We can promote a type-level `equiv` to
 an equivalence between the corresponding `discrete` categories.
 -/
@@ -341,14 +341,14 @@ def equivalence {I : Type u₁} {J : Type u₂} (e : I ≃ J) : Discrete I ≌ D
       eqToIso
         (by
           trace
-            "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:76:14: unsupported tactic `discrete_cases #[]"
+            "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[]"
           simp)
   counitIso :=
     Discrete.natIso fun j =>
       eqToIso
         (by
           trace
-            "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:76:14: unsupported tactic `discrete_cases #[]"
+            "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[]"
           simp)
 #align category_theory.discrete.equivalence CategoryTheory.Discrete.equivalence
 
@@ -382,9 +382,9 @@ lean 3 declaration is
 but is expected to have type
   forall (α : Type.{u1}), CategoryTheory.Equivalence.{u1, u1, u1, u1} (Opposite.{succ u1} (CategoryTheory.Discrete.{u1} α)) (CategoryTheory.Discrete.{u1} α) (CategoryTheory.Category.opposite.{u1, u1} (CategoryTheory.Discrete.{u1} α) (CategoryTheory.discreteCategory.{u1} α)) (CategoryTheory.discreteCategory.{u1} α)
 Case conversion may be inaccurate. Consider using '#align category_theory.discrete.opposite CategoryTheory.Discrete.oppositeₓ'. -/
-/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:76:14: unsupported tactic `discrete_cases #[] -/
-/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:72:18: unsupported non-interactive tactic tactic.op_induction' -/
-/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:76:14: unsupported tactic `discrete_cases #[] -/
+/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[] -/
+/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:69:18: unsupported non-interactive tactic tactic.op_induction' -/
+/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[] -/
 /-- A discrete category is equivalent to its opposite category. -/
 @[simps functor_obj_as inverse_obj]
 protected def opposite (α : Type u₁) : (Discrete α)ᵒᵖ ≌ Discrete α :=
@@ -395,7 +395,7 @@ protected def opposite (α : Type u₁) : (Discrete α)ᵒᵖ ≌ Discrete α :=
       (discrete.nat_iso fun X =>
         by
         trace
-          "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:76:14: unsupported tactic `discrete_cases #[]"
+          "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[]"
         simp [F])
   refine'
     nat_iso.of_components
@@ -404,7 +404,7 @@ protected def opposite (α : Type u₁) : (Discrete α)ᵒᵖ ≌ Discrete α :=
         run_tac
           tactic.op_induction'
         trace
-          "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:76:14: unsupported tactic `discrete_cases #[]"
+          "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `discrete_cases #[]"
         simp [F])
       _
   tidy
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Stephen Morgan, Scott Morrison, Floris van Doorn
 
 ! This file was ported from Lean 3 source module category_theory.discrete_category
-! leanprover-community/mathlib commit 024a4231815538ac739f52d08dd20a55da0d6b23
+! leanprover-community/mathlib commit 23aa88e32dcc9d2a24cca7bc23268567ed4cd7d6
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -14,6 +14,9 @@ import Mathbin.Data.Ulift
 /-!
 # Discrete categories
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 We define `discrete α` as a structure containing a term `a : α` for any type `α`,
 and use this type alias to provide a `small_category` instance
 whose only morphisms are the identities.

Changes in mathlib4

mathlib3
mathlib4
chore(CategoryTheory/DiscreteCategory): remove unecessary line in proof (#12382)
Diff
@@ -54,7 +54,6 @@ structure Discrete (α : Type u₁) where
 
 @[simp]
 theorem Discrete.mk_as {α : Type u₁} (X : Discrete α) : Discrete.mk X.as = X := by
-  ext
   rfl
 #align category_theory.discrete.mk_as CategoryTheory.Discrete.mk_as
 
style: replace '.-/' by '. -/' (#11938)

Purely automatic replacement. If this is in any way controversial; I'm happy to just close this PR.

Diff
@@ -58,7 +58,7 @@ theorem Discrete.mk_as {α : Type u₁} (X : Discrete α) : Discrete.mk X.as = X
   rfl
 #align category_theory.discrete.mk_as CategoryTheory.Discrete.mk_as
 
-/-- `Discrete α` is equivalent to the original type `α`.-/
+/-- `Discrete α` is equivalent to the original type `α`. -/
 @[simps]
 def discreteEquiv {α : Type u₁} : Discrete α ≃ α where
   toFun := Discrete.as
@@ -169,7 +169,7 @@ instance {I : Type u₁} {i j : Discrete I} (f : i ⟶ j) : IsIso f :=
 attribute [local aesop safe tactic (rule_sets := [CategoryTheory])]
   CategoryTheory.Discrete.discreteCases
 
-/-- Any function `I → C` gives a functor `Discrete I ⥤ C`.-/
+/-- Any function `I → C` gives a functor `Discrete I ⥤ C`. -/
 def functor {I : Type u₁} (F : I → C) : Discrete I ⥤ C where
   obj := F ∘ Discrete.as
   map {X Y} f := by
chore: bump aesop; update syntax (#10955)

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

Diff
@@ -45,7 +45,7 @@ universe v₁ v₂ v₃ u₁ u₁' u₂ u₃
 /-- A wrapper for promoting any type to a category,
 with the only morphisms being equalities.
 -/
-@[ext, aesop safe cases (rule_sets [CategoryTheory])]
+@[ext, aesop safe cases (rule_sets := [CategoryTheory])]
 structure Discrete (α : Type u₁) where
   /-- A wrapper for promoting any type to a category,
   with the only morphisms being equalities. -/
@@ -110,7 +110,7 @@ open Lean Elab Tactic in
 /--
 Use:
 ```
-attribute [local aesop safe tactic (rule_sets [CategoryTheory])]
+attribute [local aesop safe tactic (rule_sets := [CategoryTheory])]
   CategoryTheory.Discrete.discreteCases
 ```
 to locally gives `aesop_cat` the ability to call `cases` on
@@ -121,9 +121,9 @@ def discreteCases : TacticM Unit := do
 
 -- Porting note:
 -- investigate turning on either
--- `attribute [aesop safe cases (rule_sets [CategoryTheory])] Discrete`
+-- `attribute [aesop safe cases (rule_sets := [CategoryTheory])] Discrete`
 -- or
--- `attribute [aesop safe tactic (rule_sets [CategoryTheory])] discreteCases`
+-- `attribute [aesop safe tactic (rule_sets := [CategoryTheory])] discreteCases`
 -- globally.
 
 instance [Unique α] : Unique (Discrete α) :=
@@ -166,7 +166,7 @@ variable {C : Type u₂} [Category.{v₂} C]
 instance {I : Type u₁} {i j : Discrete I} (f : i ⟶ j) : IsIso f :=
   ⟨⟨Discrete.eqToHom (eq_of_hom f).symm, by aesop_cat⟩⟩
 
-attribute [local aesop safe tactic (rule_sets [CategoryTheory])]
+attribute [local aesop safe tactic (rule_sets := [CategoryTheory])]
   CategoryTheory.Discrete.discreteCases
 
 /-- Any function `I → C` gives a functor `Discrete I ⥤ C`.-/
feat(CategoryTheory): prerequisites for the existence of finite products in localized categories (#9702)

This PR contains various prerequisites in order to show that under suitable assumptions, a localized category of a category that has finite products also has finite products:

  • the equivalence of categories (J → C) ≌ (Discrete J ⥤ C)
  • more API for the existence of limits as a consequence of a right adjoint to the constant functor C ⥤ (J ⥤ C).
  • the typeclass MorphismProperty.IsStableUnderFiniteProducts
Diff
@@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Stephen Morgan, Scott Morrison, Floris van Doorn
 -/
 import Mathlib.CategoryTheory.EqToHom
+import Mathlib.CategoryTheory.Pi.Basic
 import Mathlib.Data.ULift
 
 #align_import category_theory.discrete_category from "leanprover-community/mathlib"@"369525b73f229ccd76a6ec0e0e0bf2be57599768"
@@ -296,4 +297,22 @@ theorem functor_map_id (F : Discrete J ⥤ C) {j : Discrete J} (f : j ⟶ j) :
 
 end Discrete
 
+/-- The equivalence of categories `(J → C) ≌ (Discrete J ⥤ C)`. -/
+@[simps]
+def piEquivalenceFunctorDiscrete (J : Type u₂) (C : Type u₁) [Category.{v₁} C] :
+    (J → C) ≌ (Discrete J ⥤ C) where
+  functor :=
+    { obj := fun F => Discrete.functor F
+      map := fun f => Discrete.natTrans (fun j => f j.as) }
+  inverse :=
+    { obj := fun F j => F.obj ⟨j⟩
+      map := fun f j => f.app ⟨j⟩ }
+  unitIso := Iso.refl _
+  counitIso := NatIso.ofComponents (fun F => (NatIso.ofComponents (fun j => Iso.refl _)
+    (by
+      rintro ⟨x⟩ ⟨y⟩ f
+      obtain rfl : x = y := Discrete.eq_of_hom f
+      obtain rfl : f = 𝟙 _ := rfl
+      simp))) (by aesop_cat)
+
 end CategoryTheory
chore: fix some cases in names (#7469)

And fix some names in comments where this revealed issues

Diff
@@ -231,13 +231,13 @@ theorem natIso_app {I : Type u₁} {F G : Discrete I ⥤ C} (f : ∀ i : Discret
 #align category_theory.discrete.nat_iso_app CategoryTheory.Discrete.natIso_app
 
 /-- Every functor `F` from a discrete category is naturally isomorphic (actually, equal) to
-  `discrete.functor (F.obj)`. -/
+  `Discrete.functor (F.obj)`. -/
 @[simp]
 def natIsoFunctor {I : Type u₁} {F : Discrete I ⥤ C} : F ≅ Discrete.functor (F.obj ∘ Discrete.mk) :=
   natIso fun _ => Iso.refl _
 #align category_theory.discrete.nat_iso_functor CategoryTheory.Discrete.natIsoFunctor
 
-/-- Composing `discrete.functor F` with another functor `G` amounts to composing `F` with `G.obj` -/
+/-- Composing `Discrete.functor F` with another functor `G` amounts to composing `F` with `G.obj` -/
 @[simp]
 def compNatIsoDiscrete {I : Type u₁} {D : Type u₃} [Category.{v₃} D] (F : I → C) (G : C ⥤ D) :
     Discrete.functor F ⋙ G ≅ Discrete.functor (G.obj ∘ F) :=
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

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

Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2017 Scott Morrison. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Stephen Morgan, Scott Morrison, Floris van Doorn
-
-! This file was ported from Lean 3 source module category_theory.discrete_category
-! leanprover-community/mathlib commit 369525b73f229ccd76a6ec0e0e0bf2be57599768
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.CategoryTheory.EqToHom
 import Mathlib.Data.ULift
 
+#align_import category_theory.discrete_category from "leanprover-community/mathlib"@"369525b73f229ccd76a6ec0e0e0bf2be57599768"
+
 /-!
 # Discrete categories
 
feat: add Aesop rules for Discrete category (#2519)

Adds a global Aesop cases rule for the Discrete category. This rule was previously added locally in several places.

Diff
@@ -47,7 +47,7 @@ universe v₁ v₂ v₃ u₁ u₁' u₂ u₃
 /-- A wrapper for promoting any type to a category,
 with the only morphisms being equalities.
 -/
-@[ext]
+@[ext, aesop safe cases (rule_sets [CategoryTheory])]
 structure Discrete (α : Type u₁) where
   /-- A wrapper for promoting any type to a category,
   with the only morphisms being equalities. -/
chore: review of automation in category theory (#4793)

Clean up of automation in the category theory library. Leaving out unnecessary proof steps, or fields done by aesop_cat, and making more use of available autoparameters.

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

Diff
@@ -196,7 +196,7 @@ composition of two discrete functors.
 @[simps!]
 def functorComp {I : Type u₁} {J : Type u₁'} (f : J → C) (g : I → J) :
     Discrete.functor (f ∘ g) ≅ Discrete.functor (Discrete.mk ∘ g) ⋙ Discrete.functor f :=
-  NatIso.ofComponents (fun X => Iso.refl _) (by aesop_cat)
+  NatIso.ofComponents fun X => Iso.refl _
 #align category_theory.discrete.functor_comp CategoryTheory.Discrete.functorComp
 
 /-- For functors out of a discrete category,
@@ -282,8 +282,8 @@ open Opposite
 protected def opposite (α : Type u₁) : (Discrete α)ᵒᵖ ≌ Discrete α :=
   let F : Discrete α ⥤ (Discrete α)ᵒᵖ := Discrete.functor fun x => op (Discrete.mk x)
   Equivalence.mk F.leftOp F
-  (NatIso.ofComponents (fun ⟨X⟩ => Iso.refl _) <| fun {X Y} => by aesop_cat)
-  (Discrete.natIso <| fun ⟨X⟩ => Iso.refl _)
+  (NatIso.ofComponents fun ⟨X⟩ => Iso.refl _)
+  (Discrete.natIso fun ⟨X⟩ => Iso.refl _)
 
 #align category_theory.discrete.opposite CategoryTheory.Discrete.opposite
 
chore: cleanup Discrete porting notes (#4780)

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

Diff
@@ -50,8 +50,7 @@ with the only morphisms being equalities.
 @[ext]
 structure Discrete (α : Type u₁) where
   /-- A wrapper for promoting any type to a category,
-  with the only morphisms being equalities.
-  -/
+  with the only morphisms being equalities. -/
   as : α
 #align category_theory.discrete CategoryTheory.Discrete
 
@@ -99,31 +98,36 @@ instance [Inhabited α] : Inhabited (Discrete α) :=
   ⟨⟨default⟩⟩
 
 instance [Subsingleton α] : Subsingleton (Discrete α) :=
-  ⟨by
-    intros
-    ext
-    apply Subsingleton.elim⟩
+  ⟨by aesop_cat⟩
 
 instance instSubsingletonDiscreteHom (X Y : Discrete α) : Subsingleton (X ⟶ Y) :=
   show Subsingleton (ULift (PLift _)) from inferInstance
 
-/-
-Porting note: It seems that `aesop` currently has no way to add lemmas locally.
-
-attribute [local tidy] tactic.discrete_cases
-`[cases_matching* [discrete _, (_ : discrete _) ⟶ (_ : discrete _), PLift _]]
--/
-
 /- Porting note: rewrote `discrete_cases` tactic -/
-/-- A simple tactic to run `cases` on any `discrete α` hypotheses. -/
+/-- A simple tactic to run `cases` on any `Discrete α` hypotheses. -/
 macro "discrete_cases" : tactic =>
   `(tactic| fail_if_no_progress casesm* Discrete _, (_ : Discrete _) ⟶ (_ : Discrete _), PLift _)
 
 open Lean Elab Tactic in
-/-- Wrapper for `discrete_cases` so `aesop_cat` can call it. -/
+/--
+Use:
+```
+attribute [local aesop safe tactic (rule_sets [CategoryTheory])]
+  CategoryTheory.Discrete.discreteCases
+```
+to locally gives `aesop_cat` the ability to call `cases` on
+`Discrete` and `(_ : Discrete _) ⟶ (_ : Discrete _)` hypotheses.
+-/
 def discreteCases : TacticM Unit := do
   evalTactic (← `(tactic| discrete_cases))
 
+-- Porting note:
+-- investigate turning on either
+-- `attribute [aesop safe cases (rule_sets [CategoryTheory])] Discrete`
+-- or
+-- `attribute [aesop safe tactic (rule_sets [CategoryTheory])] discreteCases`
+-- globally.
+
 instance [Unique α] : Unique (Discrete α) :=
   Unique.mk' (Discrete α)
 
@@ -135,19 +139,13 @@ theorem eq_of_hom {X Y : Discrete α} (i : X ⟶ Y) : X.as = Y.as :=
 /-- Promote an equation between the wrapped terms in `X Y : Discrete α` to a morphism `X ⟶ Y`
 in the discrete category. -/
 protected abbrev eqToHom {X Y : Discrete α} (h : X.as = Y.as) : X ⟶ Y :=
-  eqToHom
-    (by
-      ext
-      exact h)
+  eqToHom (by aesop_cat)
 #align category_theory.discrete.eq_to_hom CategoryTheory.Discrete.eqToHom
 
 /-- Promote an equation between the wrapped terms in `X Y : Discrete α` to an isomorphism `X ≅ Y`
 in the discrete category. -/
 protected abbrev eqToIso {X Y : Discrete α} (h : X.as = Y.as) : X ≅ Y :=
-  eqToIso
-    (by
-      ext
-      exact h)
+  eqToIso (by aesop_cat)
 #align category_theory.discrete.eq_to_iso CategoryTheory.Discrete.eqToIso
 
 /-- A variant of `eqToHom` that lifts terms to the discrete category. -/
@@ -170,6 +168,9 @@ variable {C : Type u₂} [Category.{v₂} C]
 instance {I : Type u₁} {i j : Discrete I} (f : i ⟶ j) : IsIso f :=
   ⟨⟨Discrete.eqToHom (eq_of_hom f).symm, by aesop_cat⟩⟩
 
+attribute [local aesop safe tactic (rule_sets [CategoryTheory])]
+  CategoryTheory.Discrete.discreteCases
+
 /-- Any function `I → C` gives a functor `Discrete I ⥤ C`.-/
 def functor {I : Type u₁} (F : I → C) : Discrete I ⥤ C where
   obj := F ∘ Discrete.as
@@ -177,10 +178,6 @@ def functor {I : Type u₁} (F : I → C) : Discrete I ⥤ C where
     dsimp
     rcases f with ⟨⟨h⟩⟩
     exact eqToHom (congrArg _ h)
-  map_id := by aesop_cat
-  map_comp := fun {X Y Z} f g => by
-    discrete_cases
-    aesop_cat
 #align category_theory.discrete.functor CategoryTheory.Discrete.functor
 
 @[simp]
@@ -207,8 +204,8 @@ a natural transformation is just a collection of maps,
 as the naturality squares are trivial.
 -/
 @[simps]
-def natTrans {I : Type u₁} {F G : Discrete I ⥤ C} (f : ∀ i : Discrete I, F.obj i ⟶ G.obj i) : F ⟶ G
-    where
+def natTrans {I : Type u₁} {F G : Discrete I ⥤ C} (f : ∀ i : Discrete I, F.obj i ⟶ G.obj i) :
+    F ⟶ G where
   app := f
   naturality := fun {X Y} ⟨⟨g⟩⟩ => by
     discrete_cases
@@ -222,7 +219,8 @@ a natural isomorphism is just a collection of isomorphisms,
 as the naturality squares are trivial.
 -/
 @[simps!]
-def natIso {I : Type u₁} {F G : Discrete I ⥤ C} (f : ∀ i : Discrete I, F.obj i ≅ G.obj i) : F ≅ G :=
+def natIso {I : Type u₁} {F G : Discrete I ⥤ C} (f : ∀ i : Discrete I, F.obj i ≅ G.obj i) :
+    F ≅ G :=
   NatIso.ofComponents f fun ⟨⟨g⟩⟩ => by
     discrete_cases
     rcases g
@@ -257,17 +255,9 @@ def equivalence {I : Type u₁} {J : Type u₂} (e : I ≃ J) : Discrete I ≌ D
   functor := Discrete.functor (Discrete.mk ∘ (e : I → J))
   inverse := Discrete.functor (Discrete.mk ∘ (e.symm : J → I))
   unitIso :=
-    Discrete.natIso fun i =>
-      eqToIso
-        (by
-          discrete_cases
-          simp)
+    Discrete.natIso fun i => eqToIso (by aesop_cat)
   counitIso :=
-    Discrete.natIso fun j =>
-      eqToIso
-        (by
-          discrete_cases
-          simp)
+    Discrete.natIso fun j => eqToIso (by aesop_cat)
 #align category_theory.discrete.equivalence CategoryTheory.Discrete.equivalence
 
 /-- We can convert an equivalence of `discrete` categories to a type-level `Equiv`. -/
@@ -292,33 +282,9 @@ open Opposite
 protected def opposite (α : Type u₁) : (Discrete α)ᵒᵖ ≌ Discrete α :=
   let F : Discrete α ⥤ (Discrete α)ᵒᵖ := Discrete.functor fun x => op (Discrete.mk x)
   Equivalence.mk F.leftOp F
-  (NatIso.ofComponents (fun ⟨X⟩ => Iso.refl _) <| fun {X Y} => by
-      induction X using Opposite.rec
-      induction Y using Opposite.rec
-      discrete_cases
-      intro f
-      rcases f
-      aesop_cat)
+  (NatIso.ofComponents (fun ⟨X⟩ => Iso.refl _) <| fun {X Y} => by aesop_cat)
   (Discrete.natIso <| fun ⟨X⟩ => Iso.refl _)
 
-/-
-  Porting note:
-  The following is what was generated by mathport:
-
-  refine'
-    Equivalence.mk (F.leftOp) F _
-      (Discrete.natIso fun X => by
-        discrete_cases
-        rfl)
-  refine'
-    NatIso.ofComponents
-      (fun X => by
-        discrete_cases
-        induction X using Opposite.rec
-        discrete_cases
-        exact Iso.refl _)
--/
-
 #align category_theory.discrete.opposite CategoryTheory.Discrete.opposite
 
 variable {C : Type u₂} [Category.{v₂} C]
@@ -326,9 +292,7 @@ variable {C : Type u₂} [Category.{v₂} C]
 @[simp]
 theorem functor_map_id (F : Discrete J ⥤ C) {j : Discrete J} (f : j ⟶ j) :
     F.map f = 𝟙 (F.obj j) := by
-  have h : f = 𝟙 j := by
-    rcases f with ⟨⟨f⟩⟩
-    rfl
+  have h : f = 𝟙 j := by aesop_cat
   rw [h]
   simp
 #align category_theory.discrete.functor_map_id CategoryTheory.Discrete.functor_map_id
feat: port CategoryTheory.Monoidal.Mon_ (#4763)

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

Diff
@@ -117,7 +117,12 @@ attribute [local tidy] tactic.discrete_cases
 /- Porting note: rewrote `discrete_cases` tactic -/
 /-- A simple tactic to run `cases` on any `discrete α` hypotheses. -/
 macro "discrete_cases" : tactic =>
-  `(tactic| casesm* Discrete _, (_ : Discrete _) ⟶ (_ : Discrete _), PLift _)
+  `(tactic| fail_if_no_progress casesm* Discrete _, (_ : Discrete _) ⟶ (_ : Discrete _), PLift _)
+
+open Lean Elab Tactic in
+/-- Wrapper for `discrete_cases` so `aesop_cat` can call it. -/
+def discreteCases : TacticM Unit := do
+  evalTactic (← `(tactic| discrete_cases))
 
 instance [Unique α] : Unique (Discrete α) :=
   Unique.mk' (Discrete α)
fix: spacing and indentation in tactic formatters (#4519)

This fixes a bunch of spacing bugs in tactics. Mathlib counterpart of:

Diff
@@ -116,8 +116,8 @@ attribute [local tidy] tactic.discrete_cases
 
 /- Porting note: rewrote `discrete_cases` tactic -/
 /-- A simple tactic to run `cases` on any `discrete α` hypotheses. -/
-macro "discrete_cases": tactic =>
-  `(tactic|casesm* Discrete _, (_ : Discrete _) ⟶ (_ : Discrete _), PLift _)
+macro "discrete_cases" : tactic =>
+  `(tactic| casesm* Discrete _, (_ : Discrete _) ⟶ (_ : Discrete _), PLift _)
 
 instance [Unique α] : Unique (Discrete α) :=
   Unique.mk' (Discrete α)
feat: add Mathlib.Tactic.Common, and import (#4056)

This makes a mathlib4 version of mathlib3's tactic.basic, now called Mathlib.Tactic.Common, which imports all tactics which do not have significant theory requirements, and then is imported all across the base of the hierarchy.

This ensures that all common tactics are available nearly everywhere in the library, rather than having to be imported one-by-one as you need them.

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

Diff
@@ -10,7 +10,6 @@ Authors: Stephen Morgan, Scott Morrison, Floris van Doorn
 -/
 import Mathlib.CategoryTheory.EqToHom
 import Mathlib.Data.ULift
-import Mathlib.Tactic.CasesM
 
 /-!
 # Discrete categories
feat: port CategoryTheory.Monoidal.Free.Coherence (#3769)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Joël Riou <joel.riou@universite-paris-saclay.fr> Co-authored-by: Matthew Ballard <matt@mrb.email> Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>

Diff
@@ -105,7 +105,7 @@ instance [Subsingleton α] : Subsingleton (Discrete α) :=
     ext
     apply Subsingleton.elim⟩
 
-instance (X Y : Discrete α) : Subsingleton (X ⟶ Y) :=
+instance instSubsingletonDiscreteHom (X Y : Discrete α) : Subsingleton (X ⟶ Y) :=
   show Subsingleton (ULift (PLift _)) from inferInstance
 
 /-
chore: bye-bye, solo bys! (#3825)

This PR puts, with one exception, every single remaining by that lies all by itself on its own line to the previous line, thus matching the current behaviour of start-port.sh. The exception is when the by begins the second or later argument to a tuple or anonymous constructor; see https://github.com/leanprover-community/mathlib4/pull/3825#discussion_r1186702599.

Essentially this is s/\n *by$/ by/g, but with manual editing to satisfy the linter's max-100-char-line requirement. The Python style linter is also modified to catch these "isolated bys".

Diff
@@ -303,14 +303,12 @@ protected def opposite (α : Type u₁) : (Discrete α)ᵒᵖ ≌ Discrete α :=
 
   refine'
     Equivalence.mk (F.leftOp) F _
-      (Discrete.natIso fun X =>
-        by
-          discrete_cases
-          rfl)
+      (Discrete.natIso fun X => by
+        discrete_cases
+        rfl)
   refine'
     NatIso.ofComponents
-      (fun X =>
-        by
+      (fun X => by
         discrete_cases
         induction X using Opposite.rec
         discrete_cases
@@ -322,8 +320,8 @@ protected def opposite (α : Type u₁) : (Discrete α)ᵒᵖ ≌ Discrete α :=
 variable {C : Type u₂} [Category.{v₂} C]
 
 @[simp]
-theorem functor_map_id (F : Discrete J ⥤ C) {j : Discrete J} (f : j ⟶ j) : F.map f = 𝟙 (F.obj j) :=
-  by
+theorem functor_map_id (F : Discrete J ⥤ C) {j : Discrete J} (f : j ⟶ j) :
+    F.map f = 𝟙 (F.obj j) := by
   have h : f = 𝟙 j := by
     rcases f with ⟨⟨f⟩⟩
     rfl
chore: made Opposite a structure (#3193)

The opposite category is no longer a type synonym, but a structure.

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

Diff
@@ -288,10 +288,11 @@ open Opposite
 protected def opposite (α : Type u₁) : (Discrete α)ᵒᵖ ≌ Discrete α :=
   let F : Discrete α ⥤ (Discrete α)ᵒᵖ := Discrete.functor fun x => op (Discrete.mk x)
   Equivalence.mk F.leftOp F
-  (NatIso.ofComponents (fun ⟨X⟩ => Iso.refl _) <| fun {X Y} ⟨⟨f⟩⟩ => by
+  (NatIso.ofComponents (fun ⟨X⟩ => Iso.refl _) <| fun {X Y} => by
       induction X using Opposite.rec
       induction Y using Opposite.rec
       discrete_cases
+      intro f
       rcases f
       aesop_cat)
   (Discrete.natIso <| fun ⟨X⟩ => Iso.refl _)
feat: port/CategoryTheory.StructuredArrow (#2486)

Co-authored-by: adamtopaz <github@adamtopaz.com>

Diff
@@ -105,6 +105,9 @@ instance [Subsingleton α] : Subsingleton (Discrete α) :=
     ext
     apply Subsingleton.elim⟩
 
+instance (X Y : Discrete α) : Subsingleton (X ⟶ Y) :=
+  show Subsingleton (ULift (PLift _)) from inferInstance
+
 /-
 Porting note: It seems that `aesop` currently has no way to add lemmas locally.
 
chore: tidy various files (#2462)
Diff
@@ -44,7 +44,7 @@ universe v₁ v₂ v₃ u₁ u₁' u₂ u₃
 
 -- This is intentionally a structure rather than a type synonym
 -- to enforce using `DiscreteEquiv` (or `Discrete.mk` and `Discrete.as`) to move between
--- `discrete α` and `α`. Otherwise there is too much API leakage.
+-- `Discrete α` and `α`. Otherwise there is too much API leakage.
 /-- A wrapper for promoting any type to a category,
 with the only morphisms being equalities.
 -/
@@ -64,8 +64,7 @@ theorem Discrete.mk_as {α : Type u₁} (X : Discrete α) : Discrete.mk X.as = X
 
 /-- `Discrete α` is equivalent to the original type `α`.-/
 @[simps]
-def discreteEquiv {α : Type u₁} : Discrete α ≃ α
-    where
+def discreteEquiv {α : Type u₁} : Discrete α ≃ α where
   toFun := Discrete.as
   invFun := Discrete.mk
   left_inv := by aesop_cat
@@ -82,8 +81,7 @@ somewhat annoyingly we have to define `X ⟶ Y` as `ULift (PLift (X = Y))`.
 
 See <https://stacks.math.columbia.edu/tag/001A>
 -/
-instance discreteCategory (α : Type u₁) : SmallCategory (Discrete α)
-    where
+instance discreteCategory (α : Type u₁) : SmallCategory (Discrete α) where
   Hom X Y := ULift (PLift (X.as = Y.as))
   id X := ULift.up (PLift.up rfl)
   comp {X Y Z} g f := by
@@ -166,8 +164,7 @@ instance {I : Type u₁} {i j : Discrete I} (f : i ⟶ j) : IsIso f :=
   ⟨⟨Discrete.eqToHom (eq_of_hom f).symm, by aesop_cat⟩⟩
 
 /-- Any function `I → C` gives a functor `Discrete I ⥤ C`.-/
-def functor {I : Type u₁} (F : I → C) : Discrete I ⥤ C
-    where
+def functor {I : Type u₁} (F : I → C) : Discrete I ⥤ C where
   obj := F ∘ Discrete.as
   map {X Y} f := by
     dsimp
@@ -249,8 +246,7 @@ def compNatIsoDiscrete {I : Type u₁} {D : Type u₃} [Category.{v₃} D] (F :
 an equivalence between the corresponding `discrete` categories.
 -/
 @[simps]
-def equivalence {I : Type u₁} {J : Type u₂} (e : I ≃ J) : Discrete I ≌ Discrete J
-    where
+def equivalence {I : Type u₁} {J : Type u₂} (e : I ≃ J) : Discrete I ≌ Discrete J where
   functor := Discrete.functor (Discrete.mk ∘ (e : I → J))
   inverse := Discrete.functor (Discrete.mk ∘ (e.symm : J → I))
   unitIso :=
@@ -269,8 +265,7 @@ def equivalence {I : Type u₁} {J : Type u₂} (e : I ≃ J) : Discrete I ≌ D
 
 /-- We can convert an equivalence of `discrete` categories to a type-level `Equiv`. -/
 @[simps]
-def equivOfEquivalence {α : Type u₁} {β : Type u₂} (h : Discrete α ≌ Discrete β) : α ≃ β
-    where
+def equivOfEquivalence {α : Type u₁} {β : Type u₂} (h : Discrete α ≌ Discrete β) : α ≃ β where
   toFun := Discrete.as ∘ h.functor.obj ∘ Discrete.mk
   invFun := Discrete.as ∘ h.inverse.obj ∘ Discrete.mk
   left_inv a := by simpa using eq_of_hom (h.unitIso.app (Discrete.mk a)).2
feat: Port CategoryTheory.DiscreteCategory (#2326)

Still WIP. Help would be much appreciated!

Co-authored-by: Matthew Ballard <matt@mrb.email> Co-authored-by: Matthew Robert Ballard <100034030+mattrobball@users.noreply.github.com> Co-authored-by: Moritz Firsching <firsching@google.com>

Dependencies 30

31 files ported (100.0%)
11515 lines ported (100.0%)

All dependencies are ported!