forked from leanprover-community/mathlib4
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExplicit.lean
More file actions
200 lines (164 loc) · 8.37 KB
/
Explicit.lean
File metadata and controls
200 lines (164 loc) · 8.37 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
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
/-
Copyright (c) 2023 Dagur Asgeirsson. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Dagur Asgeirsson, Riccardo Brasca, Filippo A. E. Nuccio
-/
module
public import Mathlib.Condensed.Module
public import Mathlib.Condensed.Equivalence
/-!
# The explicit sheaf condition for condensed sets
We give the following three explicit descriptions of condensed objects:
* `Condensed.ofSheafStonean`: A finite-product-preserving presheaf on `Stonean`.
* `Condensed.ofSheafProfinite`: A finite-product-preserving presheaf on `Profinite`, satisfying
`EqualizerCondition`.
* `Condensed.ofSheafCompHaus`: A finite-product-preserving presheaf on `CompHaus`, satisfying
`EqualizerCondition`.
The property `EqualizerCondition` is defined in
`Mathlib/CategoryTheory/Sites/Coherent/RegularSheaves.lean` and it says that for any effective epi
`X ⟶ B` (in this case that is equivalent to being a continuous surjection), the presheaf `F`
exhibits `F(B)` as the equalizer of the two maps `F(X) ⇉ F(X ×_B X)`.
We also give variants for condensed objects in concrete categories whose forgetful functor
reflects finite limits (resp. products), where it is enough to check the sheaf condition after
postcomposing with the forgetful functor.
-/
@[expose] public section
universe u
open CategoryTheory Limits Opposite Functor Presheaf regularTopology
namespace Condensed
variable {A : Type*} [Category* A]
/-- The condensed object associated to a finite-product-preserving presheaf on `Stonean`. -/
noncomputable def ofSheafStonean
[∀ X, HasLimitsOfShape (StructuredArrow X Stonean.toCompHaus.op) A]
(F : Stonean.{u}ᵒᵖ ⥤ A) [PreservesFiniteProducts F] :
Condensed A :=
StoneanCompHaus.equivalence A |>.functor.obj {
val := F
cond := by
rw [isSheaf_iff_preservesFiniteProducts_of_projective F]
exact ⟨fun _ ↦ inferInstance⟩ }
/--
The condensed object associated to a presheaf on `Stonean` whose postcomposition with the
forgetful functor preserves finite products.
-/
noncomputable def ofSheafForgetStonean
[∀ X, HasLimitsOfShape (StructuredArrow X Stonean.toCompHaus.op) A]
{FA : A → A → Type*} {CA : A → Type*} [∀ X Y, FunLike (FA X Y) (CA X) (CA Y)]
[ConcreteCategory A FA] [ReflectsFiniteProducts (CategoryTheory.forget A)]
(F : Stonean.{u}ᵒᵖ ⥤ A) [PreservesFiniteProducts (F ⋙ CategoryTheory.forget A)] :
Condensed A :=
StoneanCompHaus.equivalence A |>.functor.obj {
val := F
cond := by
apply isSheaf_coherent_of_projective_of_comp F (CategoryTheory.forget A)
rw [isSheaf_iff_preservesFiniteProducts_of_projective]
exact ⟨fun _ ↦ inferInstance⟩ }
/--
The condensed object associated to a presheaf on `Profinite` which preserves finite products and
satisfies the equalizer condition.
-/
noncomputable def ofSheafProfinite
[∀ X, HasLimitsOfShape (StructuredArrow X profiniteToCompHaus.op) A]
(F : Profinite.{u}ᵒᵖ ⥤ A) [PreservesFiniteProducts F]
(hF : EqualizerCondition F) : Condensed A :=
ProfiniteCompHaus.equivalence A |>.functor.obj {
val := F
cond := by
rw [isSheaf_iff_preservesFiniteProducts_and_equalizerCondition F]
exact ⟨⟨fun _ ↦ inferInstance⟩, hF⟩ }
/--
The condensed object associated to a presheaf on `Profinite` whose postcomposition with the
forgetful functor preserves finite products and satisfies the equalizer condition.
-/
noncomputable def ofSheafForgetProfinite
[∀ X, HasLimitsOfShape (StructuredArrow X profiniteToCompHaus.op) A]
{FA : A → A → Type*} {CA : A → Type*} [∀ X Y, FunLike (FA X Y) (CA X) (CA Y)]
[ConcreteCategory A FA] [ReflectsFiniteLimits (CategoryTheory.forget A)]
(F : Profinite.{u}ᵒᵖ ⥤ A) [PreservesFiniteProducts (F ⋙ CategoryTheory.forget A)]
(hF : EqualizerCondition (F ⋙ CategoryTheory.forget A)) :
Condensed A :=
ProfiniteCompHaus.equivalence A |>.functor.obj {
val := F
cond := by
apply isSheaf_coherent_of_hasPullbacks_of_comp F (CategoryTheory.forget A)
rw [isSheaf_iff_preservesFiniteProducts_and_equalizerCondition]
exact ⟨⟨fun _ ↦ inferInstance⟩, hF⟩ }
/--
The condensed object associated to a presheaf on `CompHaus` which preserves finite products and
satisfies the equalizer condition.
-/
noncomputable def ofSheafCompHaus
(F : CompHaus.{u}ᵒᵖ ⥤ A) [PreservesFiniteProducts F]
(hF : EqualizerCondition F) : Condensed A where
val := F
cond := by
rw [isSheaf_iff_preservesFiniteProducts_and_equalizerCondition F]
exact ⟨⟨fun _ ↦ inferInstance⟩, hF⟩
/--
The condensed object associated to a presheaf on `CompHaus` whose postcomposition with the
forgetful functor preserves finite products and satisfies the equalizer condition.
-/
noncomputable def ofSheafForgetCompHaus
{FA : A → A → Type*} {CA : A → Type*} [∀ X Y, FunLike (FA X Y) (CA X) (CA Y)]
[ConcreteCategory A FA] [ReflectsFiniteLimits (CategoryTheory.forget A)]
(F : CompHaus.{u}ᵒᵖ ⥤ A) [PreservesFiniteProducts (F ⋙ CategoryTheory.forget A)]
(hF : EqualizerCondition (F ⋙ CategoryTheory.forget A)) : Condensed A where
val := F
cond := by
apply isSheaf_coherent_of_hasPullbacks_of_comp F (CategoryTheory.forget A)
rw [isSheaf_iff_preservesFiniteProducts_and_equalizerCondition]
exact ⟨⟨fun _ ↦ inferInstance⟩, hF⟩
/-- A condensed object satisfies the equalizer condition. -/
theorem equalizerCondition (X : Condensed A) : EqualizerCondition X.val :=
isSheaf_iff_preservesFiniteProducts_and_equalizerCondition X.val |>.mp X.cond |>.2
/-- A condensed object preserves finite products. -/
noncomputable instance (X : Condensed A) : PreservesFiniteProducts X.val :=
isSheaf_iff_preservesFiniteProducts_and_equalizerCondition X.val |>.mp
X.cond |>.1
/-- A condensed object regarded as a sheaf on `Profinite` preserves finite products. -/
noncomputable instance (X : Sheaf (coherentTopology Profinite.{u}) A) :
PreservesFiniteProducts X.val :=
isSheaf_iff_preservesFiniteProducts_and_equalizerCondition X.val |>.mp
X.cond |>.1
/-- A condensed object regarded as a sheaf on `Profinite` satisfies the equalizer condition. -/
theorem equalizerCondition_profinite (X : Sheaf (coherentTopology Profinite.{u}) A) :
EqualizerCondition X.val :=
isSheaf_iff_preservesFiniteProducts_and_equalizerCondition X.val |>.mp X.cond |>.2
/-- A condensed object regarded as a sheaf on `Stonean` preserves finite products. -/
noncomputable instance (X : Sheaf (coherentTopology Stonean.{u}) A) :
PreservesFiniteProducts X.val :=
isSheaf_iff_preservesFiniteProducts_of_projective X.val |>.mp X.cond
end Condensed
namespace CondensedSet
/-- A `CondensedSet` version of `Condensed.ofSheafStonean`. -/
noncomputable abbrev ofSheafStonean (F : Stonean.{u}ᵒᵖ ⥤ Type (u + 1)) [PreservesFiniteProducts F] :
CondensedSet :=
Condensed.ofSheafStonean F
/-- A `CondensedSet` version of `Condensed.ofSheafProfinite`. -/
noncomputable abbrev ofSheafProfinite (F : Profinite.{u}ᵒᵖ ⥤ Type (u + 1))
[PreservesFiniteProducts F] (hF : EqualizerCondition F) : CondensedSet :=
Condensed.ofSheafProfinite F hF
/-- A `CondensedSet` version of `Condensed.ofSheafCompHaus`. -/
noncomputable abbrev ofSheafCompHaus (F : CompHaus.{u}ᵒᵖ ⥤ Type (u + 1))
[PreservesFiniteProducts F] (hF : EqualizerCondition F) : CondensedSet :=
Condensed.ofSheafCompHaus F hF
end CondensedSet
namespace CondensedMod
variable (R : Type (u + 1)) [Ring R]
/-- A `CondensedMod` version of `Condensed.ofSheafStonean`. -/
noncomputable abbrev ofSheafStonean (F : Stonean.{u}ᵒᵖ ⥤ ModuleCat.{u + 1} R)
[PreservesFiniteProducts F] : CondensedMod R :=
haveI : HasLimitsOfSize.{u, u + 1} (ModuleCat R) :=
hasLimitsOfSizeShrink.{u, u + 1, u + 1, u + 1} _
Condensed.ofSheafStonean F
/-- A `CondensedMod` version of `Condensed.ofSheafProfinite`. -/
noncomputable abbrev ofSheafProfinite (F : Profinite.{u}ᵒᵖ ⥤ ModuleCat.{u + 1} R)
[PreservesFiniteProducts F] (hF : EqualizerCondition F) : CondensedMod R :=
haveI : HasLimitsOfSize.{u, u + 1} (ModuleCat R) :=
hasLimitsOfSizeShrink.{u, u + 1, u + 1, u + 1} _
Condensed.ofSheafProfinite F hF
/-- A `CondensedMod` version of `Condensed.ofSheafCompHaus`. -/
noncomputable abbrev ofSheafCompHaus (F : CompHaus.{u}ᵒᵖ ⥤ ModuleCat.{u + 1} R)
[PreservesFiniteProducts F] (hF : EqualizerCondition F) : CondensedMod R :=
Condensed.ofSheafCompHaus F hF
end CondensedMod