awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Module: Mathlib.GroupTheory.FreeGroup.NielsenSchreier
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_1
inst_3 : Monoid X
f : MonoidHom.{u, u_1} (End (root' T)) X
a : G
rw : Eq.{u_1 + 1} (α := () ⟶ ()) ((f : (a : End (root' T)) → X) (treeHom T a ≫ inv (treeHom T a)) : X) (𝟙 () : () ⟶ ())
rw₁ : Eq.{u_1 + 1} (α := () ⟶ ()) ((f : (a : End (root' T)) → X) (𝟙 (root' T)) : X) (𝟙 () : () ⟶ ())
rw₂ : Eq (α := () ⟶ ()) ((f : (a : End (root' T)) → X) 1 : X) (𝟙 () : () ⟶ ())
rw₃ : Eq.{u_1 + 1} (α := () ⟶ ()) (1 : X) (𝟙 () : () ⟶ ())
rw₄ rw₅ : Eq.{u_1 + 1} (α := () ⟶ ()) 1 1
⊢ Eq.{u_1 + 1} (α := () ⟶ ()) ((f : (a : End (root' T)) → X) (treeHom T a ≫ 𝟙 a ≫ inv (treeHom T a)) : X)
    (𝟙 () : () ⟶ ())

Tactic:
rw [Category.id_comp, IsIso.hom_inv_id, ← End.one_def, f.map_one, id_as_one]

Premises used: CategoryTheory.SingleObj.id_as_one, MonoidHom.map_one, CategoryTheory.End.one_def, CategoryTheory.IsIso.hom_inv_id, CategoryTheory.Category.id_comp
-- Module: Mathlib.GroupTheory.FreeGroup.NielsenSchreier
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_1
inst_3 : Monoid X
f : MonoidHom.{u, u_1} (End (root' T)) X
X_1 Y Z : G
f_1 : X_1 ⟶ Y
g : Y ⟶ Z
rw :
  Eq.{u_1 + 1} (α := () ⟶ ()) ((f : (a : End (root' T)) → X) (loopOfHom T (f_1 ≫ g)) : X)
    ((f : (a : End (root' T)) → X) (HMul.hMul (α := End (root' T)) (loopOfHom T g) (loopOfHom T f_1)) : X)
⊢ Eq.{u_1 + 1} (α := () ⟶ ()) ((f : (a : End (root' T)) → X) (loopOfHom T (f_1 ≫ g)) : X)
    (CategoryStruct.comp (Y := ()) ((f : (a : End (root' T)) → X) (loopOfHom T f_1))
        ((f : (a : End (root' T)) → X) (loopOfHom T g)) :
      () ⟶ ())

Tactic:
rw [comp_as_mul, ← f.map_mul]

Premises used: CategoryTheory.SingleObj.comp_as_mul, MonoidHom.map_mul
-- Module: Mathlib.GroupTheory.FreeGroup.NielsenSchreier
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_1
inst_3 : Monoid X
f : MonoidHom.{u, u_1} (End (root' T)) X
X_1 Y Z : G
f_1 : X_1 ⟶ Y
g : Y ⟶ Z
⊢ Eq.{u_1 + 1} (α := () ⟶ ()) ((f : (a : End (root' T)) → X) (loopOfHom T (f_1 ≫ g)) : X)
    ((f : (a : End (root' T)) → X) (HMul.hMul (α := End (root' T)) (loopOfHom T g) (loopOfHom T f_1)) : X)

Tactic:
simp only [IsIso.inv_hom_id_assoc, loopOfHom, End.mul_def, Category.assoc]

Premises used: IsFreeGroupoid.SpanningTree.loopOfHom, CategoryTheory.Category.assoc, CategoryTheory.End.mul_def, CategoryTheory.IsIso.inv_hom_id_assoc
-- Module: Mathlib.GroupTheory.FreeGroup.NielsenSchreier
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 : End (root' T) →* X,
      ∀
        (a :
          (↑((wideSubquiverEquivSetTotal : (a : WideSubquiver (Generators G)) → Set (Quiver.Total (Generators G)))
                  (wideSubquiverSymmetrify T))ᶜ :
            Type u)),
        (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)))
              a) =
          f a
⊢ ∀ [inst_3 : Group X]
    (f :
      (↑((wideSubquiverEquivSetTotal : (a : WideSubquiver (Generators G)) → Set (Quiver.Total (Generators G)))
                (wideSubquiverSymmetrify T))ᶜ :
          Type u) →
        X),
    ∃! F : End (root' T) →* X,
      ∀
        (a :
          (↑((wideSubquiverEquivSetTotal : (a : WideSubquiver (Generators G)) → Set (Quiver.Total (Generators G)))
                  (wideSubquiverSymmetrify T))ᶜ :
            Type u)),
        (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)))
              a) =
          f a

Tactic:
_
-- Module: Mathlib.GroupTheory.FreeGroup.NielsenSchreier
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)
rcases :
  ∀ (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'),
    ∃! F : End (root' T) →* X,
      ∀
        (a :
          (↑((wideSubquiverEquivSetTotal : (a : WideSubquiver (Generators G)) → Set (Quiver.Total (Generators G)))
                  (wideSubquiverSymmetrify T))ᶜ :
            Type u)),
        (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)))
              a) =
          f a
⊢ ∃! F : End (root' T) →* X,
    ∀
      (a :
        (↑((wideSubquiverEquivSetTotal : (a : WideSubquiver (Generators G)) → Set (Quiver.Total (Generators G)))
                (wideSubquiverSymmetrify T))ᶜ :
          Type u)),
      (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)))
            a) =
        f a

Tactic:
rcases unique_lift f' with ⟨F', hF', uF'⟩

Premises used: IsFreeGroupoid.unique_lift
-- Module: Mathlib.GroupTheory.FreeGroup.NielsenSchreier
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'
⊢ ∃! F : End (root' T) →* X,
    ∀
      (a :
        (↑((wideSubquiverEquivSetTotal : (a : WideSubquiver (Generators G)) → Set (Quiver.Total (Generators G)))
                (wideSubquiverSymmetrify T))ᶜ :
          Type u)),
      (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)))
            a) =
        f a

Tactic:
⟨F'.mapEnd _, ?_, ?_⟩

Premises used: CategoryTheory.Functor.mapEnd, ExistsUnique, And.intro, Exists.intro
-- Module: Mathlib.GroupTheory.FreeGroup.NielsenSchreier
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) }
⊢ 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:
dif_neg h

Premises used: Set.Mem, setOf, Quiver.wideSubquiverSymmetrify, dif_neg
-- Module: Mathlib.GroupTheory.FreeGroup.NielsenSchreier
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) }
⊢ 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:
exact dif_neg h

Premises used: dif_neg
-- Module: Mathlib.GroupTheory.FreeGroup.NielsenSchreier
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'
refine_1 : ∀ {x y : G} (q : x ⟶ y), F'.map (loopOfHom T q) = F'.map q
⊢ (fun (F : End (root' T) →* X) ↦
      ∀
        (a :
          (↑((wideSubquiverEquivSetTotal : (a : WideSubquiver (Generators G)) → Set (Quiver.Total (Generators G)))
                  (wideSubquiverSymmetrify T))ᶜ :
            Type u)),
        (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)))
              a) =
          f a)
    (Functor.mapEnd (root' T) F')

Tactic:
suffices ∀ {x y} (q : x ⟶ y), F'.map (loopOfHom T q) = (F'.map q : X) by
          rintro ⟨⟨a, b, e⟩, h⟩
          simp only [Functor.mapEnd, DFunLike.coe, this, hF']
          exact dif_neg h
-- Module: Mathlib.GroupTheory.FreeGroup.NielsenSchreier
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'
x y : G
q : x ⟶ y
this :
  ∀ {a : WideSubquiver.toType (Symmetrify (Generators G)) T}
    (p : Path (root (WideSubquiver.toType (Symmetrify (Generators G)) T)) a), F'.map (homOfPath T p) = 1
⊢ F'.map (loopOfHom T q) = F'.map q

Tactic:
simp only [this, treeHom, comp_as_mul, inv_as_inv, loopOfHom, inv_one, mul_one,
            one_mul, Functor.map_inv, Functor.map_comp]

Premises used: IsFreeGroupoid.SpanningTree.loopOfHom, inv_one, CategoryTheory.SingleObj.inv_as_inv, CategoryTheory.SingleObj.comp_as_mul, CategoryTheory.Functor.map_inv, IsFreeGroupoid.SpanningTree.treeHom, CategoryTheory.Functor.map_comp, mul_one, one_mul
-- Module: Mathlib.GroupTheory.FreeGroup.NielsenSchreier
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'
x y : G
q : x ⟶ y
refine_1 :
  ∀ {a : WideSubquiver.toType (Symmetrify (Generators G)) T}
    (p : Path (root (WideSubquiver.toType (Symmetrify (Generators G)) T)) a), F'.map (homOfPath T p) = 1
⊢ F'.map (loopOfHom T q) = F'.map q

Tactic:
suffices ∀ {a} (p : Path (root T) a), F'.map (homOfPath T p) = 1 by
          simp only [this, treeHom, comp_as_mul, inv_as_inv, loopOfHom, inv_one, mul_one,
            one_mul, Functor.map_inv, Functor.map_comp]
-- Module: Mathlib.GroupTheory.FreeGroup.NielsenSchreier
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'
x y : G
q : x ⟶ y
a : WideSubquiver.toType (Symmetrify (Generators G)) T
refine_1 : F'.map (𝟙 (root' T)) = 1
refine_1₁ :
  Eq.{u + 1} (α := F'.obj (root' T) ⟶ F'.obj (root (WideSubquiver.toType (Symmetrify (Generators G)) T)))
    (𝟙 (F'.obj (root' T))) 1
refine_1₂ refine_1₃ :
  Eq.{u + 1} (α := F'.obj (root' T) ⟶ F'.obj (root (WideSubquiver.toType (Symmetrify (Generators G)) T))) 1 1
⊢ Eq (α := F'.obj (root' T) ⟶ F'.obj (root (WideSubquiver.toType (Symmetrify (Generators G)) T)))
    (F'.map (homOfPath T Path.nil)) 1

Tactic:
rw [homOfPath, F'.map_id, id_as_one]

Premises used: IsFreeGroupoid.SpanningTree.homOfPath, CategoryTheory.SingleObj.id_as_one, CategoryTheory.Functor.map_id
-- Module: Mathlib.GroupTheory.FreeGroup.NielsenSchreier
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'
x y : G
q : x ⟶ y
a b c : WideSubquiver.toType (Symmetrify (Generators G)) T
p : Path (root (WideSubquiver.toType (Symmetrify (Generators G)) T)) b
e : b ⟶ c
ih : F'.map (homOfPath T p) = 1
refine_1 :
  Eq (α := F'.obj (root' T) ⟶ F'.obj c)
    (F'.map
      (Sum.recOn (motive := fun (x : b ⟶ c) ↦ b ⟶ c) (↑e : b ⟶ c) (fun (e : b ⟶ c) ↦ of e) fun (e : c ⟶ b) ↦
        inv (of e)))
    1
⊢ F'.map (homOfPath T (p.cons e)) = 1

Tactic:
rw [homOfPath, F'.map_comp, comp_as_mul, ih, mul_one]

Premises used: IsFreeGroupoid.SpanningTree.homOfPath, CategoryTheory.SingleObj.comp_as_mul, CategoryTheory.Functor.map_comp, mul_one