Skip to content

Commit 3c90d00

Browse files
committed
feat(CategoryTheory/Sites): small 0-hypercovers (#30321)
A `w`-`0`-hypercover `E` is `w'`-small if there exists an indexing type `ι` in `Type w'` and a restriction map `ι → E.I₀` such that the restriction of `E` to `ι` is still covering. This is weaker than `E.I₀` being `w'`-small. For example, every Zariski cover of `X : Scheme.{u}` is `u`-small, because `X` itself suffices as indexing type.
1 parent 5b27418 commit 3c90d00

4 files changed

Lines changed: 116 additions & 7 deletions

File tree

Mathlib/AlgebraicGeometry/Cover/MorphismProperty.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,9 @@ def Cover.ulift (𝒰 : Cover.{v} (precoverage P) X) : Cover.{u} (precoverage P)
238238
refine ⟨fun x ↦ ?_, fun i ↦ 𝒰.map_prop _⟩
239239
use x, (𝒰.exists_eq x).choose_spec.choose, (𝒰.exists_eq x).choose_spec.choose_spec
240240

241+
instance : Precoverage.Small.{u} (precoverage P) where
242+
zeroHypercoverSmall {S} 𝒰 := ⟨S, Cover.idx 𝒰, (Cover.ulift 𝒰).mem₀⟩
243+
241244
section category
242245

243246
-- TODO: replace this by `ZeroHypercover.Hom`

Mathlib/CategoryTheory/MorphismProperty/Local.lean

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ A property of morphisms `P` in `C` is local at the target with respect to the pr
4646
it respects ismorphisms, and:
4747
`P` holds for `f : X ⟶ Y` if and only if it holds for the restrictions of `f` to `Uᵢ` for a
4848
`0`-hypercover `{Uᵢ}` of `Y` in the precoverage `K`.
49+
50+
For a version of `of_zeroHypercover` that takes a `v`-small `0`-hypercover in an arbitrary
51+
universe, use `CategoryTheory.MorphismProperty.of_zeroHypercover_target`.
4952
-/
5053
class IsLocalAtTarget (P : MorphismProperty C) (K : Precoverage C) [K.HasPullbacks]
5154
extends RespectsIso P where
@@ -103,14 +106,23 @@ instance inf (P Q : MorphismProperty C) [IsLocalAtTarget P K] [IsLocalAtTarget Q
103106

104107
end IsLocalAtTarget
105108

106-
alias of_zeroHypercover_target := IsLocalAtTarget.of_zeroHypercover
109+
lemma of_zeroHypercover_target {P : MorphismProperty C} {K : Precoverage C} [K.HasPullbacks]
110+
[P.IsLocalAtTarget K] {X Y : C} {f : X ⟶ Y} (𝒰 : Precoverage.ZeroHypercover.{w} K Y)
111+
[Precoverage.ZeroHypercover.Small.{v} 𝒰] (h : ∀ i, P (pullback.snd f (𝒰.f i))) :
112+
P f := by
113+
rw [IsLocalAtTarget.iff_of_zeroHypercover (P := P) 𝒰.restrictIndexOfSmall]
114+
simp [h]
115+
107116
alias iff_of_zeroHypercover_target := IsLocalAtTarget.iff_of_zeroHypercover
108117

109118
/--
110119
A property of morphisms `P` in `C` is local at the source with respect to the precoverage `K` if
111120
it respects ismorphisms, and:
112121
`P` holds for `f : X ⟶ Y` if and only if it holds for the restrictions of `f` to `Uᵢ` for a
113122
`0`-hypercover `{Uᵢ}` of `X` in the precoverage `K`.
123+
124+
For a version of `of_zeroHypercover` that takes a `v`-small `0`-hypercover in an arbitrary
125+
universe, use `CategoryTheory.MorphismProperty.of_zeroHypercover_source`.
114126
-/
115127
class IsLocalAtSource (P : MorphismProperty C) (K : Precoverage C) extends RespectsIso P where
116128
/-- If `P` holds for `f : X ⟶ Y`, it also holds for `𝒰.f i ≫ f` for any `K`-cover `𝒰` of `X`. -/
@@ -153,7 +165,13 @@ instance inf (P Q : MorphismProperty C) [IsLocalAtSource P K] [IsLocalAtSource Q
153165

154166
end IsLocalAtSource
155167

156-
alias of_zeroHypercover_source := IsLocalAtSource.of_zeroHypercover
168+
lemma of_zeroHypercover_source {P : MorphismProperty C} {K : Precoverage C}
169+
[P.IsLocalAtSource K] {X Y : C} {f : X ⟶ Y} (𝒰 : Precoverage.ZeroHypercover.{w} K X)
170+
[Precoverage.ZeroHypercover.Small.{v} 𝒰] (h : ∀ i, P (𝒰.f i ≫ f)) :
171+
P f := by
172+
rw [IsLocalAtSource.iff_of_zeroHypercover (P := P) 𝒰.restrictIndexOfSmall]
173+
simp [h]
174+
157175
alias iff_of_zeroHypercover_source := IsLocalAtSource.iff_of_zeroHypercover
158176

159177
end MorphismProperty

Mathlib/CategoryTheory/Sites/Hypercover/Zero.lean

Lines changed: 84 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,20 +104,31 @@ def bind (E : PreZeroHypercover.{w} T) (F : ∀ i, PreZeroHypercover.{w'} (E.X i
104104
X ij := (F ij.1).X ij.2
105105
f ij := (F ij.1).f ij.2 ≫ E.f ij.1
106106

107-
/-- Replace the indexing type of a pre-`0`-hypercover. -/
107+
/-- Restrict the indexing type to `ι` by precomposing with a function `ι → E.I₀`. -/
108108
@[simps]
109-
def reindex (E : PreZeroHypercover.{w} T) {ι : Type w'} (e : ι E.I₀) :
109+
def restrictIndex (E : PreZeroHypercover.{w} T) {ι : Type w'} (f : ι E.I₀) :
110110
PreZeroHypercover.{w'} T where
111111
I₀ := ι
112-
X := E.X ∘ e
113-
f i := E.f (e i)
112+
X := E.X ∘ f
113+
f i := E.f (f i)
114114

115115
@[simp]
116-
lemma presieve₀_reindex {ι : Type w'} (e : ι ≃ E.I₀) : (E.reindex e).presieve₀ = E.presieve₀ := by
116+
lemma presieve₀_restrictIndex_equiv {ι : Type w'} (e : ι ≃ E.I₀) :
117+
(E.restrictIndex e).presieve₀ = E.presieve₀ := by
117118
refine le_antisymm (fun Y g ⟨i⟩ ↦ ⟨e i⟩) fun Y g ⟨i⟩ ↦ ?_
118119
obtain ⟨i, rfl⟩ := e.surjective i
119120
exact ⟨i⟩
120121

122+
/-- Replace the indexing type of a pre-`0`-hypercover. -/
123+
@[simps!]
124+
def reindex (E : PreZeroHypercover.{w} T) {ι : Type w'} (e : ι ≃ E.I₀) :
125+
PreZeroHypercover.{w'} T :=
126+
E.restrictIndex e
127+
128+
@[simp]
129+
lemma presieve₀_reindex {ι : Type w'} (e : ι ≃ E.I₀) : (E.reindex e).presieve₀ = E.presieve₀ := by
130+
simp [reindex]
131+
121132
/-- Pairwise intersection of two pre-`0`-hypercovers. -/
122133
@[simps!]
123134
noncomputable
@@ -416,6 +427,61 @@ def map (F : C ⥤ D) (E : ZeroHypercover.{w} J S) (h : J ≤ K.comap F) :
416427

417428
end Functoriality
418429

430+
/--
431+
A `w`-`0`-hypercover `E` is `w'`-small if there exists an indexing type `ι` in `Type w'` and a
432+
restriction map `ι → E.I₀` such that the restriction of `E` to `ι` is still covering.
433+
434+
Note: This is weaker than `E.I₀` being `w'`-small. For example, every Zariski cover of
435+
`X : Scheme.{u}` is `u`-small, because `X` itself suffices as indexing type.
436+
-/
437+
protected class Small (E : ZeroHypercover.{w} J S) where
438+
exists_restrictIndex_mem (E) : ∃ (ι : Type w') (f : ι → E.I₀), (E.restrictIndex f).presieve₀ ∈ J S
439+
440+
instance (E : ZeroHypercover.{w} J S) [Small.{w'} E.I₀] : ZeroHypercover.Small.{w'} E where
441+
exists_restrictIndex_mem := ⟨_, (equivShrink E.I₀).symm, by simp [E.mem₀]⟩
442+
443+
/-- The `w'`-index type of a `w'`-small `0`-hypercover. -/
444+
def Small.Index (E : ZeroHypercover.{w} J S) [ZeroHypercover.Small.{w'} E] : Type w' :=
445+
(Small.exists_restrictIndex_mem E).choose
446+
447+
/-- The index restriction function of a small `0`-hypercover. -/
448+
noncomputable def Small.restrictFun (E : ZeroHypercover.{w} J S) [ZeroHypercover.Small.{w'} E] :
449+
Index E → E.I₀ :=
450+
(Small.exists_restrictIndex_mem E).choose_spec.choose
451+
452+
lemma Small.mem₀ (E : ZeroHypercover.{w} J S) [ZeroHypercover.Small.{w'} E] :
453+
(E.restrictIndex <| Small.restrictFun E).presieve₀ ∈ J S :=
454+
(Small.exists_restrictIndex_mem E).choose_spec.choose_spec
455+
456+
instance (E : ZeroHypercover.{w} J S) : ZeroHypercover.Small.{max u v} E where
457+
exists_restrictIndex_mem := by
458+
obtain ⟨ι, Y, f, h⟩ := E.presieve₀.exists_eq_ofArrows
459+
have (Z : C) (g : Z ⟶ S) (hg : Presieve.ofArrows Y f g) :
460+
∃ (j : E.I₀) (h : Z = E.X j), g = eqToHom h ≫ E.f j := by
461+
obtain ⟨j⟩ : E.presieve₀ g := by rwa [h]
462+
use j, rfl
463+
simp
464+
choose j h₁ h₂ using this
465+
refine ⟨ι, fun i ↦ j _ _ (.mk i), ?_⟩
466+
convert E.mem₀
467+
exact le_antisymm (fun Z g ⟨i⟩ ↦ ⟨_⟩) (h ▸ fun Z g ⟨i⟩ ↦ .mk' i (h₁ _ _ _) (h₂ _ _ _))
468+
469+
/-- Restrict a `w'`-small `0`-hypercover to a `w'`-`0`-hypercover. -/
470+
@[simps toPreZeroHypercover]
471+
noncomputable
472+
def restrictIndexOfSmall (E : ZeroHypercover.{w} J S) [ZeroHypercover.Small.{w'} E] :
473+
ZeroHypercover.{w'} J S where
474+
__ := E.toPreZeroHypercover.restrictIndex (Small.restrictFun E)
475+
mem₀ := Small.mem₀ E
476+
477+
instance (E : ZeroHypercover.{w} J S) [ZeroHypercover.Small.{w'} E] {T : C} (f : T ⟶ S)
478+
[IsStableUnderBaseChange.{w} J] [IsStableUnderBaseChange.{w'} J]
479+
[∀ (i : E.I₀), HasPullback f (E.f i)] :
480+
ZeroHypercover.Small.{w'} (E.pullback₁ f) := by
481+
use Small.Index E, Small.restrictFun E
482+
have _ (i) : HasPullback f (E.restrictIndexOfSmall.f i) := by dsimp; infer_instance
483+
exact ((restrictIndexOfSmall.{w'} E).pullback₁ f).mem₀
484+
419485
end ZeroHypercover
420486

421487
lemma mem_iff_exists_zeroHypercover {X : C} {R : Presieve X} :
@@ -424,6 +490,19 @@ lemma mem_iff_exists_zeroHypercover {X : C} {R : Presieve X} :
424490
obtain ⟨ι, Y, f, rfl⟩ := R.exists_eq_ofArrows
425491
use ⟨⟨ι, Y, f⟩, hR⟩
426492

493+
/-- A precoverage is `w`-small, if every `0`-hypercover is `w`-small. -/
494+
class Small (J : Precoverage C) : Prop where
495+
zeroHypercoverSmall : ∀ {S : C} (E : ZeroHypercover.{max u v} J S), ZeroHypercover.Small.{w'} E
496+
497+
instance (J : Precoverage C) [Small.{w} J] {S : C} (E : ZeroHypercover.{w'} J S) :
498+
ZeroHypercover.Small.{w} E := by
499+
have : ZeroHypercover.Small.{w} (ZeroHypercover.restrictIndexOfSmall.{max u v} E) :=
500+
Small.zeroHypercoverSmall _
501+
let E' := ZeroHypercover.restrictIndexOfSmall.{w}
502+
(ZeroHypercover.restrictIndexOfSmall.{max u v} E)
503+
use E'.I₀, ZeroHypercover.Small.restrictFun _ ∘ ZeroHypercover.Small.restrictFun _
504+
exact E'.mem₀
505+
427506
end Precoverage
428507

429508
end CategoryTheory

Mathlib/CategoryTheory/Sites/MorphismProperty.lean

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Authors: Christian Merten
66
import Mathlib.CategoryTheory.MorphismProperty.Limits
77
import Mathlib.CategoryTheory.Sites.Pretopology
88
import Mathlib.CategoryTheory.Sites.Coverage
9+
import Mathlib.CategoryTheory.Sites.Hypercover.Zero
910

1011
/-!
1112
# The site induced by a morphism property
@@ -19,6 +20,8 @@ this construction by intersecting with the pretopology of surjective families.
1920
2021
-/
2122

23+
universe w
24+
2225
namespace CategoryTheory
2326

2427
open Limits
@@ -52,6 +55,12 @@ instance [P.IsStableUnderComposition] : P.precoverage.IsStableUnderComposition w
5255
intro ⟨i⟩
5356
exact P.comp_mem _ _ (hg _ ⟨i.2⟩) (hf ⟨i.1⟩)
5457

58+
instance : Precoverage.Small.{w} P.precoverage where
59+
zeroHypercoverSmall E := by
60+
constructor
61+
use PEmpty, PEmpty.elim
62+
simp
63+
5564
lemma precoverage_monotone (hPQ : P ≤ Q) : precoverage P ≤ precoverage Q :=
5665
fun _ _ hR _ _ hg ↦ hPQ _ (hR hg)
5766

0 commit comments

Comments
 (0)