Skip to content

Commit c697341

Browse files
committed
feat(CategoryTheory/Sites): the category of 1-hypercovers up to homotopy (#29551)
We define the category of `1`-hypercovers up to homotopy as the category of `1`-hypercovers where morphisms are considered up to existence of a homotopy. We show that this category is cofiltered if the base category has pullbacks. This category will be used to define a second construction of sheafification by taking certain colimits of multiequalizers over this category.
1 parent 9699f52 commit c697341

File tree

3 files changed

+260
-3
lines changed

3 files changed

+260
-3
lines changed

Mathlib/CategoryTheory/Sites/Hypercover/Homotopy.lean

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,26 @@ Copyright (c) 2025 Christian Merten. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Christian Merten
55
-/
6+
import Mathlib.CategoryTheory.Quotient
67
import Mathlib.CategoryTheory.Sites.Hypercover.One
78

89
/-!
910
# The category of `1`-hypercovers up to homotopy
1011
1112
In this file we define the category of `1`-hypercovers up to homotopy. This is the category of
12-
`1`-hypercovers, but where morphisms are considered up to existence of a homotopy (TODO, Christian).
13+
`1`-hypercovers, but where morphisms are considered up to existence of a homotopy.
1314
1415
## Main definitions
1516
1617
- `CategoryTheory.PreOneHypercover.Homotopy`: A homotopy of refinements `E ⟶ F` is a family of
1718
morphisms `Xᵢ ⟶ Yₐ` where `Yₐ` is a component of the cover of `X_{f(i)} ×[S] X_{g(i)}`.
19+
- `CategoryTheory.GrothendieckTopology.HOneHypercover`: The category of `1`-hypercovers
20+
with respect to a Grothendieck topology and morphisms up to homotopy.
21+
22+
## Main results
23+
24+
- `CategoryTheory.GrothendieckTopology.HOneHypercover.isCofiltered_of_hasPullbacks`: The
25+
category of `1`-hypercovers up to homotopy is cofiltered if `C` has pullbacks.
1826
-/
1927

2028
universe w'' w' w v u
@@ -204,6 +212,49 @@ lemma exists_nonempty_homotopy (f g : E.Hom F) :
204212

205213
end OneHypercover
206214

215+
variable (J S)
216+
217+
/--
218+
Two refinement morphisms of `1`-hypercovers are homotopic if there exists a homotopy between
219+
them.
220+
Note: This is not an equivalence relation, it is not even reflexive!
221+
-/
222+
def OneHypercover.homotopicRel : HomRel (J.OneHypercover S) :=
223+
fun _ _ f g ↦ Nonempty (PreOneHypercover.Homotopy f g)
224+
225+
/-- The category of `1`-hypercovers with refinement morphisms up to homotopy. -/
226+
abbrev HOneHypercover (S : C) := Quotient (OneHypercover.homotopicRel J S)
227+
228+
/-- The canonical projection from `1`-hypercovers to `1`-hypercovers up to homotopy. -/
229+
abbrev OneHypercover.toHOneHypercover (S : C) : J.OneHypercover S ⥤ J.HOneHypercover S :=
230+
Quotient.functor _
231+
232+
lemma _root_.CategoryTheory.PreOneHypercover.Homotopy.map_eq_map {S : C} {E F : J.OneHypercover S}
233+
{f g : E ⟶ F} (H : Homotopy f g) :
234+
(toHOneHypercover J S).map f = (toHOneHypercover J S).map g :=
235+
Quotient.sound _ ⟨H⟩
236+
237+
namespace HOneHypercover
238+
239+
variable {S : C}
240+
241+
instance : Nonempty (J.HOneHypercover S) := ⟨⟨Nonempty.some inferInstance⟩⟩
242+
243+
/-- If `C` has pullbacks, the category of `1`-hypercovers up to homotopy is cofiltered. -/
244+
instance isCofiltered_of_hasPullbacks [HasPullbacks C] : IsCofiltered (J.HOneHypercover S) where
245+
cone_objs {E F} :=
246+
⟨⟨E.1.inter F.1⟩, Quot.mk _ (PreOneHypercover.interFst _ _),
247+
Quot.mk _ (PreOneHypercover.interSnd _ _), ⟨⟩⟩
248+
cone_maps {X Y} f g := by
249+
obtain ⟨(f : X.1 ⟶ Y.1), rfl⟩ := (toHOneHypercover J S).map_surjective f
250+
obtain ⟨(g : X.1 ⟶ Y.1), rfl⟩ := (toHOneHypercover J S).map_surjective g
251+
obtain ⟨W, h, ⟨H⟩⟩ := OneHypercover.exists_nonempty_homotopy f g
252+
use (toHOneHypercover J S).obj W, (toHOneHypercover J S).map h
253+
rw [← Functor.map_comp, ← Functor.map_comp]
254+
exact H.map_eq_map
255+
256+
end HOneHypercover
257+
207258
end GrothendieckTopology
208259

209260
end CategoryTheory

Mathlib/CategoryTheory/Sites/Hypercover/One.lean

Lines changed: 176 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Copyright (c) 2024 Joël Riou. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Joël Riou
55
-/
6+
import Mathlib.CategoryTheory.Sites.Coverage
67
import Mathlib.CategoryTheory.Sites.Sheaf
78
import Mathlib.CategoryTheory.Sites.Hypercover.Zero
89

@@ -23,7 +24,7 @@ identifies to the multiequalizer of suitable maps
2324
2425
-/
2526

26-
universe w' w v u
27+
universe w'' w' w v u
2728

2829
namespace CategoryTheory
2930

@@ -127,6 +128,82 @@ def multifork (F : Cᵒᵖ ⥤ A) :
127128
dsimp
128129
simp only [← F.map_comp, ← op_comp, E.w])
129130

131+
/-- The trivial pre-`1`-hypercover of `S` with a single component `S`. -/
132+
@[simps toPreZeroHypercover I₁ Y p₁ p₂]
133+
def trivial (S : C) : PreOneHypercover.{w} S where
134+
__ := PreZeroHypercover.singleton (𝟙 S)
135+
I₁ _ _ := PUnit
136+
Y _ _ _ := S
137+
p₁ _ _ _ := 𝟙 _
138+
p₂ _ _ _ := 𝟙 _
139+
w _ _ _ := by simp
140+
141+
lemma sieve₀_trivial (S : C) : (trivial S).sieve₀ = ⊤ := by
142+
rw [PreZeroHypercover.sieve₀, Sieve.ofArrows, ← PreZeroHypercover.presieve₀]
143+
simp
144+
145+
@[simp]
146+
lemma sieve₁_trivial {S : C} {W : C} {p : W ⟶ S} :
147+
(trivial S).sieve₁ (i₁ := ⟨⟩) (i₂ := ⟨⟩) p p = ⊤ := by ext; simp
148+
149+
instance : Nonempty (PreOneHypercover.{w} S) := ⟨trivial S⟩
150+
151+
section
152+
153+
/-- Intersection of two pre-`1`-hypercovers. -/
154+
@[simps toPreZeroHypercover I₁ Y p₁ p₂]
155+
noncomputable
156+
def inter (E F : PreOneHypercover S) [∀ i j, HasPullback (E.f i) (F.f j)]
157+
[∀ (i j : E.I₀) (k : E.I₁ i j) (a b : F.I₀) (l : F.I₁ a b),
158+
HasPullback (E.p₁ k ≫ E.f i) (F.p₁ l ≫ F.f a)] :
159+
PreOneHypercover S where
160+
__ := E.toPreZeroHypercover.inter F.toPreZeroHypercover
161+
I₁ i j := E.I₁ i.1 j.1 × F.I₁ i.2 j.2
162+
Y i j k := pullback (E.p₁ k.1 ≫ E.f _) (F.p₁ k.2 ≫ F.f _)
163+
p₁ i j k := pullback.map _ _ _ _ (E.p₁ _) (F.p₁ _) (𝟙 S) (by simp) (by simp)
164+
p₂ i j k := pullback.map _ _ _ _ (E.p₂ _) (F.p₂ _) (𝟙 S) (by simp [E.w]) (by simp [F.w])
165+
w := by simp [E.w]
166+
167+
variable {E} {F : PreOneHypercover S}
168+
169+
lemma sieve₁_inter [HasPullbacks C] {i j : E.I₀ × F.I₀} {W : C}
170+
{p₁ : W ⟶ pullback (E.f i.1) (F.f i.2)}
171+
{p₂ : W ⟶ pullback (E.f j.1) (F.f j.2)}
172+
(w : p₁ ≫ pullback.fst _ _ ≫ E.f _ = p₂ ≫ pullback.fst _ _ ≫ E.f _) :
173+
(inter E F).sieve₁ p₁ p₂ = Sieve.bind
174+
(E.sieve₁ (p₁ ≫ pullback.fst _ _) (p₂ ≫ pullback.fst _ _))
175+
(fun _ f _ ↦ (F.sieve₁ (p₁ ≫ pullback.snd _ _) (p₂ ≫ pullback.snd _ _)).pullback f) := by
176+
ext Y f
177+
let p : W ⟶ pullback ((inter E F).f i) ((inter E F).f j) :=
178+
pullback.lift p₁ p₂ w
179+
refine ⟨fun ⟨k, a, h₁, h₂⟩ ↦ ?_, fun ⟨Z, a, b, ⟨k, e, h₁, h₂⟩, ⟨l, u, u₁, u₂⟩, hab⟩ ↦ ?_⟩
180+
· refine ⟨pullback p ((E.inter F).toPullback k), pullback.lift f a ?_,
181+
pullback.fst _ _, ?_, ?_, ?_⟩
182+
· apply pullback.hom_ext
183+
· apply pullback.hom_ext <;> simp [p, h₁, toPullback]
184+
· apply pullback.hom_ext <;> simp [p, h₂, toPullback]
185+
· refine ⟨k.1, pullback.snd _ _ ≫ pullback.fst _ _, ?_, ?_⟩
186+
· have : p₁ ≫ pullback.fst (E.f i.1) (F.f i.2) = p ≫ pullback.fst _ _ ≫ pullback.fst _ _ := by
187+
simp [p]
188+
simp [this, pullback.condition_assoc, toPullback]
189+
· have : p₂ ≫ pullback.fst (E.f j.1) (F.f j.2) = p ≫ pullback.snd _ _ ≫ pullback.fst _ _ := by
190+
simp [p]
191+
simp [this, pullback.condition_assoc, toPullback]
192+
· exact ⟨k.2, a ≫ pullback.snd _ _, by simp [reassoc_of% h₁], by simp [reassoc_of% h₂]⟩
193+
· simp
194+
· subst hab
195+
refine ⟨(k, l), pullback.lift (a ≫ e) u ?_, ?_, ?_⟩
196+
· simp only [Category.assoc] at u₁
197+
simp [← reassoc_of% h₁, w, ← reassoc_of% u₁, ← pullback.condition]
198+
· apply pullback.hom_ext
199+
· simp [h₁]
200+
· simpa using u₁
201+
· apply pullback.hom_ext
202+
· simp [h₂]
203+
· simpa using u₂
204+
205+
end
206+
130207
section Category
131208

132209
/-- A morphism of pre-`1`-hypercovers of `S` is a family of refinement morphisms commuting
@@ -202,6 +279,51 @@ lemma Hom.mapMultiforkOfIsLimit_ι {E F : PreOneHypercover.{w} S}
202279

203280
end Category
204281

282+
section
283+
284+
variable (F : PreOneHypercover.{w'} S) {G : PreOneHypercover.{w''} S}
285+
[∀ (i : E.I₀) (j : F.I₀), HasPullback (E.f i) (F.f j)]
286+
[∀ (i j : E.I₀) (k : E.I₁ i j) (a b : F.I₀) (l : F.I₁ a b),
287+
HasPullback (E.p₁ k ≫ E.f i) (F.p₁ l ≫ F.f a)]
288+
289+
/-- First projection from the intersection of two pre-`1`-hypercovers. -/
290+
@[simps toHom s₁]
291+
noncomputable
292+
def interFst : (E.inter F).Hom E where
293+
__ := E.toPreZeroHypercover.interFst F.toPreZeroHypercover
294+
s₁ {i j} k := k.1
295+
h₁ _ := pullback.fst _ _
296+
297+
/-- Second projection from the intersection of two pre-`1`-hypercovers. -/
298+
@[simps toHom s₁]
299+
noncomputable
300+
def interSnd : (E.inter F).Hom F where
301+
__ := E.toPreZeroHypercover.interSnd F.toPreZeroHypercover
302+
s₁ {i j} k := k.2
303+
h₁ _ := pullback.snd _ _
304+
305+
variable {E F} in
306+
/-- Universal property of the intersection of two pre-`1`-hypercovers. -/
307+
noncomputable
308+
def interLift {G : PreOneHypercover.{w''} S} (f : G.Hom E) (g : G.Hom F) :
309+
G.Hom (E.inter F) where
310+
__ := PreZeroHypercover.interLift f.toHom g.toHom
311+
s₁ {i j} k := ⟨f.s₁ k, g.s₁ k⟩
312+
h₁ k := pullback.lift (f.h₁ k) (g.h₁ k) <| by
313+
rw [f.w₁₁_assoc k, g.w₁₁_assoc k]
314+
simp
315+
w₀ := by simp
316+
w₁₁ k := by
317+
apply pullback.hom_ext
318+
· simpa using f.w₁₁ k
319+
· simpa using g.w₁₁ k
320+
w₁₂ k := by
321+
apply pullback.hom_ext
322+
· simpa using f.w₁₂ k
323+
· simpa using g.w₁₂ k
324+
325+
end
326+
205327
end PreOneHypercover
206328

207329
namespace GrothendieckTopology
@@ -277,6 +399,47 @@ noncomputable def isLimitMultifork : IsLimit (E.multifork F.1) :=
277399

278400
end
279401

402+
section
403+
404+
variable {S : C}
405+
406+
/-- Forget the `1`-components of a `OneHypercover`. -/
407+
@[simps toPreZeroHypercover]
408+
def toZeroHypercover (E : OneHypercover.{w} J S) : J.toPrecoverage.ZeroHypercover S where
409+
__ := E.toPreZeroHypercover
410+
mem₀ := E.mem₀
411+
412+
variable (J) in
413+
/-- The trivial `1`-hypercover of `S` where a single component `S`. -/
414+
@[simps toPreOneHypercover]
415+
def trivial (S : C) : OneHypercover.{w} J S where
416+
__ := PreOneHypercover.trivial S
417+
mem₀ := by simp only [PreOneHypercover.sieve₀_trivial, J.top_mem]
418+
mem₁ _ _ _ _ _ h := by
419+
simp only [PreOneHypercover.trivial_toPreZeroHypercover, PreZeroHypercover.singleton_X,
420+
PreZeroHypercover.singleton_f, Category.comp_id] at h
421+
subst h
422+
simp
423+
424+
instance (S : C) : Nonempty (J.OneHypercover S) := ⟨trivial J S⟩
425+
426+
/-- Intersection of two `1`-hypercovers. -/
427+
@[simps toPreOneHypercover]
428+
noncomputable
429+
def inter [HasPullbacks C] (E F : J.OneHypercover S)
430+
[∀ (i : E.I₀) (j : F.I₀), HasPullback (E.f i) (F.f j)]
431+
[∀ (i j : E.I₀) (k : E.I₁ i j) (a b : F.I₀) (l : F.I₁ a b),
432+
HasPullback (E.p₁ k ≫ E.f i) (F.p₁ l ≫ F.f a)] : J.OneHypercover S where
433+
__ := E.toPreOneHypercover.inter F.toPreOneHypercover
434+
mem₀ := (E.toZeroHypercover.inter F.toZeroHypercover).mem₀
435+
mem₁ i₁ i₂ W p₁ p₂ h := by
436+
rw [PreOneHypercover.sieve₁_inter h]
437+
refine J.bind_covering (E.mem₁ _ _ _ _ (by simpa using h)) fun _ _ _ ↦ ?_
438+
exact J.pullback_stable _
439+
(F.mem₁ _ _ _ _ (by simpa [Category.assoc, ← pullback.condition]))
440+
441+
end
442+
280443
section Category
281444

282445
variable {S : C} {E : OneHypercover.{w} J S} {F : OneHypercover.{w'} J S}
@@ -285,6 +448,18 @@ variable {S : C} {E : OneHypercover.{w} J S} {F : OneHypercover.{w'} J S}
285448
abbrev Hom (E : OneHypercover.{w} J S) (F : OneHypercover.{w'} J S) :=
286449
E.toPreOneHypercover.Hom F.toPreOneHypercover
287450

451+
@[simps! id_s₀ id_s₁ id_h₀ id_h₁ comp_s₀ comp_s₁ comp_h₀ comp_h₁]
452+
instance : Category (J.OneHypercover S) where
453+
Hom := Hom
454+
id E := PreOneHypercover.Hom.id E.toPreOneHypercover
455+
comp f g := f.comp g
456+
457+
/-- An isomorphism of `1`-hypercovers is an isomorphism of pre-`1`-hypercovers. -/
458+
@[simps]
459+
def isoMk {E F : J.OneHypercover S} (f : E.toPreOneHypercover ≅ F.toPreOneHypercover) :
460+
E ≅ F where
461+
__ := f
462+
288463
end Category
289464

290465
end OneHypercover

Mathlib/CategoryTheory/Sites/Hypercover/Zero.lean

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,9 @@ lemma presieve₀_map : (E.map F).presieve₀ = E.presieve₀.map F :=
231231

232232
end Functoriality
233233

234-
variable {F : PreZeroHypercover.{w'} S} {G : PreZeroHypercover.{w''} S}
234+
section
235+
236+
variable (F : PreZeroHypercover.{w'} S) {G : PreZeroHypercover.{w''} S}
235237

236238
/-- The left inclusion into the disjoint union. -/
237239
@[simps]
@@ -245,6 +247,7 @@ def sumInr : F.Hom (E.sum F) where
245247
s₀ := Sum.inr
246248
h₀ _ := 𝟙 _
247249

250+
variable {E F} in
248251
/-- To give a refinement of the disjoint union, it suffices to give refinements of both
249252
components. -/
250253
@[simps]
@@ -254,6 +257,34 @@ def sumLift (f : E.Hom G) (g : F.Hom G) : (E.sum F).Hom G where
254257
| .inl i => f.h₀ i
255258
| .inr i => g.h₀ i
256259

260+
variable [∀ (i : E.I₀) (j : F.I₀), HasPullback (E.f i) (F.f j)]
261+
262+
/-- First projection from the intersection of two pre-`0`-hypercovers. -/
263+
@[simps]
264+
noncomputable
265+
def interFst : Hom (inter E F) E where
266+
s₀ i := i.1
267+
h₀ _ := pullback.fst _ _
268+
269+
/-- Second projection from the intersection of two pre-`0`-hypercovers. -/
270+
@[simps]
271+
noncomputable
272+
def interSnd : Hom (inter E F) F where
273+
s₀ i := i.2
274+
h₀ _ := pullback.snd _ _
275+
w₀ i := by simp [← pullback.condition]
276+
277+
variable {E F} in
278+
/-- Universal property of the intersection of two pre-`0`-hypercovers. -/
279+
@[simps]
280+
noncomputable
281+
def interLift (f : G.Hom E) (g : G.Hom F) :
282+
G.Hom (E.inter F) where
283+
s₀ i := ⟨f.s₀ i, g.s₀ i⟩
284+
h₀ i := pullback.lift (f.h₀ i) (g.h₀ i) (by simp)
285+
286+
end
287+
257288
end PreZeroHypercover
258289

259290
namespace Precoverage

0 commit comments

Comments
 (0)