l3lab/ntp-mathlib huggingface dataset:
/-- (Implementation.) The projection map when constructing the pullback along an open immersion.
-/
def pullbackConeOfLeftFst :
    Y.restrict (TopCat.snd_openEmbedding_of_left_openEmbedding hf.base_open g.base) ⟶ X where
  base := pullback.fst
  c :=
    { app := fun U =>
        hf.invApp (unop U) ≫
          g.c.app (op (hf.base_open.isOpenMap.functor.obj (unop U))) ≫
            Y.presheaf.map
              (eqToHom
                (by
                  simp only [IsOpenMap.functor, Subtype.mk_eq_mk, unop_op, op_inj_iff, Opens.map,
                    Subtype.coe_mk, Functor.op_obj]
                  apply LE.le.antisymm
                  · rintro _ ⟨_, h₁, h₂⟩
                    use (TopCat.pullbackIsoProdSubtype _ _).inv ⟨⟨_, _⟩, h₂⟩
                    -- Porting note : need a slight hand holding
                    change _ ∈ _ ⁻¹' _ ∧ _
                    

Proof state:
case h
C : Type u_1
inst✝ : Category.{?u.91544, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
U : (Opens ↑↑X)ᵒᵖ
a✝ : ↑↑Y
w✝ : (CategoryTheory.forget TopCat).obj ↑X
h₁ : w✝ ∈ ↑U.unop
h₂ : f.base w✝ = g.base a✝
⊢ (TopCat.pullbackIsoProdSubtype f.base g.base).inv { val := (w✝, a✝), property := h₂ } ∈
      (fun x => x) ⁻¹'
        { carrier := ⇑pullback.fst ⁻¹' ↑U.unop, is_open' := (_ : IsOpen (⇑pullback.fst ⁻¹' ↑U.unop)) }.carrier ∧
    pullback.snd ((TopCat.pullbackIsoProdSubtype f.base g.base).inv { val := (w✝, a✝), property := h₂ }) = a✝

Next tactic:
simpa using h₁
/-- (Implementation.) The projection map when constructing the pullback along an open immersion.
-/
def pullbackConeOfLeftFst :
    Y.restrict (TopCat.snd_openEmbedding_of_left_openEmbedding hf.base_open g.base) ⟶ X where
  base := pullback.fst
  c :=
    { app := fun U =>
        hf.invApp (unop U) ≫
          g.c.app (op (hf.base_open.isOpenMap.functor.obj (unop U))) ≫
            Y.presheaf.map
              (eqToHom
                (by
                  simp only [IsOpenMap.functor, Subtype.mk_eq_mk, unop_op, op_inj_iff, Opens.map,
                    Subtype.coe_mk, Functor.op_obj]
                  apply LE.le.antisymm
                  · rintro _ ⟨_, h₁, h₂⟩
                    use (TopCat.pullbackIsoProdSubtype _ _).inv ⟨⟨_, _⟩, h₂⟩
                    -- Porting note : need a slight hand holding
                    change _ ∈ _ ⁻¹' _ ∧ _
                    simpa using h₁
                  · 

Proof state:
case a
C : Type u_1
inst✝ : Category.{?u.91544, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
U : (Opens ↑↑X)ᵒᵖ
⊢ {
      carrier :=
        ⇑pullback.snd ''
          ↑{ carrier := ⇑pullback.fst ⁻¹' ↑U.unop, is_open' := (_ : IsOpen (⇑pullback.fst ⁻¹' ↑U.unop)) },
      is_open' :=
        (_ :
          IsOpen
            (⇑pullback.snd ''
              ↑{ carrier := ⇑pullback.fst ⁻¹' ↑U.unop, is_open' := (_ : IsOpen (⇑pullback.fst ⁻¹' ↑U.unop)) })) } ≤
    { carrier := ⇑g.base ⁻¹' ↑{ carrier := ⇑f.base '' ↑U.unop, is_open' := (_ : IsOpen (⇑f.base '' ↑U.unop)) },
      is_open' :=
        (_ : IsOpen (⇑g.base ⁻¹' ↑{ carrier := ⇑f.base '' ↑U.unop, is_open' := (_ : IsOpen (⇑f.base '' ↑U.unop)) })) }

Next tactic:
rintro _ ⟨x, h₁, rfl⟩
/-- (Implementation.) The projection map when constructing the pullback along an open immersion.
-/
def pullbackConeOfLeftFst :
    Y.restrict (TopCat.snd_openEmbedding_of_left_openEmbedding hf.base_open g.base) ⟶ X where
  base := pullback.fst
  c :=
    { app := fun U =>
        hf.invApp (unop U) ≫
          g.c.app (op (hf.base_open.isOpenMap.functor.obj (unop U))) ≫
            Y.presheaf.map
              (eqToHom
                (by
                  simp only [IsOpenMap.functor, Subtype.mk_eq_mk, unop_op, op_inj_iff, Opens.map,
                    Subtype.coe_mk, Functor.op_obj]
                  apply LE.le.antisymm
                  · rintro _ ⟨_, h₁, h₂⟩
                    use (TopCat.pullbackIsoProdSubtype _ _).inv ⟨⟨_, _⟩, h₂⟩
                    -- Porting note : need a slight hand holding
                    change _ ∈ _ ⁻¹' _ ∧ _
                    simpa using h₁
                  · rintro _ ⟨x, h₁, rfl⟩
                    

Proof state:
case a.intro.intro
C : Type u_1
inst✝ : Category.{?u.91544, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
U : (Opens ↑↑X)ᵒᵖ
x : (CategoryTheory.forget TopCat).obj (pullback f.base g.base)
h₁ : x ∈ ↑{ carrier := ⇑pullback.fst ⁻¹' ↑U.unop, is_open' := (_ : IsOpen (⇑pullback.fst ⁻¹' ↑U.unop)) }
⊢ pullback.snd x ∈
    ↑{ carrier := ⇑g.base ⁻¹' ↑{ carrier := ⇑f.base '' ↑U.unop, is_open' := (_ : IsOpen (⇑f.base '' ↑U.unop)) },
        is_open' :=
          (_ : IsOpen (⇑g.base ⁻¹' ↑{ carrier := ⇑f.base '' ↑U.unop, is_open' := (_ : IsOpen (⇑f.base '' ↑U.unop)) })) }

Next tactic:
exact ⟨_, h₁, ConcreteCategory.congr_hom pullback.condition x⟩
/-- (Implementation.) The projection map when constructing the pullback along an open immersion.
-/
def pullbackConeOfLeftFst :
    Y.restrict (TopCat.snd_openEmbedding_of_left_openEmbedding hf.base_open g.base) ⟶ X where
  base := pullback.fst
  c :=
    { app := fun U =>
        hf.invApp (unop U) ≫
          g.c.app (op (hf.base_open.isOpenMap.functor.obj (unop U))) ≫
            Y.presheaf.map
              (eqToHom
                (by
                  simp only [IsOpenMap.functor, Subtype.mk_eq_mk, unop_op, op_inj_iff, Opens.map,
                    Subtype.coe_mk, Functor.op_obj]
                  apply LE.le.antisymm
                  · rintro _ ⟨_, h₁, h₂⟩
                    use (TopCat.pullbackIsoProdSubtype _ _).inv ⟨⟨_, _⟩, h₂⟩
                    -- Porting note : need a slight hand holding
                    change _ ∈ _ ⁻¹' _ ∧ _
                    simpa using h₁
                  · rintro _ ⟨x, h₁, rfl⟩
                    exact ⟨_, h₁, ConcreteCategory.congr_hom pullback.condition x⟩))
      naturality := by
        

Proof state:
C : Type u_1
inst✝ : Category.{?u.91544, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
⊢ ∀ ⦃X_1 Y_1 : (Opens ↑↑X)ᵒᵖ⦄ (f_1 : X_1 ⟶ Y_1),
    X.presheaf.map f_1 ≫
        (fun U =>
            invApp hf U.unop ≫
              g.c.app (op ((IsOpenMap.functor (_ : IsOpenMap ⇑f.base)).obj U.unop)) ≫
                Y.presheaf.map
                  (eqToHom
                    (_ :
                      (Opens.map g.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ⇑f.base)).obj U.unop)) =
                        (IsOpenMap.functor (_ : IsOpenMap ⇑pullback.snd)).op.obj ((Opens.map pullback.fst).op.obj U))))
          Y_1 =
      (fun U =>
            invApp hf U.unop ≫
              g.c.app (op ((IsOpenMap.functor (_ : IsOpenMap ⇑f.base)).obj U.unop)) ≫
                Y.presheaf.map
                  (eqToHom
                    (_ :
                      (Opens.map g.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ⇑f.base)).obj U.unop)) =
                        (IsOpenMap.functor (_ : IsOpenMap ⇑pullback.snd)).op.obj ((Opens.map pullback.fst).op.obj U))))
          X_1 ≫
        (pullback.fst _* (restrict Y (_ : OpenEmbedding ⇑pullback.snd)).presheaf).map f_1

Next tactic:
intro U V i
/-- (Implementation.) The projection map when constructing the pullback along an open immersion.
-/
def pullbackConeOfLeftFst :
    Y.restrict (TopCat.snd_openEmbedding_of_left_openEmbedding hf.base_open g.base) ⟶ X where
  base := pullback.fst
  c :=
    { app := fun U =>
        hf.invApp (unop U) ≫
          g.c.app (op (hf.base_open.isOpenMap.functor.obj (unop U))) ≫
            Y.presheaf.map
              (eqToHom
                (by
                  simp only [IsOpenMap.functor, Subtype.mk_eq_mk, unop_op, op_inj_iff, Opens.map,
                    Subtype.coe_mk, Functor.op_obj]
                  apply LE.le.antisymm
                  · rintro _ ⟨_, h₁, h₂⟩
                    use (TopCat.pullbackIsoProdSubtype _ _).inv ⟨⟨_, _⟩, h₂⟩
                    -- Porting note : need a slight hand holding
                    change _ ∈ _ ⁻¹' _ ∧ _
                    simpa using h₁
                  · rintro _ ⟨x, h₁, rfl⟩
                    exact ⟨_, h₁, ConcreteCategory.congr_hom pullback.condition x⟩))
      naturality := by
        intro U V i
        

Proof state:
C : Type u_1
inst✝ : Category.{?u.91544, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
U V : (Opens ↑↑X)ᵒᵖ
i : U ⟶ V
⊢ X.presheaf.map i ≫
      (fun U =>
          invApp hf U.unop ≫
            g.c.app (op ((IsOpenMap.functor (_ : IsOpenMap ⇑f.base)).obj U.unop)) ≫
              Y.presheaf.map
                (eqToHom
                  (_ :
                    (Opens.map g.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ⇑f.base)).obj U.unop)) =
                      (IsOpenMap.functor (_ : IsOpenMap ⇑pullback.snd)).op.obj ((Opens.map pullback.fst).op.obj U))))
        V =
    (fun U =>
          invApp hf U.unop ≫
            g.c.app (op ((IsOpenMap.functor (_ : IsOpenMap ⇑f.base)).obj U.unop)) ≫
              Y.presheaf.map
                (eqToHom
                  (_ :
                    (Opens.map g.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ⇑f.base)).obj U.unop)) =
                      (IsOpenMap.functor (_ : IsOpenMap ⇑pullback.snd)).op.obj ((Opens.map pullback.fst).op.obj U))))
        U ≫
      (pullback.fst _* (restrict Y (_ : OpenEmbedding ⇑pullback.snd)).presheaf).map i

Next tactic:
induction U using Opposite.rec'
/-- (Implementation.) The projection map when constructing the pullback along an open immersion.
-/
def pullbackConeOfLeftFst :
    Y.restrict (TopCat.snd_openEmbedding_of_left_openEmbedding hf.base_open g.base) ⟶ X where
  base := pullback.fst
  c :=
    { app := fun U =>
        hf.invApp (unop U) ≫
          g.c.app (op (hf.base_open.isOpenMap.functor.obj (unop U))) ≫
            Y.presheaf.map
              (eqToHom
                (by
                  simp only [IsOpenMap.functor, Subtype.mk_eq_mk, unop_op, op_inj_iff, Opens.map,
                    Subtype.coe_mk, Functor.op_obj]
                  apply LE.le.antisymm
                  · rintro _ ⟨_, h₁, h₂⟩
                    use (TopCat.pullbackIsoProdSubtype _ _).inv ⟨⟨_, _⟩, h₂⟩
                    -- Porting note : need a slight hand holding
                    change _ ∈ _ ⁻¹' _ ∧ _
                    simpa using h₁
                  · rintro _ ⟨x, h₁, rfl⟩
                    exact ⟨_, h₁, ConcreteCategory.congr_hom pullback.condition x⟩))
      naturality := by
        intro U V i
        induction U using Opposite.rec'
        

Proof state:
case h
C : Type u_1
inst✝ : Category.{?u.91544, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
V : (Opens ↑↑X)ᵒᵖ
X✝ : Opens ↑↑X
i : op X✝ ⟶ V
⊢ X.presheaf.map i ≫
      (fun U =>
          invApp hf U.unop ≫
            g.c.app (op ((IsOpenMap.functor (_ : IsOpenMap ⇑f.base)).obj U.unop)) ≫
              Y.presheaf.map
                (eqToHom
                  (_ :
                    (Opens.map g.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ⇑f.base)).obj U.unop)) =
                      (IsOpenMap.functor (_ : IsOpenMap ⇑pullback.snd)).op.obj ((Opens.map pullback.fst).op.obj U))))
        V =
    (fun U =>
          invApp hf U.unop ≫
            g.c.app (op ((IsOpenMap.functor (_ : IsOpenMap ⇑f.base)).obj U.unop)) ≫
              Y.presheaf.map
                (eqToHom
                  (_ :
                    (Opens.map g.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ⇑f.base)).obj U.unop)) =
                      (IsOpenMap.functor (_ : IsOpenMap ⇑pullback.snd)).op.obj ((Opens.map pullback.fst).op.obj U))))
        (op X✝) ≫
      (pullback.fst _* (restrict Y (_ : OpenEmbedding ⇑pullback.snd)).presheaf).map i

Next tactic:
induction V using Opposite.rec'
/-- (Implementation.) The projection map when constructing the pullback along an open immersion.
-/
def pullbackConeOfLeftFst :
    Y.restrict (TopCat.snd_openEmbedding_of_left_openEmbedding hf.base_open g.base) ⟶ X where
  base := pullback.fst
  c :=
    { app := fun U =>
        hf.invApp (unop U) ≫
          g.c.app (op (hf.base_open.isOpenMap.functor.obj (unop U))) ≫
            Y.presheaf.map
              (eqToHom
                (by
                  simp only [IsOpenMap.functor, Subtype.mk_eq_mk, unop_op, op_inj_iff, Opens.map,
                    Subtype.coe_mk, Functor.op_obj]
                  apply LE.le.antisymm
                  · rintro _ ⟨_, h₁, h₂⟩
                    use (TopCat.pullbackIsoProdSubtype _ _).inv ⟨⟨_, _⟩, h₂⟩
                    -- Porting note : need a slight hand holding
                    change _ ∈ _ ⁻¹' _ ∧ _
                    simpa using h₁
                  · rintro _ ⟨x, h₁, rfl⟩
                    exact ⟨_, h₁, ConcreteCategory.congr_hom pullback.condition x⟩))
      naturality := by
        intro U V i
        induction U using Opposite.rec'
        induction V using Opposite.rec'
        

Proof state:
case h.h
C : Type u_1
inst✝ : Category.{?u.91544, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
X✝¹ X✝ : Opens ↑↑X
i : op X✝¹ ⟶ op X✝
⊢ X.presheaf.map i ≫
      (fun U =>
          invApp hf U.unop ≫
            g.c.app (op ((IsOpenMap.functor (_ : IsOpenMap ⇑f.base)).obj U.unop)) ≫
              Y.presheaf.map
                (eqToHom
                  (_ :
                    (Opens.map g.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ⇑f.base)).obj U.unop)) =
                      (IsOpenMap.functor (_ : IsOpenMap ⇑pullback.snd)).op.obj ((Opens.map pullback.fst).op.obj U))))
        (op X✝) =
    (fun U =>
          invApp hf U.unop ≫
            g.c.app (op ((IsOpenMap.functor (_ : IsOpenMap ⇑f.base)).obj U.unop)) ≫
              Y.presheaf.map
                (eqToHom
                  (_ :
                    (Opens.map g.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ⇑f.base)).obj U.unop)) =
                      (IsOpenMap.functor (_ : IsOpenMap ⇑pullback.snd)).op.obj ((Opens.map pullback.fst).op.obj U))))
        (op X✝¹) ≫
      (pullback.fst _* (restrict Y (_ : OpenEmbedding ⇑pullback.snd)).presheaf).map i

Next tactic:
simp only [Quiver.Hom.unop_op, Category.assoc, Functor.op_map, inv_naturality_assoc]
/-- (Implementation.) The projection map when constructing the pullback along an open immersion.
-/
def pullbackConeOfLeftFst :
    Y.restrict (TopCat.snd_openEmbedding_of_left_openEmbedding hf.base_open g.base) ⟶ X where
  base := pullback.fst
  c :=
    { app := fun U =>
        hf.invApp (unop U) ≫
          g.c.app (op (hf.base_open.isOpenMap.functor.obj (unop U))) ≫
            Y.presheaf.map
              (eqToHom
                (by
                  simp only [IsOpenMap.functor, Subtype.mk_eq_mk, unop_op, op_inj_iff, Opens.map,
                    Subtype.coe_mk, Functor.op_obj]
                  apply LE.le.antisymm
                  · rintro _ ⟨_, h₁, h₂⟩
                    use (TopCat.pullbackIsoProdSubtype _ _).inv ⟨⟨_, _⟩, h₂⟩
                    -- Porting note : need a slight hand holding
                    change _ ∈ _ ⁻¹' _ ∧ _
                    simpa using h₁
                  · rintro _ ⟨x, h₁, rfl⟩
                    exact ⟨_, h₁, ConcreteCategory.congr_hom pullback.condition x⟩))
      naturality := by
        intro U V i
        induction U using Opposite.rec'
        induction V using Opposite.rec'
        simp only [Quiver.Hom.unop_op, Category.assoc, Functor.op_map, inv_naturality_assoc]
        -- Porting note : the following lemmas are not picked up by `simp`
        -- See https://github.com/leanprover-community/mathlib4/issues/5026
        

Proof state:
case h.h
C : Type u_1
inst✝ : Category.{?u.91544, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
X✝¹ X✝ : Opens ↑↑X
i : op X✝¹ ⟶ op X✝
⊢ invApp hf (op X✝¹).unop ≫
      Z.presheaf.map ((openFunctor hf).map i.unop).op ≫
        g.c.app (op ((IsOpenMap.functor (_ : IsOpenMap ⇑f.base)).obj (op X✝).unop)) ≫
          Y.presheaf.map
            (eqToHom
              (_ :
                (Opens.map g.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ⇑f.base)).obj (op X✝).unop)) =
                  (IsOpenMap.functor (_ : IsOpenMap ⇑pullback.snd)).op.obj ((Opens.map pullback.fst).op.obj (op X✝)))) =
    invApp hf (op X✝¹).unop ≫
      g.c.app (op ((IsOpenMap.functor (_ : IsOpenMap ⇑f.base)).obj (op X✝¹).unop)) ≫
        Y.presheaf.map
            (eqToHom
              (_ :
                (Opens.map g.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ⇑f.base)).obj (op X✝¹).unop)) =
                  (IsOpenMap.functor (_ : IsOpenMap ⇑pullback.snd)).op.obj
                    ((Opens.map pullback.fst).op.obj (op X✝¹)))) ≫
          (pullback.fst _* (restrict Y (_ : OpenEmbedding ⇑pullback.snd)).presheaf).map i

Next tactic:
erw [g.c.naturality_assoc, TopCat.Presheaf.pushforwardObj_map, ← Y.presheaf.map_comp,
          ← Y.presheaf.map_comp]
/-- (Implementation.) The projection map when constructing the pullback along an open immersion.
-/
def pullbackConeOfLeftFst :
    Y.restrict (TopCat.snd_openEmbedding_of_left_openEmbedding hf.base_open g.base) ⟶ X where
  base := pullback.fst
  c :=
    { app := fun U =>
        hf.invApp (unop U) ≫
          g.c.app (op (hf.base_open.isOpenMap.functor.obj (unop U))) ≫
            Y.presheaf.map
              (eqToHom
                (by
                  simp only [IsOpenMap.functor, Subtype.mk_eq_mk, unop_op, op_inj_iff, Opens.map,
                    Subtype.coe_mk, Functor.op_obj]
                  apply LE.le.antisymm
                  · rintro _ ⟨_, h₁, h₂⟩
                    use (TopCat.pullbackIsoProdSubtype _ _).inv ⟨⟨_, _⟩, h₂⟩
                    -- Porting note : need a slight hand holding
                    change _ ∈ _ ⁻¹' _ ∧ _
                    simpa using h₁
                  · rintro _ ⟨x, h₁, rfl⟩
                    exact ⟨_, h₁, ConcreteCategory.congr_hom pullback.condition x⟩))
      naturality := by
        intro U V i
        induction U using Opposite.rec'
        induction V using Opposite.rec'
        simp only [Quiver.Hom.unop_op, Category.assoc, Functor.op_map, inv_naturality_assoc]
        -- Porting note : the following lemmas are not picked up by `simp`
        -- See https://github.com/leanprover-community/mathlib4/issues/5026
        erw [g.c.naturality_assoc, TopCat.Presheaf.pushforwardObj_map, ← Y.presheaf.map_comp,
          ← Y.presheaf.map_comp]
        

Proof state:
case h.h
C : Type u_1
inst✝ : Category.{?u.91544, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
X✝¹ X✝ : Opens ↑↑X
i : op X✝¹ ⟶ op X✝
⊢ invApp hf (op X✝¹).unop ≫
      g.c.app (op ((openFunctor hf).obj (op X✝¹).unop)) ≫
        Y.presheaf.map
          ((Opens.map g.base).op.map ((openFunctor hf).map i.unop).op ≫
            eqToHom
              (_ :
                (Opens.map g.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ⇑f.base)).obj (op X✝).unop)) =
                  (IsOpenMap.functor (_ : IsOpenMap ⇑pullback.snd)).op.obj ((Opens.map pullback.fst).op.obj (op X✝)))) =
    invApp hf (op X✝¹).unop ≫
      g.c.app (op ((IsOpenMap.functor (_ : IsOpenMap ⇑f.base)).obj (op X✝¹).unop)) ≫
        Y.presheaf.map
          (eqToHom
              (_ :
                (Opens.map g.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ⇑f.base)).obj (op X✝¹).unop)) =
                  (IsOpenMap.functor (_ : IsOpenMap ⇑pullback.snd)).op.obj ((Opens.map pullback.fst).op.obj (op X✝¹))) ≫
            (IsOpenMap.functor (_ : IsOpenMap ⇑pullback.snd)).op.map ((Opens.map pullback.fst).op.map i))

Next tactic:
congr 1
theorem pullback_cone_of_left_condition : pullbackConeOfLeftFst f g ≫ f = Y.ofRestrict _ ≫ g := by
  -- Porting note : `ext` did not pick up `NatTrans.ext`
  

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
⊢ pullbackConeOfLeftFst f g ≫ f = PresheafedSpace.ofRestrict Y (_ : OpenEmbedding ⇑pullback.snd) ≫ g

Next tactic:
refine PresheafedSpace.Hom.ext _ _ ?_ <| NatTrans.ext _ _ <| funext fun U => ?_
theorem pullback_cone_of_left_condition : pullbackConeOfLeftFst f g ≫ f = Y.ofRestrict _ ≫ g := by
  -- Porting note : `ext` did not pick up `NatTrans.ext`
  refine PresheafedSpace.Hom.ext _ _ ?_ <| NatTrans.ext _ _ <| funext fun U => ?_
  · 

Proof state:
case refine_1
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
⊢ (pullbackConeOfLeftFst f g ≫ f).base = (PresheafedSpace.ofRestrict Y (_ : OpenEmbedding ⇑pullback.snd) ≫ g).base

Next tactic:
simpa using pullback.condition
theorem pullback_cone_of_left_condition : pullbackConeOfLeftFst f g ≫ f = Y.ofRestrict _ ≫ g := by
  -- Porting note : `ext` did not pick up `NatTrans.ext`
  refine PresheafedSpace.Hom.ext _ _ ?_ <| NatTrans.ext _ _ <| funext fun U => ?_
  · simpa using pullback.condition
  · 

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
U : (Opens ↑↑Z)ᵒᵖ
⊢ ((pullbackConeOfLeftFst f g ≫ f).c ≫
          whiskerRight
            (eqToHom
              (_ :
                (Opens.map (pullbackConeOfLeftFst f g ≫ f).base).op =
                  (Opens.map (PresheafedSpace.ofRestrict Y (_ : OpenEmbedding ⇑pullback.snd) ≫ g).base).op))
            (restrict Y (_ : OpenEmbedding ⇑pullback.snd)).presheaf).app
      U =
    (PresheafedSpace.ofRestrict Y (_ : OpenEmbedding ⇑pullback.snd) ≫ g).c.app U

Next tactic:
induction U using Opposite.rec'
theorem pullback_cone_of_left_condition : pullbackConeOfLeftFst f g ≫ f = Y.ofRestrict _ ≫ g := by
  -- Porting note : `ext` did not pick up `NatTrans.ext`
  refine PresheafedSpace.Hom.ext _ _ ?_ <| NatTrans.ext _ _ <| funext fun U => ?_
  · simpa using pullback.condition
  · induction U using Opposite.rec'
    -- Porting note : `NatTrans.comp_app` is not picked up by `dsimp`
    -- Perhaps see : https://github.com/leanprover-community/mathlib4/issues/5026
    

Proof state:
case refine_2.h
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
X✝ : Opens ↑↑Z
⊢ ((pullbackConeOfLeftFst f g ≫ f).c ≫
          whiskerRight
            (eqToHom
              (_ :
                (Opens.map (pullbackConeOfLeftFst f g ≫ f).base).op =
                  (Opens.map (PresheafedSpace.ofRestrict Y (_ : OpenEmbedding ⇑pullback.snd) ≫ g).base).op))
            (restrict Y (_ : OpenEmbedding ⇑pullback.snd)).presheaf).app
      (op X✝) =
    (PresheafedSpace.ofRestrict Y (_ : OpenEmbedding ⇑pullback.snd) ≫ g).c.app (op X✝)

Next tactic:
rw [NatTrans.comp_app]
theorem pullback_cone_of_left_condition : pullbackConeOfLeftFst f g ≫ f = Y.ofRestrict _ ≫ g := by
  -- Porting note : `ext` did not pick up `NatTrans.ext`
  refine PresheafedSpace.Hom.ext _ _ ?_ <| NatTrans.ext _ _ <| funext fun U => ?_
  · simpa using pullback.condition
  · induction U using Opposite.rec'
    -- Porting note : `NatTrans.comp_app` is not picked up by `dsimp`
    -- Perhaps see : https://github.com/leanprover-community/mathlib4/issues/5026
    rw [NatTrans.comp_app]
    

Proof state:
case refine_2.h
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
X✝ : Opens ↑↑Z
⊢ (pullbackConeOfLeftFst f g ≫ f).c.app (op X✝) ≫
      (whiskerRight
            (eqToHom
              (_ :
                (Opens.map (pullbackConeOfLeftFst f g ≫ f).base).op =
                  (Opens.map (PresheafedSpace.ofRestrict Y (_ : OpenEmbedding ⇑pullback.snd) ≫ g).base).op))
            (restrict Y (_ : OpenEmbedding ⇑pullback.snd)).presheaf).app
        (op X✝) =
    (PresheafedSpace.ofRestrict Y (_ : OpenEmbedding ⇑pullback.snd) ≫ g).c.app (op X✝)

Next tactic:
dsimp only [comp_c_app, unop_op, whiskerRight_app, pullbackConeOfLeftFst]