theorem morphismRestrict_c_app {X Y : Scheme} (f : X ⟶ Y) (U : Opens Y) (V : Opens U) :
    (f ∣_ U).1.c.app (op V) =
      f.1.c.app (op (U.openEmbedding.isOpenMap.functor.obj V)) ≫
        X.presheaf.map (eqToHom (image_morphismRestrict_preimage f U V)).op := by
  have :=
    Scheme.congr_app (morphismRestrict_ι f U) (op (U.openEmbedding.isOpenMap.functor.obj V))
  rw [Scheme.comp_val_c_app, Scheme.comp_val_c_app_assoc] at this
  have e : (Opens.map U.inclusion).obj (U.openEmbedding.isOpenMap.functor.obj V) = V := by
    ext1; exact Set.preimage_image_eq _ Subtype.coe_injective
  have : _ ≫ X.presheaf.map _ = _ :=
    (((f ∣_ U).1.c.naturality (eqToHom e).op).symm.trans ?_).trans this
  · rw [← IsIso.eq_comp_inv, ← Functor.map_inv, Category.assoc] at this
    rw [this]
    congr 1
    erw [← X.presheaf.map_comp, ← X.presheaf.map_comp]
    

Proof state:
case refine_2.e_a
C : Type u
inst✝ : Category.{v, u} C
X Y : Scheme
f : X ⟶ Y
U : Opens ↑↑Y.toPresheafedSpace
V : Opens ↥U
this✝ :
  (Scheme.ιOpens U).val.c.app (op ((IsOpenMap.functor (_ : IsOpenMap ⇑(Opens.inclusion U))).obj V)) ≫
      (f ∣_ U).val.c.app
        ((Opens.map (Scheme.ιOpens U).val.base).op.obj
          (op ((IsOpenMap.functor (_ : IsOpenMap ⇑(Opens.inclusion U))).obj V))) =
    f.val.c.app (op ((IsOpenMap.functor (_ : IsOpenMap ⇑(Opens.inclusion U))).obj V)) ≫
      (Scheme.ιOpens (f⁻¹ᵁ U)).val.c.app
          ((Opens.map f.val.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ⇑(Opens.inclusion U))).obj V))) ≫
        (X ∣_ᵤ f⁻¹ᵁ U).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.map
          (eqToHom
            (_ :
              (Opens.map (Scheme.ιOpens (f⁻¹ᵁ U) ≫ f).val.base).op.obj
                  (op ((IsOpenMap.functor (_ : IsOpenMap ⇑(Opens.inclusion U))).obj V)) =
                (Opens.map (f ∣_ U ≫ Scheme.ιOpens U).val.base).op.obj
                  (op ((IsOpenMap.functor (_ : IsOpenMap ⇑(Opens.inclusion U))).obj V))))
e : (Opens.map (Opens.inclusion U)).obj ((IsOpenMap.functor (_ : IsOpenMap ⇑(Opens.inclusion U))).obj V) = V
this :
  (f ∣_ U).val.c.app (op V) =
    f.val.c.app (op ((IsOpenMap.functor (_ : IsOpenMap ⇑(Opens.inclusion U))).obj V)) ≫
      ((Scheme.ιOpens (f⁻¹ᵁ U)).val.c.app
            ((Opens.map f.val.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ⇑(Opens.inclusion U))).obj V))) ≫
          (X ∣_ᵤ f⁻¹ᵁ U).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.map
            (eqToHom
              (_ :
                (Opens.map (Scheme.ιOpens (f⁻¹ᵁ U) ≫ f).val.base).op.obj
                    (op ((IsOpenMap.functor (_ : IsOpenMap ⇑(Opens.inclusion U))).obj V)) =
                  (Opens.map (f ∣_ U ≫ Scheme.ιOpens U).val.base).op.obj
                    (op ((IsOpenMap.functor (_ : IsOpenMap ⇑(Opens.inclusion U))).obj V))))) ≫
        X.presheaf.map
          (inv
            ((IsOpenMap.functor (_ : IsOpenMap ⇑(Opens.inclusion (f⁻¹ᵁ U)))).op.map
              ((Opens.map (f ∣_ U).val.base).op.map (eqToHom e).op)))
⊢ X.presheaf.map
      ((((IsOpenMap.adjunction (_ : IsOpenMap ⇑(Opens.inclusion (f⁻¹ᵁ U)))).counit.app
              ((Opens.map f.val.base).op.obj
                  (op ((IsOpenMap.functor (_ : IsOpenMap ⇑(Opens.inclusion U))).obj V))).unop).op ≫
          (IsOpenMap.functor (_ : IsOpenMap ⇑(Opens.inclusion (f⁻¹ᵁ U)))).op.map
            (eqToHom
              (_ :
                (Opens.map (Scheme.ιOpens (f⁻¹ᵁ U) ≫ f).val.base).op.obj
                    (op ((IsOpenMap.functor (_ : IsOpenMap ⇑(Opens.inclusion U))).obj V)) =
                  (Opens.map (f ∣_ U ≫ Scheme.ιOpens U).val.base).op.obj
                    (op ((IsOpenMap.functor (_ : IsOpenMap ⇑(Opens.inclusion U))).obj V))))) ≫
        inv
          ((IsOpenMap.functor (_ : IsOpenMap ⇑(Opens.inclusion (f⁻¹ᵁ U)))).op.map
            ((Opens.map (f ∣_ U).val.base).op.map (eqToHom e).op))) =
    X.presheaf.map
      (eqToHom
          (_ :
            (IsOpenMap.functor (_ : IsOpenMap ⇑(Opens.inclusion (f⁻¹ᵁ U)))).obj ((f ∣_ U)⁻¹ᵁ V) =
              f⁻¹ᵁ (IsOpenMap.functor (_ : IsOpenMap ⇑(Opens.inclusion U))).obj V)).op

Next tactic:
congr 1