category_theory.pemptyMathlib.CategoryTheory.PEmpty

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)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -26,15 +26,15 @@ namespace Functor
 
 variable (C : Type u) [Category.{v} C]
 
-#print CategoryTheory.Functor.emptyEquivalence /-
+#print CategoryTheory.emptyEquivalence /-
 /-- Equivalence between two empty categories. -/
-def emptyEquivalence : Discrete.{w} PEmpty ≌ Discrete.{v} PEmpty :=
+def CategoryTheory.emptyEquivalence : Discrete.{w} PEmpty ≌ Discrete.{v} PEmpty :=
   Equivalence.mk
     { obj := PEmpty.elim ∘ Discrete.as
       map := fun x => x.as.elim }
     { obj := PEmpty.elim ∘ Discrete.as
       map := fun x => x.as.elim } (by tidy) (by tidy)
-#align category_theory.functor.empty_equivalence CategoryTheory.Functor.emptyEquivalence
+#align category_theory.functor.empty_equivalence CategoryTheory.emptyEquivalence
 -/
 
 #print CategoryTheory.Functor.empty /-
Diff
@@ -3,7 +3,7 @@ Copyright (c) 2018 Scott Morrison. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Scott Morrison, Bhavik Mehta
 -/
-import Mathbin.CategoryTheory.DiscreteCategory
+import CategoryTheory.DiscreteCategory
 
 #align_import category_theory.pempty from "leanprover-community/mathlib"@"23aa88e32dcc9d2a24cca7bc23268567ed4cd7d6"
 
Diff
@@ -2,14 +2,11 @@
 Copyright (c) 2018 Scott Morrison. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Scott Morrison, Bhavik Mehta
-
-! This file was ported from Lean 3 source module category_theory.pempty
-! 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.DiscreteCategory
 
+#align_import category_theory.pempty from "leanprover-community/mathlib"@"23aa88e32dcc9d2a24cca7bc23268567ed4cd7d6"
+
 /-!
 # The empty category
 
Diff
@@ -29,6 +29,7 @@ namespace Functor
 
 variable (C : Type u) [Category.{v} C]
 
+#print CategoryTheory.Functor.emptyEquivalence /-
 /-- Equivalence between two empty categories. -/
 def emptyEquivalence : Discrete.{w} PEmpty ≌ Discrete.{v} PEmpty :=
   Equivalence.mk
@@ -37,6 +38,7 @@ def emptyEquivalence : Discrete.{w} PEmpty ≌ Discrete.{v} PEmpty :=
     { obj := PEmpty.elim ∘ Discrete.as
       map := fun x => x.as.elim } (by tidy) (by tidy)
 #align category_theory.functor.empty_equivalence CategoryTheory.Functor.emptyEquivalence
+-/
 
 #print CategoryTheory.Functor.empty /-
 /-- The canonical functor out of the empty category. -/
Diff
@@ -29,12 +29,6 @@ namespace Functor
 
 variable (C : Type u) [Category.{v} C]
 
-/- warning: category_theory.functor.empty_equivalence -> CategoryTheory.Functor.emptyEquivalence is a dubious translation:
-lean 3 declaration is
-  CategoryTheory.Equivalence.{u1, u2, u1, u2} (CategoryTheory.Discrete.{u1} PEmpty.{succ u1}) (CategoryTheory.discreteCategory.{u1} PEmpty.{succ u1}) (CategoryTheory.Discrete.{u2} PEmpty.{succ u2}) (CategoryTheory.discreteCategory.{u2} PEmpty.{succ u2})
-but is expected to have type
-  CategoryTheory.Equivalence.{u1, u2, u1, u2} (CategoryTheory.Discrete.{u1} PEmpty.{succ u1}) (CategoryTheory.Discrete.{u2} PEmpty.{succ u2}) (CategoryTheory.discreteCategory.{u1} PEmpty.{succ u1}) (CategoryTheory.discreteCategory.{u2} PEmpty.{succ u2})
-Case conversion may be inaccurate. Consider using '#align category_theory.functor.empty_equivalence CategoryTheory.Functor.emptyEquivalenceₓ'. -/
 /-- Equivalence between two empty categories. -/
 def emptyEquivalence : Discrete.{w} PEmpty ≌ Discrete.{v} PEmpty :=
   Equivalence.mk
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Scott Morrison, Bhavik Mehta
 
 ! This file was ported from Lean 3 source module category_theory.pempty
-! leanprover-community/mathlib commit c9c9fa15fec7ca18e9ec97306fb8764bfe988a7e
+! leanprover-community/mathlib commit 23aa88e32dcc9d2a24cca7bc23268567ed4cd7d6
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -13,6 +13,9 @@ import Mathbin.CategoryTheory.DiscreteCategory
 /-!
 # The empty category
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 Defines a category structure on `pempty`, and the unique functor `pempty ⥤ C` for any category `C`.
 -/
 
Diff
@@ -26,6 +26,12 @@ namespace Functor
 
 variable (C : Type u) [Category.{v} C]
 
+/- warning: category_theory.functor.empty_equivalence -> CategoryTheory.Functor.emptyEquivalence is a dubious translation:
+lean 3 declaration is
+  CategoryTheory.Equivalence.{u1, u2, u1, u2} (CategoryTheory.Discrete.{u1} PEmpty.{succ u1}) (CategoryTheory.discreteCategory.{u1} PEmpty.{succ u1}) (CategoryTheory.Discrete.{u2} PEmpty.{succ u2}) (CategoryTheory.discreteCategory.{u2} PEmpty.{succ u2})
+but is expected to have type
+  CategoryTheory.Equivalence.{u1, u2, u1, u2} (CategoryTheory.Discrete.{u1} PEmpty.{succ u1}) (CategoryTheory.Discrete.{u2} PEmpty.{succ u2}) (CategoryTheory.discreteCategory.{u1} PEmpty.{succ u1}) (CategoryTheory.discreteCategory.{u2} PEmpty.{succ u2})
+Case conversion may be inaccurate. Consider using '#align category_theory.functor.empty_equivalence CategoryTheory.Functor.emptyEquivalenceₓ'. -/
 /-- Equivalence between two empty categories. -/
 def emptyEquivalence : Discrete.{w} PEmpty ≌ Discrete.{v} PEmpty :=
   Equivalence.mk
@@ -35,31 +41,39 @@ def emptyEquivalence : Discrete.{w} PEmpty ≌ Discrete.{v} PEmpty :=
       map := fun x => x.as.elim } (by tidy) (by tidy)
 #align category_theory.functor.empty_equivalence CategoryTheory.Functor.emptyEquivalence
 
+#print CategoryTheory.Functor.empty /-
 /-- The canonical functor out of the empty category. -/
 def empty : Discrete.{w} PEmpty ⥤ C :=
   Discrete.functor PEmpty.elim
 #align category_theory.functor.empty CategoryTheory.Functor.empty
+-/
 
 variable {C}
 
+#print CategoryTheory.Functor.emptyExt /-
 /-- Any two functors out of the empty category are isomorphic. -/
 def emptyExt (F G : Discrete.{w} PEmpty ⥤ C) : F ≅ G :=
   Discrete.natIso fun x => x.as.elim
 #align category_theory.functor.empty_ext CategoryTheory.Functor.emptyExt
+-/
 
+#print CategoryTheory.Functor.uniqueFromEmpty /-
 /-- Any functor out of the empty category is isomorphic to the canonical functor from the empty
 category.
 -/
 def uniqueFromEmpty (F : Discrete.{w} PEmpty ⥤ C) : F ≅ empty C :=
   emptyExt _ _
 #align category_theory.functor.unique_from_empty CategoryTheory.Functor.uniqueFromEmpty
+-/
 
+#print CategoryTheory.Functor.empty_ext' /-
 /-- Any two functors out of the empty category are *equal*. You probably want to use
 `empty_ext` instead of this.
 -/
 theorem empty_ext' (F G : Discrete.{w} PEmpty ⥤ C) : F = G :=
   Functor.ext (fun x => x.as.elim) fun x _ _ => x.as.elim
 #align category_theory.functor.empty_ext' CategoryTheory.Functor.empty_ext'
+-/
 
 end Functor
 

Changes in mathlib4

mathlib3
mathlib4
feat(CategoryTheory/Limits/VanKampen): Properties of van Kampen colimits (#7745)

Also moves the definition of van Kampen colimits from CategoryTheory/Extensive.lean into a new file.

Co-authored-by: Andrew Yang <36414270+erdOne@users.noreply.github.com> Co-authored-by: Mario Carneiro <di.gama@gmail.com>

Diff
@@ -13,29 +13,42 @@ import Mathlib.CategoryTheory.DiscreteCategory
 Defines a category structure on `PEmpty`, and the unique functor `PEmpty ⥤ C` for any category `C`.
 -/
 
-universe w v u
+universe w v v' u u'
 -- morphism levels before object levels. See note [CategoryTheory universes].
 namespace CategoryTheory
 
-namespace Functor
+variable (C : Type u) [Category.{v} C] (D : Type u') [Category.{v'} D]
+
+instance (α : Type*) [IsEmpty α] : IsEmpty (Discrete α) := Function.isEmpty Discrete.as
+
+/-- The (unique) functor from an empty category. -/
+def functorOfIsEmpty [IsEmpty C] : C ⥤ D where
+  obj := isEmptyElim
+  map := fun {X} ↦ isEmptyElim X
+  map_id := fun {X} ↦ isEmptyElim X
+  map_comp := fun {X} ↦ isEmptyElim X
+
+variable {C D}
 
-variable (C : Type u) [Category.{v} C]
+/-- Any two functors out of an empty category are isomorphic. -/
+def Functor.isEmptyExt [IsEmpty C] (F G : C ⥤ D) : F ≅ G :=
+  NatIso.ofComponents isEmptyElim (fun {X} ↦ isEmptyElim X)
+
+variable (C D)
+
+/-- The equivalence between two empty categories. -/
+def equivalenceOfIsEmpty [IsEmpty C] [IsEmpty D] : C ≌ D where
+  functor := functorOfIsEmpty C D
+  inverse := functorOfIsEmpty D C
+  unitIso := Functor.isEmptyExt _ _
+  counitIso := Functor.isEmptyExt _ _
+  functor_unitIso_comp := isEmptyElim
 
 /-- Equivalence between two empty categories. -/
-def emptyEquivalence : Discrete.{w} PEmpty ≌ Discrete.{v} PEmpty where
-  functor :=
-    { obj := PEmpty.elim ∘ Discrete.as
-      map := fun {X} _ _ => X.as.elim }
-  inverse :=
-    { obj := PEmpty.elim ∘ Discrete.as
-      map := fun {X} _ _ => X.as.elim }
-  unitIso :=
-    { hom := { app := fun X => X.as.elim }
-      inv := { app := fun X => X.as.elim } }
-  counitIso :=
-    { hom := { app := fun X => X.as.elim }
-      inv := { app := fun X => X.as.elim } }
-#align category_theory.functor.empty_equivalence CategoryTheory.Functor.emptyEquivalence
+def emptyEquivalence : Discrete.{w} PEmpty ≌ Discrete.{v} PEmpty := equivalenceOfIsEmpty _ _
+#align category_theory.functor.empty_equivalence CategoryTheory.emptyEquivalence
+
+namespace Functor
 
 /-- The canonical functor out of the empty category. -/
 def empty : Discrete.{w} PEmpty ⥤ C :=
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,14 +2,11 @@
 Copyright (c) 2018 Scott Morrison. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Scott Morrison, Bhavik Mehta
-
-! This file was ported from Lean 3 source module category_theory.pempty
-! leanprover-community/mathlib commit 2738d2ca56cbc63be80c3bd48e9ed90ad94e947d
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.CategoryTheory.DiscreteCategory
 
+#align_import category_theory.pempty from "leanprover-community/mathlib"@"2738d2ca56cbc63be80c3bd48e9ed90ad94e947d"
+
 /-!
 # The empty category
 
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
@@ -16,8 +16,6 @@ import Mathlib.CategoryTheory.DiscreteCategory
 Defines a category structure on `PEmpty`, and the unique functor `PEmpty ⥤ C` for any category `C`.
 -/
 
--- Porting note: this file stressed Lean a good deal despite its length
-
 universe w v u
 -- morphism levels before object levels. See note [CategoryTheory universes].
 namespace CategoryTheory
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
@@ -25,33 +25,21 @@ namespace CategoryTheory
 namespace Functor
 
 variable (C : Type u) [Category.{v} C]
-/- Porting note: `aesop_cat` could not close any of the goals `tidy` did.
-Switched to more explicit construction -/
+
 /-- Equivalence between two empty categories. -/
 def emptyEquivalence : Discrete.{w} PEmpty ≌ Discrete.{v} PEmpty where
   functor :=
     { obj := PEmpty.elim ∘ Discrete.as
-      map := fun {X} _ _ => X.as.elim
-      map_comp := fun {X} _ _ _ _ => X.as.elim }
+      map := fun {X} _ _ => X.as.elim }
   inverse :=
     { obj := PEmpty.elim ∘ Discrete.as
-      map := fun {X} _ _ => X.as.elim
-      map_comp := fun {X} _ _ _ _ => X.as.elim }
+      map := fun {X} _ _ => X.as.elim }
   unitIso :=
-    { hom :=
-        { app := fun X => X.as.elim
-          naturality := fun {X} _ _ => X.as.elim }
-      inv :=
-        { app := fun X => X.as.elim
-          naturality := fun {X} _ _ => X.as.elim } }
+    { hom := { app := fun X => X.as.elim }
+      inv := { app := fun X => X.as.elim } }
   counitIso :=
-    { hom :=
-        { app := fun X => X.as.elim
-          naturality := fun {X} _ _ => X.as.elim }
-      inv :=
-        { app := fun X => X.as.elim
-          naturality := fun {X} _ _ => X.as.elim } }
-  functor_unitIso_comp := fun X => X.as.elim
+    { hom := { app := fun X => X.as.elim }
+      inv := { app := fun X => X.as.elim } }
 #align category_theory.functor.empty_equivalence CategoryTheory.Functor.emptyEquivalence
 
 /-- The canonical functor out of the empty category. -/
chore: fix typos (#4518)

I ran codespell Mathlib and got tired halfway through the suggestions.

Diff
@@ -26,7 +26,7 @@ namespace Functor
 
 variable (C : Type u) [Category.{v} C]
 /- Porting note: `aesop_cat` could not close any of the goals `tidy` did.
-Switched to more explict construction -/
+Switched to more explicit construction -/
 /-- Equivalence between two empty categories. -/
 def emptyEquivalence : Discrete.{w} PEmpty ≌ Discrete.{v} PEmpty where
   functor :=
chore: strip trailing spaces in lean files (#2828)

vscode is already configured by .vscode/settings.json to trim these on save. It's not clear how they've managed to stick around.

By doing this all in one PR now, it avoids getting random whitespace diffs in PRs later.

This was done with a regex search in vscode,

image

Diff
@@ -25,33 +25,33 @@ namespace CategoryTheory
 namespace Functor
 
 variable (C : Type u) [Category.{v} C]
-/- Porting note: `aesop_cat` could not close any of the goals `tidy` did. 
+/- Porting note: `aesop_cat` could not close any of the goals `tidy` did.
 Switched to more explict construction -/
 /-- Equivalence between two empty categories. -/
-def emptyEquivalence : Discrete.{w} PEmpty ≌ Discrete.{v} PEmpty where 
-  functor := 
+def emptyEquivalence : Discrete.{w} PEmpty ≌ Discrete.{v} PEmpty where
+  functor :=
     { obj := PEmpty.elim ∘ Discrete.as
-      map := fun {X} _ _ => X.as.elim 
+      map := fun {X} _ _ => X.as.elim
       map_comp := fun {X} _ _ _ _ => X.as.elim }
-  inverse := 
+  inverse :=
     { obj := PEmpty.elim ∘ Discrete.as
-      map := fun {X} _ _ => X.as.elim  
+      map := fun {X} _ _ => X.as.elim
       map_comp := fun {X} _ _ _ _ => X.as.elim }
-  unitIso := 
-    { hom := 
-        { app := fun X => X.as.elim 
+  unitIso :=
+    { hom :=
+        { app := fun X => X.as.elim
           naturality := fun {X} _ _ => X.as.elim }
-      inv := 
-        { app := fun X => X.as.elim 
+      inv :=
+        { app := fun X => X.as.elim
           naturality := fun {X} _ _ => X.as.elim } }
-  counitIso := 
-    { hom := 
-        { app := fun X => X.as.elim 
+  counitIso :=
+    { hom :=
+        { app := fun X => X.as.elim
           naturality := fun {X} _ _ => X.as.elim }
-      inv := 
-        { app := fun X => X.as.elim 
+      inv :=
+        { app := fun X => X.as.elim
           naturality := fun {X} _ _ => X.as.elim } }
-  functor_unitIso_comp := fun X => X.as.elim  
+  functor_unitIso_comp := fun X => X.as.elim
 #align category_theory.functor.empty_equivalence CategoryTheory.Functor.emptyEquivalence
 
 /-- The canonical functor out of the empty category. -/
@@ -83,4 +83,3 @@ theorem empty_ext' (F G : Discrete.{w} PEmpty ⥤ C) : F = G :=
 end Functor
 
 end CategoryTheory
-
feat: port/CategoryTheory.PEmpty (#2363)

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

Dependencies 31

32 files ported (100.0%)
11570 lines ported (100.0%)

All dependencies are ported!