File: Mathlib/AlgebraicGeometry/Gluing.lean

full_name: AlgebraicGeometry.Scheme.GlueData.f_open
code: /-- A family of gluing data consists of
1. An index type `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 : ι`.
5. A transition map `t i j : V i j ⟶ V j i` for each `i j : ι`.
such that
6. `f i i` is an isomorphism.
7. `t i i` is the identity.
8. `V i j ×[U i] V i k ⟶ V i j ⟶ V j i` factors through `V j k ×[U j] V j i ⟶ V j i` via some
    `t' : V i j ×[U i] V i k ⟶ V j k ×[U j] V j i`.
9. `t' i j k ≫ t' j k i ≫ t' k i j = 𝟙 _`.

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(#5171): @[nolint has_nonempty_instance]; linter not ported yet
structure GlueData extends CategoryTheory.GlueData Scheme where
  f_open : ∀ i j, IsOpenImmersion (f i j)
goal: AlgebraicGeometry.IsOpenImmersion (self.f i j)

full_name: AlgebraicGeometry.Scheme.GlueData
code: /-- A family of gluing data consists of
1. An index type `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 : ι`.
5. A transition map `t i j : V i j ⟶ V j i` for each `i j : ι`.
such that
6. `f i i` is an isomorphism.
7. `t i i` is the identity.
8. `V i j ×[U i] V i k ⟶ V i j ⟶ V j i` factors through `V j k ×[U j] V j i ⟶ V j i` via some
    `t' : V i j ×[U i] V i k ⟶ V j k ×[U j] V j i`.
9. `t' i j k ≫ t' j k i ≫ t' k i j = 𝟙 _`.

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(#5171): @[nolint has_nonempty_instance]; linter not ported yet
structure GlueData extends CategoryTheory.GlueData Scheme where
  f_open : ∀ i j, IsOpenImmersion (f i j)
goal: Type (u_1 + 1)

full_name: AlgebraicGeometry.Scheme.GlueData.«_aux_Mathlib_AlgebraicGeometry_Gluing___macroRules_AlgebraicGeometry_Scheme_GlueData_term𝖣_1»
code: local notation "𝖣" => D.toGlueData
goal: Lean.Macro

full_name: AlgebraicGeometry.Scheme.GlueData.toLocallyRingedSpaceGlueData
code: /-- The glue data of locally ringed spaces associated to a family of glue data of schemes. -/
abbrev toLocallyRingedSpaceGlueData : LocallyRingedSpace.GlueData 
goal: AlgebraicGeometry.LocallyRingedSpace.GlueData

full_name: AlgebraicGeometry.Scheme.GlueData.instIsOpenImmersionFLocallyRingedSpaceToLocallyRingedSpaceGlueData
code: instance (i j : 𝖣.J) :
    LocallyRingedSpace.IsOpenImmersion ((D.toLocallyRingedSpaceGlueData).toGlueData.f i j) 
goal: AlgebraicGeometry.LocallyRingedSpace.IsOpenImmersion (D.toLocallyRingedSpaceGlueData.f i j)

full_name: AlgebraicGeometry.Scheme.GlueData.instIsOpenImmersionCommRingCatFSheafedSpaceToSheafedSpaceGlueDataToLocallyRingedSpaceGlueData
code: instance (i j : 𝖣.J) :
    SheafedSpace.IsOpenImmersion
      (D.toLocallyRingedSpaceGlueData.toSheafedSpaceGlueData.toGlueData.f i j) 
goal: AlgebraicGeometry.SheafedSpace.IsOpenImmersion (D.toLocallyRingedSpaceGlueData.toSheafedSpaceGlueData.f i j)

full_name: AlgebraicGeometry.Scheme.GlueData.instIsOpenImmersionCommRingCatFPresheafedSpaceToPresheafedSpaceGlueDataToSheafedSpaceGlueDataToLocallyRingedSpaceGlueData
code: instance (i j : 𝖣.J) :
    PresheafedSpace.IsOpenImmersion
      (D.toLocallyRingedSpaceGlueData.toSheafedSpaceGlueData.toPresheafedSpaceGlueData.toGlueData.f
        i j) 
goal: AlgebraicGeometry.PresheafedSpace.IsOpenImmersion
  (D.toLocallyRingedSpaceGlueData.toSheafedSpaceGlueData.toPresheafedSpaceGlueData.f i j)

full_name: AlgebraicGeometry.Scheme.GlueData.instIsOpenImmersionιLocallyRingedSpaceToLocallyRingedSpaceGlueData
code: instance (i : 𝖣.J) :
    LocallyRingedSpace.IsOpenImmersion ((D.toLocallyRingedSpaceGlueData).toGlueData.ι i) 
goal: AlgebraicGeometry.LocallyRingedSpace.IsOpenImmersion (D.toLocallyRingedSpaceGlueData.ι i)

full_name: AlgebraicGeometry.Scheme.GlueData.gluedScheme
code: /-- (Implementation). The glued scheme of a glue data.
This should not be used outside this file. Use `AlgebraicGeometry.Scheme.GlueData.glued` instead. -/
def gluedScheme : Scheme 
goal: AlgebraicGeometry.Scheme

full_name: AlgebraicGeometry.Scheme.GlueData.instCreatesColimitLocallyRingedSpaceWalkingMultispanLDiagramRFstFromSndFromMultispanForgetToLocallyRingedSpace
code: instance : CreatesColimit 𝖣.diagram.multispan forgetToLocallyRingedSpace 
goal: CategoryTheory.CreatesColimit D.diagram.multispan AlgebraicGeometry.Scheme.forgetToLocallyRingedSpace

full_name: AlgebraicGeometry.Scheme.GlueData.instPreservesColimitTopCatWalkingMultispanLDiagramRFstFromSndFromMultispanForgetToTop
code: instance : PreservesColimit (𝖣.diagram.multispan) forgetToTop 
goal: CategoryTheory.Limits.PreservesColimit D.diagram.multispan AlgebraicGeometry.Scheme.forgetToTop

full_name: AlgebraicGeometry.Scheme.GlueData.instHasMulticoequalizerDiagram
code: instance : HasMulticoequalizer 𝖣.diagram 
goal: CategoryTheory.Limits.HasMulticoequalizer D.diagram

full_name: AlgebraicGeometry.Scheme.GlueData.glued
code: /-- The glued scheme of a glued space. -/
abbrev glued : Scheme 
goal: AlgebraicGeometry.Scheme

full_name: AlgebraicGeometry.Scheme.GlueData.ι
code: /-- The immersion from `D.U i` into the glued space. -/
abbrev ι (i : D.J) : D.U i ⟶ D.glued 
goal: D.U i ⟶ D.glued

full_name: AlgebraicGeometry.Scheme.GlueData.isoLocallyRingedSpace
code: /-- The gluing as sheafed spaces is isomorphic to the gluing as presheafed spaces. -/
abbrev isoLocallyRingedSpace :
    D.glued.toLocallyRingedSpace ≅ D.toLocallyRingedSpaceGlueData.toGlueData.glued 
goal: D.glued.toLocallyRingedSpace ≅ D.toLocallyRingedSpaceGlueData.glued

full_name: AlgebraicGeometry.Scheme.GlueData.ι_isoLocallyRingedSpace_inv
code: theorem ι_isoLocallyRingedSpace_inv (i : D.J) :
    D.toLocallyRingedSpaceGlueData.toGlueData.ι i ≫ D.isoLocallyRingedSpace.inv = 𝖣.ι i 
goal: D.toLocallyRingedSpaceGlueData.ι i ≫ D.isoLocallyRingedSpace.inv = D.ι i

full_name: AlgebraicGeometry.Scheme.GlueData.ι_isOpenImmersion
code: instance ι_isOpenImmersion (i : D.J) : IsOpenImmersion (𝖣.ι i) 
goal: AlgebraicGeometry.IsOpenImmersion (D.ι i)

full_name: AlgebraicGeometry.Scheme.GlueData.ι_jointly_surjective
code: theorem ι_jointly_surjective (x : 𝖣.glued.carrier) :
    ∃ (i : D.J) (y : (D.U i).carrier), (D.ι i).1.base y = x 
goal: ∃ i y, (D.ι i).val.base y = x

full_name: AlgebraicGeometry.Scheme.GlueData.glue_condition
code: @[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 
goal: D.t i j ≫ D.f j i ≫ D.ι j = D.f i j ≫ D.ι i

full_name: AlgebraicGeometry.Scheme.GlueData.vPullbackCone
code: /-- The pullback cone spanned by `V i j ⟶ U i` and `V i j ⟶ U j`.
This is a pullback diagram (`vPullbackConeIsLimit`). -/
def vPullbackCone (i j : D.J) : PullbackCone (D.ι i) (D.ι j) 
goal: CategoryTheory.Limits.PullbackCone (D.ι i) (D.ι j)

full_name: AlgebraicGeometry.Scheme.GlueData.vPullbackConeIsLimit
code: /-- The following diagram is a pullback, i.e. `Vᵢⱼ` is the intersection of `Uᵢ` and `Uⱼ` in `X`.

Vᵢⱼ ⟶ Uᵢ
 |      |
 ↓      ↓
 Uⱼ ⟶ X
-/
def vPullbackConeIsLimit (i j : D.J) : IsLimit (D.vPullbackCone i j) 
goal: CategoryTheory.Limits.IsLimit (D.vPullbackCone i j)

full_name: AlgebraicGeometry.Scheme.GlueData._aux_Mathlib_AlgebraicGeometry_Gluing___macroRules_AlgebraicGeometry_Scheme_GlueData_termD__1
code: local notation "D_" => TopCat.GlueData.toGlueData <|
  D.toLocallyRingedSpaceGlueData.toSheafedSpaceGlueData.toPresheafedSpaceGlueData.toTopGlueData
goal: Lean.Macro

full_name: AlgebraicGeometry.Scheme.GlueData.isoCarrier
code: /-- The underlying topological space of the glued scheme is isomorphic to the gluing of the
underlying spaces -/
def isoCarrier :
    D.glued.carrier ≅ (D_).glued 
goal: ↑D.glued.toPresheafedSpace ≅
  D.toLocallyRingedSpaceGlueData.toSheafedSpaceGlueData.toPresheafedSpaceGlueData.toTopGlueData.glued

full_name: AlgebraicGeometry.Scheme.GlueData.ι_isoCarrier_inv
code: @[simp]
theorem ι_isoCarrier_inv (i : D.J) :
    (D_).ι i ≫ D.isoCarrier.inv = (D.ι i).1.base 
goal: D.toLocallyRingedSpaceGlueData.toSheafedSpaceGlueData.toPresheafedSpaceGlueData.toTopGlueData.ι i ≫ D.isoCarrier.inv =
  (D.ι i).val.base

full_name: AlgebraicGeometry.Scheme.GlueData.Rel
code: /-- An equivalence relation on `Σ i, D.U i` that holds iff `𝖣 .ι i x = 𝖣 .ι j y`.
See `AlgebraicGeometry.Scheme.GlueData.ι_eq_iff`. -/
def Rel (a b : Σ i, ((D.U i).carrier : Type _)) : Prop 
goal: Prop

full_name: AlgebraicGeometry.Scheme.GlueData.ι_eq_iff
code: 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⟩ 
goal: (D.ι i).val.base x = (D.ι j).val.base y ↔ D.Rel ⟨i, x⟩ ⟨j, y⟩

full_name: AlgebraicGeometry.Scheme.GlueData.isOpen_iff
code: theorem isOpen_iff (U : Set D.glued.carrier) : IsOpen U ↔ ∀ i, IsOpen ((D.ι i).1.base ⁻¹' U) 
goal: IsOpen U ↔ ∀ (i : D.J), IsOpen (⇑(D.ι i).val.base ⁻¹' U)

full_name: AlgebraicGeometry.Scheme.GlueData.openCover
code: /-- The open cover of the glued space given by the glue data. -/
@[simps (config := .lemmasOnly)]
def openCover (D : Scheme.GlueData) : OpenCover D.glued 
goal: D.glued.OpenCover

full_name: AlgebraicGeometry.Scheme.GlueData.openCover_obj
code: /-- The open cover of the glued space given by the glue data. -/
@[simps (config := .lemmasOnly)]
def openCover (D : Scheme.GlueData) : OpenCover D.glued 
goal: ∀ (a : D.J), D.openCover.obj a = D.U a

full_name: AlgebraicGeometry.Scheme.GlueData.openCover_map
code: /-- The open cover of the glued space given by the glue data. -/
@[simps (config := .lemmasOnly)]
def openCover (D : Scheme.GlueData) : OpenCover D.glued 
goal: D.openCover.map i = D.ι i

full_name: AlgebraicGeometry.Scheme.GlueData.openCover_J
code: /-- The open cover of the glued space given by the glue data. -/
@[simps (config := .lemmasOnly)]
def openCover (D : Scheme.GlueData) : OpenCover D.glued 
goal: D.openCover.J = D.J

full_name: AlgebraicGeometry.Scheme.GlueData.openCover_f
code: /-- The open cover of the glued space given by the glue data. -/
@[simps (config := .lemmasOnly)]
def openCover (D : Scheme.GlueData) : OpenCover D.glued 
goal: D.openCover.f x = ⋯.choose

full_name: AlgebraicGeometry.Scheme.OpenCover.gluedCoverT'
code: /-- (Implementation) the transition maps in the glue data associated with an open cover. -/
def gluedCoverT' (x y z : 𝒰.J) :
    pullback (pullback.fst (𝒰.map x) (𝒰.map y)) (pullback.fst (𝒰.map x) (𝒰.map z)) ⟶
      pullback (pullback.fst (𝒰.map y) (𝒰.map z)) (pullback.fst (𝒰.map y) (𝒰.map x)) 
goal: CategoryTheory.Limits.pullback (CategoryTheory.Limits.pullback.fst (𝒰.map x) (𝒰.map y))
    (CategoryTheory.Limits.pullback.fst (𝒰.map x) (𝒰.map z)) ⟶
  CategoryTheory.Limits.pullback (CategoryTheory.Limits.pullback.fst (𝒰.map y) (𝒰.map z))
    (CategoryTheory.Limits.pullback.fst (𝒰.map y) (𝒰.map x))

full_name: AlgebraicGeometry.Scheme.OpenCover.gluedCoverT'_fst_fst
code: @[simp, reassoc]
theorem gluedCoverT'_fst_fst (x y z : 𝒰.J) :
    𝒰.gluedCoverT' x y z ≫ pullback.fst _ _ ≫ pullback.fst _ _ =
      pullback.fst _ _ ≫ pullback.snd _ _ 
goal: 𝒰.gluedCoverT' x y z ≫
    CategoryTheory.Limits.pullback.fst (CategoryTheory.Limits.pullback.fst (𝒰.map y) (𝒰.map z))
        (CategoryTheory.Limits.pullback.fst (𝒰.map y) (𝒰.map x)) ≫
      CategoryTheory.Limits.pullback.fst (𝒰.map y) (𝒰.map z) =
  CategoryTheory.Limits.pullback.fst (CategoryTheory.Limits.pullback.fst (𝒰.map x) (𝒰.map y))
      (CategoryTheory.Limits.pullback.fst (𝒰.map x) (𝒰.map z)) ≫
    CategoryTheory.Limits.pullback.snd (𝒰.map x) (𝒰.map y)

full_name: AlgebraicGeometry.Scheme.OpenCover.gluedCoverT'_fst_snd
code: @[simp, reassoc]
theorem gluedCoverT'_fst_snd (x y z : 𝒰.J) :
    gluedCoverT' 𝒰 x y z ≫ pullback.fst _ _ ≫ pullback.snd _ _ =
      pullback.snd _ _ ≫ pullback.snd _ _ 
goal: 𝒰.gluedCoverT' x y z ≫
    CategoryTheory.Limits.pullback.fst (CategoryTheory.Limits.pullback.fst (𝒰.map y) (𝒰.map z))
        (CategoryTheory.Limits.pullback.fst (𝒰.map y) (𝒰.map x)) ≫
      CategoryTheory.Limits.pullback.snd (𝒰.map y) (𝒰.map z) =
  CategoryTheory.Limits.pullback.snd (CategoryTheory.Limits.pullback.fst (𝒰.map x) (𝒰.map y))
      (CategoryTheory.Limits.pullback.fst (𝒰.map x) (𝒰.map z)) ≫
    CategoryTheory.Limits.pullback.snd (𝒰.map x) (𝒰.map z)

full_name: AlgebraicGeometry.Scheme.OpenCover.gluedCoverT'_snd_fst
code: @[simp, reassoc]
theorem gluedCoverT'_snd_fst (x y z : 𝒰.J) :
    gluedCoverT' 𝒰 x y z ≫ pullback.snd _ _ ≫ pullback.fst _ _ =
      pullback.fst _ _ ≫ pullback.snd _ _ 
goal: 𝒰.gluedCoverT' x y z ≫
    CategoryTheory.Limits.pullback.snd (CategoryTheory.Limits.pullback.fst (𝒰.map y) (𝒰.map z))
        (CategoryTheory.Limits.pullback.fst (𝒰.map y) (𝒰.map x)) ≫
      CategoryTheory.Limits.pullback.fst (𝒰.map y) (𝒰.map x) =
  CategoryTheory.Limits.pullback.fst (CategoryTheory.Limits.pullback.fst (𝒰.map x) (𝒰.map y))
      (CategoryTheory.Limits.pullback.fst (𝒰.map x) (𝒰.map z)) ≫
    CategoryTheory.Limits.pullback.snd (𝒰.map x) (𝒰.map y)

full_name: AlgebraicGeometry.Scheme.OpenCover.gluedCoverT'_snd_snd
code: @[simp, reassoc]
theorem gluedCoverT'_snd_snd (x y z : 𝒰.J) :
    gluedCoverT' 𝒰 x y z ≫ pullback.snd _ _ ≫ pullback.snd _ _ =
      pullback.fst _ _ ≫ pullback.fst _ _ 
goal: 𝒰.gluedCoverT' x y z ≫
    CategoryTheory.Limits.pullback.snd (CategoryTheory.Limits.pullback.fst (𝒰.map y) (𝒰.map z))
        (CategoryTheory.Limits.pullback.fst (𝒰.map y) (𝒰.map x)) ≫
      CategoryTheory.Limits.pullback.snd (𝒰.map y) (𝒰.map x) =
  CategoryTheory.Limits.pullback.fst (CategoryTheory.Limits.pullback.fst (𝒰.map x) (𝒰.map y))
      (CategoryTheory.Limits.pullback.fst (𝒰.map x) (𝒰.map z)) ≫
    CategoryTheory.Limits.pullback.fst (𝒰.map x) (𝒰.map y)

full_name: AlgebraicGeometry.Scheme.OpenCover.glued_cover_cocycle_fst
code: 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 _ _ 
goal: 𝒰.gluedCoverT' x y z ≫
    𝒰.gluedCoverT' y z x ≫
      𝒰.gluedCoverT' z x y ≫
        CategoryTheory.Limits.pullback.fst (CategoryTheory.Limits.pullback.fst (𝒰.map x) (𝒰.map y))
          (CategoryTheory.Limits.pullback.fst (𝒰.map x) (𝒰.map z)) =
  CategoryTheory.Limits.pullback.fst (CategoryTheory.Limits.pullback.fst (𝒰.map x) (𝒰.map y))
    (CategoryTheory.Limits.pullback.fst (𝒰.map x) (𝒰.map z))

full_name: AlgebraicGeometry.Scheme.OpenCover.glued_cover_cocycle_snd
code: 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 _ _ 
goal: 𝒰.gluedCoverT' x y z ≫
    𝒰.gluedCoverT' y z x ≫
      𝒰.gluedCoverT' z x y ≫
        CategoryTheory.Limits.pullback.snd (CategoryTheory.Limits.pullback.fst (𝒰.map x) (𝒰.map y))
          (CategoryTheory.Limits.pullback.fst (𝒰.map x) (𝒰.map z)) =
  CategoryTheory.Limits.pullback.snd (CategoryTheory.Limits.pullback.fst (𝒰.map x) (𝒰.map y))
    (CategoryTheory.Limits.pullback.fst (𝒰.map x) (𝒰.map z))

full_name: AlgebraicGeometry.Scheme.OpenCover.glued_cover_cocycle
code: theorem glued_cover_cocycle (x y z : 𝒰.J) :
    gluedCoverT' 𝒰 x y z ≫ gluedCoverT' 𝒰 y z x ≫ gluedCoverT' 𝒰 z x y = 𝟙 _ 
goal: 𝒰.gluedCoverT' x y z ≫ 𝒰.gluedCoverT' y z x ≫ 𝒰.gluedCoverT' z x y =
  𝟙
    (CategoryTheory.Limits.pullback (CategoryTheory.Limits.pullback.fst (𝒰.map x) (𝒰.map y))
      (CategoryTheory.Limits.pullback.fst (𝒰.map x) (𝒰.map z)))

full_name: AlgebraicGeometry.Scheme.OpenCover.gluedCover_V
code: /-- The glue data associated with an open cover.
The canonical isomorphism `𝒰.gluedCover.glued ⟶ X` is provided by `𝒰.fromGlued`. -/
@[simps]
def gluedCover : Scheme.GlueData.{u} 
goal: ∀ (x : 𝒰.J × 𝒰.J),
  𝒰.gluedCover.V x =
    match x with
    | (x, y) => CategoryTheory.Limits.pullback (𝒰.map x) (𝒰.map y)

full_name: AlgebraicGeometry.Scheme.OpenCover.gluedCover_t
code: /-- The glue data associated with an open cover.
The canonical isomorphism `𝒰.gluedCover.glued ⟶ X` is provided by `𝒰.fromGlued`. -/
@[simps]
def gluedCover : Scheme.GlueData.{u} 
goal: 𝒰.gluedCover.t x y = (CategoryTheory.Limits.pullbackSymmetry (𝒰.map x) (𝒰.map y)).hom

full_name: AlgebraicGeometry.Scheme.OpenCover.gluedCover_J
code: /-- The glue data associated with an open cover.
The canonical isomorphism `𝒰.gluedCover.glued ⟶ X` is provided by `𝒰.fromGlued`. -/
@[simps]
def gluedCover : Scheme.GlueData.{u} 
goal: 𝒰.gluedCover.J = 𝒰.J

full_name: AlgebraicGeometry.Scheme.OpenCover.gluedCover_t'
code: /-- The glue data associated with an open cover.
The canonical isomorphism `𝒰.gluedCover.glued ⟶ X` is provided by `𝒰.fromGlued`. -/
@[simps]
def gluedCover : Scheme.GlueData.{u} 
goal: 𝒰.gluedCover.t' x y z = 𝒰.gluedCoverT' x y z

full_name: AlgebraicGeometry.Scheme.OpenCover.gluedCover
code: /-- The glue data associated with an open cover.
The canonical isomorphism `𝒰.gluedCover.glued ⟶ X` is provided by `𝒰.fromGlued`. -/
@[simps]
def gluedCover : Scheme.GlueData.{u} 
goal: AlgebraicGeometry.Scheme.GlueData

full_name: AlgebraicGeometry.Scheme.OpenCover.gluedCover_f
code: /-- The glue data associated with an open cover.
The canonical isomorphism `𝒰.gluedCover.glued ⟶ X` is provided by `𝒰.fromGlued`. -/
@[simps]
def gluedCover : Scheme.GlueData.{u} 
goal: 𝒰.gluedCover.f x y = CategoryTheory.Limits.pullback.fst (𝒰.map x) (𝒰.map y)

full_name: AlgebraicGeometry.Scheme.OpenCover.gluedCover_U
code: /-- The glue data associated with an open cover.
The canonical isomorphism `𝒰.gluedCover.glued ⟶ X` is provided by `𝒰.fromGlued`. -/
@[simps]
def gluedCover : Scheme.GlueData.{u} 
goal: ∀ (a : 𝒰.J), 𝒰.gluedCover.U a = 𝒰.obj a

full_name: AlgebraicGeometry.Scheme.OpenCover.fromGlued
code: /-- The canonical morphism from the gluing of an open cover of `X` into `X`.
This is an isomorphism, as witnessed by an `IsIso` instance. -/
def fromGlued : 𝒰.gluedCover.glued ⟶ X 
goal: 𝒰.gluedCover.glued ⟶ X

full_name: AlgebraicGeometry.Scheme.OpenCover.ι_fromGlued
code: @[simp, reassoc]
theorem ι_fromGlued (x : 𝒰.J) : 𝒰.gluedCover.ι x ≫ 𝒰.fromGlued = 𝒰.map x 
goal: 𝒰.gluedCover.ι x ≫ 𝒰.fromGlued = 𝒰.map x

full_name: AlgebraicGeometry.Scheme.OpenCover.fromGlued_injective
code: theorem fromGlued_injective : Function.Injective 𝒰.fromGlued.1.base 
goal: Function.Injective ⇑𝒰.fromGlued.val.base

full_name: AlgebraicGeometry.Scheme.OpenCover.fromGlued_stalk_iso
code: instance fromGlued_stalk_iso (x : 𝒰.gluedCover.glued.carrier) :
    IsIso (𝒰.fromGlued.stalkMap x) 
goal: CategoryTheory.IsIso (AlgebraicGeometry.Scheme.Hom.stalkMap 𝒰.fromGlued x)

full_name: AlgebraicGeometry.Scheme.OpenCover.fromGlued_open_map
code: theorem fromGlued_open_map : IsOpenMap 𝒰.fromGlued.1.base 
goal: IsOpenMap ⇑𝒰.fromGlued.val.base

full_name: AlgebraicGeometry.Scheme.OpenCover.fromGlued_openEmbedding
code: theorem fromGlued_openEmbedding : OpenEmbedding 𝒰.fromGlued.1.base 
goal: OpenEmbedding ⇑𝒰.fromGlued.val.base

full_name: AlgebraicGeometry.Scheme.OpenCover.instEpiTopCatBaseCommRingCatValFromGlued
code: instance : Epi 𝒰.fromGlued.val.base 
goal: CategoryTheory.Epi 𝒰.fromGlued.val.base

full_name: AlgebraicGeometry.Scheme.OpenCover.fromGlued_open_immersion
code: instance fromGlued_open_immersion : IsOpenImmersion 𝒰.fromGlued 
goal: AlgebraicGeometry.IsOpenImmersion 𝒰.fromGlued

full_name: AlgebraicGeometry.Scheme.OpenCover.instIsIsoFromGlued
code: instance : IsIso 𝒰.fromGlued 
goal: CategoryTheory.IsIso 𝒰.fromGlued

full_name: AlgebraicGeometry.Scheme.OpenCover.glueMorphisms
code: /-- 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`.

Note:
If `X` is exactly (defeq to) the gluing of `U i`, then using `Multicoequalizer.desc` suffices.
-/
def glueMorphisms {Y : Scheme} (f : ∀ x, 𝒰.obj x ⟶ Y)
    (hf : ∀ x y, pullback.fst (𝒰.map x) (𝒰.map y) ≫ f x = pullback.snd _ _ ≫ f y) :
    X ⟶ Y 
goal: X ⟶ Y

full_name: AlgebraicGeometry.Scheme.OpenCover.ι_glueMorphisms
code: @[simp, reassoc]
theorem ι_glueMorphisms {Y : Scheme} (f : ∀ x, 𝒰.obj x ⟶ Y)
    (hf : ∀ x y, pullback.fst (𝒰.map x) (𝒰.map y) ≫ f x = pullback.snd _ _ ≫ f y)
    (x : 𝒰.J) : 𝒰.map x ≫ 𝒰.glueMorphisms f hf = f x 
goal: 𝒰.map x ≫ 𝒰.glueMorphisms f hf = f x

full_name: AlgebraicGeometry.Scheme.OpenCover.hom_ext
code: theorem hom_ext {Y : Scheme} (f₁ f₂ : X ⟶ Y) (h : ∀ x, 𝒰.map x ≫ f₁ = 𝒰.map x ≫ f₂) : f₁ = f₂ 
goal: f₁ = f₂