algebraic_geometry.locally_ringed_space.has_colimitsMathlib.Geometry.RingedSpace.LocallyRingedSpace.HasColimits

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,9 +3,9 @@ Copyright (c) 2021 Andrew Yang. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Andrew Yang
 -/
-import AlgebraicGeometry.LocallyRingedSpace
+import Geometry.RingedSpace.LocallyRingedSpace
 import Algebra.Category.Ring.Constructions
-import AlgebraicGeometry.OpenImmersion.Basic
+import Geometry.RingedSpace.OpenImmersion
 import CategoryTheory.Limits.Constructions.LimitsOfProductsAndEqualizers
 
 #align_import algebraic_geometry.locally_ringed_space.has_colimits from "leanprover-community/mathlib"@"e8e130de9dba4ed6897183c3193c752ffadbcc77"
Diff
@@ -102,7 +102,7 @@ noncomputable def coproductCofanIsColimit : IsColimit (coproductCofan F)
       have :=
         PresheafedSpace.stalk_map.comp (colimit.ι (F ⋙ forget_to_SheafedSpace) i : _)
           (colimit.desc (F ⋙ forget_to_SheafedSpace) (forget_to_SheafedSpace.map_cocone s)) y
-      rw [← is_iso.comp_inv_eq] at this 
+      rw [← is_iso.comp_inv_eq] at this
       erw [← this,
         PresheafedSpace.stalk_map.congr_hom _ _
           (colimit.ι_desc (forget_to_SheafedSpace.map_cocone s) i : _)]
@@ -141,7 +141,7 @@ instance coequalizer_π_app_isLocalRingHom
     IsLocalRingHom ((coequalizer.π f.val g.val : _).c.app (op U)) :=
   by
   have := ι_comp_coequalizer_comparison f.1 g.1 SheafedSpace.forget_to_PresheafedSpace
-  rw [← preserves_coequalizer.iso_hom] at this 
+  rw [← preserves_coequalizer.iso_hom] at this
   erw [SheafedSpace.congr_app this.symm (op U)]
   rw [PresheafedSpace.comp_c_app, ←
     PresheafedSpace.colimit_presheaf_obj_iso_componentwise_limit_hom_π]
@@ -232,7 +232,7 @@ instance coequalizer_π_stalk_isLocalRingHom (x : Y) :
   constructor
   rintro a ha
   rcases TopCat.Presheaf.germ_exist _ _ a with ⟨U, hU, s, rfl⟩
-  erw [PresheafedSpace.stalk_map_germ_apply (coequalizer.π f.1 g.1 : _) U ⟨_, hU⟩] at ha 
+  erw [PresheafedSpace.stalk_map_germ_apply (coequalizer.π f.1 g.1 : _) U ⟨_, hU⟩] at ha
   let V := image_basic_open f g U s
   have hV : (coequalizer.π f.1 g.1).base ⁻¹' ((coequalizer.π f.1 g.1).base '' V.1) = V.1 :=
     image_basic_open_image_preimage f g U s
Diff
@@ -3,10 +3,10 @@ Copyright (c) 2021 Andrew Yang. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Andrew Yang
 -/
-import Mathbin.AlgebraicGeometry.LocallyRingedSpace
-import Mathbin.Algebra.Category.Ring.Constructions
-import Mathbin.AlgebraicGeometry.OpenImmersion.Basic
-import Mathbin.CategoryTheory.Limits.Constructions.LimitsOfProductsAndEqualizers
+import AlgebraicGeometry.LocallyRingedSpace
+import Algebra.Category.Ring.Constructions
+import AlgebraicGeometry.OpenImmersion.Basic
+import CategoryTheory.Limits.Constructions.LimitsOfProductsAndEqualizers
 
 #align_import algebraic_geometry.locally_ringed_space.has_colimits from "leanprover-community/mathlib"@"e8e130de9dba4ed6897183c3193c752ffadbcc77"
 
Diff
@@ -2,17 +2,14 @@
 Copyright (c) 2021 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.locally_ringed_space.has_colimits
-! leanprover-community/mathlib commit e8e130de9dba4ed6897183c3193c752ffadbcc77
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.AlgebraicGeometry.LocallyRingedSpace
 import Mathbin.Algebra.Category.Ring.Constructions
 import Mathbin.AlgebraicGeometry.OpenImmersion.Basic
 import Mathbin.CategoryTheory.Limits.Constructions.LimitsOfProductsAndEqualizers
 
+#align_import algebraic_geometry.locally_ringed_space.has_colimits from "leanprover-community/mathlib"@"e8e130de9dba4ed6897183c3193c752ffadbcc77"
+
 /-!
 # Colimits of LocallyRingedSpace
 
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.locally_ringed_space.has_colimits
-! leanprover-community/mathlib commit 533f62f4dd62a5aad24a04326e6e787c8f7e98b1
+! leanprover-community/mathlib commit e8e130de9dba4ed6897183c3193c752ffadbcc77
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -16,6 +16,9 @@ import Mathbin.CategoryTheory.Limits.Constructions.LimitsOfProductsAndEqualizers
 /-!
 # Colimits of LocallyRingedSpace
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 We construct the explicit coproducts and coequalizers of `LocallyRingedSpace`.
 It then follows that `LocallyRingedSpace` has all colimits, and
 `forget_to_SheafedSpace` preserves them.
Diff
@@ -62,6 +62,7 @@ section HasCoproducts
 
 variable {ι : Type u} (F : Discrete ι ⥤ LocallyRingedSpace.{u})
 
+#print AlgebraicGeometry.LocallyRingedSpace.coproduct /-
 /-- The explicit coproduct for `F : discrete ι ⥤ LocallyRingedSpace`. -/
 noncomputable def coproduct : LocallyRingedSpace
     where
@@ -76,7 +77,9 @@ noncomputable def coproduct : LocallyRingedSpace
               (PresheafedSpace.stalk_map (colimit.ι (F ⋙ forget_to_SheafedSpace) i : _)
                 y)).symm.commRingCatIsoToRingEquiv.LocalRing
 #align algebraic_geometry.LocallyRingedSpace.coproduct AlgebraicGeometry.LocallyRingedSpace.coproduct
+-/
 
+#print AlgebraicGeometry.LocallyRingedSpace.coproductCofan /-
 /-- The explicit coproduct cofan for `F : discrete ι ⥤ LocallyRingedSpace`. -/
 noncomputable def coproductCofan : Cocone F
     where
@@ -85,7 +88,9 @@ noncomputable def coproductCofan : Cocone F
     { app := fun j => ⟨colimit.ι (F ⋙ forgetToSheafedSpace) j, inferInstance⟩
       naturality' := fun j j' f => by cases j; cases j'; tidy }
 #align algebraic_geometry.LocallyRingedSpace.coproduct_cofan AlgebraicGeometry.LocallyRingedSpace.coproductCofan
+-/
 
+#print AlgebraicGeometry.LocallyRingedSpace.coproductCofanIsColimit /-
 /-- The explicit coproduct cofan constructed in `coproduct_cofan` is indeed a colimit. -/
 noncomputable def coproductCofanIsColimit : IsColimit (coproductCofan F)
     where
@@ -112,6 +117,7 @@ noncomputable def coproductCofanIsColimit : IsColimit (coproductCofan F)
       (IsColimit.uniq _ (forgetToSheafedSpace.mapCocone s) f.1 fun j =>
         congr_arg LocallyRingedSpace.Hom.val (h j))
 #align algebraic_geometry.LocallyRingedSpace.coproduct_cofan_is_colimit AlgebraicGeometry.LocallyRingedSpace.coproductCofanIsColimit
+-/
 
 instance : HasCoproducts.{u} LocallyRingedSpace.{u} := fun ι =>
   ⟨fun F => ⟨⟨⟨_, coproductCofanIsColimit F⟩⟩⟩⟩
@@ -129,6 +135,7 @@ variable {X Y : LocallyRingedSpace.{v}} (f g : X ⟶ Y)
 
 namespace HasCoequalizer
 
+#print AlgebraicGeometry.LocallyRingedSpace.HasCoequalizer.coequalizer_π_app_isLocalRingHom /-
 instance coequalizer_π_app_isLocalRingHom
     (U : TopologicalSpace.Opens (coequalizer f.val g.val).carrier) :
     IsLocalRingHom ((coequalizer.π f.val g.val : _).c.app (op U)) :=
@@ -140,6 +147,7 @@ instance coequalizer_π_app_isLocalRingHom
     PresheafedSpace.colimit_presheaf_obj_iso_componentwise_limit_hom_π]
   infer_instance
 #align algebraic_geometry.LocallyRingedSpace.has_coequalizer.coequalizer_π_app_is_local_ring_hom AlgebraicGeometry.LocallyRingedSpace.HasCoequalizer.coequalizer_π_app_isLocalRingHom
+-/
 
 /-!
 We roughly follow the construction given in [MR0302656]. Given a pair `f, g : X ⟶ Y` of morphisms
@@ -164,12 +172,15 @@ variable (U : Opens (coequalizer f.1 g.1).carrier)
 
 variable (s : (coequalizer f.1 g.1).Presheaf.obj (op U))
 
+#print AlgebraicGeometry.LocallyRingedSpace.HasCoequalizer.imageBasicOpen /-
 /-- (Implementation). The basic open set of the section `π꙳ s`. -/
 noncomputable def imageBasicOpen : Opens Y :=
   Y.toRingedSpace.basicOpen
     (show Y.Presheaf.obj (op (unop _)) from ((coequalizer.π f.1 g.1).c.app (op U)) s)
 #align algebraic_geometry.LocallyRingedSpace.has_coequalizer.image_basic_open AlgebraicGeometry.LocallyRingedSpace.HasCoequalizer.imageBasicOpen
+-/
 
+#print AlgebraicGeometry.LocallyRingedSpace.HasCoequalizer.imageBasicOpen_image_preimage /-
 theorem imageBasicOpen_image_preimage :
     (coequalizer.π f.1 g.1).base ⁻¹' ((coequalizer.π f.1 g.1).base '' (imageBasicOpen f g U s).1) =
       (imageBasicOpen f g U s).1 :=
@@ -197,7 +208,9 @@ theorem imageBasicOpen_image_preimage :
     rw [coequalizer.condition f.1 g.1]
     exact fun _ h => h
 #align algebraic_geometry.LocallyRingedSpace.has_coequalizer.image_basic_open_image_preimage AlgebraicGeometry.LocallyRingedSpace.HasCoequalizer.imageBasicOpen_image_preimage
+-/
 
+#print AlgebraicGeometry.LocallyRingedSpace.HasCoequalizer.imageBasicOpen_image_open /-
 theorem imageBasicOpen_image_open :
     IsOpen ((coequalizer.π f.1 g.1).base '' (imageBasicOpen f g U s).1) :=
   by
@@ -210,7 +223,9 @@ theorem imageBasicOpen_image_open :
   rw [image_basic_open_image_preimage]
   exact (image_basic_open f g U s).2
 #align algebraic_geometry.LocallyRingedSpace.has_coequalizer.image_basic_open_image_open AlgebraicGeometry.LocallyRingedSpace.HasCoequalizer.imageBasicOpen_image_open
+-/
 
+#print AlgebraicGeometry.LocallyRingedSpace.HasCoequalizer.coequalizer_π_stalk_isLocalRingHom /-
 instance coequalizer_π_stalk_isLocalRingHom (x : Y) :
     IsLocalRingHom (PresheafedSpace.stalkMap (coequalizer.π f.val g.val : _) x) :=
   by
@@ -241,9 +256,11 @@ instance coequalizer_π_stalk_isLocalRingHom (x : Y) :
       (((coequalizer.π f.val g.val).c.app (op U)) s)
   infer_instance
 #align algebraic_geometry.LocallyRingedSpace.has_coequalizer.coequalizer_π_stalk_is_local_ring_hom AlgebraicGeometry.LocallyRingedSpace.HasCoequalizer.coequalizer_π_stalk_isLocalRingHom
+-/
 
 end HasCoequalizer
 
+#print AlgebraicGeometry.LocallyRingedSpace.coequalizer /-
 /-- The coequalizer of two locally ringed space in the category of sheafed spaces is a locally
 ringed space. -/
 noncomputable def coequalizer : LocallyRingedSpace
@@ -255,19 +272,25 @@ noncomputable def coequalizer : LocallyRingedSpace
       (TopCat.epi_iff_surjective (coequalizer.π f.val g.val).base).mp inferInstance x
     exact (PresheafedSpace.stalk_map (coequalizer.π f.val g.val : _) y).domain_localRing
 #align algebraic_geometry.LocallyRingedSpace.coequalizer AlgebraicGeometry.LocallyRingedSpace.coequalizer
+-/
 
+#print AlgebraicGeometry.LocallyRingedSpace.coequalizerCofork /-
 /-- The explicit coequalizer cofork of locally ringed spaces. -/
 noncomputable def coequalizerCofork : Cofork f g :=
   @Cofork.ofπ _ _ _ _ f g (coequalizer f g) ⟨coequalizer.π f.1 g.1, inferInstance⟩
     (LocallyRingedSpace.Hom.ext _ _ (coequalizer.condition f.1 g.1))
 #align algebraic_geometry.LocallyRingedSpace.coequalizer_cofork AlgebraicGeometry.LocallyRingedSpace.coequalizerCofork
+-/
 
+#print AlgebraicGeometry.LocallyRingedSpace.isLocalRingHom_stalkMap_congr /-
 theorem isLocalRingHom_stalkMap_congr {X Y : RingedSpace} (f g : X ⟶ Y) (H : f = g) (x)
     (h : IsLocalRingHom (PresheafedSpace.stalkMap f x)) :
     IsLocalRingHom (PresheafedSpace.stalkMap g x) := by
   rw [PresheafedSpace.stalk_map.congr_hom _ _ H.symm x]; infer_instance
 #align algebraic_geometry.LocallyRingedSpace.is_local_ring_hom_stalk_map_congr AlgebraicGeometry.LocallyRingedSpace.isLocalRingHom_stalkMap_congr
+-/
 
+#print AlgebraicGeometry.LocallyRingedSpace.coequalizerCoforkIsColimit /-
 /-- The cofork constructed in `coequalizer_cofork` is indeed a colimit cocone. -/
 noncomputable def coequalizerCoforkIsColimit : IsColimit (coequalizerCofork f g) :=
   by
@@ -297,6 +320,7 @@ noncomputable def coequalizerCoforkIsColimit : IsColimit (coequalizerCofork f g)
     exact h
   · exact h
 #align algebraic_geometry.LocallyRingedSpace.coequalizer_cofork_is_colimit AlgebraicGeometry.LocallyRingedSpace.coequalizerCoforkIsColimit
+-/
 
 instance : HasCoequalizer f g :=
   ⟨⟨⟨_, coequalizerCoforkIsColimit f g⟩⟩⟩
@@ -304,6 +328,7 @@ instance : HasCoequalizer f g :=
 instance : HasCoequalizers LocallyRingedSpace :=
   hasCoequalizers_of_hasColimit_parallelPair _
 
+#print AlgebraicGeometry.LocallyRingedSpace.preservesCoequalizer /-
 noncomputable instance preservesCoequalizer :
     PreservesColimitsOfShape WalkingParallelPair forgetToSheafedSpace.{v} :=
   ⟨fun F => by
@@ -313,6 +338,7 @@ noncomputable instance preservesCoequalizer :
     dsimp only [forget_to_SheafedSpace]
     exact coequalizer_is_coequalizer _ _⟩
 #align algebraic_geometry.LocallyRingedSpace.preserves_coequalizer AlgebraicGeometry.LocallyRingedSpace.preservesCoequalizer
+-/
 
 end HasCoequalizer
 
Diff
@@ -39,12 +39,12 @@ theorem isColimit_exists_rep {c : Cocone F} (hc : IsColimit c) (x : c.pt) :
     ∃ (i : J) (y : F.obj i), (c.ι.app i).base y = x :=
   Concrete.isColimit_exists_rep (F ⋙ SheafedSpace.forget _)
     (isColimitOfPreserves (SheafedSpace.forget _) hc) x
-#align algebraic_geometry.SheafedSpace.is_colimit_exists_rep AlgebraicGeometry.SheafedSpace.isColimit_exists_rep
+#align algebraic_geometry.SheafedSpace.is_colimit_exists_rep AlgebraicGeometry.SheafedSpaceₓ.isColimit_exists_rep
 
 theorem colimit_exists_rep (x : colimit F) : ∃ (i : J) (y : F.obj i), (colimit.ι F i).base y = x :=
   Concrete.isColimit_exists_rep (F ⋙ SheafedSpace.forget _)
     (isColimitOfPreserves (SheafedSpace.forget _) (colimit.isColimit F)) x
-#align algebraic_geometry.SheafedSpace.colimit_exists_rep AlgebraicGeometry.SheafedSpace.colimit_exists_rep
+#align algebraic_geometry.SheafedSpace.colimit_exists_rep AlgebraicGeometry.SheafedSpaceₓ.colimit_exists_rep
 
 instance {X Y : SheafedSpace C} (f g : X ⟶ Y) : Epi (coequalizer.π f g).base :=
   by
Diff
@@ -4,13 +4,13 @@ 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.locally_ringed_space.has_colimits
-! leanprover-community/mathlib commit d39590fc8728fbf6743249802486f8c91ffe07bc
+! 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.LocallyRingedSpace
 import Mathbin.Algebra.Category.Ring.Constructions
-import Mathbin.AlgebraicGeometry.OpenImmersion
+import Mathbin.AlgebraicGeometry.OpenImmersion.Basic
 import Mathbin.CategoryTheory.Limits.Constructions.LimitsOfProductsAndEqualizers
 
 /-!
Diff
@@ -236,7 +236,8 @@ instance coequalizer_π_stalk_isLocalRingHom (x : Y) :
   rw [← isUnit_map_iff ((coequalizer.π f.val g.val : _).c.app _), ← comp_apply,
     nat_trans.naturality, comp_apply, TopCat.Presheaf.pushforwardObj_map, ←
     isUnit_map_iff (Y.presheaf.map (eq_to_hom hV').op), ← comp_apply, ← functor.map_comp]
-  convert@RingedSpace.is_unit_res_basic_open Y.to_RingedSpace (unop _)
+  convert
+    @RingedSpace.is_unit_res_basic_open Y.to_RingedSpace (unop _)
       (((coequalizer.π f.val g.val).c.app (op U)) s)
   infer_instance
 #align algebraic_geometry.LocallyRingedSpace.has_coequalizer.coequalizer_π_stalk_is_local_ring_hom AlgebraicGeometry.LocallyRingedSpace.HasCoequalizer.coequalizer_π_stalk_isLocalRingHom
Diff
@@ -36,12 +36,12 @@ variable {C : Type u} [Category.{v} C] [HasLimits C]
 variable {J : Type v} [Category.{v} J] (F : J ⥤ SheafedSpace C)
 
 theorem isColimit_exists_rep {c : Cocone F} (hc : IsColimit c) (x : c.pt) :
-    ∃ (i : J)(y : F.obj i), (c.ι.app i).base y = x :=
+    ∃ (i : J) (y : F.obj i), (c.ι.app i).base y = x :=
   Concrete.isColimit_exists_rep (F ⋙ SheafedSpace.forget _)
     (isColimitOfPreserves (SheafedSpace.forget _) hc) x
 #align algebraic_geometry.SheafedSpace.is_colimit_exists_rep AlgebraicGeometry.SheafedSpace.isColimit_exists_rep
 
-theorem colimit_exists_rep (x : colimit F) : ∃ (i : J)(y : F.obj i), (colimit.ι F i).base y = x :=
+theorem colimit_exists_rep (x : colimit F) : ∃ (i : J) (y : F.obj i), (colimit.ι F i).base y = x :=
   Concrete.isColimit_exists_rep (F ⋙ SheafedSpace.forget _)
     (isColimitOfPreserves (SheafedSpace.forget _) (colimit.isColimit F)) x
 #align algebraic_geometry.SheafedSpace.colimit_exists_rep AlgebraicGeometry.SheafedSpace.colimit_exists_rep
@@ -97,7 +97,7 @@ noncomputable def coproductCofanIsColimit : IsColimit (coproductCofan F)
       have :=
         PresheafedSpace.stalk_map.comp (colimit.ι (F ⋙ forget_to_SheafedSpace) i : _)
           (colimit.desc (F ⋙ forget_to_SheafedSpace) (forget_to_SheafedSpace.map_cocone s)) y
-      rw [← is_iso.comp_inv_eq] at this
+      rw [← is_iso.comp_inv_eq] at this 
       erw [← this,
         PresheafedSpace.stalk_map.congr_hom _ _
           (colimit.ι_desc (forget_to_SheafedSpace.map_cocone s) i : _)]
@@ -134,7 +134,7 @@ instance coequalizer_π_app_isLocalRingHom
     IsLocalRingHom ((coequalizer.π f.val g.val : _).c.app (op U)) :=
   by
   have := ι_comp_coequalizer_comparison f.1 g.1 SheafedSpace.forget_to_PresheafedSpace
-  rw [← preserves_coequalizer.iso_hom] at this
+  rw [← preserves_coequalizer.iso_hom] at this 
   erw [SheafedSpace.congr_app this.symm (op U)]
   rw [PresheafedSpace.comp_c_app, ←
     PresheafedSpace.colimit_presheaf_obj_iso_componentwise_limit_hom_π]
@@ -217,7 +217,7 @@ instance coequalizer_π_stalk_isLocalRingHom (x : Y) :
   constructor
   rintro a ha
   rcases TopCat.Presheaf.germ_exist _ _ a with ⟨U, hU, s, rfl⟩
-  erw [PresheafedSpace.stalk_map_germ_apply (coequalizer.π f.1 g.1 : _) U ⟨_, hU⟩] at ha
+  erw [PresheafedSpace.stalk_map_germ_apply (coequalizer.π f.1 g.1 : _) U ⟨_, hU⟩] at ha 
   let V := image_basic_open f g U s
   have hV : (coequalizer.π f.1 g.1).base ⁻¹' ((coequalizer.π f.1 g.1).base '' V.1) = V.1 :=
     image_basic_open_image_preimage f g U s
Diff
@@ -83,10 +83,7 @@ noncomputable def coproductCofan : Cocone F
   pt := coproduct F
   ι :=
     { app := fun j => ⟨colimit.ι (F ⋙ forgetToSheafedSpace) j, inferInstance⟩
-      naturality' := fun j j' f => by
-        cases j
-        cases j'
-        tidy }
+      naturality' := fun j j' f => by cases j; cases j'; tidy }
 #align algebraic_geometry.LocallyRingedSpace.coproduct_cofan AlgebraicGeometry.LocallyRingedSpace.coproductCofan
 
 /-- The explicit coproduct cofan constructed in `coproduct_cofan` is indeed a colimit. -/
@@ -266,10 +263,8 @@ noncomputable def coequalizerCofork : Cofork f g :=
 
 theorem isLocalRingHom_stalkMap_congr {X Y : RingedSpace} (f g : X ⟶ Y) (H : f = g) (x)
     (h : IsLocalRingHom (PresheafedSpace.stalkMap f x)) :
-    IsLocalRingHom (PresheafedSpace.stalkMap g x) :=
-  by
-  rw [PresheafedSpace.stalk_map.congr_hom _ _ H.symm x]
-  infer_instance
+    IsLocalRingHom (PresheafedSpace.stalkMap g x) := by
+  rw [PresheafedSpace.stalk_map.congr_hom _ _ H.symm x]; infer_instance
 #align algebraic_geometry.LocallyRingedSpace.is_local_ring_hom_stalk_map_congr AlgebraicGeometry.LocallyRingedSpace.isLocalRingHom_stalkMap_congr
 
 /-- The cofork constructed in `coequalizer_cofork` is indeed a colimit cocone. -/
@@ -290,10 +285,7 @@ noncomputable def coequalizerCoforkIsColimit : IsColimit (coequalizerCofork f g)
   constructor
   · exact LocallyRingedSpace.hom.ext _ _ (coequalizer.π_desc _ _)
   intro m h
-  replace h : (coequalizer_cofork f g).π.1 ≫ m.1 = s.π.1 :=
-    by
-    rw [← h]
-    rfl
+  replace h : (coequalizer_cofork f g).π.1 ≫ m.1 = s.π.1 := by rw [← h]; rfl
   apply LocallyRingedSpace.hom.ext
   apply (colimit.is_colimit (parallel_pair f.1 g.1)).uniq (cofork.of_π s.π.1 e) m.1
   rintro ⟨⟩
Diff
@@ -74,7 +74,7 @@ noncomputable def coproduct : LocallyRingedSpace
     exact
       (as_iso
               (PresheafedSpace.stalk_map (colimit.ι (F ⋙ forget_to_SheafedSpace) i : _)
-                y)).symm.commRingIsoToRingEquiv.LocalRing
+                y)).symm.commRingCatIsoToRingEquiv.LocalRing
 #align algebraic_geometry.LocallyRingedSpace.coproduct AlgebraicGeometry.LocallyRingedSpace.coproduct
 
 /-- The explicit coproduct cofan for `F : discrete ι ⥤ LocallyRingedSpace`. -/
Diff
@@ -239,8 +239,7 @@ instance coequalizer_π_stalk_isLocalRingHom (x : Y) :
   rw [← isUnit_map_iff ((coequalizer.π f.val g.val : _).c.app _), ← comp_apply,
     nat_trans.naturality, comp_apply, TopCat.Presheaf.pushforwardObj_map, ←
     isUnit_map_iff (Y.presheaf.map (eq_to_hom hV').op), ← comp_apply, ← functor.map_comp]
-  convert
-    @RingedSpace.is_unit_res_basic_open Y.to_RingedSpace (unop _)
+  convert@RingedSpace.is_unit_res_basic_open Y.to_RingedSpace (unop _)
       (((coequalizer.π f.val g.val).c.app (op U)) s)
   infer_instance
 #align algebraic_geometry.LocallyRingedSpace.has_coequalizer.coequalizer_π_stalk_is_local_ring_hom AlgebraicGeometry.LocallyRingedSpace.HasCoequalizer.coequalizer_π_stalk_isLocalRingHom
Diff
@@ -35,7 +35,7 @@ variable {C : Type u} [Category.{v} C] [HasLimits C]
 
 variable {J : Type v} [Category.{v} J] (F : J ⥤ SheafedSpace C)
 
-theorem isColimit_exists_rep {c : Cocone F} (hc : IsColimit c) (x : c.x) :
+theorem isColimit_exists_rep {c : Cocone F} (hc : IsColimit c) (x : c.pt) :
     ∃ (i : J)(y : F.obj i), (c.ι.app i).base y = x :=
   Concrete.isColimit_exists_rep (F ⋙ SheafedSpace.forget _)
     (isColimitOfPreserves (SheafedSpace.forget _) hc) x
@@ -80,7 +80,7 @@ noncomputable def coproduct : LocallyRingedSpace
 /-- The explicit coproduct cofan for `F : discrete ι ⥤ LocallyRingedSpace`. -/
 noncomputable def coproductCofan : Cocone F
     where
-  x := coproduct F
+  pt := coproduct F
   ι :=
     { app := fun j => ⟨colimit.ι (F ⋙ forgetToSheafedSpace) j, inferInstance⟩
       naturality' := fun j j' f => by
Diff
@@ -109,8 +109,8 @@ noncomputable def coproductCofanIsColimit : IsColimit (coproductCofan F)
           (PresheafedSpace.stalk_map ((forget_to_SheafedSpace.map_cocone s).ι.app i) y) :=
         (s.ι.app i).2 y
       infer_instance⟩
-  fac' s j := LocallyRingedSpace.Hom.ext _ _ (colimit.ι_desc _ _)
-  uniq' s f h :=
+  fac s j := LocallyRingedSpace.Hom.ext _ _ (colimit.ι_desc _ _)
+  uniq s f h :=
     LocallyRingedSpace.Hom.ext _ _
       (IsColimit.uniq _ (forgetToSheafedSpace.mapCocone s) f.1 fun j =>
         congr_arg LocallyRingedSpace.Hom.val (h j))
@@ -325,7 +325,7 @@ noncomputable instance preservesCoequalizer :
 end HasCoequalizer
 
 instance : HasColimits LocallyRingedSpace :=
-  hasColimitsOfHasCoequalizersAndCoproducts
+  has_colimits_of_hasCoequalizers_and_coproducts
 
 noncomputable instance : PreservesColimits LocallyRingedSpace.forgetToSheafedSpace :=
   preservesColimitsOfPreservesCoequalizersAndCoproducts _

Changes in mathlib4

mathlib3
mathlib4
chore(*): remove empty lines between variable statements (#11418)

Empty lines were removed by executing the following Python script twice

import os
import re


# Loop through each file in the repository
for dir_path, dirs, files in os.walk('.'):
  for filename in files:
    if filename.endswith('.lean'):
      file_path = os.path.join(dir_path, filename)

      # Open the file and read its contents
      with open(file_path, 'r') as file:
        content = file.read()

      # Use a regular expression to replace sequences of "variable" lines separated by empty lines
      # with sequences without empty lines
      modified_content = re.sub(r'(variable.*\n)\n(variable(?! .* in))', r'\1\2', content)

      # Write the modified content back to the file
      with open(file_path, 'w') as file:
        file.write(modified_content)
Diff
@@ -30,7 +30,6 @@ open CategoryTheory CategoryTheory.Limits Opposite TopologicalSpace
 namespace SheafedSpace
 
 variable {C : Type u} [Category.{v} C] [HasLimits C]
-
 variable {J : Type v} [Category.{v} J] (F : J ⥤ SheafedSpace.{_, _, v} C)
 
 theorem isColimit_exists_rep {c : Cocone F} (hc : IsColimit c) (x : c.pt) :
@@ -175,7 +174,6 @@ are local ring homs.
 
 
 variable (U : Opens (coequalizer f.1 g.1).carrier)
-
 variable (s : (coequalizer f.1 g.1).presheaf.obj (op U))
 
 /-- (Implementation). The basic open set of the section `π꙳ s`. -/
chore: classify rw to erw porting notes (#11225)

Classifies by adding issue number #11224 to porting notes claiming:

change rw to erw

Diff
@@ -204,7 +204,7 @@ theorem imageBasicOpen_image_preimage :
     delta imageBasicOpen
     rw [preimage_basicOpen f, preimage_basicOpen g]
     dsimp only [Functor.op, unop_op]
-    -- Porting note: change `rw` to `erw`
+    -- Porting note (#11224): change `rw` to `erw`
     erw [← comp_apply, ← SheafedSpace.comp_c_app', ← comp_apply, ← SheafedSpace.comp_c_app',
       SheafedSpace.congr_app (coequalizer.condition f.1 g.1), comp_apply,
       X.toRingedSpace.basicOpen_res]
@@ -220,7 +220,7 @@ theorem imageBasicOpen_image_open :
   erw [← coe_comp]
   rw [PreservesCoequalizer.iso_hom, ι_comp_coequalizerComparison]
   dsimp only [SheafedSpace.forget]
-  -- Porting note: change `rw` to `erw`
+  -- Porting note (#11224): change `rw` to `erw`
   erw [imageBasicOpen_image_preimage]
   exact (imageBasicOpen f g U s).2
 #align algebraic_geometry.LocallyRingedSpace.has_coequalizer.image_basic_open_image_open AlgebraicGeometry.LocallyRingedSpace.HasCoequalizer.imageBasicOpen_image_open
@@ -249,7 +249,7 @@ instance coequalizer_π_stalk_isLocalRingHom (x : Y) :
   rw [← isUnit_map_iff ((coequalizer.π f.val g.val : _).c.app _), ← comp_apply,
     NatTrans.naturality, comp_apply, TopCat.Presheaf.pushforwardObj_map, ←
     isUnit_map_iff (Y.presheaf.map (eqToHom hV').op)]
-  -- Porting note: change `rw` to `erw`
+  -- Porting note (#11224): change `rw` to `erw`
   erw [← comp_apply, ← comp_apply, ← Y.presheaf.map_comp]
   convert @RingedSpace.isUnit_res_basicOpen Y.toRingedSpace (unop _)
       (((coequalizer.π f.val g.val).c.app (op U)) s)
chore: classify added instance porting notes (#11085)

Classifies by adding issue number #10754 to porting notes claiming anything semantically equivalent to:

  • "added instance"
  • "new instance"
  • "adding instance"
  • "had to add this instance manually"
Diff
@@ -149,7 +149,7 @@ instance coequalizer_π_app_isLocalRingHom
   rw [← PreservesCoequalizer.iso_hom] at this
   erw [SheafedSpace.congr_app this.symm (op U)]
   rw [PresheafedSpace.comp_c_app, ← PresheafedSpace.colimitPresheafObjIsoComponentwiseLimit_hom_π]
-  -- Porting note: this instance has to be manually added
+  -- Porting note (#10754): this instance has to be manually added
   haveI : IsIso (PreservesCoequalizer.iso SheafedSpace.forgetToPresheafedSpace f.val g.val).hom.c :=
     PresheafedSpace.c_isIso_of_iso _
   infer_instance
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
@@ -38,7 +38,7 @@ theorem isColimit_exists_rep {c : Cocone F} (hc : IsColimit c) (x : c.pt) :
   Concrete.isColimit_exists_rep (F ⋙ forget C) (isColimitOfPreserves (forget C) hc) x
 #align algebraic_geometry.SheafedSpace.is_colimit_exists_rep AlgebraicGeometry.SheafedSpaceₓ.isColimit_exists_rep
 
--- Porting note : argument `C` of colimit need to be made explicit, odd
+-- Porting note: argument `C` of colimit need to be made explicit, odd
 theorem colimit_exists_rep (x : colimit (C := SheafedSpace C) F) :
     ∃ (i : J) (y : F.obj i), (colimit.ι F i).base y = x :=
   Concrete.isColimit_exists_rep (F ⋙ SheafedSpace.forget C)
@@ -59,7 +59,7 @@ namespace LocallyRingedSpace
 section HasCoproducts
 
 variable {ι : Type u} (F : Discrete ι ⥤ LocallyRingedSpace.{u})
--- Porting note : in this section, I marked `CommRingCat` as `CommRingCatMax.{u,u}`
+-- Porting note: in this section, I marked `CommRingCat` as `CommRingCatMax.{u,u}`
 -- This is a hack to avoid the following:
 /-
 ```
@@ -149,7 +149,7 @@ instance coequalizer_π_app_isLocalRingHom
   rw [← PreservesCoequalizer.iso_hom] at this
   erw [SheafedSpace.congr_app this.symm (op U)]
   rw [PresheafedSpace.comp_c_app, ← PresheafedSpace.colimitPresheafObjIsoComponentwiseLimit_hom_π]
-  -- Porting note : this instance has to be manually added
+  -- Porting note: this instance has to be manually added
   haveI : IsIso (PreservesCoequalizer.iso SheafedSpace.forgetToPresheafedSpace f.val g.val).hom.c :=
     PresheafedSpace.c_isIso_of_iso _
   infer_instance
@@ -188,7 +188,7 @@ theorem imageBasicOpen_image_preimage :
     (coequalizer.π f.1 g.1).base ⁻¹' ((coequalizer.π f.1 g.1).base '' (imageBasicOpen f g U s).1) =
       (imageBasicOpen f g U s).1 := by
   fapply Types.coequalizer_preimage_image_eq_of_preimage_eq
-    -- Porting note : Type of `f.1.base` and `g.1.base` needs to be explicit
+    -- Porting note: Type of `f.1.base` and `g.1.base` needs to be explicit
     (f.1.base : X.carrier.1 ⟶ Y.carrier.1) (g.1.base : X.carrier.1 ⟶ Y.carrier.1)
   · ext
     simp_rw [types_comp_apply, ← TopCat.comp_app, ← PresheafedSpace.comp_base]
@@ -204,7 +204,7 @@ theorem imageBasicOpen_image_preimage :
     delta imageBasicOpen
     rw [preimage_basicOpen f, preimage_basicOpen g]
     dsimp only [Functor.op, unop_op]
-    -- Porting note : change `rw` to `erw`
+    -- Porting note: change `rw` to `erw`
     erw [← comp_apply, ← SheafedSpace.comp_c_app', ← comp_apply, ← SheafedSpace.comp_c_app',
       SheafedSpace.congr_app (coequalizer.condition f.1 g.1), comp_apply,
       X.toRingedSpace.basicOpen_res]
@@ -220,7 +220,7 @@ theorem imageBasicOpen_image_open :
   erw [← coe_comp]
   rw [PreservesCoequalizer.iso_hom, ι_comp_coequalizerComparison]
   dsimp only [SheafedSpace.forget]
-  -- Porting note : change `rw` to `erw`
+  -- Porting note: change `rw` to `erw`
   erw [imageBasicOpen_image_preimage]
   exact (imageBasicOpen f g U s).2
 #align algebraic_geometry.LocallyRingedSpace.has_coequalizer.image_basic_open_image_open AlgebraicGeometry.LocallyRingedSpace.HasCoequalizer.imageBasicOpen_image_open
@@ -249,7 +249,7 @@ instance coequalizer_π_stalk_isLocalRingHom (x : Y) :
   rw [← isUnit_map_iff ((coequalizer.π f.val g.val : _).c.app _), ← comp_apply,
     NatTrans.naturality, comp_apply, TopCat.Presheaf.pushforwardObj_map, ←
     isUnit_map_iff (Y.presheaf.map (eqToHom hV').op)]
-  -- Porting note : change `rw` to `erw`
+  -- Porting note: change `rw` to `erw`
   erw [← comp_apply, ← comp_apply, ← Y.presheaf.map_comp]
   convert @RingedSpace.isUnit_res_basicOpen Y.toRingedSpace (unop _)
       (((coequalizer.π f.val g.val).c.app (op U)) s)
@@ -270,7 +270,7 @@ noncomputable def coequalizer : LocallyRingedSpace where
 /-- The explicit coequalizer cofork of locally ringed spaces. -/
 noncomputable def coequalizerCofork : Cofork f g :=
   @Cofork.ofπ _ _ _ _ f g (coequalizer f g) ⟨coequalizer.π f.1 g.1,
-    -- Porting note : this used to be automatic
+    -- Porting note: this used to be automatic
     HasCoequalizer.coequalizer_π_stalk_isLocalRingHom _ _⟩
     (LocallyRingedSpace.Hom.ext _ _ (coequalizer.condition f.1 g.1))
 #align algebraic_geometry.LocallyRingedSpace.coequalizer_cofork AlgebraicGeometry.LocallyRingedSpace.coequalizerCofork
@@ -290,7 +290,7 @@ noncomputable def coequalizerCoforkIsColimit : IsColimit (coequalizerCofork f g)
   · intro x
     rcases (TopCat.epi_iff_surjective (coequalizer.π f.val g.val).base).mp inferInstance x with
       ⟨y, rfl⟩
-    -- Porting note : was `apply isLocalRingHom_of_comp _ (PresheafedSpace.stalkMap ...)`, this
+    -- Porting note: was `apply isLocalRingHom_of_comp _ (PresheafedSpace.stalkMap ...)`, this
     -- used to allow you to provide the proof that `... ≫ ...` is a local ring homomorphism later,
     -- but this is no longer possible
     set h := _
@@ -324,7 +324,7 @@ instance : HasCoequalizers LocallyRingedSpace :=
 noncomputable instance preservesCoequalizer :
     PreservesColimitsOfShape WalkingParallelPair forgetToSheafedSpace.{v} :=
   ⟨fun {F} => by
-    -- Porting note : was `apply preservesColimitOfIsoDiagram ...` and the proof that preservation
+    -- Porting note: was `apply preservesColimitOfIsoDiagram ...` and the proof that preservation
     -- of colimit is provided later
     suffices PreservesColimit (parallelPair (F.map WalkingParallelPairHom.left)
         (F.map WalkingParallelPairHom.right)) forgetToSheafedSpace from
chore: remove stream-of-consciousness uses of have, replace and suffices (#10640)

No changes to tactic file, it's just boring fixes throughout the library.

This follows on from #6964.

Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -295,8 +295,8 @@ noncomputable def coequalizerCoforkIsColimit : IsColimit (coequalizerCofork f g)
     -- but this is no longer possible
     set h := _
     change IsLocalRingHom h
-    suffices : IsLocalRingHom ((PresheafedSpace.stalkMap (coequalizerCofork f g).π.1 _).comp h)
-    · apply isLocalRingHom_of_comp _ (PresheafedSpace.stalkMap (coequalizerCofork f g).π.1 _)
+    suffices IsLocalRingHom ((PresheafedSpace.stalkMap (coequalizerCofork f g).π.1 _).comp h) from
+      isLocalRingHom_of_comp _ (PresheafedSpace.stalkMap (coequalizerCofork f g).π.1 _)
     change IsLocalRingHom (_ ≫ PresheafedSpace.stalkMap (coequalizerCofork f g).π.val y)
     erw [← PresheafedSpace.stalkMap.comp]
     apply isLocalRingHom_stalkMap_congr _ _ (coequalizer.π_desc s.π.1 e).symm y
@@ -326,9 +326,9 @@ noncomputable instance preservesCoequalizer :
   ⟨fun {F} => by
     -- Porting note : was `apply preservesColimitOfIsoDiagram ...` and the proof that preservation
     -- of colimit is provided later
-    suffices : PreservesColimit (parallelPair (F.map WalkingParallelPairHom.left)
-      (F.map WalkingParallelPairHom.right)) forgetToSheafedSpace
-    · apply preservesColimitOfIsoDiagram _ (diagramIsoParallelPair F).symm
+    suffices PreservesColimit (parallelPair (F.map WalkingParallelPairHom.left)
+        (F.map WalkingParallelPairHom.right)) forgetToSheafedSpace from
+      preservesColimitOfIsoDiagram _ (diagramIsoParallelPair F).symm
     apply preservesColimitOfPreservesColimitCocone (coequalizerCoforkIsColimit _ _)
     apply (isColimitMapCoconeCoforkEquiv _ _).symm _
     dsimp only [forgetToSheafedSpace]
chore: space after (#8178)

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -148,7 +148,7 @@ instance coequalizer_π_app_isLocalRingHom
   have := ι_comp_coequalizerComparison f.1 g.1 SheafedSpace.forgetToPresheafedSpace
   rw [← PreservesCoequalizer.iso_hom] at this
   erw [SheafedSpace.congr_app this.symm (op U)]
-  rw [PresheafedSpace.comp_c_app, ←PresheafedSpace.colimitPresheafObjIsoComponentwiseLimit_hom_π]
+  rw [PresheafedSpace.comp_c_app, ← PresheafedSpace.colimitPresheafObjIsoComponentwiseLimit_hom_π]
   -- Porting note : this instance has to be manually added
   haveI : IsIso (PreservesCoequalizer.iso SheafedSpace.forgetToPresheafedSpace f.val g.val).hom.c :=
     PresheafedSpace.c_isIso_of_iso _
@@ -215,7 +215,7 @@ theorem imageBasicOpen_image_preimage :
 
 theorem imageBasicOpen_image_open :
     IsOpen ((coequalizer.π f.1 g.1).base '' (imageBasicOpen f g U s).1) := by
-  rw [←(TopCat.homeoOfIso (PreservesCoequalizer.iso (SheafedSpace.forget _) f.1
+  rw [← (TopCat.homeoOfIso (PreservesCoequalizer.iso (SheafedSpace.forget _) f.1
     g.1)).isOpen_preimage, TopCat.coequalizer_isOpen_iff, ← Set.preimage_comp]
   erw [← coe_comp]
   rw [PreservesCoequalizer.iso_hom, ι_comp_coequalizerComparison]
perf(FunLike.Basic): beta reduce CoeFun.coe (#7905)

This eliminates (fun a ↦ β) α in the type when applying a FunLike.

Co-authored-by: Matthew Ballard <matt@mrb.email> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -250,7 +250,7 @@ instance coequalizer_π_stalk_isLocalRingHom (x : Y) :
     NatTrans.naturality, comp_apply, TopCat.Presheaf.pushforwardObj_map, ←
     isUnit_map_iff (Y.presheaf.map (eqToHom hV').op)]
   -- Porting note : change `rw` to `erw`
-  erw [← comp_apply, ← comp_apply, Category.assoc, ← Y.presheaf.map_comp]
+  erw [← comp_apply, ← comp_apply, ← Y.presheaf.map_comp]
   convert @RingedSpace.isUnit_res_basicOpen Y.toRingedSpace (unop _)
       (((coequalizer.π f.val g.val).c.app (op U)) s)
 #align algebraic_geometry.LocallyRingedSpace.has_coequalizer.coequalizer_π_stalk_is_local_ring_hom AlgebraicGeometry.LocallyRingedSpace.HasCoequalizer.coequalizer_π_stalk_isLocalRingHom
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,9 +3,9 @@ Copyright (c) 2021 Andrew Yang. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Andrew Yang
 -/
-import Mathlib.AlgebraicGeometry.LocallyRingedSpace
+import Mathlib.Geometry.RingedSpace.LocallyRingedSpace
 import Mathlib.Algebra.Category.Ring.Constructions
-import Mathlib.AlgebraicGeometry.OpenImmersion.Basic
+import Mathlib.Geometry.RingedSpace.OpenImmersion
 import Mathlib.CategoryTheory.Limits.Constructions.LimitsOfProductsAndEqualizers
 
 #align_import algebraic_geometry.locally_ringed_space.has_colimits from "leanprover-community/mathlib"@"533f62f4dd62a5aad24a04326e6e787c8f7e98b1"
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,17 +2,14 @@
 Copyright (c) 2021 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.locally_ringed_space.has_colimits
-! 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.LocallyRingedSpace
 import Mathlib.Algebra.Category.Ring.Constructions
 import Mathlib.AlgebraicGeometry.OpenImmersion.Basic
 import Mathlib.CategoryTheory.Limits.Constructions.LimitsOfProductsAndEqualizers
 
+#align_import algebraic_geometry.locally_ringed_space.has_colimits from "leanprover-community/mathlib"@"533f62f4dd62a5aad24a04326e6e787c8f7e98b1"
+
 /-!
 # Colimits of LocallyRingedSpace
 
chore: cleanup whitespace (#5988)

Grepping for [^ .:{-] [^ :] and reviewing the results. Once I started I couldn't stop. :-)

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

Diff
@@ -134,7 +134,7 @@ noncomputable instance (J : Type _) :
     PreservesColimitsOfShape (Discrete.{u} J) forgetToSheafedSpace.{u} :=
   ⟨fun {G} =>
     preservesColimitOfPreservesColimitCocone (coproductCofanIsColimit G)
-      ((colimit.isColimit  (C := SheafedSpace.{u+1, u, u} CommRingCatMax.{u, u}) _).ofIsoColimit
+      ((colimit.isColimit (C := SheafedSpace.{u+1, u, u} CommRingCatMax.{u, u}) _).ofIsoColimit
         (Cocones.ext (Iso.refl _) fun _ => Category.comp_id _))⟩
 
 end HasCoproducts
chore: fix focusing dots (#5708)

This PR is the result of running

find . -type f -name "*.lean" -exec sed -i -E 's/^( +)\. /\1· /' {} \;
find . -type f -name "*.lean" -exec sed -i -E 'N;s/^( +·)\n +(.*)$/\1 \2/;P;D' {} \;

which firstly replaces . focusing dots with · and secondly removes isolated instances of such dots, unifying them with the following line. A new rule is placed in the style linter to verify this.

Diff
@@ -299,7 +299,7 @@ noncomputable def coequalizerCoforkIsColimit : IsColimit (coequalizerCofork f g)
     set h := _
     change IsLocalRingHom h
     suffices : IsLocalRingHom ((PresheafedSpace.stalkMap (coequalizerCofork f g).π.1 _).comp h)
-    . apply isLocalRingHom_of_comp _ (PresheafedSpace.stalkMap (coequalizerCofork f g).π.1 _)
+    · apply isLocalRingHom_of_comp _ (PresheafedSpace.stalkMap (coequalizerCofork f g).π.1 _)
     change IsLocalRingHom (_ ≫ PresheafedSpace.stalkMap (coequalizerCofork f g).π.val y)
     erw [← PresheafedSpace.stalkMap.comp]
     apply isLocalRingHom_stalkMap_congr _ _ (coequalizer.π_desc s.π.1 e).symm y
@@ -331,7 +331,7 @@ noncomputable instance preservesCoequalizer :
     -- of colimit is provided later
     suffices : PreservesColimit (parallelPair (F.map WalkingParallelPairHom.left)
       (F.map WalkingParallelPairHom.right)) forgetToSheafedSpace
-    . apply preservesColimitOfIsoDiagram _ (diagramIsoParallelPair F).symm
+    · apply preservesColimitOfIsoDiagram _ (diagramIsoParallelPair F).symm
     apply preservesColimitOfPreservesColimitCocone (coequalizerCoforkIsColimit _ _)
     apply (isColimitMapCoconeCoforkEquiv _ _).symm _
     dsimp only [forgetToSheafedSpace]
feat: port AlgebraicGeometry.PresheafedSpace.Gluing (#5356)

Co-authored-by: Johan Commelin <johan@commelin.net> Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>

Diff
@@ -130,10 +130,12 @@ noncomputable def coproductCofanIsColimit : IsColimit (coproductCofan F) where
 instance : HasCoproducts.{u} LocallyRingedSpace.{u} := fun _ =>
   ⟨fun F => ⟨⟨⟨_, coproductCofanIsColimit F⟩⟩⟩⟩
 
-noncomputable instance (J : Type _) : PreservesColimitsOfShape (Discrete J) forgetToSheafedSpace :=
+noncomputable instance (J : Type _) :
+    PreservesColimitsOfShape (Discrete.{u} J) forgetToSheafedSpace.{u} :=
   ⟨fun {G} =>
     preservesColimitOfPreservesColimitCocone (coproductCofanIsColimit G)
-      ((colimit.isColimit _).ofIsoColimit (Cocones.ext (Iso.refl _) fun _ => Category.comp_id _))⟩
+      ((colimit.isColimit  (C := SheafedSpace.{u+1, u, u} CommRingCatMax.{u, u}) _).ofIsoColimit
+        (Cocones.ext (Iso.refl _) fun _ => Category.comp_id _))⟩
 
 end HasCoproducts
 
@@ -341,7 +343,8 @@ end HasCoequalizer
 instance : HasColimits LocallyRingedSpace :=
   has_colimits_of_hasCoequalizers_and_coproducts
 
-noncomputable instance : PreservesColimits LocallyRingedSpace.forgetToSheafedSpace :=
+noncomputable instance preservesColimits_forgetToSheafedSpace :
+    PreservesColimits LocallyRingedSpace.forgetToSheafedSpace.{u} :=
   preservesColimitsOfPreservesCoequalizersAndCoproducts _
 
 end LocallyRingedSpace
feat: port AlgebraicGeometry.LocallyRingedSpace.HasColimits (#5260)

Dependencies 11 + 797

798 files ported (98.6%)
323482 lines ported (98.4%)
Show graph

The unported dependencies are