-- Module: Mathlib.Geometry.RingedSpace.LocallyRingedSpace.HasColimits
Goal:
X Y : LocallyRingedSpace
f g : X ⟶ Y
x : (↑Y.toTopCat : Type v)
U : Opens (↑(↑(coequalizer (Hom.toShHom f) (Hom.toShHom g)).toPresheafedSpace : TopCat) : Type v)
hU :
  Membership.mem (α := (↑(↑(coequalizer (Hom.toShHom f) (Hom.toShHom g)).toPresheafedSpace : TopCat) : Type v)) U
    ((ConcreteCategory.hom (FC := fun (X Y : TopCat.{v}) ↦ C((↑X : Type v), (↑Y : Type v))) (CC := TopCat.carrier) (Y :=
            (↑(coequalizer (Hom.toShHom f) (Hom.toShHom g)).toPresheafedSpace : TopCat))
            (PresheafedSpace.Hom.base (InducedCategory.Hom.hom (coequalizer.π (Hom.toShHom f) (Hom.toShHom g)))) :
          (a : (↑(↑Y.toPresheafedSpace : TopCat) : Type v)) →
            (↑(↑(coequalizer (Hom.toShHom f) (Hom.toShHom g)).toPresheafedSpace : TopCat) : Type v))
        x :
      (↑(↑(coequalizer (Hom.toShHom f) (Hom.toShHom g)).toPresheafedSpace : TopCat) : Type v))
s :
  ToType (FC := fun (R S : CommRingCat.{v}) ↦ (↑R : Type v) →+* (↑S : Type v)) (CC := CommRingCat.carrier)
    ((coequalizer (Hom.toShHom f) (Hom.toShHom g)).presheaf.obj (op U))
ha :
  IsUnit (M := (↑(Y.presheaf.stalk x) : Type v))
    ((ConcreteCategory.hom (FC := fun (R S : CommRingCat.{v}) ↦ (↑R : Type v) →+* (↑S : Type v)) (CC :=
            CommRingCat.carrier) (X :=
            Y.presheaf.obj
              (op
                (Functor.obj
                  (Opens.map
                    (PresheafedSpace.Hom.base
                      (InducedCategory.Hom.hom (coequalizer.π (Hom.toShHom f) (Hom.toShHom g)))))
                  U)))
            (Y := Y.presheaf.stalk x)
            (Y.presheaf.germ
              (Functor.obj
                (Opens.map
                  (PresheafedSpace.Hom.base (InducedCategory.Hom.hom (coequalizer.π (Hom.toShHom f) (Hom.toShHom g)))))
                U)
              x hU) :
          (a :
              (↑(Y.presheaf.obj (op ((Opens.map (coequalizer.π (Hom.toShHom f) (Hom.toShHom g)).hom.base).obj U))) :
                Type v)) →
            (↑(Y.presheaf.stalk x) : Type v))
        ((ConcreteCategory.hom (FC := fun (R S : CommRingCat.{v}) ↦ (↑R : Type v) →+* (↑S : Type v)) (CC :=
                CommRingCat.carrier) (Y :=
                Y.presheaf.obj
                  (op
                    (Functor.obj
                      (Opens.map
                        (PresheafedSpace.Hom.base
                          (InducedCategory.Hom.hom (coequalizer.π (Hom.toShHom f) (Hom.toShHom g)))))
                      U)))
                (NatTrans.app
                  (PresheafedSpace.Hom.c (InducedCategory.Hom.hom (coequalizer.π (Hom.toShHom f) (Hom.toShHom g))))
                  (op U)) :
              (a : (↑((coequalizer (Hom.toShHom f) (Hom.toShHom g)).presheaf.obj (op U)) : Type v)) →
                (↑(Y.presheaf.obj (op ((Opens.map (coequalizer.π (Hom.toShHom f) (Hom.toShHom g)).hom.base).obj U))) :
                  Type v))
            s :
          (↑(Y.presheaf.obj
                (op
                  (Functor.obj
                    (Opens.map
                      (PresheafedSpace.Hom.base
                        (InducedCategory.Hom.hom (coequalizer.π (Hom.toShHom f) (Hom.toShHom g)))))
                    U))) :
            Type v)) :
      (↑(Y.presheaf.stalk x) : Type v))
V : Opens (↑Y.toTopCat : Type v) := imageBasicOpen f g U s
hV :
  Set.preimage (β := (↑(↑(coequalizer (Hom.toShHom f) (Hom.toShHom g)).toPresheafedSpace : TopCat) : Type v))
      (⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{v}) ↦ C((↑X : Type v), (↑Y : Type v))) (CC := TopCat.carrier)
            (Y := (↑(coequalizer (Hom.toShHom f) (Hom.toShHom g)).toPresheafedSpace : TopCat))
            (PresheafedSpace.Hom.base (InducedCategory.Hom.hom (coequalizer.π (Hom.toShHom f) (Hom.toShHom g))))) :
        (a : (↑(↑Y.toPresheafedSpace : TopCat) : Type v)) →
          (↑(↑(coequalizer (Hom.toShHom f) (Hom.toShHom g)).toPresheafedSpace : TopCat) : Type v))
      ((⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{v}) ↦ C((↑X : Type v), (↑Y : Type v))) (CC := TopCat.carrier)
              (Y := (↑(coequalizer (Hom.toShHom f) (Hom.toShHom g)).toPresheafedSpace : TopCat))
              (PresheafedSpace.Hom.base (InducedCategory.Hom.hom (coequalizer.π (Hom.toShHom f) (Hom.toShHom g))))) :
          (a : (↑(↑Y.toPresheafedSpace : TopCat) : Type v)) →
            (↑(↑(coequalizer (Hom.toShHom f) (Hom.toShHom g)).toPresheafedSpace : TopCat) : Type v)) ''
        V.carrier) =
    V.carrier
hV' :
  V =
    {
      carrier :=
        Set.preimage (β := (↑(↑(coequalizer (Hom.toShHom f) (Hom.toShHom g)).toPresheafedSpace : TopCat) : Type v))
          (⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{v}) ↦ C((↑X : Type v), (↑Y : Type v))) (CC :=
                TopCat.carrier) (Y := (↑(coequalizer (Hom.toShHom f) (Hom.toShHom g)).toPresheafedSpace : TopCat))
                (PresheafedSpace.Hom.base (InducedCategory.Hom.hom (coequalizer.π (Hom.toShHom f) (Hom.toShHom g))))) :
            (a : (↑(↑Y.toPresheafedSpace : TopCat) : Type v)) →
              (↑(↑(coequalizer (Hom.toShHom f) (Hom.toShHom g)).toPresheafedSpace : TopCat) : Type v))
          ((⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{v}) ↦ C((↑X : Type v), (↑Y : Type v))) (CC :=
                  TopCat.carrier) (Y := (↑(coequalizer (Hom.toShHom f) (Hom.toShHom g)).toPresheafedSpace : TopCat))
                  (PresheafedSpace.Hom.base
                    (InducedCategory.Hom.hom (coequalizer.π (Hom.toShHom f) (Hom.toShHom g))))) :
              (a : (↑(↑Y.toPresheafedSpace : TopCat) : Type v)) →
                (↑(↑(coequalizer (Hom.toShHom f) (Hom.toShHom g)).toPresheafedSpace : TopCat) : Type v)) ''
            V.carrier),
      is_open' := ⋯ }
V_open :
  IsOpen (X := (↑(↑(coequalizer (Hom.toShHom f) (Hom.toShHom g)).toPresheafedSpace : TopCat) : Type v))
    ((⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{v}) ↦ C((↑X : Type v), (↑Y : Type v))) (CC := TopCat.carrier)
            (Y := (↑(coequalizer (Hom.toShHom f) (Hom.toShHom g)).toPresheafedSpace : TopCat))
            (PresheafedSpace.Hom.base (InducedCategory.Hom.hom (coequalizer.π (Hom.toShHom f) (Hom.toShHom g))))) :
        (a : (↑(↑Y.toPresheafedSpace : TopCat) : Type v)) →
          (↑(↑(coequalizer (Hom.toShHom f) (Hom.toShHom g)).toPresheafedSpace : TopCat) : Type v)) ''
      V.carrier)
VleU :
  {
      carrier :=
        (⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{v}) ↦ C((↑X : Type v), (↑Y : Type v))) (CC := TopCat.carrier)
                (Y := (↑(coequalizer (Hom.toShHom f) (Hom.toShHom g)).toPresheafedSpace : TopCat))
                (PresheafedSpace.Hom.base (InducedCategory.Hom.hom (coequalizer.π (Hom.toShHom f) (Hom.toShHom g))))) :
            (a : (↑(↑Y.toPresheafedSpace : TopCat) : Type v)) →
              (↑(↑(coequalizer (Hom.toShHom f) (Hom.toShHom g)).toPresheafedSpace : TopCat) : Type v)) ''
          V.carrier,
      is_open' := V_open :
      Opens (↑(↑(coequalizer (Hom.toShHom f) (Hom.toShHom g)).toPresheafedSpace : TopCat) : Type v) } ≤
    U
hxV : x ∈ V
⊢ IsUnit (M :=
    (↑(Y.toRingedSpace.presheaf.obj
          (op
            (Y.toRingedSpace.basicOpen (U :=
              unop
                (op
                  ((Opens.map
                          (PresheafedSpace.Hom.base
                            (InducedCategory.Hom.hom (coequalizer.π (Hom.toShHom f) (Hom.toShHom g)))) :
                        Opens (↑(↑(coequalizer (Hom.toShHom f) (Hom.toShHom g)).toPresheafedSpace : TopCat) : Type v) ⥤
                          Opens (↑(↑Y.toPresheafedSpace : TopCat) : Type v)).1
                    (unop (op U)))))
              ((ConcreteCategory.hom (FC := fun (R S : CommRingCat.{v}) ↦ (↑R : Type v) →+* (↑S : Type v)) (CC :=
                    CommRingCat.carrier) (Y :=
                    Functor.obj
                      (Functor.obj
                        (TopCat.Presheaf.pushforward CommRingCat
                          (PresheafedSpace.Hom.base
                            (InducedCategory.Hom.hom (coequalizer.π (Hom.toShHom f) (Hom.toShHom g)))))
                        Y.presheaf)
                      (op U))
                    (NatTrans.app
                      (PresheafedSpace.Hom.c (InducedCategory.Hom.hom (coequalizer.π (Hom.toShHom f) (Hom.toShHom g))))
                      (op U)) :
                  (a : (↑((coequalizer (Hom.toShHom f) (Hom.toShHom g)).presheaf.obj (op U)) : Type v)) →
                    (↑(((TopCat.Presheaf.pushforward CommRingCat
                                  (coequalizer.π (Hom.toShHom f) (Hom.toShHom g)).hom.base).obj
                              Y.presheaf).obj
                          (op U)) :
                      Type v))
                s)))) :
      Type v))
    ((ConcreteCategory.hom (FC := fun (R S : CommRingCat.{v}) ↦ (↑R : Type v) →+* (↑S : Type v)) (CC :=
            CommRingCat.carrier) (X :=
            Y.toRingedSpace.presheaf.obj
              (op
                (unop
                  (op
                    ((Opens.map
                            (PresheafedSpace.Hom.base
                              (InducedCategory.Hom.hom (coequalizer.π (Hom.toShHom f) (Hom.toShHom g)))) :
                          Opens
                              (↑(↑(coequalizer (Hom.toShHom f) (Hom.toShHom g)).toPresheafedSpace : TopCat) : Type v) ⥤
                            Opens (↑(↑Y.toPresheafedSpace : TopCat) : Type v)).1
                      (unop (op U)))))))
            (Y :=
            Y.toRingedSpace.presheaf.obj
              (op
                (Y.toRingedSpace.basicOpen (U :=
                  unop
                    (op
                      ((Opens.map
                              (PresheafedSpace.Hom.base
                                (InducedCategory.Hom.hom (coequalizer.π (Hom.toShHom f) (Hom.toShHom g)))) :
                            Opens
                                (↑(↑(coequalizer (Hom.toShHom f) (Hom.toShHom g)).toPresheafedSpace : TopCat) :
                                  Type v) ⥤
                              Opens (↑(↑Y.toPresheafedSpace : TopCat) : Type v)).1
                        (unop (op U)))))
                  ((ConcreteCategory.hom (FC := fun (R S : CommRingCat.{v}) ↦ (↑R : Type v) →+* (↑S : Type v)) (CC :=
                        CommRingCat.carrier) (Y :=
                        Functor.obj
                          (Functor.obj
                            (TopCat.Presheaf.pushforward CommRingCat
                              (PresheafedSpace.Hom.base
                                (InducedCategory.Hom.hom (coequalizer.π (Hom.toShHom f) (Hom.toShHom g)))))
                            Y.presheaf)
                          (op U))
                        (NatTrans.app
                          (PresheafedSpace.Hom.c
                            (InducedCategory.Hom.hom (coequalizer.π (Hom.toShHom f) (Hom.toShHom g))))
                          (op U)) :
                      (a : (↑((coequalizer (Hom.toShHom f) (Hom.toShHom g)).presheaf.obj (op U)) : Type v)) →
                        (↑(((TopCat.Presheaf.pushforward CommRingCat
                                      (coequalizer.π (Hom.toShHom f) (Hom.toShHom g)).hom.base).obj
                                  Y.presheaf).obj
                              (op U)) :
                          Type v))
                    s))))
            (Y.toRingedSpace.presheaf.map (Quiver.Hom.op (homOfLE ⋯))) :
          (a :
              (↑(Y.toRingedSpace.presheaf.obj
                    (op
                      (unop
                        (op ((Opens.map (coequalizer.π (Hom.toShHom f) (Hom.toShHom g)).hom.base).1 (unop (op U))))))) :
                Type v)) →
            (↑(Y.toRingedSpace.presheaf.obj
                  (op
                    (Y.toRingedSpace.basicOpen
                      ((ConcreteCategory.hom ((coequalizer.π (Hom.toShHom f) (Hom.toShHom g)).hom.c.app (op U)) :
                          (a : (↑((coequalizer (Hom.toShHom f) (Hom.toShHom g)).presheaf.obj (op U)) : Type v)) →
                            (↑(((TopCat.Presheaf.pushforward CommRingCat
                                          (coequalizer.π (Hom.toShHom f) (Hom.toShHom g)).hom.base).obj
                                      Y.presheaf).obj
                                  (op U)) :
                              Type v))
                        s)))) :
              Type v))
        ((ConcreteCategory.hom (FC := fun (R S : CommRingCat.{v}) ↦ (↑R : Type v) →+* (↑S : Type v)) (CC :=
                CommRingCat.carrier) (Y :=
                Functor.obj
                  (Functor.obj
                    (TopCat.Presheaf.pushforward CommRingCat
                      (PresheafedSpace.Hom.base
                        (InducedCategory.Hom.hom (coequalizer.π (Hom.toShHom f) (Hom.toShHom g)))))
                    Y.presheaf)
                  (op U))
                (NatTrans.app
                  (PresheafedSpace.Hom.c (InducedCategory.Hom.hom (coequalizer.π (Hom.toShHom f) (Hom.toShHom g))))
                  (op U)) :
              (a : (↑((coequalizer (Hom.toShHom f) (Hom.toShHom g)).presheaf.obj (op U)) : Type v)) →
                (↑(((TopCat.Presheaf.pushforward CommRingCat
                              (coequalizer.π (Hom.toShHom f) (Hom.toShHom g)).hom.base).obj
                          Y.presheaf).obj
                      (op U)) :
                  Type v))
            s :
          (↑(Functor.obj
                (Functor.obj
                  (TopCat.Presheaf.pushforward CommRingCat
                    (PresheafedSpace.Hom.base
                      (InducedCategory.Hom.hom (coequalizer.π (Hom.toShHom f) (Hom.toShHom g)))))
                  Y.presheaf)
                (op U)) :
            Type v)) :
      (↑(Y.toRingedSpace.presheaf.obj
            (op
              (Y.toRingedSpace.basicOpen (U :=
                unop
                  (op
                    ((Opens.map
                            (PresheafedSpace.Hom.base
                              (InducedCategory.Hom.hom (coequalizer.π (Hom.toShHom f) (Hom.toShHom g)))) :
                          Opens
                              (↑(↑(coequalizer (Hom.toShHom f) (Hom.toShHom g)).toPresheafedSpace : TopCat) : Type v) ⥤
                            Opens (↑(↑Y.toPresheafedSpace : TopCat) : Type v)).1
                      (unop (op U)))))
                ((ConcreteCategory.hom (FC := fun (R S : CommRingCat.{v}) ↦ (↑R : Type v) →+* (↑S : Type v)) (CC :=
                      CommRingCat.carrier) (Y :=
                      Functor.obj
                        (Functor.obj
                          (TopCat.Presheaf.pushforward CommRingCat
                            (PresheafedSpace.Hom.base
                              (InducedCategory.Hom.hom (coequalizer.π (Hom.toShHom f) (Hom.toShHom g)))))
                          Y.presheaf)
                        (op U))
                      (NatTrans.app
                        (PresheafedSpace.Hom.c
                          (InducedCategory.Hom.hom (coequalizer.π (Hom.toShHom f) (Hom.toShHom g))))
                        (op U)) :
                    (a : (↑((coequalizer (Hom.toShHom f) (Hom.toShHom g)).presheaf.obj (op U)) : Type v)) →
                      (↑(((TopCat.Presheaf.pushforward CommRingCat
                                    (coequalizer.π (Hom.toShHom f) (Hom.toShHom g)).hom.base).obj
                                Y.presheaf).obj
                            (op U)) :
                        Type v))
                  s)))) :
        Type v))

Tactic:
@RingedSpace.isUnit_res_basicOpen Y.toRingedSpace (unop _)
      (((coequalizer.π f.toShHom g.toShHom).hom.c.app (op U)) s)

Premises used: CategoryTheory.ConcreteCategory.hom, AlgebraicGeometry.LocallyRingedSpace.toRingedSpace, Opposite.op, AlgebraicGeometry.RingedSpace.isUnit_res_basicOpen, AlgebraicGeometry.PresheafedSpace.Hom.c, CategoryTheory.InducedCategory.Hom.hom, AlgebraicGeometry.LocallyRingedSpace.Hom.toShHom, CategoryTheory.Limits.coequalizer.π, DFunLike.coe, CategoryTheory.NatTrans.app