[GOAL]
D : GlueData
i j : D.J
⊢ LocallyRingedSpace.IsOpenImmersion (f (toLocallyRingedSpaceGlueData D).toGlueData i j)
[PROOFSTEP]
apply GlueData.f_open
[GOAL]
D : GlueData
i j : D.J
⊢ SheafedSpace.IsOpenImmersion
    (f (LocallyRingedSpace.GlueData.toSheafedSpaceGlueData (toLocallyRingedSpaceGlueData D)).toGlueData i j)
[PROOFSTEP]
apply GlueData.f_open
[GOAL]
D : GlueData
i j : D.J
⊢ PresheafedSpace.IsOpenImmersion
    (f
      (SheafedSpace.GlueData.toPresheafedSpaceGlueData
          (LocallyRingedSpace.GlueData.toSheafedSpaceGlueData (toLocallyRingedSpaceGlueData D))).toGlueData
      i j)
[PROOFSTEP]
apply GlueData.f_open
[GOAL]
D : GlueData
i : D.J
⊢ LocallyRingedSpace.IsOpenImmersion (ι (toLocallyRingedSpaceGlueData D).toGlueData i)
[PROOFSTEP]
apply LocallyRingedSpace.GlueData.ι_isOpenImmersion
[GOAL]
D : GlueData
⊢ Scheme
[PROOFSTEP]
apply LocallyRingedSpace.IsOpenImmersion.scheme D.toLocallyRingedSpaceGlueData.toGlueData.glued
[GOAL]
D : GlueData
⊢ ∀ (x : ↑(LocallyRingedSpace.toTopCat (glued (toLocallyRingedSpaceGlueData D).toGlueData))),
    ∃ R f, x ∈ Set.range ↑f.val.base ∧ LocallyRingedSpace.IsOpenImmersion f
[PROOFSTEP]
intro x
[GOAL]
D : GlueData
x : ↑(LocallyRingedSpace.toTopCat (glued (toLocallyRingedSpaceGlueData D).toGlueData))
⊢ ∃ R f, x ∈ Set.range ↑f.val.base ∧ LocallyRingedSpace.IsOpenImmersion f
[PROOFSTEP]
obtain ⟨i, y, rfl⟩ := D.toLocallyRingedSpaceGlueData.ι_jointly_surjective x
[GOAL]
case intro.intro
D : GlueData
i : (toLocallyRingedSpaceGlueData D).toGlueData.J
y : ↑(LocallyRingedSpace.toTopCat (U (toLocallyRingedSpaceGlueData D).toGlueData i))
⊢ ∃ R f,
    ↑(ι (toLocallyRingedSpaceGlueData D).toGlueData i).val.base y ∈ Set.range ↑f.val.base ∧
      LocallyRingedSpace.IsOpenImmersion f
[PROOFSTEP]
refine' ⟨_, _ ≫ D.toLocallyRingedSpaceGlueData.toGlueData.ι i, _⟩
[GOAL]
case intro.intro.refine'_1
D : GlueData
i : (toLocallyRingedSpaceGlueData D).toGlueData.J
y : ↑(LocallyRingedSpace.toTopCat (U (toLocallyRingedSpaceGlueData D).toGlueData i))
⊢ CommRingCat
case intro.intro.refine'_2
D : GlueData
i : (toLocallyRingedSpaceGlueData D).toGlueData.J
y : ↑(LocallyRingedSpace.toTopCat (U (toLocallyRingedSpaceGlueData D).toGlueData i))
⊢ Spec.toLocallyRingedSpace.obj (op ?intro.intro.refine'_1) ⟶ U (toLocallyRingedSpaceGlueData D).toGlueData i
case intro.intro.refine'_3
D : GlueData
i : (toLocallyRingedSpaceGlueData D).toGlueData.J
y : ↑(LocallyRingedSpace.toTopCat (U (toLocallyRingedSpaceGlueData D).toGlueData i))
⊢ ↑(ι (toLocallyRingedSpaceGlueData D).toGlueData i).val.base y ∈
      Set.range ↑(?intro.intro.refine'_2 ≫ ι (toLocallyRingedSpaceGlueData D).toGlueData i).val.base ∧
    LocallyRingedSpace.IsOpenImmersion (?intro.intro.refine'_2 ≫ ι (toLocallyRingedSpaceGlueData D).toGlueData i)
[PROOFSTEP]
swap
[GOAL]
case intro.intro.refine'_2
D : GlueData
i : (toLocallyRingedSpaceGlueData D).toGlueData.J
y : ↑(LocallyRingedSpace.toTopCat (U (toLocallyRingedSpaceGlueData D).toGlueData i))
⊢ Spec.toLocallyRingedSpace.obj (op ?intro.intro.refine'_1) ⟶ U (toLocallyRingedSpaceGlueData D).toGlueData i
case intro.intro.refine'_1
D : GlueData
i : (toLocallyRingedSpaceGlueData D).toGlueData.J
y : ↑(LocallyRingedSpace.toTopCat (U (toLocallyRingedSpaceGlueData D).toGlueData i))
⊢ CommRingCat
case intro.intro.refine'_3
D : GlueData
i : (toLocallyRingedSpaceGlueData D).toGlueData.J
y : ↑(LocallyRingedSpace.toTopCat (U (toLocallyRingedSpaceGlueData D).toGlueData i))
⊢ ↑(ι (toLocallyRingedSpaceGlueData D).toGlueData i).val.base y ∈
      Set.range ↑(?intro.intro.refine'_2 ≫ ι (toLocallyRingedSpaceGlueData D).toGlueData i).val.base ∧
    LocallyRingedSpace.IsOpenImmersion (?intro.intro.refine'_2 ≫ ι (toLocallyRingedSpaceGlueData D).toGlueData i)
[PROOFSTEP]
exact (D.U i).affineCover.map y
[GOAL]
case intro.intro.refine'_3
D : GlueData
i : (toLocallyRingedSpaceGlueData D).toGlueData.J
y : ↑(LocallyRingedSpace.toTopCat (U (toLocallyRingedSpaceGlueData D).toGlueData i))
⊢ ↑(ι (toLocallyRingedSpaceGlueData D).toGlueData i).val.base y ∈
      Set.range
        ↑(OpenCover.map (affineCover (U D.toGlueData i)) y ≫ ι (toLocallyRingedSpaceGlueData D).toGlueData i).val.base ∧
    LocallyRingedSpace.IsOpenImmersion
      (OpenCover.map (affineCover (U D.toGlueData i)) y ≫ ι (toLocallyRingedSpaceGlueData D).toGlueData i)
[PROOFSTEP]
constructor
[GOAL]
case intro.intro.refine'_3.left
D : GlueData
i : (toLocallyRingedSpaceGlueData D).toGlueData.J
y : ↑(LocallyRingedSpace.toTopCat (U (toLocallyRingedSpaceGlueData D).toGlueData i))
⊢ ↑(ι (toLocallyRingedSpaceGlueData D).toGlueData i).val.base y ∈
    Set.range
      ↑(OpenCover.map (affineCover (U D.toGlueData i)) y ≫ ι (toLocallyRingedSpaceGlueData D).toGlueData i).val.base
[PROOFSTEP]
dsimp [-Set.mem_range]
[GOAL]
case intro.intro.refine'_3.left
D : GlueData
i : (toLocallyRingedSpaceGlueData D).toGlueData.J
y : ↑(LocallyRingedSpace.toTopCat (U (toLocallyRingedSpaceGlueData D).toGlueData i))
⊢ ↑(ι (mapGlueData D.toGlueData forgetToLocallyRingedSpace) i).val.base y ∈
    Set.range
      ↑((OpenCover.map (affineCover (U D.toGlueData i)) y).val.base ≫
          (ι (mapGlueData D.toGlueData forgetToLocallyRingedSpace) i).val.base)
[PROOFSTEP]
rw [coe_comp, Set.range_comp]
[GOAL]
case intro.intro.refine'_3.left
D : GlueData
i : (toLocallyRingedSpaceGlueData D).toGlueData.J
y : ↑(LocallyRingedSpace.toTopCat (U (toLocallyRingedSpaceGlueData D).toGlueData i))
⊢ ↑(ι (mapGlueData D.toGlueData forgetToLocallyRingedSpace) i).val.base y ∈
    ↑(ι (mapGlueData D.toGlueData forgetToLocallyRingedSpace) i).val.base ''
      Set.range ↑(OpenCover.map (affineCover (U D.toGlueData i)) y).val.base
[PROOFSTEP]
refine' Set.mem_image_of_mem _ _
[GOAL]
case intro.intro.refine'_3.left
D : GlueData
i : (toLocallyRingedSpaceGlueData D).toGlueData.J
y : ↑(LocallyRingedSpace.toTopCat (U (toLocallyRingedSpaceGlueData D).toGlueData i))
⊢ y ∈ Set.range ↑(OpenCover.map (affineCover (U D.toGlueData i)) y).val.base
[PROOFSTEP]
exact (D.U i).affineCover.Covers y
[GOAL]
case intro.intro.refine'_3.right
D : GlueData
i : (toLocallyRingedSpaceGlueData D).toGlueData.J
y : ↑(LocallyRingedSpace.toTopCat (U (toLocallyRingedSpaceGlueData D).toGlueData i))
⊢ LocallyRingedSpace.IsOpenImmersion
    (OpenCover.map (affineCover (U D.toGlueData i)) y ≫ ι (toLocallyRingedSpaceGlueData D).toGlueData i)
[PROOFSTEP]
infer_instance
[GOAL]
D : GlueData
i : D.J
⊢ IsOpenImmersion (CategoryTheory.GlueData.ι D.toGlueData i)
[PROOFSTEP]
rw [← D.ι_isoLocallyRingedSpace_inv]
[GOAL]
D : GlueData
i : D.J
⊢ IsOpenImmersion
    (CategoryTheory.GlueData.ι (toLocallyRingedSpaceGlueData D).toGlueData i ≫ (isoLocallyRingedSpace D).inv)
[PROOFSTEP]
infer_instance
[GOAL]
D : GlueData
i j : D.J
⊢ f D.toGlueData i j ≫ ι D i = (t D.toGlueData i j ≫ f D.toGlueData j i) ≫ ι D j
[PROOFSTEP]
simp
[GOAL]
D : GlueData
⊢ ↑(glued D).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace ≅
    CategoryTheory.GlueData.glued
      (GlueData.toTopGlueData
          (SheafedSpace.GlueData.toPresheafedSpaceGlueData
            (LocallyRingedSpace.GlueData.toSheafedSpaceGlueData (toLocallyRingedSpaceGlueData D)))).toGlueData
[PROOFSTEP]
refine (PresheafedSpace.forget _).mapIso ?_ ≪≫ GlueData.gluedIso _ (PresheafedSpace.forget.{_, _, u} _)
[GOAL]
D : GlueData
⊢ (glued D).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace ≅
    CategoryTheory.GlueData.glued
      (SheafedSpace.GlueData.toPresheafedSpaceGlueData
          (LocallyRingedSpace.GlueData.toSheafedSpaceGlueData (toLocallyRingedSpaceGlueData D))).toGlueData
[PROOFSTEP]
refine SheafedSpace.forgetToPresheafedSpace.mapIso ?_ ≪≫ SheafedSpace.GlueData.isoPresheafedSpace _
[GOAL]
D : GlueData
⊢ (glued D).toLocallyRingedSpace.toSheafedSpace ≅
    CategoryTheory.GlueData.glued
      (LocallyRingedSpace.GlueData.toSheafedSpaceGlueData (toLocallyRingedSpaceGlueData D)).toGlueData
[PROOFSTEP]
refine LocallyRingedSpace.forgetToSheafedSpace.mapIso ?_ ≪≫ LocallyRingedSpace.GlueData.isoSheafedSpace _
[GOAL]
D : GlueData
⊢ (glued D).toLocallyRingedSpace ≅ CategoryTheory.GlueData.glued (toLocallyRingedSpaceGlueData D).toGlueData
[PROOFSTEP]
exact Scheme.GlueData.isoLocallyRingedSpace _
[GOAL]
D : GlueData
i : D.J
⊢ CategoryTheory.GlueData.ι
        (GlueData.toTopGlueData
            (SheafedSpace.GlueData.toPresheafedSpaceGlueData
              (LocallyRingedSpace.GlueData.toSheafedSpaceGlueData (toLocallyRingedSpaceGlueData D)))).toGlueData
        i ≫
      (isoCarrier D).inv =
    (ι D i).val.base
[PROOFSTEP]
delta isoCarrier
[GOAL]
D : GlueData
i : D.J
⊢ CategoryTheory.GlueData.ι
        (GlueData.toTopGlueData
            (SheafedSpace.GlueData.toPresheafedSpaceGlueData
              (LocallyRingedSpace.GlueData.toSheafedSpaceGlueData (toLocallyRingedSpaceGlueData D)))).toGlueData
        i ≫
      ((PresheafedSpace.forget CommRingCat).mapIso
            (SheafedSpace.forgetToPresheafedSpace.mapIso
                (LocallyRingedSpace.forgetToSheafedSpace.mapIso (isoLocallyRingedSpace D) ≪≫
                  LocallyRingedSpace.GlueData.isoSheafedSpace (toLocallyRingedSpaceGlueData D)) ≪≫
              SheafedSpace.GlueData.isoPresheafedSpace
                (LocallyRingedSpace.GlueData.toSheafedSpaceGlueData (toLocallyRingedSpaceGlueData D))) ≪≫
          gluedIso
            (SheafedSpace.GlueData.toPresheafedSpaceGlueData
                (LocallyRingedSpace.GlueData.toSheafedSpaceGlueData (toLocallyRingedSpaceGlueData D))).toGlueData
            (PresheafedSpace.forget CommRingCat)).inv =
    (ι D i).val.base
[PROOFSTEP]
rw [Iso.trans_inv, GlueData.ι_gluedIso_inv_assoc, Functor.mapIso_inv, Iso.trans_inv, Functor.mapIso_inv, Iso.trans_inv,
  SheafedSpace.forgetToPresheafedSpace_map, forget_map, forget_map, ← comp_base, ← Category.assoc,
  D.toLocallyRingedSpaceGlueData.toSheafedSpaceGlueData.ι_isoPresheafedSpace_inv i]
[GOAL]
D : GlueData
i : D.J
⊢ (CategoryTheory.GlueData.ι
          (LocallyRingedSpace.GlueData.toSheafedSpaceGlueData (toLocallyRingedSpaceGlueData D)).toGlueData i ≫
        (LocallyRingedSpace.GlueData.isoSheafedSpace (toLocallyRingedSpaceGlueData D)).inv ≫
          (LocallyRingedSpace.forgetToSheafedSpace.mapIso (isoLocallyRingedSpace D)).inv).base =
    (ι D i).val.base
[PROOFSTEP]
erw [← Category.assoc, D.toLocallyRingedSpaceGlueData.ι_isoSheafedSpace_inv i]
[GOAL]
D : GlueData
i : D.J
⊢ ((CategoryTheory.GlueData.ι (toLocallyRingedSpaceGlueData D).toGlueData i).val ≫
        (LocallyRingedSpace.forgetToSheafedSpace.mapIso (isoLocallyRingedSpace D)).inv).base =
    (ι D i).val.base
[PROOFSTEP]
change (_ ≫ D.isoLocallyRingedSpace.inv).1.base = _
[GOAL]
D : GlueData
i : D.J
⊢ (CategoryTheory.GlueData.ι (toLocallyRingedSpaceGlueData D).toGlueData i ≫ (isoLocallyRingedSpace D).inv).val.base =
    (ι D i).val.base
[PROOFSTEP]
rw [D.ι_isoLocallyRingedSpace_inv i]
[GOAL]
D : GlueData
i j : D.J
x : ↑↑(U D.toGlueData i).toPresheafedSpace
y : ↑↑(U D.toGlueData j).toPresheafedSpace
⊢ ↑(CategoryTheory.GlueData.ι D.toGlueData i).val.base x = ↑(CategoryTheory.GlueData.ι D.toGlueData j).val.base y ↔
    Rel D { fst := i, snd := x } { fst := j, snd := y }
[PROOFSTEP]
refine'
  Iff.trans _
    (TopCat.GlueData.ι_eq_iff_rel
      D.toLocallyRingedSpaceGlueData.toSheafedSpaceGlueData.toPresheafedSpaceGlueData.toTopGlueData i j x y)
[GOAL]
D : GlueData
i j : D.J
x : ↑↑(U D.toGlueData i).toPresheafedSpace
y : ↑↑(U D.toGlueData j).toPresheafedSpace
⊢ ↑(CategoryTheory.GlueData.ι D.toGlueData i).val.base x = ↑(CategoryTheory.GlueData.ι D.toGlueData j).val.base y ↔
    ↑(CategoryTheory.GlueData.ι
            (GlueData.toTopGlueData
                (SheafedSpace.GlueData.toPresheafedSpaceGlueData
                  (LocallyRingedSpace.GlueData.toSheafedSpaceGlueData (toLocallyRingedSpaceGlueData D)))).toGlueData
            i)
        x =
      ↑(CategoryTheory.GlueData.ι
            (GlueData.toTopGlueData
                (SheafedSpace.GlueData.toPresheafedSpaceGlueData
                  (LocallyRingedSpace.GlueData.toSheafedSpaceGlueData (toLocallyRingedSpaceGlueData D)))).toGlueData
            j)
        y
[PROOFSTEP]
rw [← ((TopCat.mono_iff_injective D.isoCarrier.inv).mp _).eq_iff]
[GOAL]
D : GlueData
i j : D.J
x : ↑↑(U D.toGlueData i).toPresheafedSpace
y : ↑↑(U D.toGlueData j).toPresheafedSpace
⊢ ↑(CategoryTheory.GlueData.ι D.toGlueData i).val.base x = ↑(CategoryTheory.GlueData.ι D.toGlueData j).val.base y ↔
    ↑(isoCarrier D).inv
        (↑(CategoryTheory.GlueData.ι
              (GlueData.toTopGlueData
                  (SheafedSpace.GlueData.toPresheafedSpaceGlueData
                    (LocallyRingedSpace.GlueData.toSheafedSpaceGlueData (toLocallyRingedSpaceGlueData D)))).toGlueData
              i)
          x) =
      ↑(isoCarrier D).inv
        (↑(CategoryTheory.GlueData.ι
              (GlueData.toTopGlueData
                  (SheafedSpace.GlueData.toPresheafedSpaceGlueData
                    (LocallyRingedSpace.GlueData.toSheafedSpaceGlueData (toLocallyRingedSpaceGlueData D)))).toGlueData
              j)
          y)
[PROOFSTEP]
simp_rw [← comp_apply, ← D.ι_isoCarrier_inv]
[GOAL]
D : GlueData
i j : D.J
x : ↑↑(U D.toGlueData i).toPresheafedSpace
y : ↑↑(U D.toGlueData j).toPresheafedSpace
⊢ ↑(CategoryTheory.GlueData.ι
              (mapGlueData
                (mapGlueData
                  (mapGlueData (mapGlueData D.toGlueData forgetToLocallyRingedSpace)
                    LocallyRingedSpace.forgetToSheafedSpace)
                  SheafedSpace.forgetToPresheafedSpace)
                (PresheafedSpace.forget CommRingCat))
              i ≫
            (isoCarrier D).inv)
        x =
      ↑(CategoryTheory.GlueData.ι
              (mapGlueData
                (mapGlueData
                  (mapGlueData (mapGlueData D.toGlueData forgetToLocallyRingedSpace)
                    LocallyRingedSpace.forgetToSheafedSpace)
                  SheafedSpace.forgetToPresheafedSpace)
                (PresheafedSpace.forget CommRingCat))
              j ≫
            (isoCarrier D).inv)
        y ↔
    ↑(CategoryTheory.GlueData.ι
              (mapGlueData
                (mapGlueData
                  (mapGlueData (mapGlueData D.toGlueData forgetToLocallyRingedSpace)
                    LocallyRingedSpace.forgetToSheafedSpace)
                  SheafedSpace.forgetToPresheafedSpace)
                (PresheafedSpace.forget CommRingCat))
              i ≫
            (isoCarrier D).inv)
        x =
      ↑(CategoryTheory.GlueData.ι
              (mapGlueData
                (mapGlueData
                  (mapGlueData (mapGlueData D.toGlueData forgetToLocallyRingedSpace)
                    LocallyRingedSpace.forgetToSheafedSpace)
                  SheafedSpace.forgetToPresheafedSpace)
                (PresheafedSpace.forget CommRingCat))
              j ≫
            (isoCarrier D).inv)
        y
[PROOFSTEP]
rfl
[GOAL]
D : GlueData
i j : D.J
x : ↑↑(U D.toGlueData i).toPresheafedSpace
y : ↑↑(U D.toGlueData j).toPresheafedSpace
⊢ Mono (isoCarrier D).inv
[PROOFSTEP]
infer_instance
[GOAL]
D : GlueData
U : Set ↑↑(glued D).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace
⊢ IsOpen U ↔ ∀ (i : D.J), IsOpen (↑(ι D i).val.base ⁻¹' U)
[PROOFSTEP]
rw [← (TopCat.homeoOfIso D.isoCarrier.symm).isOpen_preimage]
[GOAL]
D : GlueData
U : Set ↑↑(glued D).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace
⊢ IsOpen (↑(TopCat.homeoOfIso (isoCarrier D).symm) ⁻¹' U) ↔ ∀ (i : D.J), IsOpen (↑(ι D i).val.base ⁻¹' U)
[PROOFSTEP]
rw [TopCat.GlueData.isOpen_iff]
[GOAL]
D : GlueData
U : Set ↑↑(glued D).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace
⊢ (∀
      (i :
        (GlueData.toTopGlueData
              (SheafedSpace.GlueData.toPresheafedSpaceGlueData
                (LocallyRingedSpace.GlueData.toSheafedSpaceGlueData (toLocallyRingedSpaceGlueData D)))).toGlueData.J),
      IsOpen
        (↑(CategoryTheory.GlueData.ι
              (GlueData.toTopGlueData
                  (SheafedSpace.GlueData.toPresheafedSpaceGlueData
                    (LocallyRingedSpace.GlueData.toSheafedSpaceGlueData (toLocallyRingedSpaceGlueData D)))).toGlueData
              i) ⁻¹'
          (↑(TopCat.homeoOfIso (isoCarrier D).symm) ⁻¹' U))) ↔
    ∀ (i : D.J), IsOpen (↑(ι D i).val.base ⁻¹' U)
[PROOFSTEP]
apply forall_congr'
[GOAL]
case h
D : GlueData
U : Set ↑↑(glued D).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace
⊢ ∀
    (a :
      (GlueData.toTopGlueData
            (SheafedSpace.GlueData.toPresheafedSpaceGlueData
              (LocallyRingedSpace.GlueData.toSheafedSpaceGlueData (toLocallyRingedSpaceGlueData D)))).toGlueData.J),
    IsOpen
        (↑(CategoryTheory.GlueData.ι
              (GlueData.toTopGlueData
                  (SheafedSpace.GlueData.toPresheafedSpaceGlueData
                    (LocallyRingedSpace.GlueData.toSheafedSpaceGlueData (toLocallyRingedSpaceGlueData D)))).toGlueData
              a) ⁻¹'
          (↑(TopCat.homeoOfIso (isoCarrier D).symm) ⁻¹' U)) ↔
      IsOpen (↑(ι D a).val.base ⁻¹' U)
[PROOFSTEP]
intro i
[GOAL]
case h
D : GlueData
U : Set ↑↑(glued D).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace
i :
  (GlueData.toTopGlueData
        (SheafedSpace.GlueData.toPresheafedSpaceGlueData
          (LocallyRingedSpace.GlueData.toSheafedSpaceGlueData (toLocallyRingedSpaceGlueData D)))).toGlueData.J
⊢ IsOpen
      (↑(CategoryTheory.GlueData.ι
            (GlueData.toTopGlueData
                (SheafedSpace.GlueData.toPresheafedSpaceGlueData
                  (LocallyRingedSpace.GlueData.toSheafedSpaceGlueData (toLocallyRingedSpaceGlueData D)))).toGlueData
            i) ⁻¹'
        (↑(TopCat.homeoOfIso (isoCarrier D).symm) ⁻¹' U)) ↔
    IsOpen (↑(ι D i).val.base ⁻¹' U)
[PROOFSTEP]
erw [← Set.preimage_comp, ← ι_isoCarrier_inv]
[GOAL]
case h
D : GlueData
U : Set ↑↑(glued D).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace
i :
  (GlueData.toTopGlueData
        (SheafedSpace.GlueData.toPresheafedSpaceGlueData
          (LocallyRingedSpace.GlueData.toSheafedSpaceGlueData (toLocallyRingedSpaceGlueData D)))).toGlueData.J
⊢ IsOpen
      (↑(TopCat.homeoOfIso (isoCarrier D).symm) ∘
          ↑(CategoryTheory.GlueData.ι
              (GlueData.toTopGlueData
                  (SheafedSpace.GlueData.toPresheafedSpaceGlueData
                    (LocallyRingedSpace.GlueData.toSheafedSpaceGlueData (toLocallyRingedSpaceGlueData D)))).toGlueData
              i) ⁻¹'
        U) ↔
    IsOpen
      (↑(CategoryTheory.GlueData.ι
              (GlueData.toTopGlueData
                  (SheafedSpace.GlueData.toPresheafedSpaceGlueData
                    (LocallyRingedSpace.GlueData.toSheafedSpaceGlueData (toLocallyRingedSpaceGlueData D)))).toGlueData
              i ≫
            (isoCarrier D).inv) ⁻¹'
        U)
[PROOFSTEP]
rfl
[GOAL]
X : Scheme
𝒰 : OpenCover X
x y z : 𝒰.J
⊢ pullback pullback.fst pullback.fst ⟶ pullback pullback.fst pullback.fst
[PROOFSTEP]
refine' (pullbackRightPullbackFstIso _ _ _).hom ≫ _
[GOAL]
X : Scheme
𝒰 : OpenCover X
x y z : 𝒰.J
⊢ pullback (pullback.fst ≫ map 𝒰 x) (map 𝒰 z) ⟶ pullback pullback.fst pullback.fst
[PROOFSTEP]
refine' _ ≫ (pullbackSymmetry _ _).hom
[GOAL]
X : Scheme
𝒰 : OpenCover X
x y z : 𝒰.J
⊢ pullback (pullback.fst ≫ map 𝒰 x) (map 𝒰 z) ⟶ pullback pullback.fst pullback.fst
[PROOFSTEP]
refine' _ ≫ (pullbackRightPullbackFstIso _ _ _).inv
[GOAL]
X : Scheme
𝒰 : OpenCover X
x y z : 𝒰.J
⊢ pullback (pullback.fst ≫ map 𝒰 x) (map 𝒰 z) ⟶ pullback (pullback.fst ≫ map 𝒰 y) (map 𝒰 z)
[PROOFSTEP]
refine' pullback.map _ _ _ _ (pullbackSymmetry _ _).hom (𝟙 _) (𝟙 _) _ _
[GOAL]
case refine'_1
X : Scheme
𝒰 : OpenCover X
x y z : 𝒰.J
⊢ (pullback.fst ≫ map 𝒰 x) ≫ 𝟙 X = (pullbackSymmetry (map 𝒰 x) (map 𝒰 y)).hom ≫ pullback.fst ≫ map 𝒰 y
[PROOFSTEP]
simp [pullback.condition]
[GOAL]
case refine'_2
X : Scheme
𝒰 : OpenCover X
x y z : 𝒰.J
⊢ map 𝒰 z ≫ 𝟙 X = 𝟙 (obj 𝒰 z) ≫ map 𝒰 z
[PROOFSTEP]
simp
[GOAL]
X : Scheme
𝒰 : OpenCover X
x y z : 𝒰.J
⊢ gluedCoverT' 𝒰 x y z ≫ pullback.fst ≫ pullback.fst = pullback.fst ≫ pullback.snd
[PROOFSTEP]
delta gluedCoverT'
[GOAL]
X : Scheme
𝒰 : OpenCover X
x y z : 𝒰.J
⊢ ((pullbackRightPullbackFstIso (map 𝒰 x) (map 𝒰 z) pullback.fst).hom ≫
        (pullback.map (pullback.fst ≫ map 𝒰 x) (map 𝒰 z) (pullback.fst ≫ map 𝒰 y) (map 𝒰 z)
              (pullbackSymmetry (map 𝒰 x) (map 𝒰 y)).hom (𝟙 (obj 𝒰 z)) (𝟙 X)
              (_ : (pullback.fst ≫ map 𝒰 x) ≫ 𝟙 X = (pullbackSymmetry (map 𝒰 x) (map 𝒰 y)).hom ≫ pullback.fst ≫ map 𝒰 y)
              (_ : map 𝒰 z ≫ 𝟙 X = 𝟙 (obj 𝒰 z) ≫ map 𝒰 z) ≫
            (pullbackRightPullbackFstIso (map 𝒰 y) (map 𝒰 z) pullback.fst).inv) ≫
          (pullbackSymmetry pullback.fst pullback.fst).hom) ≫
      pullback.fst ≫ pullback.fst =
    pullback.fst ≫ pullback.snd
[PROOFSTEP]
simp
[GOAL]
X : Scheme
𝒰 : OpenCover X
x y z : 𝒰.J
⊢ gluedCoverT' 𝒰 x y z ≫ pullback.fst ≫ pullback.snd = pullback.snd ≫ pullback.snd
[PROOFSTEP]
delta gluedCoverT'
[GOAL]
X : Scheme
𝒰 : OpenCover X
x y z : 𝒰.J
⊢ ((pullbackRightPullbackFstIso (map 𝒰 x) (map 𝒰 z) pullback.fst).hom ≫
        (pullback.map (pullback.fst ≫ map 𝒰 x) (map 𝒰 z) (pullback.fst ≫ map 𝒰 y) (map 𝒰 z)
              (pullbackSymmetry (map 𝒰 x) (map 𝒰 y)).hom (𝟙 (obj 𝒰 z)) (𝟙 X)
              (_ : (pullback.fst ≫ map 𝒰 x) ≫ 𝟙 X = (pullbackSymmetry (map 𝒰 x) (map 𝒰 y)).hom ≫ pullback.fst ≫ map 𝒰 y)
              (_ : map 𝒰 z ≫ 𝟙 X = 𝟙 (obj 𝒰 z) ≫ map 𝒰 z) ≫
            (pullbackRightPullbackFstIso (map 𝒰 y) (map 𝒰 z) pullback.fst).inv) ≫
          (pullbackSymmetry pullback.fst pullback.fst).hom) ≫
      pullback.fst ≫ pullback.snd =
    pullback.snd ≫ pullback.snd
[PROOFSTEP]
simp
[GOAL]
X : Scheme
𝒰 : OpenCover X
x y z : 𝒰.J
⊢ gluedCoverT' 𝒰 x y z ≫ pullback.snd ≫ pullback.fst = pullback.fst ≫ pullback.snd
[PROOFSTEP]
delta gluedCoverT'
[GOAL]
X : Scheme
𝒰 : OpenCover X
x y z : 𝒰.J
⊢ ((pullbackRightPullbackFstIso (map 𝒰 x) (map 𝒰 z) pullback.fst).hom ≫
        (pullback.map (pullback.fst ≫ map 𝒰 x) (map 𝒰 z) (pullback.fst ≫ map 𝒰 y) (map 𝒰 z)
              (pullbackSymmetry (map 𝒰 x) (map 𝒰 y)).hom (𝟙 (obj 𝒰 z)) (𝟙 X)
              (_ : (pullback.fst ≫ map 𝒰 x) ≫ 𝟙 X = (pullbackSymmetry (map 𝒰 x) (map 𝒰 y)).hom ≫ pullback.fst ≫ map 𝒰 y)
              (_ : map 𝒰 z ≫ 𝟙 X = 𝟙 (obj 𝒰 z) ≫ map 𝒰 z) ≫
            (pullbackRightPullbackFstIso (map 𝒰 y) (map 𝒰 z) pullback.fst).inv) ≫
          (pullbackSymmetry pullback.fst pullback.fst).hom) ≫
      pullback.snd ≫ pullback.fst =
    pullback.fst ≫ pullback.snd
[PROOFSTEP]
simp
[GOAL]
X : Scheme
𝒰 : OpenCover X
x y z : 𝒰.J
⊢ gluedCoverT' 𝒰 x y z ≫ pullback.snd ≫ pullback.snd = pullback.fst ≫ pullback.fst
[PROOFSTEP]
delta gluedCoverT'
[GOAL]
X : Scheme
𝒰 : OpenCover X
x y z : 𝒰.J
⊢ ((pullbackRightPullbackFstIso (map 𝒰 x) (map 𝒰 z) pullback.fst).hom ≫
        (pullback.map (pullback.fst ≫ map 𝒰 x) (map 𝒰 z) (pullback.fst ≫ map 𝒰 y) (map 𝒰 z)
              (pullbackSymmetry (map 𝒰 x) (map 𝒰 y)).hom (𝟙 (obj 𝒰 z)) (𝟙 X)
              (_ : (pullback.fst ≫ map 𝒰 x) ≫ 𝟙 X = (pullbackSymmetry (map 𝒰 x) (map 𝒰 y)).hom ≫ pullback.fst ≫ map 𝒰 y)
              (_ : map 𝒰 z ≫ 𝟙 X = 𝟙 (obj 𝒰 z) ≫ map 𝒰 z) ≫
            (pullbackRightPullbackFstIso (map 𝒰 y) (map 𝒰 z) pullback.fst).inv) ≫
          (pullbackSymmetry pullback.fst pullback.fst).hom) ≫
      pullback.snd ≫ pullback.snd =
    pullback.fst ≫ pullback.fst
[PROOFSTEP]
simp
[GOAL]
X : Scheme
𝒰 : OpenCover X
x y z : 𝒰.J
⊢ gluedCoverT' 𝒰 x y z ≫ gluedCoverT' 𝒰 y z x ≫ gluedCoverT' 𝒰 z x y ≫ pullback.fst = pullback.fst
[PROOFSTEP]
apply pullback.hom_ext
[GOAL]
case h₀
X : Scheme
𝒰 : OpenCover X
x y z : 𝒰.J
⊢ (gluedCoverT' 𝒰 x y z ≫ gluedCoverT' 𝒰 y z x ≫ gluedCoverT' 𝒰 z x y ≫ pullback.fst) ≫ pullback.fst =
    pullback.fst ≫ pullback.fst
[PROOFSTEP]
simp
[GOAL]
case h₁
X : Scheme
𝒰 : OpenCover X
x y z : 𝒰.J
⊢ (gluedCoverT' 𝒰 x y z ≫ gluedCoverT' 𝒰 y z x ≫ gluedCoverT' 𝒰 z x y ≫ pullback.fst) ≫ pullback.snd =
    pullback.fst ≫ pullback.snd
[PROOFSTEP]
simp
[GOAL]
X : Scheme
𝒰 : OpenCover X
x y z : 𝒰.J
⊢ gluedCoverT' 𝒰 x y z ≫ gluedCoverT' 𝒰 y z x ≫ gluedCoverT' 𝒰 z x y ≫ pullback.snd = pullback.snd
[PROOFSTEP]
apply pullback.hom_ext
[GOAL]
case h₀
X : Scheme
𝒰 : OpenCover X
x y z : 𝒰.J
⊢ (gluedCoverT' 𝒰 x y z ≫ gluedCoverT' 𝒰 y z x ≫ gluedCoverT' 𝒰 z x y ≫ pullback.snd) ≫ pullback.fst =
    pullback.snd ≫ pullback.fst
[PROOFSTEP]
simp [pullback.condition]
[GOAL]
case h₁
X : Scheme
𝒰 : OpenCover X
x y z : 𝒰.J
⊢ (gluedCoverT' 𝒰 x y z ≫ gluedCoverT' 𝒰 y z x ≫ gluedCoverT' 𝒰 z x y ≫ pullback.snd) ≫ pullback.snd =
    pullback.snd ≫ pullback.snd
[PROOFSTEP]
simp [pullback.condition]
[GOAL]
X : Scheme
𝒰 : OpenCover X
x y z : 𝒰.J
⊢ gluedCoverT' 𝒰 x y z ≫ gluedCoverT' 𝒰 y z x ≫ gluedCoverT' 𝒰 z x y = 𝟙 (pullback pullback.fst pullback.fst)
[PROOFSTEP]
apply pullback.hom_ext
[GOAL]
case h₀
X : Scheme
𝒰 : OpenCover X
x y z : 𝒰.J
⊢ (gluedCoverT' 𝒰 x y z ≫ gluedCoverT' 𝒰 y z x ≫ gluedCoverT' 𝒰 z x y) ≫ pullback.fst =
    𝟙 (pullback pullback.fst pullback.fst) ≫ pullback.fst
[PROOFSTEP]
simp_rw [Category.id_comp, Category.assoc]
[GOAL]
case h₁
X : Scheme
𝒰 : OpenCover X
x y z : 𝒰.J
⊢ (gluedCoverT' 𝒰 x y z ≫ gluedCoverT' 𝒰 y z x ≫ gluedCoverT' 𝒰 z x y) ≫ pullback.snd =
    𝟙 (pullback pullback.fst pullback.fst) ≫ pullback.snd
[PROOFSTEP]
simp_rw [Category.id_comp, Category.assoc]
[GOAL]
case h₀
X : Scheme
𝒰 : OpenCover X
x y z : 𝒰.J
⊢ gluedCoverT' 𝒰 x y z ≫ gluedCoverT' 𝒰 y z x ≫ gluedCoverT' 𝒰 z x y ≫ pullback.fst = pullback.fst
case h₁
X : Scheme
𝒰 : OpenCover X
x y z : 𝒰.J
⊢ gluedCoverT' 𝒰 x y z ≫ gluedCoverT' 𝒰 y z x ≫ gluedCoverT' 𝒰 z x y ≫ pullback.snd = pullback.snd
[PROOFSTEP]
apply glued_cover_cocycle_fst
[GOAL]
case h₁
X : Scheme
𝒰 : OpenCover X
x y z : 𝒰.J
⊢ gluedCoverT' 𝒰 x y z ≫ gluedCoverT' 𝒰 y z x ≫ gluedCoverT' 𝒰 z x y ≫ pullback.snd = pullback.snd
[PROOFSTEP]
apply glued_cover_cocycle_snd
[GOAL]
X : Scheme
𝒰 : OpenCover X
x : 𝒰.J
⊢ (fun x y => (pullbackSymmetry (map 𝒰 x) (map 𝒰 y)).hom) x x =
    𝟙
      ((fun x =>
          match x with
          | (x, y) => pullback (map 𝒰 x) (map 𝒰 y))
        (x, x))
[PROOFSTEP]
simp
[GOAL]
X : Scheme
𝒰 : OpenCover X
x y z : 𝒰.J
⊢ (fun x y z => gluedCoverT' 𝒰 x y z) x y z ≫ pullback.snd =
    pullback.fst ≫ (fun x y => (pullbackSymmetry (map 𝒰 x) (map 𝒰 y)).hom) x y
[PROOFSTEP]
apply pullback.hom_ext
[GOAL]
case h₀
X : Scheme
𝒰 : OpenCover X
x y z : 𝒰.J
⊢ ((fun x y z => gluedCoverT' 𝒰 x y z) x y z ≫ pullback.snd) ≫ pullback.fst =
    (pullback.fst ≫ (fun x y => (pullbackSymmetry (map 𝒰 x) (map 𝒰 y)).hom) x y) ≫ pullback.fst
[PROOFSTEP]
simp
  -- The `cocycle` field could have been `by tidy` but lean timeouts.
[GOAL]
case h₁
X : Scheme
𝒰 : OpenCover X
x y z : 𝒰.J
⊢ ((fun x y z => gluedCoverT' 𝒰 x y z) x y z ≫ pullback.snd) ≫ pullback.snd =
    (pullback.fst ≫ (fun x y => (pullbackSymmetry (map 𝒰 x) (map 𝒰 y)).hom) x y) ≫ pullback.snd
[PROOFSTEP]
simp
  -- The `cocycle` field could have been `by tidy` but lean timeouts.
[GOAL]
X : Scheme
𝒰 : OpenCover X
⊢ GlueData.glued (gluedCover 𝒰) ⟶ X
[PROOFSTEP]
fapply Multicoequalizer.desc
[GOAL]
case k
X : Scheme
𝒰 : OpenCover X
⊢ (b : (diagram (gluedCover 𝒰).toGlueData).R) → MultispanIndex.right (diagram (gluedCover 𝒰).toGlueData) b ⟶ X
case h
X : Scheme
𝒰 : OpenCover X
⊢ ∀ (a : (diagram (gluedCover 𝒰).toGlueData).L),
    MultispanIndex.fst (diagram (gluedCover 𝒰).toGlueData) a ≫
        ?k (MultispanIndex.fstFrom (diagram (gluedCover 𝒰).toGlueData) a) =
      MultispanIndex.snd (diagram (gluedCover 𝒰).toGlueData) a ≫
        ?k (MultispanIndex.sndFrom (diagram (gluedCover 𝒰).toGlueData) a)
[PROOFSTEP]
exact fun x => 𝒰.map x
[GOAL]
case h
X : Scheme
𝒰 : OpenCover X
⊢ ∀ (a : (diagram (gluedCover 𝒰).toGlueData).L),
    MultispanIndex.fst (diagram (gluedCover 𝒰).toGlueData) a ≫
        map 𝒰 (MultispanIndex.fstFrom (diagram (gluedCover 𝒰).toGlueData) a) =
      MultispanIndex.snd (diagram (gluedCover 𝒰).toGlueData) a ≫
        map 𝒰 (MultispanIndex.sndFrom (diagram (gluedCover 𝒰).toGlueData) a)
[PROOFSTEP]
rintro ⟨x, y⟩
[GOAL]
case h.mk
X : Scheme
𝒰 : OpenCover X
x y : (gluedCover 𝒰).toGlueData.J
⊢ MultispanIndex.fst (diagram (gluedCover 𝒰).toGlueData) (x, y) ≫
      map 𝒰 (MultispanIndex.fstFrom (diagram (gluedCover 𝒰).toGlueData) (x, y)) =
    MultispanIndex.snd (diagram (gluedCover 𝒰).toGlueData) (x, y) ≫
      map 𝒰 (MultispanIndex.sndFrom (diagram (gluedCover 𝒰).toGlueData) (x, y))
[PROOFSTEP]
change pullback.fst ≫ _ = ((pullbackSymmetry _ _).hom ≫ pullback.fst) ≫ _
[GOAL]
case h.mk
X : Scheme
𝒰 : OpenCover X
x y : (gluedCover 𝒰).toGlueData.J
⊢ pullback.fst ≫ map 𝒰 (MultispanIndex.fstFrom (diagram (gluedCover 𝒰).toGlueData) (x, y)) =
    ((pullbackSymmetry (map 𝒰 x) (map 𝒰 y)).hom ≫ pullback.fst) ≫
      map 𝒰 (MultispanIndex.sndFrom (diagram (gluedCover 𝒰).toGlueData) (x, y))
[PROOFSTEP]
simpa using pullback.condition
[GOAL]
X : Scheme
𝒰 : OpenCover X
⊢ Function.Injective ↑(fromGlued 𝒰).val.base
[PROOFSTEP]
intro x y h
[GOAL]
X : Scheme
𝒰 : OpenCover X
x y :
  (CategoryTheory.forget TopCat).obj
    ↑(GlueData.glued (gluedCover 𝒰)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace
h : ↑(fromGlued 𝒰).val.base x = ↑(fromGlued 𝒰).val.base y
⊢ x = y
[PROOFSTEP]
obtain ⟨i, x, rfl⟩ := 𝒰.gluedCover.ι_jointly_surjective x
[GOAL]
case intro.intro
X : Scheme
𝒰 : OpenCover X
y :
  (CategoryTheory.forget TopCat).obj
    ↑(GlueData.glued (gluedCover 𝒰)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace
i : (gluedCover 𝒰).toGlueData.J
x : ↑↑(U (gluedCover 𝒰).toGlueData i).toPresheafedSpace
h : ↑(fromGlued 𝒰).val.base (↑(GlueData.ι (gluedCover 𝒰) i).val.base x) = ↑(fromGlued 𝒰).val.base y
⊢ ↑(GlueData.ι (gluedCover 𝒰) i).val.base x = y
[PROOFSTEP]
obtain ⟨j, y, rfl⟩ := 𝒰.gluedCover.ι_jointly_surjective y
[GOAL]
case intro.intro.intro.intro
X : Scheme
𝒰 : OpenCover X
i : (gluedCover 𝒰).toGlueData.J
x : ↑↑(U (gluedCover 𝒰).toGlueData i).toPresheafedSpace
j : (gluedCover 𝒰).toGlueData.J
y : ↑↑(U (gluedCover 𝒰).toGlueData j).toPresheafedSpace
h :
  ↑(fromGlued 𝒰).val.base (↑(GlueData.ι (gluedCover 𝒰) i).val.base x) =
    ↑(fromGlued 𝒰).val.base (↑(GlueData.ι (gluedCover 𝒰) j).val.base y)
⊢ ↑(GlueData.ι (gluedCover 𝒰) i).val.base x = ↑(GlueData.ι (gluedCover 𝒰) j).val.base y
[PROOFSTEP]
simp_rw [← comp_apply, ← SheafedSpace.comp_base, ← LocallyRingedSpace.comp_val] at h
[GOAL]
case intro.intro.intro.intro
X : Scheme
𝒰 : OpenCover X
i : (gluedCover 𝒰).toGlueData.J
x : ↑↑(U (gluedCover 𝒰).toGlueData i).toPresheafedSpace
j : (gluedCover 𝒰).toGlueData.J
y : ↑↑(U (gluedCover 𝒰).toGlueData j).toPresheafedSpace
h : ↑(GlueData.ι (gluedCover 𝒰) i ≫ fromGlued 𝒰).val.base x = ↑(GlueData.ι (gluedCover 𝒰) j ≫ fromGlued 𝒰).val.base y
⊢ ↑(GlueData.ι (gluedCover 𝒰) i).val.base x = ↑(GlueData.ι (gluedCover 𝒰) j).val.base y
[PROOFSTEP]
erw [ι_fromGlued, ι_fromGlued] at h
[GOAL]
case intro.intro.intro.intro
X : Scheme
𝒰 : OpenCover X
i : (gluedCover 𝒰).toGlueData.J
x : ↑↑(U (gluedCover 𝒰).toGlueData i).toPresheafedSpace
j : (gluedCover 𝒰).toGlueData.J
y : ↑↑(U (gluedCover 𝒰).toGlueData j).toPresheafedSpace
h : ↑(map 𝒰 i).val.base x = ↑(map 𝒰 j).val.base y
⊢ ↑(GlueData.ι (gluedCover 𝒰) i).val.base x = ↑(GlueData.ι (gluedCover 𝒰) j).val.base y
[PROOFSTEP]
let e :=
  (TopCat.pullbackConeIsLimit _ _).conePointUniqueUpToIso
    (isLimitOfHasPullbackOfPreservesLimit Scheme.forgetToTop (𝒰.map i) (𝒰.map j))
[GOAL]
case intro.intro.intro.intro
X : Scheme
𝒰 : OpenCover X
i : (gluedCover 𝒰).toGlueData.J
x : ↑↑(U (gluedCover 𝒰).toGlueData i).toPresheafedSpace
j : (gluedCover 𝒰).toGlueData.J
y : ↑↑(U (gluedCover 𝒰).toGlueData j).toPresheafedSpace
h : ↑(map 𝒰 i).val.base x = ↑(map 𝒰 j).val.base y
e : (TopCat.pullbackCone (forgetToTop.map (map 𝒰 i)) (forgetToTop.map (map 𝒰 j))).pt ≅
  (PullbackCone.mk (forgetToTop.map pullback.fst) (forgetToTop.map pullback.snd)
      (_ :
        forgetToTop.map pullback.fst ≫ forgetToTop.map (map 𝒰 i) =
          forgetToTop.map pullback.snd ≫ forgetToTop.map (map 𝒰 j))).pt :=
  IsLimit.conePointUniqueUpToIso (TopCat.pullbackConeIsLimit (forgetToTop.map (map 𝒰 i)) (forgetToTop.map (map 𝒰 j)))
    (isLimitOfHasPullbackOfPreservesLimit forgetToTop (map 𝒰 i) (map 𝒰 j))
⊢ ↑(GlueData.ι (gluedCover 𝒰) i).val.base x = ↑(GlueData.ι (gluedCover 𝒰) j).val.base y
[PROOFSTEP]
rw [𝒰.gluedCover.ι_eq_iff]
[GOAL]
case intro.intro.intro.intro
X : Scheme
𝒰 : OpenCover X
i : (gluedCover 𝒰).toGlueData.J
x : ↑↑(U (gluedCover 𝒰).toGlueData i).toPresheafedSpace
j : (gluedCover 𝒰).toGlueData.J
y : ↑↑(U (gluedCover 𝒰).toGlueData j).toPresheafedSpace
h : ↑(map 𝒰 i).val.base x = ↑(map 𝒰 j).val.base y
e : (TopCat.pullbackCone (forgetToTop.map (map 𝒰 i)) (forgetToTop.map (map 𝒰 j))).pt ≅
  (PullbackCone.mk (forgetToTop.map pullback.fst) (forgetToTop.map pullback.snd)
      (_ :
        forgetToTop.map pullback.fst ≫ forgetToTop.map (map 𝒰 i) =
          forgetToTop.map pullback.snd ≫ forgetToTop.map (map 𝒰 j))).pt :=
  IsLimit.conePointUniqueUpToIso (TopCat.pullbackConeIsLimit (forgetToTop.map (map 𝒰 i)) (forgetToTop.map (map 𝒰 j)))
    (isLimitOfHasPullbackOfPreservesLimit forgetToTop (map 𝒰 i) (map 𝒰 j))
⊢ GlueData.Rel (gluedCover 𝒰) { fst := i, snd := x } { fst := j, snd := y }
[PROOFSTEP]
right
[GOAL]
case intro.intro.intro.intro.h
X : Scheme
𝒰 : OpenCover X
i : (gluedCover 𝒰).toGlueData.J
x : ↑↑(U (gluedCover 𝒰).toGlueData i).toPresheafedSpace
j : (gluedCover 𝒰).toGlueData.J
y : ↑↑(U (gluedCover 𝒰).toGlueData j).toPresheafedSpace
h : ↑(map 𝒰 i).val.base x = ↑(map 𝒰 j).val.base y
e : (TopCat.pullbackCone (forgetToTop.map (map 𝒰 i)) (forgetToTop.map (map 𝒰 j))).pt ≅
  (PullbackCone.mk (forgetToTop.map pullback.fst) (forgetToTop.map pullback.snd)
      (_ :
        forgetToTop.map pullback.fst ≫ forgetToTop.map (map 𝒰 i) =
          forgetToTop.map pullback.snd ≫ forgetToTop.map (map 𝒰 j))).pt :=
  IsLimit.conePointUniqueUpToIso (TopCat.pullbackConeIsLimit (forgetToTop.map (map 𝒰 i)) (forgetToTop.map (map 𝒰 j)))
    (isLimitOfHasPullbackOfPreservesLimit forgetToTop (map 𝒰 i) (map 𝒰 j))
⊢ ∃ x_1,
    ↑(GlueData.f (gluedCover 𝒰).toGlueData { fst := i, snd := x }.fst { fst := j, snd := y }.fst).val.base x_1 =
        { fst := i, snd := x }.snd ∧
      ↑(t (gluedCover 𝒰).toGlueData { fst := i, snd := x }.fst { fst := j, snd := y }.fst ≫
                  GlueData.f (gluedCover 𝒰).toGlueData { fst := j, snd := y }.fst { fst := i, snd := x }.fst).val.base
          x_1 =
        { fst := j, snd := y }.snd
[PROOFSTEP]
use e.hom ⟨⟨x, y⟩, h⟩
[GOAL]
case h
X : Scheme
𝒰 : OpenCover X
i : (gluedCover 𝒰).toGlueData.J
x : ↑↑(U (gluedCover 𝒰).toGlueData i).toPresheafedSpace
j : (gluedCover 𝒰).toGlueData.J
y : ↑↑(U (gluedCover 𝒰).toGlueData j).toPresheafedSpace
h : ↑(map 𝒰 i).val.base x = ↑(map 𝒰 j).val.base y
e : (TopCat.pullbackCone (forgetToTop.map (map 𝒰 i)) (forgetToTop.map (map 𝒰 j))).pt ≅
  (PullbackCone.mk (forgetToTop.map pullback.fst) (forgetToTop.map pullback.snd)
      (_ :
        forgetToTop.map pullback.fst ≫ forgetToTop.map (map 𝒰 i) =
          forgetToTop.map pullback.snd ≫ forgetToTop.map (map 𝒰 j))).pt :=
  IsLimit.conePointUniqueUpToIso (TopCat.pullbackConeIsLimit (forgetToTop.map (map 𝒰 i)) (forgetToTop.map (map 𝒰 j)))
    (isLimitOfHasPullbackOfPreservesLimit forgetToTop (map 𝒰 i) (map 𝒰 j))
⊢ ↑(GlueData.f (gluedCover 𝒰).toGlueData { fst := i, snd := x }.fst { fst := j, snd := y }.fst).val.base
        (↑e.hom { val := (x, y), property := h }) =
      { fst := i, snd := x }.snd ∧
    ↑(t (gluedCover 𝒰).toGlueData { fst := i, snd := x }.fst { fst := j, snd := y }.fst ≫
                GlueData.f (gluedCover 𝒰).toGlueData { fst := j, snd := y }.fst { fst := i, snd := x }.fst).val.base
        (↑e.hom { val := (x, y), property := h }) =
      { fst := j, snd := y }.snd
[PROOFSTEP]
constructor
  -- Porting note: in the two subproofs below, added the `change` lines
[GOAL]
case h.left
X : Scheme
𝒰 : OpenCover X
i : (gluedCover 𝒰).toGlueData.J
x : ↑↑(U (gluedCover 𝒰).toGlueData i).toPresheafedSpace
j : (gluedCover 𝒰).toGlueData.J
y : ↑↑(U (gluedCover 𝒰).toGlueData j).toPresheafedSpace
h : ↑(map 𝒰 i).val.base x = ↑(map 𝒰 j).val.base y
e : (TopCat.pullbackCone (forgetToTop.map (map 𝒰 i)) (forgetToTop.map (map 𝒰 j))).pt ≅
  (PullbackCone.mk (forgetToTop.map pullback.fst) (forgetToTop.map pullback.snd)
      (_ :
        forgetToTop.map pullback.fst ≫ forgetToTop.map (map 𝒰 i) =
          forgetToTop.map pullback.snd ≫ forgetToTop.map (map 𝒰 j))).pt :=
  IsLimit.conePointUniqueUpToIso (TopCat.pullbackConeIsLimit (forgetToTop.map (map 𝒰 i)) (forgetToTop.map (map 𝒰 j)))
    (isLimitOfHasPullbackOfPreservesLimit forgetToTop (map 𝒰 i) (map 𝒰 j))
⊢ ↑(GlueData.f (gluedCover 𝒰).toGlueData { fst := i, snd := x }.fst { fst := j, snd := y }.fst).val.base
      (↑e.hom { val := (x, y), property := h }) =
    { fst := i, snd := x }.snd
[PROOFSTEP]
change (e.hom ≫ _) ⟨(x, y), h⟩ = x
[GOAL]
case h.left
X : Scheme
𝒰 : OpenCover X
i : (gluedCover 𝒰).toGlueData.J
x : ↑↑(U (gluedCover 𝒰).toGlueData i).toPresheafedSpace
j : (gluedCover 𝒰).toGlueData.J
y : ↑↑(U (gluedCover 𝒰).toGlueData j).toPresheafedSpace
h : ↑(map 𝒰 i).val.base x = ↑(map 𝒰 j).val.base y
e : (TopCat.pullbackCone (forgetToTop.map (map 𝒰 i)) (forgetToTop.map (map 𝒰 j))).pt ≅
  (PullbackCone.mk (forgetToTop.map pullback.fst) (forgetToTop.map pullback.snd)
      (_ :
        forgetToTop.map pullback.fst ≫ forgetToTop.map (map 𝒰 i) =
          forgetToTop.map pullback.snd ≫ forgetToTop.map (map 𝒰 j))).pt :=
  IsLimit.conePointUniqueUpToIso (TopCat.pullbackConeIsLimit (forgetToTop.map (map 𝒰 i)) (forgetToTop.map (map 𝒰 j)))
    (isLimitOfHasPullbackOfPreservesLimit forgetToTop (map 𝒰 i) (map 𝒰 j))
⊢ ↑(e.hom ≫ (GlueData.f (gluedCover 𝒰).toGlueData { fst := i, snd := x }.fst { fst := j, snd := y }.fst).val.base)
      { val := (x, y), property := h } =
    x
[PROOFSTEP]
erw [IsLimit.conePointUniqueUpToIso_hom_comp _ _ WalkingCospan.left]
[GOAL]
case h.left
X : Scheme
𝒰 : OpenCover X
i : (gluedCover 𝒰).toGlueData.J
x : ↑↑(U (gluedCover 𝒰).toGlueData i).toPresheafedSpace
j : (gluedCover 𝒰).toGlueData.J
y : ↑↑(U (gluedCover 𝒰).toGlueData j).toPresheafedSpace
h : ↑(map 𝒰 i).val.base x = ↑(map 𝒰 j).val.base y
e : (TopCat.pullbackCone (forgetToTop.map (map 𝒰 i)) (forgetToTop.map (map 𝒰 j))).pt ≅
  (PullbackCone.mk (forgetToTop.map pullback.fst) (forgetToTop.map pullback.snd)
      (_ :
        forgetToTop.map pullback.fst ≫ forgetToTop.map (map 𝒰 i) =
          forgetToTop.map pullback.snd ≫ forgetToTop.map (map 𝒰 j))).pt :=
  IsLimit.conePointUniqueUpToIso (TopCat.pullbackConeIsLimit (forgetToTop.map (map 𝒰 i)) (forgetToTop.map (map 𝒰 j)))
    (isLimitOfHasPullbackOfPreservesLimit forgetToTop (map 𝒰 i) (map 𝒰 j))
⊢ ↑(NatTrans.app (TopCat.pullbackCone (forgetToTop.map (map 𝒰 i)) (forgetToTop.map (map 𝒰 j))).π WalkingCospan.left)
      { val := (x, y), property := h } =
    x
[PROOFSTEP]
rfl
[GOAL]
case h.right
X : Scheme
𝒰 : OpenCover X
i : (gluedCover 𝒰).toGlueData.J
x : ↑↑(U (gluedCover 𝒰).toGlueData i).toPresheafedSpace
j : (gluedCover 𝒰).toGlueData.J
y : ↑↑(U (gluedCover 𝒰).toGlueData j).toPresheafedSpace
h : ↑(map 𝒰 i).val.base x = ↑(map 𝒰 j).val.base y
e : (TopCat.pullbackCone (forgetToTop.map (map 𝒰 i)) (forgetToTop.map (map 𝒰 j))).pt ≅
  (PullbackCone.mk (forgetToTop.map pullback.fst) (forgetToTop.map pullback.snd)
      (_ :
        forgetToTop.map pullback.fst ≫ forgetToTop.map (map 𝒰 i) =
          forgetToTop.map pullback.snd ≫ forgetToTop.map (map 𝒰 j))).pt :=
  IsLimit.conePointUniqueUpToIso (TopCat.pullbackConeIsLimit (forgetToTop.map (map 𝒰 i)) (forgetToTop.map (map 𝒰 j)))
    (isLimitOfHasPullbackOfPreservesLimit forgetToTop (map 𝒰 i) (map 𝒰 j))
⊢ ↑(t (gluedCover 𝒰).toGlueData { fst := i, snd := x }.fst { fst := j, snd := y }.fst ≫
              GlueData.f (gluedCover 𝒰).toGlueData { fst := j, snd := y }.fst { fst := i, snd := x }.fst).val.base
      (↑e.hom { val := (x, y), property := h }) =
    { fst := j, snd := y }.snd
[PROOFSTEP]
change (e.hom ≫ ((gluedCover 𝒰).toGlueData.t i j ≫ (gluedCover 𝒰).toGlueData.f j i).val.base) ⟨(x, y), h⟩ = y
[GOAL]
case h.right
X : Scheme
𝒰 : OpenCover X
i : (gluedCover 𝒰).toGlueData.J
x : ↑↑(U (gluedCover 𝒰).toGlueData i).toPresheafedSpace
j : (gluedCover 𝒰).toGlueData.J
y : ↑↑(U (gluedCover 𝒰).toGlueData j).toPresheafedSpace
h : ↑(map 𝒰 i).val.base x = ↑(map 𝒰 j).val.base y
e : (TopCat.pullbackCone (forgetToTop.map (map 𝒰 i)) (forgetToTop.map (map 𝒰 j))).pt ≅
  (PullbackCone.mk (forgetToTop.map pullback.fst) (forgetToTop.map pullback.snd)
      (_ :
        forgetToTop.map pullback.fst ≫ forgetToTop.map (map 𝒰 i) =
          forgetToTop.map pullback.snd ≫ forgetToTop.map (map 𝒰 j))).pt :=
  IsLimit.conePointUniqueUpToIso (TopCat.pullbackConeIsLimit (forgetToTop.map (map 𝒰 i)) (forgetToTop.map (map 𝒰 j)))
    (isLimitOfHasPullbackOfPreservesLimit forgetToTop (map 𝒰 i) (map 𝒰 j))
⊢ ↑(e.hom ≫ (t (gluedCover 𝒰).toGlueData i j ≫ GlueData.f (gluedCover 𝒰).toGlueData j i).val.base)
      { val := (x, y), property := h } =
    y
[PROOFSTEP]
erw [pullbackSymmetry_hom_comp_fst, IsLimit.conePointUniqueUpToIso_hom_comp _ _ WalkingCospan.right]
[GOAL]
case h.right
X : Scheme
𝒰 : OpenCover X
i : (gluedCover 𝒰).toGlueData.J
x : ↑↑(U (gluedCover 𝒰).toGlueData i).toPresheafedSpace
j : (gluedCover 𝒰).toGlueData.J
y : ↑↑(U (gluedCover 𝒰).toGlueData j).toPresheafedSpace
h : ↑(map 𝒰 i).val.base x = ↑(map 𝒰 j).val.base y
e : (TopCat.pullbackCone (forgetToTop.map (map 𝒰 i)) (forgetToTop.map (map 𝒰 j))).pt ≅
  (PullbackCone.mk (forgetToTop.map pullback.fst) (forgetToTop.map pullback.snd)
      (_ :
        forgetToTop.map pullback.fst ≫ forgetToTop.map (map 𝒰 i) =
          forgetToTop.map pullback.snd ≫ forgetToTop.map (map 𝒰 j))).pt :=
  IsLimit.conePointUniqueUpToIso (TopCat.pullbackConeIsLimit (forgetToTop.map (map 𝒰 i)) (forgetToTop.map (map 𝒰 j)))
    (isLimitOfHasPullbackOfPreservesLimit forgetToTop (map 𝒰 i) (map 𝒰 j))
⊢ ↑(NatTrans.app (TopCat.pullbackCone (forgetToTop.map (map 𝒰 i)) (forgetToTop.map (map 𝒰 j))).π WalkingCospan.right)
      { val := (x, y), property := h } =
    y
[PROOFSTEP]
rfl
[GOAL]
X : Scheme
𝒰 : OpenCover X
x : ↑↑(GlueData.glued (gluedCover 𝒰)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace
⊢ IsIso (stalkMap (fromGlued 𝒰).val x)
[PROOFSTEP]
obtain ⟨i, x, rfl⟩ := 𝒰.gluedCover.ι_jointly_surjective x
[GOAL]
case intro.intro
X : Scheme
𝒰 : OpenCover X
i : (gluedCover 𝒰).toGlueData.J
x : ↑↑(U (gluedCover 𝒰).toGlueData i).toPresheafedSpace
⊢ IsIso (stalkMap (fromGlued 𝒰).val (↑(GlueData.ι (gluedCover 𝒰) i).val.base x))
[PROOFSTEP]
have := PresheafedSpace.stalkMap.congr_hom _ _ (congr_arg LocallyRingedSpace.Hom.val <| 𝒰.ι_fromGlued i) x
[GOAL]
case intro.intro
X : Scheme
𝒰 : OpenCover X
i : (gluedCover 𝒰).toGlueData.J
x : ↑↑(U (gluedCover 𝒰).toGlueData i).toPresheafedSpace
this :
  stalkMap (GlueData.ι (gluedCover 𝒰) i ≫ fromGlued 𝒰).val x =
    eqToHom
        (_ :
          stalk X.toPresheafedSpace (↑(GlueData.ι (gluedCover 𝒰) i ≫ fromGlued 𝒰).val.base x) =
            stalk X.toPresheafedSpace (↑(map 𝒰 i).val.base x)) ≫
      stalkMap (map 𝒰 i).val x
⊢ IsIso (stalkMap (fromGlued 𝒰).val (↑(GlueData.ι (gluedCover 𝒰) i).val.base x))
[PROOFSTEP]
erw [PresheafedSpace.stalkMap.comp] at this
[GOAL]
case intro.intro
X : Scheme
𝒰 : OpenCover X
i : (gluedCover 𝒰).toGlueData.J
x : ↑↑(U (gluedCover 𝒰).toGlueData i).toPresheafedSpace
this :
  stalkMap (fromGlued 𝒰).val (↑(GlueData.ι (gluedCover 𝒰) i).val.base x) ≫
      stalkMap (GlueData.ι (gluedCover 𝒰) i).val x =
    eqToHom
        (_ :
          stalk X.toPresheafedSpace (↑(GlueData.ι (gluedCover 𝒰) i ≫ fromGlued 𝒰).val.base x) =
            stalk X.toPresheafedSpace (↑(map 𝒰 i).val.base x)) ≫
      stalkMap (map 𝒰 i).val x
⊢ IsIso (stalkMap (fromGlued 𝒰).val (↑(GlueData.ι (gluedCover 𝒰) i).val.base x))
[PROOFSTEP]
rw [← IsIso.eq_comp_inv] at this
[GOAL]
case intro.intro
X : Scheme
𝒰 : OpenCover X
i : (gluedCover 𝒰).toGlueData.J
x : ↑↑(U (gluedCover 𝒰).toGlueData i).toPresheafedSpace
this :
  stalkMap (fromGlued 𝒰).val (↑(GlueData.ι (gluedCover 𝒰) i).val.base x) =
    (eqToHom
          (_ :
            stalk X.toPresheafedSpace (↑(GlueData.ι (gluedCover 𝒰) i ≫ fromGlued 𝒰).val.base x) =
              stalk X.toPresheafedSpace (↑(map 𝒰 i).val.base x)) ≫
        stalkMap (map 𝒰 i).val x) ≫
      inv (stalkMap (GlueData.ι (gluedCover 𝒰) i).val x)
⊢ IsIso (stalkMap (fromGlued 𝒰).val (↑(GlueData.ι (gluedCover 𝒰) i).val.base x))
[PROOFSTEP]
rw [this]
[GOAL]
case intro.intro
X : Scheme
𝒰 : OpenCover X
i : (gluedCover 𝒰).toGlueData.J
x : ↑↑(U (gluedCover 𝒰).toGlueData i).toPresheafedSpace
this :
  stalkMap (fromGlued 𝒰).val (↑(GlueData.ι (gluedCover 𝒰) i).val.base x) =
    (eqToHom
          (_ :
            stalk X.toPresheafedSpace (↑(GlueData.ι (gluedCover 𝒰) i ≫ fromGlued 𝒰).val.base x) =
              stalk X.toPresheafedSpace (↑(map 𝒰 i).val.base x)) ≫
        stalkMap (map 𝒰 i).val x) ≫
      inv (stalkMap (GlueData.ι (gluedCover 𝒰) i).val x)
⊢ IsIso
    ((eqToHom
          (_ :
            stalk X.toPresheafedSpace (↑(GlueData.ι (gluedCover 𝒰) i ≫ fromGlued 𝒰).val.base x) =
              stalk X.toPresheafedSpace (↑(map 𝒰 i).val.base x)) ≫
        stalkMap (map 𝒰 i).val x) ≫
      inv (stalkMap (GlueData.ι (gluedCover 𝒰) i).val x))
[PROOFSTEP]
infer_instance
[GOAL]
X : Scheme
𝒰 : OpenCover X
⊢ IsOpenMap ↑(fromGlued 𝒰).val.base
[PROOFSTEP]
intro U hU
[GOAL]
X : Scheme
𝒰 : OpenCover X
U :
  Set
    ((CategoryTheory.forget TopCat).obj
      ↑(GlueData.glued (gluedCover 𝒰)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace)
hU : _root_.IsOpen U
⊢ _root_.IsOpen (↑(fromGlued 𝒰).val.base '' U)
[PROOFSTEP]
rw [isOpen_iff_forall_mem_open]
[GOAL]
X : Scheme
𝒰 : OpenCover X
U :
  Set
    ((CategoryTheory.forget TopCat).obj
      ↑(GlueData.glued (gluedCover 𝒰)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace)
hU : _root_.IsOpen U
⊢ ∀ (x : (CategoryTheory.forget TopCat).obj ↑X.toPresheafedSpace),
    x ∈ ↑(fromGlued 𝒰).val.base '' U → ∃ t, t ⊆ ↑(fromGlued 𝒰).val.base '' U ∧ _root_.IsOpen t ∧ x ∈ t
[PROOFSTEP]
intro x hx
[GOAL]
X : Scheme
𝒰 : OpenCover X
U :
  Set
    ((CategoryTheory.forget TopCat).obj
      ↑(GlueData.glued (gluedCover 𝒰)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace)
hU : _root_.IsOpen U
x : (CategoryTheory.forget TopCat).obj ↑X.toPresheafedSpace
hx : x ∈ ↑(fromGlued 𝒰).val.base '' U
⊢ ∃ t, t ⊆ ↑(fromGlued 𝒰).val.base '' U ∧ _root_.IsOpen t ∧ x ∈ t
[PROOFSTEP]
rw [𝒰.gluedCover.isOpen_iff] at hU
[GOAL]
X : Scheme
𝒰 : OpenCover X
U :
  Set
    ((CategoryTheory.forget TopCat).obj
      ↑(GlueData.glued (gluedCover 𝒰)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace)
hU : ∀ (i : (gluedCover 𝒰).toGlueData.J), _root_.IsOpen (↑(GlueData.ι (gluedCover 𝒰) i).val.base ⁻¹' U)
x : (CategoryTheory.forget TopCat).obj ↑X.toPresheafedSpace
hx : x ∈ ↑(fromGlued 𝒰).val.base '' U
⊢ ∃ t, t ⊆ ↑(fromGlued 𝒰).val.base '' U ∧ _root_.IsOpen t ∧ x ∈ t
[PROOFSTEP]
use 𝒰.fromGlued.val.base '' U ∩ Set.range (𝒰.map (𝒰.f x)).1.base
[GOAL]
case h
X : Scheme
𝒰 : OpenCover X
U :
  Set
    ((CategoryTheory.forget TopCat).obj
      ↑(GlueData.glued (gluedCover 𝒰)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace)
hU : ∀ (i : (gluedCover 𝒰).toGlueData.J), _root_.IsOpen (↑(GlueData.ι (gluedCover 𝒰) i).val.base ⁻¹' U)
x : (CategoryTheory.forget TopCat).obj ↑X.toPresheafedSpace
hx : x ∈ ↑(fromGlued 𝒰).val.base '' U
⊢ ↑(fromGlued 𝒰).val.base '' U ∩ Set.range ↑(map 𝒰 (f 𝒰 x)).val.base ⊆ ↑(fromGlued 𝒰).val.base '' U ∧
    _root_.IsOpen (↑(fromGlued 𝒰).val.base '' U ∩ Set.range ↑(map 𝒰 (f 𝒰 x)).val.base) ∧
      x ∈ ↑(fromGlued 𝒰).val.base '' U ∩ Set.range ↑(map 𝒰 (f 𝒰 x)).val.base
[PROOFSTEP]
use Set.inter_subset_left _ _
[GOAL]
case right
X : Scheme
𝒰 : OpenCover X
U :
  Set
    ((CategoryTheory.forget TopCat).obj
      ↑(GlueData.glued (gluedCover 𝒰)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace)
hU : ∀ (i : (gluedCover 𝒰).toGlueData.J), _root_.IsOpen (↑(GlueData.ι (gluedCover 𝒰) i).val.base ⁻¹' U)
x : (CategoryTheory.forget TopCat).obj ↑X.toPresheafedSpace
hx : x ∈ ↑(fromGlued 𝒰).val.base '' U
⊢ _root_.IsOpen (↑(fromGlued 𝒰).val.base '' U ∩ Set.range ↑(map 𝒰 (f 𝒰 x)).val.base) ∧
    x ∈ ↑(fromGlued 𝒰).val.base '' U ∩ Set.range ↑(map 𝒰 (f 𝒰 x)).val.base
[PROOFSTEP]
constructor
[GOAL]
case right.left
X : Scheme
𝒰 : OpenCover X
U :
  Set
    ((CategoryTheory.forget TopCat).obj
      ↑(GlueData.glued (gluedCover 𝒰)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace)
hU : ∀ (i : (gluedCover 𝒰).toGlueData.J), _root_.IsOpen (↑(GlueData.ι (gluedCover 𝒰) i).val.base ⁻¹' U)
x : (CategoryTheory.forget TopCat).obj ↑X.toPresheafedSpace
hx : x ∈ ↑(fromGlued 𝒰).val.base '' U
⊢ _root_.IsOpen (↑(fromGlued 𝒰).val.base '' U ∩ Set.range ↑(map 𝒰 (f 𝒰 x)).val.base)
[PROOFSTEP]
rw [← Set.image_preimage_eq_inter_range]
[GOAL]
case right.left
X : Scheme
𝒰 : OpenCover X
U :
  Set
    ((CategoryTheory.forget TopCat).obj
      ↑(GlueData.glued (gluedCover 𝒰)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace)
hU : ∀ (i : (gluedCover 𝒰).toGlueData.J), _root_.IsOpen (↑(GlueData.ι (gluedCover 𝒰) i).val.base ⁻¹' U)
x : (CategoryTheory.forget TopCat).obj ↑X.toPresheafedSpace
hx : x ∈ ↑(fromGlued 𝒰).val.base '' U
⊢ _root_.IsOpen (↑(map 𝒰 (f 𝒰 x)).val.base '' (↑(map 𝒰 (f 𝒰 x)).val.base ⁻¹' (↑(fromGlued 𝒰).val.base '' U)))
[PROOFSTEP]
apply (show IsOpenImmersion (𝒰.map (𝒰.f x)) from inferInstance).base_open.isOpenMap
[GOAL]
case right.left.a
X : Scheme
𝒰 : OpenCover X
U :
  Set
    ((CategoryTheory.forget TopCat).obj
      ↑(GlueData.glued (gluedCover 𝒰)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace)
hU : ∀ (i : (gluedCover 𝒰).toGlueData.J), _root_.IsOpen (↑(GlueData.ι (gluedCover 𝒰) i).val.base ⁻¹' U)
x : (CategoryTheory.forget TopCat).obj ↑X.toPresheafedSpace
hx : x ∈ ↑(fromGlued 𝒰).val.base '' U
⊢ _root_.IsOpen (↑(map 𝒰 (f 𝒰 x)).val.base ⁻¹' (↑(fromGlued 𝒰).val.base '' U))
[PROOFSTEP]
convert hU (𝒰.f x) using 1
[GOAL]
case h.e'_3.h
X : Scheme
𝒰 : OpenCover X
U :
  Set
    ((CategoryTheory.forget TopCat).obj
      ↑(GlueData.glued (gluedCover 𝒰)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace)
hU : ∀ (i : (gluedCover 𝒰).toGlueData.J), _root_.IsOpen (↑(GlueData.ι (gluedCover 𝒰) i).val.base ⁻¹' U)
x : (CategoryTheory.forget TopCat).obj ↑X.toPresheafedSpace
hx : x ∈ ↑(fromGlued 𝒰).val.base '' U
e_1✝ :
  (CategoryTheory.forget TopCat).obj ↑(obj 𝒰 (f 𝒰 x)).toPresheafedSpace =
    (CategoryTheory.forget TopCat).obj ↑(CategoryTheory.GlueData.U (gluedCover 𝒰).toGlueData (f 𝒰 x)).toPresheafedSpace
⊢ ↑(map 𝒰 (f 𝒰 x)).val.base ⁻¹' (↑(fromGlued 𝒰).val.base '' U) = ↑(GlueData.ι (gluedCover 𝒰) (f 𝒰 x)).val.base ⁻¹' U
[PROOFSTEP]
rw [← ι_fromGlued]
[GOAL]
case h.e'_3.h
X : Scheme
𝒰 : OpenCover X
U :
  Set
    ((CategoryTheory.forget TopCat).obj
      ↑(GlueData.glued (gluedCover 𝒰)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace)
hU : ∀ (i : (gluedCover 𝒰).toGlueData.J), _root_.IsOpen (↑(GlueData.ι (gluedCover 𝒰) i).val.base ⁻¹' U)
x : (CategoryTheory.forget TopCat).obj ↑X.toPresheafedSpace
hx : x ∈ ↑(fromGlued 𝒰).val.base '' U
e_1✝ :
  (CategoryTheory.forget TopCat).obj ↑(obj 𝒰 (f 𝒰 x)).toPresheafedSpace =
    (CategoryTheory.forget TopCat).obj ↑(CategoryTheory.GlueData.U (gluedCover 𝒰).toGlueData (f 𝒰 x)).toPresheafedSpace
⊢ ↑(GlueData.ι (gluedCover 𝒰) (f 𝒰 x) ≫ fromGlued 𝒰).val.base ⁻¹' (↑(fromGlued 𝒰).val.base '' U) =
    ↑(GlueData.ι (gluedCover 𝒰) (f 𝒰 x)).val.base ⁻¹' U
[PROOFSTEP]
erw [coe_comp]
[GOAL]
case h.e'_3.h
X : Scheme
𝒰 : OpenCover X
U :
  Set
    ((CategoryTheory.forget TopCat).obj
      ↑(GlueData.glued (gluedCover 𝒰)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace)
hU : ∀ (i : (gluedCover 𝒰).toGlueData.J), _root_.IsOpen (↑(GlueData.ι (gluedCover 𝒰) i).val.base ⁻¹' U)
x : (CategoryTheory.forget TopCat).obj ↑X.toPresheafedSpace
hx : x ∈ ↑(fromGlued 𝒰).val.base '' U
e_1✝ :
  (CategoryTheory.forget TopCat).obj ↑(obj 𝒰 (f 𝒰 x)).toPresheafedSpace =
    (CategoryTheory.forget TopCat).obj ↑(CategoryTheory.GlueData.U (gluedCover 𝒰).toGlueData (f 𝒰 x)).toPresheafedSpace
⊢ ↑(fromGlued 𝒰).val.base ∘ ↑(GlueData.ι (gluedCover 𝒰) (f 𝒰 x)).val.base ⁻¹' (↑(fromGlued 𝒰).val.base '' U) =
    ↑(GlueData.ι (gluedCover 𝒰) (f 𝒰 x)).val.base ⁻¹' U
[PROOFSTEP]
rw [Set.preimage_comp]
[GOAL]
case h.e'_3.h
X : Scheme
𝒰 : OpenCover X
U :
  Set
    ((CategoryTheory.forget TopCat).obj
      ↑(GlueData.glued (gluedCover 𝒰)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace)
hU : ∀ (i : (gluedCover 𝒰).toGlueData.J), _root_.IsOpen (↑(GlueData.ι (gluedCover 𝒰) i).val.base ⁻¹' U)
x : (CategoryTheory.forget TopCat).obj ↑X.toPresheafedSpace
hx : x ∈ ↑(fromGlued 𝒰).val.base '' U
e_1✝ :
  (CategoryTheory.forget TopCat).obj ↑(obj 𝒰 (f 𝒰 x)).toPresheafedSpace =
    (CategoryTheory.forget TopCat).obj ↑(CategoryTheory.GlueData.U (gluedCover 𝒰).toGlueData (f 𝒰 x)).toPresheafedSpace
⊢ ↑(GlueData.ι (gluedCover 𝒰) (f 𝒰 x)).val.base ⁻¹' (↑(fromGlued 𝒰).val.base ⁻¹' (↑(fromGlued 𝒰).val.base '' U)) =
    ↑(GlueData.ι (gluedCover 𝒰) (f 𝒰 x)).val.base ⁻¹' U
[PROOFSTEP]
congr! 1
[GOAL]
case h.e'_3.h.h.e'_4
X : Scheme
𝒰 : OpenCover X
U :
  Set
    ((CategoryTheory.forget TopCat).obj
      ↑(GlueData.glued (gluedCover 𝒰)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace)
hU : ∀ (i : (gluedCover 𝒰).toGlueData.J), _root_.IsOpen (↑(GlueData.ι (gluedCover 𝒰) i).val.base ⁻¹' U)
x : (CategoryTheory.forget TopCat).obj ↑X.toPresheafedSpace
hx : x ∈ ↑(fromGlued 𝒰).val.base '' U
e_1✝ :
  (CategoryTheory.forget TopCat).obj ↑(obj 𝒰 (f 𝒰 x)).toPresheafedSpace =
    (CategoryTheory.forget TopCat).obj ↑(CategoryTheory.GlueData.U (gluedCover 𝒰).toGlueData (f 𝒰 x)).toPresheafedSpace
⊢ ↑(fromGlued 𝒰).val.base ⁻¹' (↑(fromGlued 𝒰).val.base '' U) = U
[PROOFSTEP]
refine' Set.preimage_image_eq _ 𝒰.fromGlued_injective
[GOAL]
case right.right
X : Scheme
𝒰 : OpenCover X
U :
  Set
    ((CategoryTheory.forget TopCat).obj
      ↑(GlueData.glued (gluedCover 𝒰)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace)
hU : ∀ (i : (gluedCover 𝒰).toGlueData.J), _root_.IsOpen (↑(GlueData.ι (gluedCover 𝒰) i).val.base ⁻¹' U)
x : (CategoryTheory.forget TopCat).obj ↑X.toPresheafedSpace
hx : x ∈ ↑(fromGlued 𝒰).val.base '' U
⊢ x ∈ ↑(fromGlued 𝒰).val.base '' U ∩ Set.range ↑(map 𝒰 (f 𝒰 x)).val.base
[PROOFSTEP]
exact ⟨hx, 𝒰.Covers x⟩
[GOAL]
X : Scheme
𝒰 : OpenCover X
⊢ Epi (fromGlued 𝒰).val.base
[PROOFSTEP]
rw [TopCat.epi_iff_surjective]
[GOAL]
X : Scheme
𝒰 : OpenCover X
⊢ Function.Surjective ↑(fromGlued 𝒰).val.base
[PROOFSTEP]
intro x
[GOAL]
X : Scheme
𝒰 : OpenCover X
x : (CategoryTheory.forget TopCat).obj ↑X.toPresheafedSpace
⊢ ∃ a, ↑(fromGlued 𝒰).val.base a = x
[PROOFSTEP]
obtain ⟨y, h⟩ := 𝒰.Covers x
[GOAL]
case intro
X : Scheme
𝒰 : OpenCover X
x : (CategoryTheory.forget TopCat).obj ↑X.toPresheafedSpace
y : (CategoryTheory.forget TopCat).obj ↑(obj 𝒰 (f 𝒰 x)).toPresheafedSpace
h : ↑(map 𝒰 (f 𝒰 x)).val.base y = x
⊢ ∃ a, ↑(fromGlued 𝒰).val.base a = x
[PROOFSTEP]
use(𝒰.gluedCover.ι (𝒰.f x)).1.base y
[GOAL]
case h
X : Scheme
𝒰 : OpenCover X
x : (CategoryTheory.forget TopCat).obj ↑X.toPresheafedSpace
y : (CategoryTheory.forget TopCat).obj ↑(obj 𝒰 (f 𝒰 x)).toPresheafedSpace
h : ↑(map 𝒰 (f 𝒰 x)).val.base y = x
⊢ ↑(fromGlued 𝒰).val.base (↑(GlueData.ι (gluedCover 𝒰) (f 𝒰 x)).val.base y) = x
[PROOFSTEP]
rw [← comp_apply]
[GOAL]
case h
X : Scheme
𝒰 : OpenCover X
x : (CategoryTheory.forget TopCat).obj ↑X.toPresheafedSpace
y : (CategoryTheory.forget TopCat).obj ↑(obj 𝒰 (f 𝒰 x)).toPresheafedSpace
h : ↑(map 𝒰 (f 𝒰 x)).val.base y = x
⊢ ↑((GlueData.ι (gluedCover 𝒰) (f 𝒰 x)).val.base ≫ (fromGlued 𝒰).val.base) y = x
[PROOFSTEP]
rw [← 𝒰.ι_fromGlued (𝒰.f x)] at h
[GOAL]
case h
X : Scheme
𝒰 : OpenCover X
x : (CategoryTheory.forget TopCat).obj ↑X.toPresheafedSpace
y : (CategoryTheory.forget TopCat).obj ↑(obj 𝒰 (f 𝒰 x)).toPresheafedSpace
h : ↑(GlueData.ι (gluedCover 𝒰) (f 𝒰 x) ≫ fromGlued 𝒰).val.base y = x
⊢ ↑((GlueData.ι (gluedCover 𝒰) (f 𝒰 x)).val.base ≫ (fromGlued 𝒰).val.base) y = x
[PROOFSTEP]
exact h
[GOAL]
X : Scheme
𝒰 : OpenCover X
F : Scheme ⥤ PresheafedSpace CommRingCat :=
  forgetToLocallyRingedSpace ⋙ LocallyRingedSpace.forgetToSheafedSpace ⋙ SheafedSpace.forgetToPresheafedSpace
⊢ IsIso (F.map (fromGlued 𝒰))
[PROOFSTEP]
change @IsIso (PresheafedSpace _) _ _ _ 𝒰.fromGlued.val
[GOAL]
X : Scheme
𝒰 : OpenCover X
F : Scheme ⥤ PresheafedSpace CommRingCat :=
  forgetToLocallyRingedSpace ⋙ LocallyRingedSpace.forgetToSheafedSpace ⋙ SheafedSpace.forgetToPresheafedSpace
⊢ IsIso (fromGlued 𝒰).val
[PROOFSTEP]
apply PresheafedSpace.IsOpenImmersion.to_iso
[GOAL]
X : Scheme
𝒰 : OpenCover X
Y : Scheme
f : (x : 𝒰.J) → obj 𝒰 x ⟶ Y
hf : ∀ (x y : 𝒰.J), pullback.fst ≫ f x = pullback.snd ≫ f y
⊢ X ⟶ Y
[PROOFSTEP]
refine' inv 𝒰.fromGlued ≫ _
[GOAL]
X : Scheme
𝒰 : OpenCover X
Y : Scheme
f : (x : 𝒰.J) → obj 𝒰 x ⟶ Y
hf : ∀ (x y : 𝒰.J), pullback.fst ≫ f x = pullback.snd ≫ f y
⊢ GlueData.glued (gluedCover 𝒰) ⟶ Y
[PROOFSTEP]
fapply Multicoequalizer.desc
[GOAL]
case k
X : Scheme
𝒰 : OpenCover X
Y : Scheme
f : (x : 𝒰.J) → obj 𝒰 x ⟶ Y
hf : ∀ (x y : 𝒰.J), pullback.fst ≫ f x = pullback.snd ≫ f y
⊢ (b : (diagram (gluedCover 𝒰).toGlueData).R) → MultispanIndex.right (diagram (gluedCover 𝒰).toGlueData) b ⟶ Y
case h
X : Scheme
𝒰 : OpenCover X
Y : Scheme
f : (x : 𝒰.J) → obj 𝒰 x ⟶ Y
hf : ∀ (x y : 𝒰.J), pullback.fst ≫ f x = pullback.snd ≫ f y
⊢ ∀ (a : (diagram (gluedCover 𝒰).toGlueData).L),
    MultispanIndex.fst (diagram (gluedCover 𝒰).toGlueData) a ≫
        ?k (MultispanIndex.fstFrom (diagram (gluedCover 𝒰).toGlueData) a) =
      MultispanIndex.snd (diagram (gluedCover 𝒰).toGlueData) a ≫
        ?k (MultispanIndex.sndFrom (diagram (gluedCover 𝒰).toGlueData) a)
[PROOFSTEP]
exact f
[GOAL]
case h
X : Scheme
𝒰 : OpenCover X
Y : Scheme
f : (x : 𝒰.J) → obj 𝒰 x ⟶ Y
hf : ∀ (x y : 𝒰.J), pullback.fst ≫ f x = pullback.snd ≫ f y
⊢ ∀ (a : (diagram (gluedCover 𝒰).toGlueData).L),
    MultispanIndex.fst (diagram (gluedCover 𝒰).toGlueData) a ≫
        f (MultispanIndex.fstFrom (diagram (gluedCover 𝒰).toGlueData) a) =
      MultispanIndex.snd (diagram (gluedCover 𝒰).toGlueData) a ≫
        f (MultispanIndex.sndFrom (diagram (gluedCover 𝒰).toGlueData) a)
[PROOFSTEP]
rintro ⟨i, j⟩
[GOAL]
case h.mk
X : Scheme
𝒰 : OpenCover X
Y : Scheme
f : (x : 𝒰.J) → obj 𝒰 x ⟶ Y
hf : ∀ (x y : 𝒰.J), pullback.fst ≫ f x = pullback.snd ≫ f y
i j : (gluedCover 𝒰).toGlueData.J
⊢ MultispanIndex.fst (diagram (gluedCover 𝒰).toGlueData) (i, j) ≫
      f (MultispanIndex.fstFrom (diagram (gluedCover 𝒰).toGlueData) (i, j)) =
    MultispanIndex.snd (diagram (gluedCover 𝒰).toGlueData) (i, j) ≫
      f (MultispanIndex.sndFrom (diagram (gluedCover 𝒰).toGlueData) (i, j))
[PROOFSTEP]
change pullback.fst ≫ f i = (_ ≫ _) ≫ f j
[GOAL]
case h.mk
X : Scheme
𝒰 : OpenCover X
Y : Scheme
f : (x : 𝒰.J) → obj 𝒰 x ⟶ Y
hf : ∀ (x y : 𝒰.J), pullback.fst ≫ f x = pullback.snd ≫ f y
i j : (gluedCover 𝒰).toGlueData.J
⊢ pullback.fst ≫ f i = (t (gluedCover 𝒰).toGlueData i j ≫ GlueData.f (gluedCover 𝒰).toGlueData j i) ≫ f j
[PROOFSTEP]
erw [pullbackSymmetry_hom_comp_fst]
[GOAL]
case h.mk
X : Scheme
𝒰 : OpenCover X
Y : Scheme
f : (x : 𝒰.J) → obj 𝒰 x ⟶ Y
hf : ∀ (x y : 𝒰.J), pullback.fst ≫ f x = pullback.snd ≫ f y
i j : (gluedCover 𝒰).toGlueData.J
⊢ pullback.fst ≫ f i = pullback.snd ≫ f j
[PROOFSTEP]
exact hf i j
[GOAL]
X : Scheme
𝒰 : OpenCover X
Y : Scheme
f : (x : 𝒰.J) → obj 𝒰 x ⟶ Y
hf : ∀ (x y : 𝒰.J), pullback.fst ≫ f x = pullback.snd ≫ f y
x : 𝒰.J
⊢ map 𝒰 x ≫ glueMorphisms 𝒰 f hf = f x
[PROOFSTEP]
rw [← ι_fromGlued, Category.assoc]
[GOAL]
X : Scheme
𝒰 : OpenCover X
Y : Scheme
f : (x : 𝒰.J) → obj 𝒰 x ⟶ Y
hf : ∀ (x y : 𝒰.J), pullback.fst ≫ f x = pullback.snd ≫ f y
x : 𝒰.J
⊢ GlueData.ι (gluedCover 𝒰) x ≫ fromGlued 𝒰 ≫ glueMorphisms 𝒰 f hf = f x
[PROOFSTEP]
erw [IsIso.hom_inv_id_assoc, Multicoequalizer.π_desc]
[GOAL]
X : Scheme
𝒰 : OpenCover X
Y : Scheme
f₁ f₂ : X ⟶ Y
h : ∀ (x : 𝒰.J), map 𝒰 x ≫ f₁ = map 𝒰 x ≫ f₂
⊢ f₁ = f₂
[PROOFSTEP]
rw [← cancel_epi 𝒰.fromGlued]
[GOAL]
X : Scheme
𝒰 : OpenCover X
Y : Scheme
f₁ f₂ : X ⟶ Y
h : ∀ (x : 𝒰.J), map 𝒰 x ≫ f₁ = map 𝒰 x ≫ f₂
⊢ fromGlued 𝒰 ≫ f₁ = fromGlued 𝒰 ≫ f₂
[PROOFSTEP]
apply Multicoequalizer.hom_ext
[GOAL]
case h
X : Scheme
𝒰 : OpenCover X
Y : Scheme
f₁ f₂ : X ⟶ Y
h : ∀ (x : 𝒰.J), map 𝒰 x ≫ f₁ = map 𝒰 x ≫ f₂
⊢ ∀ (b : (diagram (gluedCover 𝒰).toGlueData).R),
    Multicoequalizer.π (diagram (gluedCover 𝒰).toGlueData) b ≫ fromGlued 𝒰 ≫ f₁ =
      Multicoequalizer.π (diagram (gluedCover 𝒰).toGlueData) b ≫ fromGlued 𝒰 ≫ f₂
[PROOFSTEP]
intro x
[GOAL]
case h
X : Scheme
𝒰 : OpenCover X
Y : Scheme
f₁ f₂ : X ⟶ Y
h : ∀ (x : 𝒰.J), map 𝒰 x ≫ f₁ = map 𝒰 x ≫ f₂
x : (diagram (gluedCover 𝒰).toGlueData).R
⊢ Multicoequalizer.π (diagram (gluedCover 𝒰).toGlueData) x ≫ fromGlued 𝒰 ≫ f₁ =
    Multicoequalizer.π (diagram (gluedCover 𝒰).toGlueData) x ≫ fromGlued 𝒰 ≫ f₂
[PROOFSTEP]
erw [Multicoequalizer.π_desc_assoc]
[GOAL]
case h
X : Scheme
𝒰 : OpenCover X
Y : Scheme
f₁ f₂ : X ⟶ Y
h : ∀ (x : 𝒰.J), map 𝒰 x ≫ f₁ = map 𝒰 x ≫ f₂
x : (diagram (gluedCover 𝒰).toGlueData).R
⊢ map 𝒰 x ≫ f₁ = Multicoequalizer.π (diagram (gluedCover 𝒰).toGlueData) x ≫ fromGlued 𝒰 ≫ f₂
[PROOFSTEP]
erw [Multicoequalizer.π_desc_assoc]
[GOAL]
case h
X : Scheme
𝒰 : OpenCover X
Y : Scheme
f₁ f₂ : X ⟶ Y
h : ∀ (x : 𝒰.J), map 𝒰 x ≫ f₁ = map 𝒰 x ≫ f₂
x : (diagram (gluedCover 𝒰).toGlueData).R
⊢ map 𝒰 x ≫ f₁ = map 𝒰 x ≫ f₂
[PROOFSTEP]
exact h x


[GOAL]
R : Type u
inst✝ : Ring R
X✝ Y✝ : ModuleCat R
a₁✝ a₂✝ : X✝ ⟶ Y✝
h :
  (CategoryTheory.Functor.mk { obj := fun R_1 => ↑R_1, map := fun {X Y} f => f.toFun }).map a₁✝ =
    (CategoryTheory.Functor.mk { obj := fun R_1 => ↑R_1, map := fun {X Y} f => f.toFun }).map a₂✝
x : ↑X✝
⊢ ↑a₁✝ x = ↑a₂✝ x
[PROOFSTEP]
dsimp at h
[GOAL]
R : Type u
inst✝ : Ring R
X✝ Y✝ : ModuleCat R
a₁✝ a₂✝ : X✝ ⟶ Y✝
h : ↑a₁✝ = ↑a₂✝
x : ↑X✝
⊢ ↑a₁✝ x = ↑a₂✝ x
[PROOFSTEP]
rw [h]
[GOAL]
R : Type u
inst✝¹ : Ring R
M : ModuleCat R
inst✝ : Subsingleton ↑M
X : ModuleCat R
f : M ⟶ X
⊢ f = default
[PROOFSTEP]
ext x
[GOAL]
case h
R : Type u
inst✝¹ : Ring R
M : ModuleCat R
inst✝ : Subsingleton ↑M
X : ModuleCat R
f : M ⟶ X
x : ↑M
⊢ ↑f x = ↑default x
[PROOFSTEP]
rw [Subsingleton.elim x (0 : M)]
[GOAL]
case h
R : Type u
inst✝¹ : Ring R
M : ModuleCat R
inst✝ : Subsingleton ↑M
X : ModuleCat R
f : M ⟶ X
x : ↑M
⊢ ↑f 0 = ↑default 0
[PROOFSTEP]
dsimp
[GOAL]
case h
R : Type u
inst✝¹ : Ring R
M : ModuleCat R
inst✝ : Subsingleton ↑M
X : ModuleCat R
f : M ⟶ X
x : ↑M
⊢ ↑f 0 = ↑0 0
[PROOFSTEP]
simp
[GOAL]
R : Type u
inst✝¹ : Ring R
M : ModuleCat R
inst✝ : Subsingleton ↑M
X : ModuleCat R
f : X ⟶ M
⊢ f = default
[PROOFSTEP]
ext x
[GOAL]
case h
R : Type u
inst✝¹ : Ring R
M : ModuleCat R
inst✝ : Subsingleton ↑M
X : ModuleCat R
f : X ⟶ M
x : ↑X
⊢ ↑f x = ↑default x
[PROOFSTEP]
apply Subsingleton.elim
[GOAL]
R : Type u
inst✝ : Ring R
X₁ X₂ : Type v
g₁ : AddCommGroup X₁
g₂ : AddCommGroup X₂
m₁ : Module R X₁
m₂ : Module R X₂
e : X₁ ≃ₗ[R] X₂
⊢ ↑e ≫ ↑(symm e) = 𝟙 (ModuleCat.of R X₁)
[PROOFSTEP]
ext
[GOAL]
case h
R : Type u
inst✝ : Ring R
X₁ X₂ : Type v
g₁ : AddCommGroup X₁
g₂ : AddCommGroup X₂
m₁ : Module R X₁
m₂ : Module R X₂
e : X₁ ≃ₗ[R] X₂
x✝ : ↑(ModuleCat.of R X₁)
⊢ ↑(↑e ≫ ↑(symm e)) x✝ = ↑(𝟙 (ModuleCat.of R X₁)) x✝
[PROOFSTEP]
apply e.left_inv
[GOAL]
R : Type u
inst✝ : Ring R
X₁ X₂ : Type v
g₁ : AddCommGroup X₁
g₂ : AddCommGroup X₂
m₁ : Module R X₁
m₂ : Module R X₂
e : X₁ ≃ₗ[R] X₂
⊢ ↑(symm e) ≫ ↑e = 𝟙 (ModuleCat.of R X₂)
[PROOFSTEP]
ext
[GOAL]
case h
R : Type u
inst✝ : Ring R
X₁ X₂ : Type v
g₁ : AddCommGroup X₁
g₂ : AddCommGroup X₂
m₁ : Module R X₁
m₂ : Module R X₂
e : X₁ ≃ₗ[R] X₂
x✝ : ↑(ModuleCat.of R X₂)
⊢ ↑(↑(symm e) ≫ ↑e) x✝ = ↑(𝟙 (ModuleCat.of R X₂)) x✝
[PROOFSTEP]
apply e.right_inv
[GOAL]
R : Type u
inst✝ : Ring R
X₁ X₂ : Type v
X Y : ModuleCat R
i : X ≅ Y
⊢ ∀ (x y : ↑X), ↑i.hom (x + y) = ↑i.hom x + ↑i.hom y
[PROOFSTEP]
simp
[GOAL]
R : Type u
inst✝ : Ring R
X₁ X₂ : Type v
X Y : ModuleCat R
i : X ≅ Y
⊢ ∀ (r : R) (x : ↑X),
    AddHom.toFun { toFun := ↑i.hom, map_add' := (_ : ∀ (a a_1 : ↑X), ↑i.hom (a + a_1) = ↑i.hom a + ↑i.hom a_1) }
        (r • x) =
      ↑(RingHom.id R) r •
        AddHom.toFun { toFun := ↑i.hom, map_add' := (_ : ∀ (a a_1 : ↑X), ↑i.hom (a + a_1) = ↑i.hom a + ↑i.hom a_1) } x
[PROOFSTEP]
simp
[GOAL]
R : Type u
inst✝ : Ring R
X₁ X₂ : Type v
X Y : ModuleCat R
i : X ≅ Y
x : ↑X
⊢ ↑i.inv
      (AddHom.toFun
        { toAddHom := { toFun := ↑i.hom, map_add' := (_ : ∀ (a a_1 : ↑X), ↑i.hom (a + a_1) = ↑i.hom a + ↑i.hom a_1) },
            map_smul' := (_ : ∀ (a : R) (a_1 : ↑X), ↑i.hom (a • a_1) = a • ↑i.hom a_1) }.toAddHom
        x) =
    x
[PROOFSTEP]
change (i.hom ≫ i.inv) x = x
[GOAL]
R : Type u
inst✝ : Ring R
X₁ X₂ : Type v
X Y : ModuleCat R
i : X ≅ Y
x : ↑X
⊢ ↑(i.hom ≫ i.inv) x = x
[PROOFSTEP]
simp
[GOAL]
R : Type u
inst✝ : Ring R
X₁ X₂ : Type v
X Y : ModuleCat R
i : X ≅ Y
x : ↑Y
⊢ AddHom.toFun
      { toAddHom := { toFun := ↑i.hom, map_add' := (_ : ∀ (a a_1 : ↑X), ↑i.hom (a + a_1) = ↑i.hom a + ↑i.hom a_1) },
          map_smul' := (_ : ∀ (a : R) (a_1 : ↑X), ↑i.hom (a • a_1) = a • ↑i.hom a_1) }.toAddHom
      (↑i.inv x) =
    x
[PROOFSTEP]
change (i.inv ≫ i.hom) x = x
[GOAL]
R : Type u
inst✝ : Ring R
X₁ X₂ : Type v
X Y : ModuleCat R
i : X ≅ Y
x : ↑Y
⊢ ↑(i.inv ≫ i.hom) x = x
[PROOFSTEP]
simp
[GOAL]
R✝ : Type u
inst✝ : Ring R✝
X₁ X₂ : Type v
P Q R : ModuleCat R✝
f f' : P ⟶ Q
g : Q ⟶ R
⊢ (f + f') ≫ g = f ≫ g + f' ≫ g
[PROOFSTEP]
ext
[GOAL]
case h
R✝ : Type u
inst✝ : Ring R✝
X₁ X₂ : Type v
P Q R : ModuleCat R✝
f f' : P ⟶ Q
g : Q ⟶ R
x✝ : ↑P
⊢ ↑((f + f') ≫ g) x✝ = ↑(f ≫ g + f' ≫ g) x✝
[PROOFSTEP]
dsimp
[GOAL]
case h
R✝ : Type u
inst✝ : Ring R✝
X₁ X₂ : Type v
P Q R : ModuleCat R✝
f f' : P ⟶ Q
g : Q ⟶ R
x✝ : ↑P
⊢ ↑g (↑(f + f') x✝) = ↑(f ≫ g + f' ≫ g) x✝
[PROOFSTEP]
erw [map_add]
[GOAL]
case h
R✝ : Type u
inst✝ : Ring R✝
X₁ X₂ : Type v
P Q R : ModuleCat R✝
f f' : P ⟶ Q
g : Q ⟶ R
x✝ : ↑P
⊢ ↑g (↑f x✝) + ↑g (↑f' x✝) = ↑(f ≫ g + f' ≫ g) x✝
[PROOFSTEP]
rfl
[GOAL]
R✝ : Type u
inst✝ : Ring R✝
X₁ X₂ : Type v
P Q R : ModuleCat R✝
f : P ⟶ Q
g g' : Q ⟶ R
⊢ f ≫ (g + g') = f ≫ g + f ≫ g'
[PROOFSTEP]
ext
[GOAL]
case h
R✝ : Type u
inst✝ : Ring R✝
X₁ X₂ : Type v
P Q R : ModuleCat R✝
f : P ⟶ Q
g g' : Q ⟶ R
x✝ : ↑P
⊢ ↑(f ≫ (g + g')) x✝ = ↑(f ≫ g + f ≫ g') x✝
[PROOFSTEP]
rfl
[GOAL]
R : Type u
inst✝¹ : Ring R
X₁ X₂ : Type v
S : Type u
inst✝ : CommRing S
⊢ ∀ (X Y Z : ModuleCat S) (r : S) (f : X ⟶ Y) (g : Y ⟶ Z), (r • f) ≫ g = r • f ≫ g
[PROOFSTEP]
intros
[GOAL]
R : Type u
inst✝¹ : Ring R
X₁ X₂ : Type v
S : Type u
inst✝ : CommRing S
X✝ Y✝ Z✝ : ModuleCat S
r✝ : S
f✝ : X✝ ⟶ Y✝
g✝ : Y✝ ⟶ Z✝
⊢ (r✝ • f✝) ≫ g✝ = r✝ • f✝ ≫ g✝
[PROOFSTEP]
ext
[GOAL]
case h
R : Type u
inst✝¹ : Ring R
X₁ X₂ : Type v
S : Type u
inst✝ : CommRing S
X✝ Y✝ Z✝ : ModuleCat S
r✝ : S
f✝ : X✝ ⟶ Y✝
g✝ : Y✝ ⟶ Z✝
x✝ : ↑X✝
⊢ ↑((r✝ • f✝) ≫ g✝) x✝ = ↑(r✝ • f✝ ≫ g✝) x✝
[PROOFSTEP]
dsimp
[GOAL]
case h
R : Type u
inst✝¹ : Ring R
X₁ X₂ : Type v
S : Type u
inst✝ : CommRing S
X✝ Y✝ Z✝ : ModuleCat S
r✝ : S
f✝ : X✝ ⟶ Y✝
g✝ : Y✝ ⟶ Z✝
x✝ : ↑X✝
⊢ ↑g✝ (↑(r✝ • f✝) x✝) = ↑(r✝ • f✝ ≫ g✝) x✝
[PROOFSTEP]
rw [LinearMap.smul_apply, LinearMap.smul_apply, map_smul]
[GOAL]
case h
R : Type u
inst✝¹ : Ring R
X₁ X₂ : Type v
S : Type u
inst✝ : CommRing S
X✝ Y✝ Z✝ : ModuleCat S
r✝ : S
f✝ : X✝ ⟶ Y✝
g✝ : Y✝ ⟶ Z✝
x✝ : ↑X✝
⊢ r✝ • ↑g✝ (↑f✝ x✝) = r✝ • ↑(f✝ ≫ g✝) x✝
[PROOFSTEP]
rfl
[GOAL]
R : Type u
inst✝¹ : Ring R
X₁ X₂ : Type v
S : Type u
inst✝ : CommRing S
⊢ ∀ (X Y Z : ModuleCat S) (f : X ⟶ Y) (r : S) (g : Y ⟶ Z), f ≫ (r • g) = r • f ≫ g
[PROOFSTEP]
intros
[GOAL]
R : Type u
inst✝¹ : Ring R
X₁ X₂ : Type v
S : Type u
inst✝ : CommRing S
X✝ Y✝ Z✝ : ModuleCat S
f✝ : X✝ ⟶ Y✝
r✝ : S
g✝ : Y✝ ⟶ Z✝
⊢ f✝ ≫ (r✝ • g✝) = r✝ • f✝ ≫ g✝
[PROOFSTEP]
ext
[GOAL]
case h
R : Type u
inst✝¹ : Ring R
X₁ X₂ : Type v
S : Type u
inst✝ : CommRing S
X✝ Y✝ Z✝ : ModuleCat S
f✝ : X✝ ⟶ Y✝
r✝ : S
g✝ : Y✝ ⟶ Z✝
x✝ : ↑X✝
⊢ ↑(f✝ ≫ (r✝ • g✝)) x✝ = ↑(r✝ • f✝ ≫ g✝) x✝
[PROOFSTEP]
rfl


[GOAL]
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : SetLike S R
inst✝ : NonUnitalSubsemiringClass S R
s : S
⊢ ∀ (x y : { x // x ∈ s }), ↑(x + y) = ↑x + ↑y
[PROOFSTEP]
simp
[GOAL]
R✝ : Type u
S : Type v
T : Type w
inst✝⁵ : NonUnitalNonAssocSemiring R✝
M : Subsemigroup R✝
inst✝⁴ : SetLike S R✝
inst✝³ : NonUnitalSubsemiringClass S R✝
s : S
R : Type ?u.22770
inst✝² : NonUnitalSemiring R
inst✝¹ : SetLike S R
inst✝ : NonUnitalSubsemiringClass S R
⊢ ∀ (x y : { x // x ∈ s }), ↑(x + y) = ↑x + ↑y
[PROOFSTEP]
simp
[GOAL]
R✝ : Type u
S : Type v
T : Type w
inst✝⁵ : NonUnitalNonAssocSemiring R✝
M : Subsemigroup R✝
inst✝⁴ : SetLike S R✝
inst✝³ : NonUnitalSubsemiringClass S R✝
s : S
R : Type ?u.28609
inst✝² : NonUnitalCommSemiring R
inst✝¹ : SetLike S R
inst✝ : NonUnitalSubsemiringClass S R
⊢ ∀ (x y : { x // x ∈ s }), ↑(x + y) = ↑x + ↑y
[PROOFSTEP]
simp
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
p q : NonUnitalSubsemiring R
h : (fun s => s.carrier) p = (fun s => s.carrier) q
⊢ p = q
[PROOFSTEP]
cases p
[GOAL]
case mk
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
q : NonUnitalSubsemiring R
toAddSubmonoid✝ : AddSubmonoid R
mul_mem'✝ : ∀ {a b : R}, a ∈ toAddSubmonoid✝.carrier → b ∈ toAddSubmonoid✝.carrier → a * b ∈ toAddSubmonoid✝.carrier
h : (fun s => s.carrier) { toAddSubmonoid := toAddSubmonoid✝, mul_mem' := mul_mem'✝ } = (fun s => s.carrier) q
⊢ { toAddSubmonoid := toAddSubmonoid✝, mul_mem' := mul_mem'✝ } = q
[PROOFSTEP]
cases q
[GOAL]
case mk.mk
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
toAddSubmonoid✝¹ : AddSubmonoid R
mul_mem'✝¹ : ∀ {a b : R}, a ∈ toAddSubmonoid✝¹.carrier → b ∈ toAddSubmonoid✝¹.carrier → a * b ∈ toAddSubmonoid✝¹.carrier
toAddSubmonoid✝ : AddSubmonoid R
mul_mem'✝ : ∀ {a b : R}, a ∈ toAddSubmonoid✝.carrier → b ∈ toAddSubmonoid✝.carrier → a * b ∈ toAddSubmonoid✝.carrier
h :
  (fun s => s.carrier) { toAddSubmonoid := toAddSubmonoid✝¹, mul_mem' := mul_mem'✝¹ } =
    (fun s => s.carrier) { toAddSubmonoid := toAddSubmonoid✝, mul_mem' := mul_mem'✝ }
⊢ { toAddSubmonoid := toAddSubmonoid✝¹, mul_mem' := mul_mem'✝¹ } =
    { toAddSubmonoid := toAddSubmonoid✝, mul_mem' := mul_mem'✝ }
[PROOFSTEP]
congr
[GOAL]
case mk.mk.e_toAddSubmonoid
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
toAddSubmonoid✝¹ : AddSubmonoid R
mul_mem'✝¹ : ∀ {a b : R}, a ∈ toAddSubmonoid✝¹.carrier → b ∈ toAddSubmonoid✝¹.carrier → a * b ∈ toAddSubmonoid✝¹.carrier
toAddSubmonoid✝ : AddSubmonoid R
mul_mem'✝ : ∀ {a b : R}, a ∈ toAddSubmonoid✝.carrier → b ∈ toAddSubmonoid✝.carrier → a * b ∈ toAddSubmonoid✝.carrier
h :
  (fun s => s.carrier) { toAddSubmonoid := toAddSubmonoid✝¹, mul_mem' := mul_mem'✝¹ } =
    (fun s => s.carrier) { toAddSubmonoid := toAddSubmonoid✝, mul_mem' := mul_mem'✝ }
⊢ toAddSubmonoid✝¹ = toAddSubmonoid✝
[PROOFSTEP]
exact SetLike.coe_injective' h
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
s : Set R
sg : Subsemigroup R
hg : ↑sg = s
sa : AddSubmonoid R
ha : ↑sa = s
⊢ ∀ {a b : R}, a ∈ s → b ∈ s → a + b ∈ s
[PROOFSTEP]
subst ha
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
sg : Subsemigroup R
sa : AddSubmonoid R
hg : ↑sg = ↑sa
⊢ ∀ {a b : R}, a ∈ ↑sa → b ∈ ↑sa → a + b ∈ ↑sa
[PROOFSTEP]
exact sa.add_mem
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
s : Set R
sg : Subsemigroup R
hg : ↑sg = s
sa : AddSubmonoid R
ha : ↑sa = s
⊢ 0 ∈ { carrier := s, add_mem' := (_ : ∀ {a b : R}, a ∈ s → b ∈ s → a + b ∈ s) }.carrier
[PROOFSTEP]
subst ha
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
sg : Subsemigroup R
sa : AddSubmonoid R
hg : ↑sg = ↑sa
⊢ 0 ∈ { carrier := ↑sa, add_mem' := (_ : ∀ {a b : R}, a ∈ ↑sa → b ∈ ↑sa → a + b ∈ ↑sa) }.carrier
[PROOFSTEP]
exact sa.zero_mem
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
s : Set R
sg : Subsemigroup R
hg : ↑sg = s
sa : AddSubmonoid R
ha : ↑sa = s
⊢ ∀ {a b : R},
    a ∈
        { toAddSubsemigroup := { carrier := s, add_mem' := (_ : ∀ {a b : R}, a ∈ s → b ∈ s → a + b ∈ s) },
              zero_mem' :=
                (_ :
                  0 ∈
                    { carrier := s,
                        add_mem' :=
                          (_ : ∀ {a b : R}, a ∈ s → b ∈ s → a + b ∈ s) }.carrier) }.toAddSubsemigroup.carrier →
      b ∈
          { toAddSubsemigroup := { carrier := s, add_mem' := (_ : ∀ {a b : R}, a ∈ s → b ∈ s → a + b ∈ s) },
                zero_mem' :=
                  (_ :
                    0 ∈
                      { carrier := s,
                          add_mem' :=
                            (_ : ∀ {a b : R}, a ∈ s → b ∈ s → a + b ∈ s) }.carrier) }.toAddSubsemigroup.carrier →
        a * b ∈
          { toAddSubsemigroup := { carrier := s, add_mem' := (_ : ∀ {a b : R}, a ∈ s → b ∈ s → a + b ∈ s) },
                zero_mem' :=
                  (_ :
                    0 ∈
                      { carrier := s,
                          add_mem' :=
                            (_ : ∀ {a b : R}, a ∈ s → b ∈ s → a + b ∈ s) }.carrier) }.toAddSubsemigroup.carrier
[PROOFSTEP]
subst hg
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
sg : Subsemigroup R
sa : AddSubmonoid R
ha : ↑sa = ↑sg
⊢ ∀ {a b : R},
    a ∈
        { toAddSubsemigroup := { carrier := ↑sg, add_mem' := (_ : ∀ {a b : R}, a ∈ ↑sg → b ∈ ↑sg → a + b ∈ ↑sg) },
              zero_mem' :=
                (_ :
                  0 ∈
                    { carrier := ↑sg,
                        add_mem' :=
                          (_ : ∀ {a b : R}, a ∈ ↑sg → b ∈ ↑sg → a + b ∈ ↑sg) }.carrier) }.toAddSubsemigroup.carrier →
      b ∈
          { toAddSubsemigroup := { carrier := ↑sg, add_mem' := (_ : ∀ {a b : R}, a ∈ ↑sg → b ∈ ↑sg → a + b ∈ ↑sg) },
                zero_mem' :=
                  (_ :
                    0 ∈
                      { carrier := ↑sg,
                          add_mem' :=
                            (_ : ∀ {a b : R}, a ∈ ↑sg → b ∈ ↑sg → a + b ∈ ↑sg) }.carrier) }.toAddSubsemigroup.carrier →
        a * b ∈
          { toAddSubsemigroup := { carrier := ↑sg, add_mem' := (_ : ∀ {a b : R}, a ∈ ↑sg → b ∈ ↑sg → a + b ∈ ↑sg) },
                zero_mem' :=
                  (_ :
                    0 ∈
                      { carrier := ↑sg,
                          add_mem' :=
                            (_ : ∀ {a b : R}, a ∈ ↑sg → b ∈ ↑sg → a + b ∈ ↑sg) }.carrier) }.toAddSubsemigroup.carrier
[PROOFSTEP]
exact sg.mul_mem
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝⁴ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝³ : NonUnitalNonAssocSemiring S
inst✝² : NonUnitalNonAssocSemiring T
F : Type u_1
G : Type u_2
inst✝¹ : NonUnitalRingHomClass F R S
inst✝ : NonUnitalRingHomClass G S T
s✝ : NonUnitalSubsemiring R
f : F
s : NonUnitalSubsemiring R
y : S
⊢ y ∈ map f s ↔ ∃ x, x ∈ s ∧ ↑f x = y
[PROOFSTEP]
convert Set.mem_image_iff_bex
[GOAL]
case h.e'_2.h.e'_2.h.a
R : Type u
S : Type v
T : Type w
inst✝⁴ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝³ : NonUnitalNonAssocSemiring S
inst✝² : NonUnitalNonAssocSemiring T
F : Type u_1
G : Type u_2
inst✝¹ : NonUnitalRingHomClass F R S
inst✝ : NonUnitalRingHomClass G S T
s✝ : NonUnitalSubsemiring R
f : F
s : NonUnitalSubsemiring R
y : S
x✝ : R
⊢ x✝ ∈ s ∧ ↑f x✝ = y ↔ ∃ x, ↑f x✝ = y
[PROOFSTEP]
simp
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝⁴ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝³ : NonUnitalNonAssocSemiring S
inst✝² : NonUnitalNonAssocSemiring T
F : Type u_1
G : Type u_2
inst✝¹ : NonUnitalRingHomClass F R S
inst✝ : NonUnitalRingHomClass G S T
f : F
g : G
⊢ srange f = map f ⊤
[PROOFSTEP]
ext
[GOAL]
case h
R : Type u
S : Type v
T : Type w
inst✝⁴ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝³ : NonUnitalNonAssocSemiring S
inst✝² : NonUnitalNonAssocSemiring T
F : Type u_1
G : Type u_2
inst✝¹ : NonUnitalRingHomClass F R S
inst✝ : NonUnitalRingHomClass G S T
f : F
g : G
x✝ : S
⊢ x✝ ∈ srange f ↔ x✝ ∈ map f ⊤
[PROOFSTEP]
simp
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝⁴ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝³ : NonUnitalNonAssocSemiring S
inst✝² : NonUnitalNonAssocSemiring T
F : Type u_1
G : Type u_2
inst✝¹ : NonUnitalRingHomClass F R S
inst✝ : NonUnitalRingHomClass G S T
f✝ : F
g✝ : G
g : S →ₙ+* T
f : R →ₙ+* S
⊢ map g (srange f) = srange (comp g f)
[PROOFSTEP]
simpa only [srange_eq_map] using (⊤ : NonUnitalSubsemiring R).map_map g f
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
a✝ b✝ : R
x✝¹ : a✝ ∈ {0}
x✝ : b✝ ∈ {0}
⊢ a✝ + b✝ ∈ {0}
[PROOFSTEP]
simp_all
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
a✝ b✝ : R
x✝¹ :
  a✝ ∈
    { toAddSubsemigroup := { carrier := {0}, add_mem' := (_ : ∀ {a b : R}, a ∈ {0} → b ∈ {0} → a + b ∈ {0}) },
          zero_mem' := (_ : 0 ∈ {0}) }.toAddSubsemigroup.carrier
x✝ :
  b✝ ∈
    { toAddSubsemigroup := { carrier := {0}, add_mem' := (_ : ∀ {a b : R}, a ∈ {0} → b ∈ {0} → a + b ∈ {0}) },
          zero_mem' := (_ : 0 ∈ {0}) }.toAddSubsemigroup.carrier
⊢ a✝ * b✝ ∈
    { toAddSubsemigroup := { carrier := {0}, add_mem' := (_ : ∀ {a b : R}, a ∈ {0} → b ∈ {0} → a + b ∈ {0}) },
          zero_mem' := (_ : 0 ∈ {0}) }.toAddSubsemigroup.carrier
[PROOFSTEP]
simp_all
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
s : Set (NonUnitalSubsemiring R)
⊢ ↑(⨅ (t : NonUnitalSubsemiring R) (_ : t ∈ s), toSubsemigroup t) = ⋂ (t : NonUnitalSubsemiring R) (_ : t ∈ s), ↑t
[PROOFSTEP]
simp
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
s : Set (NonUnitalSubsemiring R)
⊢ ↑(⨅ (t : NonUnitalSubsemiring R) (_ : t ∈ s), t.toAddSubmonoid) = ⋂ (t : NonUnitalSubsemiring R) (_ : t ∈ s), ↑t
[PROOFSTEP]
simp
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
f : R ≃+* S
K : NonUnitalSubsemiring R
x : S
⊢ x ∈ map (↑f) K ↔ ↑(RingEquiv.symm f) x ∈ K
[PROOFSTEP]
convert @Set.mem_image_equiv _ _ (↑K) f.toEquiv x
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
⊢ nonUnitalSubsemiringClosure M = NonUnitalSubsemiring.closure ↑M
[PROOFSTEP]
ext
[GOAL]
case h
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
x✝ : R
⊢ x✝ ∈ nonUnitalSubsemiringClosure M ↔ x✝ ∈ NonUnitalSubsemiring.closure ↑M
[PROOFSTEP]
refine ⟨fun hx => ?_, fun hx => (NonUnitalSubsemiring.mem_closure.mp hx) M.nonUnitalSubsemiringClosure fun s sM => ?_⟩
[GOAL]
case h.refine_1
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
x✝ : R
hx : x✝ ∈ nonUnitalSubsemiringClosure M
⊢ x✝ ∈ NonUnitalSubsemiring.closure ↑M
[PROOFSTEP]
rintro - ⟨H1, rfl⟩
[GOAL]
case h.refine_2
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
x✝ : R
hx : x✝ ∈ NonUnitalSubsemiring.closure ↑M
s : R
sM : s ∈ ↑M
⊢ s ∈ ↑(nonUnitalSubsemiringClosure M)
[PROOFSTEP]
rintro - ⟨H1, rfl⟩
[GOAL]
case h.refine_1.intro
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
x✝ : R
hx : x✝ ∈ nonUnitalSubsemiringClosure M
H1 : NonUnitalSubsemiring R
⊢ x✝ ∈ (fun t => ⋂ (_ : t ∈ {S | ↑M ⊆ ↑S}), ↑t) H1
[PROOFSTEP]
rintro - ⟨H2, rfl⟩
[GOAL]
case h.refine_2.intro
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
x✝ : R
hx : x✝ ∈ NonUnitalSubsemiring.closure ↑M
s : R
sM : s ∈ ↑M
H1 : AddSubmonoid R
⊢ s ∈ (fun t => ⋂ (_ : t ∈ {S | ↑M ⊆ ↑S}), ↑t) H1
[PROOFSTEP]
rintro - ⟨H2, rfl⟩
[GOAL]
case h.refine_1.intro.intro
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
x✝ : R
hx : x✝ ∈ nonUnitalSubsemiringClosure M
H1 : NonUnitalSubsemiring R
H2 : H1 ∈ {S | ↑M ⊆ ↑S}
⊢ x✝ ∈ (fun h => ↑H1) H2
[PROOFSTEP]
exact AddSubmonoid.mem_closure.mp hx H1.toAddSubmonoid H2
[GOAL]
case h.refine_2.intro.intro
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
x✝ : R
hx : x✝ ∈ NonUnitalSubsemiring.closure ↑M
s : R
sM : s ∈ ↑M
H1 : AddSubmonoid R
H2 : H1 ∈ {S | ↑M ⊆ ↑S}
⊢ s ∈ (fun h => ↑H1) H2
[PROOFSTEP]
exact H2 sM
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
s : Set R
⊢ ↑(closure s) = ↑(AddSubmonoid.closure ↑(Subsemigroup.closure s))
[PROOFSTEP]
simp [← Subsemigroup.nonUnitalSubsemiringClosure_toAddSubmonoid, Subsemigroup.nonUnitalSubsemiringClosure_eq_closure]
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
s : Set R
⊢ closure ↑(AddSubmonoid.closure s) = closure s
[PROOFSTEP]
ext x
[GOAL]
case h
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
s : Set R
x : R
⊢ x ∈ closure ↑(AddSubmonoid.closure s) ↔ x ∈ closure s
[PROOFSTEP]
refine' ⟨fun hx => _, fun hx => closure_mono AddSubmonoid.subset_closure hx⟩
[GOAL]
case h
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
s : Set R
x : R
hx : x ∈ closure ↑(AddSubmonoid.closure s)
⊢ x ∈ closure s
[PROOFSTEP]
rintro - ⟨H, rfl⟩
[GOAL]
case h.intro
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
s : Set R
x : R
hx : x ∈ closure ↑(AddSubmonoid.closure s)
H : NonUnitalSubsemiring R
⊢ x ∈ (fun t => ⋂ (_ : t ∈ {S | s ⊆ ↑S}), ↑t) H
[PROOFSTEP]
rintro - ⟨J, rfl⟩
[GOAL]
case h.intro.intro
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
s : Set R
x : R
hx : x ∈ closure ↑(AddSubmonoid.closure s)
H : NonUnitalSubsemiring R
J : H ∈ {S | s ⊆ ↑S}
⊢ x ∈ (fun h => ↑H) J
[PROOFSTEP]
refine' (AddSubmonoid.mem_closure.mp (mem_closure_iff.mp hx)) H.toAddSubmonoid fun y hy => _
[GOAL]
case h.intro.intro
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
s : Set R
x : R
hx : x ∈ closure ↑(AddSubmonoid.closure s)
H : NonUnitalSubsemiring R
J : H ∈ {S | s ⊆ ↑S}
y : R
hy : y ∈ ↑(Subsemigroup.closure ↑(AddSubmonoid.closure s))
⊢ y ∈ ↑H.toAddSubmonoid
[PROOFSTEP]
refine' (Subsemigroup.mem_closure.mp hy) H.toSubsemigroup fun z hz => _
[GOAL]
case h.intro.intro
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
s : Set R
x : R
hx : x ∈ closure ↑(AddSubmonoid.closure s)
H : NonUnitalSubsemiring R
J : H ∈ {S | s ⊆ ↑S}
y : R
hy : y ∈ ↑(Subsemigroup.closure ↑(AddSubmonoid.closure s))
z : R
hz : z ∈ ↑(AddSubmonoid.closure s)
⊢ z ∈ ↑(toSubsemigroup H)
[PROOFSTEP]
exact (AddSubmonoid.mem_closure.mp hz) H.toAddSubmonoid fun w hw => J hw
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝³ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝² : NonUnitalNonAssocSemiring S
inst✝¹ : NonUnitalNonAssocSemiring T
F : Type u_1
inst✝ : NonUnitalRingHomClass F R S
s : NonUnitalSubsemiring R
x : R × S
⊢ x ∈ prod s ⊤ ↔ x ∈ comap (NonUnitalRingHom.fst R S) s
[PROOFSTEP]
simp [mem_prod, MonoidHom.coe_fst]
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝³ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝² : NonUnitalNonAssocSemiring S
inst✝¹ : NonUnitalNonAssocSemiring T
F : Type u_1
inst✝ : NonUnitalRingHomClass F R S
s : NonUnitalSubsemiring S
x : R × S
⊢ x ∈ prod ⊤ s ↔ x ∈ comap (NonUnitalRingHom.snd R S) s
[PROOFSTEP]
simp [mem_prod, MonoidHom.coe_snd]
[GOAL]
R : Type u
S✝ : Type v
T : Type w
inst✝³ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝² : NonUnitalNonAssocSemiring S✝
inst✝¹ : NonUnitalNonAssocSemiring T
F : Type u_1
inst✝ : NonUnitalRingHomClass F R S✝
ι : Sort u_2
hι : Nonempty ι
S : ι → NonUnitalSubsemiring R
hS : Directed (fun x x_1 => x ≤ x_1) S
x : R
⊢ x ∈ ⨆ (i : ι), S i ↔ ∃ i, x ∈ S i
[PROOFSTEP]
refine' ⟨_, fun ⟨i, hi⟩ => (SetLike.le_def.1 <| le_iSup S i) hi⟩
[GOAL]
R : Type u
S✝ : Type v
T : Type w
inst✝³ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝² : NonUnitalNonAssocSemiring S✝
inst✝¹ : NonUnitalNonAssocSemiring T
F : Type u_1
inst✝ : NonUnitalRingHomClass F R S✝
ι : Sort u_2
hι : Nonempty ι
S : ι → NonUnitalSubsemiring R
hS : Directed (fun x x_1 => x ≤ x_1) S
x : R
⊢ x ∈ ⨆ (i : ι), S i → ∃ i, x ∈ S i
[PROOFSTEP]
let U : NonUnitalSubsemiring R :=
  NonUnitalSubsemiring.mk' (⋃ i, (S i : Set R)) (⨆ i, (S i).toSubsemigroup)
    (Subsemigroup.coe_iSup_of_directed <| hS.mono_comp _ fun _ _ => id) (⨆ i, (S i).toAddSubmonoid)
    (AddSubmonoid.coe_iSup_of_directed <| hS.mono_comp _ fun _ _ => id)
      -- Porting note `@this` doesn't work
[GOAL]
R : Type u
S✝ : Type v
T : Type w
inst✝³ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝² : NonUnitalNonAssocSemiring S✝
inst✝¹ : NonUnitalNonAssocSemiring T
F : Type u_1
inst✝ : NonUnitalRingHomClass F R S✝
ι : Sort u_2
hι : Nonempty ι
S : ι → NonUnitalSubsemiring R
hS : Directed (fun x x_1 => x ≤ x_1) S
x : R
U : NonUnitalSubsemiring R :=
  NonUnitalSubsemiring.mk' (⋃ (i : ι), ↑(S i)) (⨆ (i : ι), toSubsemigroup (S i))
    (_ : ↑(⨆ (i : ι), toSubsemigroup (S i)) = ⋃ (i : ι), ↑(toSubsemigroup (S i))) (⨆ (i : ι), (S i).toAddSubmonoid)
    (_ : ↑(⨆ (i : ι), (S i).toAddSubmonoid) = ⋃ (i : ι), ↑(S i).toAddSubmonoid)
⊢ x ∈ ⨆ (i : ι), S i → ∃ i, x ∈ S i
[PROOFSTEP]
suffices H : ⨆ i, S i ≤ U
[GOAL]
R : Type u
S✝ : Type v
T : Type w
inst✝³ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝² : NonUnitalNonAssocSemiring S✝
inst✝¹ : NonUnitalNonAssocSemiring T
F : Type u_1
inst✝ : NonUnitalRingHomClass F R S✝
ι : Sort u_2
hι : Nonempty ι
S : ι → NonUnitalSubsemiring R
hS : Directed (fun x x_1 => x ≤ x_1) S
x : R
U : NonUnitalSubsemiring R :=
  NonUnitalSubsemiring.mk' (⋃ (i : ι), ↑(S i)) (⨆ (i : ι), toSubsemigroup (S i))
    (_ : ↑(⨆ (i : ι), toSubsemigroup (S i)) = ⋃ (i : ι), ↑(toSubsemigroup (S i))) (⨆ (i : ι), (S i).toAddSubmonoid)
    (_ : ↑(⨆ (i : ι), (S i).toAddSubmonoid) = ⋃ (i : ι), ↑(S i).toAddSubmonoid)
H : ⨆ (i : ι), S i ≤ U
⊢ x ∈ ⨆ (i : ι), S i → ∃ i, x ∈ S i
case H
R : Type u
S✝ : Type v
T : Type w
inst✝³ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝² : NonUnitalNonAssocSemiring S✝
inst✝¹ : NonUnitalNonAssocSemiring T
F : Type u_1
inst✝ : NonUnitalRingHomClass F R S✝
ι : Sort u_2
hι : Nonempty ι
S : ι → NonUnitalSubsemiring R
hS : Directed (fun x x_1 => x ≤ x_1) S
x : R
U : NonUnitalSubsemiring R :=
  NonUnitalSubsemiring.mk' (⋃ (i : ι), ↑(S i)) (⨆ (i : ι), toSubsemigroup (S i))
    (_ : ↑(⨆ (i : ι), toSubsemigroup (S i)) = ⋃ (i : ι), ↑(toSubsemigroup (S i))) (⨆ (i : ι), (S i).toAddSubmonoid)
    (_ : ↑(⨆ (i : ι), (S i).toAddSubmonoid) = ⋃ (i : ι), ↑(S i).toAddSubmonoid)
⊢ ⨆ (i : ι), S i ≤ U
[PROOFSTEP]
simpa using @H x
[GOAL]
case H
R : Type u
S✝ : Type v
T : Type w
inst✝³ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝² : NonUnitalNonAssocSemiring S✝
inst✝¹ : NonUnitalNonAssocSemiring T
F : Type u_1
inst✝ : NonUnitalRingHomClass F R S✝
ι : Sort u_2
hι : Nonempty ι
S : ι → NonUnitalSubsemiring R
hS : Directed (fun x x_1 => x ≤ x_1) S
x : R
U : NonUnitalSubsemiring R :=
  NonUnitalSubsemiring.mk' (⋃ (i : ι), ↑(S i)) (⨆ (i : ι), toSubsemigroup (S i))
    (_ : ↑(⨆ (i : ι), toSubsemigroup (S i)) = ⋃ (i : ι), ↑(toSubsemigroup (S i))) (⨆ (i : ι), (S i).toAddSubmonoid)
    (_ : ↑(⨆ (i : ι), (S i).toAddSubmonoid) = ⋃ (i : ι), ↑(S i).toAddSubmonoid)
⊢ ⨆ (i : ι), S i ≤ U
[PROOFSTEP]
exact iSup_le fun i x hx => Set.mem_iUnion.2 ⟨i, hx⟩
[GOAL]
R : Type u
S✝ : Type v
T : Type w
inst✝³ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝² : NonUnitalNonAssocSemiring S✝
inst✝¹ : NonUnitalNonAssocSemiring T
F : Type u_1
inst✝ : NonUnitalRingHomClass F R S✝
ι : Sort u_2
hι : Nonempty ι
S : ι → NonUnitalSubsemiring R
hS : Directed (fun x x_1 => x ≤ x_1) S
x : R
⊢ x ∈ ↑(⨆ (i : ι), S i) ↔ x ∈ ⋃ (i : ι), ↑(S i)
[PROOFSTEP]
simp [mem_iSup_of_directed hS]
[GOAL]
R : Type u
S✝ : Type v
T : Type w
inst✝³ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝² : NonUnitalNonAssocSemiring S✝
inst✝¹ : NonUnitalNonAssocSemiring T
F : Type u_1
inst✝ : NonUnitalRingHomClass F R S✝
S : Set (NonUnitalSubsemiring R)
Sne : Set.Nonempty S
hS : DirectedOn (fun x x_1 => x ≤ x_1) S
x : R
⊢ x ∈ sSup S ↔ ∃ s, s ∈ S ∧ x ∈ s
[PROOFSTEP]
haveI : Nonempty S := Sne.to_subtype
[GOAL]
R : Type u
S✝ : Type v
T : Type w
inst✝³ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝² : NonUnitalNonAssocSemiring S✝
inst✝¹ : NonUnitalNonAssocSemiring T
F : Type u_1
inst✝ : NonUnitalRingHomClass F R S✝
S : Set (NonUnitalSubsemiring R)
Sne : Set.Nonempty S
hS : DirectedOn (fun x x_1 => x ≤ x_1) S
x : R
this : Nonempty ↑S
⊢ x ∈ sSup S ↔ ∃ s, s ∈ S ∧ x ∈ s
[PROOFSTEP]
simp only [sSup_eq_iSup', mem_iSup_of_directed hS.directed_val, Subtype.exists, exists_prop]
[GOAL]
R : Type u
S✝ : Type v
T : Type w
inst✝³ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝² : NonUnitalNonAssocSemiring S✝
inst✝¹ : NonUnitalNonAssocSemiring T
F : Type u_1
inst✝ : NonUnitalRingHomClass F R S✝
S : Set (NonUnitalSubsemiring R)
Sne : Set.Nonempty S
hS : DirectedOn (fun x x_1 => x ≤ x_1) S
x : R
⊢ x ∈ ↑(sSup S) ↔ x ∈ ⋃ (s : NonUnitalSubsemiring R) (_ : s ∈ S), ↑s
[PROOFSTEP]
simp [mem_sSup_of_directedOn Sne hS]
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝⁶ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝⁵ : NonUnitalNonAssocSemiring S
inst✝⁴ : NonUnitalNonAssocSemiring T
F : Type u_1
inst✝³ : NonUnitalNonAssocSemiring T
inst✝² : NonUnitalRingHomClass F R S
S' : Type u_2
inst✝¹ : SetLike S' S
inst✝ : NonUnitalSubsemiringClass S' S
s : NonUnitalSubsemiring R
f : F
⊢ ↑(srange f) = ↑⊤ ↔ Set.range ↑f = Set.univ
[PROOFSTEP]
rw [coe_srange, coe_top]
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝³ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝² : NonUnitalNonAssocSemiring S
inst✝¹ : NonUnitalNonAssocSemiring T
s t : NonUnitalSubsemiring R
F : Type u_1
inst✝ : NonUnitalRingHomClass F R S
g : S → R
f : F
h : Function.LeftInverse g ↑f
src✝ : R →ₙ+* { x // x ∈ srange f } := srangeRestrict f
x : { x // x ∈ srange f }
x' : R
hx' : ↑f x' = ↑x
⊢ ↑f (g ↑x) = ↑x
[PROOFSTEP]
rw [← hx', h x']