@@ -5,6 +5,16 @@ import Mathlib
55open CategoryTheory Limits TopologicalSpace Compacts Opposite Functor Pseudofunctor.StrongTrans
66
77universe u1 u2 u3 u4 v1 v2 v3 v4
8+
9+ @[simps]
10+ def CategoryTheory.Functor.ofCatHom {C D : Cat} : (C ⟶ D) ⥤ (C.1 ⥤ D.1 ) where
11+ obj F := F.toFunctor
12+ map {F G} τ := τ.toNatTrans
13+
14+ #check ofCatHom.mapIso
15+
16+
17+
818namespace CategoryTheory.Bicategory
919variable {B C : Type *} [Bicategory B] [Bicategory C]
1020variable {F : B ⥤ᵖ C}
@@ -73,9 +83,30 @@ def Cocone.whisker {D : Type*} [Bicategory D] (E : D ⥤ᵖ B) (c : Cocone F) :
7383variable {B : Type u1 } [Category.{v1, u1} B]
7484variable {I : LocallyDiscrete B ⥤ᵖ Cat.{v2, u2}} (c : Cocone I)
7585
86+
87+ def Cocone.ιF (b : B): I.obj ⟨b⟩ ⥤ c.pt := (c.ι.app ⟨b⟩).toFunctor
88+
89+ @[simps!]
90+ def Cocone.wF {a b : B} ( f : a ⟶ b) : (I.map ⟨f⟩).toFunctor ⋙ c.ιF b ≅ c.ιF a := Functor.ofCatHom.mapIso (c.ι.naturality ⟨f⟩)
91+
92+ #check c.ι.naturality_id
93+
94+ set_option backward.isDefEq.respectTransparency false in
95+ @[simp]
96+ lemma Cocone.idF (b : B) : c.wF (𝟙 b) = isoWhiskerRight (Functor.ofCatHom.mapIso (I.mapId ⟨b⟩)) (c.ιF b) ≪≫ Functor.leftUnitor (c.ιF b) := by
97+ ext x
98+ simpa using funext_iff.1 (NatTrans.ext_iff.1 (Cat.Hom₂.ext_iff.1 (c.ι.naturality_id ⟨b⟩))) x
99+
100+ set_option backward.isDefEq.respectTransparency false in
101+ @[simp]
102+ lemma Cocone.compF {a b d : B} (f : a ⟶ b) (g : b ⟶ d) : c.wF (f ≫ g) = (isoWhiskerRight (ofCatHom.mapIso (I.mapComp ⟨f⟩ ⟨g⟩)) (c.ιF d) ≪≫ (I.map ⟨f⟩).toFunctor.isoWhiskerLeft (c.wF g)) ≪≫ c.wF f := by
103+ ext x
104+ simpa using funext_iff.1 (NatTrans.ext_iff.1 (Cat.Hom₂.ext_iff.1 (c.ι.naturality_comp ⟨f⟩ ⟨g⟩))) x
105+
106+
76107set_option backward.isDefEq.respectTransparency false in
77108@[simps]
78- def truc : I.Grothendieck ⥤ c.pt where
109+ def Cocone.fromGrothendieck : I.Grothendieck ⥤ c.pt where
79110 obj g := (c.ι.app ⟨g.1 ⟩).toFunctor.obj g.2
80111 map {g h} f := (c.ι.naturality f.1 .toLoc).inv.toNatTrans.app g.2 ≫ (c.ι.app ⟨h.1 ⟩).toFunctor.map f.2
81112 map_id x := by
@@ -87,38 +118,24 @@ def truc : I.Grothendieck ⥤ c.pt where
87118 rw [this]
88119 simp
89120 map_comp {x y z } f g:= by
90-
91- suffices (c.ι.app { as := z.base }).toFunctor.map (f ≫ g).fiber = (c.ι.naturality (f ≫ g).base.toLoc).hom.toNatTrans.app x.fiber ≫ ?_ by
121+ suffices (c.ι.app { as := z.base }).toFunctor.map (f ≫ g).fiber = (c.ι.naturality (f.1 .toLoc ≫ g.1 .toLoc)).hom.toNatTrans.app x.fiber ≫ ?_ by
92122 rw [this, ← Category.assoc]
93123 simp
94124 rfl
95-
96- let h := c.ι.naturality_comp f.1 .toLoc g.1 .toLoc
97- --let h := NatTrans.ext_iff.1 (Cat.Hom₂.ext_iff.1 (c.ι.naturality_comp f.1.toLoc g.1.toLoc))
98-
125+ let h := funext_iff.1 (NatTrans.ext_iff.1 (Cat.Hom₂.ext_iff.1 (c.ι.naturality_comp f.1 .toLoc g.1 .toLoc))) x.fiber
99126 simp at h
100-
101- have : (c.ι.naturality (f.base.toLoc ≫ g.base.toLoc)).hom = ?_ ≫ (α_ (c.ι.app { as := x.base }) (𝟙 c.pt) (𝟙 c.pt)).inv≫ (ρ_ (c.ι.app { as := x.base } ≫ 𝟙 c.pt)).hom := by
102- --simpa using h
103- sorry
104-
105- --rw [← h]
106- sorry
107- sorry
127+ rw [h]
128+ simp
108129
109130instance : IsCofilteredOrEmpty I.Grothendieck where
110131 cone_objs d1 d2 := by
111132
112-
113-
114-
115133 sorry
116134 cone_maps d1 d2 f1 f2 := by
117135
118-
119136 sorry
120137
121- instance : (truc c) .Initial := by
138+ instance : c.fromGrothendieck .Initial := by
122139 rw [Functor.initial_iff_of_isCofiltered]
123140 constructor
124141 · intro d
@@ -137,37 +154,81 @@ variable (F : c.pt ⟶ D)
137154#check Bicategory.Cocone.extend c
138155
139156set_option backward.isDefEq.respectTransparency false in
140- lemma hey : truc (c.extend F) = truc c ⋙ F.toFunctor := Functor.ext (by simp) (by simp)
157+ lemma hey : (c.extend F).fromGrothendieck = c.fromGrothendieck ⋙ F.toFunctor := Functor.ext (by simp) (by simp)
158+
159+
160+ variable [HasColimitsOfSize.{v2, u2} c.pt]
141161
142162set_option backward.isDefEq.respectTransparency false in
143163@[simps]
144164noncomputable def CoconeFunctor.colim [HasColimitsOfSize.{v2, u2} c.pt] : B ⥤ c.pt where
145- obj a := colimit (c.ι.app ⟨a⟩).toFunctor
146- map {a b} f := by
147- have : HasColimit.{v2, u2} (c.ι.app { as := b }).toFunctor := by
148- sorry
149- have : HasColimit ((I.map { as := f }).toFunctor ⋙ (c.ι.app { as := b }).toFunctor) := by sorry
150-
151- #check I.map
165+ obj b := colimit (c.ιF b)
166+ map {a b} f := (HasColimit.isoOfNatIso (c.wF f).symm).hom ≫ colimit.pre (c.ιF b) (I.map ⟨f⟩).toFunctor
167+ map_id b := by
168+ ext x
169+ simp
170+ forceColimW
171+ map_comp {a b d} f g := by
172+ ext x
173+ simp
174+ apply whisker_eq
175+ apply whisker_eq
176+ forceColimW
152177
153- refine ?_ ≫ colimit.pre (c.ι.app ⟨b⟩).toFunctor (I.map ⟨f⟩).toFunctor
178+ variable [HasColimitsOfSize.{v1, u1} c.pt] [HasColimitsOfSize.{max v1 v2, max u1 u2} c.pt]
154179
180+ set_option backward.isDefEq.respectTransparency false in
181+ @[simps]
182+ noncomputable def bidule : Limits.Cocone (Cocone.fromGrothendieck c) where
183+ pt := colimit (CoconeFunctor.colim c)
184+ ι.app x := colimit.ι (c.ιF x.1 ) x.2 ≫ colimit.ι (CoconeFunctor.colim c) x.1
185+ ι.naturality {x y } f := by
186+ simp
187+ sorry
155188
189+ set_option backward.isDefEq.respectTransparency false in
190+ @[simps]
191+ def machin (s : Limits.Cocone (Cocone.fromGrothendieck c)) (b : B) : Limits.Cocone (c.ιF b) where
192+ pt := s.pt
193+ ι.app x := s.ι.app ⟨b,x⟩
194+ ι.naturality x y f:= by
195+ have : ?_ = s.ι.app { base := b, fiber := x } := by simpa using s.ι.naturality (⟨𝟙 _, ((I.mapId ⟨b⟩).hom).toNatTrans.app x ≫ f⟩ : (⟨b,x⟩ : I.Grothendieck) ⟶ ⟨b,y⟩)
196+ rw [← this]
197+ suffices (c.ι.naturality (𝟙 { as := b })).hom.toNatTrans.app x = (c.ι.app { as := b }).toFunctor.map ((I.mapId { as := b }).hom.toNatTrans.app x) by
198+ rw [← this]
199+ simp;rfl
200+ simpa using funext_iff.1 (NatTrans.ext_iff.1 ( Cat.Hom₂.ext_iff.1 (c.ι.naturality_id ⟨b⟩))) x
156201
157- apply (HasColimit.isoOfNatIso _ ).hom
202+ set_option backward.isDefEq.respectTransparency false in
203+ @[simps]
204+ noncomputable def machin2 (s : Limits.Cocone (Cocone.fromGrothendieck c)) : Limits.Cocone (CoconeFunctor.colim c) where
205+ pt := s.pt
206+ ι.app b := colimit.desc _ (machin c s b)
207+ ι.naturality {a b} f := by
208+ apply colimit.hom_ext
209+ intro x
158210
211+ let h : (⟨a, x⟩ : I.Grothendieck) ⟶ ⟨b, (I.map { as := f }).toFunctor.obj x ⟩ := ⟨f, eqToHom rfl⟩
159212
160- --#check (c.ι.naturality ⟨f⟩).symm
161- simp at iso
162- #check Functor.mapIso Cat.Hom.toFunctor
163213
164- #check HasColimit.isoOfNatIso iso
165- sorry --(HasColimit.isoOfNatIso (s.iso f).symm).hom ≫ colimit.pre (sD.i _) (I.map f).toFunctor
166- map_id := sorry
167- map_comp := sorry
214+ let hyp := s.ι.naturality h
215+ simp at hyp
216+ simp [machin]
217+ rw [← hyp]
218+ simp [h];rfl
168219
220+ set_option backward.isDefEq.respectTransparency false in
221+ noncomputable def biduleColimit : IsColimit (bidule c) where
222+ desc s := colimit.desc _ (machin2 c s)
223+ uniq s m hm := by
224+ apply colimit.hom_ext (F := (CoconeFunctor.colim c))
225+ intro b
226+ apply colimit.hom_ext
227+ intro x
228+ simpa using hm ⟨b,x⟩
169229
170230
231+ noncomputable def truc : colimit (CoconeFunctor.colim c) ≅ colimit (Cocone.fromGrothendieck c) := Limits.IsColimit.coconePointUniqueUpToIso (biduleColimit c) (Limits.colimit.isColimit _)
171232
172233end CategoryTheory.Bicategory
173234
0 commit comments