-
Notifications
You must be signed in to change notification settings - Fork 12
/
extend.lean
175 lines (159 loc) Β· 5.98 KB
/
extend.lean
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
import topology.category.Profinite.as_limit
import for_mathlib.Fintype
noncomputable theory
namespace Profinite
open category_theory
open category_theory.limits
universes v u
variables {C : Type u} [category.{v} C] (F : Fintype.{v} β₯€ C)
/-- Change a cone with respect to a morphism from `Profinite`. -/
@[simps]
def change_cone {X Y : Profinite} (f : X βΆ Y) (D : cone (X.fintype_diagram β F)) :
cone (Y.fintype_diagram β F) :=
{ X := D.X,
Ο :=
{ app := Ξ» S, D.Ο.app (S.comap f.continuous) β« F.map (discrete_quotient.map $ le_refl _),
naturality' := begin
rintros I J h,
dsimp,
simp only [category.id_comp, category.assoc],
rw β D.w (hom_of_le $ discrete_quotient.comap_mono _ $ le_of_hom h),
simp only [category.assoc, β F.map_comp, functor.comp_map],
congr' 2,
ext β¨tβ©, refl,
end } } .
-- Assume that C has enough limits.
variable [β X : Profinite, has_limit (X.fintype_diagram β F)]
-- PROJECT: Prove that this is isomorphic to the right Kan extension along `Fintype.to_Profinite`.
/-- Extend a functor `Fintype β₯€ C` to `Profinite`. -/
@[simps]
def extend : Profinite β₯€ C :=
{ obj := Ξ» X, limit (X.fintype_diagram β F),
map := Ξ» X Y f, limit.lift _ (change_cone _ f _),
map_id' := begin
intros X,
ext S,
dsimp,
simp only [limit.lift_Ο, coe_id, change_cone_Ο_app, limit.cone_Ο, category.id_comp],
erw discrete_quotient.map_id,
change _ β« F.map (π _) = _,
rw [F.map_id, category.comp_id],
congr,
exact S.comap_id,
end,
map_comp' := begin
intros X Y Z f g,
ext S,
dsimp,
simp only [limit.lift_Ο, change_cone_Ο_app,
limit.cone_Ο, limit.lift_Ο_assoc, coe_comp, category.assoc, β F.map_comp],
congr,
exact discrete_quotient.map_comp _ _,
end } .
/-- discrete quotients of a finite type has an initial object given by `β₯`. -/
@[simps]
def bot_initial (X : Fintype) :
is_initial (β₯ : discrete_quotient (Fintype.to_Profinite.obj X)) :=
{ desc := Ξ» S, hom_of_le bot_le }
/-- The extension of `F : Fintype β₯€ C` extends `F`. -/
@[simps]
def extend_extends : Fintype.to_Profinite β extend F β
F :=
nat_iso.of_components (Ξ» X, begin
dsimp only [extend, functor.comp_obj],
let Y := Fintype.to_Profinite.obj X,
let D := limit.is_limit (Y.fintype_diagram β F),
let E := limit_of_diagram_initial (bot_initial X) (Y.fintype_diagram β F),
letI : topological_space X := β₯,
let e : Fintype.of (β₯ : discrete_quotient X) β
X :=
Fintype.iso_of_equiv (equiv.of_bijective _ (discrete_quotient.proj_bot_bijective)).symm,
let g := D.cone_point_unique_up_to_iso E,
exact g βͺβ« F.map_iso e,
end) begin
intros X Y f,
letI : topological_space X := β₯,
letI : topological_space Y := β₯,
have hf : continuous f := continuous_bot,
let A := Fintype.to_Profinite.obj X,
let B := Fintype.to_Profinite.obj Y,
dsimp [is_limit.cone_point_unique_up_to_iso, limit_of_diagram_initial],
simp only [change_cone_Ο_app, limit.cone_Ο, limit.lift_Ο_assoc, category.assoc],
let e : (β₯ : discrete_quotient X) βΆ (β₯ : discrete_quotient Y).comap hf :=
hom_of_le bot_le,
erw β limit.w (A.fintype_diagram β F) e,
simp only [category.assoc, β F.map_comp, functor.comp_map],
congr' 2,
simp_rw [β iso.inv_comp_eq, β category.assoc],
symmetry,
rw β iso.comp_inv_eq,
refl,
end .
/-
instance extend_preserves_limit (X : Profinite) : preserves_limit X.diagram (extend F) :=
{ preserves := Ξ» D hD,
let e : X.diagram β extend F β
X.fintype_diagram β F :=
iso_whisker_left _ (extend_extends F),
D' : cone (X.fintype_diagram β F) :=
(cones.postcompose e.hom).obj ((extend F).map_cone D) in
{ lift := Ξ» E, begin
dsimp,
let D'' : cone X.diagram := X.as_limit_cone,
let f' : X βΆ D.X := hD.lift D'',
sorry
end,
fac' := _,
uniq' := _ } }
-/
/-- `extend` is characterized by the fact that it preserves the correct limits and
that its composition with `Profinite.to_Fintype` is the original functor. -/
def extend_unique (G : Profinite β₯€ C)
[β X : Profinite, preserves_limit X.diagram G]
(w : Fintype.to_Profinite β G β
F) : G β
extend F :=
nat_iso.of_components (Ξ» X,
let D := (X.as_limit_cone),
hD := (X.as_limit),
E := G.map_cone D,
hE : is_limit E := preserves_limit.preserves hD,
f : X.diagram β G β
X.fintype_diagram β F := iso_whisker_left _ w,
E' : cone (X.fintype_diagram β F) := (cones.postcompose f.hom).obj E,
hE' : is_limit E' := (is_limit.postcompose_hom_equiv f _).symm hE in
hE'.cone_point_unique_up_to_iso (limit.is_limit _) )
begin
intros A B f,
dsimp [is_limit.postcompose_hom_equiv, is_limit.of_cone_equiv,
is_limit.cone_point_unique_up_to_iso],
ext S,
simp only [βnat_trans.naturality w.hom, limit.lift_Ο, cones.postcompose_obj_Ο,
functor.comp_map, functor.map_cone_Ο_app, change_cone_Ο_app, limit.cone_Ο,
limit.lift_Ο_assoc, whisker_left_app, nat_trans.comp_app, category.assoc],
simp only [β category.assoc, β G.map_comp],
refl,
end
/-- A natural transformation induces a natural transformation on extensions. -/
@[simps]
def extend_nat_trans {F G : Fintype β₯€ C}
[β X : Profinite, has_limit (X.fintype_diagram β F)]
[β X : Profinite, has_limit (X.fintype_diagram β G)]
(Ξ· : F βΆ G) : extend F βΆ extend G :=
{ app := Ξ» X, category_theory.limits.lim_map $ whisker_left _ Ξ· } .
@[simp]
lemma extend_nat_trans_id (F : Fintype β₯€ C)
[β X : Profinite, has_limit (X.fintype_diagram β F)] :
extend_nat_trans (π F) = π _ :=
begin
ext S,
dsimp,
simp,
end
@[simp]
lemma extend_nat_trans_comp {F G H : Fintype β₯€ C}
[β X : Profinite, has_limit (X.fintype_diagram β F)]
[β X : Profinite, has_limit (X.fintype_diagram β G)]
[β X : Profinite, has_limit (X.fintype_diagram β H)]
(Ξ± : F βΆ G) (Ξ² : G βΆ H) :
extend_nat_trans (Ξ± β« Ξ²) = extend_nat_trans Ξ± β« extend_nat_trans Ξ² :=
begin
ext S,
dsimp,
simp,
end
end Profinite