[GOAL]
C : Type u_1
inst✝ : Category.{?u.9177, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
⊢ (Iso.refl ↑X).hom _* X.presheaf ≅ (restrict Y (_ : OpenEmbedding ↑f.base)).presheaf
[PROOFSTEP]
symm
[GOAL]
C : Type u_1
inst✝ : Category.{?u.9177, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
⊢ (restrict Y (_ : OpenEmbedding ↑f.base)).presheaf ≅ (Iso.refl ↑X).hom _* X.presheaf
[PROOFSTEP]
fapply NatIso.ofComponents
[GOAL]
case app
C : Type u_1
inst✝ : Category.{?u.9177, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
⊢ (X_1 : (Opens ↑↑(restrict Y (_ : OpenEmbedding ↑f.base)))ᵒᵖ) →
    (restrict Y (_ : OpenEmbedding ↑f.base)).presheaf.obj X_1 ≅ ((Iso.refl ↑X).hom _* X.presheaf).obj X_1
[PROOFSTEP]
intro U
[GOAL]
case app
C : Type u_1
inst✝ : Category.{?u.9177, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : (Opens ↑↑(restrict Y (_ : OpenEmbedding ↑f.base)))ᵒᵖ
⊢ (restrict Y (_ : OpenEmbedding ↑f.base)).presheaf.obj U ≅ ((Iso.refl ↑X).hom _* X.presheaf).obj U
[PROOFSTEP]
refine' asIso (f.c.app (op (H.openFunctor.obj (unop U)))) ≪≫ X.presheaf.mapIso (eqToIso _)
[GOAL]
case app
C : Type u_1
inst✝ : Category.{?u.9177, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : (Opens ↑↑(restrict Y (_ : OpenEmbedding ↑f.base)))ᵒᵖ
⊢ (Opens.map f.base).op.obj (op ((openFunctor H).obj U.unop)) = U
[PROOFSTEP]
induction U using Opposite.rec' with
| h U => ?_
[GOAL]
case app
C : Type u_1
inst✝ : Category.{?u.9177, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : (Opens ↑↑(restrict Y (_ : OpenEmbedding ↑f.base)))ᵒᵖ
⊢ (Opens.map f.base).op.obj (op ((openFunctor H).obj U.unop)) = U
[PROOFSTEP]
induction U using Opposite.rec' with
| h U => ?_
[GOAL]
case app.h
C : Type u_1
inst✝ : Category.{?u.9177, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑(restrict Y (_ : OpenEmbedding ↑f.base))
⊢ (Opens.map f.base).op.obj (op ((openFunctor H).obj (op U).unop)) = op U
[PROOFSTEP]
cases U
[GOAL]
case app.h.mk
C : Type u_1
inst✝ : Category.{?u.9177, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
carrier✝ : Set ↑↑(restrict Y (_ : OpenEmbedding ↑f.base))
is_open'✝ : IsOpen carrier✝
⊢ (Opens.map f.base).op.obj (op ((openFunctor H).obj (op { carrier := carrier✝, is_open' := is_open'✝ }).unop)) =
    op { carrier := carrier✝, is_open' := is_open'✝ }
[PROOFSTEP]
dsimp only [IsOpenMap.functor, Functor.op, Opens.map]
[GOAL]
case app.h.mk
C : Type u_1
inst✝ : Category.{?u.9177, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
carrier✝ : Set ↑↑(restrict Y (_ : OpenEmbedding ↑f.base))
is_open'✝ : IsOpen carrier✝
⊢ op
      {
        carrier :=
          ↑f.base ⁻¹' ↑(op ((openFunctor H).obj (op { carrier := carrier✝, is_open' := is_open'✝ }).unop)).unop,
        is_open' :=
          (_ :
            IsOpen
              (↑f.base ⁻¹'
                ↑(op ((openFunctor H).obj (op { carrier := carrier✝, is_open' := is_open'✝ }).unop)).unop)) } =
    op { carrier := carrier✝, is_open' := is_open'✝ }
[PROOFSTEP]
congr 2
[GOAL]
case app.h.mk.e_x.e_carrier
C : Type u_1
inst✝ : Category.{?u.9177, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
carrier✝ : Set ↑↑(restrict Y (_ : OpenEmbedding ↑f.base))
is_open'✝ : IsOpen carrier✝
⊢ ↑f.base ⁻¹' ↑(op ((openFunctor H).obj (op { carrier := carrier✝, is_open' := is_open'✝ }).unop)).unop = carrier✝
[PROOFSTEP]
erw [Set.preimage_image_eq _ H.base_open.inj]
[GOAL]
case app.h.mk.e_x.e_carrier
C : Type u_1
inst✝ : Category.{?u.9177, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
carrier✝ : Set ↑↑(restrict Y (_ : OpenEmbedding ↑f.base))
is_open'✝ : IsOpen carrier✝
⊢ ↑(op { carrier := carrier✝, is_open' := is_open'✝ }).unop = carrier✝
[PROOFSTEP]
rfl
[GOAL]
case naturality
C : Type u_1
inst✝ : Category.{?u.9177, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
⊢ autoParam
    (∀ {X_1 Y_1 : (Opens ↑↑(restrict Y (_ : OpenEmbedding ↑f.base)))ᵒᵖ} (f_1 : X_1 ⟶ Y_1),
      (restrict Y (_ : OpenEmbedding ↑f.base)).presheaf.map f_1 ≫
          (asIso (NatTrans.app f.c (op ((openFunctor H).obj Y_1.unop))) ≪≫
              X.presheaf.mapIso
                (eqToIso (_ : (Opens.map f.base).op.obj (op ((openFunctor H).obj Y_1.unop)) = Y_1))).hom =
        (asIso (NatTrans.app f.c (op ((openFunctor H).obj X_1.unop))) ≪≫
              X.presheaf.mapIso
                (eqToIso (_ : (Opens.map f.base).op.obj (op ((openFunctor H).obj X_1.unop)) = X_1))).hom ≫
          ((Iso.refl ↑X).hom _* X.presheaf).map f_1)
    _auto✝
[PROOFSTEP]
intro U V i
[GOAL]
case naturality
C : Type u_1
inst✝ : Category.{?u.9177, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U V : (Opens ↑↑(restrict Y (_ : OpenEmbedding ↑f.base)))ᵒᵖ
i : U ⟶ V
⊢ (restrict Y (_ : OpenEmbedding ↑f.base)).presheaf.map i ≫
      (asIso (NatTrans.app f.c (op ((openFunctor H).obj V.unop))) ≪≫
          X.presheaf.mapIso (eqToIso (_ : (Opens.map f.base).op.obj (op ((openFunctor H).obj V.unop)) = V))).hom =
    (asIso (NatTrans.app f.c (op ((openFunctor H).obj U.unop))) ≪≫
          X.presheaf.mapIso (eqToIso (_ : (Opens.map f.base).op.obj (op ((openFunctor H).obj U.unop)) = U))).hom ≫
      ((Iso.refl ↑X).hom _* X.presheaf).map i
[PROOFSTEP]
simp only [CategoryTheory.eqToIso.hom, TopCat.Presheaf.pushforwardObj_map, Category.assoc, Functor.op_map,
  Iso.trans_hom, asIso_hom, Functor.mapIso_hom, ← X.presheaf.map_comp]
[GOAL]
case naturality
C : Type u_1
inst✝ : Category.{?u.9177, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U V : (Opens ↑↑(restrict Y (_ : OpenEmbedding ↑f.base)))ᵒᵖ
i : U ⟶ V
⊢ (restrict Y (_ : OpenEmbedding ↑f.base)).presheaf.map i ≫
      NatTrans.app f.c (op ((openFunctor H).obj V.unop)) ≫
        X.presheaf.map (eqToHom (_ : (Opens.map f.base).op.obj (op ((openFunctor H).obj V.unop)) = V)) =
    NatTrans.app f.c (op ((openFunctor H).obj U.unop)) ≫
      X.presheaf.map
        (eqToHom (_ : (Opens.map f.base).op.obj (op ((openFunctor H).obj U.unop)) = U) ≫
          ((Opens.map (Iso.refl ↑X).hom).map i.unop).op)
[PROOFSTEP]
erw [f.c.naturality_assoc, ← X.presheaf.map_comp]
[GOAL]
case naturality
C : Type u_1
inst✝ : Category.{?u.9177, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U V : (Opens ↑↑(restrict Y (_ : OpenEmbedding ↑f.base)))ᵒᵖ
i : U ⟶ V
⊢ NatTrans.app f.c ((IsOpenMap.functor (_ : IsOpenMap ↑f.base)).op.obj U) ≫
      X.presheaf.map
        ((Opens.map f.base).op.map ((IsOpenMap.functor (_ : IsOpenMap ↑f.base)).op.map i) ≫
          eqToHom (_ : (Opens.map f.base).op.obj (op ((openFunctor H).obj V.unop)) = V)) =
    NatTrans.app f.c (op ((openFunctor H).obj U.unop)) ≫
      X.presheaf.map
        (eqToHom (_ : (Opens.map f.base).op.obj (op ((openFunctor H).obj U.unop)) = U) ≫
          ((Opens.map (Iso.refl ↑X).hom).map i.unop).op)
[PROOFSTEP]
congr 1
[GOAL]
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
⊢ (isoRestrict H).hom ≫ ofRestrict Y (_ : OpenEmbedding ↑f.base) = f
[PROOFSTEP]
refine PresheafedSpace.Hom.ext _ _ rfl <| NatTrans.ext _ _ <| funext fun x => ?_
[GOAL]
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
x : (Opens ↑↑Y)ᵒᵖ
⊢ NatTrans.app
      (((isoRestrict H).hom ≫ ofRestrict Y (_ : OpenEmbedding ↑f.base)).c ≫
        whiskerRight
          (eqToHom
            (_ :
              (Opens.map ((isoRestrict H).hom ≫ ofRestrict Y (_ : OpenEmbedding ↑f.base)).base).op =
                (Opens.map f.base).op))
          X.presheaf)
      x =
    NatTrans.app f.c x
[PROOFSTEP]
simp only [isoRestrict_hom_c_app, NatTrans.comp_app, eqToHom_refl, ofRestrict_c_app, Category.assoc, whiskerRight_id']
[GOAL]
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
x : (Opens ↑↑Y)ᵒᵖ
⊢ NatTrans.app
      (((isoRestrict H).hom ≫ ofRestrict Y (_ : OpenEmbedding ↑f.base)).c ≫
        𝟙 ((Opens.map ((isoRestrict H).hom ≫ ofRestrict Y (_ : OpenEmbedding ↑f.base)).base).op ⋙ X.presheaf))
      x =
    NatTrans.app f.c x
[PROOFSTEP]
erw [Category.comp_id, comp_c_app, f.c.naturality_assoc, ← X.presheaf.map_comp]
[GOAL]
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
x : (Opens ↑↑Y)ᵒᵖ
⊢ NatTrans.app f.c x ≫
      X.presheaf.map
        ((Opens.map f.base).op.map (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑f.base)).counit x.unop).op ≫
          (eqToIso
              (_ :
                (Opens.map f.base).op.obj
                    (op
                      ((openFunctor H).obj
                        (op ((Opens.map (ofRestrict Y (_ : OpenEmbedding ↑f.base)).base).obj x.unop)).unop)) =
                  op ((Opens.map (ofRestrict Y (_ : OpenEmbedding ↑f.base)).base).obj x.unop))).hom) =
    NatTrans.app f.c x
[PROOFSTEP]
trans f.c.app x ≫ X.presheaf.map (𝟙 _)
[GOAL]
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
x : (Opens ↑↑Y)ᵒᵖ
⊢ NatTrans.app f.c x ≫
      X.presheaf.map
        ((Opens.map f.base).op.map (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑f.base)).counit x.unop).op ≫
          (eqToIso
              (_ :
                (Opens.map f.base).op.obj
                    (op
                      ((openFunctor H).obj
                        (op ((Opens.map (ofRestrict Y (_ : OpenEmbedding ↑f.base)).base).obj x.unop)).unop)) =
                  op ((Opens.map (ofRestrict Y (_ : OpenEmbedding ↑f.base)).base).obj x.unop))).hom) =
    NatTrans.app f.c x ≫ X.presheaf.map (𝟙 ((Opens.map f.base).op.obj x))
[PROOFSTEP]
congr 1
[GOAL]
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
x : (Opens ↑↑Y)ᵒᵖ
⊢ NatTrans.app f.c x ≫ X.presheaf.map (𝟙 ((Opens.map f.base).op.obj x)) = NatTrans.app f.c x
[PROOFSTEP]
erw [X.presheaf.map_id, Category.comp_id]
[GOAL]
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
⊢ (isoRestrict H).inv ≫ f = ofRestrict Y (_ : OpenEmbedding ↑f.base)
[PROOFSTEP]
rw [Iso.inv_comp_eq, isoRestrict_hom_ofRestrict]
[GOAL]
C : Type u_1
inst✝ : Category.{?u.19958, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H✝ H : IsOpenImmersion f
⊢ Mono f
[PROOFSTEP]
rw [← H.isoRestrict_hom_ofRestrict]
[GOAL]
C : Type u_1
inst✝ : Category.{?u.19958, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H✝ H : IsOpenImmersion f
⊢ Mono ((isoRestrict H).hom ≫ ofRestrict Y (_ : OpenEmbedding ↑f.base))
[PROOFSTEP]
apply mono_comp
[GOAL]
C : Type u_1
inst✝ : Category.{?u.20909, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
Z : PresheafedSpace C
f : X ⟶ Y
hf : IsOpenImmersion f
g : Y ⟶ Z
hg : IsOpenImmersion g
U : Opens ↑↑X
⊢ IsIso (NatTrans.app (f ≫ g).c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(f ≫ g).base)).obj U)))
[PROOFSTEP]
generalize_proofs h
[GOAL]
C : Type u_1
inst✝ : Category.{?u.20909, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
Z : PresheafedSpace C
f : X ⟶ Y
hf : IsOpenImmersion f
g : Y ⟶ Z
hg : IsOpenImmersion g
U : Opens ↑↑X
h : IsOpenMap ↑(f ≫ g).base
⊢ IsIso (NatTrans.app (f ≫ g).c (op ((IsOpenMap.functor h).obj U)))
[PROOFSTEP]
dsimp only [AlgebraicGeometry.PresheafedSpace.comp_c_app, unop_op, Functor.op, comp_base,
  TopCat.Presheaf.pushforwardObj_obj, Opens.map_comp_obj]
  -- Porting note : was `apply (config := { instances := False }) ...`
      -- See https://github.com/leanprover/lean4/issues/2273
[GOAL]
C : Type u_1
inst✝ : Category.{?u.20909, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
Z : PresheafedSpace C
f : X ⟶ Y
hf : IsOpenImmersion f
g : Y ⟶ Z
hg : IsOpenImmersion g
U : Opens ↑↑X
h : IsOpenMap ↑(f ≫ g).base
⊢ IsIso
    (NatTrans.app g.c (op ((IsOpenMap.functor h).obj U)) ≫
      NatTrans.app f.c (op ((Opens.map g.base).obj ((IsOpenMap.functor h).obj U))))
[PROOFSTEP]
have : IsIso (g.c.app (op <| (h.functor).obj U))
[GOAL]
case this
C : Type u_1
inst✝ : Category.{?u.20909, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
Z : PresheafedSpace C
f : X ⟶ Y
hf : IsOpenImmersion f
g : Y ⟶ Z
hg : IsOpenImmersion g
U : Opens ↑↑X
h : IsOpenMap ↑(f ≫ g).base
⊢ IsIso (NatTrans.app g.c (op ((IsOpenMap.functor h).obj U)))
[PROOFSTEP]
have : h.functor.obj U = hg.openFunctor.obj (hf.openFunctor.obj U) :=
  by
  ext1
  dsimp only [IsOpenMap.functor_obj_coe]
    -- Porting note : slightly more hand holding here: `g ∘ f` and `fun x => g (f x)`
  rw [comp_base, coe_comp, show g.base ∘ f.base = fun x => g.base (f.base x) from rfl, ← Set.image_image]
[GOAL]
C : Type u_1
inst✝ : Category.{?u.20909, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
Z : PresheafedSpace C
f : X ⟶ Y
hf : IsOpenImmersion f
g : Y ⟶ Z
hg : IsOpenImmersion g
U : Opens ↑↑X
h : IsOpenMap ↑(f ≫ g).base
⊢ (IsOpenMap.functor h).obj U = (openFunctor hg).obj ((openFunctor hf).obj U)
[PROOFSTEP]
ext1
[GOAL]
case h
C : Type u_1
inst✝ : Category.{?u.20909, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
Z : PresheafedSpace C
f : X ⟶ Y
hf : IsOpenImmersion f
g : Y ⟶ Z
hg : IsOpenImmersion g
U : Opens ↑↑X
h : IsOpenMap ↑(f ≫ g).base
⊢ ↑((IsOpenMap.functor h).obj U) = ↑((openFunctor hg).obj ((openFunctor hf).obj U))
[PROOFSTEP]
dsimp only [IsOpenMap.functor_obj_coe]
  -- Porting note : slightly more hand holding here: `g ∘ f` and `fun x => g (f x)`
[GOAL]
case h
C : Type u_1
inst✝ : Category.{?u.20909, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
Z : PresheafedSpace C
f : X ⟶ Y
hf : IsOpenImmersion f
g : Y ⟶ Z
hg : IsOpenImmersion g
U : Opens ↑↑X
h : IsOpenMap ↑(f ≫ g).base
⊢ ↑(f ≫ g).base '' ↑U = ↑g.base '' (↑f.base '' ↑U)
[PROOFSTEP]
rw [comp_base, coe_comp, show g.base ∘ f.base = fun x => g.base (f.base x) from rfl, ← Set.image_image]
[GOAL]
case this
C : Type u_1
inst✝ : Category.{?u.20909, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
Z : PresheafedSpace C
f : X ⟶ Y
hf : IsOpenImmersion f
g : Y ⟶ Z
hg : IsOpenImmersion g
U : Opens ↑↑X
h : IsOpenMap ↑(f ≫ g).base
this : (IsOpenMap.functor h).obj U = (openFunctor hg).obj ((openFunctor hf).obj U)
⊢ IsIso (NatTrans.app g.c (op ((IsOpenMap.functor h).obj U)))
[PROOFSTEP]
rw [this]
[GOAL]
case this
C : Type u_1
inst✝ : Category.{?u.20909, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
Z : PresheafedSpace C
f : X ⟶ Y
hf : IsOpenImmersion f
g : Y ⟶ Z
hg : IsOpenImmersion g
U : Opens ↑↑X
h : IsOpenMap ↑(f ≫ g).base
this : (IsOpenMap.functor h).obj U = (openFunctor hg).obj ((openFunctor hf).obj U)
⊢ IsIso (NatTrans.app g.c (op ((openFunctor hg).obj ((openFunctor hf).obj U))))
[PROOFSTEP]
infer_instance
[GOAL]
C : Type u_1
inst✝ : Category.{?u.20909, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
Z : PresheafedSpace C
f : X ⟶ Y
hf : IsOpenImmersion f
g : Y ⟶ Z
hg : IsOpenImmersion g
U : Opens ↑↑X
h : IsOpenMap ↑(f ≫ g).base
this : IsIso (NatTrans.app g.c (op ((IsOpenMap.functor h).obj U)))
⊢ IsIso
    (NatTrans.app g.c (op ((IsOpenMap.functor h).obj U)) ≫
      NatTrans.app f.c (op ((Opens.map g.base).obj ((IsOpenMap.functor h).obj U))))
[PROOFSTEP]
have : IsIso (f.c.app (op <| (Opens.map g.base).obj ((IsOpenMap.functor h).obj U)))
[GOAL]
case this
C : Type u_1
inst✝ : Category.{?u.20909, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
Z : PresheafedSpace C
f : X ⟶ Y
hf : IsOpenImmersion f
g : Y ⟶ Z
hg : IsOpenImmersion g
U : Opens ↑↑X
h : IsOpenMap ↑(f ≫ g).base
this : IsIso (NatTrans.app g.c (op ((IsOpenMap.functor h).obj U)))
⊢ IsIso (NatTrans.app f.c (op ((Opens.map g.base).obj ((IsOpenMap.functor h).obj U))))
[PROOFSTEP]
have : (Opens.map g.base).obj (h.functor.obj U) = hf.openFunctor.obj U :=
  by
  ext1
  dsimp only [Opens.map_coe, IsOpenMap.functor_obj_coe, comp_base]
    -- Porting note : slightly more hand holding here: `g ∘ f` and `fun x => g (f x)`
  rw [coe_comp, show g.base ∘ f.base = fun x => g.base (f.base x) from rfl, ← Set.image_image g.base f.base,
    Set.preimage_image_eq _ hg.base_open.inj]
[GOAL]
C : Type u_1
inst✝ : Category.{?u.20909, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
Z : PresheafedSpace C
f : X ⟶ Y
hf : IsOpenImmersion f
g : Y ⟶ Z
hg : IsOpenImmersion g
U : Opens ↑↑X
h : IsOpenMap ↑(f ≫ g).base
this : IsIso (NatTrans.app g.c (op ((IsOpenMap.functor h).obj U)))
⊢ (Opens.map g.base).obj ((IsOpenMap.functor h).obj U) = (openFunctor hf).obj U
[PROOFSTEP]
ext1
[GOAL]
case h
C : Type u_1
inst✝ : Category.{?u.20909, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
Z : PresheafedSpace C
f : X ⟶ Y
hf : IsOpenImmersion f
g : Y ⟶ Z
hg : IsOpenImmersion g
U : Opens ↑↑X
h : IsOpenMap ↑(f ≫ g).base
this : IsIso (NatTrans.app g.c (op ((IsOpenMap.functor h).obj U)))
⊢ ↑((Opens.map g.base).obj ((IsOpenMap.functor h).obj U)) = ↑((openFunctor hf).obj U)
[PROOFSTEP]
dsimp only [Opens.map_coe, IsOpenMap.functor_obj_coe, comp_base]
  -- Porting note : slightly more hand holding here: `g ∘ f` and `fun x => g (f x)`
[GOAL]
case h
C : Type u_1
inst✝ : Category.{?u.20909, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
Z : PresheafedSpace C
f : X ⟶ Y
hf : IsOpenImmersion f
g : Y ⟶ Z
hg : IsOpenImmersion g
U : Opens ↑↑X
h : IsOpenMap ↑(f ≫ g).base
this : IsIso (NatTrans.app g.c (op ((IsOpenMap.functor h).obj U)))
⊢ ↑g.base ⁻¹' (↑(f.base ≫ g.base) '' ↑U) = ↑f.base '' ↑U
[PROOFSTEP]
rw [coe_comp, show g.base ∘ f.base = fun x => g.base (f.base x) from rfl, ← Set.image_image g.base f.base,
  Set.preimage_image_eq _ hg.base_open.inj]
[GOAL]
case this
C : Type u_1
inst✝ : Category.{?u.20909, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
Z : PresheafedSpace C
f : X ⟶ Y
hf : IsOpenImmersion f
g : Y ⟶ Z
hg : IsOpenImmersion g
U : Opens ↑↑X
h : IsOpenMap ↑(f ≫ g).base
this✝ : IsIso (NatTrans.app g.c (op ((IsOpenMap.functor h).obj U)))
this : (Opens.map g.base).obj ((IsOpenMap.functor h).obj U) = (openFunctor hf).obj U
⊢ IsIso (NatTrans.app f.c (op ((Opens.map g.base).obj ((IsOpenMap.functor h).obj U))))
[PROOFSTEP]
rw [this]
[GOAL]
case this
C : Type u_1
inst✝ : Category.{?u.20909, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
Z : PresheafedSpace C
f : X ⟶ Y
hf : IsOpenImmersion f
g : Y ⟶ Z
hg : IsOpenImmersion g
U : Opens ↑↑X
h : IsOpenMap ↑(f ≫ g).base
this✝ : IsIso (NatTrans.app g.c (op ((IsOpenMap.functor h).obj U)))
this : (Opens.map g.base).obj ((IsOpenMap.functor h).obj U) = (openFunctor hf).obj U
⊢ IsIso (NatTrans.app f.c (op ((openFunctor hf).obj U)))
[PROOFSTEP]
infer_instance
[GOAL]
C : Type u_1
inst✝ : Category.{?u.20909, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
Z : PresheafedSpace C
f : X ⟶ Y
hf : IsOpenImmersion f
g : Y ⟶ Z
hg : IsOpenImmersion g
U : Opens ↑↑X
h : IsOpenMap ↑(f ≫ g).base
this✝ : IsIso (NatTrans.app g.c (op ((IsOpenMap.functor h).obj U)))
this : IsIso (NatTrans.app f.c (op ((Opens.map g.base).obj ((IsOpenMap.functor h).obj U))))
⊢ IsIso
    (NatTrans.app g.c (op ((IsOpenMap.functor h).obj U)) ≫
      NatTrans.app f.c (op ((Opens.map g.base).obj ((IsOpenMap.functor h).obj U))))
[PROOFSTEP]
apply IsIso.comp_isIso
[GOAL]
C : Type u_1
inst✝ : Category.{?u.27120, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X
⊢ op U = (Opens.map f.base).op.obj (op ((openFunctor H).obj U))
[PROOFSTEP]
congr
[GOAL]
case e_x
C : Type u_1
inst✝ : Category.{?u.27120, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X
⊢ U = (Opens.map f.base).obj (op ((openFunctor H).obj U)).unop
[PROOFSTEP]
ext
[GOAL]
case e_x.h.h
C : Type u_1
inst✝ : Category.{?u.27120, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X
x✝ : ↑↑X
⊢ x✝ ∈ ↑U ↔ x✝ ∈ ↑((Opens.map f.base).obj (op ((openFunctor H).obj U)).unop)
[PROOFSTEP]
dsimp [openFunctor, IsOpenMap.functor]
[GOAL]
case e_x.h.h
C : Type u_1
inst✝ : Category.{?u.27120, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X
x✝ : ↑↑X
⊢ x✝ ∈ ↑U ↔ x✝ ∈ ↑f.base ⁻¹' (↑f.base '' ↑U)
[PROOFSTEP]
rw [Set.preimage_image_eq _ H.base_open.inj]
[GOAL]
C : Type u_1
inst✝ : Category.{u_3, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U V : (Opens ↑↑X)ᵒᵖ
i : U ⟶ V
⊢ X.presheaf.map i ≫ invApp H V.unop = invApp H U.unop ≫ Y.presheaf.map ((openFunctor H).op.map i)
[PROOFSTEP]
simp only [invApp, ← Category.assoc]
[GOAL]
C : Type u_1
inst✝ : Category.{u_3, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U V : (Opens ↑↑X)ᵒᵖ
i : U ⟶ V
⊢ (X.presheaf.map i ≫
        X.presheaf.map (eqToHom (_ : op V.unop = op ((Opens.map f.base).obj (op ((openFunctor H).obj V.unop)).unop)))) ≫
      inv (NatTrans.app f.c (op ((openFunctor H).obj V.unop))) =
    (X.presheaf.map (eqToHom (_ : op U.unop = op ((Opens.map f.base).obj (op ((openFunctor H).obj U.unop)).unop))) ≫
        inv (NatTrans.app f.c (op ((openFunctor H).obj U.unop)))) ≫
      Y.presheaf.map ((openFunctor H).op.map i)
[PROOFSTEP]
rw [IsIso.comp_inv_eq]
  -- Porting note : `simp` can't pick up `f.c.naturality`
    -- See https://github.com/leanprover-community/mathlib4/issues/5026
[GOAL]
C : Type u_1
inst✝ : Category.{u_3, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U V : (Opens ↑↑X)ᵒᵖ
i : U ⟶ V
⊢ X.presheaf.map i ≫
      X.presheaf.map (eqToHom (_ : op V.unop = op ((Opens.map f.base).obj (op ((openFunctor H).obj V.unop)).unop))) =
    ((X.presheaf.map (eqToHom (_ : op U.unop = op ((Opens.map f.base).obj (op ((openFunctor H).obj U.unop)).unop))) ≫
          inv (NatTrans.app f.c (op ((openFunctor H).obj U.unop)))) ≫
        Y.presheaf.map ((openFunctor H).op.map i)) ≫
      NatTrans.app f.c (op ((openFunctor H).obj V.unop))
[PROOFSTEP]
simp only [Category.assoc, ← X.presheaf.map_comp]
[GOAL]
C : Type u_1
inst✝ : Category.{u_3, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U V : (Opens ↑↑X)ᵒᵖ
i : U ⟶ V
⊢ X.presheaf.map (i ≫ eqToHom (_ : op V.unop = op ((Opens.map f.base).obj (op ((openFunctor H).obj V.unop)).unop))) =
    X.presheaf.map (eqToHom (_ : op U.unop = op ((Opens.map f.base).obj (op ((openFunctor H).obj U.unop)).unop))) ≫
      inv (NatTrans.app f.c (op ((openFunctor H).obj U.unop))) ≫
        Y.presheaf.map ((openFunctor H).op.map i) ≫ NatTrans.app f.c (op ((openFunctor H).obj V.unop))
[PROOFSTEP]
erw [f.c.naturality]
[GOAL]
C : Type u_1
inst✝ : Category.{u_3, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U V : (Opens ↑↑X)ᵒᵖ
i : U ⟶ V
⊢ X.presheaf.map (i ≫ eqToHom (_ : op V.unop = op ((Opens.map f.base).obj (op ((openFunctor H).obj V.unop)).unop))) =
    X.presheaf.map (eqToHom (_ : op U.unop = op ((Opens.map f.base).obj (op ((openFunctor H).obj U.unop)).unop))) ≫
      inv (NatTrans.app f.c (op ((openFunctor H).obj U.unop))) ≫
        NatTrans.app f.c (op ((openFunctor H).obj U.unop)) ≫ (f.base _* X.presheaf).map ((openFunctor H).op.map i)
[PROOFSTEP]
simp only [IsIso.inv_hom_id_assoc, ← X.presheaf.map_comp]
[GOAL]
C : Type u_1
inst✝ : Category.{u_3, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U V : (Opens ↑↑X)ᵒᵖ
i : U ⟶ V
⊢ X.presheaf.map (i ≫ eqToHom (_ : op V.unop = op ((Opens.map f.base).obj (op ((openFunctor H).obj V.unop)).unop))) =
    X.presheaf.map (eqToHom (_ : op U.unop = op ((Opens.map f.base).obj (op ((openFunctor H).obj U.unop)).unop))) ≫
      (f.base _* X.presheaf).map ((openFunctor H).op.map i)
[PROOFSTEP]
erw [← X.presheaf.map_comp]
[GOAL]
C : Type u_1
inst✝ : Category.{u_3, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U V : (Opens ↑↑X)ᵒᵖ
i : U ⟶ V
⊢ X.presheaf.map (i ≫ eqToHom (_ : op V.unop = op ((Opens.map f.base).obj (op ((openFunctor H).obj V.unop)).unop))) =
    X.presheaf.map
      (eqToHom (_ : op U.unop = op ((Opens.map f.base).obj (op ((openFunctor H).obj U.unop)).unop)) ≫
        (Opens.map f.base).op.map ((openFunctor H).op.map i))
[PROOFSTEP]
congr 1
[GOAL]
C : Type u_1
inst✝ : Category.{?u.34429, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X
⊢ IsIso (invApp H U)
[PROOFSTEP]
delta invApp
[GOAL]
C : Type u_1
inst✝ : Category.{?u.34429, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X
⊢ IsIso
    (X.presheaf.map (eqToHom (_ : op U = op ((Opens.map f.base).obj (op ((openFunctor H).obj U)).unop))) ≫
      inv (NatTrans.app f.c (op ((openFunctor H).obj U))))
[PROOFSTEP]
infer_instance
[GOAL]
C : Type u_1
inst✝ : Category.{?u.35411, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X
⊢ (Opens.map f.base).op.obj (op ((openFunctor H).obj U)) = op U
[PROOFSTEP]
apply congr_arg (op ·)
[GOAL]
C : Type u_1
inst✝ : Category.{?u.35411, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X
⊢ (Opens.map f.base).obj (op ((openFunctor H).obj U)).unop = U
[PROOFSTEP]
ext
[GOAL]
case h.h
C : Type u_1
inst✝ : Category.{?u.35411, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X
x✝ : ↑↑X
⊢ x✝ ∈ ↑((Opens.map f.base).obj (op ((openFunctor H).obj U)).unop) ↔ x✝ ∈ ↑U
[PROOFSTEP]
dsimp [openFunctor, IsOpenMap.functor]
[GOAL]
case h.h
C : Type u_1
inst✝ : Category.{?u.35411, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X
x✝ : ↑↑X
⊢ x✝ ∈ ↑f.base ⁻¹' (↑f.base '' ↑U) ↔ x✝ ∈ ↑U
[PROOFSTEP]
rw [Set.preimage_image_eq _ H.base_open.inj]
[GOAL]
C : Type u_1
inst✝ : Category.{u_3, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X
⊢ inv (invApp H U) =
    NatTrans.app f.c (op ((openFunctor H).obj U)) ≫
      X.presheaf.map (eqToHom (_ : op ((Opens.map f.base).obj (op ((openFunctor H).obj U)).unop) = op U))
[PROOFSTEP]
rw [← cancel_epi (H.invApp U), IsIso.hom_inv_id]
[GOAL]
C : Type u_1
inst✝ : Category.{u_3, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X
⊢ 𝟙 (X.presheaf.obj (op U)) =
    invApp H U ≫
      NatTrans.app f.c (op ((openFunctor H).obj U)) ≫
        X.presheaf.map (eqToHom (_ : op ((Opens.map f.base).obj (op ((openFunctor H).obj U)).unop) = op U))
[PROOFSTEP]
delta invApp
[GOAL]
C : Type u_1
inst✝ : Category.{u_3, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X
⊢ 𝟙 (X.presheaf.obj (op U)) =
    (X.presheaf.map (eqToHom (_ : op U = op ((Opens.map f.base).obj (op ((openFunctor H).obj U)).unop))) ≫
        inv (NatTrans.app f.c (op ((openFunctor H).obj U)))) ≫
      NatTrans.app f.c (op ((openFunctor H).obj U)) ≫
        X.presheaf.map (eqToHom (_ : op ((Opens.map f.base).obj (op ((openFunctor H).obj U)).unop) = op U))
[PROOFSTEP]
simp [← Functor.map_comp]
[GOAL]
C : Type u_1
inst✝ : Category.{?u.41014, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X
⊢ op U = (Opens.map f.base).op.obj (op ((openFunctor H).obj U))
[PROOFSTEP]
apply congr_arg (op ·)
[GOAL]
C : Type u_1
inst✝ : Category.{?u.41014, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X
⊢ U = (Opens.map f.base).obj (op ((openFunctor H).obj U)).unop
[PROOFSTEP]
ext
[GOAL]
case h.h
C : Type u_1
inst✝ : Category.{?u.41014, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X
x✝ : ↑↑X
⊢ x✝ ∈ ↑U ↔ x✝ ∈ ↑((Opens.map f.base).obj (op ((openFunctor H).obj U)).unop)
[PROOFSTEP]
dsimp [openFunctor, IsOpenMap.functor]
[GOAL]
case h.h
C : Type u_1
inst✝ : Category.{?u.41014, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X
x✝ : ↑↑X
⊢ x✝ ∈ ↑U ↔ x✝ ∈ ↑f.base ⁻¹' (↑f.base '' ↑U)
[PROOFSTEP]
rw [Set.preimage_image_eq _ H.base_open.inj]
[GOAL]
C : Type u_1
inst✝ : Category.{u_3, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑X
⊢ invApp H U ≫ NatTrans.app f.c (op ((openFunctor H).obj U)) =
    X.presheaf.map (eqToHom (_ : op U = op ((Opens.map f.base).obj (op ((openFunctor H).obj U)).unop)))
[PROOFSTEP]
rw [invApp, Category.assoc, IsIso.inv_hom_id, Category.comp_id]
[GOAL]
C : Type u_1
inst✝ : Category.{u_3, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑Y
⊢ NatTrans.app f.c (op U) ≫ invApp H ((Opens.map f.base).obj U) =
    Y.presheaf.map (homOfLE (_ : ↑f.base '' (↑f.base ⁻¹' U.carrier) ⊆ U.carrier)).op
[PROOFSTEP]
erw [← Category.assoc]
[GOAL]
C : Type u_1
inst✝ : Category.{u_3, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑Y
⊢ (NatTrans.app f.c (op U) ≫
        X.presheaf.map
          (eqToHom
            (_ :
              op ((Opens.map f.base).obj U) =
                op ((Opens.map f.base).obj (op ((openFunctor H).obj ((Opens.map f.base).obj U))).unop)))) ≫
      inv (NatTrans.app f.c (op ((openFunctor H).obj ((Opens.map f.base).obj U)))) =
    Y.presheaf.map (homOfLE (_ : ↑f.base '' (↑f.base ⁻¹' U.carrier) ⊆ U.carrier)).op
[PROOFSTEP]
rw [IsIso.comp_inv_eq, f.c.naturality]
[GOAL]
C : Type u_1
inst✝ : Category.{u_3, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑Y
⊢ NatTrans.app f.c (op U) ≫
      X.presheaf.map
        (eqToHom
          (_ :
            op ((Opens.map f.base).obj U) =
              op ((Opens.map f.base).obj (op ((openFunctor H).obj ((Opens.map f.base).obj U))).unop))) =
    NatTrans.app f.c (op U) ≫
      (f.base _* X.presheaf).map (homOfLE (_ : ↑f.base '' (↑f.base ⁻¹' U.carrier) ⊆ U.carrier)).op
[PROOFSTEP]
congr
[GOAL]
C : Type u_1
inst✝ : Category.{?u.51099, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑Y
hU : ↑U ⊆ Set.range ↑f.base
⊢ (openFunctor H).obj ((Opens.map f.base).obj U) = U
[PROOFSTEP]
apply le_antisymm
[GOAL]
case a
C : Type u_1
inst✝ : Category.{?u.51099, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑Y
hU : ↑U ⊆ Set.range ↑f.base
⊢ (openFunctor H).obj ((Opens.map f.base).obj U) ≤ U
[PROOFSTEP]
exact Set.image_preimage_subset f.base U.1
[GOAL]
case a
C : Type u_1
inst✝ : Category.{?u.51099, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑Y
hU : ↑U ⊆ Set.range ↑f.base
⊢ U ≤ (openFunctor H).obj ((Opens.map f.base).obj U)
[PROOFSTEP]
rw [← SetLike.coe_subset_coe]
[GOAL]
case a
C : Type u_1
inst✝ : Category.{?u.51099, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑Y
hU : ↑U ⊆ Set.range ↑f.base
⊢ ↑U ⊆ ↑((openFunctor H).obj ((Opens.map f.base).obj U))
[PROOFSTEP]
refine' LE.le.trans_eq _ (@Set.image_preimage_eq_inter_range _ _ f.base U.1).symm
[GOAL]
case a
C : Type u_1
inst✝ : Category.{?u.51099, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑Y
hU : ↑U ⊆ Set.range ↑f.base
⊢ ↑U ≤ U.carrier ∩ Set.range ↑f.base
[PROOFSTEP]
exact Set.subset_inter_iff.mpr ⟨fun _ h => h, hU⟩
[GOAL]
C : Type u_1
inst✝ : Category.{u_3, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑Y
hU : ↑U ⊆ Set.range ↑f.base
⊢ NatTrans.app f.c (op U) ≫ invApp H ((Opens.map f.base).obj U) =
    Y.presheaf.map (eqToHom (_ : (openFunctor H).obj ((Opens.map f.base).obj U) = U)).op
[PROOFSTEP]
erw [← Category.assoc]
[GOAL]
C : Type u_1
inst✝ : Category.{u_3, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑Y
hU : ↑U ⊆ Set.range ↑f.base
⊢ (NatTrans.app f.c (op U) ≫
        X.presheaf.map
          (eqToHom
            (_ :
              op ((Opens.map f.base).obj U) =
                op ((Opens.map f.base).obj (op ((openFunctor H).obj ((Opens.map f.base).obj U))).unop)))) ≫
      inv (NatTrans.app f.c (op ((openFunctor H).obj ((Opens.map f.base).obj U)))) =
    Y.presheaf.map (eqToHom (_ : (openFunctor H).obj ((Opens.map f.base).obj U) = U)).op
[PROOFSTEP]
rw [IsIso.comp_inv_eq, f.c.naturality]
[GOAL]
C : Type u_1
inst✝ : Category.{u_3, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑Y
hU : ↑U ⊆ Set.range ↑f.base
⊢ NatTrans.app f.c (op U) ≫
      X.presheaf.map
        (eqToHom
          (_ :
            op ((Opens.map f.base).obj U) =
              op ((Opens.map f.base).obj (op ((openFunctor H).obj ((Opens.map f.base).obj U))).unop))) =
    NatTrans.app f.c (op U) ≫
      (f.base _* X.presheaf).map (eqToHom (_ : (openFunctor H).obj ((Opens.map f.base).obj U) = U)).op
[PROOFSTEP]
congr
[GOAL]
C : Type u_1
inst✝ : Category.{?u.57948, u_1} C
X✝ Y✝ : PresheafedSpace C
f✝ : X✝ ⟶ Y✝
H : IsOpenImmersion f✝
X : TopCat
Y : PresheafedSpace C
f : X ⟶ ↑Y
hf : OpenEmbedding ↑f
U : Opens ↑↑(restrict Y hf)
⊢ IsIso
    (NatTrans.app (PresheafedSpace.ofRestrict Y hf).c
      (op ((IsOpenMap.functor (_ : IsOpenMap ↑(PresheafedSpace.ofRestrict Y hf).base)).obj U)))
[PROOFSTEP]
dsimp
[GOAL]
C : Type u_1
inst✝ : Category.{?u.57948, u_1} C
X✝ Y✝ : PresheafedSpace C
f✝ : X✝ ⟶ Y✝
H : IsOpenImmersion f✝
X : TopCat
Y : PresheafedSpace C
f : X ⟶ ↑Y
hf : OpenEmbedding ↑f
U : Opens ↑↑(restrict Y hf)
⊢ IsIso
    (Y.presheaf.map
      (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑f)).counit ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U)).op)
[PROOFSTEP]
have : (Opens.map f).obj (hf.isOpenMap.functor.obj U) = U :=
  by
  ext1
  exact Set.preimage_image_eq _ hf.inj
[GOAL]
C : Type u_1
inst✝ : Category.{?u.57948, u_1} C
X✝ Y✝ : PresheafedSpace C
f✝ : X✝ ⟶ Y✝
H : IsOpenImmersion f✝
X : TopCat
Y : PresheafedSpace C
f : X ⟶ ↑Y
hf : OpenEmbedding ↑f
U : Opens ↑↑(restrict Y hf)
⊢ (Opens.map f).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U) = U
[PROOFSTEP]
ext1
[GOAL]
case h
C : Type u_1
inst✝ : Category.{?u.57948, u_1} C
X✝ Y✝ : PresheafedSpace C
f✝ : X✝ ⟶ Y✝
H : IsOpenImmersion f✝
X : TopCat
Y : PresheafedSpace C
f : X ⟶ ↑Y
hf : OpenEmbedding ↑f
U : Opens ↑↑(restrict Y hf)
⊢ ↑((Opens.map f).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U)) = ↑U
[PROOFSTEP]
exact Set.preimage_image_eq _ hf.inj
[GOAL]
C : Type u_1
inst✝ : Category.{?u.57948, u_1} C
X✝ Y✝ : PresheafedSpace C
f✝ : X✝ ⟶ Y✝
H : IsOpenImmersion f✝
X : TopCat
Y : PresheafedSpace C
f : X ⟶ ↑Y
hf : OpenEmbedding ↑f
U : Opens ↑↑(restrict Y hf)
this : (Opens.map f).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U) = U
⊢ IsIso
    (Y.presheaf.map
      (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑f)).counit ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U)).op)
[PROOFSTEP]
convert_to IsIso (Y.presheaf.map (𝟙 _))
[GOAL]
case h.e'_4
C : Type u_1
inst✝ : Category.{?u.57948, u_1} C
X✝ Y✝ : PresheafedSpace C
f✝ : X✝ ⟶ Y✝
H : IsOpenImmersion f✝
X : TopCat
Y : PresheafedSpace C
f : X ⟶ ↑Y
hf : OpenEmbedding ↑f
U : Opens ↑↑(restrict Y hf)
this : (Opens.map f).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U) = U
⊢ Y.presheaf.obj
      (op
        ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj
          ((Opens.map f).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U)))) =
    Y.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U))
[PROOFSTEP]
congr
[GOAL]
case h.e'_5
C : Type u_1
inst✝ : Category.{?u.57948, u_1} C
X✝ Y✝ : PresheafedSpace C
f✝ : X✝ ⟶ Y✝
H : IsOpenImmersion f✝
X : TopCat
Y : PresheafedSpace C
f : X ⟶ ↑Y
hf : OpenEmbedding ↑f
U : Opens ↑↑(restrict Y hf)
this : (Opens.map f).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U) = U
e_4✝ :
  Y.presheaf.obj
      (op
        ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj
          ((Opens.map f).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U)))) =
    Y.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U))
⊢ HEq
    (Y.presheaf.map
      (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑f)).counit ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U)).op)
    (Y.presheaf.map (𝟙 (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U))))
[PROOFSTEP]
congr
[GOAL]
case h.e'_5.e_8.e_3.h
C : Type u_1
inst✝ : Category.{?u.57948, u_1} C
X✝ Y✝ : PresheafedSpace C
f✝ : X✝ ⟶ Y✝
H : IsOpenImmersion f✝
X : TopCat
Y : PresheafedSpace C
f : X ⟶ ↑Y
hf : OpenEmbedding ↑f
U : Opens ↑↑(restrict Y hf)
this : (Opens.map f).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U) = U
e_4✝ :
  Y.presheaf.obj
      (op
        ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj
          ((Opens.map f).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U)))) =
    Y.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U))
⊢ (IsOpenMap.functor (_ : IsOpenMap ↑f)).obj ((Opens.map f).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U)) =
    (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U)).unop
case h.e'_5.e_8.e_5
C : Type u_1
inst✝ : Category.{?u.57948, u_1} C
X✝ Y✝ : PresheafedSpace C
f✝ : X✝ ⟶ Y✝
H : IsOpenImmersion f✝
X : TopCat
Y : PresheafedSpace C
f : X ⟶ ↑Y
hf : OpenEmbedding ↑f
U : Opens ↑↑(restrict Y hf)
this : (Opens.map f).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U) = U
e_4✝ :
  Y.presheaf.obj
      (op
        ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj
          ((Opens.map f).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U)))) =
    Y.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U))
⊢ HEq (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑f)).counit ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U))
    (𝟙 (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U)).unop)
[PROOFSTEP]
simp only [unop_op]
[GOAL]
case h.e'_5.e_8.e_3.h
C : Type u_1
inst✝ : Category.{?u.57948, u_1} C
X✝ Y✝ : PresheafedSpace C
f✝ : X✝ ⟶ Y✝
H : IsOpenImmersion f✝
X : TopCat
Y : PresheafedSpace C
f : X ⟶ ↑Y
hf : OpenEmbedding ↑f
U : Opens ↑↑(restrict Y hf)
this : (Opens.map f).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U) = U
e_4✝ :
  Y.presheaf.obj
      (op
        ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj
          ((Opens.map f).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U)))) =
    Y.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U))
⊢ (IsOpenMap.functor (_ : IsOpenMap ↑f)).obj ((Opens.map f).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U)) =
    (IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U
case h.e'_5.e_8.e_5
C : Type u_1
inst✝ : Category.{?u.57948, u_1} C
X✝ Y✝ : PresheafedSpace C
f✝ : X✝ ⟶ Y✝
H : IsOpenImmersion f✝
X : TopCat
Y : PresheafedSpace C
f : X ⟶ ↑Y
hf : OpenEmbedding ↑f
U : Opens ↑↑(restrict Y hf)
this : (Opens.map f).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U) = U
e_4✝ :
  Y.presheaf.obj
      (op
        ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj
          ((Opens.map f).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U)))) =
    Y.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U))
⊢ HEq (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑f)).counit ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U))
    (𝟙 (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U)).unop)
[PROOFSTEP]
congr
[GOAL]
case h.e'_5.e_8.e_5
C : Type u_1
inst✝ : Category.{?u.57948, u_1} C
X✝ Y✝ : PresheafedSpace C
f✝ : X✝ ⟶ Y✝
H : IsOpenImmersion f✝
X : TopCat
Y : PresheafedSpace C
f : X ⟶ ↑Y
hf : OpenEmbedding ↑f
U : Opens ↑↑(restrict Y hf)
this : (Opens.map f).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U) = U
e_4✝ :
  Y.presheaf.obj
      (op
        ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj
          ((Opens.map f).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U)))) =
    Y.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U))
⊢ HEq (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑f)).counit ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U))
    (𝟙 (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U)).unop)
[PROOFSTEP]
apply Subsingleton.helim
[GOAL]
case h.e'_5.e_8.e_5.h₂
C : Type u_1
inst✝ : Category.{?u.57948, u_1} C
X✝ Y✝ : PresheafedSpace C
f✝ : X✝ ⟶ Y✝
H : IsOpenImmersion f✝
X : TopCat
Y : PresheafedSpace C
f : X ⟶ ↑Y
hf : OpenEmbedding ↑f
U : Opens ↑↑(restrict Y hf)
this : (Opens.map f).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U) = U
e_4✝ :
  Y.presheaf.obj
      (op
        ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj
          ((Opens.map f).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U)))) =
    Y.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U))
⊢ ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj ((Opens.map f).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U)) ⟶
      (IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U) =
    ((op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U)).unop ⟶
      (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U)).unop)
[PROOFSTEP]
rw [this]
[GOAL]
case h.e'_5.e_8.e_5.h₂
C : Type u_1
inst✝ : Category.{?u.57948, u_1} C
X✝ Y✝ : PresheafedSpace C
f✝ : X✝ ⟶ Y✝
H : IsOpenImmersion f✝
X : TopCat
Y : PresheafedSpace C
f : X ⟶ ↑Y
hf : OpenEmbedding ↑f
U : Opens ↑↑(restrict Y hf)
this : (Opens.map f).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U) = U
e_4✝ :
  Y.presheaf.obj
      (op
        ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj
          ((Opens.map f).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U)))) =
    Y.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U))
⊢ ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U ⟶ (IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U) =
    ((op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U)).unop ⟶
      (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U)).unop)
[PROOFSTEP]
rfl
[GOAL]
case convert_2
C : Type u_1
inst✝ : Category.{?u.57948, u_1} C
X✝ Y✝ : PresheafedSpace C
f✝ : X✝ ⟶ Y✝
H : IsOpenImmersion f✝
X : TopCat
Y : PresheafedSpace C
f : X ⟶ ↑Y
hf : OpenEmbedding ↑f
U : Opens ↑↑(restrict Y hf)
this : (Opens.map f).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U) = U
⊢ IsIso (Y.presheaf.map (𝟙 (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj U))))
[PROOFSTEP]
infer_instance
[GOAL]
C✝ : Type u_1
inst✝¹ : Category.{?u.65491, u_1} C✝
X✝ Y✝ : PresheafedSpace C✝
f✝ : X✝ ⟶ Y✝
H : IsOpenImmersion f✝
C : Type u_2
inst✝ : Category.{u_3, u_2} C
X : PresheafedSpace C
Y : TopCat
f : Y ⟶ TopCat.of ↑↑X
h : OpenEmbedding ↑f
U : Opens ↑↑(restrict X h)
⊢ invApp (_ : IsOpenImmersion (PresheafedSpace.ofRestrict X h)) U = 𝟙 ((restrict X h).presheaf.obj (op U))
[PROOFSTEP]
delta invApp
[GOAL]
C✝ : Type u_1
inst✝¹ : Category.{?u.65491, u_1} C✝
X✝ Y✝ : PresheafedSpace C✝
f✝ : X✝ ⟶ Y✝
H : IsOpenImmersion f✝
C : Type u_2
inst✝ : Category.{u_3, u_2} C
X : PresheafedSpace C
Y : TopCat
f : Y ⟶ TopCat.of ↑↑X
h : OpenEmbedding ↑f
U : Opens ↑↑(restrict X h)
⊢ (restrict X h).presheaf.map
        (eqToHom
          (_ :
            op U =
              op
                ((Opens.map (PresheafedSpace.ofRestrict X h).base).obj
                  (op ((openFunctor (_ : IsOpenImmersion (PresheafedSpace.ofRestrict X h))).obj U)).unop))) ≫
      inv
        (NatTrans.app (PresheafedSpace.ofRestrict X h).c
          (op ((openFunctor (_ : IsOpenImmersion (PresheafedSpace.ofRestrict X h))).obj U))) =
    𝟙 ((restrict X h).presheaf.obj (op U))
[PROOFSTEP]
rw [IsIso.comp_inv_eq, Category.id_comp]
[GOAL]
C✝ : Type u_1
inst✝¹ : Category.{?u.65491, u_1} C✝
X✝ Y✝ : PresheafedSpace C✝
f✝ : X✝ ⟶ Y✝
H : IsOpenImmersion f✝
C : Type u_2
inst✝ : Category.{u_3, u_2} C
X : PresheafedSpace C
Y : TopCat
f : Y ⟶ TopCat.of ↑↑X
h : OpenEmbedding ↑f
U : Opens ↑↑(restrict X h)
⊢ (restrict X h).presheaf.map
      (eqToHom
        (_ :
          op U =
            op
              ((Opens.map (PresheafedSpace.ofRestrict X h).base).obj
                (op ((openFunctor (_ : IsOpenImmersion (PresheafedSpace.ofRestrict X h))).obj U)).unop))) =
    NatTrans.app (PresheafedSpace.ofRestrict X h).c
      (op ((openFunctor (_ : IsOpenImmersion (PresheafedSpace.ofRestrict X h))).obj U))
[PROOFSTEP]
change X.presheaf.map _ = X.presheaf.map _
[GOAL]
C✝ : Type u_1
inst✝¹ : Category.{?u.65491, u_1} C✝
X✝ Y✝ : PresheafedSpace C✝
f✝ : X✝ ⟶ Y✝
H : IsOpenImmersion f✝
C : Type u_2
inst✝ : Category.{u_3, u_2} C
X : PresheafedSpace C
Y : TopCat
f : Y ⟶ TopCat.of ↑↑X
h : OpenEmbedding ↑f
U : Opens ↑↑(restrict X h)
⊢ X.presheaf.map
      ((IsOpenMap.functor (_ : IsOpenMap ↑f)).op.map
        (eqToHom
          (_ :
            op U =
              op
                ((Opens.map (PresheafedSpace.ofRestrict X h).base).obj
                  (op ((openFunctor (_ : IsOpenImmersion (PresheafedSpace.ofRestrict X h))).obj U)).unop)))) =
    X.presheaf.map
      (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑f)).counit
          (op ((openFunctor (_ : IsOpenImmersion (PresheafedSpace.ofRestrict X h))).obj U)).unop).op
[PROOFSTEP]
congr 1
[GOAL]
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
f : X ⟶ Y
h : IsOpenImmersion f
h' : Epi f.base
⊢ IsIso f
[PROOFSTEP]
have : ∀ (U : (Opens Y)ᵒᵖ), IsIso (f.c.app U)
[GOAL]
case this
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
f : X ⟶ Y
h : IsOpenImmersion f
h' : Epi f.base
⊢ ∀ (U : (Opens ↑↑Y)ᵒᵖ), IsIso (NatTrans.app f.c U)
[PROOFSTEP]
intro U
[GOAL]
case this
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
f : X ⟶ Y
h : IsOpenImmersion f
h' : Epi f.base
U : (Opens ↑↑Y)ᵒᵖ
⊢ IsIso (NatTrans.app f.c U)
[PROOFSTEP]
have : U = op (h.openFunctor.obj ((Opens.map f.base).obj (unop U))) :=
  by
  induction U using Opposite.rec' with
  | h U => ?_
  cases U
  dsimp only [Functor.op, Opens.map]
  congr
  exact (Set.image_preimage_eq _ ((TopCat.epi_iff_surjective _).mp h')).symm
[GOAL]
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
f : X ⟶ Y
h : IsOpenImmersion f
h' : Epi f.base
U : (Opens ↑↑Y)ᵒᵖ
⊢ U = op ((openFunctor h).obj ((Opens.map f.base).obj U.unop))
[PROOFSTEP]
induction U using Opposite.rec' with
| h U => ?_
[GOAL]
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
f : X ⟶ Y
h : IsOpenImmersion f
h' : Epi f.base
U : (Opens ↑↑Y)ᵒᵖ
⊢ U = op ((openFunctor h).obj ((Opens.map f.base).obj U.unop))
[PROOFSTEP]
induction U using Opposite.rec' with
| h U => ?_
[GOAL]
case h
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
f : X ⟶ Y
h : IsOpenImmersion f
h' : Epi f.base
U : Opens ↑↑Y
⊢ op U = op ((openFunctor h).obj ((Opens.map f.base).obj (op U).unop))
[PROOFSTEP]
cases U
[GOAL]
case h.mk
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
f : X ⟶ Y
h : IsOpenImmersion f
h' : Epi f.base
carrier✝ : Set ↑↑Y
is_open'✝ : IsOpen carrier✝
⊢ op { carrier := carrier✝, is_open' := is_open'✝ } =
    op ((openFunctor h).obj ((Opens.map f.base).obj (op { carrier := carrier✝, is_open' := is_open'✝ }).unop))
[PROOFSTEP]
dsimp only [Functor.op, Opens.map]
[GOAL]
case h.mk
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
f : X ⟶ Y
h : IsOpenImmersion f
h' : Epi f.base
carrier✝ : Set ↑↑Y
is_open'✝ : IsOpen carrier✝
⊢ op { carrier := carrier✝, is_open' := is_open'✝ } =
    op
      ((openFunctor h).obj
        { carrier := ↑f.base ⁻¹' ↑(op { carrier := carrier✝, is_open' := is_open'✝ }).unop,
          is_open' := (_ : IsOpen (↑f.base ⁻¹' ↑(op { carrier := carrier✝, is_open' := is_open'✝ }).unop)) })
[PROOFSTEP]
congr
[GOAL]
case h.mk.e_x.e_carrier
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
f : X ⟶ Y
h : IsOpenImmersion f
h' : Epi f.base
carrier✝ : Set ↑↑Y
is_open'✝ : IsOpen carrier✝
⊢ carrier✝ =
    ↑f.base ''
      ↑{ carrier := ↑f.base ⁻¹' ↑(op { carrier := carrier✝, is_open' := is_open'✝ }).unop,
          is_open' := (_ : IsOpen (↑f.base ⁻¹' ↑(op { carrier := carrier✝, is_open' := is_open'✝ }).unop)) }
[PROOFSTEP]
exact (Set.image_preimage_eq _ ((TopCat.epi_iff_surjective _).mp h')).symm
[GOAL]
case this
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
f : X ⟶ Y
h : IsOpenImmersion f
h' : Epi f.base
U : (Opens ↑↑Y)ᵒᵖ
this : U = op ((openFunctor h).obj ((Opens.map f.base).obj U.unop))
⊢ IsIso (NatTrans.app f.c U)
[PROOFSTEP]
convert @IsOpenImmersion.c_iso _ _ _ _ _ h ((Opens.map f.base).obj (unop U))
[GOAL]
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
f : X ⟶ Y
h : IsOpenImmersion f
h' : Epi f.base
this : ∀ (U : (Opens ↑↑Y)ᵒᵖ), IsIso (NatTrans.app f.c U)
⊢ IsIso f
[PROOFSTEP]
have : IsIso f.base
[GOAL]
case this
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
f : X ⟶ Y
h : IsOpenImmersion f
h' : Epi f.base
this : ∀ (U : (Opens ↑↑Y)ᵒᵖ), IsIso (NatTrans.app f.c U)
⊢ IsIso f.base
[PROOFSTEP]
let t : X ≃ₜ Y :=
  (Homeomorph.ofEmbedding _ h.base_open.toEmbedding).trans
    { toFun := Subtype.val
      invFun := fun x => ⟨x, by rw [Set.range_iff_surjective.mpr ((TopCat.epi_iff_surjective _).mp h')]; trivial⟩
      left_inv := fun ⟨_, _⟩ => rfl
      right_inv := fun _ => rfl }
[GOAL]
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
f : X ⟶ Y
h : IsOpenImmersion f
h' : Epi f.base
this : ∀ (U : (Opens ↑↑Y)ᵒᵖ), IsIso (NatTrans.app f.c U)
x : ↑↑Y
⊢ x ∈ Set.range ↑f.base
[PROOFSTEP]
rw [Set.range_iff_surjective.mpr ((TopCat.epi_iff_surjective _).mp h')]
[GOAL]
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
f : X ⟶ Y
h : IsOpenImmersion f
h' : Epi f.base
this : ∀ (U : (Opens ↑↑Y)ᵒᵖ), IsIso (NatTrans.app f.c U)
x : ↑↑Y
⊢ x ∈ Set.univ
[PROOFSTEP]
trivial
[GOAL]
case this
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
f : X ⟶ Y
h : IsOpenImmersion f
h' : Epi f.base
this : ∀ (U : (Opens ↑↑Y)ᵒᵖ), IsIso (NatTrans.app f.c U)
t : ↑↑X ≃ₜ ↑↑Y :=
  Homeomorph.trans (Homeomorph.ofEmbedding ↑f.base (_ : Embedding ↑f.base))
    (Homeomorph.mk
      { toFun := Subtype.val, invFun := fun x => { val := x, property := (_ : x ∈ Set.range ↑f.base) },
        left_inv :=
          (_ : ∀ (x : ↑(Set.range ↑f.base)), (fun x => { val := x, property := (_ : x ∈ Set.range ↑f.base) }) ↑x = x),
        right_inv :=
          (_ :
            ∀ (x : ↑↑Y),
              ↑((fun x => { val := x, property := (_ : x ∈ Set.range ↑f.base) }) x) =
                ↑((fun x => { val := x, property := (_ : x ∈ Set.range ↑f.base) }) x)) })
⊢ IsIso f.base
[PROOFSTEP]
convert IsIso.of_iso (TopCat.isoOfHomeo t)
[GOAL]
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
f : X ⟶ Y
h : IsOpenImmersion f
h' : Epi f.base
this✝ : ∀ (U : (Opens ↑↑Y)ᵒᵖ), IsIso (NatTrans.app f.c U)
this : IsIso f.base
⊢ IsIso f
[PROOFSTEP]
have : IsIso f.c := by apply NatIso.isIso_of_isIso_app
[GOAL]
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
f : X ⟶ Y
h : IsOpenImmersion f
h' : Epi f.base
this✝ : ∀ (U : (Opens ↑↑Y)ᵒᵖ), IsIso (NatTrans.app f.c U)
this : IsIso f.base
⊢ IsIso f.c
[PROOFSTEP]
apply NatIso.isIso_of_isIso_app
[GOAL]
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
f✝ : X ⟶ Y
H : IsOpenImmersion f✝
f : X ⟶ Y
h : IsOpenImmersion f
h' : Epi f.base
this✝¹ : ∀ (U : (Opens ↑↑Y)ᵒᵖ), IsIso (NatTrans.app f.c U)
this✝ : IsIso f.base
this : IsIso f.c
⊢ IsIso f
[PROOFSTEP]
apply isIso_of_components
[GOAL]
C : Type u_1
inst✝¹ : Category.{?u.92046, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H✝ : IsOpenImmersion f
inst✝ : HasColimits C
H : IsOpenImmersion f
x : ↑↑X
⊢ IsIso (stalkMap f x)
[PROOFSTEP]
rw [← H.isoRestrict_hom_ofRestrict]
[GOAL]
C : Type u_1
inst✝¹ : Category.{?u.92046, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H✝ : IsOpenImmersion f
inst✝ : HasColimits C
H : IsOpenImmersion f
x : ↑↑X
⊢ IsIso (stalkMap ((isoRestrict H).hom ≫ PresheafedSpace.ofRestrict Y (_ : OpenEmbedding ↑f.base)) x)
[PROOFSTEP]
rw [PresheafedSpace.stalkMap.comp]
[GOAL]
C : Type u_1
inst✝¹ : Category.{?u.92046, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H✝ : IsOpenImmersion f
inst✝ : HasColimits C
H : IsOpenImmersion f
x : ↑↑X
⊢ IsIso
    (stalkMap (PresheafedSpace.ofRestrict Y (_ : OpenEmbedding ↑f.base)) (↑(isoRestrict H).hom.base x) ≫
      stalkMap (isoRestrict H).hom x)
[PROOFSTEP]
infer_instance
[GOAL]
C : Type u_1
inst✝ : Category.{?u.93937, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
U : (Opens ↑↑X)ᵒᵖ
⊢ (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)
[PROOFSTEP]
simp only [IsOpenMap.functor, Subtype.mk_eq_mk, unop_op, op_inj_iff, Opens.map, Subtype.coe_mk, Functor.op_obj]
[GOAL]
C : Type u_1
inst✝ : Category.{?u.93937, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
U : (Opens ↑↑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)) })) } =
    {
      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)) })) }
[PROOFSTEP]
apply LE.le.antisymm
[GOAL]
case a
C : Type u_1
inst✝ : Category.{?u.93937, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
U : (Opens ↑↑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)) })) } ≤
    {
      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)) })) }
[PROOFSTEP]
rintro _ ⟨_, h₁, h₂⟩
[GOAL]
case a.intro.intro
C : Type u_1
inst✝ : Category.{?u.93937, 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✝
⊢ a✝ ∈
    ↑{
        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)) })) }
[PROOFSTEP]
use(TopCat.pullbackIsoProdSubtype _ _).inv
    ⟨⟨_, _⟩, h₂⟩
      -- Porting note : need a slight hand holding
[GOAL]
case h
C : Type u_1
inst✝ : Category.{?u.93937, 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₂ } ∈
      ↑{ carrier := ↑pullback.fst ⁻¹' ↑U.unop, is_open' := (_ : IsOpen (↑pullback.fst ⁻¹' ↑U.unop)) } ∧
    ↑pullback.snd (↑(TopCat.pullbackIsoProdSubtype f.base g.base).inv { val := (w✝, a✝), property := h₂ }) = a✝
[PROOFSTEP]
change _ ∈ _ ⁻¹' _ ∧ _
[GOAL]
case h
C : Type u_1
inst✝ : Category.{?u.93937, 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✝
[PROOFSTEP]
simpa using h₁
[GOAL]
case a
C : Type u_1
inst✝ : Category.{?u.93937, 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)) })) }
[PROOFSTEP]
rintro _ ⟨x, h₁, rfl⟩
[GOAL]
case a.intro.intro
C : Type u_1
inst✝ : Category.{?u.93937, 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)) })) }
[PROOFSTEP]
exact ⟨_, h₁, ConcreteCategory.congr_hom pullback.condition x⟩
[GOAL]
C : Type u_1
inst✝ : Category.{?u.93937, 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 ≫
              NatTrans.app g.c (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 ≫
              NatTrans.app g.c (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
[PROOFSTEP]
intro U V i
[GOAL]
C : Type u_1
inst✝ : Category.{?u.93937, 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 ≫
            NatTrans.app g.c (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 ≫
            NatTrans.app g.c (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
[PROOFSTEP]
induction U using Opposite.rec'
[GOAL]
case h
C : Type u_1
inst✝ : Category.{?u.93937, 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 ≫
            NatTrans.app g.c (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 ≫
            NatTrans.app g.c (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
[PROOFSTEP]
induction V using Opposite.rec'
[GOAL]
case h.h
C : Type u_1
inst✝ : Category.{?u.93937, 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 ≫
            NatTrans.app g.c (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 ≫
            NatTrans.app g.c (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
[PROOFSTEP]
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
[GOAL]
case h.h
C : Type u_1
inst✝ : Category.{?u.93937, 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 ≫
        NatTrans.app g.c (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 ≫
      NatTrans.app g.c (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
[PROOFSTEP]
erw [g.c.naturality_assoc, TopCat.Presheaf.pushforwardObj_map, ← Y.presheaf.map_comp, ← Y.presheaf.map_comp]
[GOAL]
case h.h
C : Type u_1
inst✝ : Category.{?u.93937, 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 ≫
      NatTrans.app g.c (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 ≫
      NatTrans.app g.c (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))
[PROOFSTEP]
congr 1
[GOAL]
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
[PROOFSTEP]
refine PresheafedSpace.Hom.ext _ _ ?_ <| NatTrans.ext _ _ <| funext fun U => ?_
[GOAL]
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
[PROOFSTEP]
simpa using pullback.condition
[GOAL]
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)ᵒᵖ
⊢ NatTrans.app
      ((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)
      U =
    NatTrans.app (PresheafedSpace.ofRestrict Y (_ : OpenEmbedding ↑pullback.snd) ≫ g).c U
[PROOFSTEP]
induction U using Opposite.rec'
[GOAL]
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
⊢ NatTrans.app
      ((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)
      (op X✝) =
    NatTrans.app (PresheafedSpace.ofRestrict Y (_ : OpenEmbedding ↑pullback.snd) ≫ g).c (op X✝)
[PROOFSTEP]
rw [NatTrans.comp_app]
[GOAL]
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
⊢ NatTrans.app (pullbackConeOfLeftFst f g ≫ f).c (op X✝) ≫
      NatTrans.app
        (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)
        (op X✝) =
    NatTrans.app (PresheafedSpace.ofRestrict Y (_ : OpenEmbedding ↑pullback.snd) ≫ g).c (op X✝)
[PROOFSTEP]
dsimp only [comp_c_app, unop_op, whiskerRight_app, pullbackConeOfLeftFst]
  -- simp only [ofRestrict_c_app, NatTrans.comp_app]
[GOAL]
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
⊢ (NatTrans.app f.c (op X✝) ≫
        invApp hf ((Opens.map f.base).obj X✝) ≫
          NatTrans.app g.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑f.base)).obj ((Opens.map f.base).obj X✝))) ≫
            Y.presheaf.map
              (eqToHom
                (_ :
                  (Opens.map g.base).op.obj
                      (op ((IsOpenMap.functor (_ : IsOpenMap ↑f.base)).obj (op ((Opens.map f.base).obj X✝)).unop)) =
                    (IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj
                      ((Opens.map pullback.fst).op.obj (op ((Opens.map f.base).obj X✝)))))) ≫
      (restrict Y (_ : OpenEmbedding ↑pullback.snd)).presheaf.map
        (NatTrans.app
          (eqToHom
            (_ :
              (Opens.map
                    ({ base := pullback.fst,
                          c :=
                            NatTrans.mk fun U =>
                              invApp hf U.unop ≫
                                NatTrans.app g.c (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))) } ≫
                        f).base).op =
                (Opens.map (PresheafedSpace.ofRestrict Y (_ : OpenEmbedding ↑pullback.snd) ≫ g).base).op))
          (op X✝)) =
    NatTrans.app g.c (op X✝) ≫
      NatTrans.app (PresheafedSpace.ofRestrict Y (_ : OpenEmbedding ↑pullback.snd)).c (op ((Opens.map g.base).obj X✝))
[PROOFSTEP]
simp only [Quiver.Hom.unop_op, TopCat.Presheaf.pushforwardObj_map, app_invApp_assoc, eqToHom_app, eqToHom_unop,
  Category.assoc, NatTrans.naturality_assoc, Functor.op_map]
[GOAL]
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
⊢ NatTrans.app g.c (op X✝) ≫
      Y.presheaf.map
          ((Opens.map g.base).map (homOfLE (_ : ↑f.base '' (↑f.base ⁻¹' X✝.carrier) ⊆ X✝.carrier)).op.unop).op ≫
        Y.presheaf.map
            (eqToHom
              (_ :
                (Opens.map g.base).op.obj
                    (op ((IsOpenMap.functor (_ : IsOpenMap ↑f.base)).obj (op ((Opens.map f.base).obj X✝)).unop)) =
                  (IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj
                    ((Opens.map pullback.fst).op.obj (op ((Opens.map f.base).obj X✝))))) ≫
          (restrict Y (_ : OpenEmbedding ↑pullback.snd)).presheaf.map
            (eqToHom
              (_ :
                (Opens.map
                          ({ base := pullback.fst,
                                c :=
                                  NatTrans.mk fun U =>
                                    invApp hf U.unop ≫
                                      NatTrans.app g.c (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))) } ≫
                              f).base).op.obj
                    (op X✝) =
                  (Opens.map (PresheafedSpace.ofRestrict Y (_ : OpenEmbedding ↑pullback.snd) ≫ g).base).op.obj
                    (op X✝))) =
    NatTrans.app g.c (op X✝) ≫
      NatTrans.app (PresheafedSpace.ofRestrict Y (_ : OpenEmbedding ↑pullback.snd)).c (op ((Opens.map g.base).obj X✝))
[PROOFSTEP]
erw [← Y.presheaf.map_comp, ← Y.presheaf.map_comp]
[GOAL]
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
⊢ NatTrans.app g.c (op X✝) ≫
      Y.presheaf.map
        (((Opens.map g.base).map (homOfLE (_ : ↑f.base '' (↑f.base ⁻¹' X✝.carrier) ⊆ X✝.carrier)).op.unop).op ≫
          eqToHom
              (_ :
                (Opens.map g.base).op.obj
                    (op ((IsOpenMap.functor (_ : IsOpenMap ↑f.base)).obj (op ((Opens.map f.base).obj X✝)).unop)) =
                  (IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj
                    ((Opens.map pullback.fst).op.obj (op ((Opens.map f.base).obj X✝)))) ≫
            (IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.map
              (eqToHom
                (_ :
                  (Opens.map
                            ({ base := pullback.fst,
                                  c :=
                                    NatTrans.mk fun U =>
                                      invApp hf U.unop ≫
                                        NatTrans.app g.c (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))) } ≫
                                f).base).op.obj
                      (op X✝) =
                    (Opens.map (PresheafedSpace.ofRestrict Y (_ : OpenEmbedding ↑pullback.snd) ≫ g).base).op.obj
                      (op X✝)))) =
    NatTrans.app g.c (op X✝) ≫
      NatTrans.app (PresheafedSpace.ofRestrict Y (_ : OpenEmbedding ↑pullback.snd)).c (op ((Opens.map g.base).obj X✝))
[PROOFSTEP]
congr 1
[GOAL]
C : Type u_1
inst✝ : Category.{?u.123565, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
U : (Opens ↑↑(pullbackConeOfLeft f g).pt)ᵒᵖ
⊢ (Opens.map (PullbackCone.snd s).base).op.obj ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj U) =
    (Opens.map
            (pullback.lift (PullbackCone.fst s).base (PullbackCone.snd s).base
              (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base))).op.obj
      U
[PROOFSTEP]
dsimp only [Opens.map, IsOpenMap.functor, Functor.op]
[GOAL]
C : Type u_1
inst✝ : Category.{?u.123565, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
U : (Opens ↑↑(pullbackConeOfLeft f g).pt)ᵒᵖ
⊢ op
      {
        carrier :=
          ↑(PullbackCone.snd s).base ⁻¹'
            ↑(op { carrier := ↑pullback.snd '' ↑U.unop, is_open' := (_ : IsOpen (↑pullback.snd '' ↑U.unop)) }).unop,
        is_open' :=
          (_ :
            IsOpen
              (↑(PullbackCone.snd s).base ⁻¹'
                ↑(op
                      { carrier := ↑pullback.snd '' ↑U.unop,
                        is_open' := (_ : IsOpen (↑pullback.snd '' ↑U.unop)) }).unop)) } =
    op
      {
        carrier :=
          ↑(pullback.lift (PullbackCone.fst s).base (PullbackCone.snd s).base
                (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base)) ⁻¹'
            ↑U.unop,
        is_open' :=
          (_ :
            IsOpen
              (↑(pullback.lift (PullbackCone.fst s).base (PullbackCone.snd s).base
                    (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base)) ⁻¹'
                ↑U.unop)) }
[PROOFSTEP]
congr 2
[GOAL]
case e_x.e_carrier
C : Type u_1
inst✝ : Category.{?u.123565, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
U : (Opens ↑↑(pullbackConeOfLeft f g).pt)ᵒᵖ
⊢ ↑(PullbackCone.snd s).base ⁻¹'
      ↑(op { carrier := ↑pullback.snd '' ↑U.unop, is_open' := (_ : IsOpen (↑pullback.snd '' ↑U.unop)) }).unop =
    ↑(pullback.lift (PullbackCone.fst s).base (PullbackCone.snd s).base
          (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base)) ⁻¹'
      ↑U.unop
[PROOFSTEP]
let s' : PullbackCone f.base g.base := PullbackCone.mk s.fst.base s.snd.base (congr_arg Hom.base s.condition)
[GOAL]
case e_x.e_carrier
C : Type u_1
inst✝ : Category.{?u.123565, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
U : (Opens ↑↑(pullbackConeOfLeft f g).pt)ᵒᵖ
s' : PullbackCone f.base g.base :=
  PullbackCone.mk (PullbackCone.fst s).base (PullbackCone.snd s).base
    (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base)
⊢ ↑(PullbackCone.snd s).base ⁻¹'
      ↑(op { carrier := ↑pullback.snd '' ↑U.unop, is_open' := (_ : IsOpen (↑pullback.snd '' ↑U.unop)) }).unop =
    ↑(pullback.lift (PullbackCone.fst s).base (PullbackCone.snd s).base
          (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base)) ⁻¹'
      ↑U.unop
[PROOFSTEP]
have : _ = s.snd.base := limit.lift_π s' WalkingCospan.right
[GOAL]
case e_x.e_carrier
C : Type u_1
inst✝ : Category.{?u.123565, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
U : (Opens ↑↑(pullbackConeOfLeft f g).pt)ᵒᵖ
s' : PullbackCone f.base g.base :=
  PullbackCone.mk (PullbackCone.fst s).base (PullbackCone.snd s).base
    (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base)
this :
  limit.lift (cospan f.base g.base) s' ≫ limit.π (cospan f.base g.base) WalkingCospan.right = (PullbackCone.snd s).base
⊢ ↑(PullbackCone.snd s).base ⁻¹'
      ↑(op { carrier := ↑pullback.snd '' ↑U.unop, is_open' := (_ : IsOpen (↑pullback.snd '' ↑U.unop)) }).unop =
    ↑(pullback.lift (PullbackCone.fst s).base (PullbackCone.snd s).base
          (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base)) ⁻¹'
      ↑U.unop
[PROOFSTEP]
conv_lhs =>
  erw [← this]
  dsimp
    -- Porting note : need a bit more hand holding here about function composition
  rw [coe_comp, show ∀ f g, f ∘ g = fun x => f (g x) from fun _ _ => rfl]
  erw [← Set.preimage_preimage]
[GOAL]
C : Type u_1
inst✝ : Category.{?u.123565, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
U : (Opens ↑↑(pullbackConeOfLeft f g).pt)ᵒᵖ
s' : PullbackCone f.base g.base :=
  PullbackCone.mk (PullbackCone.fst s).base (PullbackCone.snd s).base
    (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base)
this :
  limit.lift (cospan f.base g.base) s' ≫ limit.π (cospan f.base g.base) WalkingCospan.right = (PullbackCone.snd s).base
| ↑(PullbackCone.snd s).base ⁻¹'
    ↑(op { carrier := ↑pullback.snd '' ↑U.unop, is_open' := (_ : IsOpen (↑pullback.snd '' ↑U.unop)) }).unop
[PROOFSTEP]
  erw [← this]
  dsimp
    -- Porting note : need a bit more hand holding here about function composition
  rw [coe_comp, show ∀ f g, f ∘ g = fun x => f (g x) from fun _ _ => rfl]
  erw [← Set.preimage_preimage]
[GOAL]
C : Type u_1
inst✝ : Category.{?u.123565, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
U : (Opens ↑↑(pullbackConeOfLeft f g).pt)ᵒᵖ
s' : PullbackCone f.base g.base :=
  PullbackCone.mk (PullbackCone.fst s).base (PullbackCone.snd s).base
    (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base)
this :
  limit.lift (cospan f.base g.base) s' ≫ limit.π (cospan f.base g.base) WalkingCospan.right = (PullbackCone.snd s).base
| ↑(PullbackCone.snd s).base ⁻¹'
    ↑(op { carrier := ↑pullback.snd '' ↑U.unop, is_open' := (_ : IsOpen (↑pullback.snd '' ↑U.unop)) }).unop
[PROOFSTEP]
  erw [← this]
  dsimp
    -- Porting note : need a bit more hand holding here about function composition
  rw [coe_comp, show ∀ f g, f ∘ g = fun x => f (g x) from fun _ _ => rfl]
  erw [← Set.preimage_preimage]
[GOAL]
C : Type u_1
inst✝ : Category.{?u.123565, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
U : (Opens ↑↑(pullbackConeOfLeft f g).pt)ᵒᵖ
s' : PullbackCone f.base g.base :=
  PullbackCone.mk (PullbackCone.fst s).base (PullbackCone.snd s).base
    (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base)
this :
  limit.lift (cospan f.base g.base) s' ≫ limit.π (cospan f.base g.base) WalkingCospan.right = (PullbackCone.snd s).base
| ↑(PullbackCone.snd s).base ⁻¹'
    ↑(op { carrier := ↑pullback.snd '' ↑U.unop, is_open' := (_ : IsOpen (↑pullback.snd '' ↑U.unop)) }).unop
[PROOFSTEP]
erw [← this]
[GOAL]
C : Type u_1
inst✝ : Category.{?u.123565, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
U : (Opens ↑↑(pullbackConeOfLeft f g).pt)ᵒᵖ
s' : PullbackCone f.base g.base :=
  PullbackCone.mk (PullbackCone.fst s).base (PullbackCone.snd s).base
    (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base)
this :
  limit.lift (cospan f.base g.base) s' ≫ limit.π (cospan f.base g.base) WalkingCospan.right = (PullbackCone.snd s).base
| ↑(limit.lift (cospan f.base g.base) s' ≫ limit.π (cospan f.base g.base) WalkingCospan.right) ⁻¹'
    ↑(op { carrier := ↑pullback.snd '' ↑U.unop, is_open' := (_ : IsOpen (↑pullback.snd '' ↑U.unop)) }).unop
[PROOFSTEP]
dsimp
  -- Porting note : need a bit more hand holding here about function composition
[GOAL]
C : Type u_1
inst✝ : Category.{?u.123565, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
U : (Opens ↑↑(pullbackConeOfLeft f g).pt)ᵒᵖ
s' : PullbackCone f.base g.base :=
  PullbackCone.mk (PullbackCone.fst s).base (PullbackCone.snd s).base
    (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base)
this :
  limit.lift (cospan f.base g.base) s' ≫ limit.π (cospan f.base g.base) WalkingCospan.right = (PullbackCone.snd s).base
| ↑(limit.lift (cospan f.base g.base)
          (PullbackCone.mk (PullbackCone.fst s).base (PullbackCone.snd s).base
            (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base)) ≫
        limit.π (cospan f.base g.base) WalkingCospan.right) ⁻¹'
    (↑pullback.snd '' ↑U.unop)
[PROOFSTEP]
rw [coe_comp, show ∀ f g, f ∘ g = fun x => f (g x) from fun _ _ => rfl]
[GOAL]
C : Type u_1
inst✝ : Category.{?u.123565, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
U : (Opens ↑↑(pullbackConeOfLeft f g).pt)ᵒᵖ
s' : PullbackCone f.base g.base :=
  PullbackCone.mk (PullbackCone.fst s).base (PullbackCone.snd s).base
    (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base)
this :
  limit.lift (cospan f.base g.base) s' ≫ limit.π (cospan f.base g.base) WalkingCospan.right = (PullbackCone.snd s).base
| (fun x =>
      ↑(limit.π (cospan f.base g.base) WalkingCospan.right)
        (↑(limit.lift (cospan f.base g.base)
              (PullbackCone.mk (PullbackCone.fst s).base (PullbackCone.snd s).base
                (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base)))
          x)) ⁻¹'
    (↑pullback.snd '' ↑U.unop)
[PROOFSTEP]
erw [← Set.preimage_preimage]
[GOAL]
case e_x.e_carrier
C : Type u_1
inst✝ : Category.{?u.123565, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
U : (Opens ↑↑(pullbackConeOfLeft f g).pt)ᵒᵖ
s' : PullbackCone f.base g.base :=
  PullbackCone.mk (PullbackCone.fst s).base (PullbackCone.snd s).base
    (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base)
this :
  limit.lift (cospan f.base g.base) s' ≫ limit.π (cospan f.base g.base) WalkingCospan.right = (PullbackCone.snd s).base
⊢ (fun x =>
        ↑(limit.lift (cospan f.base g.base)
              (PullbackCone.mk (PullbackCone.fst s).base (PullbackCone.snd s).base
                (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base)))
          x) ⁻¹'
      (↑(limit.π (cospan f.base g.base) WalkingCospan.right) ⁻¹' (↑pullback.snd '' ↑U.unop)) =
    ↑(pullback.lift (PullbackCone.fst s).base (PullbackCone.snd s).base
          (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base)) ⁻¹'
      ↑U.unop
[PROOFSTEP]
erw [Set.preimage_image_eq _ (TopCat.snd_openEmbedding_of_left_openEmbedding hf.base_open g.base).inj]
[GOAL]
case e_x.e_carrier
C : Type u_1
inst✝ : Category.{?u.123565, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
U : (Opens ↑↑(pullbackConeOfLeft f g).pt)ᵒᵖ
s' : PullbackCone f.base g.base :=
  PullbackCone.mk (PullbackCone.fst s).base (PullbackCone.snd s).base
    (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base)
this :
  limit.lift (cospan f.base g.base) s' ≫ limit.π (cospan f.base g.base) WalkingCospan.right = (PullbackCone.snd s).base
⊢ (fun x =>
        ↑(limit.lift (cospan f.base g.base)
              (PullbackCone.mk (PullbackCone.fst s).base (PullbackCone.snd s).base
                (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base)))
          x) ⁻¹'
      ↑U.unop =
    ↑(pullback.lift (PullbackCone.fst s).base (PullbackCone.snd s).base
          (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base)) ⁻¹'
      ↑U.unop
[PROOFSTEP]
rfl
[GOAL]
C : Type u_1
inst✝ : Category.{?u.123565, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
U V : (Opens ↑↑(pullbackConeOfLeft f g).pt)ᵒᵖ
i : U ⟶ V
⊢ (pullbackConeOfLeft f g).pt.presheaf.map i ≫
      (fun U =>
          NatTrans.app (PullbackCone.snd s).c ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj U) ≫
            s.pt.presheaf.map
              (eqToHom
                (_ :
                  (Opens.map (PullbackCone.snd s).base).op.obj
                      ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj U) =
                    (Opens.map
                            (pullback.lift (PullbackCone.fst s).base (PullbackCone.snd s).base
                              (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base))).op.obj
                      U)))
        V =
    (fun U =>
          NatTrans.app (PullbackCone.snd s).c ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj U) ≫
            s.pt.presheaf.map
              (eqToHom
                (_ :
                  (Opens.map (PullbackCone.snd s).base).op.obj
                      ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj U) =
                    (Opens.map
                            (pullback.lift (PullbackCone.fst s).base (PullbackCone.snd s).base
                              (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base))).op.obj
                      U)))
        U ≫
      (pullback.lift (PullbackCone.fst s).base (PullbackCone.snd s).base
              (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base) _*
            s.pt.presheaf).map
        i
[PROOFSTEP]
erw [s.snd.c.naturality_assoc]
[GOAL]
C : Type u_1
inst✝ : Category.{?u.123565, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
U V : (Opens ↑↑(pullbackConeOfLeft f g).pt)ᵒᵖ
i : U ⟶ V
⊢ NatTrans.app (PullbackCone.snd s).c ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj U) ≫
      ((PullbackCone.snd s).base _* s.pt.presheaf).map ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.map i) ≫
        s.pt.presheaf.map
          (eqToHom
            (_ :
              (Opens.map (PullbackCone.snd s).base).op.obj
                  ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj V) =
                (Opens.map
                        (pullback.lift (PullbackCone.fst s).base (PullbackCone.snd s).base
                          (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base))).op.obj
                  V)) =
    (fun U =>
          NatTrans.app (PullbackCone.snd s).c ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj U) ≫
            s.pt.presheaf.map
              (eqToHom
                (_ :
                  (Opens.map (PullbackCone.snd s).base).op.obj
                      ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj U) =
                    (Opens.map
                            (pullback.lift (PullbackCone.fst s).base (PullbackCone.snd s).base
                              (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base))).op.obj
                      U)))
        U ≫
      (pullback.lift (PullbackCone.fst s).base (PullbackCone.snd s).base
              (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base) _*
            s.pt.presheaf).map
        i
[PROOFSTEP]
rw [Category.assoc]
[GOAL]
C : Type u_1
inst✝ : Category.{?u.123565, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
U V : (Opens ↑↑(pullbackConeOfLeft f g).pt)ᵒᵖ
i : U ⟶ V
⊢ NatTrans.app (PullbackCone.snd s).c ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj U) ≫
      ((PullbackCone.snd s).base _* s.pt.presheaf).map ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.map i) ≫
        s.pt.presheaf.map
          (eqToHom
            (_ :
              (Opens.map (PullbackCone.snd s).base).op.obj
                  ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj V) =
                (Opens.map
                        (pullback.lift (PullbackCone.fst s).base (PullbackCone.snd s).base
                          (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base))).op.obj
                  V)) =
    NatTrans.app (PullbackCone.snd s).c ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj U) ≫
      s.pt.presheaf.map
          (eqToHom
            (_ :
              (Opens.map (PullbackCone.snd s).base).op.obj
                  ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj U) =
                (Opens.map
                        (pullback.lift (PullbackCone.fst s).base (PullbackCone.snd s).base
                          (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base))).op.obj
                  U)) ≫
        (pullback.lift (PullbackCone.fst s).base (PullbackCone.snd s).base
                (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base) _*
              s.pt.presheaf).map
          i
[PROOFSTEP]
erw [← s.pt.presheaf.map_comp, ← s.pt.presheaf.map_comp]
[GOAL]
C : Type u_1
inst✝ : Category.{?u.123565, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
U V : (Opens ↑↑(pullbackConeOfLeft f g).pt)ᵒᵖ
i : U ⟶ V
⊢ NatTrans.app (PullbackCone.snd s).c ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj U) ≫
      s.pt.presheaf.map
        ((Opens.map (PullbackCone.snd s).base).op.map ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.map i) ≫
          eqToHom
            (_ :
              (Opens.map (PullbackCone.snd s).base).op.obj
                  ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj V) =
                (Opens.map
                        (pullback.lift (PullbackCone.fst s).base (PullbackCone.snd s).base
                          (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base))).op.obj
                  V)) =
    NatTrans.app (PullbackCone.snd s).c ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj U) ≫
      s.pt.presheaf.map
        (eqToHom
            (_ :
              (Opens.map (PullbackCone.snd s).base).op.obj
                  ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj U) =
                (Opens.map
                        (pullback.lift (PullbackCone.fst s).base (PullbackCone.snd s).base
                          (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base))).op.obj
                  U) ≫
          (Opens.map
                  (pullback.lift (PullbackCone.fst s).base (PullbackCone.snd s).base
                    (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base))).op.map
            i)
[PROOFSTEP]
congr 1
[GOAL]
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
⊢ pullbackConeOfLeftLift f g s ≫ PullbackCone.fst (pullbackConeOfLeft f g) = PullbackCone.fst s
[PROOFSTEP]
refine PresheafedSpace.Hom.ext _ _ ?_ <| NatTrans.ext _ _ <| funext fun x => ?_
[GOAL]
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
s : PullbackCone f g
⊢ (pullbackConeOfLeftLift f g s ≫ PullbackCone.fst (pullbackConeOfLeft f g)).base = (PullbackCone.fst s).base
[PROOFSTEP]
change pullback.lift _ _ _ ≫ pullback.fst = _
[GOAL]
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
s : PullbackCone f g
⊢ pullback.lift (PullbackCone.fst s).base (PullbackCone.snd s).base
        (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base) ≫
      pullback.fst =
    (PullbackCone.fst s).base
[PROOFSTEP]
simp
[GOAL]
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 ↑↑X)ᵒᵖ
⊢ NatTrans.app
      ((pullbackConeOfLeftLift f g s ≫ PullbackCone.fst (pullbackConeOfLeft f g)).c ≫
        whiskerRight
          (eqToHom
            (_ :
              (Opens.map (pullbackConeOfLeftLift f g s ≫ PullbackCone.fst (pullbackConeOfLeft f g)).base).op =
                (Opens.map (PullbackCone.fst s).base).op))
          s.pt.presheaf)
      x =
    NatTrans.app (PullbackCone.fst s).c x
[PROOFSTEP]
induction x using Opposite.rec' with
| h x => ?_
[GOAL]
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 ↑↑X)ᵒᵖ
⊢ NatTrans.app
      ((pullbackConeOfLeftLift f g s ≫ PullbackCone.fst (pullbackConeOfLeft f g)).c ≫
        whiskerRight
          (eqToHom
            (_ :
              (Opens.map (pullbackConeOfLeftLift f g s ≫ PullbackCone.fst (pullbackConeOfLeft f g)).base).op =
                (Opens.map (PullbackCone.fst s).base).op))
          s.pt.presheaf)
      x =
    NatTrans.app (PullbackCone.fst s).c x
[PROOFSTEP]
induction x using Opposite.rec' with
| h x => ?_
[GOAL]
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
s : PullbackCone f g
x : Opens ↑↑X
⊢ NatTrans.app
      ((pullbackConeOfLeftLift f g s ≫ PullbackCone.fst (pullbackConeOfLeft f g)).c ≫
        whiskerRight
          (eqToHom
            (_ :
              (Opens.map (pullbackConeOfLeftLift f g s ≫ PullbackCone.fst (pullbackConeOfLeft f g)).base).op =
                (Opens.map (PullbackCone.fst s).base).op))
          s.pt.presheaf)
      (op x) =
    NatTrans.app (PullbackCone.fst s).c (op x)
[PROOFSTEP]
change ((_ ≫ _) ≫ _ ≫ _) ≫ _ = _
[GOAL]
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
s : PullbackCone f g
x : Opens ↑↑X
⊢ ((invApp hf (op x).unop ≫
          NatTrans.app g.c (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))))) ≫
        NatTrans.app (PullbackCone.snd s).c
            ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj
              ((Opens.map (PullbackCone.fst (pullbackConeOfLeft f g)).base).op.obj (op x))) ≫
          s.pt.presheaf.map
            (eqToHom
              (_ :
                (Opens.map (PullbackCone.snd s).base).op.obj
                    ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj
                      ((Opens.map (PullbackCone.fst (pullbackConeOfLeft f g)).base).op.obj (op 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.fst (pullbackConeOfLeft f g)).base).op.obj (op x))))) ≫
      NatTrans.app
        (whiskerRight
          (eqToHom
            (_ :
              (Opens.map (pullbackConeOfLeftLift f g s ≫ PullbackCone.fst (pullbackConeOfLeft f g)).base).op =
                (Opens.map (PullbackCone.fst s).base).op))
          s.pt.presheaf)
        (op x) =
    NatTrans.app (PullbackCone.fst s).c (op x)
[PROOFSTEP]
simp_rw [Category.assoc]
[GOAL]
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
s : PullbackCone f g
x : Opens ↑↑X
⊢ invApp hf (op x).unop ≫
      NatTrans.app g.c (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)))) ≫
          NatTrans.app (PullbackCone.snd s).c
              ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj
                ((Opens.map (PullbackCone.fst (pullbackConeOfLeft f g)).base).op.obj (op x))) ≫
            s.pt.presheaf.map
                (eqToHom
                  (_ :
                    (Opens.map (PullbackCone.snd s).base).op.obj
                        ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj
                          ((Opens.map (PullbackCone.fst (pullbackConeOfLeft f g)).base).op.obj (op 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.fst (pullbackConeOfLeft f g)).base).op.obj (op x)))) ≫
              NatTrans.app
                (whiskerRight
                  (eqToHom
                    (_ :
                      (Opens.map (pullbackConeOfLeftLift f g s ≫ PullbackCone.fst (pullbackConeOfLeft f g)).base).op =
                        (Opens.map (PullbackCone.fst s).base).op))
                  s.pt.presheaf)
                (op x) =
    NatTrans.app (PullbackCone.fst s).c (op x)
[PROOFSTEP]
erw [← s.pt.presheaf.map_comp]
[GOAL]
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
s : PullbackCone f g
x : Opens ↑↑X
⊢ invApp hf (op x).unop ≫
      NatTrans.app g.c (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)))) ≫
          NatTrans.app (PullbackCone.snd s).c
              ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj
                ((Opens.map (PullbackCone.fst (pullbackConeOfLeft f g)).base).op.obj (op x))) ≫
            s.pt.presheaf.map
              (eqToHom
                  (_ :
                    (Opens.map (PullbackCone.snd s).base).op.obj
                        ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj
                          ((Opens.map (PullbackCone.fst (pullbackConeOfLeft f g)).base).op.obj (op 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.fst (pullbackConeOfLeft f g)).base).op.obj (op x))) ≫
                NatTrans.app
                  (eqToHom
                    (_ :
                      (Opens.map (pullbackConeOfLeftLift f g s ≫ PullbackCone.fst (pullbackConeOfLeft f g)).base).op =
                        (Opens.map (PullbackCone.fst s).base).op))
                  (op x)) =
    NatTrans.app (PullbackCone.fst s).c (op x)
[PROOFSTEP]
erw [s.snd.c.naturality_assoc]
[GOAL]
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
s : PullbackCone f g
x : Opens ↑↑X
⊢ invApp hf (op x).unop ≫
      NatTrans.app g.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑f.base)).obj (op x).unop)) ≫
        NatTrans.app (PullbackCone.snd s).c
            ((Opens.map g.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f.base)).obj (op x).unop))) ≫
          ((PullbackCone.snd s).base _* s.pt.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)))) ≫
            s.pt.presheaf.map
              (eqToHom
                  (_ :
                    (Opens.map (PullbackCone.snd s).base).op.obj
                        ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj
                          ((Opens.map (PullbackCone.fst (pullbackConeOfLeft f g)).base).op.obj (op 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.fst (pullbackConeOfLeft f g)).base).op.obj (op x))) ≫
                NatTrans.app
                  (eqToHom
                    (_ :
                      (Opens.map (pullbackConeOfLeftLift f g s ≫ PullbackCone.fst (pullbackConeOfLeft f g)).base).op =
                        (Opens.map (PullbackCone.fst s).base).op))
                  (op x)) =
    NatTrans.app (PullbackCone.fst s).c (op x)
[PROOFSTEP]
have := congr_app s.condition (op (hf.openFunctor.obj x))
[GOAL]
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
s : PullbackCone f g
x : Opens ↑↑X
this :
  NatTrans.app (PullbackCone.fst s ≫ f).c (op ((openFunctor hf).obj x)) =
    NatTrans.app (PullbackCone.snd s ≫ g).c (op ((openFunctor hf).obj x)) ≫
      s.pt.presheaf.map
        (eqToHom
          (_ :
            (Opens.map (PullbackCone.snd s ≫ g).base).op.obj (op ((openFunctor hf).obj x)) =
              (Opens.map (PullbackCone.fst s ≫ f).base).op.obj (op ((openFunctor hf).obj x))))
⊢ invApp hf (op x).unop ≫
      NatTrans.app g.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑f.base)).obj (op x).unop)) ≫
        NatTrans.app (PullbackCone.snd s).c
            ((Opens.map g.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f.base)).obj (op x).unop))) ≫
          ((PullbackCone.snd s).base _* s.pt.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)))) ≫
            s.pt.presheaf.map
              (eqToHom
                  (_ :
                    (Opens.map (PullbackCone.snd s).base).op.obj
                        ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj
                          ((Opens.map (PullbackCone.fst (pullbackConeOfLeft f g)).base).op.obj (op 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.fst (pullbackConeOfLeft f g)).base).op.obj (op x))) ≫
                NatTrans.app
                  (eqToHom
                    (_ :
                      (Opens.map (pullbackConeOfLeftLift f g s ≫ PullbackCone.fst (pullbackConeOfLeft f g)).base).op =
                        (Opens.map (PullbackCone.fst s).base).op))
                  (op x)) =
    NatTrans.app (PullbackCone.fst s).c (op x)
[PROOFSTEP]
dsimp only [comp_c_app, unop_op] at this
[GOAL]
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
s : PullbackCone f g
x : Opens ↑↑X
this :
  NatTrans.app f.c (op ((openFunctor hf).obj x)) ≫
      NatTrans.app (PullbackCone.fst s).c (op ((Opens.map f.base).obj ((openFunctor hf).obj x))) =
    (NatTrans.app g.c (op ((openFunctor hf).obj x)) ≫
        NatTrans.app (PullbackCone.snd s).c (op ((Opens.map g.base).obj ((openFunctor hf).obj x)))) ≫
      s.pt.presheaf.map
        (eqToHom
          (_ :
            (Opens.map (PullbackCone.snd s ≫ g).base).op.obj (op ((openFunctor hf).obj x)) =
              (Opens.map (PullbackCone.fst s ≫ f).base).op.obj (op ((openFunctor hf).obj x))))
⊢ invApp hf (op x).unop ≫
      NatTrans.app g.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑f.base)).obj (op x).unop)) ≫
        NatTrans.app (PullbackCone.snd s).c
            ((Opens.map g.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f.base)).obj (op x).unop))) ≫
          ((PullbackCone.snd s).base _* s.pt.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)))) ≫
            s.pt.presheaf.map
              (eqToHom
                  (_ :
                    (Opens.map (PullbackCone.snd s).base).op.obj
                        ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj
                          ((Opens.map (PullbackCone.fst (pullbackConeOfLeft f g)).base).op.obj (op 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.fst (pullbackConeOfLeft f g)).base).op.obj (op x))) ≫
                NatTrans.app
                  (eqToHom
                    (_ :
                      (Opens.map (pullbackConeOfLeftLift f g s ≫ PullbackCone.fst (pullbackConeOfLeft f g)).base).op =
                        (Opens.map (PullbackCone.fst s).base).op))
                  (op x)) =
    NatTrans.app (PullbackCone.fst s).c (op x)
[PROOFSTEP]
rw [← IsIso.comp_inv_eq] at this
[GOAL]
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
s : PullbackCone f g
x : Opens ↑↑X
this :
  (NatTrans.app f.c (op ((openFunctor hf).obj x)) ≫
        NatTrans.app (PullbackCone.fst s).c (op ((Opens.map f.base).obj ((openFunctor hf).obj x)))) ≫
      inv
        (s.pt.presheaf.map
          (eqToHom
            (_ :
              (Opens.map (PullbackCone.snd s ≫ g).base).op.obj (op ((openFunctor hf).obj x)) =
                (Opens.map (PullbackCone.fst s ≫ f).base).op.obj (op ((openFunctor hf).obj x))))) =
    NatTrans.app g.c (op ((openFunctor hf).obj x)) ≫
      NatTrans.app (PullbackCone.snd s).c (op ((Opens.map g.base).obj ((openFunctor hf).obj x)))
⊢ invApp hf (op x).unop ≫
      NatTrans.app g.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑f.base)).obj (op x).unop)) ≫
        NatTrans.app (PullbackCone.snd s).c
            ((Opens.map g.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f.base)).obj (op x).unop))) ≫
          ((PullbackCone.snd s).base _* s.pt.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)))) ≫
            s.pt.presheaf.map
              (eqToHom
                  (_ :
                    (Opens.map (PullbackCone.snd s).base).op.obj
                        ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj
                          ((Opens.map (PullbackCone.fst (pullbackConeOfLeft f g)).base).op.obj (op 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.fst (pullbackConeOfLeft f g)).base).op.obj (op x))) ≫
                NatTrans.app
                  (eqToHom
                    (_ :
                      (Opens.map (pullbackConeOfLeftLift f g s ≫ PullbackCone.fst (pullbackConeOfLeft f g)).base).op =
                        (Opens.map (PullbackCone.fst s).base).op))
                  (op x)) =
    NatTrans.app (PullbackCone.fst s).c (op x)
[PROOFSTEP]
replace this := reassoc_of% this
[GOAL]
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
s : PullbackCone f g
x : Opens ↑↑X
this :
  ∀ {Z_1 : C} (h : ((PullbackCone.snd s ≫ g).base _* s.pt.presheaf).obj (op ((openFunctor hf).obj x)) ⟶ Z_1),
    NatTrans.app f.c (op ((openFunctor hf).obj x)) ≫
        NatTrans.app (PullbackCone.fst s).c (op ((Opens.map f.base).obj ((openFunctor hf).obj x))) ≫
          inv
              (s.pt.presheaf.map
                (eqToHom
                  (_ :
                    (Opens.map (PullbackCone.snd s ≫ g).base).op.obj (op ((openFunctor hf).obj x)) =
                      (Opens.map (PullbackCone.fst s ≫ f).base).op.obj (op ((openFunctor hf).obj x))))) ≫
            h =
      NatTrans.app g.c (op ((openFunctor hf).obj x)) ≫
        NatTrans.app (PullbackCone.snd s).c (op ((Opens.map g.base).obj ((openFunctor hf).obj x))) ≫ h
⊢ invApp hf (op x).unop ≫
      NatTrans.app g.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑f.base)).obj (op x).unop)) ≫
        NatTrans.app (PullbackCone.snd s).c
            ((Opens.map g.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f.base)).obj (op x).unop))) ≫
          ((PullbackCone.snd s).base _* s.pt.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)))) ≫
            s.pt.presheaf.map
              (eqToHom
                  (_ :
                    (Opens.map (PullbackCone.snd s).base).op.obj
                        ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj
                          ((Opens.map (PullbackCone.fst (pullbackConeOfLeft f g)).base).op.obj (op 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.fst (pullbackConeOfLeft f g)).base).op.obj (op x))) ≫
                NatTrans.app
                  (eqToHom
                    (_ :
                      (Opens.map (pullbackConeOfLeftLift f g s ≫ PullbackCone.fst (pullbackConeOfLeft f g)).base).op =
                        (Opens.map (PullbackCone.fst s).base).op))
                  (op x)) =
    NatTrans.app (PullbackCone.fst s).c (op x)
[PROOFSTEP]
erw [← this, hf.invApp_app_assoc, s.fst.c.naturality_assoc]
[GOAL]
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
s : PullbackCone f g
x : Opens ↑↑X
this :
  ∀ {Z_1 : C} (h : ((PullbackCone.snd s ≫ g).base _* s.pt.presheaf).obj (op ((openFunctor hf).obj x)) ⟶ Z_1),
    NatTrans.app f.c (op ((openFunctor hf).obj x)) ≫
        NatTrans.app (PullbackCone.fst s).c (op ((Opens.map f.base).obj ((openFunctor hf).obj x))) ≫
          inv
              (s.pt.presheaf.map
                (eqToHom
                  (_ :
                    (Opens.map (PullbackCone.snd s ≫ g).base).op.obj (op ((openFunctor hf).obj x)) =
                      (Opens.map (PullbackCone.fst s ≫ f).base).op.obj (op ((openFunctor hf).obj x))))) ≫
            h =
      NatTrans.app g.c (op ((openFunctor hf).obj x)) ≫
        NatTrans.app (PullbackCone.snd s).c (op ((Opens.map g.base).obj ((openFunctor hf).obj x))) ≫ h
⊢ NatTrans.app (PullbackCone.fst s).c (op (op x).unop) ≫
      ((PullbackCone.fst s).base _* s.pt.presheaf).map
          (eqToHom (_ : op (op x).unop = op ((Opens.map f.base).obj (op ((openFunctor hf).obj (op x).unop)).unop))) ≫
        inv
            (s.pt.presheaf.map
              (eqToHom
                (_ :
                  (Opens.map (PullbackCone.snd s ≫ g).base).op.obj (op ((openFunctor hf).obj x)) =
                    (Opens.map (PullbackCone.fst s ≫ f).base).op.obj (op ((openFunctor hf).obj x))))) ≫
          ((PullbackCone.snd s).base _* s.pt.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)))) ≫
            s.pt.presheaf.map
              (eqToHom
                  (_ :
                    (Opens.map (PullbackCone.snd s).base).op.obj
                        ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj
                          ((Opens.map (PullbackCone.fst (pullbackConeOfLeft f g)).base).op.obj (op 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.fst (pullbackConeOfLeft f g)).base).op.obj (op x))) ≫
                NatTrans.app
                  (eqToHom
                    (_ :
                      (Opens.map (pullbackConeOfLeftLift f g s ≫ PullbackCone.fst (pullbackConeOfLeft f g)).base).op =
                        (Opens.map (PullbackCone.fst s).base).op))
                  (op x)) =
    NatTrans.app (PullbackCone.fst s).c (op x)
[PROOFSTEP]
simp [eqToHom_map]
[GOAL]
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
⊢ pullbackConeOfLeftLift f g s ≫ PullbackCone.snd (pullbackConeOfLeft f g) = PullbackCone.snd s
[PROOFSTEP]
refine PresheafedSpace.Hom.ext _ _ ?_ <| NatTrans.ext _ _ <| funext fun x => ?_
[GOAL]
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
s : PullbackCone f g
⊢ (pullbackConeOfLeftLift f g s ≫ PullbackCone.snd (pullbackConeOfLeft f g)).base = (PullbackCone.snd s).base
[PROOFSTEP]
change pullback.lift _ _ _ ≫ pullback.snd = _
[GOAL]
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
s : PullbackCone f g
⊢ pullback.lift (PullbackCone.fst s).base (PullbackCone.snd s).base
        (_ : (PullbackCone.fst s ≫ f).base = (PullbackCone.snd s ≫ g).base) ≫
      pullback.snd =
    (PullbackCone.snd s).base
[PROOFSTEP]
simp
[GOAL]
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)ᵒᵖ
⊢ NatTrans.app
      ((pullbackConeOfLeftLift f g s ≫ PullbackCone.snd (pullbackConeOfLeft f g)).c ≫
        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)
      x =
    NatTrans.app (PullbackCone.snd s).c x
[PROOFSTEP]
change (_ ≫ _ ≫ _) ≫ _ = _
[GOAL]
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)ᵒᵖ
⊢ (NatTrans.app (PullbackCone.snd (pullbackConeOfLeft f g)).c x ≫
        NatTrans.app (PullbackCone.snd s).c
            ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj
              ((Opens.map (PullbackCone.snd (pullbackConeOfLeft f g)).base).op.obj x)) ≫
          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)))) ≫
      NatTrans.app
        (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)
        x =
    NatTrans.app (PullbackCone.snd s).c x
[PROOFSTEP]
simp_rw [Category.assoc]
[GOAL]
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)ᵒᵖ
⊢ NatTrans.app (PullbackCone.snd (pullbackConeOfLeft f g)).c x ≫
      NatTrans.app (PullbackCone.snd s).c
          ((IsOpenMap.functor (_ : IsOpenMap ↑pullback.snd)).op.obj
            ((Opens.map (PullbackCone.snd (pullbackConeOfLeft f g)).base).op.obj x)) ≫
        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))) ≫
          NatTrans.app
            (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)
            x =
    NatTrans.app (PullbackCone.snd s).c x
[PROOFSTEP]
erw [s.snd.c.naturality_assoc]
[GOAL]
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)ᵒᵖ
⊢ NatTrans.app (PullbackCone.snd s).c x ≫
      ((PullbackCone.snd s).base _* s.pt.presheaf).map
          (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑pullback.snd)).counit 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))) ≫
          NatTrans.app
            (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)
            x =
    NatTrans.app (PullbackCone.snd s).c x
[PROOFSTEP]
erw [← s.pt.presheaf.map_comp, ← s.pt.presheaf.map_comp]
[GOAL]
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)ᵒᵖ
⊢ NatTrans.app (PullbackCone.snd s).c x ≫
      s.pt.presheaf.map
        ((Opens.map (PullbackCone.snd s).base).op.map
            (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑pullback.snd)).counit 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)) ≫
            NatTrans.app
              (eqToHom
                (_ :
                  (Opens.map (pullbackConeOfLeftLift f g s ≫ PullbackCone.snd (pullbackConeOfLeft f g)).base).op =
                    (Opens.map (PullbackCone.snd s).base).op))
              x) =
    NatTrans.app (PullbackCone.snd s).c x
[PROOFSTEP]
trans s.snd.c.app x ≫ s.pt.presheaf.map (𝟙 _)
[GOAL]
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)ᵒᵖ
⊢ NatTrans.app (PullbackCone.snd s).c x ≫
      s.pt.presheaf.map
        ((Opens.map (PullbackCone.snd s).base).op.map
            (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑pullback.snd)).counit 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)) ≫
            NatTrans.app
              (eqToHom
                (_ :
                  (Opens.map (pullbackConeOfLeftLift f g s ≫ PullbackCone.snd (pullbackConeOfLeft f g)).base).op =
                    (Opens.map (PullbackCone.snd s).base).op))
              x) =
    NatTrans.app (PullbackCone.snd s).c x ≫ s.pt.presheaf.map (𝟙 ((Opens.map (PullbackCone.snd s).base).op.obj x))
[PROOFSTEP]
congr 1
[GOAL]
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)ᵒᵖ
⊢ NatTrans.app (PullbackCone.snd s).c x ≫ s.pt.presheaf.map (𝟙 ((Opens.map (PullbackCone.snd s).base).op.obj x)) =
    NatTrans.app (PullbackCone.snd s).c x
[PROOFSTEP]
rw [s.pt.presheaf.map_id]
[GOAL]
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)ᵒᵖ
⊢ NatTrans.app (PullbackCone.snd s).c x ≫ 𝟙 (s.pt.presheaf.obj ((Opens.map (PullbackCone.snd s).base).op.obj x)) =
    NatTrans.app (PullbackCone.snd s).c x
[PROOFSTEP]
erw [Category.comp_id]
[GOAL]
C : Type u_1
inst✝ : Category.{?u.214204, 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))
[PROOFSTEP]
erw [CategoryTheory.Limits.PullbackCone.mk_snd]
[GOAL]
C : Type u_1
inst✝ : Category.{?u.214204, 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))
[PROOFSTEP]
infer_instance
[GOAL]
C : Type u_1
inst✝ : Category.{?u.215564, 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)
[PROOFSTEP]
apply PullbackCone.isLimitAux'
[GOAL]
case create
C : Type u_1
inst✝ : Category.{?u.215564, 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 }
[PROOFSTEP]
intro s
[GOAL]
case create
C : Type u_1
inst✝ : Category.{?u.215564, 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 }
[PROOFSTEP]
use pullbackConeOfLeftLift f g s
[GOAL]
case property
C : Type u_1
inst✝ : Category.{?u.215564, 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
[PROOFSTEP]
use pullbackConeOfLeftLift_fst f g s
[GOAL]
case right
C : Type u_1
inst✝ : Category.{?u.215564, 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
[PROOFSTEP]
use pullbackConeOfLeftLift_snd f g s
[GOAL]
case right
C : Type u_1
inst✝ : Category.{?u.215564, 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
[PROOFSTEP]
intro m _ h₂
[GOAL]
case right
C : Type u_1
inst✝ : Category.{?u.215564, 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
[PROOFSTEP]
rw [← cancel_mono (pullbackConeOfLeft f g).snd]
[GOAL]
case right
C : Type u_1
inst✝ : Category.{?u.215564, 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)
[PROOFSTEP]
exact h₂.trans (pullbackConeOfLeftLift_snd f g s).symm
[GOAL]
C : Type u_1
inst✝ : Category.{?u.220941, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
⊢ IsOpenImmersion pullback.snd
[PROOFSTEP]
delta pullback.snd
[GOAL]
C : Type u_1
inst✝ : Category.{?u.220941, 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)
[PROOFSTEP]
rw [← limit.isoLimitCone_hom_π ⟨_, pullbackConeOfLeftIsLimit f g⟩ WalkingCospan.right]
[GOAL]
C : Type u_1
inst✝ : Category.{?u.220941, 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 ≫
      NatTrans.app { cone := pullbackConeOfLeft f g, isLimit := pullbackConeOfLeftIsLimit f g }.cone.π
        WalkingCospan.right)
[PROOFSTEP]
infer_instance
[GOAL]
C : Type u_1
inst✝ : Category.{?u.222946, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
⊢ IsOpenImmersion pullback.fst
[PROOFSTEP]
rw [← pullbackSymmetry_hom_comp_snd]
[GOAL]
C : Type u_1
inst✝ : Category.{?u.222946, 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)
[PROOFSTEP]
infer_instance
[GOAL]
C : Type u_1
inst✝¹ : Category.{?u.224733, 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)
[PROOFSTEP]
rw [← limit.w (cospan f g) WalkingCospan.Hom.inl, cospan_map_inl]
[GOAL]
C : Type u_1
inst✝¹ : Category.{?u.224733, 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)
[PROOFSTEP]
infer_instance
[GOAL]
C : Type u_1
inst✝ : Category.{?u.226706, 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))
[PROOFSTEP]
apply (IsLimit.postcomposeHomEquiv (diagramIsoCospan _) _).toFun
[GOAL]
C : Type u_1
inst✝ : Category.{?u.226706, 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)))
[PROOFSTEP]
refine' (IsLimit.equivIsoLimit _).toFun (limit.isLimit (cospan f.base g.base))
[GOAL]
C : Type u_1
inst✝ : Category.{?u.226706, 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))
[PROOFSTEP]
fapply Cones.ext
[GOAL]
case φ
C : Type u_1
inst✝ : Category.{?u.226706, 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
[PROOFSTEP]
exact Iso.refl _
[GOAL]
case w
C : Type u_1
inst✝ : Category.{?u.226706, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
⊢ autoParam
    (∀ (j : WalkingCospan),
      NatTrans.app (limit.cone (cospan f.base g.base)).π j =
        (Iso.refl (limit.cone (cospan f.base g.base)).pt).hom ≫
          NatTrans.app
            ((Cones.postcompose (diagramIsoCospan (cospan f g ⋙ forget C)).hom).obj
                ((forget C).mapCone (pullbackConeOfLeft f g))).π
            j)
    _auto✝
[PROOFSTEP]
change ∀ j, _ = 𝟙 _ ≫ _ ≫ _
[GOAL]
case w
C : Type u_1
inst✝ : Category.{?u.226706, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
⊢ ∀ (j : WalkingCospan),
    NatTrans.app (limit.cone (cospan f.base g.base)).π j =
      𝟙 (((Functor.const WalkingCospan).obj (limit.cone (cospan f.base g.base)).pt).obj j) ≫
        NatTrans.app ((forget C).mapCone (pullbackConeOfLeft f g)).π j ≫
          NatTrans.app (diagramIsoCospan (cospan f g ⋙ forget C)).hom j
[PROOFSTEP]
simp_rw [Category.id_comp]
[GOAL]
case w
C : Type u_1
inst✝ : Category.{?u.226706, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
⊢ ∀ (j : WalkingCospan),
    NatTrans.app (limit.cone (cospan f.base g.base)).π j =
      NatTrans.app ((forget C).mapCone (pullbackConeOfLeft f g)).π j ≫
        NatTrans.app (diagramIsoCospan (cospan f g ⋙ forget C)).hom j
[PROOFSTEP]
rintro (_ | _ | _)
[GOAL]
case w.none
C : Type u_1
inst✝ : Category.{?u.226706, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
⊢ NatTrans.app (limit.cone (cospan f.base g.base)).π none =
    NatTrans.app ((forget C).mapCone (pullbackConeOfLeft f g)).π none ≫
      NatTrans.app (diagramIsoCospan (cospan f g ⋙ forget C)).hom none
[PROOFSTEP]
symm
[GOAL]
case w.some.left
C : Type u_1
inst✝ : Category.{?u.226706, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
⊢ NatTrans.app (limit.cone (cospan f.base g.base)).π (some WalkingPair.left) =
    NatTrans.app ((forget C).mapCone (pullbackConeOfLeft f g)).π (some WalkingPair.left) ≫
      NatTrans.app (diagramIsoCospan (cospan f g ⋙ forget C)).hom (some WalkingPair.left)
[PROOFSTEP]
symm
[GOAL]
case w.some.right
C : Type u_1
inst✝ : Category.{?u.226706, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
⊢ NatTrans.app (limit.cone (cospan f.base g.base)).π (some WalkingPair.right) =
    NatTrans.app ((forget C).mapCone (pullbackConeOfLeft f g)).π (some WalkingPair.right) ≫
      NatTrans.app (diagramIsoCospan (cospan f g ⋙ forget C)).hom (some WalkingPair.right)
[PROOFSTEP]
symm
[GOAL]
case w.none
C : Type u_1
inst✝ : Category.{?u.226706, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
⊢ NatTrans.app ((forget C).mapCone (pullbackConeOfLeft f g)).π none ≫
      NatTrans.app (diagramIsoCospan (cospan f g ⋙ forget C)).hom none =
    NatTrans.app (limit.cone (cospan f.base g.base)).π none
[PROOFSTEP]
erw [Category.comp_id]
[GOAL]
case w.none
C : Type u_1
inst✝ : Category.{?u.226706, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
⊢ NatTrans.app ((forget C).mapCone (pullbackConeOfLeft f g)).π none =
    NatTrans.app (limit.cone (cospan f.base g.base)).π none
[PROOFSTEP]
exact limit.w (cospan f.base g.base) WalkingCospan.Hom.inl
[GOAL]
case w.some.left
C : Type u_1
inst✝ : Category.{?u.226706, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
⊢ NatTrans.app ((forget C).mapCone (pullbackConeOfLeft f g)).π (some WalkingPair.left) ≫
      NatTrans.app (diagramIsoCospan (cospan f g ⋙ forget C)).hom (some WalkingPair.left) =
    NatTrans.app (limit.cone (cospan f.base g.base)).π (some WalkingPair.left)
[PROOFSTEP]
exact Category.comp_id _
[GOAL]
case w.some.right
C : Type u_1
inst✝ : Category.{?u.226706, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
⊢ NatTrans.app ((forget C).mapCone (pullbackConeOfLeft f g)).π (some WalkingPair.right) ≫
      NatTrans.app (diagramIsoCospan (cospan f g ⋙ forget C)).hom (some WalkingPair.right) =
    NatTrans.app (limit.cone (cospan f.base g.base)).π (some WalkingPair.right)
[PROOFSTEP]
exact Category.comp_id _
[GOAL]
C : Type u_1
inst✝ : Category.{u_3, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
H : Set.range ↑g.base ⊆ Set.range ↑f.base
⊢ IsIso pullback.snd
[PROOFSTEP]
haveI := TopCat.snd_iso_of_left_embedding_range_subset hf.base_open.toEmbedding g.base H
[GOAL]
C : Type u_1
inst✝ : Category.{u_3, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
H : Set.range ↑g.base ⊆ Set.range ↑f.base
this : IsIso pullback.snd
⊢ IsIso pullback.snd
[PROOFSTEP]
have : IsIso (pullback.snd : pullback f g ⟶ _).base :=
  by
  delta pullback.snd
  rw [← limit.isoLimitCone_hom_π ⟨_, pullbackConeOfLeftIsLimit f g⟩ WalkingCospan.right]
  change IsIso (_ ≫ pullback.snd)
  infer_instance
[GOAL]
C : Type u_1
inst✝ : Category.{u_3, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
H : Set.range ↑g.base ⊆ Set.range ↑f.base
this : IsIso pullback.snd
⊢ IsIso pullback.snd.base
[PROOFSTEP]
delta pullback.snd
[GOAL]
C : Type u_1
inst✝ : Category.{u_3, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
H : Set.range ↑g.base ⊆ Set.range ↑f.base
this : IsIso pullback.snd
⊢ IsIso (limit.π (cospan f g) WalkingCospan.right).base
[PROOFSTEP]
rw [← limit.isoLimitCone_hom_π ⟨_, pullbackConeOfLeftIsLimit f g⟩ WalkingCospan.right]
[GOAL]
C : Type u_1
inst✝ : Category.{u_3, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
H : Set.range ↑g.base ⊆ Set.range ↑f.base
this : IsIso pullback.snd
⊢ IsIso
    ((limit.isoLimitCone { cone := pullbackConeOfLeft f g, isLimit := pullbackConeOfLeftIsLimit f g }).hom ≫
        NatTrans.app { cone := pullbackConeOfLeft f g, isLimit := pullbackConeOfLeftIsLimit f g }.cone.π
          WalkingCospan.right).base
[PROOFSTEP]
change IsIso (_ ≫ pullback.snd)
[GOAL]
C : Type u_1
inst✝ : Category.{u_3, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
H : Set.range ↑g.base ⊆ Set.range ↑f.base
this : IsIso pullback.snd
⊢ IsIso
    ((limit.isoLimitCone { cone := pullbackConeOfLeft f g, isLimit := pullbackConeOfLeftIsLimit f g }).hom.base ≫
      pullback.snd)
[PROOFSTEP]
infer_instance
[GOAL]
C : Type u_1
inst✝ : Category.{u_3, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
H : Set.range ↑g.base ⊆ Set.range ↑f.base
this✝ : IsIso pullback.snd
this : IsIso pullback.snd.base
⊢ IsIso pullback.snd
[PROOFSTEP]
apply to_iso
[GOAL]
C : Type u_1
inst✝ : Category.{u_3, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
H : Set.range ↑g.base ⊆ Set.range ↑f.base
⊢ lift f g H ≫ f = g
[PROOFSTEP]
letI := pullback_snd_isIso_of_range_subset _ _ H
[GOAL]
C : Type u_1
inst✝ : Category.{u_3, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
H : Set.range ↑g.base ⊆ Set.range ↑f.base
this : IsIso pullback.snd := pullback_snd_isIso_of_range_subset f g H
⊢ lift f g H ≫ f = g
[PROOFSTEP]
erw [Category.assoc]
[GOAL]
C : Type u_1
inst✝ : Category.{u_3, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
H : Set.range ↑g.base ⊆ Set.range ↑f.base
this : IsIso pullback.snd := pullback_snd_isIso_of_range_subset f g H
⊢ inv pullback.snd ≫ pullback.fst ≫ f = g
[PROOFSTEP]
rw [IsIso.inv_comp_eq]
[GOAL]
C : Type u_1
inst✝ : Category.{u_3, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
H : Set.range ↑g.base ⊆ Set.range ↑f.base
this : IsIso pullback.snd := pullback_snd_isIso_of_range_subset f g H
⊢ pullback.fst ≫ f = pullback.snd ≫ g
[PROOFSTEP]
exact pullback.condition
[GOAL]
C : Type u_1
inst✝ : Category.{u_3, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
H : Set.range ↑g.base ⊆ Set.range ↑f.base
l : Y ⟶ X
hl : l ≫ f = g
⊢ l = lift f g H
[PROOFSTEP]
rw [← cancel_mono f, hl, lift_fac]
[GOAL]
C : Type u_1
inst✝¹ : Category.{?u.257204, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
inst✝ : IsOpenImmersion g
e : Set.range ↑f.base = Set.range ↑g.base
⊢ lift g f (_ : Set.range ↑f.base ≤ Set.range ↑g.base) ≫ lift f g (_ : Set.range ↑g.base ≤ Set.range ↑f.base) = 𝟙 X
[PROOFSTEP]
rw [← cancel_mono f]
[GOAL]
C : Type u_1
inst✝¹ : Category.{?u.257204, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
inst✝ : IsOpenImmersion g
e : Set.range ↑f.base = Set.range ↑g.base
⊢ (lift g f (_ : Set.range ↑f.base ≤ Set.range ↑g.base) ≫ lift f g (_ : Set.range ↑g.base ≤ Set.range ↑f.base)) ≫ f =
    𝟙 X ≫ f
[PROOFSTEP]
simp
[GOAL]
C : Type u_1
inst✝¹ : Category.{?u.257204, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
inst✝ : IsOpenImmersion g
e : Set.range ↑f.base = Set.range ↑g.base
⊢ lift f g (_ : Set.range ↑g.base ≤ Set.range ↑f.base) ≫ lift g f (_ : Set.range ↑f.base ≤ Set.range ↑g.base) = 𝟙 Y
[PROOFSTEP]
rw [← cancel_mono g]
[GOAL]
C : Type u_1
inst✝¹ : Category.{?u.257204, u_1} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
inst✝ : IsOpenImmersion g
e : Set.range ↑f.base = Set.range ↑g.base
⊢ (lift f g (_ : Set.range ↑g.base ≤ Set.range ↑f.base) ≫ lift g f (_ : Set.range ↑f.base ≤ Set.range ↑g.base)) ≫ g =
    𝟙 Y ≫ g
[PROOFSTEP]
simp
[GOAL]
C : Type u_1
inst✝ : Category.{?u.259965, u_1} C
X : PresheafedSpace C
Y : SheafedSpace C
f : X ⟶ Y.toPresheafedSpace
H : IsOpenImmersion f
⊢ TopCat.Presheaf.IsSheaf X.presheaf
[PROOFSTEP]
apply TopCat.Presheaf.isSheaf_of_iso (sheafIsoOfIso H.isoRestrict.symm).symm
[GOAL]
C : Type u_1
inst✝ : Category.{?u.259965, u_1} C
X : PresheafedSpace C
Y : SheafedSpace C
f : X ⟶ Y.toPresheafedSpace
H : IsOpenImmersion f
⊢ TopCat.Presheaf.IsSheaf
    ((isoRestrict H).symm.hom.base _* (restrict Y.toPresheafedSpace (_ : OpenEmbedding ↑f.base)).presheaf)
[PROOFSTEP]
apply TopCat.Sheaf.pushforward_sheaf_of_sheaf
[GOAL]
case h
C : Type u_1
inst✝ : Category.{?u.259965, u_1} C
X : PresheafedSpace C
Y : SheafedSpace C
f : X ⟶ Y.toPresheafedSpace
H : IsOpenImmersion f
⊢ TopCat.Presheaf.IsSheaf (restrict Y.toPresheafedSpace (_ : OpenEmbedding ↑f.base)).presheaf
[PROOFSTEP]
exact (Y.restrict H.base_open).IsSheaf
[GOAL]
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
X✝ : PresheafedSpace C
Y✝ : SheafedSpace C
f✝ : X✝ ⟶ Y✝.toPresheafedSpace
H : IsOpenImmersion f✝
X Y : SheafedSpace C
f : X ⟶ Y
inst✝ : IsOpenImmersion f
⊢ toSheafedSpace Y f = X
[PROOFSTEP]
cases X
[GOAL]
case mk
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
X : PresheafedSpace C
Y✝ : SheafedSpace C
f✝ : X ⟶ Y✝.toPresheafedSpace
H : IsOpenImmersion f✝
Y : SheafedSpace C
toPresheafedSpace✝ : PresheafedSpace C
IsSheaf✝ : TopCat.Presheaf.IsSheaf toPresheafedSpace✝.presheaf
f : { toPresheafedSpace := toPresheafedSpace✝, IsSheaf := IsSheaf✝ } ⟶ Y
inst✝ : IsOpenImmersion f
⊢ toSheafedSpace Y f = { toPresheafedSpace := toPresheafedSpace✝, IsSheaf := IsSheaf✝ }
[PROOFSTEP]
rfl
[GOAL]
C : Type u_1
inst✝¹ : Category.{?u.266836, u_1} C
X✝ : PresheafedSpace CommRingCat
Y✝ : LocallyRingedSpace
f✝ : X✝ ⟶ Y✝.toPresheafedSpace
H : IsOpenImmersion f✝
X Y : LocallyRingedSpace
f : X ⟶ Y
inst✝ : LocallyRingedSpace.IsOpenImmersion f
⊢ toLocallyRingedSpace Y f.val = X
[PROOFSTEP]
cases X
[GOAL]
case mk
C : Type u_1
inst✝¹ : Category.{?u.266836, u_1} C
X : PresheafedSpace CommRingCat
Y✝ : LocallyRingedSpace
f✝ : X ⟶ Y✝.toPresheafedSpace
H : IsOpenImmersion f✝
Y : LocallyRingedSpace
toSheafedSpace✝ : SheafedSpace CommRingCat
localRing✝ : ∀ (x : ↑↑toSheafedSpace✝.toPresheafedSpace), LocalRing ↑(TopCat.Presheaf.stalk toSheafedSpace✝.presheaf x)
f : { toSheafedSpace := toSheafedSpace✝, localRing := localRing✝ } ⟶ Y
inst✝ : LocallyRingedSpace.IsOpenImmersion f
⊢ toLocallyRingedSpace Y f.val = { toSheafedSpace := toSheafedSpace✝, localRing := localRing✝ }
[PROOFSTEP]
delta toLocallyRingedSpace
[GOAL]
case mk
C : Type u_1
inst✝¹ : Category.{?u.266836, u_1} C
X : PresheafedSpace CommRingCat
Y✝ : LocallyRingedSpace
f✝ : X ⟶ Y✝.toPresheafedSpace
H : IsOpenImmersion f✝
Y : LocallyRingedSpace
toSheafedSpace✝ : SheafedSpace CommRingCat
localRing✝ : ∀ (x : ↑↑toSheafedSpace✝.toPresheafedSpace), LocalRing ↑(TopCat.Presheaf.stalk toSheafedSpace✝.presheaf x)
f : { toSheafedSpace := toSheafedSpace✝, localRing := localRing✝ } ⟶ Y
inst✝ : LocallyRingedSpace.IsOpenImmersion f
⊢ { toSheafedSpace := toSheafedSpace Y.toSheafedSpace f.val,
      localRing :=
        (_ :
          ∀ (x : ↑↑(toSheafedSpace Y.toSheafedSpace f.val).toPresheafedSpace),
            LocalRing
              ↑(stalk { toSheafedSpace := toSheafedSpace✝, localRing := localRing✝ }.toSheafedSpace.toPresheafedSpace
                  x)) } =
    { toSheafedSpace := toSheafedSpace✝, localRing := localRing✝ }
[PROOFSTEP]
simp
[GOAL]
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑Y
hU : ↑U ⊆ Set.range ↑f.base
⊢ IsIso (NatTrans.app f.c (op U))
[PROOFSTEP]
have : U = H.base_open.isOpenMap.functor.obj ((Opens.map f.base).obj U) :=
  by
  ext1
  exact (Set.inter_eq_left_iff_subset.mpr hU).symm.trans Set.image_preimage_eq_inter_range.symm
[GOAL]
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑Y
hU : ↑U ⊆ Set.range ↑f.base
⊢ U = (IsOpenMap.functor (_ : IsOpenMap ↑f.base)).obj ((Opens.map f.base).obj U)
[PROOFSTEP]
ext1
[GOAL]
case h
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑Y
hU : ↑U ⊆ Set.range ↑f.base
⊢ ↑U = ↑((IsOpenMap.functor (_ : IsOpenMap ↑f.base)).obj ((Opens.map f.base).obj U))
[PROOFSTEP]
exact (Set.inter_eq_left_iff_subset.mpr hU).symm.trans Set.image_preimage_eq_inter_range.symm
[GOAL]
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑↑Y
hU : ↑U ⊆ Set.range ↑f.base
this : U = (IsOpenMap.functor (_ : IsOpenMap ↑f.base)).obj ((Opens.map f.base).obj U)
⊢ IsIso (NatTrans.app f.c (op U))
[PROOFSTEP]
convert H.c_iso ((Opens.map f.base).obj U)
[GOAL]
C : Type u_1
inst✝ : Category.{?u.284183, u_1} C
X Y Z : SheafedSpace C
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ Mono f
[PROOFSTEP]
infer_instance
[GOAL]
C : Type u_1
inst✝ : Category.{?u.287677, u_1} C
X Y Z : SheafedSpace C
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ HasLimit (cospan f g ⋙ forget)
[PROOFSTEP]
have : HasLimit (cospan ((cospan f g ⋙ forget).map Hom.inl) ((cospan f g ⋙ forget).map Hom.inr))
[GOAL]
case this
C : Type u_1
inst✝ : Category.{?u.287677, u_1} C
X Y Z : SheafedSpace C
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ HasLimit (cospan ((cospan f g ⋙ forget).map Hom.inl) ((cospan f g ⋙ forget).map Hom.inr))
[PROOFSTEP]
change HasLimit (cospan ((forget).map f) ((forget).map g))
[GOAL]
case this
C : Type u_1
inst✝ : Category.{?u.287677, u_1} C
X Y Z : SheafedSpace C
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ HasLimit (cospan (forget.map f) (forget.map g))
[PROOFSTEP]
infer_instance
[GOAL]
C : Type u_1
inst✝ : Category.{?u.287677, u_1} C
X Y Z : SheafedSpace C
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
this : HasLimit (cospan ((cospan f g ⋙ forget).map Hom.inl) ((cospan f g ⋙ forget).map Hom.inr))
⊢ HasLimit (cospan f g ⋙ forget)
[PROOFSTEP]
apply hasLimitOfIso (diagramIsoCospan _).symm
[GOAL]
C : Type u_1
inst✝ : Category.{?u.296338, u_1} C
X Y Z : SheafedSpace C
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ HasLimit (cospan g f ⋙ forget)
[PROOFSTEP]
have : HasLimit (cospan ((cospan g f ⋙ forget).map Hom.inl) ((cospan g f ⋙ forget).map Hom.inr))
[GOAL]
case this
C : Type u_1
inst✝ : Category.{?u.296338, u_1} C
X Y Z : SheafedSpace C
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ HasLimit (cospan ((cospan g f ⋙ forget).map Hom.inl) ((cospan g f ⋙ forget).map Hom.inr))
[PROOFSTEP]
change HasLimit (cospan ((forget).map g) ((forget).map f))
[GOAL]
case this
C : Type u_1
inst✝ : Category.{?u.296338, u_1} C
X Y Z : SheafedSpace C
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ HasLimit (cospan (forget.map g) (forget.map f))
[PROOFSTEP]
infer_instance
[GOAL]
C : Type u_1
inst✝ : Category.{?u.296338, u_1} C
X Y Z : SheafedSpace C
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
this : HasLimit (cospan ((cospan g f ⋙ forget).map Hom.inl) ((cospan g f ⋙ forget).map Hom.inr))
⊢ HasLimit (cospan g f ⋙ forget)
[PROOFSTEP]
apply hasLimitOfIso (diagramIsoCospan _).symm
[GOAL]
C : Type u_1
inst✝ : Category.{?u.304278, u_1} C
X Y Z : SheafedSpace C
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ pullback f g = pullback ((cospan f g ⋙ forget).map Hom.inl) ((cospan f g ⋙ forget).map Hom.inr)
[PROOFSTEP]
congr
[GOAL]
C : Type u_1
inst✝ : Category.{?u.310614, u_1} C
X Y Z : SheafedSpace C
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ pullback g f = pullback ((cospan g f ⋙ forget).map Hom.inl) ((cospan g f ⋙ forget).map Hom.inr)
[PROOFSTEP]
congr
[GOAL]
C : Type u_1
inst✝ : Category.{?u.316346, u_1} C
X Y Z : SheafedSpace C
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ PreservesLimit (cospan f g ⋙ forget) (PresheafedSpace.forget C)
[PROOFSTEP]
have :
  PreservesLimit (cospan ((cospan f g ⋙ forget).map Hom.inl) ((cospan f g ⋙ forget).map Hom.inr))
    (PresheafedSpace.forget C)
[GOAL]
case this
C : Type u_1
inst✝ : Category.{?u.316346, u_1} C
X Y Z : SheafedSpace C
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ PreservesLimit (cospan ((cospan f g ⋙ forget).map Hom.inl) ((cospan f g ⋙ forget).map Hom.inr))
    (PresheafedSpace.forget C)
[PROOFSTEP]
dsimp
[GOAL]
case this
C : Type u_1
inst✝ : Category.{?u.316346, u_1} C
X Y Z : SheafedSpace C
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ PreservesLimit (cospan f g) (PresheafedSpace.forget C)
[PROOFSTEP]
infer_instance
[GOAL]
C : Type u_1
inst✝ : Category.{?u.316346, u_1} C
X Y Z : SheafedSpace C
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
this :
  PreservesLimit (cospan ((cospan f g ⋙ forget).map Hom.inl) ((cospan f g ⋙ forget).map Hom.inr))
    (PresheafedSpace.forget C)
⊢ PreservesLimit (cospan f g ⋙ forget) (PresheafedSpace.forget C)
[PROOFSTEP]
apply preservesLimitOfIsoDiagram _ (diagramIsoCospan _).symm
[GOAL]
C : Type u_1
inst✝ : Category.{?u.326095, u_1} C
X Y Z : SheafedSpace C
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ IsOpenImmersion pullback.snd
[PROOFSTEP]
delta pullback.snd
[GOAL]
C : Type u_1
inst✝ : Category.{?u.326095, u_1} C
X Y Z : SheafedSpace C
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ IsOpenImmersion (limit.π (cospan f g) right)
[PROOFSTEP]
have : _ = limit.π (cospan f g) right := preservesLimitsIso_hom_π forget (cospan f g) right
[GOAL]
C : Type u_1
inst✝ : Category.{?u.326095, u_1} C
X Y Z : SheafedSpace C
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
this : (preservesLimitIso forget (cospan f g)).hom ≫ limit.π (cospan f g ⋙ forget) right = limit.π (cospan f g) right
⊢ IsOpenImmersion (limit.π (cospan f g) right)
[PROOFSTEP]
rw [← this]
[GOAL]
C : Type u_1
inst✝ : Category.{?u.326095, u_1} C
X Y Z : SheafedSpace C
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
this : (preservesLimitIso forget (cospan f g)).hom ≫ limit.π (cospan f g ⋙ forget) right = limit.π (cospan f g) right
⊢ IsOpenImmersion ((preservesLimitIso forget (cospan f g)).hom ≫ limit.π (cospan f g ⋙ forget) right)
[PROOFSTEP]
have := HasLimit.isoOfNatIso_hom_π (diagramIsoCospan (cospan f g ⋙ forget)) right
[GOAL]
C : Type u_1
inst✝ : Category.{?u.326095, u_1} C
X Y Z : SheafedSpace C
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
this✝ : (preservesLimitIso forget (cospan f g)).hom ≫ limit.π (cospan f g ⋙ forget) right = limit.π (cospan f g) right
this :
  (HasLimit.isoOfNatIso (diagramIsoCospan (cospan f g ⋙ forget))).hom ≫
      limit.π (cospan ((cospan f g ⋙ forget).map Hom.inl) ((cospan f g ⋙ forget).map Hom.inr)) right =
    limit.π (cospan f g ⋙ forget) right ≫ NatTrans.app (diagramIsoCospan (cospan f g ⋙ forget)).hom right
⊢ IsOpenImmersion ((preservesLimitIso forget (cospan f g)).hom ≫ limit.π (cospan f g ⋙ forget) right)
[PROOFSTEP]
erw [Category.comp_id] at this
[GOAL]
C : Type u_1
inst✝ : Category.{?u.326095, u_1} C
X Y Z : SheafedSpace C
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
this✝ : (preservesLimitIso forget (cospan f g)).hom ≫ limit.π (cospan f g ⋙ forget) right = limit.π (cospan f g) right
this :
  (HasLimit.isoOfNatIso (diagramIsoCospan (cospan f g ⋙ forget))).hom ≫
      limit.π (cospan ((cospan f g ⋙ forget).map Hom.inl) ((cospan f g ⋙ forget).map Hom.inr)) right =
    limit.π (cospan f g ⋙ forget) right
⊢ IsOpenImmersion ((preservesLimitIso forget (cospan f g)).hom ≫ limit.π (cospan f g ⋙ forget) right)
[PROOFSTEP]
rw [← this]
[GOAL]
C : Type u_1
inst✝ : Category.{?u.326095, u_1} C
X Y Z : SheafedSpace C
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
this✝ : (preservesLimitIso forget (cospan f g)).hom ≫ limit.π (cospan f g ⋙ forget) right = limit.π (cospan f g) right
this :
  (HasLimit.isoOfNatIso (diagramIsoCospan (cospan f g ⋙ forget))).hom ≫
      limit.π (cospan ((cospan f g ⋙ forget).map Hom.inl) ((cospan f g ⋙ forget).map Hom.inr)) right =
    limit.π (cospan f g ⋙ forget) right
⊢ IsOpenImmersion
    ((preservesLimitIso forget (cospan f g)).hom ≫
      (HasLimit.isoOfNatIso (diagramIsoCospan (cospan f g ⋙ forget))).hom ≫
        limit.π (cospan ((cospan f g ⋙ forget).map Hom.inl) ((cospan f g ⋙ forget).map Hom.inr)) right)
[PROOFSTEP]
dsimp
[GOAL]
C : Type u_1
inst✝ : Category.{?u.326095, u_1} C
X Y Z : SheafedSpace C
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
this✝ : (preservesLimitIso forget (cospan f g)).hom ≫ limit.π (cospan f g ⋙ forget) right = limit.π (cospan f g) right
this :
  (HasLimit.isoOfNatIso (diagramIsoCospan (cospan f g ⋙ forget))).hom ≫
      limit.π (cospan ((cospan f g ⋙ forget).map Hom.inl) ((cospan f g ⋙ forget).map Hom.inr)) right =
    limit.π (cospan f g ⋙ forget) right
⊢ IsOpenImmersion
    ((preservesLimitIso forget (cospan f g)).hom ≫
      (HasLimit.isoOfNatIso (diagramIsoCospan (cospan f g ⋙ forget))).hom ≫ limit.π (cospan f g) right)
[PROOFSTEP]
infer_instance
[GOAL]
C : Type u_1
inst✝ : Category.{?u.332635, u_1} C
X Y Z : SheafedSpace C
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ IsOpenImmersion pullback.fst
[PROOFSTEP]
delta pullback.fst
[GOAL]
C : Type u_1
inst✝ : Category.{?u.332635, u_1} C
X Y Z : SheafedSpace C
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ IsOpenImmersion (limit.π (cospan g f) left)
[PROOFSTEP]
have : _ = limit.π (cospan g f) left := preservesLimitsIso_hom_π forget (cospan g f) left
[GOAL]
C : Type u_1
inst✝ : Category.{?u.332635, u_1} C
X Y Z : SheafedSpace C
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
this : (preservesLimitIso forget (cospan g f)).hom ≫ limit.π (cospan g f ⋙ forget) left = limit.π (cospan g f) left
⊢ IsOpenImmersion (limit.π (cospan g f) left)
[PROOFSTEP]
rw [← this]
[GOAL]
C : Type u_1
inst✝ : Category.{?u.332635, u_1} C
X Y Z : SheafedSpace C
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
this : (preservesLimitIso forget (cospan g f)).hom ≫ limit.π (cospan g f ⋙ forget) left = limit.π (cospan g f) left
⊢ IsOpenImmersion ((preservesLimitIso forget (cospan g f)).hom ≫ limit.π (cospan g f ⋙ forget) left)
[PROOFSTEP]
have := HasLimit.isoOfNatIso_hom_π (diagramIsoCospan (cospan g f ⋙ forget)) left
[GOAL]
C : Type u_1
inst✝ : Category.{?u.332635, u_1} C
X Y Z : SheafedSpace C
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
this✝ : (preservesLimitIso forget (cospan g f)).hom ≫ limit.π (cospan g f ⋙ forget) left = limit.π (cospan g f) left
this :
  (HasLimit.isoOfNatIso (diagramIsoCospan (cospan g f ⋙ forget))).hom ≫
      limit.π (cospan ((cospan g f ⋙ forget).map Hom.inl) ((cospan g f ⋙ forget).map Hom.inr)) left =
    limit.π (cospan g f ⋙ forget) left ≫ NatTrans.app (diagramIsoCospan (cospan g f ⋙ forget)).hom left
⊢ IsOpenImmersion ((preservesLimitIso forget (cospan g f)).hom ≫ limit.π (cospan g f ⋙ forget) left)
[PROOFSTEP]
erw [Category.comp_id] at this
[GOAL]
C : Type u_1
inst✝ : Category.{?u.332635, u_1} C
X Y Z : SheafedSpace C
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
this✝ : (preservesLimitIso forget (cospan g f)).hom ≫ limit.π (cospan g f ⋙ forget) left = limit.π (cospan g f) left
this :
  (HasLimit.isoOfNatIso (diagramIsoCospan (cospan g f ⋙ forget))).hom ≫
      limit.π (cospan ((cospan g f ⋙ forget).map Hom.inl) ((cospan g f ⋙ forget).map Hom.inr)) left =
    limit.π (cospan g f ⋙ forget) left
⊢ IsOpenImmersion ((preservesLimitIso forget (cospan g f)).hom ≫ limit.π (cospan g f ⋙ forget) left)
[PROOFSTEP]
rw [← this]
[GOAL]
C : Type u_1
inst✝ : Category.{?u.332635, u_1} C
X Y Z : SheafedSpace C
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
this✝ : (preservesLimitIso forget (cospan g f)).hom ≫ limit.π (cospan g f ⋙ forget) left = limit.π (cospan g f) left
this :
  (HasLimit.isoOfNatIso (diagramIsoCospan (cospan g f ⋙ forget))).hom ≫
      limit.π (cospan ((cospan g f ⋙ forget).map Hom.inl) ((cospan g f ⋙ forget).map Hom.inr)) left =
    limit.π (cospan g f ⋙ forget) left
⊢ IsOpenImmersion
    ((preservesLimitIso forget (cospan g f)).hom ≫
      (HasLimit.isoOfNatIso (diagramIsoCospan (cospan g f ⋙ forget))).hom ≫
        limit.π (cospan ((cospan g f ⋙ forget).map Hom.inl) ((cospan g f ⋙ forget).map Hom.inr)) left)
[PROOFSTEP]
dsimp
[GOAL]
C : Type u_1
inst✝ : Category.{?u.332635, u_1} C
X Y Z : SheafedSpace C
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
this✝ : (preservesLimitIso forget (cospan g f)).hom ≫ limit.π (cospan g f ⋙ forget) left = limit.π (cospan g f) left
this :
  (HasLimit.isoOfNatIso (diagramIsoCospan (cospan g f ⋙ forget))).hom ≫
      limit.π (cospan ((cospan g f ⋙ forget).map Hom.inl) ((cospan g f ⋙ forget).map Hom.inr)) left =
    limit.π (cospan g f ⋙ forget) left
⊢ IsOpenImmersion
    ((preservesLimitIso forget (cospan g f)).hom ≫
      (HasLimit.isoOfNatIso (diagramIsoCospan (cospan g f ⋙ forget))).hom ≫ limit.π (cospan g f) left)
[PROOFSTEP]
infer_instance
[GOAL]
C : Type u_1
inst✝¹ : Category.{?u.338234, u_1} C
X Y Z : SheafedSpace C
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
inst✝ : IsOpenImmersion g
⊢ IsOpenImmersion (limit.π (cospan f g) one)
[PROOFSTEP]
rw [← limit.w (cospan f g) Hom.inl, cospan_map_inl]
[GOAL]
C : Type u_1
inst✝¹ : Category.{?u.338234, u_1} C
X Y Z : SheafedSpace C
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
inst✝ : IsOpenImmersion g
⊢ IsOpenImmersion (limit.π (cospan f g) left ≫ f)
[PROOFSTEP]
infer_instance
[GOAL]
C : Type u_1
inst✝⁶ : Category.{u_2, u_1} C
inst✝⁵ : HasLimits C
inst✝⁴ : HasColimits C
inst✝³ : ConcreteCategory C
inst✝² : ReflectsIsomorphisms (CategoryTheory.forget C)
inst✝¹ : PreservesLimits (CategoryTheory.forget C)
inst✝ : PreservesFilteredColimits (CategoryTheory.forget C)
X Y : SheafedSpace C
f : X ⟶ Y
hf : OpenEmbedding ↑f.base
H : ∀ (x : ↑↑X.toPresheafedSpace), IsIso (PresheafedSpace.stalkMap f x)
U : Opens ↑↑X.toPresheafedSpace
⊢ IsIso (NatTrans.app f.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑f.base)).obj U)))
[PROOFSTEP]
have h :=
  TopCat.Presheaf.app_isIso_of_stalkFunctor_map_iso
    (show Y.sheaf ⟶ (TopCat.Sheaf.pushforward f.base).obj X.sheaf from ⟨f.c⟩)
[GOAL]
C : Type u_1
inst✝⁶ : Category.{u_2, u_1} C
inst✝⁵ : HasLimits C
inst✝⁴ : HasColimits C
inst✝³ : ConcreteCategory C
inst✝² : ReflectsIsomorphisms (CategoryTheory.forget C)
inst✝¹ : PreservesLimits (CategoryTheory.forget C)
inst✝ : PreservesFilteredColimits (CategoryTheory.forget C)
X Y : SheafedSpace C
f : X ⟶ Y
hf : OpenEmbedding ↑f.base
H : ∀ (x : ↑↑X.toPresheafedSpace), IsIso (PresheafedSpace.stalkMap f x)
U : Opens ↑↑X.toPresheafedSpace
h :
  ∀ (U : Opens ↑↑Y.toPresheafedSpace)
    [inst :
      ∀ (x : { x // x ∈ U }),
        IsIso
          ((TopCat.Presheaf.stalkFunctor C ↑x).map
            (let_fun this := { val := f.c };
              this).val)],
    IsIso
      (NatTrans.app
        (let_fun this := { val := f.c };
          this).val
        (op U))
⊢ IsIso (NatTrans.app f.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑f.base)).obj U)))
[PROOFSTEP]
refine @h _ ?_
[GOAL]
C : Type u_1
inst✝⁶ : Category.{u_2, u_1} C
inst✝⁵ : HasLimits C
inst✝⁴ : HasColimits C
inst✝³ : ConcreteCategory C
inst✝² : ReflectsIsomorphisms (CategoryTheory.forget C)
inst✝¹ : PreservesLimits (CategoryTheory.forget C)
inst✝ : PreservesFilteredColimits (CategoryTheory.forget C)
X Y : SheafedSpace C
f : X ⟶ Y
hf : OpenEmbedding ↑f.base
H : ∀ (x : ↑↑X.toPresheafedSpace), IsIso (PresheafedSpace.stalkMap f x)
U : Opens ↑↑X.toPresheafedSpace
h :
  ∀ (U : Opens ↑↑Y.toPresheafedSpace)
    [inst :
      ∀ (x : { x // x ∈ U }),
        IsIso
          ((TopCat.Presheaf.stalkFunctor C ↑x).map
            (let_fun this := { val := f.c };
              this).val)],
    IsIso
      (NatTrans.app
        (let_fun this := { val := f.c };
          this).val
        (op U))
⊢ ∀ (x : { x // x ∈ (IsOpenMap.functor (_ : IsOpenMap ↑f.base)).obj U }),
    IsIso
      ((TopCat.Presheaf.stalkFunctor C ↑x).map
        (let_fun this := { val := f.c };
          this).val)
[PROOFSTEP]
rintro ⟨_, y, hy, rfl⟩
[GOAL]
case mk.intro.intro
C : Type u_1
inst✝⁶ : Category.{u_2, u_1} C
inst✝⁵ : HasLimits C
inst✝⁴ : HasColimits C
inst✝³ : ConcreteCategory C
inst✝² : ReflectsIsomorphisms (CategoryTheory.forget C)
inst✝¹ : PreservesLimits (CategoryTheory.forget C)
inst✝ : PreservesFilteredColimits (CategoryTheory.forget C)
X Y : SheafedSpace C
f : X ⟶ Y
hf : OpenEmbedding ↑f.base
H : ∀ (x : ↑↑X.toPresheafedSpace), IsIso (PresheafedSpace.stalkMap f x)
U : Opens ↑↑X.toPresheafedSpace
h :
  ∀ (U : Opens ↑↑Y.toPresheafedSpace)
    [inst :
      ∀ (x : { x // x ∈ U }),
        IsIso
          ((TopCat.Presheaf.stalkFunctor C ↑x).map
            (let_fun this := { val := f.c };
              this).val)],
    IsIso
      (NatTrans.app
        (let_fun this := { val := f.c };
          this).val
        (op U))
y : (CategoryTheory.forget TopCat).obj ↑X.toPresheafedSpace
hy : y ∈ ↑U
⊢ IsIso
    ((TopCat.Presheaf.stalkFunctor C ↑{ val := ↑f.base y, property := (_ : ∃ a, a ∈ ↑U ∧ ↑f.base a = ↑f.base y) }).map
      (let_fun this := { val := f.c };
        this).val)
[PROOFSTEP]
specialize H y
[GOAL]
case mk.intro.intro
C : Type u_1
inst✝⁶ : Category.{u_2, u_1} C
inst✝⁵ : HasLimits C
inst✝⁴ : HasColimits C
inst✝³ : ConcreteCategory C
inst✝² : ReflectsIsomorphisms (CategoryTheory.forget C)
inst✝¹ : PreservesLimits (CategoryTheory.forget C)
inst✝ : PreservesFilteredColimits (CategoryTheory.forget C)
X Y : SheafedSpace C
f : X ⟶ Y
hf : OpenEmbedding ↑f.base
U : Opens ↑↑X.toPresheafedSpace
h :
  ∀ (U : Opens ↑↑Y.toPresheafedSpace)
    [inst :
      ∀ (x : { x // x ∈ U }),
        IsIso
          ((TopCat.Presheaf.stalkFunctor C ↑x).map
            (let_fun this := { val := f.c };
              this).val)],
    IsIso
      (NatTrans.app
        (let_fun this := { val := f.c };
          this).val
        (op U))
y : (CategoryTheory.forget TopCat).obj ↑X.toPresheafedSpace
hy : y ∈ ↑U
H : IsIso (PresheafedSpace.stalkMap f y)
⊢ IsIso
    ((TopCat.Presheaf.stalkFunctor C ↑{ val := ↑f.base y, property := (_ : ∃ a, a ∈ ↑U ∧ ↑f.base a = ↑f.base y) }).map
      (let_fun this := { val := f.c };
        this).val)
[PROOFSTEP]
delta PresheafedSpace.stalkMap at H
[GOAL]
case mk.intro.intro
C : Type u_1
inst✝⁶ : Category.{u_2, u_1} C
inst✝⁵ : HasLimits C
inst✝⁴ : HasColimits C
inst✝³ : ConcreteCategory C
inst✝² : ReflectsIsomorphisms (CategoryTheory.forget C)
inst✝¹ : PreservesLimits (CategoryTheory.forget C)
inst✝ : PreservesFilteredColimits (CategoryTheory.forget C)
X Y : SheafedSpace C
f : X ⟶ Y
hf : OpenEmbedding ↑f.base
U : Opens ↑↑X.toPresheafedSpace
h :
  ∀ (U : Opens ↑↑Y.toPresheafedSpace)
    [inst :
      ∀ (x : { x // x ∈ U }),
        IsIso
          ((TopCat.Presheaf.stalkFunctor C ↑x).map
            (let_fun this := { val := f.c };
              this).val)],
    IsIso
      (NatTrans.app
        (let_fun this := { val := f.c };
          this).val
        (op U))
y : (CategoryTheory.forget TopCat).obj ↑X.toPresheafedSpace
hy : y ∈ ↑U
H :
  IsIso ((TopCat.Presheaf.stalkFunctor C (↑f.base y)).map f.c ≫ TopCat.Presheaf.stalkPushforward C f.base X.presheaf y)
⊢ IsIso
    ((TopCat.Presheaf.stalkFunctor C ↑{ val := ↑f.base y, property := (_ : ∃ a, a ∈ ↑U ∧ ↑f.base a = ↑f.base y) }).map
      (let_fun this := { val := f.c };
        this).val)
[PROOFSTEP]
haveI H' := TopCat.Presheaf.stalkPushforward.stalkPushforward_iso_of_openEmbedding C hf X.presheaf y
[GOAL]
case mk.intro.intro
C : Type u_1
inst✝⁶ : Category.{u_2, u_1} C
inst✝⁵ : HasLimits C
inst✝⁴ : HasColimits C
inst✝³ : ConcreteCategory C
inst✝² : ReflectsIsomorphisms (CategoryTheory.forget C)
inst✝¹ : PreservesLimits (CategoryTheory.forget C)
inst✝ : PreservesFilteredColimits (CategoryTheory.forget C)
X Y : SheafedSpace C
f : X ⟶ Y
hf : OpenEmbedding ↑f.base
U : Opens ↑↑X.toPresheafedSpace
h :
  ∀ (U : Opens ↑↑Y.toPresheafedSpace)
    [inst :
      ∀ (x : { x // x ∈ U }),
        IsIso
          ((TopCat.Presheaf.stalkFunctor C ↑x).map
            (let_fun this := { val := f.c };
              this).val)],
    IsIso
      (NatTrans.app
        (let_fun this := { val := f.c };
          this).val
        (op U))
y : (CategoryTheory.forget TopCat).obj ↑X.toPresheafedSpace
hy : y ∈ ↑U
H :
  IsIso ((TopCat.Presheaf.stalkFunctor C (↑f.base y)).map f.c ≫ TopCat.Presheaf.stalkPushforward C f.base X.presheaf y)
H' : IsIso (TopCat.Presheaf.stalkPushforward C f.base X.presheaf y)
⊢ IsIso
    ((TopCat.Presheaf.stalkFunctor C ↑{ val := ↑f.base y, property := (_ : ∃ a, a ∈ ↑U ∧ ↑f.base a = ↑f.base y) }).map
      (let_fun this := { val := f.c };
        this).val)
[PROOFSTEP]
have := @IsIso.comp_isIso _ _ _ _ _ _ _ H (@IsIso.inv_isIso _ _ _ _ _ H')
[GOAL]
case mk.intro.intro
C : Type u_1
inst✝⁶ : Category.{u_2, u_1} C
inst✝⁵ : HasLimits C
inst✝⁴ : HasColimits C
inst✝³ : ConcreteCategory C
inst✝² : ReflectsIsomorphisms (CategoryTheory.forget C)
inst✝¹ : PreservesLimits (CategoryTheory.forget C)
inst✝ : PreservesFilteredColimits (CategoryTheory.forget C)
X Y : SheafedSpace C
f : X ⟶ Y
hf : OpenEmbedding ↑f.base
U : Opens ↑↑X.toPresheafedSpace
h :
  ∀ (U : Opens ↑↑Y.toPresheafedSpace)
    [inst :
      ∀ (x : { x // x ∈ U }),
        IsIso
          ((TopCat.Presheaf.stalkFunctor C ↑x).map
            (let_fun this := { val := f.c };
              this).val)],
    IsIso
      (NatTrans.app
        (let_fun this := { val := f.c };
          this).val
        (op U))
y : (CategoryTheory.forget TopCat).obj ↑X.toPresheafedSpace
hy : y ∈ ↑U
H :
  IsIso ((TopCat.Presheaf.stalkFunctor C (↑f.base y)).map f.c ≫ TopCat.Presheaf.stalkPushforward C f.base X.presheaf y)
H' : IsIso (TopCat.Presheaf.stalkPushforward C f.base X.presheaf y)
this :
  IsIso
    (((TopCat.Presheaf.stalkFunctor C (↑f.base y)).map f.c ≫ TopCat.Presheaf.stalkPushforward C f.base X.presheaf y) ≫
      inv (TopCat.Presheaf.stalkPushforward C f.base X.presheaf y))
⊢ IsIso
    ((TopCat.Presheaf.stalkFunctor C ↑{ val := ↑f.base y, property := (_ : ∃ a, a ∈ ↑U ∧ ↑f.base a = ↑f.base y) }).map
      (let_fun this := { val := f.c };
        this).val)
[PROOFSTEP]
rwa [Category.assoc, IsIso.hom_inv_id, Category.comp_id] at this
[GOAL]
C : Type u_1
inst✝² : Category.{v, u_1} C
inst✝¹ : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝ : HasColimit F
i : Discrete ι
⊢ OpenEmbedding ↑(colimit.ι F i).base
[PROOFSTEP]
rw [← show _ = (colimit.ι F i).base from ι_preservesColimitsIso_inv (SheafedSpace.forget C) F i]
[GOAL]
C : Type u_1
inst✝² : Category.{v, u_1} C
inst✝¹ : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝ : HasColimit F
i : Discrete ι
⊢ OpenEmbedding ↑(colimit.ι (F ⋙ forget C) i ≫ (preservesColimitIso (forget C) F).inv)
[PROOFSTEP]
have : _ = _ ≫ colimit.ι (Discrete.functor ((F ⋙ SheafedSpace.forget C).obj ∘ Discrete.mk)) i :=
  HasColimit.isoOfNatIso_ι_hom Discrete.natIsoFunctor i
[GOAL]
C : Type u_1
inst✝² : Category.{v, u_1} C
inst✝¹ : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝ : HasColimit F
i : Discrete ι
this :
  colimit.ι (F ⋙ forget C) i ≫ (HasColimit.isoOfNatIso Discrete.natIsoFunctor).hom =
    NatTrans.app Discrete.natIsoFunctor.hom i ≫
      colimit.ι (Discrete.functor ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)) i
⊢ OpenEmbedding ↑(colimit.ι (F ⋙ forget C) i ≫ (preservesColimitIso (forget C) F).inv)
[PROOFSTEP]
rw [← Iso.eq_comp_inv] at this
[GOAL]
C : Type u_1
inst✝² : Category.{v, u_1} C
inst✝¹ : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝ : HasColimit F
i : Discrete ι
this :
  colimit.ι (F ⋙ forget C) i =
    (NatTrans.app Discrete.natIsoFunctor.hom i ≫
        colimit.ι (Discrete.functor ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)) i) ≫
      (HasColimit.isoOfNatIso Discrete.natIsoFunctor).inv
⊢ OpenEmbedding ↑(colimit.ι (F ⋙ forget C) i ≫ (preservesColimitIso (forget C) F).inv)
[PROOFSTEP]
rw [this]
[GOAL]
C : Type u_1
inst✝² : Category.{v, u_1} C
inst✝¹ : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝ : HasColimit F
i : Discrete ι
this :
  colimit.ι (F ⋙ forget C) i =
    (NatTrans.app Discrete.natIsoFunctor.hom i ≫
        colimit.ι (Discrete.functor ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)) i) ≫
      (HasColimit.isoOfNatIso Discrete.natIsoFunctor).inv
⊢ OpenEmbedding
    ↑(((NatTrans.app Discrete.natIsoFunctor.hom i ≫
            colimit.ι (Discrete.functor ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)) i) ≫
          (HasColimit.isoOfNatIso Discrete.natIsoFunctor).inv) ≫
        (preservesColimitIso (forget C) F).inv)
[PROOFSTEP]
have : colimit.ι _ _ ≫ _ = _ := TopCat.sigmaIsoSigma_hom_ι.{v, v} ((F ⋙ SheafedSpace.forget C).obj ∘ Discrete.mk) i.as
[GOAL]
C : Type u_1
inst✝² : Category.{v, u_1} C
inst✝¹ : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝ : HasColimit F
i : Discrete ι
this✝ :
  colimit.ι (F ⋙ forget C) i =
    (NatTrans.app Discrete.natIsoFunctor.hom i ≫
        colimit.ι (Discrete.functor ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)) i) ≫
      (HasColimit.isoOfNatIso Discrete.natIsoFunctor).inv
this :
  colimit.ι (Discrete.functor ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)) { as := i.as } ≫
      (TopCat.sigmaIsoSigma ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)).hom =
    TopCat.sigmaι ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk) i.as
⊢ OpenEmbedding
    ↑(((NatTrans.app Discrete.natIsoFunctor.hom i ≫
            colimit.ι (Discrete.functor ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)) i) ≫
          (HasColimit.isoOfNatIso Discrete.natIsoFunctor).inv) ≫
        (preservesColimitIso (forget C) F).inv)
[PROOFSTEP]
rw [← Iso.eq_comp_inv] at this
[GOAL]
C : Type u_1
inst✝² : Category.{v, u_1} C
inst✝¹ : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝ : HasColimit F
i : Discrete ι
this✝ :
  colimit.ι (F ⋙ forget C) i =
    (NatTrans.app Discrete.natIsoFunctor.hom i ≫
        colimit.ι (Discrete.functor ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)) i) ≫
      (HasColimit.isoOfNatIso Discrete.natIsoFunctor).inv
this :
  colimit.ι (Discrete.functor ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)) { as := i.as } =
    TopCat.sigmaι ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk) i.as ≫
      (TopCat.sigmaIsoSigma ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)).inv
⊢ OpenEmbedding
    ↑(((NatTrans.app Discrete.natIsoFunctor.hom i ≫
            colimit.ι (Discrete.functor ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)) i) ≫
          (HasColimit.isoOfNatIso Discrete.natIsoFunctor).inv) ≫
        (preservesColimitIso (forget C) F).inv)
[PROOFSTEP]
cases i
[GOAL]
case mk
C : Type u_1
inst✝² : Category.{v, u_1} C
inst✝¹ : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝ : HasColimit F
as✝ : ι
this✝ :
  colimit.ι (F ⋙ forget C) { as := as✝ } =
    (NatTrans.app Discrete.natIsoFunctor.hom { as := as✝ } ≫
        colimit.ι (Discrete.functor ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)) { as := as✝ }) ≫
      (HasColimit.isoOfNatIso Discrete.natIsoFunctor).inv
this :
  colimit.ι (Discrete.functor ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)) { as := { as := as✝ }.as } =
    TopCat.sigmaι ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk) { as := as✝ }.as ≫
      (TopCat.sigmaIsoSigma ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)).inv
⊢ OpenEmbedding
    ↑(((NatTrans.app Discrete.natIsoFunctor.hom { as := as✝ } ≫
            colimit.ι (Discrete.functor ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)) { as := as✝ }) ≫
          (HasColimit.isoOfNatIso Discrete.natIsoFunctor).inv) ≫
        (preservesColimitIso (forget C) F).inv)
[PROOFSTEP]
rw [this, ← Category.assoc]
  -- Porting note : `simp_rw` can't use `TopCat.openEmbedding_iff_comp_isIso` and
    -- `TopCat.openEmbedding_iff_isIso_comp`.
    -- See https://github.com/leanprover-community/mathlib4/issues/5026
[GOAL]
case mk
C : Type u_1
inst✝² : Category.{v, u_1} C
inst✝¹ : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝ : HasColimit F
as✝ : ι
this✝ :
  colimit.ι (F ⋙ forget C) { as := as✝ } =
    (NatTrans.app Discrete.natIsoFunctor.hom { as := as✝ } ≫
        colimit.ι (Discrete.functor ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)) { as := as✝ }) ≫
      (HasColimit.isoOfNatIso Discrete.natIsoFunctor).inv
this :
  colimit.ι (Discrete.functor ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)) { as := { as := as✝ }.as } =
    TopCat.sigmaι ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk) { as := as✝ }.as ≫
      (TopCat.sigmaIsoSigma ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)).inv
⊢ OpenEmbedding
    ↑((((NatTrans.app Discrete.natIsoFunctor.hom { as := as✝ } ≫
              TopCat.sigmaι ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk) { as := as✝ }.as) ≫
            (TopCat.sigmaIsoSigma ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)).inv) ≫
          (HasColimit.isoOfNatIso Discrete.natIsoFunctor).inv) ≫
        (preservesColimitIso (forget C) F).inv)
[PROOFSTEP]
erw [TopCat.openEmbedding_iff_comp_isIso, TopCat.openEmbedding_iff_comp_isIso, TopCat.openEmbedding_iff_comp_isIso,
  TopCat.openEmbedding_iff_isIso_comp]
[GOAL]
case mk
C : Type u_1
inst✝² : Category.{v, u_1} C
inst✝¹ : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝ : HasColimit F
as✝ : ι
this✝ :
  colimit.ι (F ⋙ forget C) { as := as✝ } =
    (NatTrans.app Discrete.natIsoFunctor.hom { as := as✝ } ≫
        colimit.ι (Discrete.functor ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)) { as := as✝ }) ≫
      (HasColimit.isoOfNatIso Discrete.natIsoFunctor).inv
this :
  colimit.ι (Discrete.functor ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)) { as := { as := as✝ }.as } =
    TopCat.sigmaι ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk) { as := as✝ }.as ≫
      (TopCat.sigmaIsoSigma ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)).inv
⊢ OpenEmbedding ↑(TopCat.sigmaι ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk) { as := as✝ }.as)
[PROOFSTEP]
exact openEmbedding_sigmaMk
[GOAL]
C : Type u_1
inst✝² : Category.{v, u_1} C
inst✝¹ : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝ : HasColimit F
i j : Discrete ι
h : i ≠ j
U : Opens ↑↑(F.obj i).toPresheafedSpace
⊢ (Opens.map (colimit.ι (F ⋙ forgetToPresheafedSpace) j).base).obj
      ((Opens.map (preservesColimitIso forgetToPresheafedSpace F).inv.base).obj
        ((IsOpenMap.functor (_ : IsOpenMap ↑(colimit.ι F i).base)).obj U)) =
    ⊥
[PROOFSTEP]
ext x
[GOAL]
case h.h
C : Type u_1
inst✝² : Category.{v, u_1} C
inst✝¹ : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝ : HasColimit F
i j : Discrete ι
h : i ≠ j
U : Opens ↑↑(F.obj i).toPresheafedSpace
x : ↑↑((F ⋙ forgetToPresheafedSpace).obj j)
⊢ x ∈
      ↑((Opens.map (colimit.ι (F ⋙ forgetToPresheafedSpace) j).base).obj
          ((Opens.map (preservesColimitIso forgetToPresheafedSpace F).inv.base).obj
            ((IsOpenMap.functor (_ : IsOpenMap ↑(colimit.ι F i).base)).obj U))) ↔
    x ∈ ↑⊥
[PROOFSTEP]
apply iff_false_intro
[GOAL]
case h.h.h
C : Type u_1
inst✝² : Category.{v, u_1} C
inst✝¹ : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝ : HasColimit F
i j : Discrete ι
h : i ≠ j
U : Opens ↑↑(F.obj i).toPresheafedSpace
x : ↑↑((F ⋙ forgetToPresheafedSpace).obj j)
⊢ ¬x ∈
      ↑((Opens.map (colimit.ι (F ⋙ forgetToPresheafedSpace) j).base).obj
          ((Opens.map (preservesColimitIso forgetToPresheafedSpace F).inv.base).obj
            ((IsOpenMap.functor (_ : IsOpenMap ↑(colimit.ι F i).base)).obj U)))
[PROOFSTEP]
rintro ⟨y, hy, eq⟩
[GOAL]
case h.h.h.intro.intro
C : Type u_1
inst✝² : Category.{v, u_1} C
inst✝¹ : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝ : HasColimit F
i j : Discrete ι
h : i ≠ j
U : Opens ↑↑(F.obj i).toPresheafedSpace
x : ↑↑((F ⋙ forgetToPresheafedSpace).obj j)
y : (CategoryTheory.forget TopCat).obj ↑(F.obj i).toPresheafedSpace
hy : y ∈ ↑U
eq :
  ↑(colimit.ι F i).base y =
    ↑(preservesColimitIso forgetToPresheafedSpace F).inv.base (↑(colimit.ι (F ⋙ forgetToPresheafedSpace) j).base x)
⊢ False
[PROOFSTEP]
replace eq :=
  ConcreteCategory.congr_arg
    (preservesColimitIso (SheafedSpace.forget C) F ≪≫
        HasColimit.isoOfNatIso Discrete.natIsoFunctor ≪≫ TopCat.sigmaIsoSigma.{v, v} _).hom
    eq
[GOAL]
case h.h.h.intro.intro
C : Type u_1
inst✝² : Category.{v, u_1} C
inst✝¹ : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝ : HasColimit F
i j : Discrete ι
h : i ≠ j
U : Opens ↑↑(F.obj i).toPresheafedSpace
x : ↑↑((F ⋙ forgetToPresheafedSpace).obj j)
y : (CategoryTheory.forget TopCat).obj ↑(F.obj i).toPresheafedSpace
hy : y ∈ ↑U
eq :
  ↑(preservesColimitIso (forget C) F ≪≫
            HasColimit.isoOfNatIso Discrete.natIsoFunctor ≪≫
              TopCat.sigmaIsoSigma ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)).hom
      (↑(colimit.ι F i).base y) =
    ↑(preservesColimitIso (forget C) F ≪≫
            HasColimit.isoOfNatIso Discrete.natIsoFunctor ≪≫
              TopCat.sigmaIsoSigma ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)).hom
      (↑(preservesColimitIso forgetToPresheafedSpace F).inv.base (↑(colimit.ι (F ⋙ forgetToPresheafedSpace) j).base x))
⊢ False
[PROOFSTEP]
simp_rw [CategoryTheory.Iso.trans_hom, ← TopCat.comp_app, ← PresheafedSpace.comp_base] at eq
[GOAL]
case h.h.h.intro.intro
C : Type u_1
inst✝² : Category.{v, u_1} C
inst✝¹ : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝ : HasColimit F
i j : Discrete ι
h : i ≠ j
U : Opens ↑↑(F.obj i).toPresheafedSpace
x : ↑↑((F ⋙ forgetToPresheafedSpace).obj j)
y : (CategoryTheory.forget TopCat).obj ↑(F.obj i).toPresheafedSpace
hy : y ∈ ↑U
eq :
  ↑((preservesColimitIso (forget C) F).hom ≫
          (HasColimit.isoOfNatIso Discrete.natIsoFunctor).hom ≫
            (TopCat.sigmaIsoSigma ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)).hom)
      (↑(colimit.ι F i).base y) =
    ↑((preservesColimitIso (forget C) F).hom ≫
          (HasColimit.isoOfNatIso Discrete.natIsoFunctor).hom ≫
            (TopCat.sigmaIsoSigma ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)).hom)
      (↑(colimit.ι (F ⋙ forgetToPresheafedSpace) j ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).base x)
⊢ False
[PROOFSTEP]
rw [ι_preservesColimitsIso_inv] at eq
[GOAL]
case h.h.h.intro.intro
C : Type u_1
inst✝² : Category.{v, u_1} C
inst✝¹ : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝ : HasColimit F
i j : Discrete ι
h : i ≠ j
U : Opens ↑↑(F.obj i).toPresheafedSpace
x : ↑↑((F ⋙ forgetToPresheafedSpace).obj j)
y : (CategoryTheory.forget TopCat).obj ↑(F.obj i).toPresheafedSpace
hy : y ∈ ↑U
eq :
  ↑((preservesColimitIso (forget C) F).hom ≫
          (HasColimit.isoOfNatIso Discrete.natIsoFunctor).hom ≫
            (TopCat.sigmaIsoSigma ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)).hom)
      (↑(colimit.ι F i).base y) =
    ↑((preservesColimitIso (forget C) F).hom ≫
          (HasColimit.isoOfNatIso Discrete.natIsoFunctor).hom ≫
            (TopCat.sigmaIsoSigma ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)).hom)
      (↑(forgetToPresheafedSpace.map (colimit.ι F j)).base x)
⊢ False
[PROOFSTEP]
erw [← comp_apply, ← comp_apply] at eq
[GOAL]
case h.h.h.intro.intro
C : Type u_1
inst✝² : Category.{v, u_1} C
inst✝¹ : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝ : HasColimit F
i j : Discrete ι
h : i ≠ j
U : Opens ↑↑(F.obj i).toPresheafedSpace
x : ↑↑((F ⋙ forgetToPresheafedSpace).obj j)
y : (CategoryTheory.forget TopCat).obj ↑(F.obj i).toPresheafedSpace
hy : y ∈ ↑U
eq :
  ↑((colimit.ι F i).base ≫
          (preservesColimitIso (forget C) F).hom ≫
            (HasColimit.isoOfNatIso Discrete.natIsoFunctor).hom ≫
              (TopCat.sigmaIsoSigma ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)).hom)
      y =
    ↑((forgetToPresheafedSpace.map (colimit.ι F j)).base ≫
          (preservesColimitIso (forget C) F).hom ≫
            (HasColimit.isoOfNatIso Discrete.natIsoFunctor).hom ≫
              (TopCat.sigmaIsoSigma ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)).hom)
      x
⊢ False
[PROOFSTEP]
change ((SheafedSpace.forget C).map (colimit.ι F i) ≫ _) y = ((SheafedSpace.forget C).map (colimit.ι F j) ≫ _) x at eq
[GOAL]
case h.h.h.intro.intro
C : Type u_1
inst✝² : Category.{v, u_1} C
inst✝¹ : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝ : HasColimit F
i j : Discrete ι
h : i ≠ j
U : Opens ↑↑(F.obj i).toPresheafedSpace
x : ↑↑((F ⋙ forgetToPresheafedSpace).obj j)
y : (CategoryTheory.forget TopCat).obj ↑(F.obj i).toPresheafedSpace
hy : y ∈ ↑U
eq :
  ↑((forget C).map (colimit.ι F i) ≫
          (preservesColimitIso (forget C) F).hom ≫
            (HasColimit.isoOfNatIso Discrete.natIsoFunctor).hom ≫
              (TopCat.sigmaIsoSigma ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)).hom)
      y =
    ↑((forget C).map (colimit.ι F j) ≫
          (preservesColimitIso (forget C) F).hom ≫
            (HasColimit.isoOfNatIso Discrete.natIsoFunctor).hom ≫
              (TopCat.sigmaIsoSigma ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)).hom)
      x
⊢ False
[PROOFSTEP]
cases i
[GOAL]
case h.h.h.intro.intro.mk
C : Type u_1
inst✝² : Category.{v, u_1} C
inst✝¹ : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝ : HasColimit F
j : Discrete ι
x : ↑↑((F ⋙ forgetToPresheafedSpace).obj j)
as✝ : ι
h : { as := as✝ } ≠ j
U : Opens ↑↑(F.obj { as := as✝ }).toPresheafedSpace
y : (CategoryTheory.forget TopCat).obj ↑(F.obj { as := as✝ }).toPresheafedSpace
hy : y ∈ ↑U
eq :
  ↑((forget C).map (colimit.ι F { as := as✝ }) ≫
          (preservesColimitIso (forget C) F).hom ≫
            (HasColimit.isoOfNatIso Discrete.natIsoFunctor).hom ≫
              (TopCat.sigmaIsoSigma ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)).hom)
      y =
    ↑((forget C).map (colimit.ι F j) ≫
          (preservesColimitIso (forget C) F).hom ≫
            (HasColimit.isoOfNatIso Discrete.natIsoFunctor).hom ≫
              (TopCat.sigmaIsoSigma ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)).hom)
      x
⊢ False
[PROOFSTEP]
cases j
[GOAL]
case h.h.h.intro.intro.mk.mk
C : Type u_1
inst✝² : Category.{v, u_1} C
inst✝¹ : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝ : HasColimit F
as✝¹ : ι
U : Opens ↑↑(F.obj { as := as✝¹ }).toPresheafedSpace
y : (CategoryTheory.forget TopCat).obj ↑(F.obj { as := as✝¹ }).toPresheafedSpace
hy : y ∈ ↑U
as✝ : ι
x : ↑↑((F ⋙ forgetToPresheafedSpace).obj { as := as✝ })
h : { as := as✝¹ } ≠ { as := as✝ }
eq :
  ↑((forget C).map (colimit.ι F { as := as✝¹ }) ≫
          (preservesColimitIso (forget C) F).hom ≫
            (HasColimit.isoOfNatIso Discrete.natIsoFunctor).hom ≫
              (TopCat.sigmaIsoSigma ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)).hom)
      y =
    ↑((forget C).map (colimit.ι F { as := as✝ }) ≫
          (preservesColimitIso (forget C) F).hom ≫
            (HasColimit.isoOfNatIso Discrete.natIsoFunctor).hom ≫
              (TopCat.sigmaIsoSigma ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk)).hom)
      x
⊢ False
[PROOFSTEP]
rw [ι_preservesColimitsIso_hom_assoc, ι_preservesColimitsIso_hom_assoc, HasColimit.isoOfNatIso_ι_hom_assoc,
  HasColimit.isoOfNatIso_ι_hom_assoc, TopCat.sigmaIsoSigma_hom_ι, TopCat.sigmaIsoSigma_hom_ι] at eq
[GOAL]
case h.h.h.intro.intro.mk.mk
C : Type u_1
inst✝² : Category.{v, u_1} C
inst✝¹ : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝ : HasColimit F
as✝¹ : ι
U : Opens ↑↑(F.obj { as := as✝¹ }).toPresheafedSpace
y : (CategoryTheory.forget TopCat).obj ↑(F.obj { as := as✝¹ }).toPresheafedSpace
hy : y ∈ ↑U
as✝ : ι
x : ↑↑((F ⋙ forgetToPresheafedSpace).obj { as := as✝ })
h : { as := as✝¹ } ≠ { as := as✝ }
eq :
  ↑(NatTrans.app Discrete.natIsoFunctor.hom { as := as✝¹ } ≫
          TopCat.sigmaι ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk) as✝¹)
      y =
    ↑(NatTrans.app Discrete.natIsoFunctor.hom { as := as✝ } ≫
          TopCat.sigmaι ((F ⋙ forget C).toPrefunctor.obj ∘ Discrete.mk) as✝)
      x
⊢ False
[PROOFSTEP]
exact h (congr_arg Discrete.mk (congr_arg Sigma.fst eq))
[GOAL]
C : Type u_1
inst✝³ : Category.{v, u_1} C
inst✝² : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝¹ : HasColimit F
i : Discrete ι
inst✝ : HasStrictTerminalObjects C
U : Opens ↑↑(F.obj i).toPresheafedSpace
⊢ IsIso (NatTrans.app (colimit.ι F i).c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(colimit.ι F i).base)).obj U)))
[PROOFSTEP]
have e : colimit.ι F i = _ := (ι_preservesColimitsIso_inv SheafedSpace.forgetToPresheafedSpace F i).symm
[GOAL]
C : Type u_1
inst✝³ : Category.{v, u_1} C
inst✝² : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝¹ : HasColimit F
i : Discrete ι
inst✝ : HasStrictTerminalObjects C
U : Opens ↑↑(F.obj i).toPresheafedSpace
e : colimit.ι F i = colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv
⊢ IsIso (NatTrans.app (colimit.ι F i).c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(colimit.ι F i).base)).obj U)))
[PROOFSTEP]
have H :
  OpenEmbedding
    (colimit.ι (F ⋙ SheafedSpace.forgetToPresheafedSpace) i ≫
        (preservesColimitIso SheafedSpace.forgetToPresheafedSpace F).inv).base :=
  e ▸ sigma_ι_openEmbedding F i
[GOAL]
C : Type u_1
inst✝³ : Category.{v, u_1} C
inst✝² : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝¹ : HasColimit F
i : Discrete ι
inst✝ : HasStrictTerminalObjects C
U : Opens ↑↑(F.obj i).toPresheafedSpace
e : colimit.ι F i = colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv
H :
  OpenEmbedding ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).base
⊢ IsIso (NatTrans.app (colimit.ι F i).c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(colimit.ι F i).base)).obj U)))
[PROOFSTEP]
suffices
  IsIso <|
    (colimit.ι (F ⋙ SheafedSpace.forgetToPresheafedSpace) i ≫
          (preservesColimitIso SheafedSpace.forgetToPresheafedSpace F).inv).c.app <|
      op (H.isOpenMap.functor.obj U)
  by
  -- Porting note : just `convert` is very slow, so helps it a bitconvert this using 2 <;> congr
[GOAL]
C : Type u_1
inst✝³ : Category.{v, u_1} C
inst✝² : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝¹ : HasColimit F
i : Discrete ι
inst✝ : HasStrictTerminalObjects C
U : Opens ↑↑(F.obj i).toPresheafedSpace
e : colimit.ι F i = colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv
H :
  OpenEmbedding ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).base
this :
  IsIso
    (NatTrans.app (colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).c
      (op
        ((IsOpenMap.functor
              (_ :
                IsOpenMap
                  ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫
                        (preservesColimitIso forgetToPresheafedSpace F).inv).base)).obj
          U)))
⊢ IsIso (NatTrans.app (colimit.ι F i).c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(colimit.ι F i).base)).obj U)))
[PROOFSTEP]
convert this using 2
[GOAL]
case h.e'_3.h.e'_6.h
C : Type u_1
inst✝³ : Category.{v, u_1} C
inst✝² : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝¹ : HasColimit F
i : Discrete ι
inst✝ : HasStrictTerminalObjects C
U : Opens ↑↑(F.obj i).toPresheafedSpace
e : colimit.ι F i = colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv
H :
  OpenEmbedding ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).base
this :
  IsIso
    (NatTrans.app (colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).c
      (op
        ((IsOpenMap.functor
              (_ :
                IsOpenMap
                  ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫
                        (preservesColimitIso forgetToPresheafedSpace F).inv).base)).obj
          U)))
e_1✝ : (Opens ↑↑(colimit F).toPresheafedSpace)ᵒᵖ = (Opens ↑↑(forgetToPresheafedSpace.obj (colimit F)))ᵒᵖ
⊢ op ((IsOpenMap.functor (_ : IsOpenMap ↑(colimit.ι F i).base)).obj U) =
    op
      ((IsOpenMap.functor
            (_ :
              IsOpenMap
                ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫
                      (preservesColimitIso forgetToPresheafedSpace F).inv).base)).obj
        U)
[PROOFSTEP]
congr
[GOAL]
case h.e'_4.h.e'_5.h.h
C : Type u_1
inst✝³ : Category.{v, u_1} C
inst✝² : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝¹ : HasColimit F
i : Discrete ι
inst✝ : HasStrictTerminalObjects C
U : Opens ↑↑(F.obj i).toPresheafedSpace
e : colimit.ι F i = colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv
H :
  OpenEmbedding ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).base
this :
  IsIso
    (NatTrans.app (colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).c
      (op
        ((IsOpenMap.functor
              (_ :
                IsOpenMap
                  ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫
                        (preservesColimitIso forgetToPresheafedSpace F).inv).base)).obj
          U)))
e_1✝ : (Opens ↑↑(colimit F).toPresheafedSpace)ᵒᵖ = (Opens ↑↑(forgetToPresheafedSpace.obj (colimit F)))ᵒᵖ
he✝ : CategoryStruct.toQuiver = CategoryStruct.toQuiver
⊢ ((colimit.ι F i).base _* (F.obj i).presheaf).toPrefunctor =
    ((colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).base _*
        ((F ⋙ forgetToPresheafedSpace).obj i).presheaf).toPrefunctor
[PROOFSTEP]
congr
[GOAL]
case h.e'_4.h.e'_6.h
C : Type u_1
inst✝³ : Category.{v, u_1} C
inst✝² : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝¹ : HasColimit F
i : Discrete ι
inst✝ : HasStrictTerminalObjects C
U : Opens ↑↑(F.obj i).toPresheafedSpace
e : colimit.ι F i = colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv
H :
  OpenEmbedding ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).base
this :
  IsIso
    (NatTrans.app (colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).c
      (op
        ((IsOpenMap.functor
              (_ :
                IsOpenMap
                  ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫
                        (preservesColimitIso forgetToPresheafedSpace F).inv).base)).obj
          U)))
e_1✝ : (Opens ↑↑(colimit F).toPresheafedSpace)ᵒᵖ = (Opens ↑↑(forgetToPresheafedSpace.obj (colimit F)))ᵒᵖ
⊢ op ((IsOpenMap.functor (_ : IsOpenMap ↑(colimit.ι F i).base)).obj U) =
    op
      ((IsOpenMap.functor
            (_ :
              IsOpenMap
                ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫
                      (preservesColimitIso forgetToPresheafedSpace F).inv).base)).obj
        U)
[PROOFSTEP]
congr
[GOAL]
case h.e'_5.e'_6.h.h
C : Type u_1
inst✝³ : Category.{v, u_1} C
inst✝² : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝¹ : HasColimit F
i : Discrete ι
inst✝ : HasStrictTerminalObjects C
U : Opens ↑↑(F.obj i).toPresheafedSpace
e : colimit.ι F i = colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv
H :
  OpenEmbedding ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).base
this :
  IsIso
    (NatTrans.app (colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).c
      (op
        ((IsOpenMap.functor
              (_ :
                IsOpenMap
                  ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫
                        (preservesColimitIso forgetToPresheafedSpace F).inv).base)).obj
          U)))
e_3✝ :
  (colimit F).toPresheafedSpace.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(colimit.ι F i).base)).obj U)) =
    (forgetToPresheafedSpace.obj (colimit F)).presheaf.obj
      (op
        ((IsOpenMap.functor
              (_ :
                IsOpenMap
                  ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫
                        (preservesColimitIso forgetToPresheafedSpace F).inv).base)).obj
          U))
e_4✝ :
  ((colimit.ι F i).base _* (F.obj i).presheaf).obj
      (op ((IsOpenMap.functor (_ : IsOpenMap ↑(colimit.ι F i).base)).obj U)) =
    ((colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).base _*
          ((F ⋙ forgetToPresheafedSpace).obj i).presheaf).obj
      (op
        ((IsOpenMap.functor
              (_ :
                IsOpenMap
                  ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫
                        (preservesColimitIso forgetToPresheafedSpace F).inv).base)).obj
          U))
e_1✝ : (Opens ↑↑(colimit F).toPresheafedSpace)ᵒᵖ = (Opens ↑↑(forgetToPresheafedSpace.obj (colimit F)))ᵒᵖ
he✝ : Category.opposite = Category.opposite
⊢ (colimit.ι F i).base _* (F.obj i).presheaf =
    (colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).base _*
      ((F ⋙ forgetToPresheafedSpace).obj i).presheaf
[PROOFSTEP]
congr
[GOAL]
case h.e'_5.e'_7.h.h.h
C : Type u_1
inst✝³ : Category.{v, u_1} C
inst✝² : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝¹ : HasColimit F
i : Discrete ι
inst✝ : HasStrictTerminalObjects C
U : Opens ↑↑(F.obj i).toPresheafedSpace
e : colimit.ι F i = colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv
H :
  OpenEmbedding ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).base
this :
  IsIso
    (NatTrans.app (colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).c
      (op
        ((IsOpenMap.functor
              (_ :
                IsOpenMap
                  ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫
                        (preservesColimitIso forgetToPresheafedSpace F).inv).base)).obj
          U)))
e_3✝ :
  (colimit F).toPresheafedSpace.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(colimit.ι F i).base)).obj U)) =
    (forgetToPresheafedSpace.obj (colimit F)).presheaf.obj
      (op
        ((IsOpenMap.functor
              (_ :
                IsOpenMap
                  ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫
                        (preservesColimitIso forgetToPresheafedSpace F).inv).base)).obj
          U))
e_4✝ :
  ((colimit.ι F i).base _* (F.obj i).presheaf).obj
      (op ((IsOpenMap.functor (_ : IsOpenMap ↑(colimit.ι F i).base)).obj U)) =
    ((colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).base _*
          ((F ⋙ forgetToPresheafedSpace).obj i).presheaf).obj
      (op
        ((IsOpenMap.functor
              (_ :
                IsOpenMap
                  ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫
                        (preservesColimitIso forgetToPresheafedSpace F).inv).base)).obj
          U))
e_1✝ : (Opens ↑↑(colimit F).toPresheafedSpace)ᵒᵖ = (Opens ↑↑(forgetToPresheafedSpace.obj (colimit F)))ᵒᵖ
he✝² : Category.opposite = Category.opposite
he✝¹ : (colimit F).toPresheafedSpace.presheaf = (forgetToPresheafedSpace.obj (colimit F)).presheaf
he✝ :
  (colimit.ι F i).base _* (F.obj i).presheaf =
    (colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).base _*
      ((F ⋙ forgetToPresheafedSpace).obj i).presheaf
⊢ HEq (colimit.ι F i).c
    (colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).c
[PROOFSTEP]
congr
[GOAL]
case h.e'_5.e'_8.h
C : Type u_1
inst✝³ : Category.{v, u_1} C
inst✝² : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝¹ : HasColimit F
i : Discrete ι
inst✝ : HasStrictTerminalObjects C
U : Opens ↑↑(F.obj i).toPresheafedSpace
e : colimit.ι F i = colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv
H :
  OpenEmbedding ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).base
this :
  IsIso
    (NatTrans.app (colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).c
      (op
        ((IsOpenMap.functor
              (_ :
                IsOpenMap
                  ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫
                        (preservesColimitIso forgetToPresheafedSpace F).inv).base)).obj
          U)))
e_3✝ :
  (colimit F).toPresheafedSpace.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(colimit.ι F i).base)).obj U)) =
    (forgetToPresheafedSpace.obj (colimit F)).presheaf.obj
      (op
        ((IsOpenMap.functor
              (_ :
                IsOpenMap
                  ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫
                        (preservesColimitIso forgetToPresheafedSpace F).inv).base)).obj
          U))
e_4✝ :
  ((colimit.ι F i).base _* (F.obj i).presheaf).obj
      (op ((IsOpenMap.functor (_ : IsOpenMap ↑(colimit.ι F i).base)).obj U)) =
    ((colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).base _*
          ((F ⋙ forgetToPresheafedSpace).obj i).presheaf).obj
      (op
        ((IsOpenMap.functor
              (_ :
                IsOpenMap
                  ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫
                        (preservesColimitIso forgetToPresheafedSpace F).inv).base)).obj
          U))
e_1✝ : (Opens ↑↑(colimit F).toPresheafedSpace)ᵒᵖ = (Opens ↑↑(forgetToPresheafedSpace.obj (colimit F)))ᵒᵖ
⊢ op ((IsOpenMap.functor (_ : IsOpenMap ↑(colimit.ι F i).base)).obj U) =
    op
      ((IsOpenMap.functor
            (_ :
              IsOpenMap
                ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫
                      (preservesColimitIso forgetToPresheafedSpace F).inv).base)).obj
        U)
[PROOFSTEP]
congr
[GOAL]
C : Type u_1
inst✝³ : Category.{v, u_1} C
inst✝² : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝¹ : HasColimit F
i : Discrete ι
inst✝ : HasStrictTerminalObjects C
U : Opens ↑↑(F.obj i).toPresheafedSpace
e : colimit.ι F i = colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv
H :
  OpenEmbedding ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).base
⊢ IsIso
    (NatTrans.app (colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).c
      (op
        ((IsOpenMap.functor
              (_ :
                IsOpenMap
                  ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫
                        (preservesColimitIso forgetToPresheafedSpace F).inv).base)).obj
          U)))
[PROOFSTEP]
rw [PresheafedSpace.comp_c_app, ← PresheafedSpace.colimitPresheafObjIsoComponentwiseLimit_hom_π]
  -- Porting note : this instance created manually to make the `inferInstance` below work
[GOAL]
C : Type u_1
inst✝³ : Category.{v, u_1} C
inst✝² : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝¹ : HasColimit F
i : Discrete ι
inst✝ : HasStrictTerminalObjects C
U : Opens ↑↑(F.obj i).toPresheafedSpace
e : colimit.ι F i = colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv
H :
  OpenEmbedding ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).base
⊢ IsIso
    (NatTrans.app (preservesColimitIso forgetToPresheafedSpace F).inv.c
        (op
          ((IsOpenMap.functor
                (_ :
                  IsOpenMap
                    ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫
                          (preservesColimitIso forgetToPresheafedSpace F).inv).base)).obj
            U)) ≫
      (PresheafedSpace.colimitPresheafObjIsoComponentwiseLimit (F ⋙ forgetToPresheafedSpace)
            ((Opens.map (preservesColimitIso forgetToPresheafedSpace F).inv.base).obj
              (op
                  ((IsOpenMap.functor
                        (_ :
                          IsOpenMap
                            ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫
                                  (preservesColimitIso forgetToPresheafedSpace F).inv).base)).obj
                    U)).unop)).hom ≫
        limit.π
          (PresheafedSpace.componentwiseDiagram (F ⋙ forgetToPresheafedSpace)
            ((Opens.map (preservesColimitIso forgetToPresheafedSpace F).inv.base).obj
              (op
                  ((IsOpenMap.functor
                        (_ :
                          IsOpenMap
                            ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫
                                  (preservesColimitIso forgetToPresheafedSpace F).inv).base)).obj
                    U)).unop))
          (op i))
[PROOFSTEP]
have inst1 : IsIso (preservesColimitIso forgetToPresheafedSpace F).inv.c := PresheafedSpace.c_isIso_of_iso _
[GOAL]
C : Type u_1
inst✝³ : Category.{v, u_1} C
inst✝² : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝¹ : HasColimit F
i : Discrete ι
inst✝ : HasStrictTerminalObjects C
U : Opens ↑↑(F.obj i).toPresheafedSpace
e : colimit.ι F i = colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv
H :
  OpenEmbedding ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).base
inst1 : IsIso (preservesColimitIso forgetToPresheafedSpace F).inv.c
⊢ IsIso
    (NatTrans.app (preservesColimitIso forgetToPresheafedSpace F).inv.c
        (op
          ((IsOpenMap.functor
                (_ :
                  IsOpenMap
                    ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫
                          (preservesColimitIso forgetToPresheafedSpace F).inv).base)).obj
            U)) ≫
      (PresheafedSpace.colimitPresheafObjIsoComponentwiseLimit (F ⋙ forgetToPresheafedSpace)
            ((Opens.map (preservesColimitIso forgetToPresheafedSpace F).inv.base).obj
              (op
                  ((IsOpenMap.functor
                        (_ :
                          IsOpenMap
                            ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫
                                  (preservesColimitIso forgetToPresheafedSpace F).inv).base)).obj
                    U)).unop)).hom ≫
        limit.π
          (PresheafedSpace.componentwiseDiagram (F ⋙ forgetToPresheafedSpace)
            ((Opens.map (preservesColimitIso forgetToPresheafedSpace F).inv.base).obj
              (op
                  ((IsOpenMap.functor
                        (_ :
                          IsOpenMap
                            ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫
                                  (preservesColimitIso forgetToPresheafedSpace F).inv).base)).obj
                    U)).unop))
          (op i))
[PROOFSTEP]
rsuffices :
  IsIso
    (limit.π
      (PresheafedSpace.componentwiseDiagram (F ⋙ SheafedSpace.forgetToPresheafedSpace)
        ((Opens.map (preservesColimitIso SheafedSpace.forgetToPresheafedSpace F).inv.base).obj
          (unop <| op <| H.isOpenMap.functor.obj U)))
      (op i))
[GOAL]
C : Type u_1
inst✝³ : Category.{v, u_1} C
inst✝² : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝¹ : HasColimit F
i : Discrete ι
inst✝ : HasStrictTerminalObjects C
U : Opens ↑↑(F.obj i).toPresheafedSpace
e : colimit.ι F i = colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv
H :
  OpenEmbedding ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).base
inst1 : IsIso (preservesColimitIso forgetToPresheafedSpace F).inv.c
this✝ :
  IsIso
    (limit.π
      (PresheafedSpace.componentwiseDiagram (F ⋙ forgetToPresheafedSpace)
        ((Opens.map (preservesColimitIso forgetToPresheafedSpace F).inv.base).obj
          (op
              ((IsOpenMap.functor
                    (_ :
                      IsOpenMap
                        ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫
                              (preservesColimitIso forgetToPresheafedSpace F).inv).base)).obj
                U)).unop))
      (op i))
⊢ IsIso
    (NatTrans.app (preservesColimitIso forgetToPresheafedSpace F).inv.c
        (op
          ((IsOpenMap.functor
                (_ :
                  IsOpenMap
                    ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫
                          (preservesColimitIso forgetToPresheafedSpace F).inv).base)).obj
            U)) ≫
      (PresheafedSpace.colimitPresheafObjIsoComponentwiseLimit (F ⋙ forgetToPresheafedSpace)
            ((Opens.map (preservesColimitIso forgetToPresheafedSpace F).inv.base).obj
              (op
                  ((IsOpenMap.functor
                        (_ :
                          IsOpenMap
                            ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫
                                  (preservesColimitIso forgetToPresheafedSpace F).inv).base)).obj
                    U)).unop)).hom ≫
        limit.π
          (PresheafedSpace.componentwiseDiagram (F ⋙ forgetToPresheafedSpace)
            ((Opens.map (preservesColimitIso forgetToPresheafedSpace F).inv.base).obj
              (op
                  ((IsOpenMap.functor
                        (_ :
                          IsOpenMap
                            ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫
                                  (preservesColimitIso forgetToPresheafedSpace F).inv).base)).obj
                    U)).unop))
          (op i))
[PROOFSTEP]
infer_instance
[GOAL]
C : Type u_1
inst✝³ : Category.{v, u_1} C
inst✝² : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝¹ : HasColimit F
i : Discrete ι
inst✝ : HasStrictTerminalObjects C
U : Opens ↑↑(F.obj i).toPresheafedSpace
e : colimit.ι F i = colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv
H :
  OpenEmbedding ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).base
inst1 : IsIso (preservesColimitIso forgetToPresheafedSpace F).inv.c
⊢ IsIso
    (limit.π
      (PresheafedSpace.componentwiseDiagram (F ⋙ forgetToPresheafedSpace)
        ((Opens.map (preservesColimitIso forgetToPresheafedSpace F).inv.base).obj
          (op
              ((IsOpenMap.functor
                    (_ :
                      IsOpenMap
                        ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫
                              (preservesColimitIso forgetToPresheafedSpace F).inv).base)).obj
                U)).unop))
      (op i))
[PROOFSTEP]
apply limit_π_isIso_of_is_strict_terminal
[GOAL]
case H
C : Type u_1
inst✝³ : Category.{v, u_1} C
inst✝² : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝¹ : HasColimit F
i : Discrete ι
inst✝ : HasStrictTerminalObjects C
U : Opens ↑↑(F.obj i).toPresheafedSpace
e : colimit.ι F i = colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv
H :
  OpenEmbedding ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).base
inst1 : IsIso (preservesColimitIso forgetToPresheafedSpace F).inv.c
⊢ (j : (Discrete ι)ᵒᵖ) →
    j ≠ op i →
      IsTerminal
        ((PresheafedSpace.componentwiseDiagram (F ⋙ forgetToPresheafedSpace)
              ((Opens.map (preservesColimitIso forgetToPresheafedSpace F).inv.base).obj
                (op
                    ((IsOpenMap.functor
                          (_ :
                            IsOpenMap
                              ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫
                                    (preservesColimitIso forgetToPresheafedSpace F).inv).base)).obj
                      U)).unop)).obj
          j)
[PROOFSTEP]
intro j hj
[GOAL]
case H
C : Type u_1
inst✝³ : Category.{v, u_1} C
inst✝² : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝¹ : HasColimit F
i : Discrete ι
inst✝ : HasStrictTerminalObjects C
U : Opens ↑↑(F.obj i).toPresheafedSpace
e : colimit.ι F i = colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv
H :
  OpenEmbedding ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).base
inst1 : IsIso (preservesColimitIso forgetToPresheafedSpace F).inv.c
j : (Discrete ι)ᵒᵖ
hj : j ≠ op i
⊢ IsTerminal
    ((PresheafedSpace.componentwiseDiagram (F ⋙ forgetToPresheafedSpace)
          ((Opens.map (preservesColimitIso forgetToPresheafedSpace F).inv.base).obj
            (op
                ((IsOpenMap.functor
                      (_ :
                        IsOpenMap
                          ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫
                                (preservesColimitIso forgetToPresheafedSpace F).inv).base)).obj
                  U)).unop)).obj
      j)
[PROOFSTEP]
induction j using Opposite.rec' with
| h j => ?_
[GOAL]
case H
C : Type u_1
inst✝³ : Category.{v, u_1} C
inst✝² : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝¹ : HasColimit F
i : Discrete ι
inst✝ : HasStrictTerminalObjects C
U : Opens ↑↑(F.obj i).toPresheafedSpace
e : colimit.ι F i = colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv
H :
  OpenEmbedding ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).base
inst1 : IsIso (preservesColimitIso forgetToPresheafedSpace F).inv.c
j : (Discrete ι)ᵒᵖ
hj : j ≠ op i
⊢ IsTerminal
    ((PresheafedSpace.componentwiseDiagram (F ⋙ forgetToPresheafedSpace)
          ((Opens.map (preservesColimitIso forgetToPresheafedSpace F).inv.base).obj
            (op
                ((IsOpenMap.functor
                      (_ :
                        IsOpenMap
                          ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫
                                (preservesColimitIso forgetToPresheafedSpace F).inv).base)).obj
                  U)).unop)).obj
      j)
[PROOFSTEP]
induction j using Opposite.rec' with
| h j => ?_
[GOAL]
case H.h
C : Type u_1
inst✝³ : Category.{v, u_1} C
inst✝² : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝¹ : HasColimit F
i : Discrete ι
inst✝ : HasStrictTerminalObjects C
U : Opens ↑↑(F.obj i).toPresheafedSpace
e : colimit.ι F i = colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv
H :
  OpenEmbedding ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).base
inst1 : IsIso (preservesColimitIso forgetToPresheafedSpace F).inv.c
j : Discrete ι
hj : op j ≠ op i
⊢ IsTerminal
    ((PresheafedSpace.componentwiseDiagram (F ⋙ forgetToPresheafedSpace)
          ((Opens.map (preservesColimitIso forgetToPresheafedSpace F).inv.base).obj
            (op
                ((IsOpenMap.functor
                      (_ :
                        IsOpenMap
                          ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫
                                (preservesColimitIso forgetToPresheafedSpace F).inv).base)).obj
                  U)).unop)).obj
      (op j))
[PROOFSTEP]
dsimp
[GOAL]
case H.h
C : Type u_1
inst✝³ : Category.{v, u_1} C
inst✝² : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝¹ : HasColimit F
i : Discrete ι
inst✝ : HasStrictTerminalObjects C
U : Opens ↑↑(F.obj i).toPresheafedSpace
e : colimit.ι F i = colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv
H :
  OpenEmbedding ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).base
inst1 : IsIso (preservesColimitIso forgetToPresheafedSpace F).inv.c
j : Discrete ι
hj : op j ≠ op i
⊢ IsTerminal
    ((F.obj j).presheaf.obj
      (op
        ((Opens.map (colimit.ι (F ⋙ forgetToPresheafedSpace) j).base).obj
          ((Opens.map (preservesColimitIso forgetToPresheafedSpace F).inv.base).obj
            ((IsOpenMap.functor
                  (_ :
                    IsOpenMap
                      ↑((colimit.ι (F ⋙ forgetToPresheafedSpace) i).base ≫
                          (preservesColimitIso forgetToPresheafedSpace F).inv.base))).obj
              U)))))
[PROOFSTEP]
convert (F.obj j).sheaf.isTerminalOfEmpty using 3
[GOAL]
case h.e'_3.h.e'_6.h.e'_2
C : Type u_1
inst✝³ : Category.{v, u_1} C
inst✝² : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝¹ : HasColimit F
i : Discrete ι
inst✝ : HasStrictTerminalObjects C
U : Opens ↑↑(F.obj i).toPresheafedSpace
e : colimit.ι F i = colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv
H :
  OpenEmbedding ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).base
inst1 : IsIso (preservesColimitIso forgetToPresheafedSpace F).inv.c
j : Discrete ι
hj : op j ≠ op i
⊢ (Opens.map (colimit.ι (F ⋙ forgetToPresheafedSpace) j).base).obj
      ((Opens.map (preservesColimitIso forgetToPresheafedSpace F).inv.base).obj
        ((IsOpenMap.functor
              (_ :
                IsOpenMap
                  ↑((colimit.ι (F ⋙ forgetToPresheafedSpace) i).base ≫
                      (preservesColimitIso forgetToPresheafedSpace F).inv.base))).obj
          U)) =
    ⊥
[PROOFSTEP]
convert image_preimage_is_empty F i j (fun h => hj (congr_arg op h.symm)) U using 6
[GOAL]
case h.e'_2.h.h.e'_6.h.e'_6.h.h.e'_5.h.e'_5.h.e'_3
C : Type u_1
inst✝³ : Category.{v, u_1} C
inst✝² : HasLimits C
ι : Type v
F : Discrete ι ⥤ SheafedSpace C
inst✝¹ : HasColimit F
i : Discrete ι
inst✝ : HasStrictTerminalObjects C
U : Opens ↑↑(F.obj i).toPresheafedSpace
e : colimit.ι F i = colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv
H :
  OpenEmbedding ↑(colimit.ι (F ⋙ forgetToPresheafedSpace) i ≫ (preservesColimitIso forgetToPresheafedSpace F).inv).base
inst1 : IsIso (preservesColimitIso forgetToPresheafedSpace F).inv.c
j : Discrete ι
hj : op j ≠ op i
e_1✝¹ : Opens ↑↑(F.obj j).toPresheafedSpace = Opens ↑↑((F ⋙ forgetToPresheafedSpace).obj j)
e_1✝ : Opens ↑↑(colimit F).toPresheafedSpace = Opens ↑↑(forgetToPresheafedSpace.obj (colimit F))
⊢ (colimit.ι (F ⋙ forgetToPresheafedSpace) i).base ≫ (preservesColimitIso forgetToPresheafedSpace F).inv.base =
    (colimit.ι F i).base
[PROOFSTEP]
exact (congr_arg PresheafedSpace.Hom.base e).symm
[GOAL]
C : Type u_1
inst✝¹ : Category.{?u.431494, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
inst✝ : IsIso g
⊢ g.val ≫ (inv g).val = 𝟙 Y.toPresheafedSpace ∧ (inv g).val ≫ g.val = 𝟙 Z.toPresheafedSpace
[PROOFSTEP]
erw [← LocallyRingedSpace.comp_val]
[GOAL]
C : Type u_1
inst✝¹ : Category.{?u.431494, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
inst✝ : IsIso g
⊢ (g ≫ inv g).val = 𝟙 Y.toPresheafedSpace ∧ (inv g).val ≫ g.val = 𝟙 Z.toPresheafedSpace
[PROOFSTEP]
rw [IsIso.hom_inv_id]
[GOAL]
C : Type u_1
inst✝¹ : Category.{?u.431494, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
inst✝ : IsIso g
⊢ (𝟙 Y).val = 𝟙 Y.toPresheafedSpace ∧ (inv g).val ≫ g.val = 𝟙 Z.toPresheafedSpace
[PROOFSTEP]
erw [← LocallyRingedSpace.comp_val]
[GOAL]
C : Type u_1
inst✝¹ : Category.{?u.431494, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
inst✝ : IsIso g
⊢ (𝟙 Y).val = 𝟙 Y.toPresheafedSpace ∧ (inv g ≫ g).val = 𝟙 Z.toPresheafedSpace
[PROOFSTEP]
rw [IsIso.inv_hom_id]
[GOAL]
C : Type u_1
inst✝¹ : Category.{?u.431494, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
inst✝ : IsIso g
⊢ (𝟙 Y).val = 𝟙 Y.toPresheafedSpace ∧ (𝟙 Z).val = 𝟙 Z.toPresheafedSpace
[PROOFSTEP]
constructor
[GOAL]
case left
C : Type u_1
inst✝¹ : Category.{?u.431494, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
inst✝ : IsIso g
⊢ (𝟙 Y).val = 𝟙 Y.toPresheafedSpace
[PROOFSTEP]
rfl
[GOAL]
case right
C : Type u_1
inst✝¹ : Category.{?u.431494, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
inst✝ : IsIso g
⊢ (𝟙 Z).val = 𝟙 Z.toPresheafedSpace
[PROOFSTEP]
rfl
[GOAL]
C : Type u_1
inst✝ : Category.{?u.433254, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ Mono f.val
[PROOFSTEP]
infer_instance
[GOAL]
C : Type u_1
inst✝ : Category.{?u.434441, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ PullbackCone f g
[PROOFSTEP]
refine' PullbackCone.mk _ (Y.ofRestrict (TopCat.snd_openEmbedding_of_left_openEmbedding H.base_open g.1.base)) _
[GOAL]
case refine'_1
C : Type u_1
inst✝ : Category.{?u.434441, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ restrict Y (_ : OpenEmbedding ↑pullback.snd) ⟶ X
[PROOFSTEP]
use PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f.1 g.1
[GOAL]
case prop
C : Type u_1
inst✝ : Category.{?u.434441, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ ∀ (x : ↑↑(restrict Y (_ : OpenEmbedding ↑pullback.snd)).toSheafedSpace.toPresheafedSpace),
    IsLocalRingHom (PresheafedSpace.stalkMap (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f.val g.val) x)
[PROOFSTEP]
intro x
[GOAL]
case prop
C : Type u_1
inst✝ : Category.{?u.434441, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
x : ↑↑(restrict Y (_ : OpenEmbedding ↑pullback.snd)).toSheafedSpace.toPresheafedSpace
⊢ IsLocalRingHom (PresheafedSpace.stalkMap (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f.val g.val) x)
[PROOFSTEP]
have :=
  PresheafedSpace.stalkMap.congr_hom _ _ (PresheafedSpace.IsOpenImmersion.pullback_cone_of_left_condition f.1 g.1) x
[GOAL]
case prop
C : Type u_1
inst✝ : Category.{?u.434441, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
x : ↑↑(restrict Y (_ : OpenEmbedding ↑pullback.snd)).toSheafedSpace.toPresheafedSpace
this :
  PresheafedSpace.stalkMap (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f.val g.val ≫ f.val) x =
    eqToHom
        (_ :
          PresheafedSpace.stalk Z.toPresheafedSpace
              (↑(PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f.val g.val ≫ f.val).base x) =
            PresheafedSpace.stalk Z.toPresheafedSpace
              (↑(PresheafedSpace.ofRestrict Y.toPresheafedSpace (_ : OpenEmbedding ↑pullback.snd) ≫ g.val).base x)) ≫
      PresheafedSpace.stalkMap
        (PresheafedSpace.ofRestrict Y.toPresheafedSpace (_ : OpenEmbedding ↑pullback.snd) ≫ g.val) x
⊢ IsLocalRingHom (PresheafedSpace.stalkMap (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f.val g.val) x)
[PROOFSTEP]
rw [PresheafedSpace.stalkMap.comp, PresheafedSpace.stalkMap.comp] at this
[GOAL]
case prop
C : Type u_1
inst✝ : Category.{?u.434441, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
x : ↑↑(restrict Y (_ : OpenEmbedding ↑pullback.snd)).toSheafedSpace.toPresheafedSpace
this :
  PresheafedSpace.stalkMap f.val (↑(PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f.val g.val).base x) ≫
      PresheafedSpace.stalkMap (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f.val g.val) x =
    eqToHom
        (_ :
          PresheafedSpace.stalk Z.toPresheafedSpace
              (↑(PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f.val g.val ≫ f.val).base x) =
            PresheafedSpace.stalk Z.toPresheafedSpace
              (↑(PresheafedSpace.ofRestrict Y.toPresheafedSpace (_ : OpenEmbedding ↑pullback.snd) ≫ g.val).base x)) ≫
      PresheafedSpace.stalkMap g.val
          (↑(PresheafedSpace.ofRestrict Y.toPresheafedSpace (_ : OpenEmbedding ↑pullback.snd)).base x) ≫
        PresheafedSpace.stalkMap (PresheafedSpace.ofRestrict Y.toPresheafedSpace (_ : OpenEmbedding ↑pullback.snd)) x
⊢ IsLocalRingHom (PresheafedSpace.stalkMap (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f.val g.val) x)
[PROOFSTEP]
rw [← IsIso.eq_inv_comp] at this
[GOAL]
case prop
C : Type u_1
inst✝ : Category.{?u.434441, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
x : ↑↑(restrict Y (_ : OpenEmbedding ↑pullback.snd)).toSheafedSpace.toPresheafedSpace
this :
  PresheafedSpace.stalkMap (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f.val g.val) x =
    inv (PresheafedSpace.stalkMap f.val (↑(PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f.val g.val).base x)) ≫
      eqToHom
          (_ :
            PresheafedSpace.stalk Z.toPresheafedSpace
                (↑(PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f.val g.val ≫ f.val).base x) =
              PresheafedSpace.stalk Z.toPresheafedSpace
                (↑(PresheafedSpace.ofRestrict Y.toPresheafedSpace (_ : OpenEmbedding ↑pullback.snd) ≫ g.val).base x)) ≫
        PresheafedSpace.stalkMap g.val
            (↑(PresheafedSpace.ofRestrict Y.toPresheafedSpace (_ : OpenEmbedding ↑pullback.snd)).base x) ≫
          PresheafedSpace.stalkMap (PresheafedSpace.ofRestrict Y.toPresheafedSpace (_ : OpenEmbedding ↑pullback.snd)) x
⊢ IsLocalRingHom (PresheafedSpace.stalkMap (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f.val g.val) x)
[PROOFSTEP]
rw [this]
[GOAL]
case prop
C : Type u_1
inst✝ : Category.{?u.434441, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
x : ↑↑(restrict Y (_ : OpenEmbedding ↑pullback.snd)).toSheafedSpace.toPresheafedSpace
this :
  PresheafedSpace.stalkMap (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f.val g.val) x =
    inv (PresheafedSpace.stalkMap f.val (↑(PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f.val g.val).base x)) ≫
      eqToHom
          (_ :
            PresheafedSpace.stalk Z.toPresheafedSpace
                (↑(PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f.val g.val ≫ f.val).base x) =
              PresheafedSpace.stalk Z.toPresheafedSpace
                (↑(PresheafedSpace.ofRestrict Y.toPresheafedSpace (_ : OpenEmbedding ↑pullback.snd) ≫ g.val).base x)) ≫
        PresheafedSpace.stalkMap g.val
            (↑(PresheafedSpace.ofRestrict Y.toPresheafedSpace (_ : OpenEmbedding ↑pullback.snd)).base x) ≫
          PresheafedSpace.stalkMap (PresheafedSpace.ofRestrict Y.toPresheafedSpace (_ : OpenEmbedding ↑pullback.snd)) x
⊢ IsLocalRingHom
    (inv
        (PresheafedSpace.stalkMap f.val (↑(PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f.val g.val).base x)) ≫
      eqToHom
          (_ :
            PresheafedSpace.stalk Z.toPresheafedSpace
                (↑(PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f.val g.val ≫ f.val).base x) =
              PresheafedSpace.stalk Z.toPresheafedSpace
                (↑(PresheafedSpace.ofRestrict Y.toPresheafedSpace (_ : OpenEmbedding ↑pullback.snd) ≫ g.val).base x)) ≫
        PresheafedSpace.stalkMap g.val
            (↑(PresheafedSpace.ofRestrict Y.toPresheafedSpace (_ : OpenEmbedding ↑pullback.snd)).base x) ≫
          PresheafedSpace.stalkMap (PresheafedSpace.ofRestrict Y.toPresheafedSpace (_ : OpenEmbedding ↑pullback.snd)) x)
[PROOFSTEP]
infer_instance
[GOAL]
case refine'_2
C : Type u_1
inst✝ : Category.{?u.434441, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ { val := PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f.val g.val,
        prop :=
          (_ :
            ∀ (x : ↑↑(restrict Y (_ : OpenEmbedding ↑pullback.snd)).toSheafedSpace.toPresheafedSpace),
              IsLocalRingHom
                (PresheafedSpace.stalkMap (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f.val g.val) x)) } ≫
      f =
    ofRestrict Y (_ : OpenEmbedding ↑pullback.snd) ≫ g
[PROOFSTEP]
exact LocallyRingedSpace.Hom.ext _ _ (PresheafedSpace.IsOpenImmersion.pullback_cone_of_left_condition _ _)
[GOAL]
C : Type u_1
inst✝ : Category.{?u.437291, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ PresheafedSpace.IsOpenImmersion (PresheafedSpace.ofRestrict Y.toPresheafedSpace (_ : OpenEmbedding ↑pullback.snd))
[PROOFSTEP]
infer_instance
[GOAL]
C : Type u_1
inst✝ : Category.{?u.437921, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
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 }
[PROOFSTEP]
refine'
  ⟨LocallyRingedSpace.Hom.mk
      (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftLift f.1 g.1
        (PullbackCone.mk _ _ (congr_arg LocallyRingedSpace.Hom.val s.condition)))
      _,
    LocallyRingedSpace.Hom.ext _ _ (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftLift_fst f.1 g.1 _),
    LocallyRingedSpace.Hom.ext _ _ (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftLift_snd f.1 g.1 _), _⟩
[GOAL]
case refine'_1
C : Type u_1
inst✝ : Category.{?u.437921, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
s : PullbackCone f g
⊢ ∀ (x : ↑↑s.pt.toPresheafedSpace),
    IsLocalRingHom
      (PresheafedSpace.stalkMap
        (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftLift f.val g.val
          (PullbackCone.mk (PullbackCone.fst s).val (PullbackCone.snd s).val
            (_ : (PullbackCone.fst s ≫ f).val = (PullbackCone.snd s ≫ g).val)))
        x)
[PROOFSTEP]
intro x
[GOAL]
case refine'_1
C : Type u_1
inst✝ : Category.{?u.437921, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
s : PullbackCone f g
x : ↑↑s.pt.toPresheafedSpace
⊢ IsLocalRingHom
    (PresheafedSpace.stalkMap
      (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftLift f.val g.val
        (PullbackCone.mk (PullbackCone.fst s).val (PullbackCone.snd s).val
          (_ : (PullbackCone.fst s ≫ f).val = (PullbackCone.snd s ≫ g).val)))
      x)
[PROOFSTEP]
have :=
  PresheafedSpace.stalkMap.congr_hom _ _
    (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftLift_snd f.1 g.1
      (PullbackCone.mk s.fst.1 s.snd.1 (congr_arg LocallyRingedSpace.Hom.val s.condition)))
    x
[GOAL]
case refine'_1
C : Type u_1
inst✝ : Category.{?u.437921, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
s : PullbackCone f g
x : ↑↑s.pt.toPresheafedSpace
this :
  PresheafedSpace.stalkMap
      (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftLift f.val g.val
          (PullbackCone.mk (PullbackCone.fst s).val (PullbackCone.snd s).val
            (_ : (PullbackCone.fst s ≫ f).val = (PullbackCone.snd s ≫ g).val)) ≫
        PullbackCone.snd (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeft f.val g.val))
      x =
    eqToHom
        (_ :
          PresheafedSpace.stalk Y.toPresheafedSpace
              (↑(PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftLift f.val g.val
                        (PullbackCone.mk (PullbackCone.fst s).val (PullbackCone.snd s).val
                          (_ : (PullbackCone.fst s ≫ f).val = (PullbackCone.snd s ≫ g).val)) ≫
                      PullbackCone.snd (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeft f.val g.val)).base
                x) =
            PresheafedSpace.stalk Y.toPresheafedSpace
              (↑(PullbackCone.snd
                      (PullbackCone.mk (PullbackCone.fst s).val (PullbackCone.snd s).val
                        (_ : (PullbackCone.fst s ≫ f).val = (PullbackCone.snd s ≫ g).val))).base
                x)) ≫
      PresheafedSpace.stalkMap
        (PullbackCone.snd
          (PullbackCone.mk (PullbackCone.fst s).val (PullbackCone.snd s).val
            (_ : (PullbackCone.fst s ≫ f).val = (PullbackCone.snd s ≫ g).val)))
        x
⊢ IsLocalRingHom
    (PresheafedSpace.stalkMap
      (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftLift f.val g.val
        (PullbackCone.mk (PullbackCone.fst s).val (PullbackCone.snd s).val
          (_ : (PullbackCone.fst s ≫ f).val = (PullbackCone.snd s ≫ g).val)))
      x)
[PROOFSTEP]
change _ = _ ≫ PresheafedSpace.stalkMap s.snd.1 x at this
[GOAL]
case refine'_1
C : Type u_1
inst✝ : Category.{?u.437921, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
s : PullbackCone f g
x : ↑↑s.pt.toPresheafedSpace
this :
  PresheafedSpace.stalkMap
      (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftLift f.val g.val
          (PullbackCone.mk (PullbackCone.fst s).val (PullbackCone.snd s).val
            (_ : (PullbackCone.fst s ≫ f).val = (PullbackCone.snd s ≫ g).val)) ≫
        PullbackCone.snd (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeft f.val g.val))
      x =
    eqToHom
        (_ :
          PresheafedSpace.stalk Y.toPresheafedSpace
              (↑(PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftLift f.val g.val
                        (PullbackCone.mk (PullbackCone.fst s).val (PullbackCone.snd s).val
                          (_ : (PullbackCone.fst s ≫ f).val = (PullbackCone.snd s ≫ g).val)) ≫
                      PullbackCone.snd (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeft f.val g.val)).base
                x) =
            PresheafedSpace.stalk Y.toPresheafedSpace
              (↑(PullbackCone.snd
                      (PullbackCone.mk (PullbackCone.fst s).val (PullbackCone.snd s).val
                        (_ : (PullbackCone.fst s ≫ f).val = (PullbackCone.snd s ≫ g).val))).base
                x)) ≫
      PresheafedSpace.stalkMap (PullbackCone.snd s).val x
⊢ IsLocalRingHom
    (PresheafedSpace.stalkMap
      (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftLift f.val g.val
        (PullbackCone.mk (PullbackCone.fst s).val (PullbackCone.snd s).val
          (_ : (PullbackCone.fst s ≫ f).val = (PullbackCone.snd s ≫ g).val)))
      x)
[PROOFSTEP]
rw [PresheafedSpace.stalkMap.comp, ← IsIso.eq_inv_comp] at this
[GOAL]
case refine'_1
C : Type u_1
inst✝ : Category.{?u.437921, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
s : PullbackCone f g
x : ↑↑s.pt.toPresheafedSpace
this :
  PresheafedSpace.stalkMap
      (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftLift f.val g.val
        (PullbackCone.mk (PullbackCone.fst s).val (PullbackCone.snd s).val
          (_ : (PullbackCone.fst s ≫ f).val = (PullbackCone.snd s ≫ g).val)))
      x =
    inv
        (PresheafedSpace.stalkMap (PullbackCone.snd (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeft f.val g.val))
          (↑(PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftLift f.val g.val
                  (PullbackCone.mk (PullbackCone.fst s).val (PullbackCone.snd s).val
                    (_ : (PullbackCone.fst s ≫ f).val = (PullbackCone.snd s ≫ g).val))).base
            x)) ≫
      eqToHom
          (_ :
            PresheafedSpace.stalk Y.toPresheafedSpace
                (↑(PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftLift f.val g.val
                          (PullbackCone.mk (PullbackCone.fst s).val (PullbackCone.snd s).val
                            (_ : (PullbackCone.fst s ≫ f).val = (PullbackCone.snd s ≫ g).val)) ≫
                        PullbackCone.snd (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeft f.val g.val)).base
                  x) =
              PresheafedSpace.stalk Y.toPresheafedSpace
                (↑(PullbackCone.snd
                        (PullbackCone.mk (PullbackCone.fst s).val (PullbackCone.snd s).val
                          (_ : (PullbackCone.fst s ≫ f).val = (PullbackCone.snd s ≫ g).val))).base
                  x)) ≫
        PresheafedSpace.stalkMap (PullbackCone.snd s).val x
⊢ IsLocalRingHom
    (PresheafedSpace.stalkMap
      (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftLift f.val g.val
        (PullbackCone.mk (PullbackCone.fst s).val (PullbackCone.snd s).val
          (_ : (PullbackCone.fst s ≫ f).val = (PullbackCone.snd s ≫ g).val)))
      x)
[PROOFSTEP]
rw [this]
[GOAL]
case refine'_1
C : Type u_1
inst✝ : Category.{?u.437921, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
s : PullbackCone f g
x : ↑↑s.pt.toPresheafedSpace
this :
  PresheafedSpace.stalkMap
      (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftLift f.val g.val
        (PullbackCone.mk (PullbackCone.fst s).val (PullbackCone.snd s).val
          (_ : (PullbackCone.fst s ≫ f).val = (PullbackCone.snd s ≫ g).val)))
      x =
    inv
        (PresheafedSpace.stalkMap (PullbackCone.snd (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeft f.val g.val))
          (↑(PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftLift f.val g.val
                  (PullbackCone.mk (PullbackCone.fst s).val (PullbackCone.snd s).val
                    (_ : (PullbackCone.fst s ≫ f).val = (PullbackCone.snd s ≫ g).val))).base
            x)) ≫
      eqToHom
          (_ :
            PresheafedSpace.stalk Y.toPresheafedSpace
                (↑(PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftLift f.val g.val
                          (PullbackCone.mk (PullbackCone.fst s).val (PullbackCone.snd s).val
                            (_ : (PullbackCone.fst s ≫ f).val = (PullbackCone.snd s ≫ g).val)) ≫
                        PullbackCone.snd (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeft f.val g.val)).base
                  x) =
              PresheafedSpace.stalk Y.toPresheafedSpace
                (↑(PullbackCone.snd
                        (PullbackCone.mk (PullbackCone.fst s).val (PullbackCone.snd s).val
                          (_ : (PullbackCone.fst s ≫ f).val = (PullbackCone.snd s ≫ g).val))).base
                  x)) ≫
        PresheafedSpace.stalkMap (PullbackCone.snd s).val x
⊢ IsLocalRingHom
    (inv
        (PresheafedSpace.stalkMap (PullbackCone.snd (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeft f.val g.val))
          (↑(PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftLift f.val g.val
                  (PullbackCone.mk (PullbackCone.fst s).val (PullbackCone.snd s).val
                    (_ : (PullbackCone.fst s ≫ f).val = (PullbackCone.snd s ≫ g).val))).base
            x)) ≫
      eqToHom
          (_ :
            PresheafedSpace.stalk Y.toPresheafedSpace
                (↑(PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftLift f.val g.val
                          (PullbackCone.mk (PullbackCone.fst s).val (PullbackCone.snd s).val
                            (_ : (PullbackCone.fst s ≫ f).val = (PullbackCone.snd s ≫ g).val)) ≫
                        PullbackCone.snd (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeft f.val g.val)).base
                  x) =
              PresheafedSpace.stalk Y.toPresheafedSpace
                (↑(PullbackCone.snd
                        (PullbackCone.mk (PullbackCone.fst s).val (PullbackCone.snd s).val
                          (_ : (PullbackCone.fst s ≫ f).val = (PullbackCone.snd s ≫ g).val))).base
                  x)) ≫
        PresheafedSpace.stalkMap (PullbackCone.snd s).val x)
[PROOFSTEP]
infer_instance
[GOAL]
case refine'_2
C : Type u_1
inst✝ : Category.{?u.437921, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
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 =
          {
            val :=
              PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftLift f.val g.val
                (PullbackCone.mk (PullbackCone.fst s).val (PullbackCone.snd s).val
                  (_ : (PullbackCone.fst s ≫ f).val = (PullbackCone.snd s ≫ g).val)),
            prop :=
              (_ :
                ∀ (x : ↑↑s.pt.toPresheafedSpace),
                  IsLocalRingHom
                    (PresheafedSpace.stalkMap
                      (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftLift f.val g.val
                        (PullbackCone.mk (PullbackCone.fst s).val (PullbackCone.snd s).val
                          (_ : (PullbackCone.fst s ≫ f).val = (PullbackCone.snd s ≫ g).val)))
                      x)) }
[PROOFSTEP]
intro m _ h₂
[GOAL]
case refine'_2
C : Type u_1
inst✝ : Category.{?u.437921, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
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 =
    {
      val :=
        PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftLift f.val g.val
          (PullbackCone.mk (PullbackCone.fst s).val (PullbackCone.snd s).val
            (_ : (PullbackCone.fst s ≫ f).val = (PullbackCone.snd s ≫ g).val)),
      prop :=
        (_ :
          ∀ (x : ↑↑s.pt.toPresheafedSpace),
            IsLocalRingHom
              (PresheafedSpace.stalkMap
                (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftLift f.val g.val
                  (PullbackCone.mk (PullbackCone.fst s).val (PullbackCone.snd s).val
                    (_ : (PullbackCone.fst s ≫ f).val = (PullbackCone.snd s ≫ g).val)))
                x)) }
[PROOFSTEP]
rw [← cancel_mono (pullbackConeOfLeft f g).snd]
[GOAL]
case refine'_2
C : Type u_1
inst✝ : Category.{?u.437921, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
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) =
    {
        val :=
          PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftLift f.val g.val
            (PullbackCone.mk (PullbackCone.fst s).val (PullbackCone.snd s).val
              (_ : (PullbackCone.fst s ≫ f).val = (PullbackCone.snd s ≫ g).val)),
        prop :=
          (_ :
            ∀ (x : ↑↑s.pt.toPresheafedSpace),
              IsLocalRingHom
                (PresheafedSpace.stalkMap
                  (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftLift f.val g.val
                    (PullbackCone.mk (PullbackCone.fst s).val (PullbackCone.snd s).val
                      (_ : (PullbackCone.fst s ≫ f).val = (PullbackCone.snd s ≫ g).val)))
                  x)) } ≫
      PullbackCone.snd (pullbackConeOfLeft f g)
[PROOFSTEP]
exact
  h₂.trans <|
    LocallyRingedSpace.Hom.ext _ _
      (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftLift_snd f.1 g.1 <|
          PullbackCone.mk s.fst.1 s.snd.1 <| congr_arg LocallyRingedSpace.Hom.val s.condition).symm
[GOAL]
C : Type u_1
inst✝ : Category.{?u.444237, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ IsOpenImmersion pullback.snd
[PROOFSTEP]
delta pullback.snd
[GOAL]
C : Type u_1
inst✝ : Category.{?u.444237, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ IsOpenImmersion (limit.π (cospan f g) WalkingCospan.right)
[PROOFSTEP]
rw [← limit.isoLimitCone_hom_π ⟨_, pullbackConeOfLeftIsLimit f g⟩ WalkingCospan.right]
[GOAL]
C : Type u_1
inst✝ : Category.{?u.444237, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ IsOpenImmersion
    ((limit.isoLimitCone { cone := pullbackConeOfLeft f g, isLimit := pullbackConeOfLeftIsLimit f g }).hom ≫
      NatTrans.app { cone := pullbackConeOfLeft f g, isLimit := pullbackConeOfLeftIsLimit f g }.cone.π
        WalkingCospan.right)
[PROOFSTEP]
infer_instance
[GOAL]
C : Type u_1
inst✝ : Category.{?u.445666, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ IsOpenImmersion pullback.fst
[PROOFSTEP]
rw [← pullbackSymmetry_hom_comp_snd]
[GOAL]
C : Type u_1
inst✝ : Category.{?u.445666, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ IsOpenImmersion ((pullbackSymmetry g f).hom ≫ pullback.snd)
[PROOFSTEP]
infer_instance
[GOAL]
C : Type u_1
inst✝¹ : Category.{?u.446789, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
inst✝ : IsOpenImmersion g
⊢ IsOpenImmersion (limit.π (cospan f g) WalkingCospan.one)
[PROOFSTEP]
rw [← limit.w (cospan f g) WalkingCospan.Hom.inl, cospan_map_inl]
[GOAL]
C : Type u_1
inst✝¹ : Category.{?u.446789, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
inst✝ : IsOpenImmersion g
⊢ IsOpenImmersion (limit.π (cospan f g) WalkingCospan.left ≫ f)
[PROOFSTEP]
infer_instance
[GOAL]
C : Type u_1
inst✝ : Category.{?u.447912, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ IsLimit (forgetToSheafedSpace.mapCone (pullbackConeOfLeft f g))
[PROOFSTEP]
apply (isLimitMapConePullbackConeEquiv _ _).symm.toFun
[GOAL]
C : Type u_1
inst✝ : Category.{?u.447912, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ IsLimit
    (PullbackCone.mk
      (forgetToSheafedSpace.map
        { val := PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f.val g.val,
          prop :=
            (_ :
              ∀ (x : ↑↑(restrict Y (_ : OpenEmbedding ↑pullback.snd)).toSheafedSpace.toPresheafedSpace),
                IsLocalRingHom
                  (PresheafedSpace.stalkMap (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f.val g.val) x)) })
      (forgetToSheafedSpace.map (ofRestrict Y (_ : OpenEmbedding ↑pullback.snd)))
      (_ :
        forgetToSheafedSpace.map
              { val := PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f.val g.val,
                prop :=
                  (_ :
                    ∀ (x : ↑↑(restrict Y (_ : OpenEmbedding ↑pullback.snd)).toSheafedSpace.toPresheafedSpace),
                      IsLocalRingHom
                        (PresheafedSpace.stalkMap (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f.val g.val)
                          x)) } ≫
            forgetToSheafedSpace.map f =
          forgetToSheafedSpace.map (ofRestrict Y (_ : OpenEmbedding ↑pullback.snd)) ≫ forgetToSheafedSpace.map g))
[PROOFSTEP]
apply isLimitOfIsLimitPullbackConeMap SheafedSpace.forgetToPresheafedSpace
[GOAL]
case l
C : Type u_1
inst✝ : Category.{?u.447912, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ IsLimit
    (PullbackCone.mk
      (SheafedSpace.forgetToPresheafedSpace.map
        (forgetToSheafedSpace.map
          { val := PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f.val g.val,
            prop :=
              (_ :
                ∀ (x : ↑↑(restrict Y (_ : OpenEmbedding ↑pullback.snd)).toSheafedSpace.toPresheafedSpace),
                  IsLocalRingHom
                    (PresheafedSpace.stalkMap (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f.val g.val)
                      x)) }))
      (SheafedSpace.forgetToPresheafedSpace.map
        (forgetToSheafedSpace.map (ofRestrict Y (_ : OpenEmbedding ↑pullback.snd))))
      (_ :
        SheafedSpace.forgetToPresheafedSpace.map
              (forgetToSheafedSpace.map
                { val := PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f.val g.val,
                  prop :=
                    (_ :
                      ∀ (x : ↑↑(restrict Y (_ : OpenEmbedding ↑pullback.snd)).toSheafedSpace.toPresheafedSpace),
                        IsLocalRingHom
                          (PresheafedSpace.stalkMap (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f.val g.val)
                            x)) }) ≫
            SheafedSpace.forgetToPresheafedSpace.map (forgetToSheafedSpace.map f) =
          SheafedSpace.forgetToPresheafedSpace.map
              (forgetToSheafedSpace.map (ofRestrict Y (_ : OpenEmbedding ↑pullback.snd))) ≫
            SheafedSpace.forgetToPresheafedSpace.map (forgetToSheafedSpace.map g)))
[PROOFSTEP]
exact PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftIsLimit f.1 g.1
[GOAL]
C : Type u_1
inst✝ : Category.{?u.452018, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ IsLimit ((forgetToSheafedSpace ⋙ SheafedSpace.forgetToPresheafedSpace).mapCone (pullbackConeOfLeft f g))
[PROOFSTEP]
apply (isLimitMapConePullbackConeEquiv _ _).symm.toFun
[GOAL]
C : Type u_1
inst✝ : Category.{?u.452018, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ IsLimit
    (PullbackCone.mk
      ((forgetToSheafedSpace ⋙ SheafedSpace.forgetToPresheafedSpace).map
        { val := PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f.val g.val,
          prop :=
            (_ :
              ∀ (x : ↑↑(restrict Y (_ : OpenEmbedding ↑pullback.snd)).toSheafedSpace.toPresheafedSpace),
                IsLocalRingHom
                  (PresheafedSpace.stalkMap (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f.val g.val) x)) })
      ((forgetToSheafedSpace ⋙ SheafedSpace.forgetToPresheafedSpace).map
        (ofRestrict Y (_ : OpenEmbedding ↑pullback.snd)))
      (_ :
        (forgetToSheafedSpace ⋙ SheafedSpace.forgetToPresheafedSpace).map
              { val := PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f.val g.val,
                prop :=
                  (_ :
                    ∀ (x : ↑↑(restrict Y (_ : OpenEmbedding ↑pullback.snd)).toSheafedSpace.toPresheafedSpace),
                      IsLocalRingHom
                        (PresheafedSpace.stalkMap (PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f.val g.val)
                          x)) } ≫
            (forgetToSheafedSpace ⋙ SheafedSpace.forgetToPresheafedSpace).map f =
          (forgetToSheafedSpace ⋙ SheafedSpace.forgetToPresheafedSpace).map
              (ofRestrict Y (_ : OpenEmbedding ↑pullback.snd)) ≫
            (forgetToSheafedSpace ⋙ SheafedSpace.forgetToPresheafedSpace).map g))
[PROOFSTEP]
exact PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftIsLimit f.1 g.1
[GOAL]
C : Type u_1
inst✝ : Category.{?u.456311, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ PreservesLimit (cospan f g) (forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat)
[PROOFSTEP]
change
  PreservesLimit _ <|
    (LocallyRingedSpace.forgetToSheafedSpace ⋙ SheafedSpace.forgetToPresheafedSpace) ⋙
      PresheafedSpace.forget
        _
          -- Porting note : was `apply (config := { instances := False }) ...`
            -- See https://github.com/leanprover/lean4/issues/2273
[GOAL]
C : Type u_1
inst✝ : Category.{?u.456311, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ PreservesLimit (cospan f g)
    ((forgetToSheafedSpace ⋙ SheafedSpace.forgetToPresheafedSpace) ⋙ PresheafedSpace.forget CommRingCat)
[PROOFSTEP]
have :
  PreservesLimit
    (cospan ((cospan f g ⋙ forgetToSheafedSpace ⋙ SheafedSpace.forgetToPresheafedSpace).map WalkingCospan.Hom.inl)
      ((cospan f g ⋙ forgetToSheafedSpace ⋙ SheafedSpace.forgetToPresheafedSpace).map WalkingCospan.Hom.inr))
    (PresheafedSpace.forget CommRingCat)
[GOAL]
case this
C : Type u_1
inst✝ : Category.{?u.456311, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ PreservesLimit
    (cospan ((cospan f g ⋙ forgetToSheafedSpace ⋙ SheafedSpace.forgetToPresheafedSpace).map WalkingCospan.Hom.inl)
      ((cospan f g ⋙ forgetToSheafedSpace ⋙ SheafedSpace.forgetToPresheafedSpace).map WalkingCospan.Hom.inr))
    (PresheafedSpace.forget CommRingCat)
[PROOFSTEP]
dsimp
[GOAL]
case this
C : Type u_1
inst✝ : Category.{?u.456311, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
⊢ PreservesLimit (cospan f.val g.val) (PresheafedSpace.forget CommRingCat)
[PROOFSTEP]
infer_instance
[GOAL]
C : Type u_1
inst✝ : Category.{?u.456311, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
this :
  PreservesLimit
    (cospan ((cospan f g ⋙ forgetToSheafedSpace ⋙ SheafedSpace.forgetToPresheafedSpace).map WalkingCospan.Hom.inl)
      ((cospan f g ⋙ forgetToSheafedSpace ⋙ SheafedSpace.forgetToPresheafedSpace).map WalkingCospan.Hom.inr))
    (PresheafedSpace.forget CommRingCat)
⊢ PreservesLimit (cospan f g)
    ((forgetToSheafedSpace ⋙ SheafedSpace.forgetToPresheafedSpace) ⋙ PresheafedSpace.forget CommRingCat)
[PROOFSTEP]
have :
  PreservesLimit (cospan f g ⋙ forgetToSheafedSpace ⋙ SheafedSpace.forgetToPresheafedSpace)
    (PresheafedSpace.forget CommRingCat)
[GOAL]
case this
C : Type u_1
inst✝ : Category.{?u.456311, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
this :
  PreservesLimit
    (cospan ((cospan f g ⋙ forgetToSheafedSpace ⋙ SheafedSpace.forgetToPresheafedSpace).map WalkingCospan.Hom.inl)
      ((cospan f g ⋙ forgetToSheafedSpace ⋙ SheafedSpace.forgetToPresheafedSpace).map WalkingCospan.Hom.inr))
    (PresheafedSpace.forget CommRingCat)
⊢ PreservesLimit (cospan f g ⋙ forgetToSheafedSpace ⋙ SheafedSpace.forgetToPresheafedSpace)
    (PresheafedSpace.forget CommRingCat)
[PROOFSTEP]
apply preservesLimitOfIsoDiagram _ (diagramIsoCospan _).symm
[GOAL]
C : Type u_1
inst✝ : Category.{?u.456311, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
this✝ :
  PreservesLimit
    (cospan ((cospan f g ⋙ forgetToSheafedSpace ⋙ SheafedSpace.forgetToPresheafedSpace).map WalkingCospan.Hom.inl)
      ((cospan f g ⋙ forgetToSheafedSpace ⋙ SheafedSpace.forgetToPresheafedSpace).map WalkingCospan.Hom.inr))
    (PresheafedSpace.forget CommRingCat)
this :
  PreservesLimit (cospan f g ⋙ forgetToSheafedSpace ⋙ SheafedSpace.forgetToPresheafedSpace)
    (PresheafedSpace.forget CommRingCat)
⊢ PreservesLimit (cospan f g)
    ((forgetToSheafedSpace ⋙ SheafedSpace.forgetToPresheafedSpace) ⋙ PresheafedSpace.forget CommRingCat)
[PROOFSTEP]
apply Limits.compPreservesLimit
[GOAL]
C : Type u_1
inst✝ : Category.{?u.478460, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ↑g.val.base ⊆ Set.range ↑f.val.base
⊢ IsIso pullback.snd
[PROOFSTEP]
have h1 := @ReflectsIsomorphisms.reflects (F := LocallyRingedSpace.forgetToSheafedSpace) _ _ _
[GOAL]
C : Type u_1
inst✝ : Category.{?u.478460, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ↑g.val.base ⊆ Set.range ↑f.val.base
h1 : ∀ {A B : LocallyRingedSpace} (f : A ⟶ B) [inst : IsIso (forgetToSheafedSpace.map f)], IsIso f
⊢ IsIso pullback.snd
[PROOFSTEP]
refine @h1 _ _ _ ?_
[GOAL]
C : Type u_1
inst✝ : Category.{?u.478460, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ↑g.val.base ⊆ Set.range ↑f.val.base
h1 : ∀ {A B : LocallyRingedSpace} (f : A ⟶ B) [inst : IsIso (forgetToSheafedSpace.map f)], IsIso f
⊢ IsIso (forgetToSheafedSpace.map pullback.snd)
[PROOFSTEP]
clear h1
[GOAL]
C : Type u_1
inst✝ : Category.{?u.478460, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ↑g.val.base ⊆ Set.range ↑f.val.base
⊢ IsIso (forgetToSheafedSpace.map pullback.snd)
[PROOFSTEP]
have h2 := @ReflectsIsomorphisms.reflects (F := SheafedSpace.forgetToPresheafedSpace (C := CommRingCat)) _ _ _
[GOAL]
C : Type u_1
inst✝ : Category.{?u.478460, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ↑g.val.base ⊆ Set.range ↑f.val.base
h2 : ∀ {A B : SheafedSpace CommRingCat} (f : A ⟶ B) [inst : IsIso (SheafedSpace.forgetToPresheafedSpace.map f)], IsIso f
⊢ IsIso (forgetToSheafedSpace.map pullback.snd)
[PROOFSTEP]
refine @h2 _ _ _ ?_
[GOAL]
C : Type u_1
inst✝ : Category.{?u.478460, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ↑g.val.base ⊆ Set.range ↑f.val.base
h2 : ∀ {A B : SheafedSpace CommRingCat} (f : A ⟶ B) [inst : IsIso (SheafedSpace.forgetToPresheafedSpace.map f)], IsIso f
⊢ IsIso (SheafedSpace.forgetToPresheafedSpace.map (forgetToSheafedSpace.map pullback.snd))
[PROOFSTEP]
clear h2
[GOAL]
C : Type u_1
inst✝ : Category.{?u.478460, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ↑g.val.base ⊆ Set.range ↑f.val.base
⊢ IsIso (SheafedSpace.forgetToPresheafedSpace.map (forgetToSheafedSpace.map pullback.snd))
[PROOFSTEP]
erw [←
  PreservesPullback.iso_hom_snd (LocallyRingedSpace.forgetToSheafedSpace ⋙ SheafedSpace.forgetToPresheafedSpace) f g]
  -- Porting note : was `inferInstance`
[GOAL]
C : Type u_1
inst✝ : Category.{?u.478460, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ↑g.val.base ⊆ Set.range ↑f.val.base
⊢ IsIso ((PreservesPullback.iso (forgetToSheafedSpace ⋙ SheafedSpace.forgetToPresheafedSpace) f g).hom ≫ pullback.snd)
[PROOFSTEP]
exact @IsIso.comp_isIso _ _ _ _ _ _ _ _ <| PresheafedSpace.IsOpenImmersion.pullback_snd_isIso_of_range_subset _ _ H'
[GOAL]
C : Type u_1
inst✝ : Category.{?u.483974, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ↑g.val.base ⊆ Set.range ↑f.val.base
⊢ lift f g H' ≫ f = g
[PROOFSTEP]
haveI := pullback_snd_isIso_of_range_subset f g H'
[GOAL]
C : Type u_1
inst✝ : Category.{?u.483974, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ↑g.val.base ⊆ Set.range ↑f.val.base
this : IsIso pullback.snd
⊢ lift f g H' ≫ f = g
[PROOFSTEP]
erw [Category.assoc]
[GOAL]
C : Type u_1
inst✝ : Category.{?u.483974, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ↑g.val.base ⊆ Set.range ↑f.val.base
this : IsIso pullback.snd
⊢ inv pullback.snd ≫ pullback.fst ≫ f = g
[PROOFSTEP]
rw [IsIso.inv_comp_eq]
[GOAL]
C : Type u_1
inst✝ : Category.{?u.483974, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ↑g.val.base ⊆ Set.range ↑f.val.base
this : IsIso pullback.snd
⊢ pullback.fst ≫ f = pullback.snd ≫ g
[PROOFSTEP]
exact pullback.condition
[GOAL]
C : Type u_1
inst✝ : Category.{?u.485962, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ↑g.val.base ⊆ Set.range ↑f.val.base
l : Y ⟶ X
hl : l ≫ f = g
⊢ l = lift f g H'
[PROOFSTEP]
rw [← cancel_mono f, hl, lift_fac]
[GOAL]
C : Type u_1
inst✝ : Category.{?u.486426, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ↑g.val.base ⊆ Set.range ↑f.val.base
⊢ Set.range ↑(lift f g H').val.base = ↑f.val.base ⁻¹' Set.range ↑g.val.base
[PROOFSTEP]
have := pullback_snd_isIso_of_range_subset f g H'
[GOAL]
C : Type u_1
inst✝ : Category.{?u.486426, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ↑g.val.base ⊆ Set.range ↑f.val.base
this : IsIso pullback.snd
⊢ Set.range ↑(lift f g H').val.base = ↑f.val.base ⁻¹' Set.range ↑g.val.base
[PROOFSTEP]
dsimp only [lift]
[GOAL]
C : Type u_1
inst✝ : Category.{?u.486426, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ↑g.val.base ⊆ Set.range ↑f.val.base
this : IsIso pullback.snd
⊢ Set.range ↑(inv pullback.snd ≫ pullback.fst).val.base = ↑f.val.base ⁻¹' Set.range ↑g.val.base
[PROOFSTEP]
have : _ = (pullback.fst : pullback f g ⟶ _).val.base :=
  PreservesPullback.iso_hom_fst (LocallyRingedSpace.forgetToSheafedSpace ⋙ SheafedSpace.forget _) f g
[GOAL]
C : Type u_1
inst✝ : Category.{?u.486426, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ↑g.val.base ⊆ Set.range ↑f.val.base
this✝ : IsIso pullback.snd
this :
  (PreservesPullback.iso (forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat) f g).hom ≫ pullback.fst =
    pullback.fst.val.base
⊢ Set.range ↑(inv pullback.snd ≫ pullback.fst).val.base = ↑f.val.base ⁻¹' Set.range ↑g.val.base
[PROOFSTEP]
rw [LocallyRingedSpace.comp_val, SheafedSpace.comp_base, ← this, ← Category.assoc, coe_comp]
[GOAL]
C : Type u_1
inst✝ : Category.{?u.486426, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ↑g.val.base ⊆ Set.range ↑f.val.base
this✝ : IsIso pullback.snd
this :
  (PreservesPullback.iso (forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat) f g).hom ≫ pullback.fst =
    pullback.fst.val.base
⊢ Set.range
      (↑pullback.fst ∘
        ↑((inv pullback.snd).val.base ≫
            (PreservesPullback.iso (forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat) f g).hom)) =
    ↑f.val.base ⁻¹' Set.range ↑g.val.base
[PROOFSTEP]
rw [Set.range_comp, Set.range_iff_surjective.mpr, Set.image_univ]
  -- Porting note : change `rw` to `erw` on this lemma
[GOAL]
C : Type u_1
inst✝ : Category.{?u.486426, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ↑g.val.base ⊆ Set.range ↑f.val.base
this✝ : IsIso pullback.snd
this :
  (PreservesPullback.iso (forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat) f g).hom ≫ pullback.fst =
    pullback.fst.val.base
⊢ Set.range ↑pullback.fst = ↑f.val.base ⁻¹' Set.range ↑g.val.base
C : Type u_1
inst✝ : Category.{?u.486426, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ↑g.val.base ⊆ Set.range ↑f.val.base
this✝ : IsIso pullback.snd
this :
  (PreservesPullback.iso (forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat) f g).hom ≫ pullback.fst =
    pullback.fst.val.base
⊢ Function.Surjective
    ↑((inv pullback.snd).val.base ≫
        (PreservesPullback.iso (forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat) f g).hom)
[PROOFSTEP]
erw [TopCat.pullback_fst_range]
[GOAL]
C : Type u_1
inst✝ : Category.{?u.486426, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ↑g.val.base ⊆ Set.range ↑f.val.base
this✝ : IsIso pullback.snd
this :
  (PreservesPullback.iso (forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat) f g).hom ≫ pullback.fst =
    pullback.fst.val.base
⊢ {x |
      ∃ y,
        ↑((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).map f) x =
          ↑((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).map g) y} =
    ↑f.val.base ⁻¹' Set.range ↑g.val.base
C : Type u_1
inst✝ : Category.{?u.486426, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ↑g.val.base ⊆ Set.range ↑f.val.base
this✝ : IsIso pullback.snd
this :
  (PreservesPullback.iso (forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat) f g).hom ≫ pullback.fst =
    pullback.fst.val.base
⊢ Function.Surjective
    ↑((inv pullback.snd).val.base ≫
        (PreservesPullback.iso (forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat) f g).hom)
[PROOFSTEP]
ext
[GOAL]
case h
C : Type u_1
inst✝ : Category.{?u.486426, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ↑g.val.base ⊆ Set.range ↑f.val.base
this✝ : IsIso pullback.snd
this :
  (PreservesPullback.iso (forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat) f g).hom ≫ pullback.fst =
    pullback.fst.val.base
x✝ : ↑((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).obj X)
⊢ x✝ ∈
      {x |
        ∃ y,
          ↑((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).map f) x =
            ↑((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).map g) y} ↔
    x✝ ∈ ↑f.val.base ⁻¹' Set.range ↑g.val.base
C : Type u_1
inst✝ : Category.{?u.486426, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ↑g.val.base ⊆ Set.range ↑f.val.base
this✝ : IsIso pullback.snd
this :
  (PreservesPullback.iso (forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat) f g).hom ≫ pullback.fst =
    pullback.fst.val.base
⊢ Function.Surjective
    ↑((inv pullback.snd).val.base ≫
        (PreservesPullback.iso (forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat) f g).hom)
[PROOFSTEP]
constructor
[GOAL]
case h.mp
C : Type u_1
inst✝ : Category.{?u.486426, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ↑g.val.base ⊆ Set.range ↑f.val.base
this✝ : IsIso pullback.snd
this :
  (PreservesPullback.iso (forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat) f g).hom ≫ pullback.fst =
    pullback.fst.val.base
x✝ : ↑((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).obj X)
⊢ x✝ ∈
      {x |
        ∃ y,
          ↑((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).map f) x =
            ↑((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).map g) y} →
    x✝ ∈ ↑f.val.base ⁻¹' Set.range ↑g.val.base
[PROOFSTEP]
rintro ⟨y, eq⟩
[GOAL]
case h.mp.intro
C : Type u_1
inst✝ : Category.{?u.486426, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ↑g.val.base ⊆ Set.range ↑f.val.base
this✝ : IsIso pullback.snd
this :
  (PreservesPullback.iso (forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat) f g).hom ≫ pullback.fst =
    pullback.fst.val.base
x✝ : ↑((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).obj X)
y : ↑((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).obj Y)
eq :
  ↑((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).map f) x✝ =
    ↑((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).map g) y
⊢ x✝ ∈ ↑f.val.base ⁻¹' Set.range ↑g.val.base
[PROOFSTEP]
exact ⟨y, eq.symm⟩
[GOAL]
case h.mpr
C : Type u_1
inst✝ : Category.{?u.486426, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ↑g.val.base ⊆ Set.range ↑f.val.base
this✝ : IsIso pullback.snd
this :
  (PreservesPullback.iso (forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat) f g).hom ≫ pullback.fst =
    pullback.fst.val.base
x✝ : ↑((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).obj X)
⊢ x✝ ∈ ↑f.val.base ⁻¹' Set.range ↑g.val.base →
    x✝ ∈
      {x |
        ∃ y,
          ↑((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).map f) x =
            ↑((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).map g) y}
[PROOFSTEP]
rintro ⟨y, eq⟩
[GOAL]
case h.mpr.intro
C : Type u_1
inst✝ : Category.{?u.486426, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ↑g.val.base ⊆ Set.range ↑f.val.base
this✝ : IsIso pullback.snd
this :
  (PreservesPullback.iso (forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat) f g).hom ≫ pullback.fst =
    pullback.fst.val.base
x✝ : ↑((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).obj X)
y : (forget TopCat).obj ↑Y.toPresheafedSpace
eq : ↑g.val.base y = ↑f.val.base x✝
⊢ x✝ ∈
    {x |
      ∃ y,
        ↑((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).map f) x =
          ↑((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).map g) y}
[PROOFSTEP]
exact ⟨y, eq.symm⟩
[GOAL]
C : Type u_1
inst✝ : Category.{?u.486426, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ↑g.val.base ⊆ Set.range ↑f.val.base
this✝ : IsIso pullback.snd
this :
  (PreservesPullback.iso (forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat) f g).hom ≫ pullback.fst =
    pullback.fst.val.base
⊢ Function.Surjective
    ↑((inv pullback.snd).val.base ≫
        (PreservesPullback.iso (forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat) f g).hom)
[PROOFSTEP]
rw [← TopCat.epi_iff_surjective]
[GOAL]
C : Type u_1
inst✝ : Category.{?u.486426, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ↑g.val.base ⊆ Set.range ↑f.val.base
this✝ : IsIso pullback.snd
this :
  (PreservesPullback.iso (forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat) f g).hom ≫ pullback.fst =
    pullback.fst.val.base
⊢ Epi
    ((inv pullback.snd).val.base ≫
      (PreservesPullback.iso (forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat) f g).hom)
[PROOFSTEP]
rw [show (inv (pullback.snd : pullback f g ⟶ _)).val.base = _ from
    (LocallyRingedSpace.forgetToSheafedSpace ⋙ SheafedSpace.forget _).map_inv _]
[GOAL]
C : Type u_1
inst✝ : Category.{?u.486426, u_1} C
X Y Z : LocallyRingedSpace
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion f
H' : Set.range ↑g.val.base ⊆ Set.range ↑f.val.base
this✝ : IsIso pullback.snd
this :
  (PreservesPullback.iso (forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat) f g).hom ≫ pullback.fst =
    pullback.fst.val.base
⊢ Epi
    (inv ((forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat).map pullback.snd) ≫
      (PreservesPullback.iso (forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat) f g).hom)
[PROOFSTEP]
infer_instance
[GOAL]
C : Type u_1
inst✝ : Category.{?u.495051, u_1} C
X Y : LocallyRingedSpace
f : X ⟶ Y
H : IsOpenImmersion f
⊢ X ≅ restrict Y (_ : OpenEmbedding ↑f.val.base)
[PROOFSTEP]
apply LocallyRingedSpace.isoOfSheafedSpaceIso
[GOAL]
case f
C : Type u_1
inst✝ : Category.{?u.495051, u_1} C
X Y : LocallyRingedSpace
f : X ⟶ Y
H : IsOpenImmersion f
⊢ X.toSheafedSpace ≅ (restrict Y (_ : OpenEmbedding ↑f.val.base)).toSheafedSpace
[PROOFSTEP]
refine' SheafedSpace.forgetToPresheafedSpace.preimageIso _
[GOAL]
case f
C : Type u_1
inst✝ : Category.{?u.495051, u_1} C
X Y : LocallyRingedSpace
f : X ⟶ Y
H : IsOpenImmersion f
⊢ SheafedSpace.forgetToPresheafedSpace.obj X.toSheafedSpace ≅
    SheafedSpace.forgetToPresheafedSpace.obj (restrict Y (_ : OpenEmbedding ↑f.val.base)).toSheafedSpace
[PROOFSTEP]
exact PresheafedSpace.IsOpenImmersion.isoRestrict H