algebraic_geometry.gluingMathlib.AlgebraicGeometry.Gluing

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2022 Andrew Yang. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Andrew Yang
 -/
-import AlgebraicGeometry.PresheafedSpace.Gluing
-import AlgebraicGeometry.OpenImmersion.Scheme
+import Geometry.RingedSpace.PresheafedSpace.Gluing
+import AlgebraicGeometry.OpenImmersion
 
 #align_import algebraic_geometry.gluing from "leanprover-community/mathlib"@"d0b1936853671209a866fa35b9e54949c81116e2"
 
Diff
@@ -419,8 +419,8 @@ theorem fromGlued_injective : Function.Injective 𝒰.fromGlued.1.base :=
   intro x y h
   obtain ⟨i, x, rfl⟩ := 𝒰.glued_cover.ι_jointly_surjective x
   obtain ⟨j, y, rfl⟩ := 𝒰.glued_cover.ι_jointly_surjective y
-  simp_rw [← comp_apply, ← SheafedSpace.comp_base, ← LocallyRingedSpace.comp_val] at h 
-  erw [ι_from_glued, ι_from_glued] at h 
+  simp_rw [← comp_apply, ← SheafedSpace.comp_base, ← LocallyRingedSpace.comp_val] at h
+  erw [ι_from_glued, ι_from_glued] at h
   let e :=
     (TopCat.pullbackConeIsLimit _ _).conePointUniqueUpToIso
       (is_limit_of_has_pullback_of_preserves_limit Scheme.forget_to_Top (𝒰.map i) (𝒰.map j))
@@ -444,8 +444,8 @@ instance fromGlued_stalk_iso (x : 𝒰.gluedCover.glued.carrier) :
   have :=
     PresheafedSpace.stalk_map.congr_hom _ _
       (congr_arg LocallyRingedSpace.hom.val <| 𝒰.ι_from_glued i) x
-  erw [PresheafedSpace.stalk_map.comp] at this 
-  rw [← is_iso.eq_comp_inv] at this 
+  erw [PresheafedSpace.stalk_map.comp] at this
+  rw [← is_iso.eq_comp_inv] at this
   rw [this]
   infer_instance
 #align algebraic_geometry.Scheme.open_cover.from_glued_stalk_iso AlgebraicGeometry.Scheme.OpenCover.fromGlued_stalk_iso
@@ -457,7 +457,7 @@ theorem fromGlued_open_map : IsOpenMap 𝒰.fromGlued.1.base :=
   intro U hU
   rw [isOpen_iff_forall_mem_open]
   intro x hx
-  rw [𝒰.glued_cover.is_open_iff] at hU 
+  rw [𝒰.glued_cover.is_open_iff] at hU
   use 𝒰.from_glued.val.base '' U ∩ Set.range (𝒰.map (𝒰.f x)).1.base
   use Set.inter_subset_left _ _
   constructor
@@ -485,7 +485,7 @@ instance : Epi 𝒰.fromGlued.val.base :=
   obtain ⟨y, h⟩ := 𝒰.covers x
   use(𝒰.glued_cover.ι (𝒰.f x)).1.base y
   rw [← comp_apply]
-  rw [← 𝒰.ι_from_glued (𝒰.f x)] at h 
+  rw [← 𝒰.ι_from_glued (𝒰.f x)] at h
   exact h
 
 #print AlgebraicGeometry.Scheme.OpenCover.fromGlued_open_immersion /-
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2022 Andrew Yang. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Andrew Yang
 -/
-import Mathbin.AlgebraicGeometry.PresheafedSpace.Gluing
-import Mathbin.AlgebraicGeometry.OpenImmersion.Scheme
+import AlgebraicGeometry.PresheafedSpace.Gluing
+import AlgebraicGeometry.OpenImmersion.Scheme
 
 #align_import algebraic_geometry.gluing from "leanprover-community/mathlib"@"d0b1936853671209a866fa35b9e54949c81116e2"
 
Diff
@@ -483,7 +483,7 @@ instance : Epi 𝒰.fromGlued.val.base :=
   rw [TopCat.epi_iff_surjective]
   intro x
   obtain ⟨y, h⟩ := 𝒰.covers x
-  use (𝒰.glued_cover.ι (𝒰.f x)).1.base y
+  use(𝒰.glued_cover.ι (𝒰.f x)).1.base y
   rw [← comp_apply]
   rw [← 𝒰.ι_from_glued (𝒰.f x)] at h 
   exact h
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2022 Andrew Yang. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Andrew Yang
-
-! This file was ported from Lean 3 source module algebraic_geometry.gluing
-! leanprover-community/mathlib commit d0b1936853671209a866fa35b9e54949c81116e2
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.AlgebraicGeometry.PresheafedSpace.Gluing
 import Mathbin.AlgebraicGeometry.OpenImmersion.Scheme
 
+#align_import algebraic_geometry.gluing from "leanprover-community/mathlib"@"d0b1936853671209a866fa35b9e54949c81116e2"
+
 /-!
 # Gluing Schemes
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Andrew Yang
 
 ! This file was ported from Lean 3 source module algebraic_geometry.gluing
-! leanprover-community/mathlib commit 533f62f4dd62a5aad24a04326e6e787c8f7e98b1
+! leanprover-community/mathlib commit d0b1936853671209a866fa35b9e54949c81116e2
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -14,6 +14,9 @@ import Mathbin.AlgebraicGeometry.OpenImmersion.Scheme
 /-!
 # Gluing Schemes
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 Given a family of gluing data of schemes, we may glue them together.
 
 ## Main definitions
Diff
@@ -66,6 +66,7 @@ namespace AlgebraicGeometry
 
 namespace Scheme
 
+#print AlgebraicGeometry.Scheme.GlueData /-
 /-- A family of gluing data consists of
 1. An index type `J`
 2. An scheme `U i` for each `i : J`.
@@ -88,6 +89,7 @@ that the `U i`'s are open subschemes of the glued space.
 structure GlueData extends CategoryTheory.GlueData Scheme where
   f_open : ∀ i j, IsOpenImmersionCat (f i j)
 #align algebraic_geometry.Scheme.glue_data AlgebraicGeometry.Scheme.GlueData
+-/
 
 attribute [instance] glue_data.f_open
 
@@ -97,12 +99,15 @@ variable (D : GlueData)
 
 local notation "𝖣" => D.toGlueData
 
+#print AlgebraicGeometry.Scheme.GlueData.toLocallyRingedSpaceGlueData /-
 /-- The glue data of locally ringed spaces spaces associated to a family of glue data of schemes. -/
 abbrev toLocallyRingedSpaceGlueData : LocallyRingedSpace.GlueData :=
   { f_open := D.f_open
     toGlueData := 𝖣.mapGlueData forgetToLocallyRingedSpace }
 #align algebraic_geometry.Scheme.glue_data.to_LocallyRingedSpace_glue_data AlgebraicGeometry.Scheme.GlueData.toLocallyRingedSpaceGlueData
+-/
 
+#print AlgebraicGeometry.Scheme.GlueData.gluedScheme /-
 /-- (Implementation). The glued scheme of a glue data.
 This should not be used outside this file. Use `Scheme.glue_data.glued` instead. -/
 def gluedScheme : Scheme :=
@@ -120,6 +125,7 @@ def gluedScheme : Scheme :=
     exact (D.U i).affineCover.Covers y
   · infer_instance
 #align algebraic_geometry.Scheme.glue_data.glued_Scheme AlgebraicGeometry.Scheme.GlueData.gluedScheme
+-/
 
 instance : CreatesColimit 𝖣.diagram.multispan forgetToLocallyRingedSpace :=
   createsColimitOfFullyFaithfulOfIso D.gluedScheme
@@ -133,47 +139,64 @@ instance : PreservesColimit 𝖣.diagram.multispan forgetToTop :=
 instance : HasMulticoequalizer 𝖣.diagram :=
   hasColimit_of_created _ forgetToLocallyRingedSpace
 
+#print AlgebraicGeometry.Scheme.GlueData.glued /-
 /-- The glued scheme of a glued space. -/
 abbrev glued : Scheme :=
   𝖣.glued
 #align algebraic_geometry.Scheme.glue_data.glued AlgebraicGeometry.Scheme.GlueData.glued
+-/
 
+#print AlgebraicGeometry.Scheme.GlueData.ι /-
 /-- The immersion from `D.U i` into the glued space. -/
 abbrev ι (i : D.J) : D.U i ⟶ D.glued :=
   𝖣.ι i
 #align algebraic_geometry.Scheme.glue_data.ι AlgebraicGeometry.Scheme.GlueData.ι
+-/
 
+#print AlgebraicGeometry.Scheme.GlueData.isoLocallyRingedSpace /-
 /-- The gluing as sheafed spaces is isomorphic to the gluing as presheafed spaces. -/
 abbrev isoLocallyRingedSpace :
     D.glued.toLocallyRingedSpace ≅ D.toLocallyRingedSpaceGlueData.toGlueData.glued :=
   𝖣.gluedIso forgetToLocallyRingedSpace
 #align algebraic_geometry.Scheme.glue_data.iso_LocallyRingedSpace AlgebraicGeometry.Scheme.GlueData.isoLocallyRingedSpace
+-/
 
+#print AlgebraicGeometry.Scheme.GlueData.ι_isoLocallyRingedSpace_inv /-
 theorem ι_isoLocallyRingedSpace_inv (i : D.J) :
     D.toLocallyRingedSpaceGlueData.toGlueData.ι i ≫ D.isoLocallyRingedSpace.inv = 𝖣.ι i :=
   𝖣.ι_gluedIso_inv forgetToLocallyRingedSpace i
 #align algebraic_geometry.Scheme.glue_data.ι_iso_LocallyRingedSpace_inv AlgebraicGeometry.Scheme.GlueData.ι_isoLocallyRingedSpace_inv
+-/
 
-instance ι_isOpenImmersionCat (i : D.J) : IsOpenImmersionCat (𝖣.ι i) := by
+#print AlgebraicGeometry.Scheme.GlueData.ι_isOpenImmersion /-
+instance ι_isOpenImmersion (i : D.J) : IsOpenImmersionCat (𝖣.ι i) := by
   rw [← D.ι_iso_LocallyRingedSpace_inv]; infer_instance
-#align algebraic_geometry.Scheme.glue_data.ι_is_open_immersion AlgebraicGeometry.Scheme.GlueData.ι_isOpenImmersionCat
+#align algebraic_geometry.Scheme.glue_data.ι_is_open_immersion AlgebraicGeometry.Scheme.GlueData.ι_isOpenImmersion
+-/
 
+#print AlgebraicGeometry.Scheme.GlueData.ι_jointly_surjective /-
 theorem ι_jointly_surjective (x : 𝖣.glued.carrier) :
     ∃ (i : D.J) (y : (D.U i).carrier), (D.ι i).1.base y = x :=
   𝖣.ι_jointly_surjective (forgetToTop ⋙ forget TopCat) x
 #align algebraic_geometry.Scheme.glue_data.ι_jointly_surjective AlgebraicGeometry.Scheme.GlueData.ι_jointly_surjective
+-/
 
+#print AlgebraicGeometry.Scheme.GlueData.glue_condition /-
 @[simp, reassoc]
 theorem glue_condition (i j : D.J) : D.t i j ≫ D.f j i ≫ D.ι j = D.f i j ≫ D.ι i :=
   𝖣.glue_condition i j
 #align algebraic_geometry.Scheme.glue_data.glue_condition AlgebraicGeometry.Scheme.GlueData.glue_condition
+-/
 
+#print AlgebraicGeometry.Scheme.GlueData.vPullbackCone /-
 /-- The pullback cone spanned by `V i j ⟶ U i` and `V i j ⟶ U j`.
 This is a pullback diagram (`V_pullback_cone_is_limit`). -/
 def vPullbackCone (i j : D.J) : PullbackCone (D.ι i) (D.ι j) :=
   PullbackCone.mk (D.f i j) (D.t i j ≫ D.f j i) (by simp)
 #align algebraic_geometry.Scheme.glue_data.V_pullback_cone AlgebraicGeometry.Scheme.GlueData.vPullbackCone
+-/
 
+#print AlgebraicGeometry.Scheme.GlueData.vPullbackConeIsLimit /-
 /-- The following diagram is a pullback, i.e. `Vᵢⱼ` is the intersection of `Uᵢ` and `Uⱼ` in `X`.
 
 Vᵢⱼ ⟶ Uᵢ
@@ -185,7 +208,9 @@ def vPullbackConeIsLimit (i j : D.J) : IsLimit (D.vPullbackCone i j) :=
   𝖣.vPullbackConeIsLimitOfMap forgetToLocallyRingedSpace i j
     (D.toLocallyRingedSpaceGlueData.vPullbackConeIsLimit _ _)
 #align algebraic_geometry.Scheme.glue_data.V_pullback_cone_is_limit AlgebraicGeometry.Scheme.GlueData.vPullbackConeIsLimit
+-/
 
+#print AlgebraicGeometry.Scheme.GlueData.isoCarrier /-
 /-- The underlying topological space of the glued scheme is isomorphic to the gluing of the
 underlying spacess -/
 def isoCarrier :
@@ -200,7 +225,9 @@ def isoCarrier :
       LocallyRingedSpace.glue_data.iso_SheafedSpace _
   exact Scheme.glue_data.iso_LocallyRingedSpace _
 #align algebraic_geometry.Scheme.glue_data.iso_carrier AlgebraicGeometry.Scheme.GlueData.isoCarrier
+-/
 
+#print AlgebraicGeometry.Scheme.GlueData.ι_isoCarrier_inv /-
 @[simp]
 theorem ι_isoCarrier_inv (i : D.J) :
     D.toLocallyRingedSpaceGlueData.toSheafedSpaceGlueData.toPresheafedSpaceGlueData.toTopGlueData.toGlueData.ι
@@ -218,14 +245,18 @@ theorem ι_isoCarrier_inv (i : D.J) :
   change (_ ≫ D.iso_LocallyRingedSpace.inv).1.base = _
   rw [D.ι_iso_LocallyRingedSpace_inv i]
 #align algebraic_geometry.Scheme.glue_data.ι_iso_carrier_inv AlgebraicGeometry.Scheme.GlueData.ι_isoCarrier_inv
+-/
 
+#print AlgebraicGeometry.Scheme.GlueData.Rel /-
 /-- An equivalence relation on `Σ i, D.U i` that holds iff `𝖣 .ι i x = 𝖣 .ι j y`.
 See `Scheme.gluing_data.ι_eq_iff`. -/
 def Rel (a b : Σ i, ((D.U i).carrier : Type _)) : Prop :=
   a = b ∨
     ∃ x : (D.V (a.1, b.1)).carrier, (D.f _ _).1.base x = a.2 ∧ (D.t _ _ ≫ D.f _ _).1.base x = b.2
 #align algebraic_geometry.Scheme.glue_data.rel AlgebraicGeometry.Scheme.GlueData.Rel
+-/
 
+#print AlgebraicGeometry.Scheme.GlueData.ι_eq_iff /-
 theorem ι_eq_iff (i j : D.J) (x : (D.U i).carrier) (y : (D.U j).carrier) :
     (𝖣.ι i).1.base x = (𝖣.ι j).1.base y ↔ D.Rel ⟨i, x⟩ ⟨j, y⟩ :=
   by
@@ -236,7 +267,9 @@ theorem ι_eq_iff (i j : D.J) (x : (D.U i).carrier) (y : (D.U j).carrier) :
   rw [← ((TopCat.mono_iff_injective D.iso_carrier.inv).mp inferInstance).eq_iff]
   simp_rw [← comp_apply, D.ι_iso_carrier_inv]
 #align algebraic_geometry.Scheme.glue_data.ι_eq_iff AlgebraicGeometry.Scheme.GlueData.ι_eq_iff
+-/
 
+#print AlgebraicGeometry.Scheme.GlueData.isOpen_iff /-
 theorem isOpen_iff (U : Set D.glued.carrier) : IsOpen U ↔ ∀ i, IsOpen ((D.ι i).1.base ⁻¹' U) :=
   by
   rw [← (TopCat.homeoOfIso D.iso_carrier.symm).isOpen_preimage]
@@ -245,7 +278,9 @@ theorem isOpen_iff (U : Set D.glued.carrier) : IsOpen U ↔ ∀ i, IsOpen ((D.ι
   intro i
   erw [← Set.preimage_comp, ← coe_comp, ι_iso_carrier_inv]
 #align algebraic_geometry.Scheme.glue_data.is_open_iff AlgebraicGeometry.Scheme.GlueData.isOpen_iff
+-/
 
+#print AlgebraicGeometry.Scheme.GlueData.openCover /-
 /-- The open cover of the glued space given by the glue data. -/
 def openCover (D : Scheme.GlueData) : OpenCover D.glued
     where
@@ -255,6 +290,7 @@ def openCover (D : Scheme.GlueData) : OpenCover D.glued
   f x := (D.ι_jointly_surjective x).some
   Covers x := ⟨_, (D.ι_jointly_surjective x).choose_spec.choose_spec⟩
 #align algebraic_geometry.Scheme.glue_data.open_cover AlgebraicGeometry.Scheme.GlueData.openCover
+-/
 
 end GlueData
 
@@ -262,6 +298,7 @@ namespace OpenCover
 
 variable {X : Scheme.{u}} (𝒰 : OpenCover.{u} X)
 
+#print AlgebraicGeometry.Scheme.OpenCover.gluedCoverT' /-
 /-- (Implementation) the transition maps in the glue data associated with an open cover. -/
 def gluedCoverT' (x y z : 𝒰.J) :
     pullback (pullback.fst : pullback (𝒰.map x) (𝒰.map y) ⟶ _)
@@ -276,43 +313,57 @@ def gluedCoverT' (x y z : 𝒰.J) :
   · simp [pullback.condition]
   · simp
 #align algebraic_geometry.Scheme.open_cover.glued_cover_t' AlgebraicGeometry.Scheme.OpenCover.gluedCoverT'
+-/
 
+#print AlgebraicGeometry.Scheme.OpenCover.gluedCoverT'_fst_fst /-
 @[simp, reassoc]
 theorem gluedCoverT'_fst_fst (x y z : 𝒰.J) :
     𝒰.gluedCoverT' x y z ≫ pullback.fst ≫ pullback.fst = pullback.fst ≫ pullback.snd := by
   delta glued_cover_t'; simp
 #align algebraic_geometry.Scheme.open_cover.glued_cover_t'_fst_fst AlgebraicGeometry.Scheme.OpenCover.gluedCoverT'_fst_fst
+-/
 
+#print AlgebraicGeometry.Scheme.OpenCover.gluedCoverT'_fst_snd /-
 @[simp, reassoc]
 theorem gluedCoverT'_fst_snd (x y z : 𝒰.J) :
     gluedCoverT' 𝒰 x y z ≫ pullback.fst ≫ pullback.snd = pullback.snd ≫ pullback.snd := by
   delta glued_cover_t'; simp
 #align algebraic_geometry.Scheme.open_cover.glued_cover_t'_fst_snd AlgebraicGeometry.Scheme.OpenCover.gluedCoverT'_fst_snd
+-/
 
+#print AlgebraicGeometry.Scheme.OpenCover.gluedCoverT'_snd_fst /-
 @[simp, reassoc]
 theorem gluedCoverT'_snd_fst (x y z : 𝒰.J) :
     gluedCoverT' 𝒰 x y z ≫ pullback.snd ≫ pullback.fst = pullback.fst ≫ pullback.snd := by
   delta glued_cover_t'; simp
 #align algebraic_geometry.Scheme.open_cover.glued_cover_t'_snd_fst AlgebraicGeometry.Scheme.OpenCover.gluedCoverT'_snd_fst
+-/
 
+#print AlgebraicGeometry.Scheme.OpenCover.gluedCoverT'_snd_snd /-
 @[simp, reassoc]
 theorem gluedCoverT'_snd_snd (x y z : 𝒰.J) :
     gluedCoverT' 𝒰 x y z ≫ pullback.snd ≫ pullback.snd = pullback.fst ≫ pullback.fst := by
   delta glued_cover_t'; simp
 #align algebraic_geometry.Scheme.open_cover.glued_cover_t'_snd_snd AlgebraicGeometry.Scheme.OpenCover.gluedCoverT'_snd_snd
+-/
 
+#print AlgebraicGeometry.Scheme.OpenCover.glued_cover_cocycle_fst /-
 theorem glued_cover_cocycle_fst (x y z : 𝒰.J) :
     gluedCoverT' 𝒰 x y z ≫ gluedCoverT' 𝒰 y z x ≫ gluedCoverT' 𝒰 z x y ≫ pullback.fst =
       pullback.fst :=
   by apply pullback.hom_ext <;> simp
 #align algebraic_geometry.Scheme.open_cover.glued_cover_cocycle_fst AlgebraicGeometry.Scheme.OpenCover.glued_cover_cocycle_fst
+-/
 
+#print AlgebraicGeometry.Scheme.OpenCover.glued_cover_cocycle_snd /-
 theorem glued_cover_cocycle_snd (x y z : 𝒰.J) :
     gluedCoverT' 𝒰 x y z ≫ gluedCoverT' 𝒰 y z x ≫ gluedCoverT' 𝒰 z x y ≫ pullback.snd =
       pullback.snd :=
   by apply pullback.hom_ext <;> simp [pullback.condition]
 #align algebraic_geometry.Scheme.open_cover.glued_cover_cocycle_snd AlgebraicGeometry.Scheme.OpenCover.glued_cover_cocycle_snd
+-/
 
+#print AlgebraicGeometry.Scheme.OpenCover.glued_cover_cocycle /-
 theorem glued_cover_cocycle (x y z : 𝒰.J) :
     gluedCoverT' 𝒰 x y z ≫ gluedCoverT' 𝒰 y z x ≫ gluedCoverT' 𝒰 z x y = 𝟙 _ :=
   by
@@ -320,7 +371,9 @@ theorem glued_cover_cocycle (x y z : 𝒰.J) :
   apply glued_cover_cocycle_fst
   apply glued_cover_cocycle_snd
 #align algebraic_geometry.Scheme.open_cover.glued_cover_cocycle AlgebraicGeometry.Scheme.OpenCover.glued_cover_cocycle
+-/
 
+#print AlgebraicGeometry.Scheme.OpenCover.gluedCover /-
 /-- The glue data associated with an open cover.
 The canonical isomorphism `𝒰.glued_cover.glued ⟶ X` is provided by `𝒰.from_glued`. -/
 @[simps]
@@ -338,7 +391,9 @@ def gluedCover : Scheme.GlueData.{u} where
   cocycle x y z := glued_cover_cocycle 𝒰 x y z
   f_open x := inferInstance
 #align algebraic_geometry.Scheme.open_cover.glued_cover AlgebraicGeometry.Scheme.OpenCover.gluedCover
+-/
 
+#print AlgebraicGeometry.Scheme.OpenCover.fromGlued /-
 /-- The canonical morphism from the gluing of an open cover of `X` into `X`.
 This is an isomorphism, as witnessed by an `is_iso` instance. -/
 def fromGlued : 𝒰.gluedCover.glued ⟶ X :=
@@ -349,12 +404,16 @@ def fromGlued : 𝒰.gluedCover.glued ⟶ X :=
   change pullback.fst ≫ _ = ((pullback_symmetry _ _).Hom ≫ pullback.fst) ≫ _
   simpa using pullback.condition
 #align algebraic_geometry.Scheme.open_cover.from_glued AlgebraicGeometry.Scheme.OpenCover.fromGlued
+-/
 
+#print AlgebraicGeometry.Scheme.OpenCover.ι_fromGlued /-
 @[simp, reassoc]
 theorem ι_fromGlued (x : 𝒰.J) : 𝒰.gluedCover.ι x ≫ 𝒰.fromGlued = 𝒰.map x :=
   Multicoequalizer.π_desc _ _ _ _ _
 #align algebraic_geometry.Scheme.open_cover.ι_from_glued AlgebraicGeometry.Scheme.OpenCover.ι_fromGlued
+-/
 
+#print AlgebraicGeometry.Scheme.OpenCover.fromGlued_injective /-
 theorem fromGlued_injective : Function.Injective 𝒰.fromGlued.1.base :=
   by
   intro x y h
@@ -375,7 +434,9 @@ theorem fromGlued_injective : Function.Injective 𝒰.fromGlued.1.base :=
       is_limit.cone_point_unique_up_to_iso_hom_comp _ _ walking_cospan.right]
     rfl
 #align algebraic_geometry.Scheme.open_cover.from_glued_injective AlgebraicGeometry.Scheme.OpenCover.fromGlued_injective
+-/
 
+#print AlgebraicGeometry.Scheme.OpenCover.fromGlued_stalk_iso /-
 instance fromGlued_stalk_iso (x : 𝒰.gluedCover.glued.carrier) :
     IsIso (PresheafedSpace.stalkMap 𝒰.fromGlued.val x) :=
   by
@@ -388,7 +449,9 @@ instance fromGlued_stalk_iso (x : 𝒰.gluedCover.glued.carrier) :
   rw [this]
   infer_instance
 #align algebraic_geometry.Scheme.open_cover.from_glued_stalk_iso AlgebraicGeometry.Scheme.OpenCover.fromGlued_stalk_iso
+-/
 
+#print AlgebraicGeometry.Scheme.OpenCover.fromGlued_open_map /-
 theorem fromGlued_open_map : IsOpenMap 𝒰.fromGlued.1.base :=
   by
   intro U hU
@@ -406,11 +469,14 @@ theorem fromGlued_open_map : IsOpenMap 𝒰.fromGlued.1.base :=
     refine' Set.preimage_image_eq _ 𝒰.from_glued_injective
   · exact ⟨hx, 𝒰.covers x⟩
 #align algebraic_geometry.Scheme.open_cover.from_glued_open_map AlgebraicGeometry.Scheme.OpenCover.fromGlued_open_map
+-/
 
+#print AlgebraicGeometry.Scheme.OpenCover.fromGlued_openEmbedding /-
 theorem fromGlued_openEmbedding : OpenEmbedding 𝒰.fromGlued.1.base :=
   openEmbedding_of_continuous_injective_open (by continuity) 𝒰.fromGlued_injective
     𝒰.fromGlued_open_map
 #align algebraic_geometry.Scheme.open_cover.from_glued_open_embedding AlgebraicGeometry.Scheme.OpenCover.fromGlued_openEmbedding
+-/
 
 instance : Epi 𝒰.fromGlued.val.base :=
   by
@@ -422,9 +488,11 @@ instance : Epi 𝒰.fromGlued.val.base :=
   rw [← 𝒰.ι_from_glued (𝒰.f x)] at h 
   exact h
 
+#print AlgebraicGeometry.Scheme.OpenCover.fromGlued_open_immersion /-
 instance fromGlued_open_immersion : IsOpenImmersionCat 𝒰.fromGlued :=
   SheafedSpace.IsOpenImmersion.of_stalk_iso _ 𝒰.fromGlued_openEmbedding
 #align algebraic_geometry.Scheme.open_cover.from_glued_open_immersion AlgebraicGeometry.Scheme.OpenCover.fromGlued_open_immersion
+-/
 
 instance : IsIso 𝒰.fromGlued :=
   by
@@ -435,6 +503,7 @@ instance : IsIso 𝒰.fromGlued :=
   change @is_iso (PresheafedSpace _) _ _ _ 𝒰.from_glued.val
   apply PresheafedSpace.is_open_immersion.to_iso
 
+#print AlgebraicGeometry.Scheme.OpenCover.glueMorphisms /-
 /-- Given an open cover of `X`, and a morphism `𝒰.obj x ⟶ Y` for each open subscheme in the cover,
 such that these morphisms are compatible in the intersection (pullback), we may glue the morphisms
 together into a morphism `X ⟶ Y`.
@@ -453,7 +522,9 @@ def glueMorphisms {Y : Scheme} (f : ∀ x, 𝒰.obj x ⟶ Y)
   erw [pullback_symmetry_hom_comp_fst]
   exact hf i j
 #align algebraic_geometry.Scheme.open_cover.glue_morphisms AlgebraicGeometry.Scheme.OpenCover.glueMorphisms
+-/
 
+#print AlgebraicGeometry.Scheme.OpenCover.ι_glueMorphisms /-
 @[simp, reassoc]
 theorem ι_glueMorphisms {Y : Scheme} (f : ∀ x, 𝒰.obj x ⟶ Y)
     (hf : ∀ x y, (pullback.fst : pullback (𝒰.map x) (𝒰.map y) ⟶ _) ≫ f x = pullback.snd ≫ f y)
@@ -462,7 +533,9 @@ theorem ι_glueMorphisms {Y : Scheme} (f : ∀ x, 𝒰.obj x ⟶ Y)
   rw [← ι_from_glued, category.assoc]
   erw [is_iso.hom_inv_id_assoc, multicoequalizer.π_desc]
 #align algebraic_geometry.Scheme.open_cover.ι_glue_morphisms AlgebraicGeometry.Scheme.OpenCover.ι_glueMorphisms
+-/
 
+#print AlgebraicGeometry.Scheme.OpenCover.hom_ext /-
 theorem hom_ext {Y : Scheme} (f₁ f₂ : X ⟶ Y) (h : ∀ x, 𝒰.map x ≫ f₁ = 𝒰.map x ≫ f₂) : f₁ = f₂ :=
   by
   rw [← cancel_epi 𝒰.from_glued]
@@ -472,6 +545,7 @@ theorem hom_ext {Y : Scheme} (f₁ f₂ : X ⟶ Y) (h : ∀ x, 𝒰.map x ≫ f
   erw [multicoequalizer.π_desc_assoc]
   exact h x
 #align algebraic_geometry.Scheme.open_cover.hom_ext AlgebraicGeometry.Scheme.OpenCover.hom_ext
+-/
 
 end OpenCover
 
Diff
@@ -86,7 +86,7 @@ that the `U i`'s are open subschemes of the glued space.
 -/
 @[nolint has_nonempty_instance]
 structure GlueData extends CategoryTheory.GlueData Scheme where
-  f_open : ∀ i j, IsOpenImmersion (f i j)
+  f_open : ∀ i j, IsOpenImmersionCat (f i j)
 #align algebraic_geometry.Scheme.glue_data AlgebraicGeometry.Scheme.GlueData
 
 attribute [instance] glue_data.f_open
@@ -154,9 +154,9 @@ theorem ι_isoLocallyRingedSpace_inv (i : D.J) :
   𝖣.ι_gluedIso_inv forgetToLocallyRingedSpace i
 #align algebraic_geometry.Scheme.glue_data.ι_iso_LocallyRingedSpace_inv AlgebraicGeometry.Scheme.GlueData.ι_isoLocallyRingedSpace_inv
 
-instance ι_isOpenImmersion (i : D.J) : IsOpenImmersion (𝖣.ι i) := by
+instance ι_isOpenImmersionCat (i : D.J) : IsOpenImmersionCat (𝖣.ι i) := by
   rw [← D.ι_iso_LocallyRingedSpace_inv]; infer_instance
-#align algebraic_geometry.Scheme.glue_data.ι_is_open_immersion AlgebraicGeometry.Scheme.GlueData.ι_isOpenImmersion
+#align algebraic_geometry.Scheme.glue_data.ι_is_open_immersion AlgebraicGeometry.Scheme.GlueData.ι_isOpenImmersionCat
 
 theorem ι_jointly_surjective (x : 𝖣.glued.carrier) :
     ∃ (i : D.J) (y : (D.U i).carrier), (D.ι i).1.base y = x :=
@@ -422,7 +422,7 @@ instance : Epi 𝒰.fromGlued.val.base :=
   rw [← 𝒰.ι_from_glued (𝒰.f x)] at h 
   exact h
 
-instance fromGlued_open_immersion : IsOpenImmersion 𝒰.fromGlued :=
+instance fromGlued_open_immersion : IsOpenImmersionCat 𝒰.fromGlued :=
   SheafedSpace.IsOpenImmersion.of_stalk_iso _ 𝒰.fromGlued_openEmbedding
 #align algebraic_geometry.Scheme.open_cover.from_glued_open_immersion AlgebraicGeometry.Scheme.OpenCover.fromGlued_open_immersion
 
Diff
@@ -423,7 +423,7 @@ instance : Epi 𝒰.fromGlued.val.base :=
   exact h
 
 instance fromGlued_open_immersion : IsOpenImmersion 𝒰.fromGlued :=
-  SheafedSpace.IsOpenImmersion.ofStalkIso _ 𝒰.fromGlued_openEmbedding
+  SheafedSpace.IsOpenImmersion.of_stalk_iso _ 𝒰.fromGlued_openEmbedding
 #align algebraic_geometry.Scheme.open_cover.from_glued_open_immersion AlgebraicGeometry.Scheme.OpenCover.fromGlued_open_immersion
 
 instance : IsIso 𝒰.fromGlued :=
Diff
@@ -423,7 +423,7 @@ instance : Epi 𝒰.fromGlued.val.base :=
   exact h
 
 instance fromGlued_open_immersion : IsOpenImmersion 𝒰.fromGlued :=
-  SheafedSpace.IsOpenImmersion.of_stalk_iso _ 𝒰.fromGlued_openEmbedding
+  SheafedSpace.IsOpenImmersion.ofStalkIso _ 𝒰.fromGlued_openEmbedding
 #align algebraic_geometry.Scheme.open_cover.from_glued_open_immersion AlgebraicGeometry.Scheme.OpenCover.fromGlued_open_immersion
 
 instance : IsIso 𝒰.fromGlued :=
Diff
@@ -95,9 +95,6 @@ namespace GlueData
 
 variable (D : GlueData)
 
-include D
-
--- mathport name: «expr𝖣»
 local notation "𝖣" => D.toGlueData
 
 /-- The glue data of locally ringed spaces spaces associated to a family of glue data of schemes. -/
Diff
@@ -4,11 +4,12 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Andrew Yang
 
 ! This file was ported from Lean 3 source module algebraic_geometry.gluing
-! leanprover-community/mathlib commit a9402e0a11843994283cd0a918e61fa51360e26a
+! leanprover-community/mathlib commit 533f62f4dd62a5aad24a04326e6e787c8f7e98b1
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
 import Mathbin.AlgebraicGeometry.PresheafedSpace.Gluing
+import Mathbin.AlgebraicGeometry.OpenImmersion.Scheme
 
 /-!
 # Gluing Schemes
Diff
@@ -161,7 +161,7 @@ instance ι_isOpenImmersion (i : D.J) : IsOpenImmersion (𝖣.ι i) := by
 #align algebraic_geometry.Scheme.glue_data.ι_is_open_immersion AlgebraicGeometry.Scheme.GlueData.ι_isOpenImmersion
 
 theorem ι_jointly_surjective (x : 𝖣.glued.carrier) :
-    ∃ (i : D.J)(y : (D.U i).carrier), (D.ι i).1.base y = x :=
+    ∃ (i : D.J) (y : (D.U i).carrier), (D.ι i).1.base y = x :=
   𝖣.ι_jointly_surjective (forgetToTop ⋙ forget TopCat) x
 #align algebraic_geometry.Scheme.glue_data.ι_jointly_surjective AlgebraicGeometry.Scheme.GlueData.ι_jointly_surjective
 
@@ -223,7 +223,7 @@ theorem ι_isoCarrier_inv (i : D.J) :
 
 /-- An equivalence relation on `Σ i, D.U i` that holds iff `𝖣 .ι i x = 𝖣 .ι j y`.
 See `Scheme.gluing_data.ι_eq_iff`. -/
-def Rel (a b : Σi, ((D.U i).carrier : Type _)) : Prop :=
+def Rel (a b : Σ i, ((D.U i).carrier : Type _)) : Prop :=
   a = b ∨
     ∃ x : (D.V (a.1, b.1)).carrier, (D.f _ _).1.base x = a.2 ∧ (D.t _ _ ≫ D.f _ _).1.base x = b.2
 #align algebraic_geometry.Scheme.glue_data.rel AlgebraicGeometry.Scheme.GlueData.Rel
@@ -362,8 +362,8 @@ theorem fromGlued_injective : Function.Injective 𝒰.fromGlued.1.base :=
   intro x y h
   obtain ⟨i, x, rfl⟩ := 𝒰.glued_cover.ι_jointly_surjective x
   obtain ⟨j, y, rfl⟩ := 𝒰.glued_cover.ι_jointly_surjective y
-  simp_rw [← comp_apply, ← SheafedSpace.comp_base, ← LocallyRingedSpace.comp_val] at h
-  erw [ι_from_glued, ι_from_glued] at h
+  simp_rw [← comp_apply, ← SheafedSpace.comp_base, ← LocallyRingedSpace.comp_val] at h 
+  erw [ι_from_glued, ι_from_glued] at h 
   let e :=
     (TopCat.pullbackConeIsLimit _ _).conePointUniqueUpToIso
       (is_limit_of_has_pullback_of_preserves_limit Scheme.forget_to_Top (𝒰.map i) (𝒰.map j))
@@ -385,8 +385,8 @@ instance fromGlued_stalk_iso (x : 𝒰.gluedCover.glued.carrier) :
   have :=
     PresheafedSpace.stalk_map.congr_hom _ _
       (congr_arg LocallyRingedSpace.hom.val <| 𝒰.ι_from_glued i) x
-  erw [PresheafedSpace.stalk_map.comp] at this
-  rw [← is_iso.eq_comp_inv] at this
+  erw [PresheafedSpace.stalk_map.comp] at this 
+  rw [← is_iso.eq_comp_inv] at this 
   rw [this]
   infer_instance
 #align algebraic_geometry.Scheme.open_cover.from_glued_stalk_iso AlgebraicGeometry.Scheme.OpenCover.fromGlued_stalk_iso
@@ -396,7 +396,7 @@ theorem fromGlued_open_map : IsOpenMap 𝒰.fromGlued.1.base :=
   intro U hU
   rw [isOpen_iff_forall_mem_open]
   intro x hx
-  rw [𝒰.glued_cover.is_open_iff] at hU
+  rw [𝒰.glued_cover.is_open_iff] at hU 
   use 𝒰.from_glued.val.base '' U ∩ Set.range (𝒰.map (𝒰.f x)).1.base
   use Set.inter_subset_left _ _
   constructor
@@ -421,7 +421,7 @@ instance : Epi 𝒰.fromGlued.val.base :=
   obtain ⟨y, h⟩ := 𝒰.covers x
   use (𝒰.glued_cover.ι (𝒰.f x)).1.base y
   rw [← comp_apply]
-  rw [← 𝒰.ι_from_glued (𝒰.f x)] at h
+  rw [← 𝒰.ι_from_glued (𝒰.f x)] at h 
   exact h
 
 instance fromGlued_open_immersion : IsOpenImmersion 𝒰.fromGlued :=
Diff
@@ -156,10 +156,8 @@ theorem ι_isoLocallyRingedSpace_inv (i : D.J) :
   𝖣.ι_gluedIso_inv forgetToLocallyRingedSpace i
 #align algebraic_geometry.Scheme.glue_data.ι_iso_LocallyRingedSpace_inv AlgebraicGeometry.Scheme.GlueData.ι_isoLocallyRingedSpace_inv
 
-instance ι_isOpenImmersion (i : D.J) : IsOpenImmersion (𝖣.ι i) :=
-  by
-  rw [← D.ι_iso_LocallyRingedSpace_inv]
-  infer_instance
+instance ι_isOpenImmersion (i : D.J) : IsOpenImmersion (𝖣.ι i) := by
+  rw [← D.ι_iso_LocallyRingedSpace_inv]; infer_instance
 #align algebraic_geometry.Scheme.glue_data.ι_is_open_immersion AlgebraicGeometry.Scheme.GlueData.ι_isOpenImmersion
 
 theorem ι_jointly_surjective (x : 𝖣.glued.carrier) :
@@ -283,34 +281,26 @@ def gluedCoverT' (x y z : 𝒰.J) :
 
 @[simp, reassoc]
 theorem gluedCoverT'_fst_fst (x y z : 𝒰.J) :
-    𝒰.gluedCoverT' x y z ≫ pullback.fst ≫ pullback.fst = pullback.fst ≫ pullback.snd :=
-  by
-  delta glued_cover_t'
-  simp
+    𝒰.gluedCoverT' x y z ≫ pullback.fst ≫ pullback.fst = pullback.fst ≫ pullback.snd := by
+  delta glued_cover_t'; simp
 #align algebraic_geometry.Scheme.open_cover.glued_cover_t'_fst_fst AlgebraicGeometry.Scheme.OpenCover.gluedCoverT'_fst_fst
 
 @[simp, reassoc]
 theorem gluedCoverT'_fst_snd (x y z : 𝒰.J) :
-    gluedCoverT' 𝒰 x y z ≫ pullback.fst ≫ pullback.snd = pullback.snd ≫ pullback.snd :=
-  by
-  delta glued_cover_t'
-  simp
+    gluedCoverT' 𝒰 x y z ≫ pullback.fst ≫ pullback.snd = pullback.snd ≫ pullback.snd := by
+  delta glued_cover_t'; simp
 #align algebraic_geometry.Scheme.open_cover.glued_cover_t'_fst_snd AlgebraicGeometry.Scheme.OpenCover.gluedCoverT'_fst_snd
 
 @[simp, reassoc]
 theorem gluedCoverT'_snd_fst (x y z : 𝒰.J) :
-    gluedCoverT' 𝒰 x y z ≫ pullback.snd ≫ pullback.fst = pullback.fst ≫ pullback.snd :=
-  by
-  delta glued_cover_t'
-  simp
+    gluedCoverT' 𝒰 x y z ≫ pullback.snd ≫ pullback.fst = pullback.fst ≫ pullback.snd := by
+  delta glued_cover_t'; simp
 #align algebraic_geometry.Scheme.open_cover.glued_cover_t'_snd_fst AlgebraicGeometry.Scheme.OpenCover.gluedCoverT'_snd_fst
 
 @[simp, reassoc]
 theorem gluedCoverT'_snd_snd (x y z : 𝒰.J) :
-    gluedCoverT' 𝒰 x y z ≫ pullback.snd ≫ pullback.snd = pullback.fst ≫ pullback.fst :=
-  by
-  delta glued_cover_t'
-  simp
+    gluedCoverT' 𝒰 x y z ≫ pullback.snd ≫ pullback.snd = pullback.fst ≫ pullback.fst := by
+  delta glued_cover_t'; simp
 #align algebraic_geometry.Scheme.open_cover.glued_cover_t'_snd_snd AlgebraicGeometry.Scheme.OpenCover.gluedCoverT'_snd_snd
 
 theorem glued_cover_cocycle_fst (x y z : 𝒰.J) :
@@ -382,8 +372,7 @@ theorem fromGlued_injective : Function.Injective 𝒰.fromGlued.1.base :=
   use e.hom ⟨⟨x, y⟩, h⟩
   simp_rw [← comp_apply]
   constructor
-  · erw [is_limit.cone_point_unique_up_to_iso_hom_comp _ _ walking_cospan.left]
-    rfl
+  · erw [is_limit.cone_point_unique_up_to_iso_hom_comp _ _ walking_cospan.left]; rfl
   · erw [pullback_symmetry_hom_comp_fst,
       is_limit.cone_point_unique_up_to_iso_hom_comp _ _ walking_cospan.right]
     rfl
@@ -414,9 +403,7 @@ theorem fromGlued_open_map : IsOpenMap 𝒰.fromGlued.1.base :=
   · rw [← Set.image_preimage_eq_inter_range]
     apply show is_open_immersion (𝒰.map (𝒰.f x)) by infer_instance.base_open.IsOpenMap
     convert hU (𝒰.f x) using 1
-    rw [← ι_from_glued]
-    erw [coe_comp]
-    rw [Set.preimage_comp]
+    rw [← ι_from_glued]; erw [coe_comp]; rw [Set.preimage_comp]
     congr 1
     refine' Set.preimage_image_eq _ 𝒰.from_glued_injective
   · exact ⟨hx, 𝒰.covers x⟩
Diff
@@ -438,7 +438,7 @@ instance : Epi 𝒰.fromGlued.val.base :=
   exact h
 
 instance fromGlued_open_immersion : IsOpenImmersion 𝒰.fromGlued :=
-  SheafedSpace.IsOpenImmersion.ofStalkIso _ 𝒰.fromGlued_openEmbedding
+  SheafedSpace.IsOpenImmersion.of_stalk_iso _ 𝒰.fromGlued_openEmbedding
 #align algebraic_geometry.Scheme.open_cover.from_glued_open_immersion AlgebraicGeometry.Scheme.OpenCover.fromGlued_open_immersion
 
 instance : IsIso 𝒰.fromGlued :=
Diff
@@ -167,7 +167,7 @@ theorem ι_jointly_surjective (x : 𝖣.glued.carrier) :
   𝖣.ι_jointly_surjective (forgetToTop ⋙ forget TopCat) x
 #align algebraic_geometry.Scheme.glue_data.ι_jointly_surjective AlgebraicGeometry.Scheme.GlueData.ι_jointly_surjective
 
-@[simp, reassoc.1]
+@[simp, reassoc]
 theorem glue_condition (i j : D.J) : D.t i j ≫ D.f j i ≫ D.ι j = D.f i j ≫ D.ι i :=
   𝖣.glue_condition i j
 #align algebraic_geometry.Scheme.glue_data.glue_condition AlgebraicGeometry.Scheme.GlueData.glue_condition
@@ -281,7 +281,7 @@ def gluedCoverT' (x y z : 𝒰.J) :
   · simp
 #align algebraic_geometry.Scheme.open_cover.glued_cover_t' AlgebraicGeometry.Scheme.OpenCover.gluedCoverT'
 
-@[simp, reassoc.1]
+@[simp, reassoc]
 theorem gluedCoverT'_fst_fst (x y z : 𝒰.J) :
     𝒰.gluedCoverT' x y z ≫ pullback.fst ≫ pullback.fst = pullback.fst ≫ pullback.snd :=
   by
@@ -289,7 +289,7 @@ theorem gluedCoverT'_fst_fst (x y z : 𝒰.J) :
   simp
 #align algebraic_geometry.Scheme.open_cover.glued_cover_t'_fst_fst AlgebraicGeometry.Scheme.OpenCover.gluedCoverT'_fst_fst
 
-@[simp, reassoc.1]
+@[simp, reassoc]
 theorem gluedCoverT'_fst_snd (x y z : 𝒰.J) :
     gluedCoverT' 𝒰 x y z ≫ pullback.fst ≫ pullback.snd = pullback.snd ≫ pullback.snd :=
   by
@@ -297,7 +297,7 @@ theorem gluedCoverT'_fst_snd (x y z : 𝒰.J) :
   simp
 #align algebraic_geometry.Scheme.open_cover.glued_cover_t'_fst_snd AlgebraicGeometry.Scheme.OpenCover.gluedCoverT'_fst_snd
 
-@[simp, reassoc.1]
+@[simp, reassoc]
 theorem gluedCoverT'_snd_fst (x y z : 𝒰.J) :
     gluedCoverT' 𝒰 x y z ≫ pullback.snd ≫ pullback.fst = pullback.fst ≫ pullback.snd :=
   by
@@ -305,7 +305,7 @@ theorem gluedCoverT'_snd_fst (x y z : 𝒰.J) :
   simp
 #align algebraic_geometry.Scheme.open_cover.glued_cover_t'_snd_fst AlgebraicGeometry.Scheme.OpenCover.gluedCoverT'_snd_fst
 
-@[simp, reassoc.1]
+@[simp, reassoc]
 theorem gluedCoverT'_snd_snd (x y z : 𝒰.J) :
     gluedCoverT' 𝒰 x y z ≫ pullback.snd ≫ pullback.snd = pullback.fst ≫ pullback.fst :=
   by
@@ -362,7 +362,7 @@ def fromGlued : 𝒰.gluedCover.glued ⟶ X :=
   simpa using pullback.condition
 #align algebraic_geometry.Scheme.open_cover.from_glued AlgebraicGeometry.Scheme.OpenCover.fromGlued
 
-@[simp, reassoc.1]
+@[simp, reassoc]
 theorem ι_fromGlued (x : 𝒰.J) : 𝒰.gluedCover.ι x ≫ 𝒰.fromGlued = 𝒰.map x :=
   Multicoequalizer.π_desc _ _ _ _ _
 #align algebraic_geometry.Scheme.open_cover.ι_from_glued AlgebraicGeometry.Scheme.OpenCover.ι_fromGlued
@@ -469,7 +469,7 @@ def glueMorphisms {Y : Scheme} (f : ∀ x, 𝒰.obj x ⟶ Y)
   exact hf i j
 #align algebraic_geometry.Scheme.open_cover.glue_morphisms AlgebraicGeometry.Scheme.OpenCover.glueMorphisms
 
-@[simp, reassoc.1]
+@[simp, reassoc]
 theorem ι_glueMorphisms {Y : Scheme} (f : ∀ x, 𝒰.obj x ⟶ Y)
     (hf : ∀ x y, (pullback.fst : pullback (𝒰.map x) (𝒰.map y) ⟶ _) ≫ f x = pullback.snd ≫ f y)
     (x : 𝒰.J) : 𝒰.map x ≫ 𝒰.glueMorphisms f hf = f x :=
Diff
@@ -438,7 +438,7 @@ instance : Epi 𝒰.fromGlued.val.base :=
   exact h
 
 instance fromGlued_open_immersion : IsOpenImmersion 𝒰.fromGlued :=
-  SheafedSpace.IsOpenImmersion.of_stalk_iso _ 𝒰.fromGlued_openEmbedding
+  SheafedSpace.IsOpenImmersion.ofStalkIso _ 𝒰.fromGlued_openEmbedding
 #align algebraic_geometry.Scheme.open_cover.from_glued_open_immersion AlgebraicGeometry.Scheme.OpenCover.fromGlued_open_immersion
 
 instance : IsIso 𝒰.fromGlued :=
Diff
@@ -364,7 +364,7 @@ def fromGlued : 𝒰.gluedCover.glued ⟶ X :=
 
 @[simp, reassoc.1]
 theorem ι_fromGlued (x : 𝒰.J) : 𝒰.gluedCover.ι x ≫ 𝒰.fromGlued = 𝒰.map x :=
-  multicoequalizer.π_desc _ _ _ _ _
+  Multicoequalizer.π_desc _ _ _ _ _
 #align algebraic_geometry.Scheme.open_cover.ι_from_glued AlgebraicGeometry.Scheme.OpenCover.ι_fromGlued
 
 theorem fromGlued_injective : Function.Injective 𝒰.fromGlued.1.base :=
Diff
@@ -133,7 +133,7 @@ instance : PreservesColimit 𝖣.diagram.multispan forgetToTop :=
   infer_instance
 
 instance : HasMulticoequalizer 𝖣.diagram :=
-  hasColimitOfCreated _ forgetToLocallyRingedSpace
+  hasColimit_of_created _ forgetToLocallyRingedSpace
 
 /-- The glued scheme of a glued space. -/
 abbrev glued : Scheme :=

Changes in mathlib4

mathlib3
mathlib4
chore: adapt to multiple goal linter 1 (#12338)

A PR accompanying #12339.

Zulip discussion

Diff
@@ -129,7 +129,8 @@ def gluedScheme : Scheme := by
   intro x
   obtain ⟨i, y, rfl⟩ := D.toLocallyRingedSpaceGlueData.ι_jointly_surjective x
   refine' ⟨_, _ ≫ D.toLocallyRingedSpaceGlueData.toGlueData.ι i, _⟩
-  swap; exact (D.U i).affineCover.map y
+  swap
+  · exact (D.U i).affineCover.map y
   constructor
   · dsimp [-Set.mem_range]
     rw [coe_comp, Set.range_comp]
@@ -329,8 +330,8 @@ theorem glued_cover_cocycle_snd (x y z : 𝒰.J) :
 theorem glued_cover_cocycle (x y z : 𝒰.J) :
     gluedCoverT' 𝒰 x y z ≫ gluedCoverT' 𝒰 y z x ≫ gluedCoverT' 𝒰 z x y = 𝟙 _ := by
   apply pullback.hom_ext <;> simp_rw [Category.id_comp, Category.assoc]
-  apply glued_cover_cocycle_fst
-  apply glued_cover_cocycle_snd
+  · apply glued_cover_cocycle_fst
+  · apply glued_cover_cocycle_snd
 #align algebraic_geometry.Scheme.open_cover.glued_cover_cocycle AlgebraicGeometry.Scheme.OpenCover.glued_cover_cocycle
 
 /-- The glue data associated with an open cover.
@@ -355,7 +356,7 @@ def gluedCover : Scheme.GlueData.{u} where
 This is an isomorphism, as witnessed by an `IsIso` instance. -/
 def fromGlued : 𝒰.gluedCover.glued ⟶ X := by
   fapply Multicoequalizer.desc
-  exact fun x => 𝒰.map x
+  · exact fun x => 𝒰.map x
   rintro ⟨x, y⟩
   change pullback.fst ≫ _ = ((pullbackSymmetry _ _).hom ≫ pullback.fst) ≫ _
   simpa using pullback.condition
@@ -453,7 +454,7 @@ def glueMorphisms {Y : Scheme} (f : ∀ x, 𝒰.obj x ⟶ Y)
     X ⟶ Y := by
   refine' inv 𝒰.fromGlued ≫ _
   fapply Multicoequalizer.desc
-  exact f
+  · exact f
   rintro ⟨i, j⟩
   change pullback.fst ≫ f i = (_ ≫ _) ≫ f j
   erw [pullbackSymmetry_hom_comp_fst]
chore: classify porting notes referring to missing linters (#12098)

Reference the newly created issues #12094 and #12096, as well as the pre-existing #5171. Change all references to #10927 to #5171. Some of these changes were not labelled as "porting note"; change this for good measure.

Diff
@@ -82,7 +82,7 @@ such that
 We can then glue the schemes `U i` together by identifying `V i j` with `V j i`, such
 that the `U i`'s are open subschemes of the glued space.
 -/
--- Porting note: @[nolint has_nonempty_instance]
+-- Porting note(#5171): @[nolint has_nonempty_instance]; linter not ported yet
 structure GlueData extends CategoryTheory.GlueData Scheme where
   f_open : ∀ i j, IsOpenImmersion (f i j)
 #align algebraic_geometry.Scheme.glue_data AlgebraicGeometry.Scheme.GlueData
chore(AlgebraicGeometry/Gluing): fix soon-to-be-broken proof (#11838)

This proof had two changes added during porting, and these produce a massive timeout after the changes in https://github.com/leanprover/lean4/pull/3807.

This PR replace the change with the appropriate erw, and is now fast before and after the change.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -379,12 +379,8 @@ theorem fromGlued_injective : Function.Injective 𝒰.fromGlued.1.base := by
   right
   use e.hom ⟨⟨x, y⟩, h⟩
   constructor
-  -- Porting note: in the two subproofs below, added the `change` lines
-  · change (e.hom ≫ _) ⟨(x, y), h⟩ = x
-    erw [IsLimit.conePointUniqueUpToIso_hom_comp _ _ WalkingCospan.left]; rfl
-  · change (e.hom ≫ ((gluedCover 𝒰).toGlueData.t i j ≫
-      (gluedCover 𝒰).toGlueData.f j i).val.base) ⟨(x, y), h⟩ = y
-    erw [pullbackSymmetry_hom_comp_fst,
+  · erw [← comp_apply e.hom, IsLimit.conePointUniqueUpToIso_hom_comp _ _ WalkingCospan.left]; rfl
+  · erw [← comp_apply e.hom, pullbackSymmetry_hom_comp_fst,
       IsLimit.conePointUniqueUpToIso_hom_comp _ _ WalkingCospan.right]
     rfl
 #align algebraic_geometry.Scheme.open_cover.from_glued_injective AlgebraicGeometry.Scheme.OpenCover.fromGlued_injective
style: reduce spacing variation in "porting note" comments (#10886)

In this pull request, I have systematically eliminated the leading whitespace preceding the colon (:) within all unlabelled or unclassified porting notes. This adjustment facilitates a more efficient review process for the remaining notes by ensuring no entries are overlooked due to formatting inconsistencies.

Diff
@@ -180,7 +180,7 @@ theorem ι_jointly_surjective (x : 𝖣.glued.carrier) :
   𝖣.ι_jointly_surjective (forgetToTop ⋙ forget TopCat) x
 #align algebraic_geometry.Scheme.glue_data.ι_jointly_surjective AlgebraicGeometry.Scheme.GlueData.ι_jointly_surjective
 
--- Porting note : promote to higher priority to short circuit simplifier
+-- Porting note: promote to higher priority to short circuit simplifier
 @[simp (high), reassoc]
 theorem glue_condition (i j : D.J) : D.t i j ≫ D.f j i ≫ D.ι j = D.f i j ≫ D.ι i :=
   𝖣.glue_condition i j
chore: remove terminal, terminal refines (#10762)

I replaced a few "terminal" refine/refine's with exact.

The strategy was very simple-minded: essentially any refine whose following line had smaller indentation got replaced by exact and then I cleaned up the mess.

This PR certainly leaves some further terminal refines, but maybe the current change is beneficial.

Diff
@@ -414,7 +414,7 @@ theorem fromGlued_open_map : IsOpenMap 𝒰.fromGlued.1.base := by
     convert hU (𝒰.f x) using 1
     rw [← ι_fromGlued]; erw [coe_comp]; rw [Set.preimage_comp]
     congr! 1
-    refine' Set.preimage_image_eq _ 𝒰.fromGlued_injective
+    exact Set.preimage_image_eq _ 𝒰.fromGlued_injective
   · exact ⟨hx, 𝒰.Covers x⟩
 #align algebraic_geometry.Scheme.open_cover.from_glued_open_map AlgebraicGeometry.Scheme.OpenCover.fromGlued_open_map
 
chore: move (locally) ringed spaces out of AlgebraicGeometry (#7330)

Create new folder Geometry.RingedSpace for (locally) ringed spaces and move about half of the contents of AlgebraicGeometry there. Files renamed:

AlgebraicGeometry.OpenImmersion.Scheme → AlgebraicGeometry.OpenImmersion
AlgebraicGeometry.RingedSpace → Geometry.RingedSpace.Basic
AlgebraicGeometry.LocallyRingedSpace → Geometry.RingedSpace.LocallyRingedSpace
AlgebraicGeometry.LocallyRingedSpace.HasColimits → Geometry.RingedSpace.LocallyRingedSpace.HasColimits
AlgebraicGeometry.OpenImmersion.Basic → Geometry.RingedSpace.OpenImmersion
AlgebraicGeometry.PresheafedSpace → Geometry.RingedSpace.PresheafedSpace
AlgebraicGeometry.PresheafedSpace.Gluing → Geometry.RingedSpace.PresheafedSpace.Gluing
AlgebraicGeometry.PresheafedSpace.HasColimits → Geometry.RingedSpace.PresheafedSpace.HasColimits
AlgebraicGeometry.SheafedSpace → Geometry.RingedSpace.SheafedSpace
AlgebraicGeometry.Stalks → Geometry.RingedSpace.Stalks

See Zulip.

Diff
@@ -3,8 +3,8 @@ Copyright (c) 2022 Andrew Yang. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Andrew Yang
 -/
-import Mathlib.AlgebraicGeometry.PresheafedSpace.Gluing
-import Mathlib.AlgebraicGeometry.OpenImmersion.Scheme
+import Mathlib.Geometry.RingedSpace.PresheafedSpace.Gluing
+import Mathlib.AlgebraicGeometry.OpenImmersion
 
 #align_import algebraic_geometry.gluing from "leanprover-community/mathlib"@"533f62f4dd62a5aad24a04326e6e787c8f7e98b1"
 
chore: remove unused simps (#6632)

Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -378,7 +378,6 @@ theorem fromGlued_injective : Function.Injective 𝒰.fromGlued.1.base := by
   rw [𝒰.gluedCover.ι_eq_iff]
   right
   use e.hom ⟨⟨x, y⟩, h⟩
-  simp_rw [← comp_apply]
   constructor
   -- Porting note: in the two subproofs below, added the `change` lines
   · change (e.hom ≫ _) ⟨(x, y), h⟩ = x
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2022 Andrew Yang. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Andrew Yang
-
-! This file was ported from Lean 3 source module algebraic_geometry.gluing
-! leanprover-community/mathlib commit 533f62f4dd62a5aad24a04326e6e787c8f7e98b1
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.AlgebraicGeometry.PresheafedSpace.Gluing
 import Mathlib.AlgebraicGeometry.OpenImmersion.Scheme
 
+#align_import algebraic_geometry.gluing from "leanprover-community/mathlib"@"533f62f4dd62a5aad24a04326e6e787c8f7e98b1"
+
 /-!
 # Gluing Schemes
 
chore: fix grammar in docs (#5668)
Diff
@@ -41,7 +41,7 @@ Given a family of gluing data of schemes, we may glue them together.
   (intersection) of `U i` and `U j` over the glued space.
 * `AlgebraicGeometry.Scheme.GlueData.ι_eq_iff` : `ι i x = ι j y` if and only if they coincide
   when restricted to `V i i`.
-* `AlgebraicGeometry.Scheme.GlueData.isOpen_iff` : An subset of the glued scheme is open iff
+* `AlgebraicGeometry.Scheme.GlueData.isOpen_iff` : A subset of the glued scheme is open iff
   all its preimages in `U i` are open.
 
 ## Implementation details
@@ -69,8 +69,8 @@ namespace Scheme
 
 /-- A family of gluing data consists of
 1. An index type `J`
-2. An scheme `U i` for each `i : J`.
-3. An scheme `V i j` for each `i j : J`.
+2. A scheme `U i` for each `i : J`.
+3. A scheme `V i j` for each `i j : J`.
   (Note that this is `J × J → Scheme` rather than `J → J → Scheme` to connect to the
   limits library easier.)
 4. An open immersion `f i j : V i j ⟶ U i` for each `i j : ι`.
chore: tidy various files (#5628)
Diff
@@ -25,8 +25,8 @@ Given a family of gluing data of schemes, we may glue them together.
 * `AlgebraicGeometry.Scheme.GlueData.ι`: The immersion `ι i : U i ⟶ glued` for each `i : J`.
 * `AlgebraicGeometry.Scheme.GlueData.isoCarrier`: The isomorphism between the underlying space
   of the glued scheme and the gluing of the underlying topological spaces.
-* `algebraic_geometry.Scheme.OpenCover.gluedCover`: The glue data associated with an open cover.
-* `algebraic_geometry.Scheme.OpenCover.fromGlued`: The canonical morphism
+* `AlgebraicGeometry.Scheme.OpenCover.gluedCover`: The glue data associated with an open cover.
+* `AlgebraicGeometry.Scheme.OpenCover.fromGlued`: The canonical morphism
   `𝒰.gluedCover.glued ⟶ X`. This has an `is_iso` instance.
 * `AlgebraicGeometry.Scheme.OpenCover.glueMorphisms`: We may glue a family of compatible
   morphisms defined on an open cover of a scheme.
@@ -39,7 +39,7 @@ Given a family of gluing data of schemes, we may glue them together.
   `ι i : U i ⟶ glued` are jointly surjective.
 * `AlgebraicGeometry.Scheme.GlueData.vPullbackConeIsLimit` : `V i j` is the pullback
   (intersection) of `U i` and `U j` over the glued space.
-* `algebraic_geometry.Scheme.glue_data.ι_eq_iff_rel` : `ι i x = ι j y` if and only if they coincide
+* `AlgebraicGeometry.Scheme.GlueData.ι_eq_iff` : `ι i x = ι j y` if and only if they coincide
   when restricted to `V i i`.
 * `AlgebraicGeometry.Scheme.GlueData.isOpen_iff` : An subset of the glued scheme is open iff
   all its preimages in `U i` are open.
@@ -125,7 +125,7 @@ instance (i : 𝖣.J) :
   apply LocallyRingedSpace.GlueData.ι_isOpenImmersion
 
 /-- (Implementation). The glued scheme of a glue data.
-This should not be used outside this file. Use `Scheme.glue_data.glued` instead. -/
+This should not be used outside this file. Use `AlgebraicGeometry.Scheme.GlueData.glued` instead. -/
 def gluedScheme : Scheme := by
   apply LocallyRingedSpace.IsOpenImmersion.scheme
     D.toLocallyRingedSpaceGlueData.toGlueData.glued
@@ -190,7 +190,7 @@ theorem glue_condition (i j : D.J) : D.t i j ≫ D.f j i ≫ D.ι j = D.f i j 
 #align algebraic_geometry.Scheme.glue_data.glue_condition AlgebraicGeometry.Scheme.GlueData.glue_condition
 
 /-- The pullback cone spanned by `V i j ⟶ U i` and `V i j ⟶ U j`.
-This is a pullback diagram (`V_pullback_cone_is_limit`). -/
+This is a pullback diagram (`vPullbackConeIsLimit`). -/
 def vPullbackCone (i j : D.J) : PullbackCone (D.ι i) (D.ι j) :=
   PullbackCone.mk (D.f i j) (D.t i j ≫ D.f j i) (by simp)
 #align algebraic_geometry.Scheme.glue_data.V_pullback_cone AlgebraicGeometry.Scheme.GlueData.vPullbackCone
@@ -238,7 +238,7 @@ theorem ι_isoCarrier_inv (i : D.J) :
 #align algebraic_geometry.Scheme.glue_data.ι_iso_carrier_inv AlgebraicGeometry.Scheme.GlueData.ι_isoCarrier_inv
 
 /-- An equivalence relation on `Σ i, D.U i` that holds iff `𝖣 .ι i x = 𝖣 .ι j y`.
-See `Scheme.gluing_data.ι_eq_iff`. -/
+See `AlgebraicGeometry.Scheme.GlueData.ι_eq_iff`. -/
 def Rel (a b : Σ i, ((D.U i).carrier : Type _)) : Prop :=
   a = b ∨
     ∃ x : (D.V (a.1, b.1)).carrier, (D.f _ _).1.base x = a.2 ∧ (D.t _ _ ≫ D.f _ _).1.base x = b.2
@@ -337,7 +337,7 @@ theorem glued_cover_cocycle (x y z : 𝒰.J) :
 #align algebraic_geometry.Scheme.open_cover.glued_cover_cocycle AlgebraicGeometry.Scheme.OpenCover.glued_cover_cocycle
 
 /-- The glue data associated with an open cover.
-The canonical isomorphism `𝒰.glued_cover.glued ⟶ X` is provided by `𝒰.from_glued`. -/
+The canonical isomorphism `𝒰.gluedCover.glued ⟶ X` is provided by `𝒰.fromGlued`. -/
 @[simps]
 def gluedCover : Scheme.GlueData.{u} where
   J := 𝒰.J
@@ -355,7 +355,7 @@ def gluedCover : Scheme.GlueData.{u} where
 #align algebraic_geometry.Scheme.open_cover.glued_cover AlgebraicGeometry.Scheme.OpenCover.gluedCover
 
 /-- The canonical morphism from the gluing of an open cover of `X` into `X`.
-This is an isomorphism, as witnessed by an `is_iso` instance. -/
+This is an isomorphism, as witnessed by an `IsIso` instance. -/
 def fromGlued : 𝒰.gluedCover.glued ⟶ X := by
   fapply Multicoequalizer.desc
   exact fun x => 𝒰.map x
feat: port AlgebraicGeometry.Gluing (#5446)

Co-authored-by: Johan Commelin <johan@commelin.net> Co-authored-by: Jujian Zhang <jujian.zhang1998@outlook.com>

Dependencies 11 + 922

923 files ported (98.8%)
382630 lines ported (98.6%)
Show graph

The unported dependencies are