l3lab/ntp-mathlib huggingface dataset:
theorem pullbackConeOfLeftLift_snd :
    pullbackConeOfLeftLift f g s ≫ (pullbackConeOfLeft f g).snd = s.snd := by
  -- Porting note : `ext` did not pick up `NatTrans.ext`
  refine PresheafedSpace.Hom.ext _ _ ?_ <| NatTrans.ext _ _ <| funext fun x => ?_
  · change pullback.lift _ _ _ ≫ pullback.snd = _
    simp
  · change (_ ≫ _ ≫ _) ≫ _ = _
    simp_rw [Category.assoc]
    erw [s.snd.c.naturality_assoc]
    

Proof state:
case refine_2
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
x : (Opens ↑↑Y)ᵒᵖ
⊢ (PullbackCone.snd s).c.app x ≫
      ((PullbackCone.snd s).base _* s.pt.presheaf).map
          ((IsOpenMap.adjunction (_ : IsOpenMap ⇑pullback.snd)).counit.app x.unop).op ≫
        s.pt.presheaf.map
            (eqToHom
              (_ :
                (Opens.map (PullbackCone.snd s).base).op.obj
                    ((IsOpenMap.functor (_ : IsOpenMap ⇑pullback.snd)).op.obj
                      ((Opens.map (PullbackCone.snd (pullbackConeOfLeft f g)).base).op.obj x)) =
                  (Opens.map
                          (pullback.lift (PullbackCone.fst s).base (PullbackCone.snd s).base
                            (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base))).op.obj
                    ((Opens.map (PullbackCone.snd (pullbackConeOfLeft f g)).base).op.obj x))) ≫
          (whiskerRight
                (eqToHom
                  (_ :
                    (Opens.map (pullbackConeOfLeftLift f g s ≫ PullbackCone.snd (pullbackConeOfLeft f g)).base).op =
                      (Opens.map (PullbackCone.snd s).base).op))
                s.pt.presheaf).app
            x =
    (PullbackCone.snd s).c.app x

Next tactic:
erw [← s.pt.presheaf.map_comp, ← s.pt.presheaf.map_comp]
theorem pullbackConeOfLeftLift_snd :
    pullbackConeOfLeftLift f g s ≫ (pullbackConeOfLeft f g).snd = s.snd := by
  -- Porting note : `ext` did not pick up `NatTrans.ext`
  refine PresheafedSpace.Hom.ext _ _ ?_ <| NatTrans.ext _ _ <| funext fun x => ?_
  · change pullback.lift _ _ _ ≫ pullback.snd = _
    simp
  · change (_ ≫ _ ≫ _) ≫ _ = _
    simp_rw [Category.assoc]
    erw [s.snd.c.naturality_assoc]
    erw [← s.pt.presheaf.map_comp, ← s.pt.presheaf.map_comp]
    

Proof state:
case refine_2
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
x : (Opens ↑↑Y)ᵒᵖ
⊢ (PullbackCone.snd s).c.app x ≫
      s.pt.presheaf.map
        ((Opens.map (PullbackCone.snd s).base).op.map
            ((IsOpenMap.adjunction (_ : IsOpenMap ⇑pullback.snd)).counit.app x.unop).op ≫
          eqToHom
              (_ :
                (Opens.map (PullbackCone.snd s).base).op.obj
                    ((IsOpenMap.functor (_ : IsOpenMap ⇑pullback.snd)).op.obj
                      ((Opens.map (PullbackCone.snd (pullbackConeOfLeft f g)).base).op.obj x)) =
                  (Opens.map
                          (pullback.lift (PullbackCone.fst s).base (PullbackCone.snd s).base
                            (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base))).op.obj
                    ((Opens.map (PullbackCone.snd (pullbackConeOfLeft f g)).base).op.obj x)) ≫
            (eqToHom
                  (_ :
                    (Opens.map (pullbackConeOfLeftLift f g s ≫ PullbackCone.snd (pullbackConeOfLeft f g)).base).op =
                      (Opens.map (PullbackCone.snd s).base).op)).app
              x) =
    (PullbackCone.snd s).c.app x

Next tactic:
trans s.snd.c.app x ≫ s.pt.presheaf.map (𝟙 _)
theorem pullbackConeOfLeftLift_snd :
    pullbackConeOfLeftLift f g s ≫ (pullbackConeOfLeft f g).snd = s.snd := by
  -- Porting note : `ext` did not pick up `NatTrans.ext`
  refine PresheafedSpace.Hom.ext _ _ ?_ <| NatTrans.ext _ _ <| funext fun x => ?_
  · change pullback.lift _ _ _ ≫ pullback.snd = _
    simp
  · change (_ ≫ _ ≫ _) ≫ _ = _
    simp_rw [Category.assoc]
    erw [s.snd.c.naturality_assoc]
    erw [← s.pt.presheaf.map_comp, ← s.pt.presheaf.map_comp]
    trans s.snd.c.app x ≫ s.pt.presheaf.map (𝟙 _)
    · 

Proof state:
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
x : (Opens ↑↑Y)ᵒᵖ
⊢ (PullbackCone.snd s).c.app x ≫
      s.pt.presheaf.map
        ((Opens.map (PullbackCone.snd s).base).op.map
            ((IsOpenMap.adjunction (_ : IsOpenMap ⇑pullback.snd)).counit.app x.unop).op ≫
          eqToHom
              (_ :
                (Opens.map (PullbackCone.snd s).base).op.obj
                    ((IsOpenMap.functor (_ : IsOpenMap ⇑pullback.snd)).op.obj
                      ((Opens.map (PullbackCone.snd (pullbackConeOfLeft f g)).base).op.obj x)) =
                  (Opens.map
                          (pullback.lift (PullbackCone.fst s).base (PullbackCone.snd s).base
                            (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base))).op.obj
                    ((Opens.map (PullbackCone.snd (pullbackConeOfLeft f g)).base).op.obj x)) ≫
            (eqToHom
                  (_ :
                    (Opens.map (pullbackConeOfLeftLift f g s ≫ PullbackCone.snd (pullbackConeOfLeft f g)).base).op =
                      (Opens.map (PullbackCone.snd s).base).op)).app
              x) =
    (PullbackCone.snd s).c.app x ≫ s.pt.presheaf.map (𝟙 ((Opens.map (PullbackCone.snd s).base).op.obj x))

Next tactic:
congr 1
theorem pullbackConeOfLeftLift_snd :
    pullbackConeOfLeftLift f g s ≫ (pullbackConeOfLeft f g).snd = s.snd := by
  -- Porting note : `ext` did not pick up `NatTrans.ext`
  refine PresheafedSpace.Hom.ext _ _ ?_ <| NatTrans.ext _ _ <| funext fun x => ?_
  · change pullback.lift _ _ _ ≫ pullback.snd = _
    simp
  · change (_ ≫ _ ≫ _) ≫ _ = _
    simp_rw [Category.assoc]
    erw [s.snd.c.naturality_assoc]
    erw [← s.pt.presheaf.map_comp, ← s.pt.presheaf.map_comp]
    trans s.snd.c.app x ≫ s.pt.presheaf.map (𝟙 _)
    · congr 1
    · 

Proof state:
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
x : (Opens ↑↑Y)ᵒᵖ
⊢ (PullbackCone.snd s).c.app x ≫ s.pt.presheaf.map (𝟙 ((Opens.map (PullbackCone.snd s).base).op.obj x)) =
    (PullbackCone.snd s).c.app x

Next tactic:
rw [s.pt.presheaf.map_id]
theorem pullbackConeOfLeftLift_snd :
    pullbackConeOfLeftLift f g s ≫ (pullbackConeOfLeft f g).snd = s.snd := by
  -- Porting note : `ext` did not pick up `NatTrans.ext`
  refine PresheafedSpace.Hom.ext _ _ ?_ <| NatTrans.ext _ _ <| funext fun x => ?_
  · change pullback.lift _ _ _ ≫ pullback.snd = _
    simp
  · change (_ ≫ _ ≫ _) ≫ _ = _
    simp_rw [Category.assoc]
    erw [s.snd.c.naturality_assoc]
    erw [← s.pt.presheaf.map_comp, ← s.pt.presheaf.map_comp]
    trans s.snd.c.app x ≫ s.pt.presheaf.map (𝟙 _)
    · congr 1
    · rw [s.pt.presheaf.map_id]; 

Proof state:
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
x : (Opens ↑↑Y)ᵒᵖ
⊢ (PullbackCone.snd s).c.app x ≫ 𝟙 (s.pt.presheaf.obj ((Opens.map (PullbackCone.snd s).base).op.obj x)) =
    (PullbackCone.snd s).c.app x

Next tactic:
erw [Category.comp_id]
instance pullbackConeSndIsOpenImmersion : IsOpenImmersion (pullbackConeOfLeft f g).snd := by
  

Proof state:
C : Type u_1
inst✝ : Category.{?u.227111, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
⊢ IsOpenImmersion (PullbackCone.snd (pullbackConeOfLeft f g))

Next tactic:
erw [CategoryTheory.Limits.PullbackCone.mk_snd]
instance pullbackConeSndIsOpenImmersion : IsOpenImmersion (pullbackConeOfLeft f g).snd := by
  erw [CategoryTheory.Limits.PullbackCone.mk_snd]
  

Proof state:
C : Type u_1
inst✝ : Category.{?u.227111, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
⊢ IsOpenImmersion (PresheafedSpace.ofRestrict Y (_ : OpenEmbedding ⇑pullback.snd))

Next tactic:
infer_instance
/-- The constructed pullback cone is indeed the pullback. -/
def pullbackConeOfLeftIsLimit : IsLimit (pullbackConeOfLeft f g) := by
  

Proof state:
C : Type u_1
inst✝ : Category.{?u.228508, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
⊢ IsLimit (pullbackConeOfLeft f g)

Next tactic:
apply PullbackCone.isLimitAux'
/-- The constructed pullback cone is indeed the pullback. -/
def pullbackConeOfLeftIsLimit : IsLimit (pullbackConeOfLeft f g) := by
  apply PullbackCone.isLimitAux'
  

Proof state:
case create
C : Type u_1
inst✝ : Category.{?u.228508, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
⊢ (s : PullbackCone f g) →
    { l //
      l ≫ PullbackCone.fst (pullbackConeOfLeft f g) = PullbackCone.fst s ∧
        l ≫ PullbackCone.snd (pullbackConeOfLeft f g) = PullbackCone.snd s ∧
          ∀ {m : s.pt ⟶ (pullbackConeOfLeft f g).pt},
            m ≫ PullbackCone.fst (pullbackConeOfLeft f g) = PullbackCone.fst s →
              m ≫ PullbackCone.snd (pullbackConeOfLeft f g) = PullbackCone.snd s → m = l }

Next tactic:
intro s
/-- The constructed pullback cone is indeed the pullback. -/
def pullbackConeOfLeftIsLimit : IsLimit (pullbackConeOfLeft f g) := by
  apply PullbackCone.isLimitAux'
  intro s
  

Proof state:
case create
C : Type u_1
inst✝ : Category.{?u.228508, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s✝ s : PullbackCone f g
⊢ { l //
    l ≫ PullbackCone.fst (pullbackConeOfLeft f g) = PullbackCone.fst s ∧
      l ≫ PullbackCone.snd (pullbackConeOfLeft f g) = PullbackCone.snd s ∧
        ∀ {m : s.pt ⟶ (pullbackConeOfLeft f g).pt},
          m ≫ PullbackCone.fst (pullbackConeOfLeft f g) = PullbackCone.fst s →
            m ≫ PullbackCone.snd (pullbackConeOfLeft f g) = PullbackCone.snd s → m = l }

Next tactic:
use pullbackConeOfLeftLift f g s
/-- The constructed pullback cone is indeed the pullback. -/
def pullbackConeOfLeftIsLimit : IsLimit (pullbackConeOfLeft f g) := by
  apply PullbackCone.isLimitAux'
  intro s
  use pullbackConeOfLeftLift f g s
  

Proof state:
case property
C : Type u_1
inst✝ : Category.{?u.228508, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s✝ s : PullbackCone f g
⊢ pullbackConeOfLeftLift f g s ≫ PullbackCone.fst (pullbackConeOfLeft f g) = PullbackCone.fst s ∧
    pullbackConeOfLeftLift f g s ≫ PullbackCone.snd (pullbackConeOfLeft f g) = PullbackCone.snd s ∧
      ∀ {m : s.pt ⟶ (pullbackConeOfLeft f g).pt},
        m ≫ PullbackCone.fst (pullbackConeOfLeft f g) = PullbackCone.fst s →
          m ≫ PullbackCone.snd (pullbackConeOfLeft f g) = PullbackCone.snd s → m = pullbackConeOfLeftLift f g s

Next tactic:
use pullbackConeOfLeftLift_fst f g s
/-- The constructed pullback cone is indeed the pullback. -/
def pullbackConeOfLeftIsLimit : IsLimit (pullbackConeOfLeft f g) := by
  apply PullbackCone.isLimitAux'
  intro s
  use pullbackConeOfLeftLift f g s
  use pullbackConeOfLeftLift_fst f g s
  

Proof state:
case right
C : Type u_1
inst✝ : Category.{?u.228508, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s✝ s : PullbackCone f g
⊢ pullbackConeOfLeftLift f g s ≫ PullbackCone.snd (pullbackConeOfLeft f g) = PullbackCone.snd s ∧
    ∀ {m : s.pt ⟶ (pullbackConeOfLeft f g).pt},
      m ≫ PullbackCone.fst (pullbackConeOfLeft f g) = PullbackCone.fst s →
        m ≫ PullbackCone.snd (pullbackConeOfLeft f g) = PullbackCone.snd s → m = pullbackConeOfLeftLift f g s

Next tactic:
use pullbackConeOfLeftLift_snd f g s
/-- The constructed pullback cone is indeed the pullback. -/
def pullbackConeOfLeftIsLimit : IsLimit (pullbackConeOfLeft f g) := by
  apply PullbackCone.isLimitAux'
  intro s
  use pullbackConeOfLeftLift f g s
  use pullbackConeOfLeftLift_fst f g s
  use pullbackConeOfLeftLift_snd f g s
  

Proof state:
case right
C : Type u_1
inst✝ : Category.{?u.228508, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s✝ s : PullbackCone f g
⊢ ∀ {m : s.pt ⟶ (pullbackConeOfLeft f g).pt},
    m ≫ PullbackCone.fst (pullbackConeOfLeft f g) = PullbackCone.fst s →
      m ≫ PullbackCone.snd (pullbackConeOfLeft f g) = PullbackCone.snd s → m = pullbackConeOfLeftLift f g s

Next tactic:
intro m _ h₂
/-- The constructed pullback cone is indeed the pullback. -/
def pullbackConeOfLeftIsLimit : IsLimit (pullbackConeOfLeft f g) := by
  apply PullbackCone.isLimitAux'
  intro s
  use pullbackConeOfLeftLift f g s
  use pullbackConeOfLeftLift_fst f g s
  use pullbackConeOfLeftLift_snd f g s
  intro m _ h₂
  

Proof state:
case right
C : Type u_1
inst✝ : Category.{?u.228508, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s✝ s : PullbackCone f g
m : s.pt ⟶ (pullbackConeOfLeft f g).pt
a✝ : m ≫ PullbackCone.fst (pullbackConeOfLeft f g) = PullbackCone.fst s
h₂ : m ≫ PullbackCone.snd (pullbackConeOfLeft f g) = PullbackCone.snd s
⊢ m = pullbackConeOfLeftLift f g s

Next tactic:
rw [← cancel_mono (pullbackConeOfLeft f g).snd]
/-- The constructed pullback cone is indeed the pullback. -/
def pullbackConeOfLeftIsLimit : IsLimit (pullbackConeOfLeft f g) := by
  apply PullbackCone.isLimitAux'
  intro s
  use pullbackConeOfLeftLift f g s
  use pullbackConeOfLeftLift_fst f g s
  use pullbackConeOfLeftLift_snd f g s
  intro m _ h₂
  rw [← cancel_mono (pullbackConeOfLeft f g).snd]
  

Proof state:
case right
C : Type u_1
inst✝ : Category.{?u.228508, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s✝ s : PullbackCone f g
m : s.pt ⟶ (pullbackConeOfLeft f g).pt
a✝ : m ≫ PullbackCone.fst (pullbackConeOfLeft f g) = PullbackCone.fst s
h₂ : m ≫ PullbackCone.snd (pullbackConeOfLeft f g) = PullbackCone.snd s
⊢ m ≫ PullbackCone.snd (pullbackConeOfLeft f g) =
    pullbackConeOfLeftLift f g s ≫ PullbackCone.snd (pullbackConeOfLeft f g)

Next tactic:
exact h₂.trans (pullbackConeOfLeftLift_snd f g s).symm
/-- Open immersions are stable under base-change. -/
instance pullbackSndOfLeft : IsOpenImmersion (pullback.snd : pullback f g ⟶ _) := by
  

Proof state:
C : Type u_1
inst✝ : Category.{?u.233971, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
⊢ IsOpenImmersion pullback.snd

Next tactic:
delta pullback.snd
/-- Open immersions are stable under base-change. -/
instance pullbackSndOfLeft : IsOpenImmersion (pullback.snd : pullback f g ⟶ _) := by
  delta pullback.snd
  

Proof state:
C : Type u_1
inst✝ : Category.{?u.233971, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
⊢ IsOpenImmersion (limit.π (cospan f g) WalkingCospan.right)

Next tactic:
rw [← limit.isoLimitCone_hom_π ⟨_, pullbackConeOfLeftIsLimit f g⟩ WalkingCospan.right]
/-- Open immersions are stable under base-change. -/
instance pullbackSndOfLeft : IsOpenImmersion (pullback.snd : pullback f g ⟶ _) := by
  delta pullback.snd
  rw [← limit.isoLimitCone_hom_π ⟨_, pullbackConeOfLeftIsLimit f g⟩ WalkingCospan.right]
  

Proof state:
C : Type u_1
inst✝ : Category.{?u.233971, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
⊢ IsOpenImmersion
    ((limit.isoLimitCone { cone := pullbackConeOfLeft f g, isLimit := pullbackConeOfLeftIsLimit f g }).hom ≫
      { cone := pullbackConeOfLeft f g, isLimit := pullbackConeOfLeftIsLimit f g }.cone.π.app WalkingCospan.right)

Next tactic:
infer_instance
/-- Open immersions are stable under base-change. -/
instance pullbackFstOfRight : IsOpenImmersion (pullback.fst : pullback g f ⟶ _) := by
  

Proof state:
C : Type u_1
inst✝ : Category.{?u.236065, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
⊢ IsOpenImmersion pullback.fst

Next tactic:
rw [← pullbackSymmetry_hom_comp_snd]
/-- Open immersions are stable under base-change. -/
instance pullbackFstOfRight : IsOpenImmersion (pullback.fst : pullback g f ⟶ _) := by
  rw [← pullbackSymmetry_hom_comp_snd]
  

Proof state:
C : Type u_1
inst✝ : Category.{?u.236065, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
⊢ IsOpenImmersion ((pullbackSymmetry g f).hom ≫ pullback.snd)

Next tactic:
infer_instance
instance pullbackToBaseIsOpenImmersion [IsOpenImmersion g] :
    IsOpenImmersion (limit.π (cospan f g) WalkingCospan.one) := by
  

Proof state:
C : Type u_1
inst✝¹ : Category.{?u.237943, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
inst✝ : IsOpenImmersion g
⊢ IsOpenImmersion (limit.π (cospan f g) WalkingCospan.one)

Next tactic:
rw [← limit.w (cospan f g) WalkingCospan.Hom.inl, cospan_map_inl]
instance pullbackToBaseIsOpenImmersion [IsOpenImmersion g] :
    IsOpenImmersion (limit.π (cospan f g) WalkingCospan.one) := by
  rw [← limit.w (cospan f g) WalkingCospan.Hom.inl, cospan_map_inl]
  

Proof state:
C : Type u_1
inst✝¹ : Category.{?u.237943, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
inst✝ : IsOpenImmersion g
⊢ IsOpenImmersion (limit.π (cospan f g) WalkingCospan.left ≫ f)

Next tactic:
infer_instance
instance forgetPreservesLimitsOfLeft : PreservesLimit (cospan f g) (forget C) :=
  preservesLimitOfPreservesLimitCone (pullbackConeOfLeftIsLimit f g)
    (by
      

Proof state:
C : Type u_1
inst✝ : Category.{?u.239998, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
⊢ IsLimit ((forget C).mapCone (pullbackConeOfLeft f g))

Next tactic:
apply (IsLimit.postcomposeHomEquiv (diagramIsoCospan _) _).toFun
instance forgetPreservesLimitsOfLeft : PreservesLimit (cospan f g) (forget C) :=
  preservesLimitOfPreservesLimitCone (pullbackConeOfLeftIsLimit f g)
    (by
      apply (IsLimit.postcomposeHomEquiv (diagramIsoCospan _) _).toFun
      

Proof state:
C : Type u_1
inst✝ : Category.{?u.239998, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
⊢ IsLimit
    ((Cones.postcompose (diagramIsoCospan (cospan f g ⋙ forget C)).hom).obj
      ((forget C).mapCone (pullbackConeOfLeft f g)))

Next tactic:
refine' (IsLimit.equivIsoLimit _).toFun (limit.isLimit (cospan f.base g.base))
instance forgetPreservesLimitsOfLeft : PreservesLimit (cospan f g) (forget C) :=
  preservesLimitOfPreservesLimitCone (pullbackConeOfLeftIsLimit f g)
    (by
      apply (IsLimit.postcomposeHomEquiv (diagramIsoCospan _) _).toFun
      refine' (IsLimit.equivIsoLimit _).toFun (limit.isLimit (cospan f.base g.base))
      

Proof state:
C : Type u_1
inst✝ : Category.{?u.239998, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
⊢ limit.cone (cospan f.base g.base) ≅
    (Cones.postcompose (diagramIsoCospan (cospan f g ⋙ forget C)).hom).obj ((forget C).mapCone (pullbackConeOfLeft f g))

Next tactic:
fapply Cones.ext
instance forgetPreservesLimitsOfLeft : PreservesLimit (cospan f g) (forget C) :=
  preservesLimitOfPreservesLimitCone (pullbackConeOfLeftIsLimit f g)
    (by
      apply (IsLimit.postcomposeHomEquiv (diagramIsoCospan _) _).toFun
      refine' (IsLimit.equivIsoLimit _).toFun (limit.isLimit (cospan f.base g.base))
      fapply Cones.ext
      · 

Proof state:
case φ
C : Type u_1
inst✝ : Category.{?u.239998, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
⊢ (limit.cone (cospan f.base g.base)).pt ≅
    ((Cones.postcompose (diagramIsoCospan (cospan f g ⋙ forget C)).hom).obj
        ((forget C).mapCone (pullbackConeOfLeft f g))).pt

Next tactic:
exact Iso.refl _
instance forgetPreservesLimitsOfLeft : PreservesLimit (cospan f g) (forget C) :=
  preservesLimitOfPreservesLimitCone (pullbackConeOfLeftIsLimit f g)
    (by
      apply (IsLimit.postcomposeHomEquiv (diagramIsoCospan _) _).toFun
      refine' (IsLimit.equivIsoLimit _).toFun (limit.isLimit (cospan f.base g.base))
      fapply Cones.ext
      · exact Iso.refl _
      

Proof state:
case w
C : Type u_1
inst✝ : Category.{?u.239998, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
⊢ autoParam
    (∀ (j : WalkingCospan),
      (limit.cone (cospan f.base g.base)).π.app j =
        (Iso.refl (limit.cone (cospan f.base g.base)).pt).hom ≫
          ((Cones.postcompose (diagramIsoCospan (cospan f g ⋙ forget C)).hom).obj
                  ((forget C).mapCone (pullbackConeOfLeft f g))).π.app
            j)
    _auto✝

Next tactic:
change ∀ j, _ = 𝟙 _ ≫ _ ≫ _
instance forgetPreservesLimitsOfLeft : PreservesLimit (cospan f g) (forget C) :=
  preservesLimitOfPreservesLimitCone (pullbackConeOfLeftIsLimit f g)
    (by
      apply (IsLimit.postcomposeHomEquiv (diagramIsoCospan _) _).toFun
      refine' (IsLimit.equivIsoLimit _).toFun (limit.isLimit (cospan f.base g.base))
      fapply Cones.ext
      · exact Iso.refl _
      change ∀ j, _ = 𝟙 _ ≫ _ ≫ _
      

Proof state:
case w
C : Type u_1
inst✝ : Category.{?u.239998, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
⊢ ∀ (j : WalkingCospan),
    (limit.cone (cospan f.base g.base)).π.app j =
      𝟙 (((Functor.const WalkingCospan).obj (limit.cone (cospan f.base g.base)).pt).obj j) ≫
        ((forget C).mapCone (pullbackConeOfLeft f g)).π.app j ≫ (diagramIsoCospan (cospan f g ⋙ forget C)).hom.app j

Next tactic:
simp_rw [Category.id_comp]
instance forgetPreservesLimitsOfLeft : PreservesLimit (cospan f g) (forget C) :=
  preservesLimitOfPreservesLimitCone (pullbackConeOfLeftIsLimit f g)
    (by
      apply (IsLimit.postcomposeHomEquiv (diagramIsoCospan _) _).toFun
      refine' (IsLimit.equivIsoLimit _).toFun (limit.isLimit (cospan f.base g.base))
      fapply Cones.ext
      · exact Iso.refl _
      change ∀ j, _ = 𝟙 _ ≫ _ ≫ _
      simp_rw [Category.id_comp]
      

Proof state:
case w
C : Type u_1
inst✝ : Category.{?u.239998, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
⊢ ∀ (j : WalkingCospan),
    (limit.cone (cospan f.base g.base)).π.app j =
      ((forget C).mapCone (pullbackConeOfLeft f g)).π.app j ≫ (diagramIsoCospan (cospan f g ⋙ forget C)).hom.app j

Next tactic:
rintro (_ | _ | _)
instance forgetPreservesLimitsOfLeft : PreservesLimit (cospan f g) (forget C) :=
  preservesLimitOfPreservesLimitCone (pullbackConeOfLeftIsLimit f g)
    (by
      apply (IsLimit.postcomposeHomEquiv (diagramIsoCospan _) _).toFun
      refine' (IsLimit.equivIsoLimit _).toFun (limit.isLimit (cospan f.base g.base))
      fapply Cones.ext
      · exact Iso.refl _
      change ∀ j, _ = 𝟙 _ ≫ _ ≫ _
      simp_rw [Category.id_comp]
      rintro (_ | _ | _) <;> 

Proof state:
case w.none
C : Type u_1
inst✝ : Category.{?u.239998, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
⊢ (limit.cone (cospan f.base g.base)).π.app none =
    ((forget C).mapCone (pullbackConeOfLeft f g)).π.app none ≫ (diagramIsoCospan (cospan f g ⋙ forget C)).hom.app none

Next tactic:
symm
instance forgetPreservesLimitsOfLeft : PreservesLimit (cospan f g) (forget C) :=
  preservesLimitOfPreservesLimitCone (pullbackConeOfLeftIsLimit f g)
    (by
      apply (IsLimit.postcomposeHomEquiv (diagramIsoCospan _) _).toFun
      refine' (IsLimit.equivIsoLimit _).toFun (limit.isLimit (cospan f.base g.base))
      fapply Cones.ext
      · exact Iso.refl _
      change ∀ j, _ = 𝟙 _ ≫ _ ≫ _
      simp_rw [Category.id_comp]
      rintro (_ | _ | _) <;> 

Proof state:
case w.some.left
C : Type u_1
inst✝ : Category.{?u.239998, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
⊢ (limit.cone (cospan f.base g.base)).π.app (some WalkingPair.left) =
    ((forget C).mapCone (pullbackConeOfLeft f g)).π.app (some WalkingPair.left) ≫
      (diagramIsoCospan (cospan f g ⋙ forget C)).hom.app (some WalkingPair.left)

Next tactic:
symm