@@ -16,6 +16,10 @@ As `Functor.sections` identify to limits of functors to types
1616be deduced from general results about limits and
1717initial functors, but we provide a more down to earth proof.
1818
19+ We also obtain the dual result that if `F` is final,
20+ then `F.colimitTypePrecomp : (F ⋙ P).ColimitType → P.ColimitType`
21+ is a bijection.
22+
1923-/
2024
2125universe w v₁ v₂ u₁ u₂
@@ -44,22 +48,57 @@ lemma bijective_sectionsPrecomp (F : C ⥤ D) (P : D ⥤ Type w) [F.Initial] :
4448 have h₂ := s₂.property X.hom
4549 dsimp at this h₁ h₂
4650 rw [← h₁, this, h₂]
47- · let X (Y : D) : CostructuredArrow F Y := Classical.arbitrary _
48- let val (Y : D) : P.obj Y := P.map (X Y).hom (t.val (X Y).left)
49- have h (Y : D) (Z : CostructuredArrow F Y) :
50- val Y = P.map Z.hom (t.val Z.left) :=
51- constant_of_preserves_morphisms (α := P.obj Y)
52- (fun (Z : CostructuredArrow F Y) ↦ P.map Z.hom (t.val Z.left)) (by
51+ · have h (Y : D) := constant_of_preserves_morphisms'
52+ (fun (Z : CostructuredArrow F Y) ↦ P.map Z.hom (t.val Z.left)) (by
5353 intro Z₁ Z₂ φ
5454 dsimp
5555 rw [← t.property φ.left]
5656 dsimp
57- rw [← FunctorToTypes.map_comp_apply, CostructuredArrow.w]) _ _
57+ rw [← FunctorToTypes.map_comp_apply, CostructuredArrow.w])
58+ choose val hval using h
5859 refine ⟨⟨val, fun {Y₁ Y₂} f ↦ ?_⟩, ?_⟩
59- · rw [h Y₁ (X Y₁), h Y₂ ((CostructuredArrow.map f).obj (X Y₁))]
60- simp
60+ · let X : CostructuredArrow F Y₁ := Classical.arbitrary _
61+ simp [← hval Y₁ X, ← hval Y₂ ((CostructuredArrow.map f).obj X)]
6162 · ext X : 2
62- simpa using h (F.obj X) (CostructuredArrow.mk (𝟙 _))
63+ simpa using (hval (F.obj X) (CostructuredArrow.mk (𝟙 _))).symm
64+
65+ /-- Given `P : D ⥤ Type w` and `F : C ⥤ D`, this is the obvious map
66+ `(F ⋙ P).ColimitType → P.ColimitType`. -/
67+ def colimitTypePrecomp (F : C ⥤ D) (P : D ⥤ Type w) :
68+ (F ⋙ P).ColimitType → P.ColimitType :=
69+ (F ⋙ P).descColimitType (P.coconeTypes.precomp F)
70+
71+ @[simp]
72+ lemma colimitTypePrecomp_ιColimitType (F : C ⥤ D) {P : D ⥤ Type w}
73+ (i : C) (x : P.obj (F.obj i)) :
74+ colimitTypePrecomp F P ((F ⋙ P).ιColimitType i x) = P.ιColimitType (F.obj i) x :=
75+ rfl
76+
77+ lemma bijective_colimitTypePrecomp (F : C ⥤ D) (P : D ⥤ Type w) [F.Final] :
78+ Function.Bijective (F.colimitTypePrecomp (P := P)) := by
79+ refine ⟨?_, fun x ↦ ?_⟩
80+ · have h (Y : D) := constant_of_preserves_morphisms'
81+ (fun (Z : StructuredArrow Y F) ↦ (F ⋙ P).ιColimitType Z.right ∘ P.map Z.hom) (by
82+ intro Z₁ Z₂ f
83+ ext x
84+ dsimp
85+ rw [← (F ⋙ P).ιColimitType_map f.right, comp_map,
86+ ← FunctorToTypes.map_comp_apply, StructuredArrow.w f])
87+ choose φ hφ using h
88+ let c : P.CoconeTypes :=
89+ { pt := (F ⋙ P).ColimitType
90+ ι Y := φ Y
91+ ι_naturality {Y₁ Y₂} f := by
92+ ext
93+ have X : StructuredArrow Y₂ F := Classical.arbitrary _
94+ rw [← hφ Y₂ X, ← hφ Y₁ ((StructuredArrow.map f).obj X)]
95+ simp }
96+ refine Function.RightInverse.injective (g := (P.descColimitType c)) (fun x ↦ ?_)
97+ obtain ⟨X, x, rfl⟩ := (F ⋙ P).ιColimitType_jointly_surjective x
98+ simp [c, ← hφ (F.obj X) (StructuredArrow.mk (𝟙 _))]
99+ · obtain ⟨X, x, rfl⟩ := P.ιColimitType_jointly_surjective x
100+ let Y : StructuredArrow X F := Classical.arbitrary _
101+ exact ⟨(F ⋙ P).ιColimitType Y.right (P.map Y.hom x), by simp⟩
63102
64103end Functor
65104
0 commit comments