l3lab/ntp-mathlib huggingface dataset:
instance coequalizer_π_stalk_isLocalRingHom (x : Y) :
    IsLocalRingHom (PresheafedSpace.stalkMap (coequalizer.π f.val g.val : _) x) := by
  constructor
  rintro a ha
  rcases TopCat.Presheaf.germ_exist _ _ a with ⟨U, hU, s, rfl⟩
  erw [PresheafedSpace.stalkMap_germ_apply (coequalizer.π f.1 g.1 : _) U ⟨_, hU⟩] at ha
  let V := imageBasicOpen f g U s
  have hV : (coequalizer.π f.1 g.1).base ⁻¹' ((coequalizer.π f.1 g.1).base '' V.1) = V.1 :=
    imageBasicOpen_image_preimage f g U s
  have hV' :
    V = ⟨(coequalizer.π f.1 g.1).base ⁻¹' ((coequalizer.π f.1 g.1).base '' V.1), hV.symm ▸ V.2⟩ :=
    SetLike.ext' hV.symm
  have V_open : IsOpen ((coequalizer.π f.val g.val).base '' V.1) :=
    imageBasicOpen_image_open f g U s
  have VleU : (⟨(coequalizer.π f.val g.val).base '' V.1, V_open⟩ : TopologicalSpace.Opens _) ≤ U :=
    Set.image_subset_iff.mpr (Y.toRingedSpace.basicOpen_le _)
  have hxV : x ∈ V := ⟨⟨_, hU⟩, ha, rfl⟩
  erw [←
    (coequalizer f.val g.val).presheaf.germ_res_apply (homOfLE VleU)
      ⟨_, @Set.mem_image_of_mem _ _ (coequalizer.π f.val g.val).base x V.1 hxV⟩ s]
  apply RingHom.isUnit_map
  rw [← isUnit_map_iff ((coequalizer.π f.val g.val : _).c.app _), ← comp_apply,
    NatTrans.naturality, comp_apply, TopCat.Presheaf.pushforwardObj_map, ←
    isUnit_map_iff (Y.presheaf.map (eqToHom hV').op)]
  -- Porting note : change `rw` to `erw`
  erw [← comp_apply, ← comp_apply, ← Y.presheaf.map_comp]
  

Proof state:
case map_nonunit.intro.intro.intro.a
X Y : LocallyRingedSpace
f g : X ⟶ Y
U✝ : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace
s✝ : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U✝))
x : ↑(toTopCat Y)
U : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace
hU : (coequalizer.π f.val g.val).base x ∈ U
s : (forget CommRingCat).obj ((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))
ha :
  IsUnit ((TopCat.Presheaf.germ Y.presheaf { val := x, property := hU }) (((coequalizer.π f.val g.val).c.app (op U)) s))
V : Opens ↑(toTopCat Y) := imageBasicOpen f g U s
hV : ⇑(coequalizer.π f.val g.val).base ⁻¹' (⇑(coequalizer.π f.val g.val).base '' V.carrier) = V.carrier
hV' :
  V =
    { carrier := ⇑(coequalizer.π f.val g.val).base ⁻¹' (⇑(coequalizer.π f.val g.val).base '' V.carrier),
      is_open' :=
        (_ : IsOpen (⇑(coequalizer.π f.val g.val).base ⁻¹' (⇑(coequalizer.π f.val g.val).base '' V.carrier))) }
V_open : IsOpen (⇑(coequalizer.π f.val g.val).base '' V.carrier)
VleU : { carrier := ⇑(coequalizer.π f.val g.val).base '' V.carrier, is_open' := V_open } ≤ U
hxV : x ∈ V
⊢ IsUnit
    (((coequalizer.π f.val g.val).c.app (op U) ≫
        Y.presheaf.map ((Opens.map (coequalizer.π f.val g.val).base).op.map (homOfLE VleU).op ≫ (eqToHom hV').op))
      s)

Next tactic:
convert @RingedSpace.isUnit_res_basicOpen Y.toRingedSpace (unop _)
      (((coequalizer.π f.val g.val).c.app (op U)) s)
/-- The coequalizer of two locally ringed space in the category of sheafed spaces is a locally
ringed space. -/
noncomputable def coequalizer : LocallyRingedSpace where
  toSheafedSpace := Limits.coequalizer f.1 g.1
  localRing x := by
    

Proof state:
X Y : LocallyRingedSpace
f g : X ⟶ Y
x : ↑↑(Limits.coequalizer f.val g.val).toPresheafedSpace
⊢ LocalRing ↑(TopCat.Presheaf.stalk (Limits.coequalizer f.val g.val).toPresheafedSpace.presheaf x)

Next tactic:
obtain ⟨y, rfl⟩ :=
      (TopCat.epi_iff_surjective (coequalizer.π f.val g.val).base).mp inferInstance x
/-- The coequalizer of two locally ringed space in the category of sheafed spaces is a locally
ringed space. -/
noncomputable def coequalizer : LocallyRingedSpace where
  toSheafedSpace := Limits.coequalizer f.1 g.1
  localRing x := by
    obtain ⟨y, rfl⟩ :=
      (TopCat.epi_iff_surjective (coequalizer.π f.val g.val).base).mp inferInstance x
    

Proof state:
case intro
X Y : LocallyRingedSpace
f g : X ⟶ Y
y : (forget TopCat).obj ↑Y.toPresheafedSpace
⊢ LocalRing
    ↑(TopCat.Presheaf.stalk (Limits.coequalizer f.val g.val).toPresheafedSpace.presheaf
        ((coequalizer.π f.val g.val).base y))

Next tactic:
exact (PresheafedSpace.stalkMap (coequalizer.π f.val g.val : _) y).domain_localRing
theorem isLocalRingHom_stalkMap_congr {X Y : RingedSpace} (f g : X ⟶ Y) (H : f = g) (x)
    (h : IsLocalRingHom (PresheafedSpace.stalkMap f x)) :
    IsLocalRingHom (PresheafedSpace.stalkMap g x) := by
  

Proof state:
X✝ Y✝ : LocallyRingedSpace
f✝ g✝ : X✝ ⟶ Y✝
X Y : RingedSpace
f g : X ⟶ Y
H : f = g
x : ↑↑X.toPresheafedSpace
h : IsLocalRingHom (PresheafedSpace.stalkMap f x)
⊢ IsLocalRingHom (PresheafedSpace.stalkMap g x)

Next tactic:
rw [PresheafedSpace.stalkMap.congr_hom _ _ H.symm x]
theorem isLocalRingHom_stalkMap_congr {X Y : RingedSpace} (f g : X ⟶ Y) (H : f = g) (x)
    (h : IsLocalRingHom (PresheafedSpace.stalkMap f x)) :
    IsLocalRingHom (PresheafedSpace.stalkMap g x) := by
  rw [PresheafedSpace.stalkMap.congr_hom _ _ H.symm x]; 

Proof state:
X✝ Y✝ : LocallyRingedSpace
f✝ g✝ : X✝ ⟶ Y✝
X Y : RingedSpace
f g : X ⟶ Y
H : f = g
x : ↑↑X.toPresheafedSpace
h : IsLocalRingHom (PresheafedSpace.stalkMap f x)
⊢ IsLocalRingHom
    (eqToHom
        (_ :
          PresheafedSpace.stalk Y.toPresheafedSpace (g.base x) = PresheafedSpace.stalk Y.toPresheafedSpace (f.base x)) ≫
      PresheafedSpace.stalkMap f x)

Next tactic:
infer_instance
/-- The cofork constructed in `coequalizer_cofork` is indeed a colimit cocone. -/
noncomputable def coequalizerCoforkIsColimit : IsColimit (coequalizerCofork f g) := by
  

Proof state:
X Y : LocallyRingedSpace
f g : X ⟶ Y
⊢ IsColimit (coequalizerCofork f g)

Next tactic:
apply Cofork.IsColimit.mk'
/-- The cofork constructed in `coequalizer_cofork` is indeed a colimit cocone. -/
noncomputable def coequalizerCoforkIsColimit : IsColimit (coequalizerCofork f g) := by
  apply Cofork.IsColimit.mk'
  

Proof state:
case create
X Y : LocallyRingedSpace
f g : X ⟶ Y
⊢ (s : Cofork f g) →
    { l //
      Cofork.π (coequalizerCofork f g) ≫ l = Cofork.π s ∧
        ∀
          {m :
            ((Functor.const WalkingParallelPair).obj (coequalizerCofork f g).pt).obj WalkingParallelPair.one ⟶
              ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one},
          Cofork.π (coequalizerCofork f g) ≫ m = Cofork.π s → m = l }

Next tactic:
intro s
/-- The cofork constructed in `coequalizer_cofork` is indeed a colimit cocone. -/
noncomputable def coequalizerCoforkIsColimit : IsColimit (coequalizerCofork f g) := by
  apply Cofork.IsColimit.mk'
  intro s
  

Proof state:
case create
X Y : LocallyRingedSpace
f g : X ⟶ Y
s : Cofork f g
⊢ { l //
    Cofork.π (coequalizerCofork f g) ≫ l = Cofork.π s ∧
      ∀
        {m :
          ((Functor.const WalkingParallelPair).obj (coequalizerCofork f g).pt).obj WalkingParallelPair.one ⟶
            ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one},
        Cofork.π (coequalizerCofork f g) ≫ m = Cofork.π s → m = l }

Next tactic:
have e : f.val ≫ s.π.val = g.val ≫ s.π.val := by injection s.condition
/-- The cofork constructed in `coequalizer_cofork` is indeed a colimit cocone. -/
noncomputable def coequalizerCoforkIsColimit : IsColimit (coequalizerCofork f g) := by
  apply Cofork.IsColimit.mk'
  intro s
  have e : f.val ≫ s.π.val = g.val ≫ s.π.val := by 

Proof state:
X Y : LocallyRingedSpace
f g : X ⟶ Y
s : Cofork f g
⊢ f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val

Next tactic:
injection s.condition
/-- The cofork constructed in `coequalizer_cofork` is indeed a colimit cocone. -/
noncomputable def coequalizerCoforkIsColimit : IsColimit (coequalizerCofork f g) := by
  apply Cofork.IsColimit.mk'
  intro s
  have e : f.val ≫ s.π.val = g.val ≫ s.π.val := by injection s.condition
  

Proof state:
case create
X Y : LocallyRingedSpace
f g : X ⟶ Y
s : Cofork f g
e : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val
⊢ { l //
    Cofork.π (coequalizerCofork f g) ≫ l = Cofork.π s ∧
      ∀
        {m :
          ((Functor.const WalkingParallelPair).obj (coequalizerCofork f g).pt).obj WalkingParallelPair.one ⟶
            ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one},
        Cofork.π (coequalizerCofork f g) ≫ m = Cofork.π s → m = l }

Next tactic:
refine ⟨⟨coequalizer.desc s.π.1 e, ?_⟩, ?_⟩
/-- The cofork constructed in `coequalizer_cofork` is indeed a colimit cocone. -/
noncomputable def coequalizerCoforkIsColimit : IsColimit (coequalizerCofork f g) := by
  apply Cofork.IsColimit.mk'
  intro s
  have e : f.val ≫ s.π.val = g.val ≫ s.π.val := by injection s.condition
  refine ⟨⟨coequalizer.desc s.π.1 e, ?_⟩, ?_⟩
  · 

Proof state:
case create.refine_1
X Y : LocallyRingedSpace
f g : X ⟶ Y
s : Cofork f g
e : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val
⊢ ∀ (x : ↑↑(coequalizerCofork f g).pt.toPresheafedSpace),
    IsLocalRingHom (PresheafedSpace.stalkMap (coequalizer.desc (Cofork.π s).val e) x)

Next tactic:
intro x
/-- The cofork constructed in `coequalizer_cofork` is indeed a colimit cocone. -/
noncomputable def coequalizerCoforkIsColimit : IsColimit (coequalizerCofork f g) := by
  apply Cofork.IsColimit.mk'
  intro s
  have e : f.val ≫ s.π.val = g.val ≫ s.π.val := by injection s.condition
  refine ⟨⟨coequalizer.desc s.π.1 e, ?_⟩, ?_⟩
  · intro x
    

Proof state:
case create.refine_1
X Y : LocallyRingedSpace
f g : X ⟶ Y
s : Cofork f g
e : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val
x : ↑↑(coequalizerCofork f g).pt.toPresheafedSpace
⊢ IsLocalRingHom (PresheafedSpace.stalkMap (coequalizer.desc (Cofork.π s).val e) x)

Next tactic:
rcases (TopCat.epi_iff_surjective (coequalizer.π f.val g.val).base).mp inferInstance x with
      ⟨y, rfl⟩
/-- The cofork constructed in `coequalizer_cofork` is indeed a colimit cocone. -/
noncomputable def coequalizerCoforkIsColimit : IsColimit (coequalizerCofork f g) := by
  apply Cofork.IsColimit.mk'
  intro s
  have e : f.val ≫ s.π.val = g.val ≫ s.π.val := by injection s.condition
  refine ⟨⟨coequalizer.desc s.π.1 e, ?_⟩, ?_⟩
  · intro x
    rcases (TopCat.epi_iff_surjective (coequalizer.π f.val g.val).base).mp inferInstance x with
      ⟨y, rfl⟩
    -- Porting note : was `apply isLocalRingHom_of_comp _ (PresheafedSpace.stalkMap ...)`, this
    -- used to allow you to provide the proof that `... ≫ ...` is a local ring homomorphism later,
    -- but this is no longer possible
    

Proof state:
case create.refine_1.intro
X Y : LocallyRingedSpace
f g : X ⟶ Y
s : Cofork f g
e : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val
y : (forget TopCat).obj ↑Y.toPresheafedSpace
⊢ IsLocalRingHom (PresheafedSpace.stalkMap (coequalizer.desc (Cofork.π s).val e) ((coequalizer.π f.val g.val).base y))

Next tactic:
set h := _
/-- The cofork constructed in `coequalizer_cofork` is indeed a colimit cocone. -/
noncomputable def coequalizerCoforkIsColimit : IsColimit (coequalizerCofork f g) := by
  apply Cofork.IsColimit.mk'
  intro s
  have e : f.val ≫ s.π.val = g.val ≫ s.π.val := by injection s.condition
  refine ⟨⟨coequalizer.desc s.π.1 e, ?_⟩, ?_⟩
  · intro x
    rcases (TopCat.epi_iff_surjective (coequalizer.π f.val g.val).base).mp inferInstance x with
      ⟨y, rfl⟩
    -- Porting note : was `apply isLocalRingHom_of_comp _ (PresheafedSpace.stalkMap ...)`, this
    -- used to allow you to provide the proof that `... ≫ ...` is a local ring homomorphism later,
    -- but this is no longer possible
    set h := _
    

Proof state:
case create.refine_1.intro
X Y : LocallyRingedSpace
f g : X ⟶ Y
s : Cofork f g
e : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val
y : (forget TopCat).obj ↑Y.toPresheafedSpace
h : ?m.199155 := ?m.199156
⊢ IsLocalRingHom (PresheafedSpace.stalkMap (coequalizer.desc (Cofork.π s).val e) ((coequalizer.π f.val g.val).base y))

Next tactic:
change IsLocalRingHom h
/-- The cofork constructed in `coequalizer_cofork` is indeed a colimit cocone. -/
noncomputable def coequalizerCoforkIsColimit : IsColimit (coequalizerCofork f g) := by
  apply Cofork.IsColimit.mk'
  intro s
  have e : f.val ≫ s.π.val = g.val ≫ s.π.val := by injection s.condition
  refine ⟨⟨coequalizer.desc s.π.1 e, ?_⟩, ?_⟩
  · intro x
    rcases (TopCat.epi_iff_surjective (coequalizer.π f.val g.val).base).mp inferInstance x with
      ⟨y, rfl⟩
    -- Porting note : was `apply isLocalRingHom_of_comp _ (PresheafedSpace.stalkMap ...)`, this
    -- used to allow you to provide the proof that `... ≫ ...` is a local ring homomorphism later,
    -- but this is no longer possible
    set h := _
    change IsLocalRingHom h
    

Proof state:
case create.refine_1.intro
X Y : LocallyRingedSpace
f g : X ⟶ Y
s : Cofork f g
e : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val
y : (forget TopCat).obj ↑Y.toPresheafedSpace
h : ↑(PresheafedSpace.stalk s.pt.toPresheafedSpace
      ((coequalizer.desc (Cofork.π s).val e).base ((coequalizer.π f.val g.val).base y))) →+*
  ↑(PresheafedSpace.stalk (coequalizerCofork f g).pt.toPresheafedSpace ((coequalizer.π f.val g.val).base y)) :=
  PresheafedSpace.stalkMap (coequalizer.desc (Cofork.π s).val e) ((coequalizer.π f.val g.val).base y)
⊢ IsLocalRingHom h

Next tactic:
suffices : IsLocalRingHom ((PresheafedSpace.stalkMap (coequalizerCofork f g).π.1 _).comp h)
/-- The cofork constructed in `coequalizer_cofork` is indeed a colimit cocone. -/
noncomputable def coequalizerCoforkIsColimit : IsColimit (coequalizerCofork f g) := by
  apply Cofork.IsColimit.mk'
  intro s
  have e : f.val ≫ s.π.val = g.val ≫ s.π.val := by injection s.condition
  refine ⟨⟨coequalizer.desc s.π.1 e, ?_⟩, ?_⟩
  · intro x
    rcases (TopCat.epi_iff_surjective (coequalizer.π f.val g.val).base).mp inferInstance x with
      ⟨y, rfl⟩
    -- Porting note : was `apply isLocalRingHom_of_comp _ (PresheafedSpace.stalkMap ...)`, this
    -- used to allow you to provide the proof that `... ≫ ...` is a local ring homomorphism later,
    -- but this is no longer possible
    set h := _
    change IsLocalRingHom h
    suffices : IsLocalRingHom ((PresheafedSpace.stalkMap (coequalizerCofork f g).π.1 _).comp h)
    · 

Proof state:
case create.refine_1.intro
X Y : LocallyRingedSpace
f g : X ⟶ Y
s : Cofork f g
e : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val
y : (forget TopCat).obj ↑Y.toPresheafedSpace
h : ↑(PresheafedSpace.stalk s.pt.toPresheafedSpace
      ((coequalizer.desc (Cofork.π s).val e).base ((coequalizer.π f.val g.val).base y))) →+*
  ↑(PresheafedSpace.stalk (coequalizerCofork f g).pt.toPresheafedSpace ((coequalizer.π f.val g.val).base y)) :=
  PresheafedSpace.stalkMap (coequalizer.desc (Cofork.π s).val e) ((coequalizer.π f.val g.val).base y)
this : IsLocalRingHom (RingHom.comp (PresheafedSpace.stalkMap (Cofork.π (coequalizerCofork f g)).val y) h)
⊢ IsLocalRingHom h

Next tactic:
apply isLocalRingHom_of_comp _ (PresheafedSpace.stalkMap (coequalizerCofork f g).π.1 _)
/-- The cofork constructed in `coequalizer_cofork` is indeed a colimit cocone. -/
noncomputable def coequalizerCoforkIsColimit : IsColimit (coequalizerCofork f g) := by
  apply Cofork.IsColimit.mk'
  intro s
  have e : f.val ≫ s.π.val = g.val ≫ s.π.val := by injection s.condition
  refine ⟨⟨coequalizer.desc s.π.1 e, ?_⟩, ?_⟩
  · intro x
    rcases (TopCat.epi_iff_surjective (coequalizer.π f.val g.val).base).mp inferInstance x with
      ⟨y, rfl⟩
    -- Porting note : was `apply isLocalRingHom_of_comp _ (PresheafedSpace.stalkMap ...)`, this
    -- used to allow you to provide the proof that `... ≫ ...` is a local ring homomorphism later,
    -- but this is no longer possible
    set h := _
    change IsLocalRingHom h
    suffices : IsLocalRingHom ((PresheafedSpace.stalkMap (coequalizerCofork f g).π.1 _).comp h)
    · apply isLocalRingHom_of_comp _ (PresheafedSpace.stalkMap (coequalizerCofork f g).π.1 _)
    

Proof state:
case this
X Y : LocallyRingedSpace
f g : X ⟶ Y
s : Cofork f g
e : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val
y : (forget TopCat).obj ↑Y.toPresheafedSpace
h : ↑(PresheafedSpace.stalk s.pt.toPresheafedSpace
      ((coequalizer.desc (Cofork.π s).val e).base ((coequalizer.π f.val g.val).base y))) →+*
  ↑(PresheafedSpace.stalk (coequalizerCofork f g).pt.toPresheafedSpace ((coequalizer.π f.val g.val).base y)) :=
  PresheafedSpace.stalkMap (coequalizer.desc (Cofork.π s).val e) ((coequalizer.π f.val g.val).base y)
⊢ IsLocalRingHom (RingHom.comp (PresheafedSpace.stalkMap (Cofork.π (coequalizerCofork f g)).val y) h)

Next tactic:
change IsLocalRingHom (_ ≫ PresheafedSpace.stalkMap (coequalizerCofork f g).π.val y)
/-- The cofork constructed in `coequalizer_cofork` is indeed a colimit cocone. -/
noncomputable def coequalizerCoforkIsColimit : IsColimit (coequalizerCofork f g) := by
  apply Cofork.IsColimit.mk'
  intro s
  have e : f.val ≫ s.π.val = g.val ≫ s.π.val := by injection s.condition
  refine ⟨⟨coequalizer.desc s.π.1 e, ?_⟩, ?_⟩
  · intro x
    rcases (TopCat.epi_iff_surjective (coequalizer.π f.val g.val).base).mp inferInstance x with
      ⟨y, rfl⟩
    -- Porting note : was `apply isLocalRingHom_of_comp _ (PresheafedSpace.stalkMap ...)`, this
    -- used to allow you to provide the proof that `... ≫ ...` is a local ring homomorphism later,
    -- but this is no longer possible
    set h := _
    change IsLocalRingHom h
    suffices : IsLocalRingHom ((PresheafedSpace.stalkMap (coequalizerCofork f g).π.1 _).comp h)
    · apply isLocalRingHom_of_comp _ (PresheafedSpace.stalkMap (coequalizerCofork f g).π.1 _)
    change IsLocalRingHom (_ ≫ PresheafedSpace.stalkMap (coequalizerCofork f g).π.val y)
    

Proof state:
case this
X Y : LocallyRingedSpace
f g : X ⟶ Y
s : Cofork f g
e : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val
y : (forget TopCat).obj ↑Y.toPresheafedSpace
h : ↑(PresheafedSpace.stalk s.pt.toPresheafedSpace
      ((coequalizer.desc (Cofork.π s).val e).base ((coequalizer.π f.val g.val).base y))) →+*
  ↑(PresheafedSpace.stalk (coequalizerCofork f g).pt.toPresheafedSpace ((coequalizer.π f.val g.val).base y)) :=
  PresheafedSpace.stalkMap (coequalizer.desc (Cofork.π s).val e) ((coequalizer.π f.val g.val).base y)
⊢ IsLocalRingHom (h ≫ PresheafedSpace.stalkMap (Cofork.π (coequalizerCofork f g)).val y)

Next tactic:
erw [← PresheafedSpace.stalkMap.comp]
/-- The cofork constructed in `coequalizer_cofork` is indeed a colimit cocone. -/
noncomputable def coequalizerCoforkIsColimit : IsColimit (coequalizerCofork f g) := by
  apply Cofork.IsColimit.mk'
  intro s
  have e : f.val ≫ s.π.val = g.val ≫ s.π.val := by injection s.condition
  refine ⟨⟨coequalizer.desc s.π.1 e, ?_⟩, ?_⟩
  · intro x
    rcases (TopCat.epi_iff_surjective (coequalizer.π f.val g.val).base).mp inferInstance x with
      ⟨y, rfl⟩
    -- Porting note : was `apply isLocalRingHom_of_comp _ (PresheafedSpace.stalkMap ...)`, this
    -- used to allow you to provide the proof that `... ≫ ...` is a local ring homomorphism later,
    -- but this is no longer possible
    set h := _
    change IsLocalRingHom h
    suffices : IsLocalRingHom ((PresheafedSpace.stalkMap (coequalizerCofork f g).π.1 _).comp h)
    · apply isLocalRingHom_of_comp _ (PresheafedSpace.stalkMap (coequalizerCofork f g).π.1 _)
    change IsLocalRingHom (_ ≫ PresheafedSpace.stalkMap (coequalizerCofork f g).π.val y)
    erw [← PresheafedSpace.stalkMap.comp]
    

Proof state:
case this
X Y : LocallyRingedSpace
f g : X ⟶ Y
s : Cofork f g
e : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val
y : (forget TopCat).obj ↑Y.toPresheafedSpace
h : ↑(PresheafedSpace.stalk s.pt.toPresheafedSpace
      ((coequalizer.desc (Cofork.π s).val e).base ((coequalizer.π f.val g.val).base y))) →+*
  ↑(PresheafedSpace.stalk (coequalizerCofork f g).pt.toPresheafedSpace ((coequalizer.π f.val g.val).base y)) :=
  PresheafedSpace.stalkMap (coequalizer.desc (Cofork.π s).val e) ((coequalizer.π f.val g.val).base y)
⊢ IsLocalRingHom (PresheafedSpace.stalkMap (coequalizer.π f.val g.val ≫ coequalizer.desc (Cofork.π s).val e) y)

Next tactic:
apply isLocalRingHom_stalkMap_congr _ _ (coequalizer.π_desc s.π.1 e).symm y
/-- The cofork constructed in `coequalizer_cofork` is indeed a colimit cocone. -/
noncomputable def coequalizerCoforkIsColimit : IsColimit (coequalizerCofork f g) := by
  apply Cofork.IsColimit.mk'
  intro s
  have e : f.val ≫ s.π.val = g.val ≫ s.π.val := by injection s.condition
  refine ⟨⟨coequalizer.desc s.π.1 e, ?_⟩, ?_⟩
  · intro x
    rcases (TopCat.epi_iff_surjective (coequalizer.π f.val g.val).base).mp inferInstance x with
      ⟨y, rfl⟩
    -- Porting note : was `apply isLocalRingHom_of_comp _ (PresheafedSpace.stalkMap ...)`, this
    -- used to allow you to provide the proof that `... ≫ ...` is a local ring homomorphism later,
    -- but this is no longer possible
    set h := _
    change IsLocalRingHom h
    suffices : IsLocalRingHom ((PresheafedSpace.stalkMap (coequalizerCofork f g).π.1 _).comp h)
    · apply isLocalRingHom_of_comp _ (PresheafedSpace.stalkMap (coequalizerCofork f g).π.1 _)
    change IsLocalRingHom (_ ≫ PresheafedSpace.stalkMap (coequalizerCofork f g).π.val y)
    erw [← PresheafedSpace.stalkMap.comp]
    apply isLocalRingHom_stalkMap_congr _ _ (coequalizer.π_desc s.π.1 e).symm y
    

Proof state:
case this
X Y : LocallyRingedSpace
f g : X ⟶ Y
s : Cofork f g
e : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val
y : (forget TopCat).obj ↑Y.toPresheafedSpace
h : ↑(PresheafedSpace.stalk s.pt.toPresheafedSpace
      ((coequalizer.desc (Cofork.π s).val e).base ((coequalizer.π f.val g.val).base y))) →+*
  ↑(PresheafedSpace.stalk (coequalizerCofork f g).pt.toPresheafedSpace ((coequalizer.π f.val g.val).base y)) :=
  PresheafedSpace.stalkMap (coequalizer.desc (Cofork.π s).val e) ((coequalizer.π f.val g.val).base y)
⊢ IsLocalRingHom (PresheafedSpace.stalkMap (Cofork.π s).val y)

Next tactic:
infer_instance
/-- The cofork constructed in `coequalizer_cofork` is indeed a colimit cocone. -/
noncomputable def coequalizerCoforkIsColimit : IsColimit (coequalizerCofork f g) := by
  apply Cofork.IsColimit.mk'
  intro s
  have e : f.val ≫ s.π.val = g.val ≫ s.π.val := by injection s.condition
  refine ⟨⟨coequalizer.desc s.π.1 e, ?_⟩, ?_⟩
  · intro x
    rcases (TopCat.epi_iff_surjective (coequalizer.π f.val g.val).base).mp inferInstance x with
      ⟨y, rfl⟩
    -- Porting note : was `apply isLocalRingHom_of_comp _ (PresheafedSpace.stalkMap ...)`, this
    -- used to allow you to provide the proof that `... ≫ ...` is a local ring homomorphism later,
    -- but this is no longer possible
    set h := _
    change IsLocalRingHom h
    suffices : IsLocalRingHom ((PresheafedSpace.stalkMap (coequalizerCofork f g).π.1 _).comp h)
    · apply isLocalRingHom_of_comp _ (PresheafedSpace.stalkMap (coequalizerCofork f g).π.1 _)
    change IsLocalRingHom (_ ≫ PresheafedSpace.stalkMap (coequalizerCofork f g).π.val y)
    erw [← PresheafedSpace.stalkMap.comp]
    apply isLocalRingHom_stalkMap_congr _ _ (coequalizer.π_desc s.π.1 e).symm y
    infer_instance
  

Proof state:
case create.refine_2
X Y : LocallyRingedSpace
f g : X ⟶ Y
s : Cofork f g
e : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val
⊢ Cofork.π (coequalizerCofork f g) ≫
        { val := coequalizer.desc (Cofork.π s).val e,
          prop :=
            (_ :
              ∀ (x : ↑↑(coequalizerCofork f g).pt.toPresheafedSpace),
                IsLocalRingHom (PresheafedSpace.stalkMap (coequalizer.desc (Cofork.π s).val e) x)) } =
      Cofork.π s ∧
    ∀
      {m :
        ((Functor.const WalkingParallelPair).obj (coequalizerCofork f g).pt).obj WalkingParallelPair.one ⟶
          ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one},
      Cofork.π (coequalizerCofork f g) ≫ m = Cofork.π s →
        m =
          { val := coequalizer.desc (Cofork.π s).val e,
            prop :=
              (_ :
                ∀ (x : ↑↑(coequalizerCofork f g).pt.toPresheafedSpace),
                  IsLocalRingHom (PresheafedSpace.stalkMap (coequalizer.desc (Cofork.π s).val e) x)) }

Next tactic:
constructor