Skip to content

Commit

Permalink
feat: another characterization of filtered categories in terms of typ…
Browse files Browse the repository at this point in the history
…e-valued limits (leanprover-community#10665)
  • Loading branch information
TwoFX committed Feb 23, 2024
1 parent 4d0e638 commit 0b05572
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 4 deletions.
4 changes: 4 additions & 0 deletions Mathlib/CategoryTheory/Filtered/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
-/


Expand Down
49 changes: 45 additions & 4 deletions Mathlib/CategoryTheory/Limits/Filtered.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@ Copyright (c) 2022 Markus Himmel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Markus Himmel
-/
import Mathlib.CategoryTheory.Filtered.Basic
import Mathlib.CategoryTheory.Limits.HasLimits
import Mathlib.CategoryTheory.Limits.Types

#align_import category_theory.limits.filtered from "leanprover-community/mathlib"@"e4ee4e30418efcb8cf304ba76ad653aeec04ba6e"

/-!
# Possession of filtered colimits
# Filtered categories and limits
In this file , we show that `C` is filtered if and only if for every functor `F : J ⥤ C` from a
finite category there is some `X : C` such that `lim Hom(F·, X)` is nonempty.
Furthermore, we define the type classes `HasCofilteredLimitsOfSize` and `HasFilteredColimitsOfSize`.
-/


Expand All @@ -21,7 +26,41 @@ open CategoryTheory

variable {C : Type u} [Category.{v} C]

namespace CategoryTheory.Limits
namespace CategoryTheory

section NonemptyLimit

open CategoryTheory.Limits Opposite

/-- `C` is filtered if and only if for every functor `F : J ⥤ C` from a finite category there is
some `X : C` such that `lim Hom(F·, X)` is nonempty.
Lemma 3.1.2 of [Kashiwara2006] -/
theorem IsFiltered.iff_nonempty_limit : IsFiltered C ↔
∀ {J : Type v} [SmallCategory J] [FinCategory J] (F : J ⥤ C),
∃ (X : C), Nonempty (limit (F.op ⋙ yoneda.obj X)) := by
rw [IsFiltered.iff_cocone_nonempty.{v}]
refine ⟨fun h J _ _ F => ?_, fun h J _ _ F => ?_⟩
· obtain ⟨c⟩ := h F
exact ⟨c.pt, ⟨(limitCompYonedaIsoCocone F c.pt).inv c.ι⟩⟩
· obtain ⟨pt, ⟨ι⟩⟩ := h F
exact ⟨⟨pt, (limitCompYonedaIsoCocone F pt).hom ι⟩⟩

/-- `C` is cofiltered if and only if for every functor `F : J ⥤ C` from a finite category there is
some `X : C` such that `lim Hom(X, F·)` is nonempty. -/
theorem IsCofiltered.iff_nonempty_limit : IsCofiltered C ↔
∀ {J : Type v} [SmallCategory J] [FinCategory J] (F : J ⥤ C),
∃ (X : C), Nonempty (limit (F ⋙ coyoneda.obj (op X))) := by
rw [IsCofiltered.iff_cone_nonempty.{v}]
refine ⟨fun h J _ _ F => ?_, fun h J _ _ F => ?_⟩
· obtain ⟨c⟩ := h F
exact ⟨c.pt, ⟨(limitCompCoyonedaIsoCone F c.pt).inv c.π⟩⟩
· obtain ⟨pt, ⟨π⟩⟩ := h F
exact ⟨⟨pt, (limitCompCoyonedaIsoCone F pt).hom π⟩⟩

end NonemptyLimit

namespace Limits

section

Expand Down Expand Up @@ -55,4 +94,6 @@ instance (priority := 100) hasColimitsOfShape_of_has_filtered_colimits
HasFilteredColimitsOfSize.HasColimitsOfShape _
#align category_theory.limits.has_colimits_of_shape_of_has_filtered_colimits CategoryTheory.Limits.hasColimitsOfShape_of_has_filtered_colimits

end CategoryTheory.Limits
end Limits

end CategoryTheory

0 comments on commit 0b05572

Please sign in to comment.