forked from leanprover-community/mathlib4
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathEpi.lean
More file actions
149 lines (114 loc) · 5.89 KB
/
Copy pathEpi.lean
File metadata and controls
149 lines (114 loc) · 5.89 KB
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
/-
Copyright (c) 2024 Dagur Asgeirsson. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Dagur Asgeirsson
-/
module
public import Mathlib.CategoryTheory.Limits.Shapes.SequentialProduct
public import Mathlib.CategoryTheory.Sites.Coherent.SequentialLimit
public import Mathlib.Condensed.Light.Functors
public import Mathlib.Condensed.Light.Limits
/-!
# Epimorphisms of light condensed objects
This file characterises epimorphisms in light condensed sets and modules as the locally surjective
morphisms. Here, the condition of locally surjective is phrased in terms of continuous surjections
of light profinite sets.
Further, we prove that the functor `lim : Discrete ℕ ⥤ LightCondMod R` preserves epimorphisms.
-/
public section
universe v u w u' v'
open CategoryTheory Sheaf Limits GrothendieckTopology
namespace LightCondensed
variable (A : Type u') [Category.{v'} A] {FA : A → A → Type*} {CA : A → Type w}
variable [∀ X Y, FunLike (FA X Y) (CA X) (CA Y)] [ConcreteCategory.{w} A FA]
[PreservesFiniteProducts (CategoryTheory.forget A)]
variable {X Y : LightCondensed.{u} A} (f : X ⟶ Y)
lemma isLocallySurjective_iff_locallySurjective_on_lightProfinite : IsLocallySurjective f ↔
∀ (S : LightProfinite) (y : ToType (Y.obj.obj ⟨S⟩)),
(∃ (S' : LightProfinite) (φ : S' ⟶ S) (_ : Function.Surjective φ)
(x : ToType (X.obj.obj ⟨S'⟩)),
f.hom.app ⟨S'⟩ x = Y.obj.map ⟨φ⟩ y) := by
rw [coherentTopology.isLocallySurjective_iff,
regularTopology.isLocallySurjective_iff]
simp_rw [LightProfinite.effectiveEpi_iff_surjective]
end LightCondensed
namespace LightCondSet
variable {X Y : LightCondSet.{u}} (f : X ⟶ Y)
lemma epi_iff_locallySurjective_on_lightProfinite : Epi f ↔
∀ (S : LightProfinite) (y : Y.obj.obj ⟨S⟩),
(∃ (S' : LightProfinite) (φ : S' ⟶ S) (_ : Function.Surjective φ) (x : X.obj.obj ⟨S'⟩),
f.hom.app ⟨S'⟩ x = Y.obj.map ⟨φ⟩ y) := by
rw [← isLocallySurjective_iff_epi']
exact LightCondensed.isLocallySurjective_iff_locallySurjective_on_lightProfinite _ f
end LightCondSet
namespace LightCondMod
variable (R : Type u) [Ring R] {X Y : LightCondMod.{u} R} (f : X ⟶ Y)
lemma epi_iff_locallySurjective_on_lightProfinite : Epi f ↔
∀ (S : LightProfinite) (y : Y.obj.obj ⟨S⟩),
(∃ (S' : LightProfinite) (φ : S' ⟶ S) (_ : Function.Surjective φ) (x : X.obj.obj ⟨S'⟩),
f.hom.app ⟨S'⟩ x = Y.obj.map ⟨φ⟩ y) := by
rw [← isLocallySurjective_iff_epi']
exact LightCondensed.isLocallySurjective_iff_locallySurjective_on_lightProfinite _ f
instance : (LightCondensed.forget R).ReflectsEpimorphisms where
reflects f hf := by
rw [← Sheaf.isLocallySurjective_iff_epi'] at hf ⊢
exact (Presheaf.isLocallySurjective_iff_whisker_forget _ f.hom).mpr hf
instance : (LightCondensed.forget R).PreservesEpimorphisms where
preserves f hf := by
rw [← Sheaf.isLocallySurjective_iff_epi'] at hf ⊢
exact (Presheaf.isLocallySurjective_iff_whisker_forget _ f.hom).mp hf
set_option backward.isDefEq.respectTransparency false in
lemma factorsThru_lightProfinite_epi_of_epi [Epi f]
{S : LightProfinite} (p : (LightCondensed.free R).obj S.toCondensed ⟶ Y) :
∃ (T : LightProfinite) (π : T ⟶ S) (g : ((LightCondensed.free R).obj T.toCondensed) ⟶ X),
Epi π ∧ (lightProfiniteToLightCondSet ⋙ (LightCondensed.free R)).map π ≫ p = g ≫ f := by
have : Epi ((LightCondensed.forget _).map f) := inferInstance
rw [LightCondSet.epi_iff_locallySurjective_on_lightProfinite] at this
obtain ⟨T, π, hπ, x, hx⟩ := this S <| (coherentTopology LightProfinite).yonedaEquiv <|
(LightCondensed.freeForgetAdjunction R).homEquiv S.toCondensed Y p
refine ⟨T, π, ((LightCondensed.freeForgetAdjunction R).homEquiv T.toCondensed X).symm
((coherentTopology LightProfinite).yonedaEquiv.symm x),
(LightProfinite.epi_iff_surjective π).mpr hπ, ?_⟩
rw [Functor.comp_map, ← Adjunction.homEquiv_naturality_left_square_iff
(LightCondensed.freeForgetAdjunction R), Sheaf.hom_ext_iff, Equiv.apply_symm_apply,
GrothendieckTopology.yonedaEquiv_symm_naturality_right, hx,
GrothendieckTopology.map_yonedaEquiv', ← GrothendieckTopology.yonedaEquiv_symm_naturality_right]
rfl
end LightCondMod
namespace LightCondensed
variable (R : Type*) [Ring R]
variable {F : ℕᵒᵖ ⥤ LightCondMod R} {c : Cone F} (hc : IsLimit c)
(hF : ∀ n, Epi (F.map (homOfLE (Nat.le_succ n)).op))
include hc hF in
lemma epi_π_app_zero_of_epi : Epi (c.π.app ⟨0⟩) := by
apply Functor.epi_of_epi_map (forget R)
change Epi (((forget R).mapCone c).π.app ⟨0⟩)
apply coherentTopology.epi_π_app_zero_of_epi
· simp only [LightProfinite.effectiveEpi_iff_surjective]
exact fun x h ↦ Concrete.surjective_π_app_zero_of_surjective_map (limit.isLimit x) h
· have := (freeForgetAdjunction R).isRightAdjoint
exact isLimitOfPreserves _ hc
· exact fun _ ↦ (forget R).map_epi _
end LightCondensed
open CategoryTheory.Limits.SequentialProduct
namespace LightCondensed
variable (n : ℕ)
attribute [local instance] functorMap_epi Abelian.hasFiniteBiproducts
variable {R : Type u} [Ring R] {M N : ℕ → LightCondMod.{u} R} (f : ∀ n, M n ⟶ N n) [∀ n, Epi (f n)]
set_option backward.defeqAttrib.useBackward true in
instance : Epi (Limits.Pi.map f) :=
epi_π_app_zero_of_epi R (isLimit f) (fun n ↦ by
simp only [Nat.succ_eq_add_one, Functor.ofOpSequence_obj, homOfLE_leOfHom,
Functor.ofOpSequence_map_homOfLE_succ]
infer_instance)
set_option backward.defeqAttrib.useBackward true in
instance : (lim (J := Discrete ℕ) (C := LightCondMod R)).PreservesEpimorphisms where
preserves f _ := by
have : lim.map f = (Pi.isoLimit _).inv ≫ Limits.Pi.map (f.app ⟨·⟩) ≫ (Pi.isoLimit _).hom := by
apply limit.hom_ext
intro ⟨n⟩
simp
rw [this]
dsimp
infer_instance
end LightCondensed