Skip to content

Commit 6b45e68

Browse files
committed
refactor(CategoryTheory/Limits): generalize universes for colimits of representables (#27576)
Given a category `C` with `Category.{v₁} C`, this PR introduces a variant of the Yoneda embedding `uliftYoneda.{w} : C ⥤ Cᵒᵖ ⥤ Type (max w v₁) ` which allows considering presheaves with values in higher universes. The study of left Kan extensions along the Yoneda embedding is generalized using this variant. This allows to generalize the definition of the singular set of a simplicial set and the singular homology of a topological space to arbitrary universes. Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>
1 parent 4eba5ed commit 6b45e68

File tree

17 files changed

+682
-378
lines changed

17 files changed

+682
-378
lines changed

Mathlib/AlgebraicTopology/SimplicialSet/StdSimplex.lean

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ namespace SSet
2828
/-- The functor `SimplexCategory ⥤ SSet` which sends `⦋n⦌` to the standard simplex `Δ[n]` is a
2929
cosimplicial object in the category of simplicial sets. (This functor is essentially given by the
3030
Yoneda embedding). -/
31-
def stdSimplex : CosimplicialObject SSet.{u} :=
32-
yoneda ⋙ uliftFunctor
31+
def stdSimplex : CosimplicialObject SSet.{u} := uliftYoneda
3332

3433
@[inherit_doc SSet.stdSimplex]
3534
scoped[Simplicial] notation3 "Δ[" n "]" => SSet.stdSimplex.obj (SimplexCategory.mk n)
@@ -104,7 +103,7 @@ lemma map_apply {m₁ m₂ : SimplexCategoryᵒᵖ} (f : m₁ ⟶ m₂) {n : Sim
104103
/-- The canonical bijection `(stdSimplex.obj n ⟶ X) ≃ X.obj (op n)`. -/
105104
def _root_.SSet.yonedaEquiv {X : SSet.{u}} {n : SimplexCategory} :
106105
(stdSimplex.obj n ⟶ X) ≃ X.obj (op n) :=
107-
yonedaCompUliftFunctorEquiv X n
106+
uliftYonedaEquiv
108107

109108
lemma yonedaEquiv_map {n m : SimplexCategory} (f : n ⟶ m) :
110109
yonedaEquiv.{u} (stdSimplex.map f) = objEquiv.symm f :=

Mathlib/AlgebraicTopology/SingularHomology/Basic.lean

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,35 +18,35 @@ noncomputable section
1818

1919
namespace AlgebraicTopology
2020

21-
open CategoryTheory
21+
open CategoryTheory Limits
2222

2323
universe w v u
2424

25-
variable (C : Type u) [Category.{v} C] [Limits.HasCoproducts.{0} C]
25+
variable (C : Type u) [Category.{v} C] [HasCoproducts.{w} C]
2626
variable [Preadditive C] [CategoryWithHomology C] (n : ℕ)
2727

2828
/--
2929
The singular chain complex associated to a simplicial set, with coefficients in `X : C`.
3030
One can recover the ordinary singular chain complex when `C := Ab` and `X := ℤ`.
3131
-/
32-
def SSet.singularChainComplexFunctor [Limits.HasCoproducts.{w} C] :
32+
def SSet.singularChainComplexFunctor :
3333
C ⥤ SSet.{w} ⥤ ChainComplex C ℕ :=
3434
(Functor.postcompose₂.obj (AlgebraicTopology.alternatingFaceMapComplex _)).obj
35-
(Limits.sigmaConst ⋙ SimplicialObject.whiskering _ _)
35+
(sigmaConst ⋙ SimplicialObject.whiskering _ _)
3636

3737
/-- The singular chain complex functor with coefficients in `C`. -/
3838
def singularChainComplexFunctor :
39-
C ⥤ TopCat.{0} ⥤ ChainComplex C ℕ :=
40-
SSet.singularChainComplexFunctor.{0} C ⋙ (Functor.whiskeringLeft _ _ _).obj TopCat.toSSet
39+
C ⥤ TopCat.{w} ⥤ ChainComplex C ℕ :=
40+
SSet.singularChainComplexFunctor.{w} C ⋙ (Functor.whiskeringLeft _ _ _).obj TopCat.toSSet.{w}
4141

4242
/-- The `n`-th singular homology functor with coefficients in `C`. -/
43-
def singularHomologyFunctor : C ⥤ TopCat.{0} ⥤ C :=
43+
def singularHomologyFunctor : C ⥤ TopCat.{w} ⥤ C :=
4444
singularChainComplexFunctor C ⋙
4545
(Functor.whiskeringRight _ _ _).obj (HomologicalComplex.homologyFunctor _ _ n)
4646

4747
section TotallyDisconnectedSpace
4848

49-
variable (R : C) (X : TopCat.{0}) [TotallyDisconnectedSpace X]
49+
variable (R : C) (X : TopCat.{w}) [TotallyDisconnectedSpace X]
5050

5151
/-- If `X` is totally disconnected,
5252
its singular chain complex is given by `R[X] ←0- R[X] ←𝟙- R[X] ←0- R[X] ⋯`,
@@ -61,23 +61,27 @@ def singularChainComplexFunctorIsoOfTotallyDisconnectedSpace :
6161
AlgebraicTopology.alternatingFaceMapComplexConst.app _
6262

6363
omit [CategoryWithHomology C] in
64-
lemma singularChainComplexFunctor_exactAt_of_totallyDisconnectedSpace [Limits.HasZeroObject C]
64+
lemma singularChainComplexFunctor_exactAt_of_totallyDisconnectedSpace
6565
(hn : n ≠ 0) :
6666
(((singularChainComplexFunctor C).obj R).obj X).ExactAt n :=
67+
have := hasCoproducts_shrink.{0, w} (C := C)
68+
have : HasZeroObject C := ⟨_, initialIsInitial.isZero⟩
6769
.of_iso (ChainComplex.alternatingConst_exactAt _ _ hn)
6870
(singularChainComplexFunctorIsoOfTotallyDisconnectedSpace C R X).symm
6971

7072
lemma isZero_singularHomologyFunctor_of_totallyDisconnectedSpace (hn : n ≠ 0) :
71-
Limits.IsZero (((singularHomologyFunctor C n).obj R).obj X) :=
72-
have : Limits.HasZeroObject C := ⟨_, Limits.initialIsInitial.isZero⟩
73+
IsZero (((singularHomologyFunctor C n).obj R).obj X) :=
74+
have := hasCoproducts_shrink.{0, w} (C := C)
75+
have : HasZeroObject C := ⟨_, initialIsInitial.isZero⟩
7376
(singularChainComplexFunctor_exactAt_of_totallyDisconnectedSpace C n R X hn).isZero_homology
7477

7578
/-- The zeroth singular homology of a totally disconnected space is the
7679
free `R`-module generated by elements of `X`. -/
7780
noncomputable
7881
def singularHomologyFunctorZeroOfTotallyDisconnectedSpace :
7982
((singularHomologyFunctor C 0).obj R).obj X ≅ ∐ fun _ : X ↦ R :=
80-
have : Limits.HasZeroObject C := ⟨_, Limits.initialIsInitial.isZero⟩
83+
have := hasCoproducts_shrink.{0, w} (C := C)
84+
have : HasZeroObject C := ⟨_, initialIsInitial.isZero⟩
8185
(HomologicalComplex.homologyFunctor _ _ 0).mapIso
8286
(singularChainComplexFunctorIsoOfTotallyDisconnectedSpace C R X) ≪≫
8387
ChainComplex.alternatingConstHomologyZero _

Mathlib/AlgebraicTopology/SingularSet.lean

Lines changed: 35 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@ Copyright (c) 2023 Johan Commelin. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Johan Commelin, Kim Morrison, Adam Topaz
55
-/
6-
import Mathlib.AlgebraicTopology.SimplicialSet.Basic
6+
import Mathlib.AlgebraicTopology.SimplicialSet.StdSimplex
77
import Mathlib.AlgebraicTopology.TopologicalSimplex
88
import Mathlib.CategoryTheory.Limits.Presheaf
99
import Mathlib.Topology.Category.TopCat.Limits.Basic
10+
import Mathlib.Topology.Category.TopCat.ULift
1011

1112
/-!
1213
# The singular simplicial set of a topological space and geometric realization of a simplicial set
1314
1415
The *singular simplicial set* `TopCat.toSSet.obj X` of a topological space `X`
15-
has as `n`-simplices the continuous maps `⦋n⦌.toTop → X`.
16+
has `n`-simplices which identify to continuous maps `⦋n⦌.toTop → X`.
1617
Here, `⦋n⦌.toTop` is the standard topological `n`-simplex,
1718
defined as `{ f : Fin (n+1) → ℝ≥0 // ∑ i, f i = 1 }` with its subspace topology.
1819
@@ -27,52 +28,61 @@ It is the left Kan extension of `SimplexCategory.toTop` along the Yoneda embeddi
2728
assigning the geometric realization to a simplicial set.
2829
* `sSetTopAdj : SSet.toTop ⊣ TopCat.toSSet` is the adjunction between these two functors.
2930
30-
## TODO
31+
## TODO (@joelriou)
3132
32-
- Generalize to an adjunction between `SSet.{u}` and `TopCat.{u}` for any universe `u`
3333
- Show that the singular simplicial set is a Kan complex.
34-
- Show the adjunction `sSetTopAdj` is a Quillen adjunction.
34+
- Show the adjunction `sSetTopAdj` is a Quillen equivalence.
3535
3636
-/
3737

38+
universe u
39+
3840
open CategoryTheory
3941

4042
/-- The functor associating the *singular simplicial set* to a topological space.
4143
42-
Let `X` be a topological space.
44+
Let `X : TopCat.{u}` be a topological space.
4345
Then the singular simplicial set of `X`
44-
has as `n`-simplices the continuous maps `⦋n⦌.toTop → X`.
46+
has as `n`-simplices the continuous maps `ULift.{u} ⦋n⦌.toTop → X`.
4547
Here, `⦋n⦌.toTop` is the standard topological `n`-simplex,
4648
defined as `{ f : Fin (n+1) → ℝ≥0 // ∑ i, f i = 1 }` with its subspace topology. -/
47-
noncomputable def TopCat.toSSet : TopCat ⥤ SSet :=
48-
Presheaf.restrictedYoneda SimplexCategory.toTop
49+
noncomputable def TopCat.toSSet : TopCat.{u} ⥤ SSet.{u} :=
50+
Presheaf.restrictedULiftYoneda.{0} SimplexCategory.toTop.{u}
51+
52+
/-- If `X : TopCat.{u}` and `n : SimplexCategoryᵒᵖ`,
53+
then `(toSSet.obj X).obj n` identifies to the type of continuous
54+
maps from the standard simplex `n.unop.toTopObj` to `X`. -/
55+
def TopCat.toSSetObjEquiv (X : TopCat.{u}) (n : SimplexCategoryᵒᵖ) :
56+
(toSSet.obj X).obj n ≃ C(n.unop.toTopObj, X) :=
57+
Equiv.ulift.{0}.trans (ConcreteCategory.homEquiv.trans
58+
(Homeomorph.ulift.continuousMapCongr (.refl _)))
4959

5060
/-- The *geometric realization functor* is
5161
the left Kan extension of `SimplexCategory.toTop` along the Yoneda embedding.
5262
5363
It is left adjoint to `TopCat.toSSet`, as witnessed by `sSetTopAdj`. -/
54-
noncomputable def SSet.toTop : SSet ⥤ TopCat :=
55-
yoneda.leftKanExtension SimplexCategory.toTop
64+
noncomputable def SSet.toTop : SSet.{u} ⥤ TopCat.{u} :=
65+
stdSimplex.{u}.leftKanExtension SimplexCategory.toTop
5666

5767
/-- Geometric realization is left adjoint to the singular simplicial set construction. -/
58-
noncomputable def sSetTopAdj : SSet.toTop ⊣ TopCat.toSSet :=
59-
Presheaf.yonedaAdjunction (yoneda.leftKanExtension SimplexCategory.toTop)
60-
(yoneda.leftKanExtensionUnit SimplexCategory.toTop)
68+
noncomputable def sSetTopAdj : SSet.toTop.{u} ⊣ TopCat.toSSet.{u} :=
69+
Presheaf.uliftYonedaAdjunction
70+
(SSet.stdSimplex.{u}.leftKanExtension SimplexCategory.toTop)
71+
(SSet.stdSimplex.{u}.leftKanExtensionUnit SimplexCategory.toTop)
6172

6273
/-- The geometric realization of the representable simplicial sets agree
6374
with the usual topological simplices. -/
6475
noncomputable def SSet.toTopSimplex :
65-
(yoneda : SimplexCategory ⥤ _) ⋙ SSet.toTop ≅ SimplexCategory.toTop :=
66-
Presheaf.isExtensionAlongYoneda _
76+
SSet.stdSimplex.{u} ⋙ SSet.toTop ≅ SimplexCategory.toTop :=
77+
Presheaf.isExtensionAlongULiftYoneda _
78+
79+
instance : SSet.toTop.{u}.IsLeftKanExtension SSet.toTopSimplex.inv :=
80+
inferInstanceAs (Functor.IsLeftKanExtension _
81+
(SSet.stdSimplex.{u}.leftKanExtensionUnit SimplexCategory.toTop.{u}))
6782

6883
/-- The singular simplicial set of a totally disconnected space is the constant simplicial set. -/
69-
noncomputable
70-
def TopCat.toSSetIsoConst (X : TopCat) [TotallyDisconnectedSpace X] :
84+
noncomputable def TopCat.toSSetIsoConst (X : TopCat.{u}) [TotallyDisconnectedSpace X] :
7185
TopCat.toSSet.obj X ≅ (Functor.const _).obj X :=
72-
.symm <|
73-
NatIso.ofComponents (fun i ↦
74-
{ inv v := v.1 ⟨Pi.single 0 1, show ∑ _, _ = _ by simp⟩
75-
hom x := TopCat.ofHom ⟨fun _ ↦ x, continuous_const⟩
76-
inv_hom_id := types_ext _ _ fun f ↦ TopCat.hom_ext (ContinuousMap.ext
77-
fun j ↦ TotallyDisconnectedSpace.eq_of_continuous (α := i.unop.toTopObj) _ f.1.2 _ _)
78-
hom_inv_id := rfl }) (by intros; ext; rfl)
86+
(NatIso.ofComponents (fun n ↦ Equiv.toIso
87+
((TotallyDisconnectedSpace.continuousMapEquivOfConnectedSpace _ X).symm.trans
88+
(X.toSSetObjEquiv n).symm))).symm

Mathlib/AlgebraicTopology/TopologicalSimplex.lean

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Authors: Johan Commelin, Adam Topaz
55
-/
66
import Mathlib.Algebra.BigOperators.Ring.Finset
77
import Mathlib.AlgebraicTopology.SimplexCategory.Basic
8-
import Mathlib.Topology.Category.TopCat.Basic
8+
import Mathlib.Topology.Category.TopCat.ULift
99
import Mathlib.Topology.Connected.PathConnected
1010

1111
/-!
@@ -16,6 +16,7 @@ topological `n`-simplex.
1616
This is used to define `TopCat.toSSet` in `AlgebraicTopology.SingularSet`.
1717
-/
1818

19+
universe u
1920

2021
noncomputable section
2122

@@ -97,9 +98,10 @@ theorem continuous_toTopMap {x y : SimplexCategory} (f : x ⟶ y) : Continuous (
9798
dsimp only [coe_toTopMap]
9899
exact continuous_finset_sum _ (fun j _ => (continuous_apply _).comp continuous_subtype_val)
99100

100-
/-- The functor associating the topological `n`-simplex to `⦋n⦌ : SimplexCategory`. -/
101+
/-- The functor `SimplexCategory ⥤ TopCat.{0}`
102+
associating the topological `n`-simplex to `⦋n⦌ : SimplexCategory`. -/
101103
@[simps obj map]
102-
def toTop : SimplexCategory ⥤ TopCat where
104+
def toTop : SimplexCategory ⥤ TopCat.{0} where
103105
obj x := TopCat.of x.toTopObj
104106
map f := TopCat.ofHom ⟨toTopMap f, by fun_prop⟩
105107
map_id := by
@@ -117,4 +119,10 @@ def toTop : SimplexCategory ⥤ TopCat where
117119
· tauto
118120
· apply Set.pairwiseDisjoint_filter
119121

122+
/-- The functor `SimplexCategory ⥤ TopCat.{u}`
123+
associating the topological `n`-simplex to `⦋n⦌ : SimplexCategory`. -/
124+
@[simps! obj map, pp_with_univ]
125+
def toTop : SimplexCategory ⥤ TopCat.{u} :=
126+
toTop₀ ⋙ TopCat.uliftFunctor
127+
120128
end SimplexCategory

Mathlib/CategoryTheory/Closed/Types.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ instance {C : Type v₁} [SmallCategory C] : CartesianClosed (C ⥤ Type v₁) :
4747
(fun F => by
4848
haveI : ∀ X : Type v₁, PreservesColimits (tensorLeft X) := by infer_instance
4949
letI : PreservesColimits (tensorLeft F) := ⟨by infer_instance⟩
50-
have := Presheaf.isLeftAdjoint_of_preservesColimits (tensorLeft F)
50+
have := Presheaf.isLeftAdjoint_of_preservesColimits.{v₁} (tensorLeft F)
5151
exact Exponentiable.mk _ _ (Adjunction.ofIsLeftAdjoint (tensorLeft F)))
5252

5353
-- TODO: once we have `MonoidalClosed` instances for functor categories into general monoidal

Mathlib/CategoryTheory/Elements.lean

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,32 @@ def costructuredArrowYonedaEquivalenceInverseπ (F : Cᵒᵖ ⥤ Type v) :
266266
(costructuredArrowYonedaEquivalence F).inverse ⋙ (π F).leftOp ≅ CostructuredArrow.proj _ _ :=
267267
Iso.refl _
268268

269+
/-- The opposite of the category of elements of a presheaf of types
270+
is equivalent to a category of costructured arrows for the Yoneda embedding functor. -/
271+
@[simps]
272+
def costructuredArrowULiftYonedaEquivalence (F : Cᵒᵖ ⥤ Type max w v) :
273+
F.Elementsᵒᵖ ≌ CostructuredArrow uliftYoneda.{w} F where
274+
functor :=
275+
{ obj x := CostructuredArrow.mk (uliftYonedaEquiv.{w}.symm x.unop.2)
276+
map f := CostructuredArrow.homMk f.1.1.unop (by
277+
dsimp
278+
rw [← uliftYonedaEquiv_symm_map, map_snd]) }
279+
inverse :=
280+
{ obj X := op (F.elementsMk _ (uliftYonedaEquiv.{w} X.hom))
281+
map f := (homMk _ _ f.left.op (by
282+
dsimp
283+
rw [← CostructuredArrow.w f, uliftYonedaEquiv_naturality, Quiver.Hom.unop_op])).op }
284+
unitIso := NatIso.ofComponents (fun x ↦ Iso.op (isoMk _ _ (Iso.refl _) (by simp)))
285+
(fun f ↦ Quiver.Hom.unop_inj (by aesop))
286+
counitIso := NatIso.ofComponents (fun X ↦ CostructuredArrow.isoMk (Iso.refl _))
287+
288+
/-- The equivalence of categories `costructuredArrowULiftYonedaEquivalence`
289+
commutes with the projections. -/
290+
def costructuredArrowULiftYonedaEquivalenceFunctorCompProjIso (F : Cᵒᵖ ⥤ Type max w v) :
291+
(costructuredArrowULiftYonedaEquivalence.{w} F).functor ⋙ CostructuredArrow.proj _ _ ≅
292+
(π F).leftOp :=
293+
Iso.refl _
294+
269295
end CategoryOfElements
270296

271297
namespace Functor

Mathlib/CategoryTheory/Functor/KanExtension/Pointwise.lean

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,15 @@ def isPointwiseLeftKanExtensionAtEquivOfIso' {Y Y' : D} (e : Y ≅ Y') :
225225
namespace IsPointwiseLeftKanExtensionAt
226226

227227
variable {E} {Y : D} (h : E.IsPointwiseLeftKanExtensionAt Y)
228-
[HasColimit (CostructuredArrow.proj L Y ⋙ F)]
228+
229+
@[reassoc]
230+
lemma comp_homEquiv_symm {Z : H}
231+
(φ : CostructuredArrow.proj L Y ⋙ F ⟶ (Functor.const _).obj Z)
232+
(g : CostructuredArrow L Y) :
233+
E.hom.app g.left ≫ E.right.map g.hom ≫ h.homEquiv.symm φ = φ.app g := by
234+
simpa using h.ι_app_homEquiv_symm φ g
235+
236+
variable [HasColimit (CostructuredArrow.proj L Y ⋙ F)]
229237

230238
/-- A pointwise left Kan extension of `F` along `L` applied to an object `Y` is isomorphic to
231239
`colimit (CostructuredArrow.proj L Y ⋙ F)`. -/

Mathlib/CategoryTheory/Limits/IsLimit.lean

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,17 @@ def homEquiv (h : IsLimit t) {W : C} : (W ⟶ t.pt) ≃ ((Functor.const J).obj W
360360
left_inv f := h.hom_ext (by simp)
361361
right_inv π := by cat_disch
362362

363+
@[reassoc (attr := simp)]
364+
lemma homEquiv_symm_π_app (h : IsLimit t) {W : C}
365+
(f : (const J).obj W ⟶ F) (j : J) :
366+
h.homEquiv.symm f ≫ t.π.app j = f.app j := by
367+
simp [homEquiv]
368+
369+
lemma homEquiv_symm_naturality (h : IsLimit t) {W W' : C}
370+
(f : (const J).obj W ⟶ F) (g : W' ⟶ W) :
371+
h.homEquiv.symm ((Functor.const _).map g ≫ f) = g ≫ h.homEquiv.symm f :=
372+
h.homEquiv.injective (by aesop)
373+
363374
/-- The universal property of a limit cone: a map `W ⟶ X` is the same as
364375
a cone on `F` with cone point `W`. -/
365376
def homIso (h : IsLimit t) (W : C) : ULift.{u₁} (W ⟶ t.pt : Type v₃) ≅ (const J).obj W ⟶ F :=
@@ -827,6 +838,17 @@ def homEquiv (h : IsColimit t) {W : C} : (t.pt ⟶ W) ≃ (F ⟶ (const J).obj W
827838
lemma homEquiv_apply (h : IsColimit t) {W : C} (f : t.pt ⟶ W) :
828839
h.homEquiv f = (t.extend f).ι := rfl
829840

841+
@[reassoc (attr := simp)]
842+
lemma ι_app_homEquiv_symm (h : IsColimit t) {W : C}
843+
(f : F ⟶ (const J).obj W) (j : J) :
844+
t.ι.app j ≫ h.homEquiv.symm f = f.app j := by
845+
simp [homEquiv]
846+
847+
lemma homEquiv_symm_naturality (h : IsColimit t) {W W' : C}
848+
(f : F ⟶ (const J).obj W) (g : W ⟶ W') :
849+
h.homEquiv.symm (f ≫ (Functor.const _).map g) = h.homEquiv.symm f ≫ g :=
850+
h.homEquiv.injective (by aesop)
851+
830852
/-- The universal property of a colimit cocone: a map `X ⟶ W` is the same as
831853
a cocone on `F` with cone point `W`. -/
832854
def homIso (h : IsColimit t) (W : C) : ULift.{u₁} (t.pt ⟶ W : Type v₃) ≅ F ⟶ (const J).obj W :=

Mathlib/CategoryTheory/Limits/Preserves/FunctorCategory.lean

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ Authors: Bhavik Mehta
66
import Mathlib.CategoryTheory.Limits.FunctorCategory.Basic
77
import Mathlib.CategoryTheory.Limits.Preserves.Shapes.BinaryProducts
88
import Mathlib.CategoryTheory.Limits.Preserves.Finite
9-
import Mathlib.CategoryTheory.Limits.Yoneda
9+
import Mathlib.CategoryTheory.Limits.Preserves.Ulift
1010
import Mathlib.CategoryTheory.Limits.Presheaf
11+
import Mathlib.CategoryTheory.Limits.Yoneda
1112

1213
/-!
1314
# Preservation of (co)limits in the functor category
@@ -190,9 +191,10 @@ instance whiskeringRightPreservesColimits {C : Type*} [Category C] {D : Type*} [
190191
/-- If `Lan F.op : (Cᵒᵖ ⥤ Type*) ⥤ (Dᵒᵖ ⥤ Type*)` preserves limits of shape `J`, so will `F`. -/
191192
lemma preservesLimit_of_lan_preservesLimit {C D : Type u} [SmallCategory C]
192193
[SmallCategory D] (F : C ⥤ D) (J : Type u) [SmallCategory J]
193-
[PreservesLimitsOfShape J (F.op.lan : _ ⥤ Dᵒᵖ ⥤ Type u)] : PreservesLimitsOfShape J F := by
194-
apply @preservesLimitsOfShape_of_reflects_of_preserves _ _ _ _ _ _ _ _ F yoneda ?_
195-
exact preservesLimitsOfShape_of_natIso (Presheaf.compYonedaIsoYonedaCompLan F).symm
194+
[PreservesLimitsOfShape J (F.op.lan : _ ⥤ Dᵒᵖ ⥤ Type u)] : PreservesLimitsOfShape J F :=
195+
letI := preservesLimitsOfShape_of_natIso (J := J)
196+
(Presheaf.compULiftYonedaIsoULiftYonedaCompLan.{u} F).symm
197+
preservesLimitsOfShape_of_reflects_of_preserves F uliftYoneda.{u}
196198

197199
/-- `F : C ⥤ D ⥤ E` preserves finite limits if it does for each `d : D`. -/
198200
lemma preservesFiniteLimits_of_evaluation {D : Type*} [Category D] {E : Type*} [Category E]

0 commit comments

Comments
 (0)