-- Lean 4 proof step from Mathlib.Analysis.Calculus.IteratedDeriv.FaaDiBruno (hypothesis)
Goal:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst : NontriviallyNormedField 𝕜
inst_1 : NormedAddCommGroup E
inst_2 : NormedSpace 𝕜 E
inst_3 : NormedAddCommGroup F
inst_4 : NormedSpace 𝕜 F
g : E → F
f : 𝕜 → E
s : Set 𝕜
t : Set E
x : 𝕜
hg : ContDiffWithinAt 𝕜 2 g t (f x)
hf : ContDiffWithinAt 𝕜 2 f s x
ht : UniqueDiffOn 𝕜 t
hs : UniqueDiffOn 𝕜 s
hx : x ∈ s
hst : MapsTo f s t
⊢ HAdd.hAdd (α := F) (β := F)
      ((iteratedFDerivWithin 𝕜
              (OrderedFinpartition.length (n := 2)
                ((OrderedFinpartition.extendEquiv 1 :
                    (a : (c : OrderedFinpartition 1) × Option (Fin c.length)) → OrderedFinpartition (1 + 1))
                  (Sigma.mk (β := fun (c : OrderedFinpartition 1) ↦ Option (Fin c.length))
                    (OrderedFinpartition.atomic 1) none)))
              g t (f x) :
            (a :
                (i :
                    Fin
                      ((OrderedFinpartition.extendEquiv 1 :
                            (a : (c : OrderedFinpartition 1) × Option (Fin c.length)) → OrderedFinpartition (1 + 1))
                          ⟨OrderedFinpartition.atomic 1, none⟩).length) →
                  E) →
              F)
          fun
            (j :
              Fin
                (OrderedFinpartition.length (n := 2)
                  ((OrderedFinpartition.extendEquiv 1 :
                      (a : (c : OrderedFinpartition 1) × Option (Fin c.length)) → OrderedFinpartition (1 + 1))
                    (Sigma.mk (β := fun (c : OrderedFinpartition 1) ↦ Option (Fin c.length))
                      (OrderedFinpartition.atomic 1) none)))) ↦
          iteratedDerivWithin
            (OrderedFinpartition.partSize
              ((OrderedFinpartition.extendEquiv 1 :
                  (a : (c : OrderedFinpartition 1) × Option (Fin c.length)) → OrderedFinpartition (1 + 1))
                (Sigma.mk (β := fun (c : OrderedFinpartition 1) ↦ Option (Fin c.length)) (OrderedFinpartition.atomic 1)
                  none))
              j)
            f s x :
        F)
      ((iteratedFDerivWithin 𝕜
              (OrderedFinpartition.length (n := 2)
                ((OrderedFinpartition.extendEquiv 1 :
                    (a : (c : OrderedFinpartition 1) × Option (Fin c.length)) → OrderedFinpartition (1 + 1))
                  (Sigma.mk (β := fun (c : OrderedFinpartition 1) ↦ Option (Fin c.length))
                    (OrderedFinpartition.atomic 1) (some default))))
              g t (f x) :
            (a :
                (i :
                    Fin
                      ((OrderedFinpartition.extendEquiv 1 :
                            (a : (c : OrderedFinpartition 1) × Option (Fin c.length)) → OrderedFinpartition (1 + 1))
                          ⟨OrderedFinpartition.atomic 1, some default⟩).length) →
                  E) →
              F)
          fun
            (j :
              Fin
                (OrderedFinpartition.length (n := 2)
                  ((OrderedFinpartition.extendEquiv 1 :
                      (a : (c : OrderedFinpartition 1) × Option (Fin c.length)) → OrderedFinpartition (1 + 1))
                    (Sigma.mk (β := fun (c : OrderedFinpartition 1) ↦ Option (Fin c.length))
                      (OrderedFinpartition.atomic 1) (some default))))) ↦
          iteratedDerivWithin
            (OrderedFinpartition.partSize
              ((OrderedFinpartition.extendEquiv 1 :
                  (a : (c : OrderedFinpartition 1) × Option (Fin c.length)) → OrderedFinpartition (1 + 1))
                (Sigma.mk (β := fun (c : OrderedFinpartition 1) ↦ Option (Fin c.length)) (OrderedFinpartition.atomic 1)
                  (some default)))
              j)
            f s x :
        F) =
    HAdd.hAdd (α := F) (β := F)
      ((iteratedFDerivWithin 𝕜 2 g t (f x) : (a : (i : Fin 2) → E) → F) fun (x_1 : Fin 2) ↦ derivWithin f s x : F)
      ((fderivWithin 𝕜 g t (f x) : (a : E) → F) (iteratedDerivWithin 2 f s x) : F)
have this : Eq (α := (i : Fin (HAdd.hAdd (α := ℕ) 1 1)) → ℕ) (Fin.cons (α := fun (a : Fin 2) ↦ ℕ) 1 fun (x : Fin 1) ↦ 1)
  fun (x : Fin (HAdd.hAdd (α := ℕ) 1 1)) ↦ 1
Tactic: have : (Fin.cons 1 (fun _ ↦ 1) : Fin 2 → ℕ) = fun _ ↦ 1 :=
    funext <| Fin.forall_fin_two.mpr ⟨rfl, rfl⟩