-- Lean 4 proof step from Mathlib.CategoryTheory.Sites.LocallySurjective (goal)
Goal:
C : Type u
inst : Category.{v, u} C
J : GrothendieckTopology.{v, u} C
A : Type u'
inst_1 : Category.{v', u'} A
FA : A → A → Type u_1
CA : A → Type w'
inst_2 : (X Y : A) → FunLike.{u_1 + 1, w' + 1, w' + 1} (FA X Y) (CA X) (CA Y)
inst_3 : ConcreteCategory.{w', v', u', u_1} A FA (CC := CA)
F₁ F₂ F₃ : Functor.{v, v', u, u'} Cᵒᵖ A
f₁ : F₁ ⟶ F₂
f₂ : F₂ ⟶ F₃
inst_4 : IsLocallySurjective J (FA := FA) (CA := CA) (f₁ ≫ f₂)
inst_5 : IsLocallyInjective (FD := FA) (CD := CA) J f₂
X : C
x : ToType.{w', v', u', u_1} (FC := FA) (CC := CA) (F₂.obj (op X))
S : Sieve.{v, u} X :=
  imageSieve (FA := FA) (CA := CA) (f₁ ≫ f₂)
    ((ConcreteCategory.hom (FC := FA) (CC := CA) (f₂.app (op X)) : (a : CA (F₂.obj (op X))) → CA (F₃.obj (op X))) x)
T : ⦃Y : C⦄ → (f : Y ⟶ X) → S.arrows f → Sieve.{v, u} Y :=
  fun (Y : C) (f : Y ⟶ X) (hf : S.arrows f) ↦
    equalizerSieve.{w', v', v, u', u, u_1} (FD := FA) (CD := CA) (F := F₂)
      ((ConcreteCategory.hom (FC := FA) (CC := CA) (f₁.app (op Y)) : (a : CA (F₁.obj (op Y))) → CA (F₂.obj (op Y)))
        (localPreimage (FA := FA) (CA := CA) (f₁ ≫ f₂)
          ((ConcreteCategory.hom (FC := FA) (CC := CA) (f₂.app (op X)) : (a : CA (F₂.obj (op X))) → CA (F₃.obj (op X)))
            x)
          f hf))
      ((ConcreteCategory.hom (FC := FA) (CC := CA) (F₂.map f.op) : (a : CA (F₂.obj (op X))) → CA (F₂.obj (op Y))) x)
Y : C
f : Y ⟶ unop (op X)
hf :
  Sieve.arrows
    (imageSieve (FA := FA) (CA := CA) (f₁ ≫ f₂)
      ((ConcreteCategory.hom (FC := FA) (CC := CA) (f₂.app (op X)) : (a : CA (F₂.obj (op X))) → CA (F₃.obj (op X))) x))
    f
refine_2 :
  Eq (α := CA (F₃.obj (op Y)))
    ((ConcreteCategory.hom (FC := FA) (CC := CA) (f₂.app (op Y)) : (a : CA (F₂.obj (op Y))) → CA (F₃.obj (op Y)))
        ((ConcreteCategory.hom (FC := FA) (CC := CA) (f₁.app (op Y)) : (a : CA (F₁.obj (op Y))) → CA (F₂.obj (op Y)))
            (localPreimage (FA := FA) (CA := CA) (f₁ ≫ f₂)
              ((ConcreteCategory.hom (FC := FA) (CC := CA) (f₂.app (op X)) :
                  (a : CA (F₂.obj (op X))) → CA (F₃.obj (op X)))
                x)
              f hf) :
          CA (F₂.obj (op Y))) :
      CA (F₃.obj (op Y)))
    ((ConcreteCategory.hom (FC := FA) (CC := CA) (F₃.map f.op) : (a : CA (F₃.obj (op X))) → CA (F₃.obj (op Y)))
        ((ConcreteCategory.hom (FC := FA) (CC := CA) (f₂.app (op X)) : (a : CA (F₂.obj (op X))) → CA (F₃.obj (op X)))
            x :
          CA (F₃.obj (op X))) :
      CA (F₃.obj (op Y)))
refine_2₁ :
  Eq (α := CA (F₃.obj (op Y)))
    ((ConcreteCategory.hom (FC := FA) (CC := CA) (f₂.app (op Y)) : (a : CA (F₂.obj (op Y))) → CA (F₃.obj (op Y)))
        ((ConcreteCategory.hom (FC := FA) (CC := CA) (f₁.app (op Y)) : (a : CA (F₁.obj (op Y))) → CA (F₂.obj (op Y)))
            (localPreimage (FA := FA) (CA := CA) (f₁ ≫ f₂)
              ((ConcreteCategory.hom (FC := FA) (CC := CA) (f₂.app (op X)) :
                  (a : CA (F₂.obj (op X))) → CA (F₃.obj (op X)))
                x)
              f hf) :
          CA (F₂.obj (op Y))) :
      CA (F₃.obj (op Y)))
    ((ConcreteCategory.hom (FC := FA) (CC := CA) ((f₁ ≫ f₂).app (op Y)) : (a : CA (F₁.obj (op Y))) → CA (F₃.obj (op Y)))
        (localPreimage (FA := FA) (CA := CA) (f₁ ≫ f₂)
          ((ConcreteCategory.hom (FC := FA) (CC := CA) (f₂.app (op X)) : (a : CA (F₂.obj (op X))) → CA (F₃.obj (op X)))
            x)
          f hf) :
      CA (F₃.obj (op Y)))
refine_2₂ :
  Eq (α := CA (F₃.obj (op Y)))
    ((ConcreteCategory.hom (FC := FA) (CC := CA) (f₂.app (op Y)) : (a : CA (F₂.obj (op Y))) → CA (F₃.obj (op Y)))
        ((ConcreteCategory.hom (FC := FA) (CC := CA) (f₁.app (op Y)) : (a : CA (F₁.obj (op Y))) → CA (F₂.obj (op Y)))
            (localPreimage (FA := FA) (CA := CA) (f₁ ≫ f₂)
              ((ConcreteCategory.hom (FC := FA) (CC := CA) (f₂.app (op X)) :
                  (a : CA (F₂.obj (op X))) → CA (F₃.obj (op X)))
                x)
              f hf) :
          CA (F₂.obj (op Y))) :
      CA (F₃.obj (op Y)))
    ((ConcreteCategory.hom (FC := FA) (CC := CA) (f₁.app (op Y) ≫ f₂.app (op Y)) :
          (a : CA (F₁.obj (op Y))) → CA (F₃.obj (op Y)))
        (localPreimage (FA := FA) (CA := CA) (f₁ ≫ f₂)
          ((ConcreteCategory.hom (FC := FA) (CC := CA) (f₂.app (op X)) : (a : CA (F₂.obj (op X))) → CA (F₃.obj (op X)))
            x)
          f hf) :
      CA (F₃.obj (op Y)))
⊢ Eq (α := CA (F₃.obj (op Y)))
    ((ConcreteCategory.hom (FC := FA) (CC := CA) (f₂.app (op Y)) : (a : CA (F₂.obj (op Y))) → CA (F₃.obj (op Y)))
        ((ConcreteCategory.hom (FC := FA) (CC := CA) (f₁.app (op Y)) : (a : CA (F₁.obj (op Y))) → CA (F₂.obj (op Y)))
            (localPreimage (FA := FA) (CA := CA) (f₁ ≫ f₂)
              ((ConcreteCategory.hom (FC := FA) (CC := CA) (f₂.app (op X)) :
                  (a : CA (F₂.obj (op X))) → CA (F₃.obj (op X)))
                x)
              f hf) :
          CA (F₂.obj (op Y))) :
      CA (F₃.obj (op Y)))
    ((ConcreteCategory.hom (FC := FA) (CC := CA) (f₂.app (op Y)) : (a : CA (F₂.obj (op Y))) → CA (F₃.obj (op Y)))
        ((ConcreteCategory.hom (FC := FA) (CC := CA) (F₂.map f.op) : (a : CA (F₂.obj (op X))) → CA (F₂.obj (op Y))) x :
          CA (F₂.obj (op Y))) :
      CA (F₃.obj (op Y)))
have refine_2₃ : Eq (α := CA (F₃.obj (op Y)))
  ((ConcreteCategory.hom (FC := FA) (CC := CA) (f₂.app (op Y)) : (a : CA (F₂.obj (op Y))) → CA (F₃.obj (op Y)))
      ((ConcreteCategory.hom (FC := FA) (CC := CA) (f₁.app (op Y)) : (a : CA (F₁.obj (op Y))) → CA (F₂.obj (op Y)))
          (localPreimage (FA := FA) (CA := CA) (f₁ ≫ f₂)
            ((ConcreteCategory.hom (FC := FA) (CC := CA) (f₂.app (op X)) :
                (a : CA (F₂.obj (op X))) → CA (F₃.obj (op X)))
              x)
            f hf) :
        CA (F₂.obj (op Y))) :
    CA (F₃.obj (op Y)))
  ((ConcreteCategory.hom (FC := FA) (CC := CA) (f₂.app (op Y)) : (a : CA (F₂.obj (op Y))) → CA (F₃.obj (op Y)))
      ((ConcreteCategory.hom (FC := FA) (CC := CA) (f₁.app (op Y)) : (a : CA (F₁.obj (op Y))) → CA (F₂.obj (op Y)))
          (localPreimage (FA := FA) (CA := CA) (f₁ ≫ f₂)
            ((ConcreteCategory.hom (FC := FA) (CC := CA) (f₂.app (op X)) :
                (a : CA (F₂.obj (op X))) → CA (F₃.obj (op X)))
              x)
            f hf) :
        CA (F₂.obj (op Y))) :
    CA (F₃.obj (op Y)))
Tactic: rw [NatTrans.naturality_apply, ← app_localPreimage (f₁ ≫ f₂) _ _ hf,
        NatTrans.comp_app, ConcreteCategory.comp_apply]