Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 6bac899

Browse files
committed
feat(category_theory/limits/preserves): functor product preserves colims (#4941)
1 parent 154d73d commit 6bac899

1 file changed

Lines changed: 66 additions & 0 deletions

File tree

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
/-
2+
Copyright (c) 2020 Bhavik Mehta. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Bhavik Mehta
5+
-/
6+
import category_theory.limits.presheaf
7+
import category_theory.limits.functor_category
8+
import category_theory.limits.shapes.constructions.preserve_binary_products
9+
10+
/-!
11+
# Preservation of (co)limits in the functor category
12+
13+
Show that if `X ⨯ -` preserves colimits in `D` for any `X : D`, then the product functor `F ⨯ -`
14+
for `F : C ⥤ D` preserves colimits.
15+
16+
The idea of the proof is simply that products and colimits in the functor category are computed
17+
pointwise, so pointwise preservation implies general preservation.
18+
19+
# References
20+
21+
https://ncatlab.org/nlab/show/commutativity+of+limits+and+colimits#preservation_by_functor_categories_and_localizations
22+
23+
-/
24+
25+
universes v₁ v₂ u₁ u₂
26+
27+
noncomputable theory
28+
29+
namespace category_theory
30+
31+
open category limits
32+
33+
variables {C : Type v₂} [category.{v₁} C]
34+
variables {D : Type u₂} [category.{v₂} D]
35+
36+
/--
37+
If `X × -` preserves colimits in `D` for any `X : D`, then the product functor `F ⨯ -` for
38+
`F : C ⥤ D` also preserves colimits.
39+
40+
Note this is (mathematically) a special case of the statement that
41+
"if limits commute with colimits in `D`, then they do as well in `C ⥤ D`"
42+
but the story in Lean is a bit more complex, and this statement isn't directly a special case.
43+
That is, even with a formalised proof of the general statement, there would still need to be some
44+
work to convert to this version: namely, the natural isomorphism
45+
`(evaluation C D).obj k ⋙ prod.functor.obj (F.obj k) ≅ prod.functor.obj F ⋙ (evaluation C D).obj k`
46+
-/
47+
def functor_category.prod_preserves_colimits [has_binary_products D] [has_colimits D]
48+
[∀ (X : D), preserves_colimits (prod.functor.obj X)]
49+
(F : C ⥤ D) :
50+
preserves_colimits (prod.functor.obj F) :=
51+
{ preserves_colimits_of_shape := λ J 𝒥, by exactI
52+
{ preserves_colimit := λ K,
53+
{ preserves := λ c t,
54+
begin
55+
apply evaluation_jointly_reflects_colimits _ (λ k, _),
56+
change is_colimit ((prod.functor.obj F ⋙ (evaluation _ _).obj k).map_cocone c),
57+
let := is_colimit_of_preserves ((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)) t,
58+
apply is_colimit.map_cocone_equiv _ this,
59+
apply (nat_iso.of_components _ _).symm,
60+
{ intro G,
61+
apply as_iso (prod_comparison ((evaluation C D).obj k) F G) },
62+
{ intros G G',
63+
apply prod_comparison_natural ((evaluation C D).obj k) (𝟙 F) },
64+
end } } }
65+
66+
end category_theory

0 commit comments

Comments
 (0)