-- Lean 4 proof step from Mathlib.GroupTheory.FreeGroup.NielsenSchreier (goal)
Goal:
G : Type u
inst : Groupoid G
inst_1 : IsFreeGroupoid G
T : WideSubquiver (Symmetrify (Generators G))
inst_2 : Arborescence (WideSubquiver.toType (Symmetrify (Generators G)) T)
X : Type u
inst_3 : Group X
f :
  (↑((wideSubquiverEquivSetTotal : (a : WideSubquiver (Generators G)) → Set (Quiver.Total (Generators G)))
            (wideSubquiverSymmetrify T))ᶜ :
      Type u) →
    X
f' : Labelling (Generators G) X :=
  fun (a b : Generators G) (e : a ⟶ b) ↦
    if h : e ∈ wideSubquiverSymmetrify T a b then 1
    else
      f
        (Subtype.mk (p := fun (x : Quiver.Total (Generators G)) ↦
          Membership.mem (γ := Set (Quiver.Total (Generators G)))
            (((wideSubquiverEquivSetTotal : (a : WideSubquiver (Generators G)) → Set (Quiver.Total (Generators G)))
                  (wideSubquiverSymmetrify T))ᶜ :
              Set (Quiver.Total (Generators G)))
            x)
          { left := a, right := b, hom := e } h)
F' : G ⥤ CategoryTheory.SingleObj X
hF' : ∀ (a b : Generators G) (g : a ⟶ b), F'.map (of g) = f' g
uF' :
  ∀ (y : G ⥤ CategoryTheory.SingleObj X),
    (fun (F : G ⥤ CategoryTheory.SingleObj X) ↦ ∀ (a b : Generators G) (g : a ⟶ b), F.map (of g) = f' g) y → y = F'
this : ∀ {x y : G} (q : x ⟶ y), F'.map (loopOfHom T q) = F'.map q
a b : Generators G
e : a ⟶ b
h :
  Membership.mem (γ := Set (Quiver.Total (Generators G)))
    (((wideSubquiverEquivSetTotal : (a : WideSubquiver (Generators G)) → Set (Quiver.Total (Generators G)))
          (wideSubquiverSymmetrify T))ᶜ :
      Set (Quiver.Total (Generators G)))
    { left := a, right := b, hom := e : Quiver.Total (Generators G) }
⊢ (Functor.mapEnd (root' T) F' : (a : End (root' T)) → X)
      ((fun
            (e :
              (↑((wideSubquiverEquivSetTotal : (a : WideSubquiver (Generators G)) → Set (Quiver.Total (Generators G)))
                      (wideSubquiverSymmetrify T))ᶜ :
                Type u)) ↦
          (loopOfHom T (of (↑e : Quiver.Total (Generators G)).hom) : End (root' T)))
        (Subtype.mk (p := fun (x : Quiver.Total (Generators G)) ↦
          Membership.mem (γ := Set (Quiver.Total (Generators G)))
            (((wideSubquiverEquivSetTotal : (a : WideSubquiver (Generators G)) → Set (Quiver.Total (Generators G)))
                  (wideSubquiverSymmetrify T))ᶜ :
              Set (Quiver.Total (Generators G)))
            x)
          { left := a, right := b, hom := e } h)) =
    f
      (Subtype.mk (p := fun (x : Quiver.Total (Generators G)) ↦
        Membership.mem (γ := Set (Quiver.Total (Generators G)))
          (((wideSubquiverEquivSetTotal : (a : WideSubquiver (Generators G)) → Set (Quiver.Total (Generators G)))
                (wideSubquiverSymmetrify T))ᶜ :
            Set (Quiver.Total (Generators G)))
          x)
        { left := a, right := b, hom := e : Quiver.Total (Generators G) } h)
have simp : f' e =
  f
    (Subtype.mk (p := fun (x : Quiver.Total (Generators G)) ↦
      x ∈
        (EquivLike.coe (E := WideSubquiver (Generators G) ≃ Set (Quiver.Total (Generators G)))
            wideSubquiverEquivSetTotal (wideSubquiverSymmetrify T))ᶜ)
      { left := a, right := b, hom := e } h)
Tactic: simp only [Functor.mapEnd, DFunLike.coe, this, hF']