category_theory.filteredMathlib.CategoryTheory.Filtered.Basic

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)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(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
@@ -3,11 +3,11 @@ Copyright (c) 2019 Reid Barton. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Reid Barton, Scott Morrison
 -/
-import CategoryTheory.FinCategory
+import CategoryTheory.FinCategory.Basic
 import CategoryTheory.Limits.Cones
 import CategoryTheory.Adjunction.Basic
 import CategoryTheory.Category.Preorder
-import CategoryTheory.Category.Ulift
+import CategoryTheory.Category.ULift
 
 #align_import category_theory.filtered from "leanprover-community/mathlib"@"ee05e9ce1322178f0c12004eb93c00d2c8c00ed2"
 
Diff
@@ -261,7 +261,7 @@ theorem sup_exists :
       apply Finset.mem_of_mem_insert_of_ne mf'
       contrapose! h
       obtain ⟨rfl, h⟩ := h
-      rw [heq_iff_eq, PSigma.mk.inj_iff] at h 
+      rw [heq_iff_eq, PSigma.mk.inj_iff] at h
       exact ⟨rfl, h.1.symm⟩
 #align category_theory.is_filtered.sup_exists CategoryTheory.IsFiltered.sup_exists
 -/
@@ -476,7 +476,7 @@ theorem bowtie {j₁ j₂ k₁ k₂ : C} (f₁ : j₁ ⟶ k₁) (g₁ : j₁ ⟶
   by
   obtain ⟨t, k₁t, k₂t, ht⟩ := span f₁ g₁
   obtain ⟨s, ts, hs⟩ := cocone_maps (f₂ ≫ k₁t) (g₂ ≫ k₂t)
-  simp_rw [category.assoc] at hs 
+  simp_rw [category.assoc] at hs
   exact ⟨s, k₁t ≫ ts, k₂t ≫ ts, by rw [reassoc_of ht], hs⟩
 #align category_theory.is_filtered.bowtie CategoryTheory.IsFiltered.bowtie
 -/
@@ -733,7 +733,7 @@ theorem inf_exists :
       apply Finset.mem_of_mem_insert_of_ne mf'
       contrapose! h
       obtain ⟨rfl, h⟩ := h
-      rw [heq_iff_eq, PSigma.mk.inj_iff] at h 
+      rw [heq_iff_eq, PSigma.mk.inj_iff] at h
       exact ⟨rfl, h.1.symm⟩
 #align category_theory.is_cofiltered.inf_exists CategoryTheory.IsCofiltered.inf_exists
 -/
Diff
@@ -216,7 +216,16 @@ variable {C} [IsFiltered C]
 #print CategoryTheory.IsFiltered.sup_objs_exists /-
 /-- Any finite collection of objects in a filtered category has an object "to the right".
 -/
-theorem sup_objs_exists (O : Finset C) : ∃ S : C, ∀ {X}, X ∈ O → Nonempty (X ⟶ S) := by classical
+theorem sup_objs_exists (O : Finset C) : ∃ S : C, ∀ {X}, X ∈ O → Nonempty (X ⟶ S) := by
+  classical
+  apply Finset.induction_on O
+  · exact ⟨is_filtered.nonempty.some, by rintro - ⟨⟩⟩
+  · rintro X O' nm ⟨S', w'⟩
+    use max X S'
+    rintro Y mY
+    obtain rfl | h := eq_or_ne Y X
+    · exact ⟨left_to_max _ _⟩
+    · exact ⟨(w' (Finset.mem_of_mem_insert_of_ne mY h)).some ≫ right_to_max _ _⟩
 #align category_theory.is_filtered.sup_objs_exists CategoryTheory.IsFiltered.sup_objs_exists
 -/
 
@@ -232,7 +241,28 @@ theorem sup_exists :
     ∃ (S : C) (T : ∀ {X : C}, X ∈ O → (X ⟶ S)),
       ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},
         (⟨X, Y, mX, mY, f⟩ : Σ' (X Y : C) (mX : X ∈ O) (mY : Y ∈ O), X ⟶ Y) ∈ H → f ≫ T mY = T mX :=
-  by classical
+  by
+  classical
+  apply Finset.induction_on H
+  · obtain ⟨S, f⟩ := sup_objs_exists O
+    refine' ⟨S, fun X mX => (f mX).some, _⟩
+    rintro - - - - - ⟨⟩
+  · rintro ⟨X, Y, mX, mY, f⟩ H' nmf ⟨S', T', w'⟩
+    refine' ⟨coeq (f ≫ T' mY) (T' mX), fun Z mZ => T' mZ ≫ coeq_hom (f ≫ T' mY) (T' mX), _⟩
+    intro X' Y' mX' mY' f' mf'
+    rw [← category.assoc]
+    by_cases h : X = X' ∧ Y = Y'
+    · rcases h with ⟨rfl, rfl⟩
+      by_cases hf : f = f'
+      · subst hf
+        apply coeq_condition
+      · rw [@w' _ _ mX mY f' (by simpa [hf ∘ Eq.symm] using mf')]
+    · rw [@w' _ _ mX' mY' f' _]
+      apply Finset.mem_of_mem_insert_of_ne mf'
+      contrapose! h
+      obtain ⟨rfl, h⟩ := h
+      rw [heq_iff_eq, PSigma.mk.inj_iff] at h 
+      exact ⟨rfl, h.1.symm⟩
 #align category_theory.is_filtered.sup_exists CategoryTheory.IsFiltered.sup_exists
 -/
 
@@ -270,7 +300,22 @@ variable {J : Type v} [SmallCategory J] [FinCategory J]
 /-- If we have `is_filtered C`, then for any functor `F : J ⥤ C` with `fin_category J`,
 there exists a cocone over `F`.
 -/
-theorem cocone_nonempty (F : J ⥤ C) : Nonempty (Cocone F) := by classical
+theorem cocone_nonempty (F : J ⥤ C) : Nonempty (Cocone F) := by
+  classical
+  let O := finset.univ.image F.obj
+  let H : Finset (Σ' (X Y : C) (mX : X ∈ O) (mY : Y ∈ O), X ⟶ Y) :=
+    finset.univ.bUnion fun X : J =>
+      finset.univ.bUnion fun Y : J =>
+        finset.univ.image fun f : X ⟶ Y => ⟨F.obj X, F.obj Y, by simp, by simp, F.map f⟩
+  obtain ⟨Z, f, w⟩ := sup_exists O H
+  refine' ⟨⟨Z, ⟨fun X => f (by simp), _⟩⟩⟩
+  intro j j' g
+  dsimp
+  simp only [category.comp_id]
+  apply w
+  simp only [Finset.mem_univ, Finset.mem_biUnion, exists_and_left, exists_prop_of_true,
+    Finset.mem_image]
+  exact ⟨j, rfl, j', g, by simp⟩
 #align category_theory.is_filtered.cocone_nonempty CategoryTheory.IsFiltered.cocone_nonempty
 -/
 
@@ -643,7 +688,16 @@ variable {C} [IsCofiltered C]
 #print CategoryTheory.IsCofiltered.inf_objs_exists /-
 /-- Any finite collection of objects in a cofiltered category has an object "to the left".
 -/
-theorem inf_objs_exists (O : Finset C) : ∃ S : C, ∀ {X}, X ∈ O → Nonempty (S ⟶ X) := by classical
+theorem inf_objs_exists (O : Finset C) : ∃ S : C, ∀ {X}, X ∈ O → Nonempty (S ⟶ X) := by
+  classical
+  apply Finset.induction_on O
+  · exact ⟨is_cofiltered.nonempty.some, by rintro - ⟨⟩⟩
+  · rintro X O' nm ⟨S', w'⟩
+    use min X S'
+    rintro Y mY
+    obtain rfl | h := eq_or_ne Y X
+    · exact ⟨min_to_left _ _⟩
+    · exact ⟨min_to_right _ _ ≫ (w' (Finset.mem_of_mem_insert_of_ne mY h)).some⟩
 #align category_theory.is_cofiltered.inf_objs_exists CategoryTheory.IsCofiltered.inf_objs_exists
 -/
 
@@ -659,7 +713,28 @@ theorem inf_exists :
     ∃ (S : C) (T : ∀ {X : C}, X ∈ O → (S ⟶ X)),
       ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},
         (⟨X, Y, mX, mY, f⟩ : Σ' (X Y : C) (mX : X ∈ O) (mY : Y ∈ O), X ⟶ Y) ∈ H → T mX ≫ f = T mY :=
-  by classical
+  by
+  classical
+  apply Finset.induction_on H
+  · obtain ⟨S, f⟩ := inf_objs_exists O
+    refine' ⟨S, fun X mX => (f mX).some, _⟩
+    rintro - - - - - ⟨⟩
+  · rintro ⟨X, Y, mX, mY, f⟩ H' nmf ⟨S', T', w'⟩
+    refine' ⟨Eq (T' mX ≫ f) (T' mY), fun Z mZ => eq_hom (T' mX ≫ f) (T' mY) ≫ T' mZ, _⟩
+    intro X' Y' mX' mY' f' mf'
+    rw [category.assoc]
+    by_cases h : X = X' ∧ Y = Y'
+    · rcases h with ⟨rfl, rfl⟩
+      by_cases hf : f = f'
+      · subst hf
+        apply eq_condition
+      · rw [@w' _ _ mX mY f' (by simpa [hf ∘ Eq.symm] using mf')]
+    · rw [@w' _ _ mX' mY' f' _]
+      apply Finset.mem_of_mem_insert_of_ne mf'
+      contrapose! h
+      obtain ⟨rfl, h⟩ := h
+      rw [heq_iff_eq, PSigma.mk.inj_iff] at h 
+      exact ⟨rfl, h.1.symm⟩
 #align category_theory.is_cofiltered.inf_exists CategoryTheory.IsCofiltered.inf_exists
 -/
 
@@ -697,7 +772,23 @@ variable {J : Type w} [SmallCategory J] [FinCategory J]
 /-- If we have `is_cofiltered C`, then for any functor `F : J ⥤ C` with `fin_category J`,
 there exists a cone over `F`.
 -/
-theorem cone_nonempty (F : J ⥤ C) : Nonempty (Cone F) := by classical
+theorem cone_nonempty (F : J ⥤ C) : Nonempty (Cone F) := by
+  classical
+  let O := finset.univ.image F.obj
+  let H : Finset (Σ' (X Y : C) (mX : X ∈ O) (mY : Y ∈ O), X ⟶ Y) :=
+    finset.univ.bUnion fun X : J =>
+      finset.univ.bUnion fun Y : J =>
+        finset.univ.image fun f : X ⟶ Y => ⟨F.obj X, F.obj Y, by simp, by simp, F.map f⟩
+  obtain ⟨Z, f, w⟩ := inf_exists O H
+  refine' ⟨⟨Z, ⟨fun X => f (by simp), _⟩⟩⟩
+  intro j j' g
+  dsimp
+  simp only [category.id_comp]
+  symm
+  apply w
+  simp only [Finset.mem_univ, Finset.mem_biUnion, exists_and_left, exists_prop_of_true,
+    Finset.mem_image]
+  exact ⟨j, rfl, j', g, by simp⟩
 #align category_theory.is_cofiltered.cone_nonempty CategoryTheory.IsCofiltered.cone_nonempty
 -/
 
Diff
@@ -216,16 +216,7 @@ variable {C} [IsFiltered C]
 #print CategoryTheory.IsFiltered.sup_objs_exists /-
 /-- Any finite collection of objects in a filtered category has an object "to the right".
 -/
-theorem sup_objs_exists (O : Finset C) : ∃ S : C, ∀ {X}, X ∈ O → Nonempty (X ⟶ S) := by
-  classical
-  apply Finset.induction_on O
-  · exact ⟨is_filtered.nonempty.some, by rintro - ⟨⟩⟩
-  · rintro X O' nm ⟨S', w'⟩
-    use max X S'
-    rintro Y mY
-    obtain rfl | h := eq_or_ne Y X
-    · exact ⟨left_to_max _ _⟩
-    · exact ⟨(w' (Finset.mem_of_mem_insert_of_ne mY h)).some ≫ right_to_max _ _⟩
+theorem sup_objs_exists (O : Finset C) : ∃ S : C, ∀ {X}, X ∈ O → Nonempty (X ⟶ S) := by classical
 #align category_theory.is_filtered.sup_objs_exists CategoryTheory.IsFiltered.sup_objs_exists
 -/
 
@@ -241,28 +232,7 @@ theorem sup_exists :
     ∃ (S : C) (T : ∀ {X : C}, X ∈ O → (X ⟶ S)),
       ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},
         (⟨X, Y, mX, mY, f⟩ : Σ' (X Y : C) (mX : X ∈ O) (mY : Y ∈ O), X ⟶ Y) ∈ H → f ≫ T mY = T mX :=
-  by
-  classical
-  apply Finset.induction_on H
-  · obtain ⟨S, f⟩ := sup_objs_exists O
-    refine' ⟨S, fun X mX => (f mX).some, _⟩
-    rintro - - - - - ⟨⟩
-  · rintro ⟨X, Y, mX, mY, f⟩ H' nmf ⟨S', T', w'⟩
-    refine' ⟨coeq (f ≫ T' mY) (T' mX), fun Z mZ => T' mZ ≫ coeq_hom (f ≫ T' mY) (T' mX), _⟩
-    intro X' Y' mX' mY' f' mf'
-    rw [← category.assoc]
-    by_cases h : X = X' ∧ Y = Y'
-    · rcases h with ⟨rfl, rfl⟩
-      by_cases hf : f = f'
-      · subst hf
-        apply coeq_condition
-      · rw [@w' _ _ mX mY f' (by simpa [hf ∘ Eq.symm] using mf')]
-    · rw [@w' _ _ mX' mY' f' _]
-      apply Finset.mem_of_mem_insert_of_ne mf'
-      contrapose! h
-      obtain ⟨rfl, h⟩ := h
-      rw [heq_iff_eq, PSigma.mk.inj_iff] at h 
-      exact ⟨rfl, h.1.symm⟩
+  by classical
 #align category_theory.is_filtered.sup_exists CategoryTheory.IsFiltered.sup_exists
 -/
 
@@ -300,22 +270,7 @@ variable {J : Type v} [SmallCategory J] [FinCategory J]
 /-- If we have `is_filtered C`, then for any functor `F : J ⥤ C` with `fin_category J`,
 there exists a cocone over `F`.
 -/
-theorem cocone_nonempty (F : J ⥤ C) : Nonempty (Cocone F) := by
-  classical
-  let O := finset.univ.image F.obj
-  let H : Finset (Σ' (X Y : C) (mX : X ∈ O) (mY : Y ∈ O), X ⟶ Y) :=
-    finset.univ.bUnion fun X : J =>
-      finset.univ.bUnion fun Y : J =>
-        finset.univ.image fun f : X ⟶ Y => ⟨F.obj X, F.obj Y, by simp, by simp, F.map f⟩
-  obtain ⟨Z, f, w⟩ := sup_exists O H
-  refine' ⟨⟨Z, ⟨fun X => f (by simp), _⟩⟩⟩
-  intro j j' g
-  dsimp
-  simp only [category.comp_id]
-  apply w
-  simp only [Finset.mem_univ, Finset.mem_biUnion, exists_and_left, exists_prop_of_true,
-    Finset.mem_image]
-  exact ⟨j, rfl, j', g, by simp⟩
+theorem cocone_nonempty (F : J ⥤ C) : Nonempty (Cocone F) := by classical
 #align category_theory.is_filtered.cocone_nonempty CategoryTheory.IsFiltered.cocone_nonempty
 -/
 
@@ -688,16 +643,7 @@ variable {C} [IsCofiltered C]
 #print CategoryTheory.IsCofiltered.inf_objs_exists /-
 /-- Any finite collection of objects in a cofiltered category has an object "to the left".
 -/
-theorem inf_objs_exists (O : Finset C) : ∃ S : C, ∀ {X}, X ∈ O → Nonempty (S ⟶ X) := by
-  classical
-  apply Finset.induction_on O
-  · exact ⟨is_cofiltered.nonempty.some, by rintro - ⟨⟩⟩
-  · rintro X O' nm ⟨S', w'⟩
-    use min X S'
-    rintro Y mY
-    obtain rfl | h := eq_or_ne Y X
-    · exact ⟨min_to_left _ _⟩
-    · exact ⟨min_to_right _ _ ≫ (w' (Finset.mem_of_mem_insert_of_ne mY h)).some⟩
+theorem inf_objs_exists (O : Finset C) : ∃ S : C, ∀ {X}, X ∈ O → Nonempty (S ⟶ X) := by classical
 #align category_theory.is_cofiltered.inf_objs_exists CategoryTheory.IsCofiltered.inf_objs_exists
 -/
 
@@ -713,28 +659,7 @@ theorem inf_exists :
     ∃ (S : C) (T : ∀ {X : C}, X ∈ O → (S ⟶ X)),
       ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},
         (⟨X, Y, mX, mY, f⟩ : Σ' (X Y : C) (mX : X ∈ O) (mY : Y ∈ O), X ⟶ Y) ∈ H → T mX ≫ f = T mY :=
-  by
-  classical
-  apply Finset.induction_on H
-  · obtain ⟨S, f⟩ := inf_objs_exists O
-    refine' ⟨S, fun X mX => (f mX).some, _⟩
-    rintro - - - - - ⟨⟩
-  · rintro ⟨X, Y, mX, mY, f⟩ H' nmf ⟨S', T', w'⟩
-    refine' ⟨Eq (T' mX ≫ f) (T' mY), fun Z mZ => eq_hom (T' mX ≫ f) (T' mY) ≫ T' mZ, _⟩
-    intro X' Y' mX' mY' f' mf'
-    rw [category.assoc]
-    by_cases h : X = X' ∧ Y = Y'
-    · rcases h with ⟨rfl, rfl⟩
-      by_cases hf : f = f'
-      · subst hf
-        apply eq_condition
-      · rw [@w' _ _ mX mY f' (by simpa [hf ∘ Eq.symm] using mf')]
-    · rw [@w' _ _ mX' mY' f' _]
-      apply Finset.mem_of_mem_insert_of_ne mf'
-      contrapose! h
-      obtain ⟨rfl, h⟩ := h
-      rw [heq_iff_eq, PSigma.mk.inj_iff] at h 
-      exact ⟨rfl, h.1.symm⟩
+  by classical
 #align category_theory.is_cofiltered.inf_exists CategoryTheory.IsCofiltered.inf_exists
 -/
 
@@ -772,23 +697,7 @@ variable {J : Type w} [SmallCategory J] [FinCategory J]
 /-- If we have `is_cofiltered C`, then for any functor `F : J ⥤ C` with `fin_category J`,
 there exists a cone over `F`.
 -/
-theorem cone_nonempty (F : J ⥤ C) : Nonempty (Cone F) := by
-  classical
-  let O := finset.univ.image F.obj
-  let H : Finset (Σ' (X Y : C) (mX : X ∈ O) (mY : Y ∈ O), X ⟶ Y) :=
-    finset.univ.bUnion fun X : J =>
-      finset.univ.bUnion fun Y : J =>
-        finset.univ.image fun f : X ⟶ Y => ⟨F.obj X, F.obj Y, by simp, by simp, F.map f⟩
-  obtain ⟨Z, f, w⟩ := inf_exists O H
-  refine' ⟨⟨Z, ⟨fun X => f (by simp), _⟩⟩⟩
-  intro j j' g
-  dsimp
-  simp only [category.id_comp]
-  symm
-  apply w
-  simp only [Finset.mem_univ, Finset.mem_biUnion, exists_and_left, exists_prop_of_true,
-    Finset.mem_image]
-  exact ⟨j, rfl, j', g, by simp⟩
+theorem cone_nonempty (F : J ⥤ C) : Nonempty (Cone F) := by classical
 #align category_theory.is_cofiltered.cone_nonempty CategoryTheory.IsCofiltered.cone_nonempty
 -/
 
Diff
@@ -3,11 +3,11 @@ Copyright (c) 2019 Reid Barton. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Reid Barton, Scott Morrison
 -/
-import Mathbin.CategoryTheory.FinCategory
-import Mathbin.CategoryTheory.Limits.Cones
-import Mathbin.CategoryTheory.Adjunction.Basic
-import Mathbin.CategoryTheory.Category.Preorder
-import Mathbin.CategoryTheory.Category.Ulift
+import CategoryTheory.FinCategory
+import CategoryTheory.Limits.Cones
+import CategoryTheory.Adjunction.Basic
+import CategoryTheory.Category.Preorder
+import CategoryTheory.Category.Ulift
 
 #align_import category_theory.filtered from "leanprover-community/mathlib"@"ee05e9ce1322178f0c12004eb93c00d2c8c00ed2"
 
Diff
@@ -2,11 +2,6 @@
 Copyright (c) 2019 Reid Barton. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Reid Barton, Scott Morrison
-
-! This file was ported from Lean 3 source module category_theory.filtered
-! leanprover-community/mathlib commit ee05e9ce1322178f0c12004eb93c00d2c8c00ed2
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.CategoryTheory.FinCategory
 import Mathbin.CategoryTheory.Limits.Cones
@@ -14,6 +9,8 @@ import Mathbin.CategoryTheory.Adjunction.Basic
 import Mathbin.CategoryTheory.Category.Preorder
 import Mathbin.CategoryTheory.Category.Ulift
 
+#align_import category_theory.filtered from "leanprover-community/mathlib"@"ee05e9ce1322178f0c12004eb93c00d2c8c00ed2"
+
 /-!
 # Filtered categories
 
Diff
@@ -352,10 +352,12 @@ theorem of_isRightAdjoint (R : C ⥤ D) [IsRightAdjoint R] : IsFiltered D :=
 #align category_theory.is_filtered.of_is_right_adjoint CategoryTheory.IsFiltered.of_isRightAdjoint
 -/
 
+#print CategoryTheory.IsFiltered.of_equivalence /-
 /-- Being filtered is preserved by equivalence of categories. -/
 theorem of_equivalence (h : C ≌ D) : IsFiltered D :=
   of_right_adjoint h.symm.toAdjunction
 #align category_theory.is_filtered.of_equivalence CategoryTheory.IsFiltered.of_equivalence
+-/
 
 end Nonempty
 
@@ -669,12 +671,14 @@ theorem cospan {i j j' : C} (f : j ⟶ i) (f' : j' ⟶ i) :
 #align category_theory.is_cofiltered.cospan CategoryTheory.IsCofiltered.cospan
 -/
 
+#print CategoryTheory.Functor.ranges_directed /-
 theorem CategoryTheory.Functor.ranges_directed (F : C ⥤ Type _) (j : C) :
     Directed (· ⊇ ·) fun f : Σ' i, i ⟶ j => Set.range (F.map f.2) := fun ⟨i, ij⟩ ⟨k, kj⟩ =>
   by
   let ⟨l, li, lk, e⟩ := cospan ij kj
   refine' ⟨⟨l, lk ≫ kj⟩, e ▸ _, _⟩ <;> simp_rw [F.map_comp] <;> apply Set.range_comp_subset_range
 #align category_theory.functor.ranges_directed CategoryTheory.Functor.ranges_directed
+-/
 
 end AllowEmpty
 
@@ -823,10 +827,12 @@ theorem of_isLeftAdjoint (L : C ⥤ D) [IsLeftAdjoint L] : IsCofiltered D :=
 #align category_theory.is_cofiltered.of_is_left_adjoint CategoryTheory.IsCofiltered.of_isLeftAdjoint
 -/
 
+#print CategoryTheory.IsCofiltered.of_equivalence /-
 /-- Being cofiltered is preserved by equivalence of categories. -/
 theorem of_equivalence (h : C ≌ D) : IsCofiltered D :=
   of_left_adjoint h.toAdjunction
 #align category_theory.is_cofiltered.of_equivalence CategoryTheory.IsCofiltered.of_equivalence
+-/
 
 end Nonempty
 
Diff
@@ -221,14 +221,14 @@ variable {C} [IsFiltered C]
 -/
 theorem sup_objs_exists (O : Finset C) : ∃ S : C, ∀ {X}, X ∈ O → Nonempty (X ⟶ S) := by
   classical
-    apply Finset.induction_on O
-    · exact ⟨is_filtered.nonempty.some, by rintro - ⟨⟩⟩
-    · rintro X O' nm ⟨S', w'⟩
-      use max X S'
-      rintro Y mY
-      obtain rfl | h := eq_or_ne Y X
-      · exact ⟨left_to_max _ _⟩
-      · exact ⟨(w' (Finset.mem_of_mem_insert_of_ne mY h)).some ≫ right_to_max _ _⟩
+  apply Finset.induction_on O
+  · exact ⟨is_filtered.nonempty.some, by rintro - ⟨⟩⟩
+  · rintro X O' nm ⟨S', w'⟩
+    use max X S'
+    rintro Y mY
+    obtain rfl | h := eq_or_ne Y X
+    · exact ⟨left_to_max _ _⟩
+    · exact ⟨(w' (Finset.mem_of_mem_insert_of_ne mY h)).some ≫ right_to_max _ _⟩
 #align category_theory.is_filtered.sup_objs_exists CategoryTheory.IsFiltered.sup_objs_exists
 -/
 
@@ -246,26 +246,26 @@ theorem sup_exists :
         (⟨X, Y, mX, mY, f⟩ : Σ' (X Y : C) (mX : X ∈ O) (mY : Y ∈ O), X ⟶ Y) ∈ H → f ≫ T mY = T mX :=
   by
   classical
-    apply Finset.induction_on H
-    · obtain ⟨S, f⟩ := sup_objs_exists O
-      refine' ⟨S, fun X mX => (f mX).some, _⟩
-      rintro - - - - - ⟨⟩
-    · rintro ⟨X, Y, mX, mY, f⟩ H' nmf ⟨S', T', w'⟩
-      refine' ⟨coeq (f ≫ T' mY) (T' mX), fun Z mZ => T' mZ ≫ coeq_hom (f ≫ T' mY) (T' mX), _⟩
-      intro X' Y' mX' mY' f' mf'
-      rw [← category.assoc]
-      by_cases h : X = X' ∧ Y = Y'
-      · rcases h with ⟨rfl, rfl⟩
-        by_cases hf : f = f'
-        · subst hf
-          apply coeq_condition
-        · rw [@w' _ _ mX mY f' (by simpa [hf ∘ Eq.symm] using mf')]
-      · rw [@w' _ _ mX' mY' f' _]
-        apply Finset.mem_of_mem_insert_of_ne mf'
-        contrapose! h
-        obtain ⟨rfl, h⟩ := h
-        rw [heq_iff_eq, PSigma.mk.inj_iff] at h 
-        exact ⟨rfl, h.1.symm⟩
+  apply Finset.induction_on H
+  · obtain ⟨S, f⟩ := sup_objs_exists O
+    refine' ⟨S, fun X mX => (f mX).some, _⟩
+    rintro - - - - - ⟨⟩
+  · rintro ⟨X, Y, mX, mY, f⟩ H' nmf ⟨S', T', w'⟩
+    refine' ⟨coeq (f ≫ T' mY) (T' mX), fun Z mZ => T' mZ ≫ coeq_hom (f ≫ T' mY) (T' mX), _⟩
+    intro X' Y' mX' mY' f' mf'
+    rw [← category.assoc]
+    by_cases h : X = X' ∧ Y = Y'
+    · rcases h with ⟨rfl, rfl⟩
+      by_cases hf : f = f'
+      · subst hf
+        apply coeq_condition
+      · rw [@w' _ _ mX mY f' (by simpa [hf ∘ Eq.symm] using mf')]
+    · rw [@w' _ _ mX' mY' f' _]
+      apply Finset.mem_of_mem_insert_of_ne mf'
+      contrapose! h
+      obtain ⟨rfl, h⟩ := h
+      rw [heq_iff_eq, PSigma.mk.inj_iff] at h 
+      exact ⟨rfl, h.1.symm⟩
 #align category_theory.is_filtered.sup_exists CategoryTheory.IsFiltered.sup_exists
 -/
 
@@ -305,20 +305,20 @@ there exists a cocone over `F`.
 -/
 theorem cocone_nonempty (F : J ⥤ C) : Nonempty (Cocone F) := by
   classical
-    let O := finset.univ.image F.obj
-    let H : Finset (Σ' (X Y : C) (mX : X ∈ O) (mY : Y ∈ O), X ⟶ Y) :=
-      finset.univ.bUnion fun X : J =>
-        finset.univ.bUnion fun Y : J =>
-          finset.univ.image fun f : X ⟶ Y => ⟨F.obj X, F.obj Y, by simp, by simp, F.map f⟩
-    obtain ⟨Z, f, w⟩ := sup_exists O H
-    refine' ⟨⟨Z, ⟨fun X => f (by simp), _⟩⟩⟩
-    intro j j' g
-    dsimp
-    simp only [category.comp_id]
-    apply w
-    simp only [Finset.mem_univ, Finset.mem_biUnion, exists_and_left, exists_prop_of_true,
-      Finset.mem_image]
-    exact ⟨j, rfl, j', g, by simp⟩
+  let O := finset.univ.image F.obj
+  let H : Finset (Σ' (X Y : C) (mX : X ∈ O) (mY : Y ∈ O), X ⟶ Y) :=
+    finset.univ.bUnion fun X : J =>
+      finset.univ.bUnion fun Y : J =>
+        finset.univ.image fun f : X ⟶ Y => ⟨F.obj X, F.obj Y, by simp, by simp, F.map f⟩
+  obtain ⟨Z, f, w⟩ := sup_exists O H
+  refine' ⟨⟨Z, ⟨fun X => f (by simp), _⟩⟩⟩
+  intro j j' g
+  dsimp
+  simp only [category.comp_id]
+  apply w
+  simp only [Finset.mem_univ, Finset.mem_biUnion, exists_and_left, exists_prop_of_true,
+    Finset.mem_image]
+  exact ⟨j, rfl, j', g, by simp⟩
 #align category_theory.is_filtered.cocone_nonempty CategoryTheory.IsFiltered.cocone_nonempty
 -/
 
@@ -689,14 +689,14 @@ variable {C} [IsCofiltered C]
 -/
 theorem inf_objs_exists (O : Finset C) : ∃ S : C, ∀ {X}, X ∈ O → Nonempty (S ⟶ X) := by
   classical
-    apply Finset.induction_on O
-    · exact ⟨is_cofiltered.nonempty.some, by rintro - ⟨⟩⟩
-    · rintro X O' nm ⟨S', w'⟩
-      use min X S'
-      rintro Y mY
-      obtain rfl | h := eq_or_ne Y X
-      · exact ⟨min_to_left _ _⟩
-      · exact ⟨min_to_right _ _ ≫ (w' (Finset.mem_of_mem_insert_of_ne mY h)).some⟩
+  apply Finset.induction_on O
+  · exact ⟨is_cofiltered.nonempty.some, by rintro - ⟨⟩⟩
+  · rintro X O' nm ⟨S', w'⟩
+    use min X S'
+    rintro Y mY
+    obtain rfl | h := eq_or_ne Y X
+    · exact ⟨min_to_left _ _⟩
+    · exact ⟨min_to_right _ _ ≫ (w' (Finset.mem_of_mem_insert_of_ne mY h)).some⟩
 #align category_theory.is_cofiltered.inf_objs_exists CategoryTheory.IsCofiltered.inf_objs_exists
 -/
 
@@ -714,26 +714,26 @@ theorem inf_exists :
         (⟨X, Y, mX, mY, f⟩ : Σ' (X Y : C) (mX : X ∈ O) (mY : Y ∈ O), X ⟶ Y) ∈ H → T mX ≫ f = T mY :=
   by
   classical
-    apply Finset.induction_on H
-    · obtain ⟨S, f⟩ := inf_objs_exists O
-      refine' ⟨S, fun X mX => (f mX).some, _⟩
-      rintro - - - - - ⟨⟩
-    · rintro ⟨X, Y, mX, mY, f⟩ H' nmf ⟨S', T', w'⟩
-      refine' ⟨Eq (T' mX ≫ f) (T' mY), fun Z mZ => eq_hom (T' mX ≫ f) (T' mY) ≫ T' mZ, _⟩
-      intro X' Y' mX' mY' f' mf'
-      rw [category.assoc]
-      by_cases h : X = X' ∧ Y = Y'
-      · rcases h with ⟨rfl, rfl⟩
-        by_cases hf : f = f'
-        · subst hf
-          apply eq_condition
-        · rw [@w' _ _ mX mY f' (by simpa [hf ∘ Eq.symm] using mf')]
-      · rw [@w' _ _ mX' mY' f' _]
-        apply Finset.mem_of_mem_insert_of_ne mf'
-        contrapose! h
-        obtain ⟨rfl, h⟩ := h
-        rw [heq_iff_eq, PSigma.mk.inj_iff] at h 
-        exact ⟨rfl, h.1.symm⟩
+  apply Finset.induction_on H
+  · obtain ⟨S, f⟩ := inf_objs_exists O
+    refine' ⟨S, fun X mX => (f mX).some, _⟩
+    rintro - - - - - ⟨⟩
+  · rintro ⟨X, Y, mX, mY, f⟩ H' nmf ⟨S', T', w'⟩
+    refine' ⟨Eq (T' mX ≫ f) (T' mY), fun Z mZ => eq_hom (T' mX ≫ f) (T' mY) ≫ T' mZ, _⟩
+    intro X' Y' mX' mY' f' mf'
+    rw [category.assoc]
+    by_cases h : X = X' ∧ Y = Y'
+    · rcases h with ⟨rfl, rfl⟩
+      by_cases hf : f = f'
+      · subst hf
+        apply eq_condition
+      · rw [@w' _ _ mX mY f' (by simpa [hf ∘ Eq.symm] using mf')]
+    · rw [@w' _ _ mX' mY' f' _]
+      apply Finset.mem_of_mem_insert_of_ne mf'
+      contrapose! h
+      obtain ⟨rfl, h⟩ := h
+      rw [heq_iff_eq, PSigma.mk.inj_iff] at h 
+      exact ⟨rfl, h.1.symm⟩
 #align category_theory.is_cofiltered.inf_exists CategoryTheory.IsCofiltered.inf_exists
 -/
 
@@ -773,21 +773,21 @@ there exists a cone over `F`.
 -/
 theorem cone_nonempty (F : J ⥤ C) : Nonempty (Cone F) := by
   classical
-    let O := finset.univ.image F.obj
-    let H : Finset (Σ' (X Y : C) (mX : X ∈ O) (mY : Y ∈ O), X ⟶ Y) :=
-      finset.univ.bUnion fun X : J =>
-        finset.univ.bUnion fun Y : J =>
-          finset.univ.image fun f : X ⟶ Y => ⟨F.obj X, F.obj Y, by simp, by simp, F.map f⟩
-    obtain ⟨Z, f, w⟩ := inf_exists O H
-    refine' ⟨⟨Z, ⟨fun X => f (by simp), _⟩⟩⟩
-    intro j j' g
-    dsimp
-    simp only [category.id_comp]
-    symm
-    apply w
-    simp only [Finset.mem_univ, Finset.mem_biUnion, exists_and_left, exists_prop_of_true,
-      Finset.mem_image]
-    exact ⟨j, rfl, j', g, by simp⟩
+  let O := finset.univ.image F.obj
+  let H : Finset (Σ' (X Y : C) (mX : X ∈ O) (mY : Y ∈ O), X ⟶ Y) :=
+    finset.univ.bUnion fun X : J =>
+      finset.univ.bUnion fun Y : J =>
+        finset.univ.image fun f : X ⟶ Y => ⟨F.obj X, F.obj Y, by simp, by simp, F.map f⟩
+  obtain ⟨Z, f, w⟩ := inf_exists O H
+  refine' ⟨⟨Z, ⟨fun X => f (by simp), _⟩⟩⟩
+  intro j j' g
+  dsimp
+  simp only [category.id_comp]
+  symm
+  apply w
+  simp only [Finset.mem_univ, Finset.mem_biUnion, exists_and_left, exists_prop_of_true,
+    Finset.mem_image]
+  exact ⟨j, rfl, j', g, by simp⟩
 #align category_theory.is_cofiltered.cone_nonempty CategoryTheory.IsCofiltered.cone_nonempty
 -/
 
Diff
@@ -73,8 +73,8 @@ variable (C : Type u) [Category.{v} C]
    are equal.
 -/
 class IsFilteredOrEmpty : Prop where
-  cocone_objs : ∀ X Y : C, ∃ (Z : _)(f : X ⟶ Z)(g : Y ⟶ Z), True
-  cocone_maps : ∀ ⦃X Y : C⦄ (f g : X ⟶ Y), ∃ (Z : _)(h : Y ⟶ Z), f ≫ h = g ≫ h
+  cocone_objs : ∀ X Y : C, ∃ (Z : _) (f : X ⟶ Z) (g : Y ⟶ Z), True
+  cocone_maps : ∀ ⦃X Y : C⦄ (f g : X ⟶ Y), ∃ (Z : _) (h : Y ⟶ Z), f ≫ h = g ≫ h
 #align category_theory.is_filtered_or_empty CategoryTheory.IsFilteredOrEmpty
 -/
 
@@ -141,11 +141,11 @@ section AllowEmpty
 
 variable {C} [IsFilteredOrEmpty C]
 
-theorem cocone_objs : ∀ X Y : C, ∃ (Z : _)(f : X ⟶ Z)(g : Y ⟶ Z), True :=
+theorem cocone_objs : ∀ X Y : C, ∃ (Z : _) (f : X ⟶ Z) (g : Y ⟶ Z), True :=
   IsFilteredOrEmpty.cocone_objs
 #align category_theory.is_filtered.cocone_objs CategoryTheory.IsFiltered.cocone_objs
 
-theorem cocone_maps : ∀ ⦃X Y : C⦄ (f g : X ⟶ Y), ∃ (Z : _)(h : Y ⟶ Z), f ≫ h = g ≫ h :=
+theorem cocone_maps : ∀ ⦃X Y : C⦄ (f g : X ⟶ Y), ∃ (Z : _) (h : Y ⟶ Z), f ≫ h = g ≫ h :=
   IsFilteredOrEmpty.cocone_maps
 #align category_theory.is_filtered.cocone_maps CategoryTheory.IsFiltered.cocone_maps
 
@@ -232,7 +232,7 @@ theorem sup_objs_exists (O : Finset C) : ∃ S : C, ∀ {X}, X ∈ O → Nonempt
 #align category_theory.is_filtered.sup_objs_exists CategoryTheory.IsFiltered.sup_objs_exists
 -/
 
-variable (O : Finset C) (H : Finset (Σ'(X Y : C)(mX : X ∈ O)(mY : Y ∈ O), X ⟶ Y))
+variable (O : Finset C) (H : Finset (Σ' (X Y : C) (mX : X ∈ O) (mY : Y ∈ O), X ⟶ Y))
 
 #print CategoryTheory.IsFiltered.sup_exists /-
 /-- Given any `finset` of objects `{X, ...}` and
@@ -241,9 +241,9 @@ there exists an object `S`, with a morphism `T X : X ⟶ S` from each `X`,
 such that the triangles commute: `f ≫ T Y = T X`, for `f : X ⟶ Y` in the `finset`.
 -/
 theorem sup_exists :
-    ∃ (S : C)(T : ∀ {X : C}, X ∈ O → (X ⟶ S)),
+    ∃ (S : C) (T : ∀ {X : C}, X ∈ O → (X ⟶ S)),
       ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},
-        (⟨X, Y, mX, mY, f⟩ : Σ'(X Y : C)(mX : X ∈ O)(mY : Y ∈ O), X ⟶ Y) ∈ H → f ≫ T mY = T mX :=
+        (⟨X, Y, mX, mY, f⟩ : Σ' (X Y : C) (mX : X ∈ O) (mY : Y ∈ O), X ⟶ Y) ∈ H → f ≫ T mY = T mX :=
   by
   classical
     apply Finset.induction_on H
@@ -264,7 +264,7 @@ theorem sup_exists :
         apply Finset.mem_of_mem_insert_of_ne mf'
         contrapose! h
         obtain ⟨rfl, h⟩ := h
-        rw [heq_iff_eq, PSigma.mk.inj_iff] at h
+        rw [heq_iff_eq, PSigma.mk.inj_iff] at h 
         exact ⟨rfl, h.1.symm⟩
 #align category_theory.is_filtered.sup_exists CategoryTheory.IsFiltered.sup_exists
 -/
@@ -291,7 +291,7 @@ noncomputable def toSup {X : C} (m : X ∈ O) : X ⟶ sup O H :=
 /-- The triangles of consisting of a morphism in `H` and the maps to `sup O H` commute.
 -/
 theorem toSup_commutes {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y}
-    (mf : (⟨X, Y, mX, mY, f⟩ : Σ'(X Y : C)(mX : X ∈ O)(mY : Y ∈ O), X ⟶ Y) ∈ H) :
+    (mf : (⟨X, Y, mX, mY, f⟩ : Σ' (X Y : C) (mX : X ∈ O) (mY : Y ∈ O), X ⟶ Y) ∈ H) :
     f ≫ toSup O H mY = toSup O H mX :=
   (sup_exists O H).choose_spec.choose_spec mX mY mf
 #align category_theory.is_filtered.to_sup_commutes CategoryTheory.IsFiltered.toSup_commutes
@@ -306,7 +306,7 @@ there exists a cocone over `F`.
 theorem cocone_nonempty (F : J ⥤ C) : Nonempty (Cocone F) := by
   classical
     let O := finset.univ.image F.obj
-    let H : Finset (Σ'(X Y : C)(mX : X ∈ O)(mY : Y ∈ O), X ⟶ Y) :=
+    let H : Finset (Σ' (X Y : C) (mX : X ∈ O) (mY : Y ∈ O), X ⟶ Y) :=
       finset.univ.bUnion fun X : J =>
         finset.univ.bUnion fun Y : J =>
           finset.univ.image fun f : X ⟶ Y => ⟨F.obj X, F.obj Y, by simp, by simp, F.map f⟩
@@ -451,10 +451,10 @@ theorem coeq₃_condition₃ {j₁ j₂ : C} (f g h : j₁ ⟶ j₂) : f ≫ coe
 /-- For every span `j ⟵ i ⟶ j'`, there
    exists a cocone `j ⟶ k ⟵ j'` such that the square commutes. -/
 theorem span {i j j' : C} (f : i ⟶ j) (f' : i ⟶ j') :
-    ∃ (k : C)(g : j ⟶ k)(g' : j' ⟶ k), f ≫ g = f' ≫ g' :=
+    ∃ (k : C) (g : j ⟶ k) (g' : j' ⟶ k), f ≫ g = f' ≫ g' :=
   let ⟨K, G, G', _⟩ := cocone_objs j j'
   let ⟨k, e, he⟩ := cocone_maps (f ≫ G) (f' ≫ G')
-  ⟨k, G ≫ e, G' ≫ e, by simpa only [← category.assoc] ⟩
+  ⟨k, G ≫ e, G' ≫ e, by simpa only [← category.assoc]⟩
 #align category_theory.is_filtered.span CategoryTheory.IsFiltered.span
 -/
 
@@ -473,11 +473,11 @@ in a filtered category, we can construct an object `s` and two morphisms from `k
 making the resulting squares commute.
 -/
 theorem bowtie {j₁ j₂ k₁ k₂ : C} (f₁ : j₁ ⟶ k₁) (g₁ : j₁ ⟶ k₂) (f₂ : j₂ ⟶ k₁) (g₂ : j₂ ⟶ k₂) :
-    ∃ (s : C)(α : k₁ ⟶ s)(β : k₂ ⟶ s), f₁ ≫ α = g₁ ≫ β ∧ f₂ ≫ α = g₂ ≫ β :=
+    ∃ (s : C) (α : k₁ ⟶ s) (β : k₂ ⟶ s), f₁ ≫ α = g₁ ≫ β ∧ f₂ ≫ α = g₂ ≫ β :=
   by
   obtain ⟨t, k₁t, k₂t, ht⟩ := span f₁ g₁
   obtain ⟨s, ts, hs⟩ := cocone_maps (f₂ ≫ k₁t) (g₂ ≫ k₂t)
-  simp_rw [category.assoc] at hs
+  simp_rw [category.assoc] at hs 
   exact ⟨s, k₁t ≫ ts, k₂t ≫ ts, by rw [reassoc_of ht], hs⟩
 #align category_theory.is_filtered.bowtie CategoryTheory.IsFiltered.bowtie
 -/
@@ -502,7 +502,7 @@ to `s`, making the resulting squares commute.
 -/
 theorem tulip {j₁ j₂ j₃ k₁ k₂ l : C} (f₁ : j₁ ⟶ k₁) (f₂ : j₂ ⟶ k₁) (f₃ : j₂ ⟶ k₂) (f₄ : j₃ ⟶ k₂)
     (g₁ : j₁ ⟶ l) (g₂ : j₃ ⟶ l) :
-    ∃ (s : C)(α : k₁ ⟶ s)(β : l ⟶ s)(γ : k₂ ⟶ s),
+    ∃ (s : C) (α : k₁ ⟶ s) (β : l ⟶ s) (γ : k₂ ⟶ s),
       f₁ ≫ α = g₁ ≫ β ∧ f₂ ≫ α = f₃ ≫ γ ∧ f₄ ≫ γ = g₂ ≫ β :=
   by
   obtain ⟨l', k₁l, k₂l, hl⟩ := span f₂ f₃
@@ -523,8 +523,8 @@ end IsFiltered
    are equal.
 -/
 class IsCofilteredOrEmpty : Prop where
-  cone_objs : ∀ X Y : C, ∃ (W : _)(f : W ⟶ X)(g : W ⟶ Y), True
-  cone_maps : ∀ ⦃X Y : C⦄ (f g : X ⟶ Y), ∃ (W : _)(h : W ⟶ X), h ≫ f = h ≫ g
+  cone_objs : ∀ X Y : C, ∃ (W : _) (f : W ⟶ X) (g : W ⟶ Y), True
+  cone_maps : ∀ ⦃X Y : C⦄ (f g : X ⟶ Y), ∃ (W : _) (h : W ⟶ X), h ≫ f = h ≫ g
 #align category_theory.is_cofiltered_or_empty CategoryTheory.IsCofilteredOrEmpty
 -/
 
@@ -591,11 +591,11 @@ section AllowEmpty
 
 variable {C} [IsCofilteredOrEmpty C]
 
-theorem cone_objs : ∀ X Y : C, ∃ (W : _)(f : W ⟶ X)(g : W ⟶ Y), True :=
+theorem cone_objs : ∀ X Y : C, ∃ (W : _) (f : W ⟶ X) (g : W ⟶ Y), True :=
   IsCofilteredOrEmpty.cone_objs
 #align category_theory.is_cofiltered.cone_objs CategoryTheory.IsCofiltered.cone_objs
 
-theorem cone_maps : ∀ ⦃X Y : C⦄ (f g : X ⟶ Y), ∃ (W : _)(h : W ⟶ X), h ≫ f = h ≫ g :=
+theorem cone_maps : ∀ ⦃X Y : C⦄ (f g : X ⟶ Y), ∃ (W : _) (h : W ⟶ X), h ≫ f = h ≫ g :=
   IsCofilteredOrEmpty.cone_maps
 #align category_theory.is_cofiltered.cone_maps CategoryTheory.IsCofiltered.cone_maps
 
@@ -662,7 +662,7 @@ theorem eq_condition {j j' : C} (f f' : j ⟶ j') : eqHom f f' ≫ f = eqHom f f
 /-- For every cospan `j ⟶ i ⟵ j'`,
  there exists a cone `j ⟵ k ⟶ j'` such that the square commutes. -/
 theorem cospan {i j j' : C} (f : j ⟶ i) (f' : j' ⟶ i) :
-    ∃ (k : C)(g : k ⟶ j)(g' : k ⟶ j'), g ≫ f = g' ≫ f' :=
+    ∃ (k : C) (g : k ⟶ j) (g' : k ⟶ j'), g ≫ f = g' ≫ f' :=
   let ⟨K, G, G', _⟩ := cone_objs j j'
   let ⟨k, e, he⟩ := cone_maps (G ≫ f) (G' ≫ f')
   ⟨k, e ≫ G, e ≫ G', by simpa only [category.assoc] using he⟩
@@ -670,7 +670,7 @@ theorem cospan {i j j' : C} (f : j ⟶ i) (f' : j' ⟶ i) :
 -/
 
 theorem CategoryTheory.Functor.ranges_directed (F : C ⥤ Type _) (j : C) :
-    Directed (· ⊇ ·) fun f : Σ'i, i ⟶ j => Set.range (F.map f.2) := fun ⟨i, ij⟩ ⟨k, kj⟩ =>
+    Directed (· ⊇ ·) fun f : Σ' i, i ⟶ j => Set.range (F.map f.2) := fun ⟨i, ij⟩ ⟨k, kj⟩ =>
   by
   let ⟨l, li, lk, e⟩ := cospan ij kj
   refine' ⟨⟨l, lk ≫ kj⟩, e ▸ _, _⟩ <;> simp_rw [F.map_comp] <;> apply Set.range_comp_subset_range
@@ -700,7 +700,7 @@ theorem inf_objs_exists (O : Finset C) : ∃ S : C, ∀ {X}, X ∈ O → Nonempt
 #align category_theory.is_cofiltered.inf_objs_exists CategoryTheory.IsCofiltered.inf_objs_exists
 -/
 
-variable (O : Finset C) (H : Finset (Σ'(X Y : C)(mX : X ∈ O)(mY : Y ∈ O), X ⟶ Y))
+variable (O : Finset C) (H : Finset (Σ' (X Y : C) (mX : X ∈ O) (mY : Y ∈ O), X ⟶ Y))
 
 #print CategoryTheory.IsCofiltered.inf_exists /-
 /-- Given any `finset` of objects `{X, ...}` and
@@ -709,9 +709,9 @@ there exists an object `S`, with a morphism `T X : S ⟶ X` from each `X`,
 such that the triangles commute: `T X ≫ f = T Y`, for `f : X ⟶ Y` in the `finset`.
 -/
 theorem inf_exists :
-    ∃ (S : C)(T : ∀ {X : C}, X ∈ O → (S ⟶ X)),
+    ∃ (S : C) (T : ∀ {X : C}, X ∈ O → (S ⟶ X)),
       ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},
-        (⟨X, Y, mX, mY, f⟩ : Σ'(X Y : C)(mX : X ∈ O)(mY : Y ∈ O), X ⟶ Y) ∈ H → T mX ≫ f = T mY :=
+        (⟨X, Y, mX, mY, f⟩ : Σ' (X Y : C) (mX : X ∈ O) (mY : Y ∈ O), X ⟶ Y) ∈ H → T mX ≫ f = T mY :=
   by
   classical
     apply Finset.induction_on H
@@ -732,7 +732,7 @@ theorem inf_exists :
         apply Finset.mem_of_mem_insert_of_ne mf'
         contrapose! h
         obtain ⟨rfl, h⟩ := h
-        rw [heq_iff_eq, PSigma.mk.inj_iff] at h
+        rw [heq_iff_eq, PSigma.mk.inj_iff] at h 
         exact ⟨rfl, h.1.symm⟩
 #align category_theory.is_cofiltered.inf_exists CategoryTheory.IsCofiltered.inf_exists
 -/
@@ -759,7 +759,7 @@ noncomputable def infTo {X : C} (m : X ∈ O) : inf O H ⟶ X :=
 /-- The triangles consisting of a morphism in `H` and the maps from `inf O H` commute.
 -/
 theorem infTo_commutes {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y}
-    (mf : (⟨X, Y, mX, mY, f⟩ : Σ'(X Y : C)(mX : X ∈ O)(mY : Y ∈ O), X ⟶ Y) ∈ H) :
+    (mf : (⟨X, Y, mX, mY, f⟩ : Σ' (X Y : C) (mX : X ∈ O) (mY : Y ∈ O), X ⟶ Y) ∈ H) :
     infTo O H mX ≫ f = infTo O H mY :=
   (inf_exists O H).choose_spec.choose_spec mX mY mf
 #align category_theory.is_cofiltered.inf_to_commutes CategoryTheory.IsCofiltered.infTo_commutes
@@ -774,7 +774,7 @@ there exists a cone over `F`.
 theorem cone_nonempty (F : J ⥤ C) : Nonempty (Cone F) := by
   classical
     let O := finset.univ.image F.obj
-    let H : Finset (Σ'(X Y : C)(mX : X ∈ O)(mY : Y ∈ O), X ⟶ Y) :=
+    let H : Finset (Σ' (X Y : C) (mX : X ∈ O) (mY : Y ∈ O), X ⟶ Y) :=
       finset.univ.bUnion fun X : J =>
         finset.univ.bUnion fun Y : J =>
           finset.univ.image fun f : X ⟶ Y => ⟨F.obj X, F.obj Y, by simp, by simp, F.map f⟩
Diff
@@ -107,6 +107,7 @@ instance (priority := 100) isFiltered_of_semilatticeSup_nonempty (α : Type u) [
 #align category_theory.is_filtered_of_semilattice_sup_nonempty CategoryTheory.isFiltered_of_semilatticeSup_nonempty
 -/
 
+#print CategoryTheory.isFilteredOrEmpty_of_directed_le /-
 instance (priority := 100) isFilteredOrEmpty_of_directed_le (α : Type u) [Preorder α]
     [IsDirected α (· ≤ ·)] : IsFilteredOrEmpty α
     where
@@ -115,10 +116,13 @@ instance (priority := 100) isFilteredOrEmpty_of_directed_le (α : Type u) [Preor
     ⟨Z, homOfLE h1, homOfLE h2, trivial⟩
   cocone_maps X Y f g := ⟨Y, 𝟙 _, by simp⟩
 #align category_theory.is_filtered_or_empty_of_directed_le CategoryTheory.isFilteredOrEmpty_of_directed_le
+-/
 
+#print CategoryTheory.isFiltered_of_directed_le_nonempty /-
 instance (priority := 100) isFiltered_of_directed_le_nonempty (α : Type u) [Preorder α]
     [IsDirected α (· ≤ ·)] [Nonempty α] : IsFiltered α where
 #align category_theory.is_filtered_of_directed_le_nonempty CategoryTheory.isFiltered_of_directed_le_nonempty
+-/
 
 -- Sanity checks
 example (α : Type u) [SemilatticeSup α] [OrderBot α] : IsFiltered α := by infer_instance
@@ -553,6 +557,7 @@ instance (priority := 100) isCofiltered_of_semilatticeInf_nonempty (α : Type u)
 #align category_theory.is_cofiltered_of_semilattice_inf_nonempty CategoryTheory.isCofiltered_of_semilatticeInf_nonempty
 -/
 
+#print CategoryTheory.isCofilteredOrEmpty_of_directed_ge /-
 instance (priority := 100) isCofilteredOrEmpty_of_directed_ge (α : Type u) [Preorder α]
     [IsDirected α (· ≥ ·)] : IsCofilteredOrEmpty α
     where
@@ -561,10 +566,13 @@ instance (priority := 100) isCofilteredOrEmpty_of_directed_ge (α : Type u) [Pre
     ⟨Z, homOfLE hX, homOfLE hY, trivial⟩
   cone_maps X Y f g := ⟨X, 𝟙 _, by simp⟩
 #align category_theory.is_cofiltered_or_empty_of_directed_ge CategoryTheory.isCofilteredOrEmpty_of_directed_ge
+-/
 
+#print CategoryTheory.isCofiltered_of_directed_ge_nonempty /-
 instance (priority := 100) isCofiltered_of_directed_ge_nonempty (α : Type u) [Preorder α]
     [IsDirected α (· ≥ ·)] [Nonempty α] : IsCofiltered α where
 #align category_theory.is_cofiltered_of_directed_ge_nonempty CategoryTheory.isCofiltered_of_directed_ge_nonempty
+-/
 
 -- Sanity checks
 example (α : Type u) [SemilatticeInf α] [OrderBot α] : IsCofiltered α := by infer_instance
Diff
@@ -107,12 +107,6 @@ instance (priority := 100) isFiltered_of_semilatticeSup_nonempty (α : Type u) [
 #align category_theory.is_filtered_of_semilattice_sup_nonempty CategoryTheory.isFiltered_of_semilatticeSup_nonempty
 -/
 
-/- warning: category_theory.is_filtered_or_empty_of_directed_le -> CategoryTheory.isFilteredOrEmpty_of_directed_le is a dubious translation:
-lean 3 declaration is
-  forall (α : Type.{u1}) [_inst_2 : Preorder.{u1} α] [_inst_3 : IsDirected.{u1} α (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_2))], CategoryTheory.IsFilteredOrEmpty.{u1, u1} α (Preorder.smallCategory.{u1} α _inst_2)
-but is expected to have type
-  forall (α : Type.{u1}) [_inst_2 : Preorder.{u1} α] [_inst_3 : IsDirected.{u1} α (fun (x._@.Mathlib.CategoryTheory.Filtered._hyg.210 : α) (x._@.Mathlib.CategoryTheory.Filtered._hyg.212 : α) => LE.le.{u1} α (Preorder.toLE.{u1} α _inst_2) x._@.Mathlib.CategoryTheory.Filtered._hyg.210 x._@.Mathlib.CategoryTheory.Filtered._hyg.212)], CategoryTheory.IsFilteredOrEmpty.{u1, u1} α (Preorder.smallCategory.{u1} α _inst_2)
-Case conversion may be inaccurate. Consider using '#align category_theory.is_filtered_or_empty_of_directed_le CategoryTheory.isFilteredOrEmpty_of_directed_leₓ'. -/
 instance (priority := 100) isFilteredOrEmpty_of_directed_le (α : Type u) [Preorder α]
     [IsDirected α (· ≤ ·)] : IsFilteredOrEmpty α
     where
@@ -122,12 +116,6 @@ instance (priority := 100) isFilteredOrEmpty_of_directed_le (α : Type u) [Preor
   cocone_maps X Y f g := ⟨Y, 𝟙 _, by simp⟩
 #align category_theory.is_filtered_or_empty_of_directed_le CategoryTheory.isFilteredOrEmpty_of_directed_le
 
-/- warning: category_theory.is_filtered_of_directed_le_nonempty -> CategoryTheory.isFiltered_of_directed_le_nonempty is a dubious translation:
-lean 3 declaration is
-  forall (α : Type.{u1}) [_inst_2 : Preorder.{u1} α] [_inst_3 : IsDirected.{u1} α (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_2))] [_inst_4 : Nonempty.{succ u1} α], CategoryTheory.IsFiltered.{u1, u1} α (Preorder.smallCategory.{u1} α _inst_2)
-but is expected to have type
-  forall (α : Type.{u1}) [_inst_2 : Preorder.{u1} α] [_inst_3 : IsDirected.{u1} α (fun (x._@.Mathlib.CategoryTheory.Filtered._hyg.309 : α) (x._@.Mathlib.CategoryTheory.Filtered._hyg.311 : α) => LE.le.{u1} α (Preorder.toLE.{u1} α _inst_2) x._@.Mathlib.CategoryTheory.Filtered._hyg.309 x._@.Mathlib.CategoryTheory.Filtered._hyg.311)] [_inst_4 : Nonempty.{succ u1} α], CategoryTheory.IsFiltered.{u1, u1} α (Preorder.smallCategory.{u1} α _inst_2)
-Case conversion may be inaccurate. Consider using '#align category_theory.is_filtered_of_directed_le_nonempty CategoryTheory.isFiltered_of_directed_le_nonemptyₓ'. -/
 instance (priority := 100) isFiltered_of_directed_le_nonempty (α : Type u) [Preorder α]
     [IsDirected α (· ≤ ·)] [Nonempty α] : IsFiltered α where
 #align category_theory.is_filtered_of_directed_le_nonempty CategoryTheory.isFiltered_of_directed_le_nonempty
@@ -360,12 +348,6 @@ theorem of_isRightAdjoint (R : C ⥤ D) [IsRightAdjoint R] : IsFiltered D :=
 #align category_theory.is_filtered.of_is_right_adjoint CategoryTheory.IsFiltered.of_isRightAdjoint
 -/
 
-/- warning: category_theory.is_filtered.of_equivalence -> CategoryTheory.IsFiltered.of_equivalence is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u1, u3} C] [_inst_2 : CategoryTheory.IsFiltered.{u1, u3} C _inst_1] {D : Type.{u4}} [_inst_5 : CategoryTheory.Category.{u2, u4} D], (CategoryTheory.Equivalence.{u1, u2, u3, u4} C _inst_1 D _inst_5) -> (CategoryTheory.IsFiltered.{u2, u4} D _inst_5)
-but is expected to have type
-  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u1, u3} C] [_inst_2 : CategoryTheory.IsFiltered.{u1, u3} C _inst_1] {D : Type.{u4}} [_inst_5 : CategoryTheory.Category.{u2, u4} D], (CategoryTheory.Equivalence.{u1, u2, u3, u4} C D _inst_1 _inst_5) -> (CategoryTheory.IsFiltered.{u2, u4} D _inst_5)
-Case conversion may be inaccurate. Consider using '#align category_theory.is_filtered.of_equivalence CategoryTheory.IsFiltered.of_equivalenceₓ'. -/
 /-- Being filtered is preserved by equivalence of categories. -/
 theorem of_equivalence (h : C ≌ D) : IsFiltered D :=
   of_right_adjoint h.symm.toAdjunction
@@ -571,12 +553,6 @@ instance (priority := 100) isCofiltered_of_semilatticeInf_nonempty (α : Type u)
 #align category_theory.is_cofiltered_of_semilattice_inf_nonempty CategoryTheory.isCofiltered_of_semilatticeInf_nonempty
 -/
 
-/- warning: category_theory.is_cofiltered_or_empty_of_directed_ge -> CategoryTheory.isCofilteredOrEmpty_of_directed_ge is a dubious translation:
-lean 3 declaration is
-  forall (α : Type.{u1}) [_inst_2 : Preorder.{u1} α] [_inst_3 : IsDirected.{u1} α (GE.ge.{u1} α (Preorder.toHasLe.{u1} α _inst_2))], CategoryTheory.IsCofilteredOrEmpty.{u1, u1} α (Preorder.smallCategory.{u1} α _inst_2)
-but is expected to have type
-  forall (α : Type.{u1}) [_inst_2 : Preorder.{u1} α] [_inst_3 : IsDirected.{u1} α (fun (x._@.Mathlib.CategoryTheory.Filtered._hyg.3767 : α) (x._@.Mathlib.CategoryTheory.Filtered._hyg.3769 : α) => GE.ge.{u1} α (Preorder.toLE.{u1} α _inst_2) x._@.Mathlib.CategoryTheory.Filtered._hyg.3767 x._@.Mathlib.CategoryTheory.Filtered._hyg.3769)], CategoryTheory.IsCofilteredOrEmpty.{u1, u1} α (Preorder.smallCategory.{u1} α _inst_2)
-Case conversion may be inaccurate. Consider using '#align category_theory.is_cofiltered_or_empty_of_directed_ge CategoryTheory.isCofilteredOrEmpty_of_directed_geₓ'. -/
 instance (priority := 100) isCofilteredOrEmpty_of_directed_ge (α : Type u) [Preorder α]
     [IsDirected α (· ≥ ·)] : IsCofilteredOrEmpty α
     where
@@ -586,12 +562,6 @@ instance (priority := 100) isCofilteredOrEmpty_of_directed_ge (α : Type u) [Pre
   cone_maps X Y f g := ⟨X, 𝟙 _, by simp⟩
 #align category_theory.is_cofiltered_or_empty_of_directed_ge CategoryTheory.isCofilteredOrEmpty_of_directed_ge
 
-/- warning: category_theory.is_cofiltered_of_directed_ge_nonempty -> CategoryTheory.isCofiltered_of_directed_ge_nonempty is a dubious translation:
-lean 3 declaration is
-  forall (α : Type.{u1}) [_inst_2 : Preorder.{u1} α] [_inst_3 : IsDirected.{u1} α (GE.ge.{u1} α (Preorder.toHasLe.{u1} α _inst_2))] [_inst_4 : Nonempty.{succ u1} α], CategoryTheory.IsCofiltered.{u1, u1} α (Preorder.smallCategory.{u1} α _inst_2)
-but is expected to have type
-  forall (α : Type.{u1}) [_inst_2 : Preorder.{u1} α] [_inst_3 : IsDirected.{u1} α (fun (x._@.Mathlib.CategoryTheory.Filtered._hyg.3866 : α) (x._@.Mathlib.CategoryTheory.Filtered._hyg.3868 : α) => GE.ge.{u1} α (Preorder.toLE.{u1} α _inst_2) x._@.Mathlib.CategoryTheory.Filtered._hyg.3866 x._@.Mathlib.CategoryTheory.Filtered._hyg.3868)] [_inst_4 : Nonempty.{succ u1} α], CategoryTheory.IsCofiltered.{u1, u1} α (Preorder.smallCategory.{u1} α _inst_2)
-Case conversion may be inaccurate. Consider using '#align category_theory.is_cofiltered_of_directed_ge_nonempty CategoryTheory.isCofiltered_of_directed_ge_nonemptyₓ'. -/
 instance (priority := 100) isCofiltered_of_directed_ge_nonempty (α : Type u) [Preorder α]
     [IsDirected α (· ≥ ·)] [Nonempty α] : IsCofiltered α where
 #align category_theory.is_cofiltered_of_directed_ge_nonempty CategoryTheory.isCofiltered_of_directed_ge_nonempty
@@ -691,12 +661,6 @@ theorem cospan {i j j' : C} (f : j ⟶ i) (f' : j' ⟶ i) :
 #align category_theory.is_cofiltered.cospan CategoryTheory.IsCofiltered.cospan
 -/
 
-/- warning: category_theory.functor.ranges_directed -> CategoryTheory.Functor.ranges_directed is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.IsCofilteredOrEmpty.{u1, u2} C _inst_1] (F : CategoryTheory.Functor.{u1, u3, u2, succ u3} C _inst_1 Type.{u3} CategoryTheory.types.{u3}) (j : C), Directed.{u3, max 1 (succ u2) (succ u1)} (Set.{u3} (CategoryTheory.Functor.obj.{u1, u3, u2, succ u3} C _inst_1 Type.{u3} CategoryTheory.types.{u3} F j)) (PSigma.{succ u2, succ u1} C (fun (i : C) => Quiver.Hom.{succ u1, u2} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1)) i j)) (Superset.{u3} (Set.{u3} (CategoryTheory.Functor.obj.{u1, u3, u2, succ u3} C _inst_1 Type.{u3} CategoryTheory.types.{u3} F j)) (Set.hasSubset.{u3} (CategoryTheory.Functor.obj.{u1, u3, u2, succ u3} C _inst_1 Type.{u3} CategoryTheory.types.{u3} F j))) (fun (f : PSigma.{succ u2, succ u1} C (fun (i : C) => Quiver.Hom.{succ u1, u2} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1)) i j)) => Set.range.{u3, succ u3} (CategoryTheory.Functor.obj.{u1, u3, u2, succ u3} C _inst_1 Type.{u3} CategoryTheory.types.{u3} F j) (CategoryTheory.Functor.obj.{u1, u3, u2, succ u3} C _inst_1 Type.{u3} CategoryTheory.types.{u3} F (PSigma.fst.{succ u2, succ u1} C (fun (i : C) => Quiver.Hom.{succ u1, u2} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1)) i j) f)) (CategoryTheory.Functor.map.{u1, u3, u2, succ u3} C _inst_1 Type.{u3} CategoryTheory.types.{u3} F (PSigma.fst.{succ u2, succ u1} C (fun (i : C) => Quiver.Hom.{succ u1, u2} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1)) i j) f) j (PSigma.snd.{succ u2, succ u1} C (fun (i : C) => Quiver.Hom.{succ u1, u2} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1)) i j) f)))
-but is expected to have type
-  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u2, u3} C] [_inst_2 : CategoryTheory.IsCofilteredOrEmpty.{u2, u3} C _inst_1] (F : CategoryTheory.Functor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1}) (j : C), Directed.{u1, max (succ u3) (succ u2)} (Set.{u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j)) (PSigma.{succ u3, succ u2} C (fun (i : C) => Quiver.Hom.{succ u2, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) i j)) (fun (x._@.Mathlib.CategoryTheory.Filtered._hyg.4396 : Set.{u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j)) (x._@.Mathlib.CategoryTheory.Filtered._hyg.4398 : Set.{u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j)) => Superset.{u1} (Set.{u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j)) (Set.instHasSubsetSet.{u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j)) x._@.Mathlib.CategoryTheory.Filtered._hyg.4396 x._@.Mathlib.CategoryTheory.Filtered._hyg.4398) (fun (f : PSigma.{succ u3, succ u2} C (fun (i : C) => Quiver.Hom.{succ u2, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) i j)) => Set.range.{u1, succ u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j) (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) (PSigma.fst.{succ u3, succ u2} C (fun (i : C) => Quiver.Hom.{succ u2, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) i j) f)) (Prefunctor.map.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) (PSigma.fst.{succ u3, succ u2} C (fun (i : C) => Quiver.Hom.{succ u2, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) i j) f) j (PSigma.snd.{succ u3, succ u2} C (fun (i : C) => Quiver.Hom.{succ u2, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) i j) f)))
-Case conversion may be inaccurate. Consider using '#align category_theory.functor.ranges_directed CategoryTheory.Functor.ranges_directedₓ'. -/
 theorem CategoryTheory.Functor.ranges_directed (F : C ⥤ Type _) (j : C) :
     Directed (· ⊇ ·) fun f : Σ'i, i ⟶ j => Set.range (F.map f.2) := fun ⟨i, ij⟩ ⟨k, kj⟩ =>
   by
@@ -851,12 +815,6 @@ theorem of_isLeftAdjoint (L : C ⥤ D) [IsLeftAdjoint L] : IsCofiltered D :=
 #align category_theory.is_cofiltered.of_is_left_adjoint CategoryTheory.IsCofiltered.of_isLeftAdjoint
 -/
 
-/- warning: category_theory.is_cofiltered.of_equivalence -> CategoryTheory.IsCofiltered.of_equivalence is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u1, u3} C] [_inst_2 : CategoryTheory.IsCofiltered.{u1, u3} C _inst_1] {D : Type.{u4}} [_inst_5 : CategoryTheory.Category.{u2, u4} D], (CategoryTheory.Equivalence.{u1, u2, u3, u4} C _inst_1 D _inst_5) -> (CategoryTheory.IsCofiltered.{u2, u4} D _inst_5)
-but is expected to have type
-  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u1, u3} C] [_inst_2 : CategoryTheory.IsCofiltered.{u1, u3} C _inst_1] {D : Type.{u4}} [_inst_5 : CategoryTheory.Category.{u2, u4} D], (CategoryTheory.Equivalence.{u1, u2, u3, u4} C D _inst_1 _inst_5) -> (CategoryTheory.IsCofiltered.{u2, u4} D _inst_5)
-Case conversion may be inaccurate. Consider using '#align category_theory.is_cofiltered.of_equivalence CategoryTheory.IsCofiltered.of_equivalenceₓ'. -/
 /-- Being cofiltered is preserved by equivalence of categories. -/
 theorem of_equivalence (h : C ≌ D) : IsCofiltered D :=
   of_left_adjoint h.toAdjunction
Diff
@@ -210,7 +210,7 @@ noncomputable def coeqHom {j j' : C} (f f' : j ⟶ j') : j' ⟶ coeq f f' :=
 /-- `coeq_condition f f'`, for morphisms `f f' : j ⟶ j'`, is the proof that
 `f ≫ coeq_hom f f' = f' ≫ coeq_hom f f'`.
 -/
-@[simp, reassoc.1]
+@[simp, reassoc]
 theorem coeq_condition {j j' : C} (f f' : j ⟶ j') : f ≫ coeqHom f f' = f' ≫ coeqHom f f' :=
   (cocone_maps f f').choose_spec.choose_spec
 #align category_theory.is_filtered.coeq_condition CategoryTheory.IsFiltered.coeq_condition
@@ -674,7 +674,7 @@ noncomputable def eqHom {j j' : C} (f f' : j ⟶ j') : eq f f' ⟶ j :=
 /-- `eq_condition f f'`, for morphisms `f f' : j ⟶ j'`, is the proof that
 `eq_hom f f' ≫ f = eq_hom f f' ≫ f'`.
 -/
-@[simp, reassoc.1]
+@[simp, reassoc]
 theorem eq_condition {j j' : C} (f f' : j ⟶ j') : eqHom f f' ≫ f = eqHom f f' ≫ f' :=
   (cone_maps f f').choose_spec.choose_spec
 #align category_theory.is_cofiltered.eq_condition CategoryTheory.IsCofiltered.eq_condition
Diff
@@ -107,7 +107,12 @@ instance (priority := 100) isFiltered_of_semilatticeSup_nonempty (α : Type u) [
 #align category_theory.is_filtered_of_semilattice_sup_nonempty CategoryTheory.isFiltered_of_semilatticeSup_nonempty
 -/
 
-#print CategoryTheory.isFilteredOrEmpty_of_directed_le /-
+/- warning: category_theory.is_filtered_or_empty_of_directed_le -> CategoryTheory.isFilteredOrEmpty_of_directed_le is a dubious translation:
+lean 3 declaration is
+  forall (α : Type.{u1}) [_inst_2 : Preorder.{u1} α] [_inst_3 : IsDirected.{u1} α (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_2))], CategoryTheory.IsFilteredOrEmpty.{u1, u1} α (Preorder.smallCategory.{u1} α _inst_2)
+but is expected to have type
+  forall (α : Type.{u1}) [_inst_2 : Preorder.{u1} α] [_inst_3 : IsDirected.{u1} α (fun (x._@.Mathlib.CategoryTheory.Filtered._hyg.210 : α) (x._@.Mathlib.CategoryTheory.Filtered._hyg.212 : α) => LE.le.{u1} α (Preorder.toLE.{u1} α _inst_2) x._@.Mathlib.CategoryTheory.Filtered._hyg.210 x._@.Mathlib.CategoryTheory.Filtered._hyg.212)], CategoryTheory.IsFilteredOrEmpty.{u1, u1} α (Preorder.smallCategory.{u1} α _inst_2)
+Case conversion may be inaccurate. Consider using '#align category_theory.is_filtered_or_empty_of_directed_le CategoryTheory.isFilteredOrEmpty_of_directed_leₓ'. -/
 instance (priority := 100) isFilteredOrEmpty_of_directed_le (α : Type u) [Preorder α]
     [IsDirected α (· ≤ ·)] : IsFilteredOrEmpty α
     where
@@ -116,13 +121,16 @@ instance (priority := 100) isFilteredOrEmpty_of_directed_le (α : Type u) [Preor
     ⟨Z, homOfLE h1, homOfLE h2, trivial⟩
   cocone_maps X Y f g := ⟨Y, 𝟙 _, by simp⟩
 #align category_theory.is_filtered_or_empty_of_directed_le CategoryTheory.isFilteredOrEmpty_of_directed_le
--/
 
-#print CategoryTheory.isFiltered_of_directed_le_nonempty /-
+/- warning: category_theory.is_filtered_of_directed_le_nonempty -> CategoryTheory.isFiltered_of_directed_le_nonempty is a dubious translation:
+lean 3 declaration is
+  forall (α : Type.{u1}) [_inst_2 : Preorder.{u1} α] [_inst_3 : IsDirected.{u1} α (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_2))] [_inst_4 : Nonempty.{succ u1} α], CategoryTheory.IsFiltered.{u1, u1} α (Preorder.smallCategory.{u1} α _inst_2)
+but is expected to have type
+  forall (α : Type.{u1}) [_inst_2 : Preorder.{u1} α] [_inst_3 : IsDirected.{u1} α (fun (x._@.Mathlib.CategoryTheory.Filtered._hyg.309 : α) (x._@.Mathlib.CategoryTheory.Filtered._hyg.311 : α) => LE.le.{u1} α (Preorder.toLE.{u1} α _inst_2) x._@.Mathlib.CategoryTheory.Filtered._hyg.309 x._@.Mathlib.CategoryTheory.Filtered._hyg.311)] [_inst_4 : Nonempty.{succ u1} α], CategoryTheory.IsFiltered.{u1, u1} α (Preorder.smallCategory.{u1} α _inst_2)
+Case conversion may be inaccurate. Consider using '#align category_theory.is_filtered_of_directed_le_nonempty CategoryTheory.isFiltered_of_directed_le_nonemptyₓ'. -/
 instance (priority := 100) isFiltered_of_directed_le_nonempty (α : Type u) [Preorder α]
     [IsDirected α (· ≤ ·)] [Nonempty α] : IsFiltered α where
 #align category_theory.is_filtered_of_directed_le_nonempty CategoryTheory.isFiltered_of_directed_le_nonempty
--/
 
 -- Sanity checks
 example (α : Type u) [SemilatticeSup α] [OrderBot α] : IsFiltered α := by infer_instance
@@ -563,7 +571,12 @@ instance (priority := 100) isCofiltered_of_semilatticeInf_nonempty (α : Type u)
 #align category_theory.is_cofiltered_of_semilattice_inf_nonempty CategoryTheory.isCofiltered_of_semilatticeInf_nonempty
 -/
 
-#print CategoryTheory.isCofilteredOrEmpty_of_directed_ge /-
+/- warning: category_theory.is_cofiltered_or_empty_of_directed_ge -> CategoryTheory.isCofilteredOrEmpty_of_directed_ge is a dubious translation:
+lean 3 declaration is
+  forall (α : Type.{u1}) [_inst_2 : Preorder.{u1} α] [_inst_3 : IsDirected.{u1} α (GE.ge.{u1} α (Preorder.toHasLe.{u1} α _inst_2))], CategoryTheory.IsCofilteredOrEmpty.{u1, u1} α (Preorder.smallCategory.{u1} α _inst_2)
+but is expected to have type
+  forall (α : Type.{u1}) [_inst_2 : Preorder.{u1} α] [_inst_3 : IsDirected.{u1} α (fun (x._@.Mathlib.CategoryTheory.Filtered._hyg.3767 : α) (x._@.Mathlib.CategoryTheory.Filtered._hyg.3769 : α) => GE.ge.{u1} α (Preorder.toLE.{u1} α _inst_2) x._@.Mathlib.CategoryTheory.Filtered._hyg.3767 x._@.Mathlib.CategoryTheory.Filtered._hyg.3769)], CategoryTheory.IsCofilteredOrEmpty.{u1, u1} α (Preorder.smallCategory.{u1} α _inst_2)
+Case conversion may be inaccurate. Consider using '#align category_theory.is_cofiltered_or_empty_of_directed_ge CategoryTheory.isCofilteredOrEmpty_of_directed_geₓ'. -/
 instance (priority := 100) isCofilteredOrEmpty_of_directed_ge (α : Type u) [Preorder α]
     [IsDirected α (· ≥ ·)] : IsCofilteredOrEmpty α
     where
@@ -572,13 +585,16 @@ instance (priority := 100) isCofilteredOrEmpty_of_directed_ge (α : Type u) [Pre
     ⟨Z, homOfLE hX, homOfLE hY, trivial⟩
   cone_maps X Y f g := ⟨X, 𝟙 _, by simp⟩
 #align category_theory.is_cofiltered_or_empty_of_directed_ge CategoryTheory.isCofilteredOrEmpty_of_directed_ge
--/
 
-#print CategoryTheory.isCofiltered_of_directed_ge_nonempty /-
+/- warning: category_theory.is_cofiltered_of_directed_ge_nonempty -> CategoryTheory.isCofiltered_of_directed_ge_nonempty is a dubious translation:
+lean 3 declaration is
+  forall (α : Type.{u1}) [_inst_2 : Preorder.{u1} α] [_inst_3 : IsDirected.{u1} α (GE.ge.{u1} α (Preorder.toHasLe.{u1} α _inst_2))] [_inst_4 : Nonempty.{succ u1} α], CategoryTheory.IsCofiltered.{u1, u1} α (Preorder.smallCategory.{u1} α _inst_2)
+but is expected to have type
+  forall (α : Type.{u1}) [_inst_2 : Preorder.{u1} α] [_inst_3 : IsDirected.{u1} α (fun (x._@.Mathlib.CategoryTheory.Filtered._hyg.3866 : α) (x._@.Mathlib.CategoryTheory.Filtered._hyg.3868 : α) => GE.ge.{u1} α (Preorder.toLE.{u1} α _inst_2) x._@.Mathlib.CategoryTheory.Filtered._hyg.3866 x._@.Mathlib.CategoryTheory.Filtered._hyg.3868)] [_inst_4 : Nonempty.{succ u1} α], CategoryTheory.IsCofiltered.{u1, u1} α (Preorder.smallCategory.{u1} α _inst_2)
+Case conversion may be inaccurate. Consider using '#align category_theory.is_cofiltered_of_directed_ge_nonempty CategoryTheory.isCofiltered_of_directed_ge_nonemptyₓ'. -/
 instance (priority := 100) isCofiltered_of_directed_ge_nonempty (α : Type u) [Preorder α]
     [IsDirected α (· ≥ ·)] [Nonempty α] : IsCofiltered α where
 #align category_theory.is_cofiltered_of_directed_ge_nonempty CategoryTheory.isCofiltered_of_directed_ge_nonempty
--/
 
 -- Sanity checks
 example (α : Type u) [SemilatticeInf α] [OrderBot α] : IsCofiltered α := by infer_instance
Diff
@@ -316,7 +316,7 @@ theorem cocone_nonempty (F : J ⥤ C) : Nonempty (Cocone F) := by
     dsimp
     simp only [category.comp_id]
     apply w
-    simp only [Finset.mem_univ, Finset.mem_bunionᵢ, exists_and_left, exists_prop_of_true,
+    simp only [Finset.mem_univ, Finset.mem_biUnion, exists_and_left, exists_prop_of_true,
       Finset.mem_image]
     exact ⟨j, rfl, j', g, by simp⟩
 #align category_theory.is_filtered.cocone_nonempty CategoryTheory.IsFiltered.cocone_nonempty
@@ -797,7 +797,7 @@ theorem cone_nonempty (F : J ⥤ C) : Nonempty (Cone F) := by
     simp only [category.id_comp]
     symm
     apply w
-    simp only [Finset.mem_univ, Finset.mem_bunionᵢ, exists_and_left, exists_prop_of_true,
+    simp only [Finset.mem_univ, Finset.mem_biUnion, exists_and_left, exists_prop_of_true,
       Finset.mem_image]
     exact ⟨j, rfl, j', g, by simp⟩
 #align category_theory.is_cofiltered.cone_nonempty CategoryTheory.IsCofiltered.cone_nonempty
Diff
@@ -679,7 +679,7 @@ theorem cospan {i j j' : C} (f : j ⟶ i) (f' : j' ⟶ i) :
 lean 3 declaration is
   forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.IsCofilteredOrEmpty.{u1, u2} C _inst_1] (F : CategoryTheory.Functor.{u1, u3, u2, succ u3} C _inst_1 Type.{u3} CategoryTheory.types.{u3}) (j : C), Directed.{u3, max 1 (succ u2) (succ u1)} (Set.{u3} (CategoryTheory.Functor.obj.{u1, u3, u2, succ u3} C _inst_1 Type.{u3} CategoryTheory.types.{u3} F j)) (PSigma.{succ u2, succ u1} C (fun (i : C) => Quiver.Hom.{succ u1, u2} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1)) i j)) (Superset.{u3} (Set.{u3} (CategoryTheory.Functor.obj.{u1, u3, u2, succ u3} C _inst_1 Type.{u3} CategoryTheory.types.{u3} F j)) (Set.hasSubset.{u3} (CategoryTheory.Functor.obj.{u1, u3, u2, succ u3} C _inst_1 Type.{u3} CategoryTheory.types.{u3} F j))) (fun (f : PSigma.{succ u2, succ u1} C (fun (i : C) => Quiver.Hom.{succ u1, u2} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1)) i j)) => Set.range.{u3, succ u3} (CategoryTheory.Functor.obj.{u1, u3, u2, succ u3} C _inst_1 Type.{u3} CategoryTheory.types.{u3} F j) (CategoryTheory.Functor.obj.{u1, u3, u2, succ u3} C _inst_1 Type.{u3} CategoryTheory.types.{u3} F (PSigma.fst.{succ u2, succ u1} C (fun (i : C) => Quiver.Hom.{succ u1, u2} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1)) i j) f)) (CategoryTheory.Functor.map.{u1, u3, u2, succ u3} C _inst_1 Type.{u3} CategoryTheory.types.{u3} F (PSigma.fst.{succ u2, succ u1} C (fun (i : C) => Quiver.Hom.{succ u1, u2} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1)) i j) f) j (PSigma.snd.{succ u2, succ u1} C (fun (i : C) => Quiver.Hom.{succ u1, u2} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1)) i j) f)))
 but is expected to have type
-  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u2, u3} C] [_inst_2 : CategoryTheory.IsCofilteredOrEmpty.{u2, u3} C _inst_1] (F : CategoryTheory.Functor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1}) (j : C), Directed.{u1, max (succ u3) (succ u2)} (Set.{u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j)) (PSigma.{succ u3, succ u2} C (fun (i : C) => Quiver.Hom.{succ u2, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) i j)) (fun (x._@.Mathlib.CategoryTheory.Filtered._hyg.4398 : Set.{u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j)) (x._@.Mathlib.CategoryTheory.Filtered._hyg.4400 : Set.{u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j)) => Superset.{u1} (Set.{u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j)) (Set.instHasSubsetSet.{u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j)) x._@.Mathlib.CategoryTheory.Filtered._hyg.4398 x._@.Mathlib.CategoryTheory.Filtered._hyg.4400) (fun (f : PSigma.{succ u3, succ u2} C (fun (i : C) => Quiver.Hom.{succ u2, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) i j)) => Set.range.{u1, succ u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j) (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) (PSigma.fst.{succ u3, succ u2} C (fun (i : C) => Quiver.Hom.{succ u2, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) i j) f)) (Prefunctor.map.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) (PSigma.fst.{succ u3, succ u2} C (fun (i : C) => Quiver.Hom.{succ u2, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) i j) f) j (PSigma.snd.{succ u3, succ u2} C (fun (i : C) => Quiver.Hom.{succ u2, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) i j) f)))
+  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u2, u3} C] [_inst_2 : CategoryTheory.IsCofilteredOrEmpty.{u2, u3} C _inst_1] (F : CategoryTheory.Functor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1}) (j : C), Directed.{u1, max (succ u3) (succ u2)} (Set.{u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j)) (PSigma.{succ u3, succ u2} C (fun (i : C) => Quiver.Hom.{succ u2, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) i j)) (fun (x._@.Mathlib.CategoryTheory.Filtered._hyg.4396 : Set.{u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j)) (x._@.Mathlib.CategoryTheory.Filtered._hyg.4398 : Set.{u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j)) => Superset.{u1} (Set.{u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j)) (Set.instHasSubsetSet.{u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j)) x._@.Mathlib.CategoryTheory.Filtered._hyg.4396 x._@.Mathlib.CategoryTheory.Filtered._hyg.4398) (fun (f : PSigma.{succ u3, succ u2} C (fun (i : C) => Quiver.Hom.{succ u2, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) i j)) => Set.range.{u1, succ u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j) (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) (PSigma.fst.{succ u3, succ u2} C (fun (i : C) => Quiver.Hom.{succ u2, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) i j) f)) (Prefunctor.map.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) (PSigma.fst.{succ u3, succ u2} C (fun (i : C) => Quiver.Hom.{succ u2, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) i j) f) j (PSigma.snd.{succ u3, succ u2} C (fun (i : C) => Quiver.Hom.{succ u2, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) i j) f)))
 Case conversion may be inaccurate. Consider using '#align category_theory.functor.ranges_directed CategoryTheory.Functor.ranges_directedₓ'. -/
 theorem CategoryTheory.Functor.ranges_directed (F : C ⥤ Type _) (j : C) :
     Directed (· ⊇ ·) fun f : Σ'i, i ⟶ j => Set.range (F.map f.2) := fun ⟨i, ij⟩ ⟨k, kj⟩ =>
Diff
@@ -679,7 +679,7 @@ theorem cospan {i j j' : C} (f : j ⟶ i) (f' : j' ⟶ i) :
 lean 3 declaration is
   forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.IsCofilteredOrEmpty.{u1, u2} C _inst_1] (F : CategoryTheory.Functor.{u1, u3, u2, succ u3} C _inst_1 Type.{u3} CategoryTheory.types.{u3}) (j : C), Directed.{u3, max 1 (succ u2) (succ u1)} (Set.{u3} (CategoryTheory.Functor.obj.{u1, u3, u2, succ u3} C _inst_1 Type.{u3} CategoryTheory.types.{u3} F j)) (PSigma.{succ u2, succ u1} C (fun (i : C) => Quiver.Hom.{succ u1, u2} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1)) i j)) (Superset.{u3} (Set.{u3} (CategoryTheory.Functor.obj.{u1, u3, u2, succ u3} C _inst_1 Type.{u3} CategoryTheory.types.{u3} F j)) (Set.hasSubset.{u3} (CategoryTheory.Functor.obj.{u1, u3, u2, succ u3} C _inst_1 Type.{u3} CategoryTheory.types.{u3} F j))) (fun (f : PSigma.{succ u2, succ u1} C (fun (i : C) => Quiver.Hom.{succ u1, u2} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1)) i j)) => Set.range.{u3, succ u3} (CategoryTheory.Functor.obj.{u1, u3, u2, succ u3} C _inst_1 Type.{u3} CategoryTheory.types.{u3} F j) (CategoryTheory.Functor.obj.{u1, u3, u2, succ u3} C _inst_1 Type.{u3} CategoryTheory.types.{u3} F (PSigma.fst.{succ u2, succ u1} C (fun (i : C) => Quiver.Hom.{succ u1, u2} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1)) i j) f)) (CategoryTheory.Functor.map.{u1, u3, u2, succ u3} C _inst_1 Type.{u3} CategoryTheory.types.{u3} F (PSigma.fst.{succ u2, succ u1} C (fun (i : C) => Quiver.Hom.{succ u1, u2} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1)) i j) f) j (PSigma.snd.{succ u2, succ u1} C (fun (i : C) => Quiver.Hom.{succ u1, u2} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1)) i j) f)))
 but is expected to have type
-  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u2, u3} C] [_inst_2 : CategoryTheory.IsCofilteredOrEmpty.{u2, u3} C _inst_1] (F : CategoryTheory.Functor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1}) (j : C), Directed.{u1, max (succ u3) (succ u2)} (Set.{u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j)) (PSigma.{succ u3, succ u2} C (fun (i : C) => Quiver.Hom.{succ u2, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) i j)) (fun (x._@.Mathlib.CategoryTheory.Filtered._hyg.4393 : Set.{u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j)) (x._@.Mathlib.CategoryTheory.Filtered._hyg.4395 : Set.{u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j)) => Superset.{u1} (Set.{u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j)) (Set.instHasSubsetSet.{u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j)) x._@.Mathlib.CategoryTheory.Filtered._hyg.4393 x._@.Mathlib.CategoryTheory.Filtered._hyg.4395) (fun (f : PSigma.{succ u3, succ u2} C (fun (i : C) => Quiver.Hom.{succ u2, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) i j)) => Set.range.{u1, succ u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j) (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) (PSigma.fst.{succ u3, succ u2} C (fun (i : C) => Quiver.Hom.{succ u2, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) i j) f)) (Prefunctor.map.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) (PSigma.fst.{succ u3, succ u2} C (fun (i : C) => Quiver.Hom.{succ u2, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) i j) f) j (PSigma.snd.{succ u3, succ u2} C (fun (i : C) => Quiver.Hom.{succ u2, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) i j) f)))
+  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u2, u3} C] [_inst_2 : CategoryTheory.IsCofilteredOrEmpty.{u2, u3} C _inst_1] (F : CategoryTheory.Functor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1}) (j : C), Directed.{u1, max (succ u3) (succ u2)} (Set.{u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j)) (PSigma.{succ u3, succ u2} C (fun (i : C) => Quiver.Hom.{succ u2, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) i j)) (fun (x._@.Mathlib.CategoryTheory.Filtered._hyg.4398 : Set.{u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j)) (x._@.Mathlib.CategoryTheory.Filtered._hyg.4400 : Set.{u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j)) => Superset.{u1} (Set.{u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j)) (Set.instHasSubsetSet.{u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j)) x._@.Mathlib.CategoryTheory.Filtered._hyg.4398 x._@.Mathlib.CategoryTheory.Filtered._hyg.4400) (fun (f : PSigma.{succ u3, succ u2} C (fun (i : C) => Quiver.Hom.{succ u2, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) i j)) => Set.range.{u1, succ u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j) (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) (PSigma.fst.{succ u3, succ u2} C (fun (i : C) => Quiver.Hom.{succ u2, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) i j) f)) (Prefunctor.map.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) (PSigma.fst.{succ u3, succ u2} C (fun (i : C) => Quiver.Hom.{succ u2, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) i j) f) j (PSigma.snd.{succ u3, succ u2} C (fun (i : C) => Quiver.Hom.{succ u2, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) i j) f)))
 Case conversion may be inaccurate. Consider using '#align category_theory.functor.ranges_directed CategoryTheory.Functor.ranges_directedₓ'. -/
 theorem CategoryTheory.Functor.ranges_directed (F : C ⥤ Type _) (j : C) :
     Directed (· ⊇ ·) fun f : Σ'i, i ⟶ j => Set.range (F.map f.2) := fun ⟨i, ij⟩ ⟨k, kj⟩ =>
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Reid Barton, Scott Morrison
 
 ! This file was ported from Lean 3 source module category_theory.filtered
-! leanprover-community/mathlib commit 14e80e85cbca5872a329fbfd3d1f3fd64e306934
+! leanprover-community/mathlib commit ee05e9ce1322178f0c12004eb93c00d2c8c00ed2
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -17,6 +17,9 @@ import Mathbin.CategoryTheory.Category.Ulift
 /-!
 # Filtered categories
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 A category is filtered if every finite diagram admits a cocone.
 We give a simple characterisation of this condition as
 1. for every pair of objects there exists another object "to the right",
Diff
@@ -63,6 +63,7 @@ namespace CategoryTheory
 
 variable (C : Type u) [Category.{v} C]
 
+#print CategoryTheory.IsFilteredOrEmpty /-
 /-- A category `is_filtered_or_empty` if
 1. for every pair of objects there exists another object "to the right", and
 2. for every pair of parallel morphisms there exists a morphism to the right so the compositions
@@ -72,7 +73,9 @@ class IsFilteredOrEmpty : Prop where
   cocone_objs : ∀ X Y : C, ∃ (Z : _)(f : X ⟶ Z)(g : Y ⟶ Z), True
   cocone_maps : ∀ ⦃X Y : C⦄ (f g : X ⟶ Y), ∃ (Z : _)(h : Y ⟶ Z), f ≫ h = g ≫ h
 #align category_theory.is_filtered_or_empty CategoryTheory.IsFilteredOrEmpty
+-/
 
+#print CategoryTheory.IsFiltered /-
 /-- A category `is_filtered` if
 1. for every pair of objects there exists another object "to the right",
 2. for every pair of parallel morphisms there exists a morphism to the right so the compositions
@@ -84,18 +87,24 @@ See <https://stacks.math.columbia.edu/tag/002V>. (They also define a diagram bei
 class IsFiltered extends IsFilteredOrEmpty C : Prop where
   [Nonempty : Nonempty C]
 #align category_theory.is_filtered CategoryTheory.IsFiltered
+-/
 
+#print CategoryTheory.isFilteredOrEmpty_of_semilatticeSup /-
 instance (priority := 100) isFilteredOrEmpty_of_semilatticeSup (α : Type u) [SemilatticeSup α] :
     IsFilteredOrEmpty α
     where
   cocone_objs X Y := ⟨X ⊔ Y, homOfLE le_sup_left, homOfLE le_sup_right, trivial⟩
   cocone_maps X Y f g := ⟨Y, 𝟙 _, by ext⟩
 #align category_theory.is_filtered_or_empty_of_semilattice_sup CategoryTheory.isFilteredOrEmpty_of_semilatticeSup
+-/
 
+#print CategoryTheory.isFiltered_of_semilatticeSup_nonempty /-
 instance (priority := 100) isFiltered_of_semilatticeSup_nonempty (α : Type u) [SemilatticeSup α]
     [Nonempty α] : IsFiltered α where
 #align category_theory.is_filtered_of_semilattice_sup_nonempty CategoryTheory.isFiltered_of_semilatticeSup_nonempty
+-/
 
+#print CategoryTheory.isFilteredOrEmpty_of_directed_le /-
 instance (priority := 100) isFilteredOrEmpty_of_directed_le (α : Type u) [Preorder α]
     [IsDirected α (· ≤ ·)] : IsFilteredOrEmpty α
     where
@@ -104,10 +113,13 @@ instance (priority := 100) isFilteredOrEmpty_of_directed_le (α : Type u) [Preor
     ⟨Z, homOfLE h1, homOfLE h2, trivial⟩
   cocone_maps X Y f g := ⟨Y, 𝟙 _, by simp⟩
 #align category_theory.is_filtered_or_empty_of_directed_le CategoryTheory.isFilteredOrEmpty_of_directed_le
+-/
 
+#print CategoryTheory.isFiltered_of_directed_le_nonempty /-
 instance (priority := 100) isFiltered_of_directed_le_nonempty (α : Type u) [Preorder α]
     [IsDirected α (· ≤ ·)] [Nonempty α] : IsFiltered α where
 #align category_theory.is_filtered_of_directed_le_nonempty CategoryTheory.isFiltered_of_directed_le_nonempty
+-/
 
 -- Sanity checks
 example (α : Type u) [SemilatticeSup α] [OrderBot α] : IsFiltered α := by infer_instance
@@ -134,27 +146,34 @@ theorem cocone_maps : ∀ ⦃X Y : C⦄ (f g : X ⟶ Y), ∃ (Z : _)(h : Y ⟶ Z
   IsFilteredOrEmpty.cocone_maps
 #align category_theory.is_filtered.cocone_maps CategoryTheory.IsFiltered.cocone_maps
 
+#print CategoryTheory.IsFiltered.max /-
 /-- `max j j'` is an arbitrary choice of object to the right of both `j` and `j'`,
 whose existence is ensured by `is_filtered`.
 -/
 noncomputable def max (j j' : C) : C :=
   (cocone_objs j j').some
 #align category_theory.is_filtered.max CategoryTheory.IsFiltered.max
+-/
 
+#print CategoryTheory.IsFiltered.leftToMax /-
 /-- `left_to_max j j'` is an arbitrary choice of morphism from `j` to `max j j'`,
 whose existence is ensured by `is_filtered`.
 -/
 noncomputable def leftToMax (j j' : C) : j ⟶ max j j' :=
   (cocone_objs j j').choose_spec.some
 #align category_theory.is_filtered.left_to_max CategoryTheory.IsFiltered.leftToMax
+-/
 
+#print CategoryTheory.IsFiltered.rightToMax /-
 /-- `right_to_max j j'` is an arbitrary choice of morphism from `j'` to `max j j'`,
 whose existence is ensured by `is_filtered`.
 -/
 noncomputable def rightToMax (j j' : C) : j' ⟶ max j j' :=
   (cocone_objs j j').choose_spec.choose_spec.some
 #align category_theory.is_filtered.right_to_max CategoryTheory.IsFiltered.rightToMax
+-/
 
+#print CategoryTheory.IsFiltered.coeq /-
 /-- `coeq f f'`, for morphisms `f f' : j ⟶ j'`, is an arbitrary choice of object
 which admits a morphism `coeq_hom f f' : j' ⟶ coeq f f'` such that
 `coeq_condition : f ≫ coeq_hom f f' = f' ≫ coeq_hom f f'`.
@@ -163,7 +182,9 @@ Its existence is ensured by `is_filtered`.
 noncomputable def coeq {j j' : C} (f f' : j ⟶ j') : C :=
   (cocone_maps f f').some
 #align category_theory.is_filtered.coeq CategoryTheory.IsFiltered.coeq
+-/
 
+#print CategoryTheory.IsFiltered.coeqHom /-
 /-- `coeq_hom f f'`, for morphisms `f f' : j ⟶ j'`, is an arbitrary choice of morphism
 `coeq_hom f f' : j' ⟶ coeq f f'` such that
 `coeq_condition : f ≫ coeq_hom f f' = f' ≫ coeq_hom f f'`.
@@ -172,7 +193,9 @@ Its existence is ensured by `is_filtered`.
 noncomputable def coeqHom {j j' : C} (f f' : j ⟶ j') : j' ⟶ coeq f f' :=
   (cocone_maps f f').choose_spec.some
 #align category_theory.is_filtered.coeq_hom CategoryTheory.IsFiltered.coeqHom
+-/
 
+#print CategoryTheory.IsFiltered.coeq_condition /-
 /-- `coeq_condition f f'`, for morphisms `f f' : j ⟶ j'`, is the proof that
 `f ≫ coeq_hom f f' = f' ≫ coeq_hom f f'`.
 -/
@@ -180,6 +203,7 @@ noncomputable def coeqHom {j j' : C} (f f' : j ⟶ j') : j' ⟶ coeq f f' :=
 theorem coeq_condition {j j' : C} (f f' : j ⟶ j') : f ≫ coeqHom f f' = f' ≫ coeqHom f f' :=
   (cocone_maps f f').choose_spec.choose_spec
 #align category_theory.is_filtered.coeq_condition CategoryTheory.IsFiltered.coeq_condition
+-/
 
 end AllowEmpty
 
@@ -189,6 +213,7 @@ open CategoryTheory.Limits
 
 variable {C} [IsFiltered C]
 
+#print CategoryTheory.IsFiltered.sup_objs_exists /-
 /-- Any finite collection of objects in a filtered category has an object "to the right".
 -/
 theorem sup_objs_exists (O : Finset C) : ∃ S : C, ∀ {X}, X ∈ O → Nonempty (X ⟶ S) := by
@@ -202,9 +227,11 @@ theorem sup_objs_exists (O : Finset C) : ∃ S : C, ∀ {X}, X ∈ O → Nonempt
       · exact ⟨left_to_max _ _⟩
       · exact ⟨(w' (Finset.mem_of_mem_insert_of_ne mY h)).some ≫ right_to_max _ _⟩
 #align category_theory.is_filtered.sup_objs_exists CategoryTheory.IsFiltered.sup_objs_exists
+-/
 
 variable (O : Finset C) (H : Finset (Σ'(X Y : C)(mX : X ∈ O)(mY : Y ∈ O), X ⟶ Y))
 
+#print CategoryTheory.IsFiltered.sup_exists /-
 /-- Given any `finset` of objects `{X, ...}` and
 indexed collection of `finset`s of morphisms `{f, ...}` in `C`,
 there exists an object `S`, with a morphism `T X : X ⟶ S` from each `X`,
@@ -237,7 +264,9 @@ theorem sup_exists :
         rw [heq_iff_eq, PSigma.mk.inj_iff] at h
         exact ⟨rfl, h.1.symm⟩
 #align category_theory.is_filtered.sup_exists CategoryTheory.IsFiltered.sup_exists
+-/
 
+#print CategoryTheory.IsFiltered.sup /-
 /-- An arbitrary choice of object "to the right"
 of a finite collection of objects `O` and morphisms `H`,
 making all the triangles commute.
@@ -245,13 +274,17 @@ making all the triangles commute.
 noncomputable def sup : C :=
   (sup_exists O H).some
 #align category_theory.is_filtered.sup CategoryTheory.IsFiltered.sup
+-/
 
+#print CategoryTheory.IsFiltered.toSup /-
 /-- The morphisms to `sup O H`.
 -/
 noncomputable def toSup {X : C} (m : X ∈ O) : X ⟶ sup O H :=
   (sup_exists O H).choose_spec.some m
 #align category_theory.is_filtered.to_sup CategoryTheory.IsFiltered.toSup
+-/
 
+#print CategoryTheory.IsFiltered.toSup_commutes /-
 /-- The triangles of consisting of a morphism in `H` and the maps to `sup O H` commute.
 -/
 theorem toSup_commutes {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y}
@@ -259,9 +292,11 @@ theorem toSup_commutes {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y}
     f ≫ toSup O H mY = toSup O H mX :=
   (sup_exists O H).choose_spec.choose_spec mX mY mf
 #align category_theory.is_filtered.to_sup_commutes CategoryTheory.IsFiltered.toSup_commutes
+-/
 
 variable {J : Type v} [SmallCategory J] [FinCategory J]
 
+#print CategoryTheory.IsFiltered.cocone_nonempty /-
 /-- If we have `is_filtered C`, then for any functor `F : J ⥤ C` with `fin_category J`,
 there exists a cocone over `F`.
 -/
@@ -282,15 +317,19 @@ theorem cocone_nonempty (F : J ⥤ C) : Nonempty (Cocone F) := by
       Finset.mem_image]
     exact ⟨j, rfl, j', g, by simp⟩
 #align category_theory.is_filtered.cocone_nonempty CategoryTheory.IsFiltered.cocone_nonempty
+-/
 
+#print CategoryTheory.IsFiltered.cocone /-
 /-- An arbitrary choice of cocone over `F : J ⥤ C`, for `fin_category J` and `is_filtered C`.
 -/
 noncomputable def cocone (F : J ⥤ C) : Cocone F :=
   (cocone_nonempty F).some
 #align category_theory.is_filtered.cocone CategoryTheory.IsFiltered.cocone
+-/
 
 variable {D : Type u₁} [Category.{v₁} D]
 
+#print CategoryTheory.IsFiltered.of_right_adjoint /-
 /-- If `C` is filtered, and we have a functor `R : C ⥤ D` with a left adjoint, then `D` is filtered.
 -/
 theorem of_right_adjoint {L : D ⥤ C} {R : C ⥤ D} (h : L ⊣ R) : IsFiltered D :=
@@ -301,12 +340,21 @@ theorem of_right_adjoint {L : D ⥤ C} {R : C ⥤ D} (h : L ⊣ R) : IsFiltered
         rw [← h.hom_equiv_naturality_left, ← h.hom_equiv_naturality_left, coeq_condition]⟩
     Nonempty := IsFiltered.nonempty.map R.obj }
 #align category_theory.is_filtered.of_right_adjoint CategoryTheory.IsFiltered.of_right_adjoint
+-/
 
+#print CategoryTheory.IsFiltered.of_isRightAdjoint /-
 /-- If `C` is filtered, and we have a right adjoint functor `R : C ⥤ D`, then `D` is filtered. -/
 theorem of_isRightAdjoint (R : C ⥤ D) [IsRightAdjoint R] : IsFiltered D :=
   of_right_adjoint (Adjunction.ofRightAdjoint R)
 #align category_theory.is_filtered.of_is_right_adjoint CategoryTheory.IsFiltered.of_isRightAdjoint
+-/
 
+/- warning: category_theory.is_filtered.of_equivalence -> CategoryTheory.IsFiltered.of_equivalence is a dubious translation:
+lean 3 declaration is
+  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u1, u3} C] [_inst_2 : CategoryTheory.IsFiltered.{u1, u3} C _inst_1] {D : Type.{u4}} [_inst_5 : CategoryTheory.Category.{u2, u4} D], (CategoryTheory.Equivalence.{u1, u2, u3, u4} C _inst_1 D _inst_5) -> (CategoryTheory.IsFiltered.{u2, u4} D _inst_5)
+but is expected to have type
+  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u1, u3} C] [_inst_2 : CategoryTheory.IsFiltered.{u1, u3} C _inst_1] {D : Type.{u4}} [_inst_5 : CategoryTheory.Category.{u2, u4} D], (CategoryTheory.Equivalence.{u1, u2, u3, u4} C D _inst_1 _inst_5) -> (CategoryTheory.IsFiltered.{u2, u4} D _inst_5)
+Case conversion may be inaccurate. Consider using '#align category_theory.is_filtered.of_equivalence CategoryTheory.IsFiltered.of_equivalenceₓ'. -/
 /-- Being filtered is preserved by equivalence of categories. -/
 theorem of_equivalence (h : C ≌ D) : IsFiltered D :=
   of_right_adjoint h.symm.toAdjunction
@@ -318,34 +366,43 @@ section SpecialShapes
 
 variable {C} [IsFilteredOrEmpty C]
 
+#print CategoryTheory.IsFiltered.max₃ /-
 /-- `max₃ j₁ j₂ j₃` is an arbitrary choice of object to the right of `j₁`, `j₂` and `j₃`,
 whose existence is ensured by `is_filtered`.
 -/
 noncomputable def max₃ (j₁ j₂ j₃ : C) : C :=
   max (max j₁ j₂) j₃
 #align category_theory.is_filtered.max₃ CategoryTheory.IsFiltered.max₃
+-/
 
+#print CategoryTheory.IsFiltered.firstToMax₃ /-
 /-- `first_to_max₃ j₁ j₂ j₃` is an arbitrary choice of morphism from `j₁` to `max₃ j₁ j₂ j₃`,
 whose existence is ensured by `is_filtered`.
 -/
 noncomputable def firstToMax₃ (j₁ j₂ j₃ : C) : j₁ ⟶ max₃ j₁ j₂ j₃ :=
   leftToMax j₁ j₂ ≫ leftToMax (max j₁ j₂) j₃
 #align category_theory.is_filtered.first_to_max₃ CategoryTheory.IsFiltered.firstToMax₃
+-/
 
+#print CategoryTheory.IsFiltered.secondToMax₃ /-
 /-- `second_to_max₃ j₁ j₂ j₃` is an arbitrary choice of morphism from `j₂` to `max₃ j₁ j₂ j₃`,
 whose existence is ensured by `is_filtered`.
 -/
 noncomputable def secondToMax₃ (j₁ j₂ j₃ : C) : j₂ ⟶ max₃ j₁ j₂ j₃ :=
   rightToMax j₁ j₂ ≫ leftToMax (max j₁ j₂) j₃
 #align category_theory.is_filtered.second_to_max₃ CategoryTheory.IsFiltered.secondToMax₃
+-/
 
+#print CategoryTheory.IsFiltered.thirdToMax₃ /-
 /-- `third_to_max₃ j₁ j₂ j₃` is an arbitrary choice of morphism from `j₃` to `max₃ j₁ j₂ j₃`,
 whose existence is ensured by `is_filtered`.
 -/
 noncomputable def thirdToMax₃ (j₁ j₂ j₃ : C) : j₃ ⟶ max₃ j₁ j₂ j₃ :=
   rightToMax (max j₁ j₂) j₃
 #align category_theory.is_filtered.third_to_max₃ CategoryTheory.IsFiltered.thirdToMax₃
+-/
 
+#print CategoryTheory.IsFiltered.coeq₃ /-
 /-- `coeq₃ f g h`, for morphisms `f g h : j₁ ⟶ j₂`, is an arbitrary choice of object
 which admits a morphism `coeq₃_hom f g h : j₂ ⟶ coeq₃ f g h` such that
 `coeq₃_condition₁`, `coeq₃_condition₂` and `coeq₃_condition₃` are satisfied.
@@ -355,7 +412,9 @@ noncomputable def coeq₃ {j₁ j₂ : C} (f g h : j₁ ⟶ j₂) : C :=
   coeq (coeqHom f g ≫ leftToMax (coeq f g) (coeq g h))
     (coeqHom g h ≫ rightToMax (coeq f g) (coeq g h))
 #align category_theory.is_filtered.coeq₃ CategoryTheory.IsFiltered.coeq₃
+-/
 
+#print CategoryTheory.IsFiltered.coeq₃Hom /-
 /-- `coeq₃_hom f g h`, for morphisms `f g h : j₁ ⟶ j₂`, is an arbitrary choice of morphism
 `j₂ ⟶ coeq₃ f g h` such that `coeq₃_condition₁`, `coeq₃_condition₂` and `coeq₃_condition₃`
 are satisfied. Its existence is ensured by `is_filtered`.
@@ -366,11 +425,15 @@ noncomputable def coeq₃Hom {j₁ j₂ : C} (f g h : j₁ ⟶ j₂) : j₂ ⟶
       coeqHom (coeqHom f g ≫ leftToMax (coeq f g) (coeq g h))
         (coeqHom g h ≫ rightToMax (coeq f g) (coeq g h))
 #align category_theory.is_filtered.coeq₃_hom CategoryTheory.IsFiltered.coeq₃Hom
+-/
 
+#print CategoryTheory.IsFiltered.coeq₃_condition₁ /-
 theorem coeq₃_condition₁ {j₁ j₂ : C} (f g h : j₁ ⟶ j₂) : f ≫ coeq₃Hom f g h = g ≫ coeq₃Hom f g h :=
   by rw [coeq₃_hom, reassoc_of (coeq_condition f g)]
 #align category_theory.is_filtered.coeq₃_condition₁ CategoryTheory.IsFiltered.coeq₃_condition₁
+-/
 
+#print CategoryTheory.IsFiltered.coeq₃_condition₂ /-
 theorem coeq₃_condition₂ {j₁ j₂ : C} (f g h : j₁ ⟶ j₂) : g ≫ coeq₃Hom f g h = h ≫ coeq₃Hom f g h :=
   by
   dsimp [coeq₃_hom]
@@ -379,11 +442,15 @@ theorem coeq₃_condition₂ {j₁ j₂ : C} (f g h : j₁ ⟶ j₂) : g ≫ coe
   slice_lhs 1 3 => rw [← category.assoc, coeq_condition _ _]
   simp only [category.assoc]
 #align category_theory.is_filtered.coeq₃_condition₂ CategoryTheory.IsFiltered.coeq₃_condition₂
+-/
 
+#print CategoryTheory.IsFiltered.coeq₃_condition₃ /-
 theorem coeq₃_condition₃ {j₁ j₂ : C} (f g h : j₁ ⟶ j₂) : f ≫ coeq₃Hom f g h = h ≫ coeq₃Hom f g h :=
   Eq.trans (coeq₃_condition₁ f g h) (coeq₃_condition₂ f g h)
 #align category_theory.is_filtered.coeq₃_condition₃ CategoryTheory.IsFiltered.coeq₃_condition₃
+-/
 
+#print CategoryTheory.IsFiltered.span /-
 /-- For every span `j ⟵ i ⟶ j'`, there
    exists a cocone `j ⟶ k ⟵ j'` such that the square commutes. -/
 theorem span {i j j' : C} (f : i ⟶ j) (f' : i ⟶ j') :
@@ -392,7 +459,9 @@ theorem span {i j j' : C} (f : i ⟶ j) (f' : i ⟶ j') :
   let ⟨k, e, he⟩ := cocone_maps (f ≫ G) (f' ≫ G')
   ⟨k, G ≫ e, G' ≫ e, by simpa only [← category.assoc] ⟩
 #align category_theory.is_filtered.span CategoryTheory.IsFiltered.span
+-/
 
+#print CategoryTheory.IsFiltered.bowtie /-
 /-- Given a "bowtie" of morphisms
 ```
  j₁   j₂
@@ -414,7 +483,9 @@ theorem bowtie {j₁ j₂ k₁ k₂ : C} (f₁ : j₁ ⟶ k₁) (g₁ : j₁ ⟶
   simp_rw [category.assoc] at hs
   exact ⟨s, k₁t ≫ ts, k₂t ≫ ts, by rw [reassoc_of ht], hs⟩
 #align category_theory.is_filtered.bowtie CategoryTheory.IsFiltered.bowtie
+-/
 
+#print CategoryTheory.IsFiltered.tulip /-
 /-- Given a "tulip" of morphisms
 ```
  j₁    j₂    j₃
@@ -442,11 +513,13 @@ theorem tulip {j₁ j₂ j₃ k₁ k₂ l : C} (f₁ : j₁ ⟶ k₁) (f₂ : j
   refine' ⟨s, k₁l ≫ l's, ls, k₂l ≫ l's, _, by rw [reassoc_of hl], _⟩ <;>
     simp only [hs₁, hs₂, category.assoc]
 #align category_theory.is_filtered.tulip CategoryTheory.IsFiltered.tulip
+-/
 
 end SpecialShapes
 
 end IsFiltered
 
+#print CategoryTheory.IsCofilteredOrEmpty /-
 /-- A category `is_cofiltered_or_empty` if
 1. for every pair of objects there exists another object "to the left", and
 2. for every pair of parallel morphisms there exists a morphism to the left so the compositions
@@ -456,7 +529,9 @@ class IsCofilteredOrEmpty : Prop where
   cone_objs : ∀ X Y : C, ∃ (W : _)(f : W ⟶ X)(g : W ⟶ Y), True
   cone_maps : ∀ ⦃X Y : C⦄ (f g : X ⟶ Y), ∃ (W : _)(h : W ⟶ X), h ≫ f = h ≫ g
 #align category_theory.is_cofiltered_or_empty CategoryTheory.IsCofilteredOrEmpty
+-/
 
+#print CategoryTheory.IsCofiltered /-
 /-- A category `is_cofiltered` if
 1. for every pair of objects there exists another object "to the left",
 2. for every pair of parallel morphisms there exists a morphism to the left so the compositions
@@ -468,18 +543,24 @@ See <https://stacks.math.columbia.edu/tag/04AZ>.
 class IsCofiltered extends IsCofilteredOrEmpty C : Prop where
   [Nonempty : Nonempty C]
 #align category_theory.is_cofiltered CategoryTheory.IsCofiltered
+-/
 
+#print CategoryTheory.isCofilteredOrEmpty_of_semilatticeInf /-
 instance (priority := 100) isCofilteredOrEmpty_of_semilatticeInf (α : Type u) [SemilatticeInf α] :
     IsCofilteredOrEmpty α
     where
   cone_objs X Y := ⟨X ⊓ Y, homOfLE inf_le_left, homOfLE inf_le_right, trivial⟩
   cone_maps X Y f g := ⟨X, 𝟙 _, by ext⟩
 #align category_theory.is_cofiltered_or_empty_of_semilattice_inf CategoryTheory.isCofilteredOrEmpty_of_semilatticeInf
+-/
 
+#print CategoryTheory.isCofiltered_of_semilatticeInf_nonempty /-
 instance (priority := 100) isCofiltered_of_semilatticeInf_nonempty (α : Type u) [SemilatticeInf α]
     [Nonempty α] : IsCofiltered α where
 #align category_theory.is_cofiltered_of_semilattice_inf_nonempty CategoryTheory.isCofiltered_of_semilatticeInf_nonempty
+-/
 
+#print CategoryTheory.isCofilteredOrEmpty_of_directed_ge /-
 instance (priority := 100) isCofilteredOrEmpty_of_directed_ge (α : Type u) [Preorder α]
     [IsDirected α (· ≥ ·)] : IsCofilteredOrEmpty α
     where
@@ -488,10 +569,13 @@ instance (priority := 100) isCofilteredOrEmpty_of_directed_ge (α : Type u) [Pre
     ⟨Z, homOfLE hX, homOfLE hY, trivial⟩
   cone_maps X Y f g := ⟨X, 𝟙 _, by simp⟩
 #align category_theory.is_cofiltered_or_empty_of_directed_ge CategoryTheory.isCofilteredOrEmpty_of_directed_ge
+-/
 
+#print CategoryTheory.isCofiltered_of_directed_ge_nonempty /-
 instance (priority := 100) isCofiltered_of_directed_ge_nonempty (α : Type u) [Preorder α]
     [IsDirected α (· ≥ ·)] [Nonempty α] : IsCofiltered α where
 #align category_theory.is_cofiltered_of_directed_ge_nonempty CategoryTheory.isCofiltered_of_directed_ge_nonempty
+-/
 
 -- Sanity checks
 example (α : Type u) [SemilatticeInf α] [OrderBot α] : IsCofiltered α := by infer_instance
@@ -518,27 +602,34 @@ theorem cone_maps : ∀ ⦃X Y : C⦄ (f g : X ⟶ Y), ∃ (W : _)(h : W ⟶ X),
   IsCofilteredOrEmpty.cone_maps
 #align category_theory.is_cofiltered.cone_maps CategoryTheory.IsCofiltered.cone_maps
 
+#print CategoryTheory.IsCofiltered.min /-
 /-- `min j j'` is an arbitrary choice of object to the left of both `j` and `j'`,
 whose existence is ensured by `is_cofiltered`.
 -/
 noncomputable def min (j j' : C) : C :=
   (cone_objs j j').some
 #align category_theory.is_cofiltered.min CategoryTheory.IsCofiltered.min
+-/
 
+#print CategoryTheory.IsCofiltered.minToLeft /-
 /-- `min_to_left j j'` is an arbitrary choice of morphism from `min j j'` to `j`,
 whose existence is ensured by `is_cofiltered`.
 -/
 noncomputable def minToLeft (j j' : C) : min j j' ⟶ j :=
   (cone_objs j j').choose_spec.some
 #align category_theory.is_cofiltered.min_to_left CategoryTheory.IsCofiltered.minToLeft
+-/
 
+#print CategoryTheory.IsCofiltered.minToRight /-
 /-- `min_to_right j j'` is an arbitrary choice of morphism from `min j j'` to `j'`,
 whose existence is ensured by `is_cofiltered`.
 -/
 noncomputable def minToRight (j j' : C) : min j j' ⟶ j' :=
   (cone_objs j j').choose_spec.choose_spec.some
 #align category_theory.is_cofiltered.min_to_right CategoryTheory.IsCofiltered.minToRight
+-/
 
+#print CategoryTheory.IsCofiltered.eq /-
 /-- `eq f f'`, for morphisms `f f' : j ⟶ j'`, is an arbitrary choice of object
 which admits a morphism `eq_hom f f' : eq f f' ⟶ j` such that
 `eq_condition : eq_hom f f' ≫ f = eq_hom f f' ≫ f'`.
@@ -547,7 +638,9 @@ Its existence is ensured by `is_cofiltered`.
 noncomputable def eq {j j' : C} (f f' : j ⟶ j') : C :=
   (cone_maps f f').some
 #align category_theory.is_cofiltered.eq CategoryTheory.IsCofiltered.eq
+-/
 
+#print CategoryTheory.IsCofiltered.eqHom /-
 /-- `eq_hom f f'`, for morphisms `f f' : j ⟶ j'`, is an arbitrary choice of morphism
 `eq_hom f f' : eq f f' ⟶ j` such that
 `eq_condition : eq_hom f f' ≫ f = eq_hom f f' ≫ f'`.
@@ -556,7 +649,9 @@ Its existence is ensured by `is_cofiltered`.
 noncomputable def eqHom {j j' : C} (f f' : j ⟶ j') : eq f f' ⟶ j :=
   (cone_maps f f').choose_spec.some
 #align category_theory.is_cofiltered.eq_hom CategoryTheory.IsCofiltered.eqHom
+-/
 
+#print CategoryTheory.IsCofiltered.eq_condition /-
 /-- `eq_condition f f'`, for morphisms `f f' : j ⟶ j'`, is the proof that
 `eq_hom f f' ≫ f = eq_hom f f' ≫ f'`.
 -/
@@ -564,7 +659,9 @@ noncomputable def eqHom {j j' : C} (f f' : j ⟶ j') : eq f f' ⟶ j :=
 theorem eq_condition {j j' : C} (f f' : j ⟶ j') : eqHom f f' ≫ f = eqHom f f' ≫ f' :=
   (cone_maps f f').choose_spec.choose_spec
 #align category_theory.is_cofiltered.eq_condition CategoryTheory.IsCofiltered.eq_condition
+-/
 
+#print CategoryTheory.IsCofiltered.cospan /-
 /-- For every cospan `j ⟶ i ⟵ j'`,
  there exists a cone `j ⟵ k ⟶ j'` such that the square commutes. -/
 theorem cospan {i j j' : C} (f : j ⟶ i) (f' : j' ⟶ i) :
@@ -573,7 +670,14 @@ theorem cospan {i j j' : C} (f : j ⟶ i) (f' : j' ⟶ i) :
   let ⟨k, e, he⟩ := cone_maps (G ≫ f) (G' ≫ f')
   ⟨k, e ≫ G, e ≫ G', by simpa only [category.assoc] using he⟩
 #align category_theory.is_cofiltered.cospan CategoryTheory.IsCofiltered.cospan
+-/
 
+/- warning: category_theory.functor.ranges_directed -> CategoryTheory.Functor.ranges_directed is a dubious translation:
+lean 3 declaration is
+  forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.IsCofilteredOrEmpty.{u1, u2} C _inst_1] (F : CategoryTheory.Functor.{u1, u3, u2, succ u3} C _inst_1 Type.{u3} CategoryTheory.types.{u3}) (j : C), Directed.{u3, max 1 (succ u2) (succ u1)} (Set.{u3} (CategoryTheory.Functor.obj.{u1, u3, u2, succ u3} C _inst_1 Type.{u3} CategoryTheory.types.{u3} F j)) (PSigma.{succ u2, succ u1} C (fun (i : C) => Quiver.Hom.{succ u1, u2} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1)) i j)) (Superset.{u3} (Set.{u3} (CategoryTheory.Functor.obj.{u1, u3, u2, succ u3} C _inst_1 Type.{u3} CategoryTheory.types.{u3} F j)) (Set.hasSubset.{u3} (CategoryTheory.Functor.obj.{u1, u3, u2, succ u3} C _inst_1 Type.{u3} CategoryTheory.types.{u3} F j))) (fun (f : PSigma.{succ u2, succ u1} C (fun (i : C) => Quiver.Hom.{succ u1, u2} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1)) i j)) => Set.range.{u3, succ u3} (CategoryTheory.Functor.obj.{u1, u3, u2, succ u3} C _inst_1 Type.{u3} CategoryTheory.types.{u3} F j) (CategoryTheory.Functor.obj.{u1, u3, u2, succ u3} C _inst_1 Type.{u3} CategoryTheory.types.{u3} F (PSigma.fst.{succ u2, succ u1} C (fun (i : C) => Quiver.Hom.{succ u1, u2} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1)) i j) f)) (CategoryTheory.Functor.map.{u1, u3, u2, succ u3} C _inst_1 Type.{u3} CategoryTheory.types.{u3} F (PSigma.fst.{succ u2, succ u1} C (fun (i : C) => Quiver.Hom.{succ u1, u2} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1)) i j) f) j (PSigma.snd.{succ u2, succ u1} C (fun (i : C) => Quiver.Hom.{succ u1, u2} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1)) i j) f)))
+but is expected to have type
+  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u2, u3} C] [_inst_2 : CategoryTheory.IsCofilteredOrEmpty.{u2, u3} C _inst_1] (F : CategoryTheory.Functor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1}) (j : C), Directed.{u1, max (succ u3) (succ u2)} (Set.{u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j)) (PSigma.{succ u3, succ u2} C (fun (i : C) => Quiver.Hom.{succ u2, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) i j)) (fun (x._@.Mathlib.CategoryTheory.Filtered._hyg.4393 : Set.{u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j)) (x._@.Mathlib.CategoryTheory.Filtered._hyg.4395 : Set.{u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j)) => Superset.{u1} (Set.{u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j)) (Set.instHasSubsetSet.{u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j)) x._@.Mathlib.CategoryTheory.Filtered._hyg.4393 x._@.Mathlib.CategoryTheory.Filtered._hyg.4395) (fun (f : PSigma.{succ u3, succ u2} C (fun (i : C) => Quiver.Hom.{succ u2, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) i j)) => Set.range.{u1, succ u1} (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) j) (Prefunctor.obj.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) (PSigma.fst.{succ u3, succ u2} C (fun (i : C) => Quiver.Hom.{succ u2, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) i j) f)) (Prefunctor.map.{succ u2, succ u1, u3, succ u1} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u2, u1, u3, succ u1} C _inst_1 Type.{u1} CategoryTheory.types.{u1} F) (PSigma.fst.{succ u3, succ u2} C (fun (i : C) => Quiver.Hom.{succ u2, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) i j) f) j (PSigma.snd.{succ u3, succ u2} C (fun (i : C) => Quiver.Hom.{succ u2, u3} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u3} C (CategoryTheory.Category.toCategoryStruct.{u2, u3} C _inst_1)) i j) f)))
+Case conversion may be inaccurate. Consider using '#align category_theory.functor.ranges_directed CategoryTheory.Functor.ranges_directedₓ'. -/
 theorem CategoryTheory.Functor.ranges_directed (F : C ⥤ Type _) (j : C) :
     Directed (· ⊇ ·) fun f : Σ'i, i ⟶ j => Set.range (F.map f.2) := fun ⟨i, ij⟩ ⟨k, kj⟩ =>
   by
@@ -589,6 +693,7 @@ open CategoryTheory.Limits
 
 variable {C} [IsCofiltered C]
 
+#print CategoryTheory.IsCofiltered.inf_objs_exists /-
 /-- Any finite collection of objects in a cofiltered category has an object "to the left".
 -/
 theorem inf_objs_exists (O : Finset C) : ∃ S : C, ∀ {X}, X ∈ O → Nonempty (S ⟶ X) := by
@@ -602,9 +707,11 @@ theorem inf_objs_exists (O : Finset C) : ∃ S : C, ∀ {X}, X ∈ O → Nonempt
       · exact ⟨min_to_left _ _⟩
       · exact ⟨min_to_right _ _ ≫ (w' (Finset.mem_of_mem_insert_of_ne mY h)).some⟩
 #align category_theory.is_cofiltered.inf_objs_exists CategoryTheory.IsCofiltered.inf_objs_exists
+-/
 
 variable (O : Finset C) (H : Finset (Σ'(X Y : C)(mX : X ∈ O)(mY : Y ∈ O), X ⟶ Y))
 
+#print CategoryTheory.IsCofiltered.inf_exists /-
 /-- Given any `finset` of objects `{X, ...}` and
 indexed collection of `finset`s of morphisms `{f, ...}` in `C`,
 there exists an object `S`, with a morphism `T X : S ⟶ X` from each `X`,
@@ -637,7 +744,9 @@ theorem inf_exists :
         rw [heq_iff_eq, PSigma.mk.inj_iff] at h
         exact ⟨rfl, h.1.symm⟩
 #align category_theory.is_cofiltered.inf_exists CategoryTheory.IsCofiltered.inf_exists
+-/
 
+#print CategoryTheory.IsCofiltered.inf /-
 /-- An arbitrary choice of object "to the left"
 of a finite collection of objects `O` and morphisms `H`,
 making all the triangles commute.
@@ -645,13 +754,17 @@ making all the triangles commute.
 noncomputable def inf : C :=
   (inf_exists O H).some
 #align category_theory.is_cofiltered.inf CategoryTheory.IsCofiltered.inf
+-/
 
+#print CategoryTheory.IsCofiltered.infTo /-
 /-- The morphisms from `inf O H`.
 -/
 noncomputable def infTo {X : C} (m : X ∈ O) : inf O H ⟶ X :=
   (inf_exists O H).choose_spec.some m
 #align category_theory.is_cofiltered.inf_to CategoryTheory.IsCofiltered.infTo
+-/
 
+#print CategoryTheory.IsCofiltered.infTo_commutes /-
 /-- The triangles consisting of a morphism in `H` and the maps from `inf O H` commute.
 -/
 theorem infTo_commutes {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y}
@@ -659,9 +772,11 @@ theorem infTo_commutes {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y}
     infTo O H mX ≫ f = infTo O H mY :=
   (inf_exists O H).choose_spec.choose_spec mX mY mf
 #align category_theory.is_cofiltered.inf_to_commutes CategoryTheory.IsCofiltered.infTo_commutes
+-/
 
 variable {J : Type w} [SmallCategory J] [FinCategory J]
 
+#print CategoryTheory.IsCofiltered.cone_nonempty /-
 /-- If we have `is_cofiltered C`, then for any functor `F : J ⥤ C` with `fin_category J`,
 there exists a cone over `F`.
 -/
@@ -683,15 +798,19 @@ theorem cone_nonempty (F : J ⥤ C) : Nonempty (Cone F) := by
       Finset.mem_image]
     exact ⟨j, rfl, j', g, by simp⟩
 #align category_theory.is_cofiltered.cone_nonempty CategoryTheory.IsCofiltered.cone_nonempty
+-/
 
+#print CategoryTheory.IsCofiltered.cone /-
 /-- An arbitrary choice of cone over `F : J ⥤ C`, for `fin_category J` and `is_cofiltered C`.
 -/
 noncomputable def cone (F : J ⥤ C) : Cone F :=
   (cone_nonempty F).some
 #align category_theory.is_cofiltered.cone CategoryTheory.IsCofiltered.cone
+-/
 
 variable {D : Type u₁} [Category.{v₁} D]
 
+#print CategoryTheory.IsCofiltered.of_left_adjoint /-
 /-- If `C` is cofiltered, and we have a functor `L : C ⥤ D` with a right adjoint,
 then `D` is cofiltered.
 -/
@@ -704,12 +823,21 @@ theorem of_left_adjoint {L : C ⥤ D} {R : D ⥤ C} (h : L ⊣ R) : IsCofiltered
         rw [← h.hom_equiv_naturality_right_symm, ← h.hom_equiv_naturality_right_symm, eq_condition]⟩
     Nonempty := IsCofiltered.nonempty.map L.obj }
 #align category_theory.is_cofiltered.of_left_adjoint CategoryTheory.IsCofiltered.of_left_adjoint
+-/
 
+#print CategoryTheory.IsCofiltered.of_isLeftAdjoint /-
 /-- If `C` is cofiltered, and we have a left adjoint functor `L : C ⥤ D`, then `D` is cofiltered. -/
 theorem of_isLeftAdjoint (L : C ⥤ D) [IsLeftAdjoint L] : IsCofiltered D :=
   of_left_adjoint (Adjunction.ofLeftAdjoint L)
 #align category_theory.is_cofiltered.of_is_left_adjoint CategoryTheory.IsCofiltered.of_isLeftAdjoint
+-/
 
+/- warning: category_theory.is_cofiltered.of_equivalence -> CategoryTheory.IsCofiltered.of_equivalence is a dubious translation:
+lean 3 declaration is
+  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u1, u3} C] [_inst_2 : CategoryTheory.IsCofiltered.{u1, u3} C _inst_1] {D : Type.{u4}} [_inst_5 : CategoryTheory.Category.{u2, u4} D], (CategoryTheory.Equivalence.{u1, u2, u3, u4} C _inst_1 D _inst_5) -> (CategoryTheory.IsCofiltered.{u2, u4} D _inst_5)
+but is expected to have type
+  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u1, u3} C] [_inst_2 : CategoryTheory.IsCofiltered.{u1, u3} C _inst_1] {D : Type.{u4}} [_inst_5 : CategoryTheory.Category.{u2, u4} D], (CategoryTheory.Equivalence.{u1, u2, u3, u4} C D _inst_1 _inst_5) -> (CategoryTheory.IsCofiltered.{u2, u4} D _inst_5)
+Case conversion may be inaccurate. Consider using '#align category_theory.is_cofiltered.of_equivalence CategoryTheory.IsCofiltered.of_equivalenceₓ'. -/
 /-- Being cofiltered is preserved by equivalence of categories. -/
 theorem of_equivalence (h : C ≌ D) : IsCofiltered D :=
   of_left_adjoint h.toAdjunction
@@ -723,6 +851,7 @@ section Opposite
 
 open Opposite
 
+#print CategoryTheory.isCofiltered_op_of_isFiltered /-
 instance isCofiltered_op_of_isFiltered [IsFiltered C] : IsCofiltered Cᵒᵖ
     where
   cone_objs X Y :=
@@ -736,7 +865,9 @@ instance isCofiltered_op_of_isFiltered [IsFiltered C] : IsCofiltered Cᵒᵖ
       exact is_filtered.coeq_condition f.unop g.unop⟩
   Nonempty := ⟨op IsFiltered.nonempty.some⟩
 #align category_theory.is_cofiltered_op_of_is_filtered CategoryTheory.isCofiltered_op_of_isFiltered
+-/
 
+#print CategoryTheory.isFiltered_op_of_isCofiltered /-
 instance isFiltered_op_of_isCofiltered [IsCofiltered C] : IsFiltered Cᵒᵖ
     where
   cocone_objs X Y :=
@@ -750,6 +881,7 @@ instance isFiltered_op_of_isCofiltered [IsCofiltered C] : IsFiltered Cᵒᵖ
       exact is_cofiltered.eq_condition f.unop g.unop⟩
   Nonempty := ⟨op IsCofiltered.nonempty.some⟩
 #align category_theory.is_filtered_op_of_is_cofiltered CategoryTheory.isFiltered_op_of_isCofiltered
+-/
 
 end Opposite
 

Changes in mathlib4

mathlib3
mathlib4
feat(CategoryTheory): right adjoints are representably flat (#11412)
Diff
@@ -391,6 +391,12 @@ theorem of_cocone_nonempty (h : ∀ {J : Type w} [SmallCategory J] [FinCategory
 theorem of_hasFiniteColimits [HasFiniteColimits C] : IsFiltered C :=
   of_cocone_nonempty.{v} C fun F => ⟨colimit.cocone F⟩
 
+theorem of_isTerminal {X : C} (h : IsTerminal X) : IsFiltered C :=
+  of_cocone_nonempty.{v} _ fun {_} _ _ _ => ⟨⟨X, ⟨fun _ => h.from _, fun _ _ _ => h.hom_ext _ _⟩⟩⟩
+
+instance (priority := 100) of_hasTerminal [HasTerminal C] : IsFiltered C :=
+  of_isTerminal _ terminalIsTerminal
+
 /-- For every universe `w`, `C` is filtered if and only if every finite diagram in `C` with shape
     in `w` admits a cocone. -/
 theorem iff_cocone_nonempty : IsFiltered C ↔
@@ -873,6 +879,12 @@ theorem of_hasFiniteLimits [HasFiniteLimits C] : IsCofiltered C :=
   of_cone_nonempty.{v} C fun F => ⟨limit.cone F⟩
 #align category_theory.cofiltered_of_has_finite_limits CategoryTheory.IsCofiltered.of_hasFiniteLimits
 
+theorem of_isInitial {X : C} (h : IsInitial X) : IsCofiltered C :=
+  of_cone_nonempty.{v} _ fun {_} _ _ _ => ⟨⟨X, ⟨fun _ => h.to _, fun _ _ _ => h.hom_ext _ _⟩⟩⟩
+
+instance (priority := 100) of_hasInitial [HasInitial C] : IsCofiltered C :=
+  of_isInitial _ initialIsInitial
+
 @[deprecated] -- 2024-03-11
 alias _root_.CategoryTheory.cofiltered_of_hasFiniteLimits := of_hasFiniteLimits
 
chore: move cofiltered_of_hasFiniteLimits to the correct file (#11291)
Diff
@@ -388,6 +388,9 @@ theorem of_cocone_nonempty (h : ∀ {J : Type w} [SmallCategory J] [FinCategory
       simp_all
   apply IsFiltered.mk
 
+theorem of_hasFiniteColimits [HasFiniteColimits C] : IsFiltered C :=
+  of_cocone_nonempty.{v} C fun F => ⟨colimit.cocone F⟩
+
 /-- For every universe `w`, `C` is filtered if and only if every finite diagram in `C` with shape
     in `w` admits a cocone. -/
 theorem iff_cocone_nonempty : IsFiltered C ↔
@@ -866,6 +869,13 @@ theorem of_cone_nonempty (h : ∀ {J : Type w} [SmallCategory J] [FinCategory J]
       simp_all
   apply IsCofiltered.mk
 
+theorem of_hasFiniteLimits [HasFiniteLimits C] : IsCofiltered C :=
+  of_cone_nonempty.{v} C fun F => ⟨limit.cone F⟩
+#align category_theory.cofiltered_of_has_finite_limits CategoryTheory.IsCofiltered.of_hasFiniteLimits
+
+@[deprecated] -- 2024-03-11
+alias _root_.CategoryTheory.cofiltered_of_hasFiniteLimits := of_hasFiniteLimits
+
 /-- For every universe `w`, `C` is filtered if and only if every finite diagram in `C` with shape
     in `w` admits a cocone. -/
 theorem iff_cone_nonempty : IsCofiltered C ↔
chore: split CategoryTheory.FinCategory (#9923)

Minor clean up of imports, getting ready to minimize the heartbeats variation observed/reduced in #9732.

This has the effect of slightly (although not enough) delaying the import of positivity (which in turn imports the kitchen sink) into the category theory development.

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

Diff
@@ -3,7 +3,7 @@ Copyright (c) 2019 Reid Barton. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Reid Barton, Scott Morrison
 -/
-import Mathlib.CategoryTheory.FinCategory
+import Mathlib.CategoryTheory.FinCategory.Basic
 import Mathlib.CategoryTheory.Limits.Cones
 import Mathlib.CategoryTheory.Limits.Shapes.FiniteLimits
 import Mathlib.CategoryTheory.Adjunction.Basic
style: homogenise porting notes (#11145)

Homogenises porting notes via capitalisation and addition of whitespace.

It makes the following changes:

  • converts "--porting note" into "-- Porting note";
  • converts "porting note" into "Porting note".
Diff
@@ -139,7 +139,7 @@ section AllowEmpty
 variable {C}
 variable [IsFilteredOrEmpty C]
 
--- porting note: the following definitions were removed because the names are invalid,
+-- Porting note: the following definitions were removed because the names are invalid,
 -- direct references to `IsFilteredOrEmpty` have been added instead
 --
 -- theorem cocone_objs : ∀ X Y : C, ∃ (Z : _) (f : X ⟶ Z) (g : Y ⟶ Z), True :=
@@ -189,7 +189,7 @@ noncomputable def coeqHom {j j' : C} (f f' : j ⟶ j') : j' ⟶ coeq f f' :=
   (IsFilteredOrEmpty.cocone_maps f f').choose_spec.choose
 #align category_theory.is_filtered.coeq_hom CategoryTheory.IsFiltered.coeqHom
 
--- porting note: the simp tag has been removed as the linter complained
+-- Porting note: the simp tag has been removed as the linter complained
 /-- `coeq_condition f f'`, for morphisms `f f' : j ⟶ j'`, is the proof that
 `f ≫ coeqHom f f' = f' ≫ coeqHom f f'`.
 -/
@@ -598,7 +598,7 @@ section AllowEmpty
 variable {C}
 variable [IsCofilteredOrEmpty C]
 
--- porting note: the following definitions were removed because the names are invalid,
+-- Porting note: the following definitions were removed because the names are invalid,
 -- direct references to `IsCofilteredOrEmpty` have been added instead
 --
 --theorem cone_objs : ∀ X Y : C, ∃ (W : _) (f : W ⟶ X) (g : W ⟶ Y), True :=
@@ -648,7 +648,7 @@ noncomputable def eqHom {j j' : C} (f f' : j ⟶ j') : eq f f' ⟶ j :=
   (IsCofilteredOrEmpty.cone_maps f f').choose_spec.choose
 #align category_theory.is_cofiltered.eq_hom CategoryTheory.IsCofiltered.eqHom
 
--- porting note: the simp tag has been removed as the linter complained
+-- Porting note: the simp tag has been removed as the linter complained
 /-- `eq_condition f f'`, for morphisms `f f' : j ⟶ j'`, is the proof that
 `eqHom f f' ≫ f = eqHom f f' ≫ f'`.
 -/
chore: prepare Lean version bump with explicit simp (#10999)

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

Diff
@@ -325,14 +325,14 @@ theorem cocone_nonempty (F : J ⥤ C) : Nonempty (Cocone F) := by
   let H : Finset (Σ' (X Y : C) (_ : X ∈ O) (_ : Y ∈ O), X ⟶ Y) :=
     Finset.univ.biUnion   fun X : J =>
       Finset.univ.biUnion fun Y : J =>
-        Finset.univ.image fun f : X ⟶ Y => ⟨F.obj X, F.obj Y, by simp, by simp, F.map f⟩
+        Finset.univ.image fun f : X ⟶ Y => ⟨F.obj X, F.obj Y, by simp [O], by simp [O], F.map f⟩
   obtain ⟨Z, f, w⟩ := sup_exists O H
-  refine' ⟨⟨Z, ⟨fun X => f (by simp), _⟩⟩⟩
+  refine' ⟨⟨Z, ⟨fun X => f (by simp [O]), _⟩⟩⟩
   intro j j' g
   dsimp
   simp only [Category.comp_id]
   apply w
-  simp only [Finset.mem_biUnion, Finset.mem_univ, Finset.mem_image, PSigma.mk.injEq,
+  simp only [O, H, Finset.mem_biUnion, Finset.mem_univ, Finset.mem_image, PSigma.mk.injEq,
     true_and, exists_and_left]
   exact ⟨j, rfl, j', g, by simp⟩
 #align category_theory.is_filtered.cocone_nonempty CategoryTheory.IsFiltered.cocone_nonempty
@@ -800,15 +800,15 @@ theorem cone_nonempty (F : J ⥤ C) : Nonempty (Cone F) := by
   let H : Finset (Σ' (X Y : C) (_ : X ∈ O) (_ : Y ∈ O), X ⟶ Y) :=
     Finset.univ.biUnion fun X : J =>
       Finset.univ.biUnion fun Y : J =>
-        Finset.univ.image fun f : X ⟶ Y => ⟨F.obj X, F.obj Y, by simp, by simp, F.map f⟩
+        Finset.univ.image fun f : X ⟶ Y => ⟨F.obj X, F.obj Y, by simp [O], by simp [O], F.map f⟩
   obtain ⟨Z, f, w⟩ := inf_exists O H
-  refine' ⟨⟨Z, ⟨fun X => f (by simp), _⟩⟩⟩
+  refine' ⟨⟨Z, ⟨fun X => f (by simp [O]), _⟩⟩⟩
   intro j j' g
   dsimp
   simp only [Category.id_comp]
   symm
   apply w
-  simp only [Finset.mem_biUnion, Finset.mem_univ, Finset.mem_image,
+  simp only [O, H, Finset.mem_biUnion, Finset.mem_univ, Finset.mem_image,
     PSigma.mk.injEq, true_and, exists_and_left]
   exact ⟨j, rfl, j', g, by simp⟩
 #align category_theory.is_cofiltered.cone_nonempty CategoryTheory.IsCofiltered.cone_nonempty
feat: another characterization of filtered categories in terms of type-valued limits (#10665)
Diff
@@ -52,6 +52,10 @@ categories.
 In `CategoryTheory.Limits.FilteredColimitCommutesFiniteLimit` we show that filtered colimits
 commute with finite limits.
 
+There is another characterization of filtered categories, namely that whenever `F : J ⥤ C` is a
+functor from a finite category, there is `X : C` such that `Nonempty (limit (F.op ⋙ yoneda.obj X))`.
+This is shown in `CategoryTheory.Limits.Filtered`.
+
 -/
 
 
chore: remove terminal, terminal refines (#10762)

I replaced a few "terminal" refine/refine's with exact.

The strategy was very simple-minded: essentially any refine whose following line had smaller indentation got replaced by exact and then I cleaned up the mess.

This PR certainly leaves some further terminal refines, but maybe the current change is beneficial.

Diff
@@ -264,7 +264,7 @@ theorem sup_exists :
   classical
   induction' H using Finset.induction with h' H' nmf h''
   · obtain ⟨S, f⟩ := sup_objs_exists O
-    refine' ⟨S, fun mX => (f mX).some, by rintro - - - - - ⟨⟩⟩
+    exact ⟨S, fun mX => (f mX).some, by rintro - - - - - ⟨⟩⟩
   · obtain ⟨X, Y, mX, mY, f⟩ := h'
     obtain ⟨S', T', w'⟩ := h''
     refine' ⟨coeq (f ≫ T' mY) (T' mX), fun mZ => T' mZ ≫ coeqHom (f ≫ T' mY) (T' mX), _⟩
@@ -739,7 +739,7 @@ theorem inf_exists :
   classical
   induction' H using Finset.induction with h' H' nmf h''
   · obtain ⟨S, f⟩ := inf_objs_exists O
-    refine' ⟨S, fun mX => (f mX).some, by rintro - - - - - ⟨⟩⟩
+    exact ⟨S, fun mX => (f mX).some, by rintro - - - - - ⟨⟩⟩
   · obtain ⟨X, Y, mX, mY, f⟩ := h'
     obtain ⟨S', T', w'⟩ := h''
     refine' ⟨eq (T' mX ≫ f) (T' mY), fun mZ => eqHom (T' mX ≫ f) (T' mY) ≫ T' mZ, _⟩
feat(CategoryTheory): filtered if every finite diagram admits a cocone (#10664)
Diff
@@ -5,9 +5,11 @@ Authors: Reid Barton, Scott Morrison
 -/
 import Mathlib.CategoryTheory.FinCategory
 import Mathlib.CategoryTheory.Limits.Cones
+import Mathlib.CategoryTheory.Limits.Shapes.FiniteLimits
 import Mathlib.CategoryTheory.Adjunction.Basic
 import Mathlib.CategoryTheory.Category.Preorder
 import Mathlib.CategoryTheory.Category.ULift
+import Mathlib.CategoryTheory.PEmpty
 
 #align_import category_theory.filtered from "leanprover-community/mathlib"@"14e80e85cbca5872a329fbfd3d1f3fd64e306934"
 
@@ -37,6 +39,8 @@ This formulation is often more useful in practice and is available via `sup_exis
 which takes a finset of objects, and an indexed family (indexed by source and target)
 of finsets of morphisms.
 
+We also prove the converse of `cocone_nonempty` as `of_cocone_nonempty`.
+
 Furthermore, we give special support for two diagram categories: The `bowtie` and the `tulip`.
 This is because these shapes show up in the proofs that forgetful functors of algebraic categories
 (e.g. `MonCat`, `CommRingCat`, ...) preserve filtered colimits.
@@ -306,7 +310,7 @@ theorem toSup_commutes {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y}
   (sup_exists O H).choose_spec.choose_spec mX mY mf
 #align category_theory.is_filtered.to_sup_commutes CategoryTheory.IsFiltered.toSup_commutes
 
-variable {J : Type v} [SmallCategory J] [FinCategory J]
+variable {J : Type w} [SmallCategory J] [FinCategory J]
 
 /-- If we have `IsFiltered C`, then for any functor `F : J ⥤ C` with `FinCategory J`,
 there exists a cocone over `F`.
@@ -356,6 +360,38 @@ theorem of_equivalence (h : C ≌ D) : IsFiltered D :=
 
 end Nonempty
 
+section OfCocone
+
+open CategoryTheory.Limits
+
+/-- If every finite diagram in `C` admits a cocone, then `C` is filtered. It is sufficient to verify
+    this for diagrams whose shape lives in any one fixed universe. -/
+theorem of_cocone_nonempty (h : ∀ {J : Type w} [SmallCategory J] [FinCategory J] (F : J ⥤ C),
+    Nonempty (Cocone F)) : IsFiltered C := by
+  have : Nonempty C := by
+    obtain ⟨c⟩ := h (Functor.empty _)
+    exact ⟨c.pt⟩
+  have : IsFilteredOrEmpty C := by
+    refine ⟨?_, ?_⟩
+    · intros X Y
+      obtain ⟨c⟩ := h (ULiftHom.down ⋙ ULift.downFunctor ⋙ pair X Y)
+      exact ⟨c.pt, c.ι.app ⟨⟨WalkingPair.left⟩⟩, c.ι.app ⟨⟨WalkingPair.right⟩⟩, trivial⟩
+    · intros X Y f g
+      obtain ⟨c⟩ := h (ULiftHom.down ⋙ ULift.downFunctor ⋙ parallelPair f g)
+      refine ⟨c.pt, c.ι.app ⟨WalkingParallelPair.one⟩, ?_⟩
+      have h₁ := c.ι.naturality ⟨WalkingParallelPairHom.left⟩
+      have h₂ := c.ι.naturality ⟨WalkingParallelPairHom.right⟩
+      simp_all
+  apply IsFiltered.mk
+
+/-- For every universe `w`, `C` is filtered if and only if every finite diagram in `C` with shape
+    in `w` admits a cocone. -/
+theorem iff_cocone_nonempty : IsFiltered C ↔
+    ∀ {J : Type w} [SmallCategory J] [FinCategory J] (F : J ⥤ C), Nonempty (Cocone F) :=
+  ⟨fun _ _ _ _ F => cocone_nonempty F, of_cocone_nonempty C⟩
+
+end OfCocone
+
 section SpecialShapes
 
 variable {C}
@@ -801,6 +837,39 @@ theorem of_equivalence (h : C ≌ D) : IsCofiltered D :=
 
 end Nonempty
 
+
+section OfCone
+
+open CategoryTheory.Limits
+
+/-- If every finite diagram in `C` admits a cone, then `C` is cofiltered. It is sufficient to
+    verify this for diagrams whose shape lives in any one fixed universe. -/
+theorem of_cone_nonempty (h : ∀ {J : Type w} [SmallCategory J] [FinCategory J] (F : J ⥤ C),
+    Nonempty (Cone F)) : IsCofiltered C := by
+  have : Nonempty C := by
+    obtain ⟨c⟩ := h (Functor.empty _)
+    exact ⟨c.pt⟩
+  have : IsCofilteredOrEmpty C := by
+    refine ⟨?_, ?_⟩
+    · intros X Y
+      obtain ⟨c⟩ := h (ULiftHom.down ⋙ ULift.downFunctor ⋙ pair X Y)
+      exact ⟨c.pt, c.π.app ⟨⟨WalkingPair.left⟩⟩, c.π.app ⟨⟨WalkingPair.right⟩⟩, trivial⟩
+    · intros X Y f g
+      obtain ⟨c⟩ := h (ULiftHom.down ⋙ ULift.downFunctor ⋙ parallelPair f g)
+      refine ⟨c.pt, c.π.app ⟨WalkingParallelPair.zero⟩, ?_⟩
+      have h₁ := c.π.naturality ⟨WalkingParallelPairHom.left⟩
+      have h₂ := c.π.naturality ⟨WalkingParallelPairHom.right⟩
+      simp_all
+  apply IsCofiltered.mk
+
+/-- For every universe `w`, `C` is filtered if and only if every finite diagram in `C` with shape
+    in `w` admits a cocone. -/
+theorem iff_cone_nonempty : IsCofiltered C ↔
+    ∀ {J : Type w} [SmallCategory J] [FinCategory J] (F : J ⥤ C), Nonempty (Cone F) :=
+  ⟨fun _ _ _ _ F => cone_nonempty F, of_cone_nonempty C⟩
+
+end OfCone
+
 end IsCofiltered
 
 section Opposite
chore: space after (#8178)

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -454,7 +454,7 @@ theorem bowtie {j₁ j₂ k₁ k₂ : C} (f₁ : j₁ ⟶ k₁) (g₁ : j₁ ⟶
   obtain ⟨t, k₁t, k₂t, ht⟩ := span f₁ g₁
   obtain ⟨s, ts, hs⟩ := IsFilteredOrEmpty.cocone_maps (f₂ ≫ k₁t) (g₂ ≫ k₂t)
   simp_rw [Category.assoc] at hs
-  exact ⟨s, k₁t ≫ ts, k₂t ≫ ts, by simp only [←Category.assoc, ht], hs⟩
+  exact ⟨s, k₁t ≫ ts, k₂t ≫ ts, by simp only [← Category.assoc, ht], hs⟩
 #align category_theory.is_filtered.bowtie CategoryTheory.IsFiltered.bowtie
 
 /-- Given a "tulip" of morphisms
@@ -480,7 +480,7 @@ theorem tulip {j₁ j₂ j₃ k₁ k₂ l : C} (f₁ : j₁ ⟶ k₁) (f₂ : j
       f₁ ≫ α = g₁ ≫ β ∧ f₂ ≫ α = f₃ ≫ γ ∧ f₄ ≫ γ = g₂ ≫ β := by
   obtain ⟨l', k₁l, k₂l, hl⟩ := span f₂ f₃
   obtain ⟨s, ls, l's, hs₁, hs₂⟩ := bowtie g₁ (f₁ ≫ k₁l) g₂ (f₄ ≫ k₂l)
-  refine' ⟨s, k₁l ≫ l's, ls, k₂l ≫ l's, _, by simp only [←Category.assoc, hl], _⟩ <;>
+  refine' ⟨s, k₁l ≫ l's, ls, k₂l ≫ l's, _, by simp only [← Category.assoc, hl], _⟩ <;>
     simp only [hs₁, hs₂, Category.assoc]
 #align category_theory.is_filtered.tulip CategoryTheory.IsFiltered.tulip
 
fix: decapitalize names of proof-valued fields (#8509)

Only Prop-values fields should be capitalized, not P-valued fields where P is Prop-valued.

Rather than fixing Nonempty := in constructors, I just deleted the line as the instance can almost always be found automatically.

Diff
@@ -83,7 +83,7 @@ See <https://stacks.math.columbia.edu/tag/002V>. (They also define a diagram bei
 -/
 class IsFiltered extends IsFilteredOrEmpty C : Prop where
   /-- a filtered category must be non empty -/
-  [Nonempty : Nonempty C]
+  [nonempty : Nonempty C]
 #align category_theory.is_filtered CategoryTheory.IsFiltered
 
 instance (priority := 100) isFilteredOrEmpty_of_semilatticeSup (α : Type u) [SemilatticeSup α] :
@@ -123,7 +123,6 @@ instance : IsFiltered (Discrete PUnit) where
   cocone_maps X Y f g := ⟨⟨PUnit.unit⟩, ⟨⟨by trivial⟩⟩, by
     apply ULift.ext
     apply Subsingleton.elim⟩
-  Nonempty := ⟨⟨PUnit.unit⟩⟩
 
 namespace IsFiltered
 
@@ -234,10 +233,10 @@ variable [IsFiltered C]
 
 /-- Any finite collection of objects in a filtered category has an object "to the right".
 -/
-theorem sup_objs_exists (O : Finset C) : ∃ S : C, ∀ {X}, X ∈ O → _root_.Nonempty (X ⟶ S) := by
+theorem sup_objs_exists (O : Finset C) : ∃ S : C, ∀ {X}, X ∈ O → Nonempty (X ⟶ S) := by
   classical
   induction' O using Finset.induction with X O' nm h
-  · exact ⟨Classical.choice IsFiltered.Nonempty, by intro; simp⟩
+  · exact ⟨Classical.choice IsFiltered.nonempty, by intro; simp⟩
   · obtain ⟨S', w'⟩ := h
     use max X S'
     rintro Y mY
@@ -312,7 +311,7 @@ variable {J : Type v} [SmallCategory J] [FinCategory J]
 /-- If we have `IsFiltered C`, then for any functor `F : J ⥤ C` with `FinCategory J`,
 there exists a cocone over `F`.
 -/
-theorem cocone_nonempty (F : J ⥤ C) : _root_.Nonempty (Cocone F) := by
+theorem cocone_nonempty (F : J ⥤ C) : Nonempty (Cocone F) := by
   classical
   let O := Finset.univ.image F.obj
   let H : Finset (Σ' (X Y : C) (_ : X ∈ O) (_ : Y ∈ O), X ⟶ Y) :=
@@ -342,7 +341,7 @@ variable {D : Type u₁} [Category.{v₁} D]
 -/
 theorem of_right_adjoint {L : D ⥤ C} {R : C ⥤ D} (h : L ⊣ R) : IsFiltered D :=
   { IsFilteredOrEmpty.of_right_adjoint h with
-    Nonempty := IsFiltered.Nonempty.map R.obj }
+    nonempty := IsFiltered.nonempty.map R.obj }
 #align category_theory.is_filtered.of_right_adjoint CategoryTheory.IsFiltered.of_right_adjoint
 
 /-- If `C` is filtered, and we have a right adjoint functor `R : C ⥤ D`, then `D` is filtered. -/
@@ -512,7 +511,7 @@ See <https://stacks.math.columbia.edu/tag/04AZ>.
 -/
 class IsCofiltered extends IsCofilteredOrEmpty C : Prop where
   /-- a cofiltered category must be non empty -/
-  [Nonempty : Nonempty C]
+  [nonempty : Nonempty C]
 #align category_theory.is_cofiltered CategoryTheory.IsCofiltered
 
 instance (priority := 100) isCofilteredOrEmpty_of_semilatticeInf (α : Type u) [SemilatticeInf α] :
@@ -551,7 +550,6 @@ instance : IsCofiltered (Discrete PUnit) where
   cone_maps X Y f g := ⟨⟨PUnit.unit⟩, ⟨⟨by trivial⟩⟩, by
     apply ULift.ext
     apply Subsingleton.elim⟩
-  Nonempty := ⟨⟨PUnit.unit⟩⟩
 
 namespace IsCofiltered
 
@@ -678,10 +676,10 @@ variable [IsCofiltered C]
 
 /-- Any finite collection of objects in a cofiltered category has an object "to the left".
 -/
-theorem inf_objs_exists (O : Finset C) : ∃ S : C, ∀ {X}, X ∈ O → _root_.Nonempty (S ⟶ X) := by
+theorem inf_objs_exists (O : Finset C) : ∃ S : C, ∀ {X}, X ∈ O → Nonempty (S ⟶ X) := by
   classical
   induction' O using Finset.induction with X O' nm h
-  · exact ⟨Classical.choice IsCofiltered.Nonempty, by intro; simp⟩
+  · exact ⟨Classical.choice IsCofiltered.nonempty, by intro; simp⟩
   · obtain ⟨S', w'⟩ := h
     use min X S'
     rintro Y mY
@@ -756,7 +754,7 @@ variable {J : Type w} [SmallCategory J] [FinCategory J]
 /-- If we have `IsCofiltered C`, then for any functor `F : J ⥤ C` with `FinCategory J`,
 there exists a cone over `F`.
 -/
-theorem cone_nonempty (F : J ⥤ C) : _root_.Nonempty (Cone F) := by
+theorem cone_nonempty (F : J ⥤ C) : Nonempty (Cone F) := by
   classical
   let O := Finset.univ.image F.obj
   let H : Finset (Σ' (X Y : C) (_ : X ∈ O) (_ : Y ∈ O), X ⟶ Y) :=
@@ -788,7 +786,7 @@ then `D` is cofiltered.
 -/
 theorem of_left_adjoint {L : C ⥤ D} {R : D ⥤ C} (h : L ⊣ R) : IsCofiltered D :=
   { IsCofilteredOrEmpty.of_left_adjoint h with
-    Nonempty := IsCofiltered.Nonempty.map L.obj }
+    nonempty := IsCofiltered.nonempty.map L.obj }
 #align category_theory.is_cofiltered.of_left_adjoint CategoryTheory.IsCofiltered.of_left_adjoint
 
 /-- If `C` is cofiltered, and we have a left adjoint functor `L : C ⥤ D`, then `D` is cofiltered. -/
@@ -821,7 +819,7 @@ instance isCofilteredOrEmpty_op_of_isFilteredOrEmpty [IsFilteredOrEmpty C] :
       exact IsFiltered.coeq_condition f.unop g.unop⟩
 
 instance isCofiltered_op_of_isFiltered [IsFiltered C] : IsCofiltered Cᵒᵖ where
-  Nonempty := ⟨op IsFiltered.Nonempty.some⟩
+  nonempty := letI : Nonempty C := IsFiltered.nonempty; inferInstance
 #align category_theory.is_cofiltered_op_of_is_filtered CategoryTheory.isCofiltered_op_of_isFiltered
 
 instance isFilteredOrEmpty_op_of_isCofilteredOrEmpty [IsCofilteredOrEmpty C] :
@@ -836,7 +834,7 @@ instance isFilteredOrEmpty_op_of_isCofilteredOrEmpty [IsCofilteredOrEmpty C] :
       exact IsCofiltered.eq_condition f.unop g.unop⟩
 
 instance isFiltered_op_of_isCofiltered [IsCofiltered C] : IsFiltered Cᵒᵖ where
-  Nonempty := ⟨op IsCofiltered.Nonempty.some⟩
+  nonempty := letI : Nonempty C := IsCofiltered.nonempty; inferInstance
 #align category_theory.is_filtered_op_of_is_cofiltered CategoryTheory.isFiltered_op_of_isCofiltered
 
 /-- If Cᵒᵖ is filtered or empty, then C is cofiltered or empty. -/
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -628,7 +628,7 @@ theorem cospan {i j j' : C} (f : j ⟶ i) (f' : j' ⟶ i) :
   ⟨k, e ≫ G, e ≫ G', by simpa only [Category.assoc] using he⟩
 #align category_theory.is_cofiltered.cospan CategoryTheory.IsCofiltered.cospan
 
-theorem _root_.CategoryTheory.Functor.ranges_directed (F : C ⥤ Type _) (j : C) :
+theorem _root_.CategoryTheory.Functor.ranges_directed (F : C ⥤ Type*) (j : C) :
     Directed (· ⊇ ·) fun f : Σ'i, i ⟶ j => Set.range (F.map f.2) := fun ⟨i, ij⟩ ⟨k, kj⟩ => by
   let ⟨l, li, lk, e⟩ := cospan ij kj
   refine' ⟨⟨l, lk ≫ kj⟩, e ▸ _, _⟩ <;> simp_rw [F.map_comp] <;> apply Set.range_comp_subset_range
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,11 +2,6 @@
 Copyright (c) 2019 Reid Barton. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Reid Barton, Scott Morrison
-
-! This file was ported from Lean 3 source module category_theory.filtered
-! leanprover-community/mathlib commit 14e80e85cbca5872a329fbfd3d1f3fd64e306934
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.CategoryTheory.FinCategory
 import Mathlib.CategoryTheory.Limits.Cones
@@ -14,6 +9,8 @@ import Mathlib.CategoryTheory.Adjunction.Basic
 import Mathlib.CategoryTheory.Category.Preorder
 import Mathlib.CategoryTheory.Category.ULift
 
+#align_import category_theory.filtered from "leanprover-community/mathlib"@"14e80e85cbca5872a329fbfd3d1f3fd64e306934"
+
 /-!
 # Filtered categories
 
chore: fix focusing dots (#5708)

This PR is the result of running

find . -type f -name "*.lean" -exec sed -i -E 's/^( +)\. /\1· /' {} \;
find . -type f -name "*.lean" -exec sed -i -E 'N;s/^( +·)\n +(.*)$/\1 \2/;P;D' {} \;

which firstly replaces . focusing dots with · and secondly removes isolated instances of such dots, unifying them with the following line. A new rule is placed in the style linter to verify this.

Diff
@@ -240,8 +240,8 @@ variable [IsFiltered C]
 theorem sup_objs_exists (O : Finset C) : ∃ S : C, ∀ {X}, X ∈ O → _root_.Nonempty (X ⟶ S) := by
   classical
   induction' O using Finset.induction with X O' nm h
-  . exact ⟨Classical.choice IsFiltered.Nonempty, by intro; simp⟩
-  . obtain ⟨S', w'⟩ := h
+  · exact ⟨Classical.choice IsFiltered.Nonempty, by intro; simp⟩
+  · obtain ⟨S', w'⟩ := h
     use max X S'
     rintro Y mY
     obtain rfl | h := eq_or_ne Y X
@@ -278,9 +278,9 @@ theorem sup_exists :
       · rw [@w' _ _ mX mY f']
         simp only [Finset.mem_insert, PSigma.mk.injEq, heq_eq_eq, true_and] at mf'
         rcases mf' with mf' | mf'
-        . exfalso
+        · exfalso
           exact hf mf'.symm
-        . exact mf'
+        · exact mf'
     · rw [@w' _ _ mX' mY' f' _]
       apply Finset.mem_of_mem_insert_of_ne mf'
       contrapose! h
@@ -684,8 +684,8 @@ variable [IsCofiltered C]
 theorem inf_objs_exists (O : Finset C) : ∃ S : C, ∀ {X}, X ∈ O → _root_.Nonempty (S ⟶ X) := by
   classical
   induction' O using Finset.induction with X O' nm h
-  . exact ⟨Classical.choice IsCofiltered.Nonempty, by intro; simp⟩
-  . obtain ⟨S', w'⟩ := h
+  · exact ⟨Classical.choice IsCofiltered.Nonempty, by intro; simp⟩
+  · obtain ⟨S', w'⟩ := h
     use min X S'
     rintro Y mY
     obtain rfl | h := eq_or_ne Y X
@@ -722,9 +722,9 @@ theorem inf_exists :
       · rw [@w' _ _ mX mY f']
         simp only [Finset.mem_insert, PSigma.mk.injEq, heq_eq_eq, true_and] at mf'
         rcases mf' with mf' | mf'
-        . exfalso
+        · exfalso
           exact hf mf'.symm
-        . exact mf'
+        · exact mf'
     · rw [@w' _ _ mX' mY' f' _]
       apply Finset.mem_of_mem_insert_of_ne mf'
       contrapose! h
feat: final functors preserve filteredness (#4973)

Also generalize some facts about IsFiltered to IsFilteredOrEmpty.

Diff
@@ -196,6 +196,38 @@ theorem coeq_condition {j j' : C} (f f' : j ⟶ j') : f ≫ coeqHom f f' = f' 
 
 end AllowEmpty
 
+end IsFiltered
+
+namespace IsFilteredOrEmpty
+open IsFiltered
+
+variable {C}
+variable [IsFilteredOrEmpty C]
+variable {D : Type u₁} [Category.{v₁} D]
+
+/-- If `C` is filtered or emtpy, and we have a functor `R : C ⥤ D` with a left adjoint, then `D` is
+filtered or empty.
+-/
+theorem of_right_adjoint {L : D ⥤ C} {R : C ⥤ D} (h : L ⊣ R) : IsFilteredOrEmpty D :=
+  { cocone_objs := fun X Y =>
+      ⟨_, h.homEquiv _ _ (leftToMax _ _), h.homEquiv _ _ (rightToMax _ _), ⟨⟩⟩
+    cocone_maps := fun X Y f g =>
+      ⟨_, h.homEquiv _ _ (coeqHom _ _), by
+        rw [← h.homEquiv_naturality_left, ← h.homEquiv_naturality_left, coeq_condition]⟩ }
+
+/-- If `C` is filtered or empty, and we have a right adjoint functor `R : C ⥤ D`, then `D` is
+filtered or empty. -/
+theorem of_isRightAdjoint (R : C ⥤ D) [IsRightAdjoint R] : IsFilteredOrEmpty D :=
+  of_right_adjoint (Adjunction.ofRightAdjoint R)
+
+/-- Being filtered or empty is preserved by equivalence of categories. -/
+theorem of_equivalence (h : C ≌ D) : IsFilteredOrEmpty D :=
+  of_right_adjoint h.symm.toAdjunction
+
+end IsFilteredOrEmpty
+
+namespace IsFiltered
+
 section Nonempty
 
 open CategoryTheory.Limits
@@ -312,11 +344,7 @@ variable {D : Type u₁} [Category.{v₁} D]
 /-- If `C` is filtered, and we have a functor `R : C ⥤ D` with a left adjoint, then `D` is filtered.
 -/
 theorem of_right_adjoint {L : D ⥤ C} {R : C ⥤ D} (h : L ⊣ R) : IsFiltered D :=
-  { cocone_objs := fun X Y =>
-      ⟨_, h.homEquiv _ _ (leftToMax _ _), h.homEquiv _ _ (rightToMax _ _), ⟨⟩⟩
-    cocone_maps := fun X Y f g =>
-      ⟨_, h.homEquiv _ _ (coeqHom _ _), by
-        rw [← h.homEquiv_naturality_left, ← h.homEquiv_naturality_left, coeq_condition]⟩
+  { IsFilteredOrEmpty.of_right_adjoint h with
     Nonempty := IsFiltered.Nonempty.map R.obj }
 #align category_theory.is_filtered.of_right_adjoint CategoryTheory.IsFiltered.of_right_adjoint
 
@@ -611,6 +639,39 @@ theorem _root_.CategoryTheory.Functor.ranges_directed (F : C ⥤ Type _) (j : C)
 
 end AllowEmpty
 
+end IsCofiltered
+
+namespace IsCofilteredOrEmpty
+open IsCofiltered
+
+variable {C}
+variable [IsCofilteredOrEmpty C]
+variable {D : Type u₁} [Category.{v₁} D]
+
+/-- If `C` is cofiltered or empty, and we have a functor `L : C ⥤ D` with a right adjoint,
+then `D` is cofiltered or empty.
+-/
+theorem of_left_adjoint {L : C ⥤ D} {R : D ⥤ C} (h : L ⊣ R) : IsCofilteredOrEmpty D :=
+  { cone_objs := fun X Y =>
+      ⟨L.obj (min (R.obj X) (R.obj Y)), (h.homEquiv _ X).symm (minToLeft _ _),
+        (h.homEquiv _ Y).symm (minToRight _ _), ⟨⟩⟩
+    cone_maps := fun X Y f g =>
+      ⟨L.obj (eq (R.map f) (R.map g)), (h.homEquiv _ _).symm (eqHom _ _), by
+        rw [← h.homEquiv_naturality_right_symm, ← h.homEquiv_naturality_right_symm, eq_condition]⟩ }
+
+/-- If `C` is cofiltered or empty, and we have a left adjoint functor `L : C ⥤ D`, then `D` is
+cofiltered or empty. -/
+theorem of_isLeftAdjoint (L : C ⥤ D) [IsLeftAdjoint L] : IsCofilteredOrEmpty D :=
+  of_left_adjoint (Adjunction.ofLeftAdjoint L)
+
+/-- Being cofiltered or empty is preserved by equivalence of categories. -/
+theorem of_equivalence (h : C ≌ D) : IsCofilteredOrEmpty D :=
+  of_left_adjoint h.toAdjunction
+
+end IsCofilteredOrEmpty
+
+namespace IsCofiltered
+
 section Nonempty
 
 open CategoryTheory.Limits
@@ -729,12 +790,7 @@ variable {D : Type u₁} [Category.{v₁} D]
 then `D` is cofiltered.
 -/
 theorem of_left_adjoint {L : C ⥤ D} {R : D ⥤ C} (h : L ⊣ R) : IsCofiltered D :=
-  { cone_objs := fun X Y =>
-      ⟨L.obj (min (R.obj X) (R.obj Y)), (h.homEquiv _ X).symm (minToLeft _ _),
-        (h.homEquiv _ Y).symm (minToRight _ _), ⟨⟩⟩
-    cone_maps := fun X Y f g =>
-      ⟨L.obj (eq (R.map f) (R.map g)), (h.homEquiv _ _).symm (eqHom _ _), by
-        rw [← h.homEquiv_naturality_right_symm, ← h.homEquiv_naturality_right_symm, eq_condition]⟩
+  { IsCofilteredOrEmpty.of_left_adjoint h with
     Nonempty := IsCofiltered.Nonempty.map L.obj }
 #align category_theory.is_cofiltered.of_left_adjoint CategoryTheory.IsCofiltered.of_left_adjoint
 
@@ -756,7 +812,8 @@ section Opposite
 
 open Opposite
 
-instance isCofiltered_op_of_isFiltered [IsFiltered C] : IsCofiltered Cᵒᵖ where
+instance isCofilteredOrEmpty_op_of_isFilteredOrEmpty [IsFilteredOrEmpty C] :
+    IsCofilteredOrEmpty Cᵒᵖ where
   cone_objs X Y :=
     ⟨op (IsFiltered.max X.unop Y.unop), (IsFiltered.leftToMax _ _).op,
       (IsFiltered.rightToMax _ _).op, trivial⟩
@@ -765,10 +822,13 @@ instance isCofiltered_op_of_isFiltered [IsFiltered C] : IsCofiltered Cᵒᵖ whe
       rw [show f = f.unop.op by simp, show g = g.unop.op by simp, ← op_comp, ← op_comp]
       congr 1
       exact IsFiltered.coeq_condition f.unop g.unop⟩
+
+instance isCofiltered_op_of_isFiltered [IsFiltered C] : IsCofiltered Cᵒᵖ where
   Nonempty := ⟨op IsFiltered.Nonempty.some⟩
 #align category_theory.is_cofiltered_op_of_is_filtered CategoryTheory.isCofiltered_op_of_isFiltered
 
-instance isFiltered_op_of_isCofiltered [IsCofiltered C] : IsFiltered Cᵒᵖ where
+instance isFilteredOrEmpty_op_of_isCofilteredOrEmpty [IsCofilteredOrEmpty C] :
+    IsFilteredOrEmpty Cᵒᵖ where
   cocone_objs X Y :=
     ⟨op (IsCofiltered.min X.unop Y.unop), (IsCofiltered.minToLeft X.unop Y.unop).op,
       (IsCofiltered.minToRight X.unop Y.unop).op, trivial⟩
@@ -777,9 +837,27 @@ instance isFiltered_op_of_isCofiltered [IsCofiltered C] : IsFiltered Cᵒᵖ whe
       rw [show f = f.unop.op by simp, show g = g.unop.op by simp, ← op_comp, ← op_comp]
       congr 1
       exact IsCofiltered.eq_condition f.unop g.unop⟩
+
+instance isFiltered_op_of_isCofiltered [IsCofiltered C] : IsFiltered Cᵒᵖ where
   Nonempty := ⟨op IsCofiltered.Nonempty.some⟩
 #align category_theory.is_filtered_op_of_is_cofiltered CategoryTheory.isFiltered_op_of_isCofiltered
 
+/-- If Cᵒᵖ is filtered or empty, then C is cofiltered or empty. -/
+lemma isCofilteredOrEmpty_of_isFilteredOrEmpty_op [IsFilteredOrEmpty Cᵒᵖ] : IsCofilteredOrEmpty C :=
+  IsCofilteredOrEmpty.of_equivalence (opOpEquivalence _)
+
+/-- If Cᵒᵖ is cofiltered or empty, then C is filtered or empty. -/
+lemma isFilteredOrEmpty_of_isCofilteredOrEmpty_op [IsCofilteredOrEmpty Cᵒᵖ] : IsFilteredOrEmpty C :=
+  IsFilteredOrEmpty.of_equivalence (opOpEquivalence _)
+
+/-- If Cᵒᵖ is filtered, then C is cofiltered. -/
+lemma isCofiltered_of_isFiltered_op [IsFiltered Cᵒᵖ] : IsCofiltered C :=
+  IsCofiltered.of_equivalence (opOpEquivalence _)
+
+/-- If Cᵒᵖ is cofiltered, then C is filtered. -/
+lemma isFiltered_of_isCofiltered_op [IsCofiltered Cᵒᵖ] : IsFiltered C :=
+  IsFiltered.of_equivalence (opOpEquivalence _)
+
 end Opposite
 
 section ULift
chore: formatting issues (#4947)

Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au> Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>

Diff
@@ -70,10 +70,10 @@ variable (C : Type u) [Category.{v} C]
 -/
 class IsFilteredOrEmpty : Prop where
   /-- for every pair of objects there exists another object "to the right" -/
-  cocone_objs : ∀ X Y : C, ∃ (Z : _)(_ : X ⟶ Z)(_ : Y ⟶ Z), True
+  cocone_objs : ∀ X Y : C, ∃ (Z : _) (_ : X ⟶ Z) (_ : Y ⟶ Z), True
   /-- for every pair of parallel morphisms there exists a morphism to the right
     so the compositions are equal -/
-  cocone_maps : ∀ ⦃X Y : C⦄ (f g : X ⟶ Y), ∃ (Z : _)(h : Y ⟶ Z), f ≫ h = g ≫ h
+  cocone_maps : ∀ ⦃X Y : C⦄ (f g : X ⟶ Y), ∃ (Z : _) (h : Y ⟶ Z), f ≫ h = g ≫ h
 #align category_theory.is_filtered_or_empty CategoryTheory.IsFilteredOrEmpty
 
 /-- A category `IsFiltered` if
@@ -138,11 +138,11 @@ variable [IsFilteredOrEmpty C]
 -- porting note: the following definitions were removed because the names are invalid,
 -- direct references to `IsFilteredOrEmpty` have been added instead
 --
--- theorem cocone_objs : ∀ X Y : C, ∃ (Z : _)(f : X ⟶ Z)(g : Y ⟶ Z), True :=
+-- theorem cocone_objs : ∀ X Y : C, ∃ (Z : _) (f : X ⟶ Z) (g : Y ⟶ Z), True :=
 --  IsFilteredOrEmpty.cocone_objs
 -- #align category_theory.is_filtered.cocone_objs CategoryTheory.IsFiltered.cocone_objs
 --
---theorem cocone_maps : ∀ ⦃X Y : C⦄ (f g : X ⟶ Y), ∃ (Z : _)(h : Y ⟶ Z), f ≫ h = g ≫ h :=
+--theorem cocone_maps : ∀ ⦃X Y : C⦄ (f g : X ⟶ Y), ∃ (Z : _) (h : Y ⟶ Z), f ≫ h = g ≫ h :=
 --  IsFilteredOrEmpty.cocone_maps
 --#align category_theory.is_filtered.cocone_maps CategoryTheory.IsFiltered.cocone_maps
 
@@ -217,7 +217,7 @@ theorem sup_objs_exists (O : Finset C) : ∃ S : C, ∀ {X}, X ∈ O → _root_.
     · exact ⟨(w' (Finset.mem_of_mem_insert_of_ne mY h)).some ≫ rightToMax _ _⟩
 #align category_theory.is_filtered.sup_objs_exists CategoryTheory.IsFiltered.sup_objs_exists
 
-variable (O : Finset C) (H : Finset (Σ'(X Y : C)(_ : X ∈ O)(_ : Y ∈ O), X ⟶ Y))
+variable (O : Finset C) (H : Finset (Σ' (X Y : C) (_ : X ∈ O) (_ : Y ∈ O), X ⟶ Y))
 
 /-- Given any `Finset` of objects `{X, ...}` and
 indexed collection of `Finset`s of morphisms `{f, ...}` in `C`,
@@ -225,9 +225,10 @@ there exists an object `S`, with a morphism `T X : X ⟶ S` from each `X`,
 such that the triangles commute: `f ≫ T Y = T X`, for `f : X ⟶ Y` in the `Finset`.
 -/
 theorem sup_exists :
-    ∃ (S : C)(T : ∀ {X : C}, X ∈ O → (X ⟶ S)),
+    ∃ (S : C) (T : ∀ {X : C}, X ∈ O → (X ⟶ S)),
       ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},
-        (⟨X, Y, mX, mY, f⟩ : Σ'(X Y : C)(_ : X ∈ O)(_ : Y ∈ O), X ⟶ Y) ∈ H → f ≫ T mY = T mX := by
+        (⟨X, Y, mX, mY, f⟩ : Σ' (X Y : C) (_ : X ∈ O) (_ : Y ∈ O), X ⟶ Y) ∈ H →
+          f ≫ T mY = T mX := by
   classical
   induction' H using Finset.induction with h' H' nmf h''
   · obtain ⟨S, f⟩ := sup_objs_exists O
@@ -272,7 +273,7 @@ noncomputable def toSup {X : C} (m : X ∈ O) : X ⟶ sup O H :=
 /-- The triangles of consisting of a morphism in `H` and the maps to `sup O H` commute.
 -/
 theorem toSup_commutes {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y}
-    (mf : (⟨X, Y, mX, mY, f⟩ : Σ'(X Y : C)(_ : X ∈ O)(_ : Y ∈ O), X ⟶ Y) ∈ H) :
+    (mf : (⟨X, Y, mX, mY, f⟩ : Σ' (X Y : C) (_ : X ∈ O) (_ : Y ∈ O), X ⟶ Y) ∈ H) :
     f ≫ toSup O H mY = toSup O H mX :=
   (sup_exists O H).choose_spec.choose_spec mX mY mf
 #align category_theory.is_filtered.to_sup_commutes CategoryTheory.IsFiltered.toSup_commutes
@@ -285,7 +286,7 @@ there exists a cocone over `F`.
 theorem cocone_nonempty (F : J ⥤ C) : _root_.Nonempty (Cocone F) := by
   classical
   let O := Finset.univ.image F.obj
-  let H : Finset (Σ'(X Y : C)(_ : X ∈ O)(_ : Y ∈ O), X ⟶ Y) :=
+  let H : Finset (Σ' (X Y : C) (_ : X ∈ O) (_ : Y ∈ O), X ⟶ Y) :=
     Finset.univ.biUnion   fun X : J =>
       Finset.univ.biUnion fun Y : J =>
         Finset.univ.image fun f : X ⟶ Y => ⟨F.obj X, F.obj Y, by simp, by simp, F.map f⟩
@@ -405,7 +406,7 @@ theorem coeq₃_condition₃ {j₁ j₂ : C} (f g h : j₁ ⟶ j₂) : f ≫ coe
 /-- For every span `j ⟵ i ⟶ j'`, there
    exists a cocone `j ⟶ k ⟵ j'` such that the square commutes. -/
 theorem span {i j j' : C} (f : i ⟶ j) (f' : i ⟶ j') :
-    ∃ (k : C)(g : j ⟶ k)(g' : j' ⟶ k), f ≫ g = f' ≫ g' :=
+    ∃ (k : C) (g : j ⟶ k) (g' : j' ⟶ k), f ≫ g = f' ≫ g' :=
   let ⟨K, G, G', _⟩ := IsFilteredOrEmpty.cocone_objs j j'
   let ⟨k, e, he⟩ := IsFilteredOrEmpty.cocone_maps (f ≫ G) (f' ≫ G')
   ⟨k, G ≫ e, G' ≫ e, by simpa only [← Category.assoc] ⟩
@@ -425,7 +426,7 @@ in a filtered category, we can construct an object `s` and two morphisms from `k
 making the resulting squares commute.
 -/
 theorem bowtie {j₁ j₂ k₁ k₂ : C} (f₁ : j₁ ⟶ k₁) (g₁ : j₁ ⟶ k₂) (f₂ : j₂ ⟶ k₁) (g₂ : j₂ ⟶ k₂) :
-    ∃ (s : C)(α : k₁ ⟶ s)(β : k₂ ⟶ s), f₁ ≫ α = g₁ ≫ β ∧ f₂ ≫ α = g₂ ≫ β := by
+    ∃ (s : C) (α : k₁ ⟶ s) (β : k₂ ⟶ s), f₁ ≫ α = g₁ ≫ β ∧ f₂ ≫ α = g₂ ≫ β := by
   obtain ⟨t, k₁t, k₂t, ht⟩ := span f₁ g₁
   obtain ⟨s, ts, hs⟩ := IsFilteredOrEmpty.cocone_maps (f₂ ≫ k₁t) (g₂ ≫ k₂t)
   simp_rw [Category.assoc] at hs
@@ -451,7 +452,7 @@ to `s`, making the resulting squares commute.
 -/
 theorem tulip {j₁ j₂ j₃ k₁ k₂ l : C} (f₁ : j₁ ⟶ k₁) (f₂ : j₂ ⟶ k₁) (f₃ : j₂ ⟶ k₂) (f₄ : j₃ ⟶ k₂)
     (g₁ : j₁ ⟶ l) (g₂ : j₃ ⟶ l) :
-    ∃ (s : C)(α : k₁ ⟶ s)(β : l ⟶ s)(γ : k₂ ⟶ s),
+    ∃ (s : C) (α : k₁ ⟶ s) (β : l ⟶ s) (γ : k₂ ⟶ s),
       f₁ ≫ α = g₁ ≫ β ∧ f₂ ≫ α = f₃ ≫ γ ∧ f₄ ≫ γ = g₂ ≫ β := by
   obtain ⟨l', k₁l, k₂l, hl⟩ := span f₂ f₃
   obtain ⟨s, ls, l's, hs₁, hs₂⟩ := bowtie g₁ (f₁ ≫ k₁l) g₂ (f₄ ≫ k₂l)
@@ -470,10 +471,10 @@ end IsFiltered
 -/
 class IsCofilteredOrEmpty : Prop where
   /-- for every pair of objects there exists another object "to the left" -/
-  cone_objs : ∀ X Y : C, ∃ (W : _)(_ : W ⟶ X)(_ : W ⟶ Y), True
+  cone_objs : ∀ X Y : C, ∃ (W : _) (_ : W ⟶ X) (_ : W ⟶ Y), True
   /-- for every pair of parallel morphisms there exists a morphism to the left
     so the compositions are equal -/
-  cone_maps : ∀ ⦃X Y : C⦄ (f g : X ⟶ Y), ∃ (W : _)(h : W ⟶ X), h ≫ f = h ≫ g
+  cone_maps : ∀ ⦃X Y : C⦄ (f g : X ⟶ Y), ∃ (W : _) (h : W ⟶ X), h ≫ f = h ≫ g
 #align category_theory.is_cofiltered_or_empty CategoryTheory.IsCofilteredOrEmpty
 
 /-- A category `IsCofiltered` if
@@ -537,11 +538,11 @@ variable [IsCofilteredOrEmpty C]
 -- porting note: the following definitions were removed because the names are invalid,
 -- direct references to `IsCofilteredOrEmpty` have been added instead
 --
---theorem cone_objs : ∀ X Y : C, ∃ (W : _)(f : W ⟶ X)(g : W ⟶ Y), True :=
+--theorem cone_objs : ∀ X Y : C, ∃ (W : _) (f : W ⟶ X) (g : W ⟶ Y), True :=
 --  IsCofilteredOrEmpty.cone_objs
 --#align category_theory.is_cofiltered.cone_objs CategoryTheory.IsCofiltered.cone_objs
 --
---theorem cone_maps : ∀ ⦃X Y : C⦄ (f g : X ⟶ Y), ∃ (W : _)(h : W ⟶ X), h ≫ f = h ≫ g :=
+--theorem cone_maps : ∀ ⦃X Y : C⦄ (f g : X ⟶ Y), ∃ (W : _) (h : W ⟶ X), h ≫ f = h ≫ g :=
 --  IsCofilteredOrEmpty.cone_maps
 --#align category_theory.is_cofiltered.cone_maps CategoryTheory.IsCofiltered.cone_maps
 
@@ -596,7 +597,7 @@ theorem eq_condition {j j' : C} (f f' : j ⟶ j') : eqHom f f' ≫ f = eqHom f f
 /-- For every cospan `j ⟶ i ⟵ j'`,
  there exists a cone `j ⟵ k ⟶ j'` such that the square commutes. -/
 theorem cospan {i j j' : C} (f : j ⟶ i) (f' : j' ⟶ i) :
-    ∃ (k : C)(g : k ⟶ j)(g' : k ⟶ j'), g ≫ f = g' ≫ f' :=
+    ∃ (k : C) (g : k ⟶ j) (g' : k ⟶ j'), g ≫ f = g' ≫ f' :=
   let ⟨K, G, G', _⟩ := IsCofilteredOrEmpty.cone_objs j j'
   let ⟨k, e, he⟩ := IsCofilteredOrEmpty.cone_maps (G ≫ f) (G' ≫ f')
   ⟨k, e ≫ G, e ≫ G', by simpa only [Category.assoc] using he⟩
@@ -631,7 +632,7 @@ theorem inf_objs_exists (O : Finset C) : ∃ S : C, ∀ {X}, X ∈ O → _root_.
     · exact ⟨minToRight _ _ ≫ (w' (Finset.mem_of_mem_insert_of_ne mY h)).some⟩
 #align category_theory.is_cofiltered.inf_objs_exists CategoryTheory.IsCofiltered.inf_objs_exists
 
-variable (O : Finset C) (H : Finset (Σ'(X Y : C)(_ : X ∈ O)(_ : Y ∈ O), X ⟶ Y))
+variable (O : Finset C) (H : Finset (Σ' (X Y : C) (_ : X ∈ O) (_ : Y ∈ O), X ⟶ Y))
 
 /-- Given any `Finset` of objects `{X, ...}` and
 indexed collection of `Finset`s of morphisms `{f, ...}` in `C`,
@@ -639,9 +640,10 @@ there exists an object `S`, with a morphism `T X : S ⟶ X` from each `X`,
 such that the triangles commute: `T X ≫ f = T Y`, for `f : X ⟶ Y` in the `Finset`.
 -/
 theorem inf_exists :
-    ∃ (S : C)(T : ∀ {X : C}, X ∈ O → (S ⟶ X)),
+    ∃ (S : C) (T : ∀ {X : C}, X ∈ O → (S ⟶ X)),
       ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},
-        (⟨X, Y, mX, mY, f⟩ : Σ'(X Y : C)(_ : X ∈ O)(_ : Y ∈ O), X ⟶ Y) ∈ H → T mX ≫ f = T mY := by
+        (⟨X, Y, mX, mY, f⟩ : Σ' (X Y : C) (_ : X ∈ O) (_ : Y ∈ O), X ⟶ Y) ∈ H →
+          T mX ≫ f = T mY := by
   classical
   induction' H using Finset.induction with h' H' nmf h''
   · obtain ⟨S, f⟩ := inf_objs_exists O
@@ -686,7 +688,7 @@ noncomputable def infTo {X : C} (m : X ∈ O) : inf O H ⟶ X :=
 /-- The triangles consisting of a morphism in `H` and the maps from `inf O H` commute.
 -/
 theorem infTo_commutes {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y}
-    (mf : (⟨X, Y, mX, mY, f⟩ : Σ'(X Y : C)(_ : X ∈ O)(_ : Y ∈ O), X ⟶ Y) ∈ H) :
+    (mf : (⟨X, Y, mX, mY, f⟩ : Σ' (X Y : C) (_ : X ∈ O) (_ : Y ∈ O), X ⟶ Y) ∈ H) :
     infTo O H mX ≫ f = infTo O H mY :=
   (inf_exists O H).choose_spec.choose_spec mX mY mf
 #align category_theory.is_cofiltered.inf_to_commutes CategoryTheory.IsCofiltered.infTo_commutes
@@ -699,7 +701,7 @@ there exists a cone over `F`.
 theorem cone_nonempty (F : J ⥤ C) : _root_.Nonempty (Cone F) := by
   classical
   let O := Finset.univ.image F.obj
-  let H : Finset (Σ'(X Y : C)(_ : X ∈ O)(_ : Y ∈ O), X ⟶ Y) :=
+  let H : Finset (Σ' (X Y : C) (_ : X ∈ O) (_ : Y ∈ O), X ⟶ Y) :=
     Finset.univ.biUnion fun X : J =>
       Finset.univ.biUnion fun Y : J =>
         Finset.univ.image fun f : X ⟶ Y => ⟨F.obj X, F.obj Y, by simp, by simp, F.map f⟩
chore: fix upper/lowercase in comments (#4360)
  • Run a non-interactive version of fix-comments.py on all files.
  • Go through the diff and manually add/discard/edit chunks.
Diff
@@ -42,7 +42,7 @@ of finsets of morphisms.
 
 Furthermore, we give special support for two diagram categories: The `bowtie` and the `tulip`.
 This is because these shapes show up in the proofs that forgetful functors of algebraic categories
-(e.g. `Mon`, `CommRing`, ...) preserve filtered colimits.
+(e.g. `MonCat`, `CommRingCat`, ...) preserve filtered colimits.
 
 All of the above API, except for the `bowtie` and the `tulip`, is also provided for cofiltered
 categories.
chore: Rename to sSup/iSup (#3938)

As discussed on Zulip

Renames

  • supₛsSup
  • infₛsInf
  • supᵢiSup
  • infᵢiInf
  • bsupₛbsSup
  • binfₛbsInf
  • bsupᵢbiSup
  • binfᵢbiInf
  • csupₛcsSup
  • cinfₛcsInf
  • csupᵢciSup
  • cinfᵢciInf
  • unionₛsUnion
  • interₛsInter
  • unionᵢiUnion
  • interᵢiInter
  • bunionₛbsUnion
  • binterₛbsInter
  • bunionᵢbiUnion
  • binterᵢbiInter

Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>

Diff
@@ -286,8 +286,8 @@ theorem cocone_nonempty (F : J ⥤ C) : _root_.Nonempty (Cocone F) := by
   classical
   let O := Finset.univ.image F.obj
   let H : Finset (Σ'(X Y : C)(_ : X ∈ O)(_ : Y ∈ O), X ⟶ Y) :=
-    Finset.univ.bunionᵢ   fun X : J =>
-      Finset.univ.bunionᵢ fun Y : J =>
+    Finset.univ.biUnion   fun X : J =>
+      Finset.univ.biUnion fun Y : J =>
         Finset.univ.image fun f : X ⟶ Y => ⟨F.obj X, F.obj Y, by simp, by simp, F.map f⟩
   obtain ⟨Z, f, w⟩ := sup_exists O H
   refine' ⟨⟨Z, ⟨fun X => f (by simp), _⟩⟩⟩
@@ -295,7 +295,7 @@ theorem cocone_nonempty (F : J ⥤ C) : _root_.Nonempty (Cocone F) := by
   dsimp
   simp only [Category.comp_id]
   apply w
-  simp only [Finset.mem_bunionᵢ, Finset.mem_univ, Finset.mem_image, PSigma.mk.injEq,
+  simp only [Finset.mem_biUnion, Finset.mem_univ, Finset.mem_image, PSigma.mk.injEq,
     true_and, exists_and_left]
   exact ⟨j, rfl, j', g, by simp⟩
 #align category_theory.is_filtered.cocone_nonempty CategoryTheory.IsFiltered.cocone_nonempty
@@ -700,8 +700,8 @@ theorem cone_nonempty (F : J ⥤ C) : _root_.Nonempty (Cone F) := by
   classical
   let O := Finset.univ.image F.obj
   let H : Finset (Σ'(X Y : C)(_ : X ∈ O)(_ : Y ∈ O), X ⟶ Y) :=
-    Finset.univ.bunionᵢ fun X : J =>
-      Finset.univ.bunionᵢ fun Y : J =>
+    Finset.univ.biUnion fun X : J =>
+      Finset.univ.biUnion fun Y : J =>
         Finset.univ.image fun f : X ⟶ Y => ⟨F.obj X, F.obj Y, by simp, by simp, F.map f⟩
   obtain ⟨Z, f, w⟩ := inf_exists O H
   refine' ⟨⟨Z, ⟨fun X => f (by simp), _⟩⟩⟩
@@ -710,7 +710,7 @@ theorem cone_nonempty (F : J ⥤ C) : _root_.Nonempty (Cone F) := by
   simp only [Category.id_comp]
   symm
   apply w
-  simp only [Finset.mem_bunionᵢ, Finset.mem_univ, Finset.mem_image,
+  simp only [Finset.mem_biUnion, Finset.mem_univ, Finset.mem_image,
     PSigma.mk.injEq, true_and, exists_and_left]
   exact ⟨j, rfl, j', g, by simp⟩
 #align category_theory.is_cofiltered.cone_nonempty CategoryTheory.IsCofiltered.cone_nonempty
feat: port CategoryTheory.Functor.Flat (#3703)

Co-authored-by: Kevin Buzzard <k.buzzard@imperial.ac.uk> Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Parcly Taxel <reddeloostw@gmail.com> Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>

Diff
@@ -552,14 +552,14 @@ noncomputable def min (j j' : C) : C :=
   (IsCofilteredOrEmpty.cone_objs j j').choose
 #align category_theory.is_cofiltered.min CategoryTheory.IsCofiltered.min
 
-/-- `min_to_left j j'` is an arbitrary choice of morphism from `min j j'` to `j`,
+/-- `minToLeft j j'` is an arbitrary choice of morphism from `min j j'` to `j`,
 whose existence is ensured by `IsCofiltered`.
 -/
 noncomputable def minToLeft (j j' : C) : min j j' ⟶ j :=
   (IsCofilteredOrEmpty.cone_objs j j').choose_spec.choose
 #align category_theory.is_cofiltered.min_to_left CategoryTheory.IsCofiltered.minToLeft
 
-/-- `min_to_right j j'` is an arbitrary choice of morphism from `min j j'` to `j'`,
+/-- `minToRight j j'` is an arbitrary choice of morphism from `min j j'` to `j'`,
 whose existence is ensured by `IsCofiltered`.
 -/
 noncomputable def minToRight (j j' : C) : min j j' ⟶ j' :=
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
@@ -389,8 +389,8 @@ theorem coeq₃_condition₁ {j₁ j₂ : C} (f g h : j₁ ⟶ j₂) : f ≫ coe
   by simp only [coeq₃Hom, ← Category.assoc, coeq_condition f g]
 #align category_theory.is_filtered.coeq₃_condition₁ CategoryTheory.IsFiltered.coeq₃_condition₁
 
-theorem coeq₃_condition₂ {j₁ j₂ : C} (f g h : j₁ ⟶ j₂) : g ≫ coeq₃Hom f g h = h ≫ coeq₃Hom f g h :=
-  by
+theorem coeq₃_condition₂ {j₁ j₂ : C} (f g h : j₁ ⟶ j₂) :
+    g ≫ coeq₃Hom f g h = h ≫ coeq₃Hom f g h := by
   dsimp [coeq₃Hom]
   slice_lhs 2 4 => rw [← Category.assoc, coeq_condition _ _]
   slice_rhs 2 4 => rw [← Category.assoc, coeq_condition _ _]
chore: tidy various files (#3584)
Diff
@@ -103,8 +103,7 @@ instance (priority := 100) isFiltered_of_semilatticeSup_nonempty (α : Type u) [
 #align category_theory.is_filtered_of_semilattice_sup_nonempty CategoryTheory.isFiltered_of_semilatticeSup_nonempty
 
 instance (priority := 100) isFilteredOrEmpty_of_directed_le (α : Type u) [Preorder α]
-    [IsDirected α (· ≤ ·)] : IsFilteredOrEmpty α
-    where
+    [IsDirected α (· ≤ ·)] : IsFilteredOrEmpty α where
   cocone_objs X Y :=
     let ⟨Z, h1, h2⟩ := exists_ge_ge X Y
     ⟨Z, homOfLE h1, homOfLE h2, trivial⟩
@@ -154,33 +153,33 @@ noncomputable def max (j j' : C) : C :=
   (IsFilteredOrEmpty.cocone_objs j j').choose
 #align category_theory.is_filtered.max CategoryTheory.IsFiltered.max
 
-/-- `left_to_max j j'` is an arbitrary choice of morphism from `j` to `max j j'`,
-whose existence is ensured by `is_filtered`.
+/-- `leftToMax j j'` is an arbitrary choice of morphism from `j` to `max j j'`,
+whose existence is ensured by `IsFiltered`.
 -/
 noncomputable def leftToMax (j j' : C) : j ⟶ max j j' :=
   (IsFilteredOrEmpty.cocone_objs j j').choose_spec.choose
 #align category_theory.is_filtered.left_to_max CategoryTheory.IsFiltered.leftToMax
 
-/-- `right_to_max j j'` is an arbitrary choice of morphism from `j'` to `max j j'`,
-whose existence is ensured by `is_filtered`.
+/-- `rightToMax j j'` is an arbitrary choice of morphism from `j'` to `max j j'`,
+whose existence is ensured by `IsFiltered`.
 -/
 noncomputable def rightToMax (j j' : C) : j' ⟶ max j j' :=
   (IsFilteredOrEmpty.cocone_objs j j').choose_spec.choose_spec.choose
 #align category_theory.is_filtered.right_to_max CategoryTheory.IsFiltered.rightToMax
 
 /-- `coeq f f'`, for morphisms `f f' : j ⟶ j'`, is an arbitrary choice of object
-which admits a morphism `coeq_hom f f' : j' ⟶ coeq f f'` such that
-`coeq_condition : f ≫ coeq_hom f f' = f' ≫ coeq_hom f f'`.
-Its existence is ensured by `is_filtered`.
+which admits a morphism `coeqHom f f' : j' ⟶ coeq f f'` such that
+`coeq_condition : f ≫ coeqHom f f' = f' ≫ coeqHom f f'`.
+Its existence is ensured by `IsFiltered`.
 -/
 noncomputable def coeq {j j' : C} (f f' : j ⟶ j') : C :=
   (IsFilteredOrEmpty.cocone_maps f f').choose
 #align category_theory.is_filtered.coeq CategoryTheory.IsFiltered.coeq
 
-/-- `coeq_hom f f'`, for morphisms `f f' : j ⟶ j'`, is an arbitrary choice of morphism
-`coeq_hom f f' : j' ⟶ coeq f f'` such that
-`coeq_condition : f ≫ coeq_hom f f' = f' ≫ coeq_hom f f'`.
-Its existence is ensured by `is_filtered`.
+/-- `coeqHom f f'`, for morphisms `f f' : j ⟶ j'`, is an arbitrary choice of morphism
+`coeqHom f f' : j' ⟶ coeq f f'` such that
+`coeq_condition : f ≫ coeqHom f f' = f' ≫ coeqHom f f'`.
+Its existence is ensured by `IsFiltered`.
 -/
 noncomputable def coeqHom {j j' : C} (f f' : j ⟶ j') : j' ⟶ coeq f f' :=
   (IsFilteredOrEmpty.cocone_maps f f').choose_spec.choose
@@ -188,7 +187,7 @@ noncomputable def coeqHom {j j' : C} (f f' : j ⟶ j') : j' ⟶ coeq f f' :=
 
 -- porting note: the simp tag has been removed as the linter complained
 /-- `coeq_condition f f'`, for morphisms `f f' : j ⟶ j'`, is the proof that
-`f ≫ coeq_hom f f' = f' ≫ coeq_hom f f'`.
+`f ≫ coeqHom f f' = f' ≫ coeqHom f f'`.
 -/
 @[reassoc]
 theorem coeq_condition {j j' : C} (f f' : j ⟶ j') : f ≫ coeqHom f f' = f' ≫ coeqHom f f' :=
@@ -280,7 +279,7 @@ theorem toSup_commutes {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y}
 
 variable {J : Type v} [SmallCategory J] [FinCategory J]
 
-/-- If we have `is_filtered C`, then for any functor `F : J ⥤ C` with `fin_category J`,
+/-- If we have `IsFiltered C`, then for any functor `F : J ⥤ C` with `FinCategory J`,
 there exists a cocone over `F`.
 -/
 theorem cocone_nonempty (F : J ⥤ C) : _root_.Nonempty (Cocone F) := by
@@ -301,7 +300,7 @@ theorem cocone_nonempty (F : J ⥤ C) : _root_.Nonempty (Cocone F) := by
   exact ⟨j, rfl, j', g, by simp⟩
 #align category_theory.is_filtered.cocone_nonempty CategoryTheory.IsFiltered.cocone_nonempty
 
-/-- An arbitrary choice of cocone over `F : J ⥤ C`, for `fin_category J` and `is_filtered C`.
+/-- An arbitrary choice of cocone over `F : J ⥤ C`, for `FinCategory J` and `IsFiltered C`.
 -/
 noncomputable def cocone (F : J ⥤ C) : Cocone F :=
   (cocone_nonempty F).some
@@ -338,46 +337,46 @@ variable {C}
 variable [IsFilteredOrEmpty C]
 
 /-- `max₃ j₁ j₂ j₃` is an arbitrary choice of object to the right of `j₁`, `j₂` and `j₃`,
-whose existence is ensured by `is_filtered`.
+whose existence is ensured by `IsFiltered`.
 -/
 noncomputable def max₃ (j₁ j₂ j₃ : C) : C :=
   max (max j₁ j₂) j₃
 #align category_theory.is_filtered.max₃ CategoryTheory.IsFiltered.max₃
 
-/-- `first_to_max₃ j₁ j₂ j₃` is an arbitrary choice of morphism from `j₁` to `max₃ j₁ j₂ j₃`,
-whose existence is ensured by `is_filtered`.
+/-- `firstToMax₃ j₁ j₂ j₃` is an arbitrary choice of morphism from `j₁` to `max₃ j₁ j₂ j₃`,
+whose existence is ensured by `IsFiltered`.
 -/
 noncomputable def firstToMax₃ (j₁ j₂ j₃ : C) : j₁ ⟶ max₃ j₁ j₂ j₃ :=
   leftToMax j₁ j₂ ≫ leftToMax (max j₁ j₂) j₃
 #align category_theory.is_filtered.first_to_max₃ CategoryTheory.IsFiltered.firstToMax₃
 
-/-- `second_to_max₃ j₁ j₂ j₃` is an arbitrary choice of morphism from `j₂` to `max₃ j₁ j₂ j₃`,
-whose existence is ensured by `is_filtered`.
+/-- `secondToMax₃ j₁ j₂ j₃` is an arbitrary choice of morphism from `j₂` to `max₃ j₁ j₂ j₃`,
+whose existence is ensured by `IsFiltered`.
 -/
 noncomputable def secondToMax₃ (j₁ j₂ j₃ : C) : j₂ ⟶ max₃ j₁ j₂ j₃ :=
   rightToMax j₁ j₂ ≫ leftToMax (max j₁ j₂) j₃
 #align category_theory.is_filtered.second_to_max₃ CategoryTheory.IsFiltered.secondToMax₃
 
-/-- `third_to_max₃ j₁ j₂ j₃` is an arbitrary choice of morphism from `j₃` to `max₃ j₁ j₂ j₃`,
-whose existence is ensured by `is_filtered`.
+/-- `thirdToMax₃ j₁ j₂ j₃` is an arbitrary choice of morphism from `j₃` to `max₃ j₁ j₂ j₃`,
+whose existence is ensured by `IsFiltered`.
 -/
 noncomputable def thirdToMax₃ (j₁ j₂ j₃ : C) : j₃ ⟶ max₃ j₁ j₂ j₃ :=
   rightToMax (max j₁ j₂) j₃
 #align category_theory.is_filtered.third_to_max₃ CategoryTheory.IsFiltered.thirdToMax₃
 
 /-- `coeq₃ f g h`, for morphisms `f g h : j₁ ⟶ j₂`, is an arbitrary choice of object
-which admits a morphism `coeq₃_hom f g h : j₂ ⟶ coeq₃ f g h` such that
+which admits a morphism `coeq₃Hom f g h : j₂ ⟶ coeq₃ f g h` such that
 `coeq₃_condition₁`, `coeq₃_condition₂` and `coeq₃_condition₃` are satisfied.
-Its existence is ensured by `is_filtered`.
+Its existence is ensured by `IsFiltered`.
 -/
 noncomputable def coeq₃ {j₁ j₂ : C} (f g h : j₁ ⟶ j₂) : C :=
   coeq (coeqHom f g ≫ leftToMax (coeq f g) (coeq g h))
     (coeqHom g h ≫ rightToMax (coeq f g) (coeq g h))
 #align category_theory.is_filtered.coeq₃ CategoryTheory.IsFiltered.coeq₃
 
-/-- `coeq₃_hom f g h`, for morphisms `f g h : j₁ ⟶ j₂`, is an arbitrary choice of morphism
+/-- `coeq₃Hom f g h`, for morphisms `f g h : j₁ ⟶ j₂`, is an arbitrary choice of morphism
 `j₂ ⟶ coeq₃ f g h` such that `coeq₃_condition₁`, `coeq₃_condition₂` and `coeq₃_condition₃`
-are satisfied. Its existence is ensured by `is_filtered`.
+are satisfied. Its existence is ensured by `IsFiltered`.
 -/
 noncomputable def coeq₃Hom {j₁ j₂ : C} (f g h : j₁ ⟶ j₂) : j₂ ⟶ coeq₃ f g h :=
   coeqHom f g ≫
@@ -464,7 +463,7 @@ end SpecialShapes
 
 end IsFiltered
 
-/-- A category `is_cofiltered_or_empty` if
+/-- A category `IsCofilteredOrEmpty` if
 1. for every pair of objects there exists another object "to the left", and
 2. for every pair of parallel morphisms there exists a morphism to the left so the compositions
    are equal.
@@ -477,7 +476,7 @@ class IsCofilteredOrEmpty : Prop where
   cone_maps : ∀ ⦃X Y : C⦄ (f g : X ⟶ Y), ∃ (W : _)(h : W ⟶ X), h ≫ f = h ≫ g
 #align category_theory.is_cofiltered_or_empty CategoryTheory.IsCofilteredOrEmpty
 
-/-- A category `is_cofiltered` if
+/-- A category `IsCofiltered` if
 1. for every pair of objects there exists another object "to the left",
 2. for every pair of parallel morphisms there exists a morphism to the left so the compositions
    are equal, and
@@ -491,8 +490,7 @@ class IsCofiltered extends IsCofilteredOrEmpty C : Prop where
 #align category_theory.is_cofiltered CategoryTheory.IsCofiltered
 
 instance (priority := 100) isCofilteredOrEmpty_of_semilatticeInf (α : Type u) [SemilatticeInf α] :
-    IsCofilteredOrEmpty α
-    where
+    IsCofilteredOrEmpty α where
   cone_objs X Y := ⟨X ⊓ Y, homOfLE inf_le_left, homOfLE inf_le_right, trivial⟩
   cone_maps X Y f g := ⟨X, 𝟙 _, by
     apply ULift.ext
@@ -504,8 +502,7 @@ instance (priority := 100) isCofiltered_of_semilatticeInf_nonempty (α : Type u)
 #align category_theory.is_cofiltered_of_semilattice_inf_nonempty CategoryTheory.isCofiltered_of_semilatticeInf_nonempty
 
 instance (priority := 100) isCofilteredOrEmpty_of_directed_ge (α : Type u) [Preorder α]
-    [IsDirected α (· ≥ ·)] : IsCofilteredOrEmpty α
-    where
+    [IsDirected α (· ≥ ·)] : IsCofilteredOrEmpty α where
   cone_objs X Y :=
     let ⟨Z, hX, hY⟩ := exists_le_le X Y
     ⟨Z, homOfLE hX, homOfLE hY, trivial⟩
@@ -523,8 +520,7 @@ example (α : Type u) [SemilatticeInf α] [OrderBot α] : IsCofiltered α := by
 
 example (α : Type u) [SemilatticeInf α] [OrderTop α] : IsCofiltered α := by infer_instance
 
-instance : IsCofiltered (Discrete PUnit)
-    where
+instance : IsCofiltered (Discrete PUnit) where
   cone_objs X Y := ⟨⟨PUnit.unit⟩, ⟨⟨by trivial⟩⟩, ⟨⟨Subsingleton.elim _ _⟩⟩, trivial⟩
   cone_maps X Y f g := ⟨⟨PUnit.unit⟩, ⟨⟨by trivial⟩⟩, by
     apply ULift.ext
@@ -550,39 +546,39 @@ variable [IsCofilteredOrEmpty C]
 --#align category_theory.is_cofiltered.cone_maps CategoryTheory.IsCofiltered.cone_maps
 
 /-- `min j j'` is an arbitrary choice of object to the left of both `j` and `j'`,
-whose existence is ensured by `is_cofiltered`.
+whose existence is ensured by `IsCofiltered`.
 -/
 noncomputable def min (j j' : C) : C :=
   (IsCofilteredOrEmpty.cone_objs j j').choose
 #align category_theory.is_cofiltered.min CategoryTheory.IsCofiltered.min
 
 /-- `min_to_left j j'` is an arbitrary choice of morphism from `min j j'` to `j`,
-whose existence is ensured by `is_cofiltered`.
+whose existence is ensured by `IsCofiltered`.
 -/
 noncomputable def minToLeft (j j' : C) : min j j' ⟶ j :=
   (IsCofilteredOrEmpty.cone_objs j j').choose_spec.choose
 #align category_theory.is_cofiltered.min_to_left CategoryTheory.IsCofiltered.minToLeft
 
 /-- `min_to_right j j'` is an arbitrary choice of morphism from `min j j'` to `j'`,
-whose existence is ensured by `is_cofiltered`.
+whose existence is ensured by `IsCofiltered`.
 -/
 noncomputable def minToRight (j j' : C) : min j j' ⟶ j' :=
   (IsCofilteredOrEmpty.cone_objs j j').choose_spec.choose_spec.choose
 #align category_theory.is_cofiltered.min_to_right CategoryTheory.IsCofiltered.minToRight
 
 /-- `eq f f'`, for morphisms `f f' : j ⟶ j'`, is an arbitrary choice of object
-which admits a morphism `eq_hom f f' : eq f f' ⟶ j` such that
-`eq_condition : eq_hom f f' ≫ f = eq_hom f f' ≫ f'`.
-Its existence is ensured by `is_cofiltered`.
+which admits a morphism `eqHom f f' : eq f f' ⟶ j` such that
+`eq_condition : eqHom f f' ≫ f = eqHom f f' ≫ f'`.
+Its existence is ensured by `IsCofiltered`.
 -/
 noncomputable def eq {j j' : C} (f f' : j ⟶ j') : C :=
   (IsCofilteredOrEmpty.cone_maps f f').choose
 #align category_theory.is_cofiltered.eq CategoryTheory.IsCofiltered.eq
 
-/-- `eq_hom f f'`, for morphisms `f f' : j ⟶ j'`, is an arbitrary choice of morphism
-`eq_hom f f' : eq f f' ⟶ j` such that
-`eq_condition : eq_hom f f' ≫ f = eq_hom f f' ≫ f'`.
-Its existence is ensured by `is_cofiltered`.
+/-- `eqHom f f'`, for morphisms `f f' : j ⟶ j'`, is an arbitrary choice of morphism
+`eqHom f f' : eq f f' ⟶ j` such that
+`eq_condition : eqHom f f' ≫ f = eqHom f f' ≫ f'`.
+Its existence is ensured by `IsCofiltered`.
 -/
 noncomputable def eqHom {j j' : C} (f f' : j ⟶ j') : eq f f' ⟶ j :=
   (IsCofilteredOrEmpty.cone_maps f f').choose_spec.choose
@@ -590,7 +586,7 @@ noncomputable def eqHom {j j' : C} (f f' : j ⟶ j') : eq f f' ⟶ j :=
 
 -- porting note: the simp tag has been removed as the linter complained
 /-- `eq_condition f f'`, for morphisms `f f' : j ⟶ j'`, is the proof that
-`eq_hom f f' ≫ f = eq_hom f f' ≫ f'`.
+`eqHom f f' ≫ f = eqHom f f' ≫ f'`.
 -/
 @[reassoc]
 theorem eq_condition {j j' : C} (f f' : j ⟶ j') : eqHom f f' ≫ f = eqHom f f' ≫ f' :=
@@ -697,7 +693,7 @@ theorem infTo_commutes {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y}
 
 variable {J : Type w} [SmallCategory J] [FinCategory J]
 
-/-- If we have `is_cofiltered C`, then for any functor `F : J ⥤ C` with `fin_category J`,
+/-- If we have `IsCofiltered C`, then for any functor `F : J ⥤ C` with `FinCategory J`,
 there exists a cone over `F`.
 -/
 theorem cone_nonempty (F : J ⥤ C) : _root_.Nonempty (Cone F) := by
@@ -719,7 +715,7 @@ theorem cone_nonempty (F : J ⥤ C) : _root_.Nonempty (Cone F) := by
   exact ⟨j, rfl, j', g, by simp⟩
 #align category_theory.is_cofiltered.cone_nonempty CategoryTheory.IsCofiltered.cone_nonempty
 
-/-- An arbitrary choice of cone over `F : J ⥤ C`, for `fin_category J` and `is_cofiltered C`.
+/-- An arbitrary choice of cone over `F : J ⥤ C`, for `FinCategory J` and `IsCofiltered C`.
 -/
 noncomputable def cone (F : J ⥤ C) : Cone F :=
   (cone_nonempty F).some
@@ -758,28 +754,24 @@ section Opposite
 
 open Opposite
 
-instance isCofiltered_op_of_isFiltered [IsFiltered C] : IsCofiltered Cᵒᵖ
-    where
+instance isCofiltered_op_of_isFiltered [IsFiltered C] : IsCofiltered Cᵒᵖ where
   cone_objs X Y :=
     ⟨op (IsFiltered.max X.unop Y.unop), (IsFiltered.leftToMax _ _).op,
       (IsFiltered.rightToMax _ _).op, trivial⟩
   cone_maps X Y f g :=
-    ⟨op (IsFiltered.coeq f.unop g.unop), (IsFiltered.coeqHom _ _).op,
-      by
+    ⟨op (IsFiltered.coeq f.unop g.unop), (IsFiltered.coeqHom _ _).op, by
       rw [show f = f.unop.op by simp, show g = g.unop.op by simp, ← op_comp, ← op_comp]
       congr 1
       exact IsFiltered.coeq_condition f.unop g.unop⟩
   Nonempty := ⟨op IsFiltered.Nonempty.some⟩
 #align category_theory.is_cofiltered_op_of_is_filtered CategoryTheory.isCofiltered_op_of_isFiltered
 
-instance isFiltered_op_of_isCofiltered [IsCofiltered C] : IsFiltered Cᵒᵖ
-    where
+instance isFiltered_op_of_isCofiltered [IsCofiltered C] : IsFiltered Cᵒᵖ where
   cocone_objs X Y :=
     ⟨op (IsCofiltered.min X.unop Y.unop), (IsCofiltered.minToLeft X.unop Y.unop).op,
       (IsCofiltered.minToRight X.unop Y.unop).op, trivial⟩
   cocone_maps X Y f g :=
-    ⟨op (IsCofiltered.eq f.unop g.unop), (IsCofiltered.eqHom f.unop g.unop).op,
-      by
+    ⟨op (IsCofiltered.eq f.unop g.unop), (IsCofiltered.eqHom f.unop g.unop).op, by
       rw [show f = f.unop.op by simp, show g = g.unop.op by simp, ← op_comp, ← op_comp]
       congr 1
       exact IsCofiltered.eq_condition f.unop g.unop⟩
feat: port CategoryTheory.Filtered (#2493)

Co-authored-by: ChrisHughes24 <chrishughes24@gmail.com>

Dependencies 2 + 211

212 files ported (99.1%)
86988 lines ported (99.8%)
Show graph

The unported dependencies are