Skip to content

Commit d9cecd1

Browse files
committed
refactor(AlgebraicGeometry): rename fields of Scheme.Cover to match ZeroHypercover (#29803)
This is in preparation for replacing `Scheme.Cover` by `ZeroHypercover` for the Zariski precoverage (see #29061). For consistency, also the fields of `Scheme.AffineCover` were updated accordingly. Deprecations were added for the following renames: - `Scheme.Cover.J` -> `Scheme.Cover.I₀` - `Scheme.Cover.obj` -> `Scheme.Cover.X` - `Scheme.Cover.map` -> `Scheme.Cover.f` and similarly for `AffineCover`. No deprecations were added for the automatically generated `simps` lemmas, in the expectation that users will already get a deprecation warning for one of the fields above.
1 parent 8de0329 commit d9cecd1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+806
-788
lines changed

Mathlib/AlgebraicGeometry/AffineScheme.lean

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -240,24 +240,24 @@ theorem exists_isAffineOpen_mem_and_subset {X : Scheme.{u}} {x : X}
240240
exact ⟨Scheme.Hom.opensRange f (H := hf.1),
241241
⟨AlgebraicGeometry.isAffineOpen_opensRange f (H := hf.1), hf.2.1, hf.2.2⟩⟩
242242

243-
instance Scheme.isAffine_affineCover (X : Scheme) (i : X.affineCover.J) :
244-
IsAffine (X.affineCover.obj i) :=
243+
instance Scheme.isAffine_affineCover (X : Scheme) (i : X.affineCover.I₀) :
244+
IsAffine (X.affineCover.X i) :=
245245
isAffine_Spec _
246246

247-
instance Scheme.isAffine_affineBasisCover (X : Scheme) (i : X.affineBasisCover.J) :
248-
IsAffine (X.affineBasisCover.obj i) :=
247+
instance Scheme.isAffine_affineBasisCover (X : Scheme) (i : X.affineBasisCover.I₀) :
248+
IsAffine (X.affineBasisCover.X i) :=
249249
isAffine_Spec _
250250

251-
instance Scheme.isAffine_affineOpenCover (X : Scheme) (𝒰 : X.AffineOpenCover) (i : 𝒰.J) :
252-
IsAffine (𝒰.openCover.obj i) :=
253-
inferInstanceAs (IsAffine (Spec (𝒰.obj i)))
251+
instance Scheme.isAffine_affineOpenCover (X : Scheme) (𝒰 : X.AffineOpenCover) (i : 𝒰.I₀) :
252+
IsAffine (𝒰.openCover.X i) :=
253+
inferInstanceAs (IsAffine (Spec (𝒰.X i)))
254254

255-
instance (X : Scheme) [CompactSpace X] (𝒰 : X.OpenCover) [∀ i, IsAffine (𝒰.obj i)] (i) :
256-
IsAffine (𝒰.finiteSubcover.obj i) :=
257-
inferInstanceAs (IsAffine (𝒰.obj _))
255+
instance (X : Scheme) [CompactSpace X] (𝒰 : X.OpenCover) [∀ i, IsAffine (𝒰.X i)] (i) :
256+
IsAffine (𝒰.finiteSubcover.X i) :=
257+
inferInstanceAs (IsAffine (𝒰.X _))
258258

259259
instance {X} [IsAffine X] (i) :
260-
IsAffine ((Scheme.coverOfIsIso (P := @IsOpenImmersion) (𝟙 X)).obj i) := by
260+
IsAffine ((Scheme.coverOfIsIso (P := @IsOpenImmersion) (𝟙 X)).X i) := by
261261
dsimp; infer_instance
262262

263263
theorem isBasis_affine_open (X : Scheme) : Opens.IsBasis X.affineOpens := by

Mathlib/AlgebraicGeometry/AffineSpace.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,8 @@ lemma isOpenMap_over : IsOpenMap (𝔸(n; S) ↘ S).base := by
406406
wlog hS : ∃ R, S = Spec R
407407
· refine (IsLocalAtTarget.iff_of_openCover (P := topologically @IsOpenMap) S.affineCover).mpr ?_
408408
intro i
409-
have := this (n := n) (S.affineCover.obj i) ⟨_, rfl⟩
410-
rwa [← (isPullback_map (n := n) (S.affineCover.map i)).isoPullback_hom_snd,
409+
have := this (n := n) (S.affineCover.X i) ⟨_, rfl⟩
410+
rwa [← (isPullback_map (n := n) (S.affineCover.f i)).isoPullback_hom_snd,
411411
MorphismProperty.cancel_left_of_respectsIso (P := topologically @IsOpenMap)] at this
412412
obtain ⟨R, rfl⟩ := hS
413413
rw [← MorphismProperty.cancel_left_of_respectsIso (P := topologically @IsOpenMap)
@@ -434,8 +434,8 @@ lemma isIntegralHom_over_iff_isEmpty : IsIntegralHom (𝔸(n; S) ↘ S) ↔ IsEm
434434
wlog hS : ∃ R, S = Spec R
435435
· obtain ⟨x⟩ := ‹Nonempty S›
436436
obtain ⟨y, hy⟩ := S.affineCover.covers x
437-
exact this (S.affineCover.obj x) (MorphismProperty.IsStableUnderBaseChange.of_isPullback
438-
(isPullback_map (S.affineCover.map x)) h) ⟨y⟩ ⟨_, rfl⟩
437+
exact this (S.affineCover.X x) (MorphismProperty.IsStableUnderBaseChange.of_isPullback
438+
(isPullback_map (S.affineCover.f x)) h) ⟨y⟩ ⟨_, rfl⟩
439439
obtain ⟨R, rfl⟩ := hS
440440
have : Nontrivial R := (subsingleton_or_nontrivial R).resolve_left fun H ↦
441441
not_isEmpty_of_nonempty (Spec R) (inferInstanceAs (IsEmpty (PrimeSpectrum R)))

Mathlib/AlgebraicGeometry/AffineTransitionLimit.lean

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,17 @@ lemma Scheme.nonempty_of_isLimit [IsCofilteredOrEmpty I]
4343
· have i := Nonempty.some ‹Nonempty I›
4444
have : IsCofiltered I := ⟨⟩
4545
let 𝒰 := (D.obj i).affineCover.finiteSubcover
46-
have (i' : _) : IsAffine (𝒰.obj i') := inferInstanceAs (IsAffine (Spec _))
46+
have (i' : _) : IsAffine (𝒰.X i') := inferInstanceAs (IsAffine (Spec _))
4747
obtain ⟨j, H⟩ :
48-
∃ j : 𝒰.J, ∀ {i'} (f : i' ⟶ i), Nonempty ((𝒰.pullbackCover (D.map f)).obj j) := by
48+
∃ j : 𝒰.I₀, ∀ {i'} (f : i' ⟶ i), Nonempty ((𝒰.pullbackCover (D.map f)).X j) := by
4949
simp_rw [← not_isEmpty_iff]
5050
by_contra! H
5151
choose i' f hf using H
5252
let g (j) := IsCofiltered.infTo (insert i (Finset.univ.image i'))
53-
(Finset.univ.image fun j : 𝒰.J ↦ ⟨_, _, by simp, by simp, f j⟩) (X := j)
54-
have (j : 𝒰.J) : IsEmpty ((𝒰.pullbackCover (D.map (g i (by simp)))).obj j) := by
55-
let F : (𝒰.pullbackCover (D.map (g i (by simp)))).obj j ⟶
56-
(𝒰.pullbackCover (D.map (f j))).obj j :=
53+
(Finset.univ.image fun j : 𝒰.I₀ ↦ ⟨_, _, by simp, by simp, f j⟩) (X := j)
54+
have (j : 𝒰.I₀) : IsEmpty ((𝒰.pullbackCover (D.map (g i (by simp)))).X j) := by
55+
let F : (𝒰.pullbackCover (D.map (g i (by simp)))).X j ⟶
56+
(𝒰.pullbackCover (D.map (f j))).X j :=
5757
pullback.map _ _ _ _ (D.map (g _ (by simp))) (𝟙 _) (𝟙 _) (by
5858
rw [← D.map_comp, IsCofiltered.infTo_commutes]
5959
· simp [g]
@@ -63,11 +63,11 @@ lemma Scheme.nonempty_of_isLimit [IsCofilteredOrEmpty I]
6363
obtain ⟨x, -⟩ :=
6464
(𝒰.pullbackCover (D.map (g i (by simp)))).covers (Nonempty.some inferInstance)
6565
exact (this _).elim x
66-
let F := Over.post D ⋙ Over.pullback (𝒰.map j) ⋙ Over.forget _
66+
let F := Over.post D ⋙ Over.pullback (𝒰.f j) ⋙ Over.forget _
6767
have (i' : _) : IsAffine (F.obj i') :=
68-
have : IsAffineHom (pullback.snd (D.map i'.hom) (𝒰.map j)) :=
68+
have : IsAffineHom (pullback.snd (D.map i'.hom) (𝒰.f j)) :=
6969
MorphismProperty.pullback_snd _ _ inferInstance
70-
isAffine_of_isAffineHom (pullback.snd (D.map i'.hom) (𝒰.map j))
70+
isAffine_of_isAffineHom (pullback.snd (D.map i'.hom) (𝒰.f j))
7171
have (i' : _) : Nonempty (F.obj i') := H i'.hom
7272
let e : F ⟶ (F ⋙ Scheme.Γ.rightOp) ⋙ Scheme.Spec := Functor.whiskerLeft F ΓSpec.adjunction.unit
7373
have (i : _) : IsIso (e.app i) := IsAffine.affine
@@ -82,7 +82,7 @@ lemma Scheme.nonempty_of_isLimit [IsCofilteredOrEmpty I]
8282
exact CommRingCat.FilteredColimits.nontrivial
8383
(isColimitCoconeLeftOpOfCone _ (limit.isLimit (F ⋙ Scheme.Γ.rightOp)))
8484
let α : F ⟶ Over.forget _ ⋙ D := Functor.whiskerRight
85-
(Functor.whiskerLeft (Over.post D) (Over.mapPullbackAdj (𝒰.map j)).counit) (Over.forget _)
85+
(Functor.whiskerLeft (Over.post D) (Over.mapPullbackAdj (𝒰.f j)).counit) (Over.forget _)
8686
exact this.map (((Functor.Initial.isLimitWhiskerEquiv (Over.forget i) c).symm hc).lift
8787
((Cones.postcompose α).obj c'.1)).base
8888

0 commit comments

Comments
 (0)