Skip to content

Commit c4b2238

Browse files
committed
feat(AlgebraicGeometry): constructor for IsColimit (Cofan.mk S f) (#22541)
Also generalizes some universe assumptions in `Mathlib.AlgebraicGeometry.Limits`.
1 parent 88ed49a commit c4b2238

File tree

8 files changed

+150
-65
lines changed

8 files changed

+150
-65
lines changed

Mathlib/AlgebraicGeometry/Limits.lean

Lines changed: 105 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@ We construct various limits and colimits in the category of schemes.
2727
suppress_compilation
2828

2929

30-
universe u
30+
universe u v
3131

3232
open CategoryTheory CategoryTheory.Limits Opposite TopologicalSpace
3333

34+
attribute [local instance] Opposite.small
35+
3436
namespace AlgebraicGeometry
3537

3638
/-- `Spec ℤ` is the terminal object in the category of schemes. -/
@@ -137,7 +139,6 @@ section Coproduct
137139

138140
variable {ι : Type u} (f : ι → Scheme.{u})
139141

140-
141142
/-- (Implementation Detail) The glue data associated to a disjoint union. -/
142143
@[simps]
143144
noncomputable
@@ -203,31 +204,28 @@ instance : CreatesColimit (Discrete.functor f) Scheme.forgetToLocallyRingedSpace
203204
have := (IsColimit.precomposeHomEquiv F _).symm (toLocallyRingedSpaceCoproductCofanIsColimit f)
204205
(colimit.isoColimitCocone ⟨_, this⟩).symm
205206

206-
noncomputable
207-
instance : CreatesColimitsOfShape (Discrete ι) Scheme.forgetToLocallyRingedSpace := by
208-
constructor
209-
intro K
210-
exact createsColimitOfIsoDiagram _ (Discrete.natIsoFunctor (F := K)).symm
207+
variable {σ : Type v} (g : σ → Scheme.{u})
211208

212-
instance : PreservesColimitsOfShape (Discrete ι) Scheme.forgetToTop.{u} :=
213-
inferInstanceAs (PreservesColimitsOfShape (Discrete ι) (Scheme.forgetToLocallyRingedSpace ⋙
209+
noncomputable
210+
instance [Small.{u} σ] :
211+
CreatesColimitsOfShape (Discrete σ) Scheme.forgetToLocallyRingedSpace.{u} := by
212+
choose σ' eq using Small.equiv_small.{u} (α := σ)
213+
let e : Discrete σ ≌ Discrete σ' := Discrete.equivalence eq.some
214+
let _ : CreatesColimitsOfShape (Discrete σ') Scheme.forgetToLocallyRingedSpace := by
215+
constructor
216+
intro K
217+
exact createsColimitOfIsoDiagram _ (Discrete.natIsoFunctor (F := K)).symm
218+
apply CategoryTheory.createsColimitsOfShapeOfEquiv e.symm
219+
220+
instance [Small.{u} σ] : PreservesColimitsOfShape (Discrete σ) Scheme.forgetToTop.{u} :=
221+
inferInstanceAs (PreservesColimitsOfShape (Discrete σ) (Scheme.forgetToLocallyRingedSpace ⋙
214222
LocallyRingedSpace.forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat))
215223

216-
instance : HasCoproducts.{u} Scheme.{u} :=
217-
fun _ ↦ ⟨fun _ ↦ hasColimit_of_created _ Scheme.forgetToLocallyRingedSpace⟩
218-
219-
instance : HasCoproducts.{0} Scheme.{u} := has_smallest_coproducts_of_hasCoproducts
224+
instance [Small.{u} σ] : HasColimitsOfShape (Discrete σ) Scheme.{u} :=
225+
fun _ ↦ hasColimit_of_created _ Scheme.forgetToLocallyRingedSpace⟩
220226

221-
noncomputable
222-
instance {ι : Type} : PreservesColimitsOfShape (Discrete ι) Scheme.forgetToTop.{u} :=
223-
preservesColimitsOfShape_of_equiv
224-
(Discrete.equivalence Equiv.ulift : Discrete (ULift.{u} ι) ≌ _) _
225-
226-
noncomputable
227-
instance {ι : Type} :
228-
PreservesColimitsOfShape (Discrete ι) Scheme.forgetToLocallyRingedSpace.{u} :=
229-
preservesColimitsOfShape_of_equiv
230-
(Discrete.equivalence Equiv.ulift : Discrete (ULift.{u} ι) ≌ _) _
227+
instance [UnivLE.{v, u}] : HasCoproducts.{v} Scheme.{u} :=
228+
fun _ ↦ ⟨fun _ ↦ hasColimit_of_created _ Scheme.forgetToLocallyRingedSpace⟩
231229

232230
/-- (Implementation Detail) Coproduct of schemes is isomorphic to the disjoint union. -/
233231
noncomputable
@@ -256,6 +254,12 @@ instance (i) : IsOpenImmersion (Sigma.ι f i) := by
256254
rw [← ι_sigmaIsoGlued_inv]
257255
infer_instance
258256

257+
instance [Small.{u} σ] (i) : IsOpenImmersion (Sigma.ι g i) := by
258+
obtain ⟨ι, ⟨e⟩⟩ := Small.equiv_small (α := σ)
259+
obtain ⟨i, rfl⟩ := e.symm.surjective i
260+
rw [← Sigma.ι_reindex_hom e.symm g i]
261+
infer_instance
262+
259263
lemma sigmaι_eq_iff (i j : ι) (x y) :
260264
(Sigma.ι f i).base x = (Sigma.ι f j).base y ↔
261265
(Sigma.mk i x : Σ i, f i) = Sigma.mk j y := by
@@ -283,23 +287,28 @@ lemma disjoint_opensRange_sigmaι (i j : ι) (h : i ≠ j) :
283287
obtain ⟨rfl⟩ := (sigmaι_eq_iff _ _ _ _ _).mp hy
284288
cases h rfl
285289

286-
lemma exists_sigmaι_eq (x : (∐ f :)) : ∃ i y, (Sigma.ι f i).base y = x := by
287-
obtain ⟨i, y, e⟩ := (disjointGlueData f).ι_jointly_surjective ((sigmaIsoGlued f).hom.base x)
288-
refine ⟨i, y, (sigmaIsoGlued f).hom.isOpenEmbedding.injective ?_⟩
289-
rwa [← Scheme.comp_base_apply, ι_sigmaIsoGlued_hom]
290+
lemma exists_sigmaι_eq [Small.{u} σ] (x : (∐ g :)) : ∃ i y, (Sigma.ι g i).base y = x := by
291+
obtain ⟨ι, ⟨e⟩⟩ := Small.equiv_small (α := σ)
292+
let x' : (∐ g ∘ e.symm :) := (Sigma.reindex e.symm g).inv.base x
293+
obtain ⟨i, y, h⟩ := (disjointGlueData <| g ∘ e.symm).ι_jointly_surjective
294+
((sigmaIsoGlued <| g ∘ e.symm).hom.base <| x')
295+
refine ⟨e.symm i, y, (Sigma.reindex e.symm g).inv.isOpenEmbedding.injective ?_⟩
296+
apply (sigmaIsoGlued _).hom.isOpenEmbedding.injective
297+
rwa [← Scheme.comp_base_apply, ← Scheme.comp_base_apply, ← Scheme.comp_base_apply,
298+
Sigma.ι_reindex_inv_assoc, ι_sigmaIsoGlued_hom]
290299

291300
lemma iSup_opensRange_sigmaι : ⨆ i, (Sigma.ι f i).opensRange = ⊤ :=
292301
eq_top_iff.mpr fun x ↦ by simpa using exists_sigmaι_eq f x
293302

294303
/-- The open cover of the coproduct. -/
295304
@[simps obj map]
296305
noncomputable
297-
def sigmaOpenCover : (∐ f).OpenCover where
298-
J := ι
299-
obj := f
300-
map := Sigma.ι f
301-
f x := (exists_sigmaι_eq f x).choose
302-
covers x := (exists_sigmaι_eq f x).choose_spec
306+
def sigmaOpenCover [Small.{u} σ] : (∐ g).OpenCover where
307+
J := σ
308+
obj := g
309+
map := Sigma.ι g
310+
f x := (exists_sigmaι_eq g x).choose
311+
covers x := (exists_sigmaι_eq g x).choose_spec
303312

304313
/-- The underlying topological space of the coproduct is homeomorphic to the disjoint union. -/
305314
noncomputable
@@ -318,8 +327,8 @@ lemma sigmaMk_mk (i) (x : f i) :
318327
exact ι_comp_sigmaComparison Scheme.forgetToTop _ _
319328

320329
open scoped Function in
321-
lemma isOpenImmersion_sigmaDesc
322-
{X : Scheme} (α : ∀ i, f i ⟶ X) [∀ i, IsOpenImmersion (α i)]
330+
private lemma isOpenImmersion_sigmaDesc_aux
331+
{X : Scheme.{u}} (α : ∀ i, f i ⟶ X) [∀ i, IsOpenImmersion (α i)]
323332
(hα : Pairwise (Disjoint on (Set.range <| α · |>.base))) :
324333
IsOpenImmersion (Sigma.desc α) := by
325334
rw [IsOpenImmersion.iff_stalk_iso]
@@ -346,6 +355,38 @@ lemma isOpenImmersion_sigmaDesc
346355
· simp [← Scheme.comp_base_apply]
347356
· simp [← Scheme.stalkMap_comp, Scheme.stalkMap_congr_hom _ _ (Sigma.ι_desc _ _)]
348357

358+
open scoped Function in
359+
lemma isOpenImmersion_sigmaDesc [Small.{u} σ]
360+
{X : Scheme.{u}} (α : ∀ i, g i ⟶ X) [∀ i, IsOpenImmersion (α i)]
361+
(hα : Pairwise (Disjoint on (Set.range <| α · |>.base))) :
362+
IsOpenImmersion (Sigma.desc α) := by
363+
obtain ⟨ι, ⟨e⟩⟩ := Small.equiv_small (α := σ)
364+
convert IsOpenImmersion.comp ((Sigma.reindex e.symm g).inv) (Sigma.desc fun i ↦ α _)
365+
· refine Sigma.hom_ext _ _ fun i ↦ ?_
366+
obtain ⟨i, rfl⟩ := e.symm.surjective i
367+
simp
368+
· apply isOpenImmersion_sigmaDesc_aux
369+
intro i j hij
370+
exact hα (fun h ↦ hij (e.symm.injective h))
371+
372+
open scoped Function in
373+
/-- `S` is the disjoint union of `Xᵢ` if the `Xᵢ` are covering, pairwise disjoint open subschemes
374+
of `S`. -/
375+
lemma nonempty_isColimit_cofanMk_of [Small.{u} σ]
376+
{X : σ → Scheme.{u}} {S : Scheme.{u}} (f : ∀ i, X i ⟶ S) [∀ i, IsOpenImmersion (f i)]
377+
(hcov : ⨆ i, (f i).opensRange = ⊤) (hdisj : Pairwise (Disjoint on (f · |>.opensRange))) :
378+
Nonempty (IsColimit <| Cofan.mk S f) := by
379+
have : IsOpenImmersion (Sigma.desc f) := by
380+
refine isOpenImmersion_sigmaDesc _ _ (fun i j hij ↦ ?_)
381+
simpa [Function.onFun_apply, disjoint_iff, Opens.ext_iff] using hdisj hij
382+
simp only [← Cofan.isColimit_iff_isIso_sigmaDesc (Cofan.mk S f), cofan_mk_inj, Cofan.mk_pt]
383+
apply isIso_of_isOpenImmersion_of_opensRange_eq_top
384+
rw [eq_top_iff]
385+
intro x hx
386+
have : x ∈ ⨆ i, (f i).opensRange := by rwa [hcov]
387+
obtain ⟨i, y, rfl⟩ := by simpa only [Opens.iSup_mk, Opens.mem_mk, Set.mem_iUnion] using this
388+
use Sigma.ι X i |>.base y
389+
simp [← Scheme.comp_base_apply]
349390

350391
variable (X Y : Scheme.{u})
351392

@@ -371,7 +412,7 @@ lemma isCompl_range_inl_inr :
371412
IsCompl (Set.range (coprod.inl : X ⟶ X ⨿ Y).base)
372413
(Set.range (coprod.inr : Y ⟶ X ⨿ Y).base) :=
373414
((TopCat.binaryCofan_isColimit_iff _).mp
374-
⟨mapIsColimitOfPreservesOfIsColimit Scheme.forgetToTop _ _ (coprodIsCoprod X Y)⟩).2.2
415+
⟨mapIsColimitOfPreservesOfIsColimit Scheme.forgetToTop.{u} _ _ (coprodIsCoprod X Y)⟩).2.2
375416

376417
lemma isCompl_opensRange_inl_inr :
377418
IsCompl (coprod.inl : X ⟶ X ⨿ Y).opensRange (coprod.inr : Y ⟶ X ⨿ Y).opensRange := by
@@ -421,6 +462,26 @@ def coprodOpenCover.{w} : (X ⨿ Y).OpenCover where
421462
· simp only [Sum.elim_inr, coprodMk_inr, exists_apply_eq_apply]
422463
map_prop x := x.rec (fun _ ↦ inferInstance) (fun _ ↦ inferInstance)
423464

465+
/-- If `X` and `Y` are open disjoint and covering open subschemes of `S`,
466+
`S` is the disjoint union of `X` and `Y`. -/
467+
lemma nonempty_isColimit_binaryCofanMk_of_isCompl {X Y S : Scheme.{u}}
468+
(f : X ⟶ S) (g : Y ⟶ S) [IsOpenImmersion f] [IsOpenImmersion g]
469+
(hf : IsCompl f.opensRange g.opensRange) :
470+
Nonempty (IsColimit <| BinaryCofan.mk f g) := by
471+
let c' : Cofan fun j ↦ (WalkingPair.casesOn j X Y : Scheme.{u}) :=
472+
.mk S fun j ↦ WalkingPair.casesOn j f g
473+
let i : BinaryCofan.mk f g ≅ c' := Cofan.ext (Iso.refl _) (by rintro (b|b) <;> rfl)
474+
refine ⟨IsColimit.ofIsoColimit (Nonempty.some ?_) i.symm⟩
475+
let fi (j : WalkingPair) : WalkingPair.casesOn j X Y ⟶ S := WalkingPair.casesOn j f g
476+
convert nonempty_isColimit_cofanMk_of fi _ _
477+
· intro i
478+
cases i <;> (simp [fi]; infer_instance)
479+
· simpa [← WalkingPair.equivBool.symm.iSup_comp, iSup_bool_eq, ← codisjoint_iff] using hf.2
480+
· intro i j hij
481+
match i, j with
482+
| .left, .right => simpa [fi] using hf.1
483+
| .right, .left => simpa [fi] using hf.1.symm
484+
424485
variable (R S : Type u) [CommRing R] [CommRing S]
425486

426487
/-- The map `Spec R ⨿ Spec S ⟶ Spec (R × S)`.
@@ -484,7 +545,7 @@ instance : IsIso (coprodSpec R S) := by
484545
· ext x; exact coprodSpec_apply R S x
485546
· infer_instance
486547

487-
instance (R S : CommRingCatᵒᵖ) : IsIso (coprodComparison Scheme.Spec R S) := by
548+
instance (R S : CommRingCat.{u}ᵒᵖ) : IsIso (coprodComparison Scheme.Spec R S) := by
488549
obtain ⟨R⟩ := R; obtain ⟨S⟩ := S
489550
have : coprodComparison Scheme.Spec (.op R) (.op S) ≫ (Spec.map
490551
((limit.isoLimitCone ⟨_, CommRingCat.prodFanIsLimit R S⟩).inv ≫
@@ -501,22 +562,22 @@ instance (R S : CommRingCatᵒᵖ) : IsIso (coprodComparison Scheme.Spec R S) :=
501562
rw [(IsIso.eq_comp_inv _).mpr this]
502563
infer_instance
503564

504-
instance : PreservesColimitsOfShape (Discrete WalkingPair) Scheme.Spec :=
565+
instance : PreservesColimitsOfShape (Discrete WalkingPair) Scheme.Spec.{u} :=
505566
fun {_} ↦
506-
have (X Y : CommRingCatᵒᵖ) := PreservesColimitPair.of_iso_coprod_comparison Scheme.Spec X Y
567+
have (X Y : CommRingCat.{u}ᵒᵖ) := PreservesColimitPair.of_iso_coprod_comparison Scheme.Spec X Y
507568
preservesColimit_of_iso_diagram _ (diagramIsoPair _).symm⟩
508569

509-
instance : PreservesColimitsOfShape (Discrete PEmpty.{1}) Scheme.Spec := by
570+
instance : PreservesColimitsOfShape (Discrete PEmpty.{1}) Scheme.Spec.{u} := by
510571
have : IsEmpty (Scheme.Spec.obj (⊥_ CommRingCatᵒᵖ)) :=
511572
@Function.isEmpty _ _ spec_punit_isEmpty (Scheme.Spec.mapIso
512573
(initialIsoIsInitial (initialOpOfTerminal CommRingCat.punitIsTerminal))).hom.base
513574
have := preservesInitial_of_iso Scheme.Spec (asIso (initial.to _))
514575
exact preservesColimitsOfShape_pempty_of_preservesInitial _
515576

516-
instance {J} [Finite J] : PreservesColimitsOfShape (Discrete J) Scheme.Spec :=
577+
instance {J : Type*} [Finite J] : PreservesColimitsOfShape (Discrete J) Scheme.Spec.{u} :=
517578
preservesFiniteCoproductsOfPreservesBinaryAndInitial _ _
518579

519-
instance {J : Type*} [Finite J] : PreservesColimitsOfShape (Discrete J) Scheme.Spec :=
580+
instance {J : Type*} [Finite J] : PreservesColimitsOfShape (Discrete J) Scheme.Spec.{u} :=
520581
letI := (nonempty_fintype J).some
521582
preservesColimitsOfShape_of_equiv (Discrete.equivalence (Fintype.equivFin _).symm) _
522583

@@ -545,7 +606,7 @@ instance (i) (R : ι → Type _) [∀ i, CommRing (R i)] :
545606
· exact Function.surjective_eval _
546607
exact IsOpenImmersion.of_isLocalization (Function.update 0 i 1)
547608

548-
instance (R : ι → CommRingCat) : IsOpenImmersion (sigmaSpec R) := by
609+
instance (R : ι → CommRingCat.{u}) : IsOpenImmersion (sigmaSpec R) := by
549610
classical
550611
apply isOpenImmersion_sigmaDesc
551612
intro ix iy h
@@ -556,7 +617,7 @@ instance (R : ι → CommRingCat) : IsOpenImmersion (sigmaSpec R) := by
556617
(show DFinsupp.single (β := (R ·)) iy 1 ix ∈ x.asIdeal by simp [h.symm])
557618
simp [← Ideal.eq_top_iff_one, y.2.ne_top] at this
558619

559-
instance [Finite ι] (R : ι → CommRingCat) : IsIso (sigmaSpec R) := by
620+
instance [Finite ι] (R : ι → CommRingCat.{u}) : IsIso (sigmaSpec R) := by
560621
have : sigmaSpec R =
561622
(colimit.isoColimitCocone ⟨_,
562623
(IsColimit.precomposeHomEquiv Discrete.natIsoFunctor.symm _).symm (isColimitOfPreserves

Mathlib/AlgebraicGeometry/Morphisms/Preimmersion.lean

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,8 @@ instance comp {X Y Z : Scheme} (f : X ⟶ Y) (g : Y ⟶ Z) [IsPreimmersion f]
5858
[IsPreimmersion g] : IsPreimmersion (f ≫ g) :=
5959
MorphismProperty.IsStableUnderComposition.comp_mem f g inferInstance inferInstance
6060

61-
instance (priority := 900) {X Y} (f : X ⟶ Y) [IsPreimmersion f] : Mono f := by
62-
refine (Scheme.forgetToLocallyRingedSpace ⋙
63-
LocallyRingedSpace.forgetToSheafedSpace).mono_of_mono_map ?_
64-
apply SheafedSpace.mono_of_base_injective_of_stalk_epi
65-
· exact f.isEmbedding.injective
66-
· exact fun x ↦ ConcreteCategory.epi_of_surjective _ (f.stalkMap_surjective x)
61+
instance (priority := 900) {X Y} (f : X ⟶ Y) [IsPreimmersion f] : Mono f :=
62+
SurjectiveOnStalks.mono_of_injective f.isEmbedding.injective
6763

6864
theorem of_comp {X Y Z : Scheme} (f : X ⟶ Y) (g : Y ⟶ Z) [IsPreimmersion g]
6965
[IsPreimmersion (f ≫ g)] : IsPreimmersion f where

Mathlib/AlgebraicGeometry/Morphisms/SurjectiveOnStalks.lean

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,14 @@ instance stableUnderBaseChange :
8989
intros R S T _ _ _ _ _ H
9090
exact H.baseChange
9191

92+
variable {f} in
93+
lemma mono_of_injective [SurjectiveOnStalks f] (hf : Function.Injective f.base) : Mono f := by
94+
refine (Scheme.forgetToLocallyRingedSpace ⋙
95+
LocallyRingedSpace.forgetToSheafedSpace).mono_of_mono_map ?_
96+
apply SheafedSpace.mono_of_base_injective_of_stalk_epi
97+
· exact hf
98+
· exact fun x ↦ ConcreteCategory.epi_of_surjective _ (f.stalkMap_surjective x)
99+
92100
/-- If `Y ⟶ S` is surjective on stalks, then for every `X ⟶ S`, `X ×ₛ Y` is a subset of
93101
`X × Y` (cartesian product as topological spaces) with the induced topology. -/
94102
lemma isEmbedding_pullback {X Y S : Scheme.{u}} (f : X ⟶ S) (g : Y ⟶ S) [SurjectiveOnStalks g] :

Mathlib/AlgebraicGeometry/OpenImmersion.lean

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,13 @@ instance {Z : Scheme.{u}} (f : X ⟶ Z) (g : Y ⟶ Z) [IsOpenImmersion f]
673673

674674
end IsOpenImmersion
675675

676+
lemma isIso_of_isOpenImmersion_of_opensRange_eq_top {X Y : Scheme.{u}} (f : X ⟶ Y)
677+
[IsOpenImmersion f] (hf : f.opensRange = ⊤) : IsIso f := by
678+
rw [isIso_iff_isOpenImmersion]
679+
refine ⟨inferInstance, ?_⟩
680+
rw [TopCat.epi_iff_surjective, ← Set.range_eq_univ]
681+
exact TopologicalSpace.Opens.ext_iff.mp hf
682+
676683
section MorphismProperty
677684

678685
instance isOpenImmersion_isStableUnderComposition :

Mathlib/Data/Opposite.lean

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Kim Morrison, Reid Barton, Simon Hudon, Kenny Lau
55
-/
66
import Mathlib.Logic.Equiv.Defs
7+
import Mathlib.Logic.Small.Defs
78

89
/-!
910
# Opposites
@@ -110,4 +111,10 @@ so you don't need to use `induction x using Opposite.rec'`. -/
110111
@[simp, induction_eliminator]
111112
protected def rec' {F : αᵒᵖ → Sort v} (h : ∀ X, F (op X)) : ∀ X, F X := fun X => h (unop X)
112113

114+
/-- If `X` is `u`-small, also `Xᵒᵖ` is `u`-small.
115+
Note: This is not an instance, because it tends to mislead typeclass search. -/
116+
lemma small {X : Type v} [Small.{u} X] : Small.{u} Xᵒᵖ := by
117+
obtain ⟨S, ⟨e⟩⟩ := Small.equiv_small (α := X)
118+
exact ⟨S, ⟨equivToOpposite.symm.trans e⟩⟩
119+
113120
end Opposite

Mathlib/Geometry/RingedSpace/LocallyRingedSpace/HasColimits.lean

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@ universe w' w v u
2424

2525
open CategoryTheory CategoryTheory.Limits Opposite TopologicalSpace
2626

27+
attribute [local instance] Opposite.small
28+
2729
namespace SheafedSpace
2830

2931
variable {C : Type u} [Category.{v} C]
30-
variable {J : Type w} [Category.{w'} J] [UnivLE.{w, v}] (F : J ⥤ SheafedSpace.{_, _, v} C)
32+
variable {J : Type w} [Category.{w'} J] [Small.{v} J] (F : J ⥤ SheafedSpace.{_, _, v} C)
3133

3234
theorem isColimit_exists_rep [HasLimitsOfShape Jᵒᵖ C] {c : Cocone F} (hc : IsColimit c) (x : c.pt) :
3335
∃ (i : J) (y : F.obj i), (c.ι.app i).base y = x :=
@@ -51,7 +53,7 @@ namespace LocallyRingedSpace
5153

5254
section HasCoproducts
5355

54-
variable {ι : Type v} [UnivLE.{v, u}] (F : Discrete ι ⥤ LocallyRingedSpace.{u})
56+
variable {ι : Type v} [Small.{u} ι] (F : Discrete ι ⥤ LocallyRingedSpace.{u})
5557

5658
/-- The explicit coproduct for `F : discrete ι ⥤ LocallyRingedSpace`. -/
5759
noncomputable def coproduct : LocallyRingedSpace where
@@ -102,11 +104,10 @@ noncomputable def coproductCofanIsColimit : IsColimit (coproductCofan F) where
102104
(IsColimit.uniq _ (forgetToSheafedSpace.mapCocone s) f.toShHom fun j =>
103105
congr_arg LocallyRingedSpace.Hom.toShHom (h j))
104106

105-
instance : HasCoproducts.{v} LocallyRingedSpace.{u} := fun _ =>
107+
instance : HasColimitsOfShape (Discrete ι) LocallyRingedSpace.{u} :=
106108
fun F => ⟨⟨⟨_, coproductCofanIsColimit F⟩⟩⟩⟩
107109

108-
noncomputable instance (J : Type v) :
109-
PreservesColimitsOfShape (Discrete.{v} J) forgetToSheafedSpace.{u} :=
110+
noncomputable instance : PreservesColimitsOfShape (Discrete.{v} ι) forgetToSheafedSpace.{u} :=
110111
fun {G} =>
111112
preservesColimit_of_preserves_colimit_cocone (coproductCofanIsColimit G)
112113
((colimit.isColimit (C := SheafedSpace.{u+1, u, u} CommRingCat.{u}) _).ofIsoColimit

Mathlib/Geometry/RingedSpace/SheafedSpace.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ theorem Γ_map {X Y : (SheafedSpace C)ᵒᵖ} (f : X ⟶ Y) : Γ.map f = f.unop.
194194
theorem Γ_map_op {X Y : SheafedSpace C} (f : X ⟶ Y) : Γ.map f.op = f.c.app (op ⊤) :=
195195
rfl
196196

197-
noncomputable instance (J : Type w) [Category.{w'} J] [UnivLE.{w, v}] [HasLimitsOfShape Jᵒᵖ C] :
197+
noncomputable instance (J : Type w) [Category.{w'} J] [Small.{v} J] [HasLimitsOfShape Jᵒᵖ C] :
198198
CreatesColimitsOfShape J (forgetToPresheafedSpace : SheafedSpace.{_, _, v} C ⥤ _) :=
199199
fun {K} =>
200200
createsColimitOfFullyFaithfulOfIso
@@ -205,13 +205,13 @@ noncomputable instance (J : Type w) [Category.{w'} J] [UnivLE.{w, v}] [HasLimits
205205
noncomputable instance [HasLimits C] :
206206
CreatesColimits (forgetToPresheafedSpace : SheafedSpace C ⥤ _) where
207207

208-
instance (J : Type w) [Category.{w'} J] [UnivLE.{w, v}] [HasLimitsOfShape Jᵒᵖ C] :
208+
instance (J : Type w) [Category.{w'} J] [Small.{v} J] [HasLimitsOfShape Jᵒᵖ C] :
209209
HasColimitsOfShape J (SheafedSpace.{_, _, v} C) :=
210210
hasColimitsOfShape_of_hasColimitsOfShape_createsColimitsOfShape forgetToPresheafedSpace
211211

212212
instance [HasLimits C] : HasColimits.{v} (SheafedSpace C) where
213213

214-
instance (J : Type w) [Category.{w'} J] [UnivLE.{w, v}] [HasLimitsOfShape Jᵒᵖ C] :
214+
instance (J : Type w) [Category.{w'} J] [Small.{v} J] [HasLimitsOfShape Jᵒᵖ C] :
215215
PreservesColimitsOfShape J (forget.{_, _, v} C) :=
216216
Limits.comp_preservesColimitsOfShape forgetToPresheafedSpace (PresheafedSpace.forget C)
217217

0 commit comments

Comments
 (0)