awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Module: Mathlib.GroupTheory.FreeGroup.NielsenSchreier
Goal:
G A : Type u
inst : Group G
inst_1 : IsFreeGroup G
inst_2 : MulAction G A
X : Type u
inst_3 : Group X
f : Labelling (Generators (ActionCategory G A)) X
f' : IsFreeGroup.Generators G → (A → X) ⋊[mulAutArrow] G :=
  fun (e : IsFreeGroup.Generators G) ↦
    ⟨fun (b : A) ↦
      f (a :=
        Sigma.mk (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c) ()
          ((IsFreeGroup.of e)⁻¹ • b))
        (b := Sigma.mk (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c) () b)
        (Subtype.mk (p := fun (e_1 : IsFreeGroup.Generators G) ↦
          HSMul.hSMul (β := A) (IsFreeGroup.of e_1)
              (ActionCategory.back (M := G)
                (Sigma.mk (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c) ()
                  ((IsFreeGroup.of e)⁻¹ • b))) =
            ActionCategory.back (M := G)
              (Sigma.mk (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c) () b))
          e ⋯),
      IsFreeGroup.of e⟩
F' : G →* (A → X) ⋊[mulAutArrow] G
hF' : ∀ (a : IsFreeGroup.Generators G), (F' : (a : G) → (A → X) ⋊[mulAutArrow] G) (IsFreeGroup.of a) = f' a
uF' :
  ∀ (y : G →* (A → X) ⋊[mulAutArrow] G),
    (fun (F : G →* (A → X) ⋊[mulAutArrow] G) ↦
          ∀ (a : IsFreeGroup.Generators G), (F : (a : G) → (A → X) ⋊[mulAutArrow] G) (IsFreeGroup.of a) = f' a)
        y →
      y = F'
E : ActionCategory G A ⥤ CategoryTheory.SingleObj X
hE :
  ∀ (a b : Generators (ActionCategory G A)) (g : a ⟶ b),
    E.map
        (Subtype.mk (p :=
          fun
            (f :
              Sigma.fst (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c)
                  (have this := a;
                  this) ⟶
                b.fst (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c)) ↦
          (ConcreteCategory.hom (FC := TypeCat.Fun) (CategoryTheory.Functor.map (actionAsFunctor G A) f) :
                (a :
                    (fun (X : Type u) ↦ X)
                      ((actionAsFunctor G A).obj
                        (have this := a;
                          this).fst)) →
                  (fun (X : Type u) ↦ X) ((actionAsFunctor G A).obj b.fst))
              (Sigma.snd (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c)
                (have this := a;
                this)) =
            b.snd (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c))
          (IsFreeGroup.of (↑g : IsFreeGroup.Generators G)) ⋯) =
      f g
this : curry E = F'
refine_3 : ∀ (X_1 : ActionCategory G A), E.obj X_1 = (uncurry F' ⋯).obj X_1
refine_3₁ : ∀ (X_1 Y : ActionCategory G A) (f : X_1 ⟶ Y), E.map f ≍ (uncurry F' ⋯).map f
⊢ E = uncurry F' ⋯

Tactic:
apply Functor.hext

Premises used: CategoryTheory.Functor.hext
-- Module: Mathlib.GroupTheory.FreeGroup.NielsenSchreier
Goal:
G A : Type u
inst : Group G
inst_1 : IsFreeGroup G
inst_2 : MulAction G A
X : Type u
inst_3 : Group X
f : Labelling (Generators (ActionCategory G A)) X
f' : IsFreeGroup.Generators G → (A → X) ⋊[mulAutArrow] G :=
  fun (e : IsFreeGroup.Generators G) ↦
    ⟨fun (b : A) ↦
      f (a :=
        Sigma.mk (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c) ()
          ((IsFreeGroup.of e)⁻¹ • b))
        (b := Sigma.mk (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c) () b)
        (Subtype.mk (p := fun (e_1 : IsFreeGroup.Generators G) ↦
          HSMul.hSMul (β := A) (IsFreeGroup.of e_1)
              (ActionCategory.back (M := G)
                (Sigma.mk (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c) ()
                  ((IsFreeGroup.of e)⁻¹ • b))) =
            ActionCategory.back (M := G)
              (Sigma.mk (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c) () b))
          e ⋯),
      IsFreeGroup.of e⟩
F' : G →* (A → X) ⋊[mulAutArrow] G
hF' : ∀ (a : IsFreeGroup.Generators G), (F' : (a : G) → (A → X) ⋊[mulAutArrow] G) (IsFreeGroup.of a) = f' a
uF' :
  ∀ (y : G →* (A → X) ⋊[mulAutArrow] G),
    (fun (F : G →* (A → X) ⋊[mulAutArrow] G) ↦
          ∀ (a : IsFreeGroup.Generators G), (F : (a : G) → (A → X) ⋊[mulAutArrow] G) (IsFreeGroup.of a) = f' a)
        y →
      y = F'
E : ActionCategory G A ⥤ CategoryTheory.SingleObj X
hE :
  ∀ (a b : Generators (ActionCategory G A)) (g : a ⟶ b),
    E.map
        (Subtype.mk (p :=
          fun
            (f :
              Sigma.fst (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c)
                  (have this := a;
                  this) ⟶
                b.fst (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c)) ↦
          (ConcreteCategory.hom (FC := TypeCat.Fun) (CategoryTheory.Functor.map (actionAsFunctor G A) f) :
                (a :
                    (fun (X : Type u) ↦ X)
                      ((actionAsFunctor G A).obj
                        (have this := a;
                          this).fst)) →
                  (fun (X : Type u) ↦ X) ((actionAsFunctor G A).obj b.fst))
              (Sigma.snd (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c)
                (have this := a;
                this)) =
            b.snd (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c))
          (IsFreeGroup.of (↑g : IsFreeGroup.Generators G)) ⋯) =
      f g
this : curry E = F'
X_1 : ActionCategory G A
⊢ E.obj X_1 = (uncurry F' ⋯).obj X_1

Tactic:
apply Unit.ext

Premises used: Unit.ext
-- Module: Mathlib.GroupTheory.FreeGroup.NielsenSchreier
Goal:
G A : Type u
inst : Group G
inst_1 : IsFreeGroup G
inst_2 : MulAction G A
X : Type u
inst_3 : Group X
f : Labelling (Generators (ActionCategory G A)) X
f' : IsFreeGroup.Generators G → (A → X) ⋊[mulAutArrow] G :=
  fun (e : IsFreeGroup.Generators G) ↦
    ⟨fun (b : A) ↦
      f (a :=
        Sigma.mk (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c) ()
          ((IsFreeGroup.of e)⁻¹ • b))
        (b := Sigma.mk (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c) () b)
        (Subtype.mk (p := fun (e_1 : IsFreeGroup.Generators G) ↦
          HSMul.hSMul (β := A) (IsFreeGroup.of e_1)
              (ActionCategory.back (M := G)
                (Sigma.mk (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c) ()
                  ((IsFreeGroup.of e)⁻¹ • b))) =
            ActionCategory.back (M := G)
              (Sigma.mk (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c) () b))
          e ⋯),
      IsFreeGroup.of e⟩
F' : G →* (A → X) ⋊[mulAutArrow] G
hF' : ∀ (a : IsFreeGroup.Generators G), (F' : (a : G) → (A → X) ⋊[mulAutArrow] G) (IsFreeGroup.of a) = f' a
uF' :
  ∀ (y : G →* (A → X) ⋊[mulAutArrow] G),
    (fun (F : G →* (A → X) ⋊[mulAutArrow] G) ↦
          ∀ (a : IsFreeGroup.Generators G), (F : (a : G) → (A → X) ⋊[mulAutArrow] G) (IsFreeGroup.of a) = f' a)
        y →
      y = F'
E : ActionCategory G A ⥤ CategoryTheory.SingleObj X
hE :
  ∀ (a b : Generators (ActionCategory G A)) (g : a ⟶ b),
    E.map
        (Subtype.mk (p :=
          fun
            (f :
              Sigma.fst (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c)
                  (have this := a;
                  this) ⟶
                b.fst (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c)) ↦
          (ConcreteCategory.hom (FC := TypeCat.Fun) (CategoryTheory.Functor.map (actionAsFunctor G A) f) :
                (a :
                    (fun (X : Type u) ↦ X)
                      ((actionAsFunctor G A).obj
                        (have this := a;
                          this).fst)) →
                  (fun (X : Type u) ↦ X) ((actionAsFunctor G A).obj b.fst))
              (Sigma.snd (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c)
                (have this := a;
                this)) =
            b.snd (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c))
          (IsFreeGroup.of (↑g : IsFreeGroup.Generators G)) ⋯) =
      f g
this : curry E = F'
⊢ ∀ (X_1 Y : ActionCategory G A) (f : X_1 ⟶ Y), E.map f ≍ (uncurry F' ⋯).map f

Tactic:
ActionCategory.cases ?_

Premises used: CategoryTheory.ActionCategory.cases
-- Module: Mathlib.GroupTheory.FreeGroup.NielsenSchreier
Goal:
G A : Type u
inst : Group G
inst_1 : IsFreeGroup G
inst_2 : MulAction G A
X : Type u
inst_3 : Group X
f : Labelling (Generators (ActionCategory G A)) X
f' : IsFreeGroup.Generators G → (A → X) ⋊[mulAutArrow] G :=
  fun (e : IsFreeGroup.Generators G) ↦
    ⟨fun (b : A) ↦
      f (a :=
        Sigma.mk (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c) ()
          ((IsFreeGroup.of e)⁻¹ • b))
        (b := Sigma.mk (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c) () b)
        (Subtype.mk (p := fun (e_1 : IsFreeGroup.Generators G) ↦
          HSMul.hSMul (β := A) (IsFreeGroup.of e_1)
              (ActionCategory.back (M := G)
                (Sigma.mk (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c) ()
                  ((IsFreeGroup.of e)⁻¹ • b))) =
            ActionCategory.back (M := G)
              (Sigma.mk (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c) () b))
          e ⋯),
      IsFreeGroup.of e⟩
F' : G →* (A → X) ⋊[mulAutArrow] G
hF' : ∀ (a : IsFreeGroup.Generators G), (F' : (a : G) → (A → X) ⋊[mulAutArrow] G) (IsFreeGroup.of a) = f' a
uF' :
  ∀ (y : G →* (A → X) ⋊[mulAutArrow] G),
    (fun (F : G →* (A → X) ⋊[mulAutArrow] G) ↦
          ∀ (a : IsFreeGroup.Generators G), (F : (a : G) → (A → X) ⋊[mulAutArrow] G) (IsFreeGroup.of a) = f' a)
        y →
      y = F'
E : ActionCategory G A ⥤ CategoryTheory.SingleObj X
hE :
  ∀ (a b : Generators (ActionCategory G A)) (g : a ⟶ b),
    E.map
        (Subtype.mk (p :=
          fun
            (f :
              Sigma.fst (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c)
                  (have this := a;
                  this) ⟶
                b.fst (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c)) ↦
          (ConcreteCategory.hom (FC := TypeCat.Fun) (CategoryTheory.Functor.map (actionAsFunctor G A) f) :
                (a :
                    (fun (X : Type u) ↦ X)
                      ((actionAsFunctor G A).obj
                        (have this := a;
                          this).fst)) →
                  (fun (X : Type u) ↦ X) ((actionAsFunctor G A).obj b.fst))
              (Sigma.snd (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c)
                (have this := a;
                this)) =
            b.snd (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c))
          (IsFreeGroup.of (↑g : IsFreeGroup.Generators G)) ⋯) =
      f g
this : curry E = F'
refine_3 : ∀ (t : A) (g : G), E.map (homOfPair t g) ≍ (uncurry F' ⋯).map (homOfPair t g)
⊢ ∀ (X_1 Y : ActionCategory G A) (f : X_1 ⟶ Y), E.map f ≍ (uncurry F' ⋯).map f

Tactic:
refine ActionCategory.cases ?_

Premises used: CategoryTheory.ActionCategory.cases
-- Module: Mathlib.GroupTheory.FreeGroup.NielsenSchreier
Goal:
G A : Type u
inst : Group G
inst_1 : IsFreeGroup G
inst_2 : MulAction G A
X : Type u
inst_3 : Group X
f : Labelling (Generators (ActionCategory G A)) X
f' : IsFreeGroup.Generators G → (A → X) ⋊[mulAutArrow] G :=
  fun (e : IsFreeGroup.Generators G) ↦
    ⟨fun (b : A) ↦
      f (a :=
        Sigma.mk (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c) ()
          ((IsFreeGroup.of e)⁻¹ • b))
        (b := Sigma.mk (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c) () b)
        (Subtype.mk (p := fun (e_1 : IsFreeGroup.Generators G) ↦
          HSMul.hSMul (β := A) (IsFreeGroup.of e_1)
              (ActionCategory.back (M := G)
                (Sigma.mk (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c) ()
                  ((IsFreeGroup.of e)⁻¹ • b))) =
            ActionCategory.back (M := G)
              (Sigma.mk (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c) () b))
          e ⋯),
      IsFreeGroup.of e⟩
F' : G →* (A → X) ⋊[mulAutArrow] G
hF' : ∀ (a : IsFreeGroup.Generators G), (F' : (a : G) → (A → X) ⋊[mulAutArrow] G) (IsFreeGroup.of a) = f' a
uF' :
  ∀ (y : G →* (A → X) ⋊[mulAutArrow] G),
    (fun (F : G →* (A → X) ⋊[mulAutArrow] G) ↦
          ∀ (a : IsFreeGroup.Generators G), (F : (a : G) → (A → X) ⋊[mulAutArrow] G) (IsFreeGroup.of a) = f' a)
        y →
      y = F'
E : ActionCategory G A ⥤ CategoryTheory.SingleObj X
hE :
  ∀ (a b : Generators (ActionCategory G A)) (g : a ⟶ b),
    E.map
        (Subtype.mk (p :=
          fun
            (f :
              Sigma.fst (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c)
                  (have this := a;
                  this) ⟶
                b.fst (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c)) ↦
          (ConcreteCategory.hom (FC := TypeCat.Fun) (CategoryTheory.Functor.map (actionAsFunctor G A) f) :
                (a :
                    (fun (X : Type u) ↦ X)
                      ((actionAsFunctor G A).obj
                        (have this := a;
                          this).fst)) →
                  (fun (X : Type u) ↦ X) ((actionAsFunctor G A).obj b.fst))
              (Sigma.snd (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c)
                (have this := a;
                this)) =
            b.snd (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c))
          (IsFreeGroup.of (↑g : IsFreeGroup.Generators G)) ⋯) =
      f g
this : curry E = F'
t : A
g : G
refine_3 : E.map (homOfPair t g) ≍ E.map (homOfPair t g)
⊢ E.map (homOfPair t g) ≍ (uncurry F' ⋯).map (homOfPair t g)

Tactic:
simp only [← this, uncurry_map, curry_apply_left, coe_back, homOfPair.val]

Premises used: CategoryTheory.ActionCategory.uncurry_map, CategoryTheory.ActionCategory.coe_back, CategoryTheory.ActionCategory.curry_apply_left, CategoryTheory.ActionCategory.homOfPair.val
-- Module: Mathlib.GroupTheory.FreeGroup.NielsenSchreier
Goal:
G A : Type u
inst : Group G
inst_1 : IsFreeGroup G
inst_2 : MulAction G A
X : Type u
inst_3 : Group X
f : Labelling (Generators (ActionCategory G A)) X
f' : IsFreeGroup.Generators G → (A → X) ⋊[mulAutArrow] G :=
  fun (e : IsFreeGroup.Generators G) ↦
    ⟨fun (b : A) ↦
      f (a :=
        Sigma.mk (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c) ()
          ((IsFreeGroup.of e)⁻¹ • b))
        (b := Sigma.mk (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c) () b)
        (Subtype.mk (p := fun (e_1 : IsFreeGroup.Generators G) ↦
          HSMul.hSMul (β := A) (IsFreeGroup.of e_1)
              (ActionCategory.back (M := G)
                (Sigma.mk (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c) ()
                  ((IsFreeGroup.of e)⁻¹ • b))) =
            ActionCategory.back (M := G)
              (Sigma.mk (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c) () b))
          e ⋯),
      IsFreeGroup.of e⟩
F' : G →* (A → X) ⋊[mulAutArrow] G
hF' : ∀ (a : IsFreeGroup.Generators G), (F' : (a : G) → (A → X) ⋊[mulAutArrow] G) (IsFreeGroup.of a) = f' a
uF' :
  ∀ (y : G →* (A → X) ⋊[mulAutArrow] G),
    (fun (F : G →* (A → X) ⋊[mulAutArrow] G) ↦
          ∀ (a : IsFreeGroup.Generators G), (F : (a : G) → (A → X) ⋊[mulAutArrow] G) (IsFreeGroup.of a) = f' a)
        y →
      y = F'
E : ActionCategory G A ⥤ CategoryTheory.SingleObj X
hE :
  ∀ (a b : Generators (ActionCategory G A)) (g : a ⟶ b),
    E.map
        (Subtype.mk (p :=
          fun
            (f :
              Sigma.fst (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c)
                  (have this := a;
                  this) ⟶
                b.fst (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c)) ↦
          (ConcreteCategory.hom (FC := TypeCat.Fun) (CategoryTheory.Functor.map (actionAsFunctor G A) f) :
                (a :
                    (fun (X : Type u) ↦ X)
                      ((actionAsFunctor G A).obj
                        (have this := a;
                          this).fst)) →
                  (fun (X : Type u) ↦ X) ((actionAsFunctor G A).obj b.fst))
              (Sigma.snd (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c)
                (have this := a;
                this)) =
            b.snd (β := fun (c : CategoryTheory.SingleObj G) ↦ Functor.obj (actionAsFunctor G A) c))
          (IsFreeGroup.of (↑g : IsFreeGroup.Generators G)) ⋯) =
      f g
this : curry E = F'
t : A
g : G
⊢ E.map (homOfPair t g) ≍ E.map (homOfPair t g)

Tactic:
rfl
-- 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)
a : G
p : Path (root (WideSubquiver.toType (Symmetrify (Generators G)) T)) a
rw : homOfPath T default = homOfPath T p
rw₁ : homOfPath T p = homOfPath T p
rw₂ : Path (root (WideSubquiver.toType (Symmetrify (Generators G)) T)) a
rw₃ : homOfPath T p = homOfPath T p
rw₄ : Path (root (WideSubquiver.toType (Symmetrify (Generators G)) T)) a
⊢ treeHom T a = homOfPath T p

Tactic:
rw [treeHom, Unique.default_eq]

Premises used: Unique.default_eq, IsFreeGroupoid.SpanningTree.treeHom
-- 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)
⊢ treeHom T (root' T) = 𝟙 (root' T)

Tactic:
_root_.trans
    (treeHom_eq T Path.nil) rfl

Premises used: trans, Quiver.Path.nil, IsFreeGroupoid.SpanningTree.treeHom_eq, rfl
-- 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)
a b : Generators G
e : a ⟶ b
H : e ∈ wideSubquiverSymmetrify T a b
rw :
  Eq (α := root' T ⟶ b)
    (treeHom T
        (have this := a;
        this) ≫
      of e)
    (treeHom T b)
⊢ loopOfHom T (of e) = 𝟙 (root' T)

Tactic:
rw [loopOfHom, ← Category.assoc, IsIso.comp_inv_eq, Category.id_comp]

Premises used: IsFreeGroupoid.SpanningTree.loopOfHom, CategoryTheory.Category.assoc, CategoryTheory.IsIso.comp_inv_eq, 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)
a b : Generators G
e : a ⟶ b
H : e ∈ wideSubquiverSymmetrify T a b
inl :
  ∀ (H : Sum.inl e ∈ T a b),
    Eq (α := root' T ⟶ b)
      (treeHom T
          (have this := a;
          this) ≫
        of e)
      (treeHom T b)
inr :
  ∀ (H : Sum.inr e ∈ T b a),
    Eq (α := root' T ⟶ b)
      (treeHom T
          (have this := a;
          this) ≫
        of e)
      (treeHom T b)
⊢ Eq (α := root' T ⟶ b)
    (treeHom T
        (have this := a;
        this) ≫
      of e)
    (treeHom T b)

Tactic:
rcases H with H | 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)
a b : Generators G
e : a ⟶ b
H : Sum.inl e ∈ T a b
inl :
  Eq (α := root' T ⟶ b)
    (treeHom T
        (have this := a;
        this) ≫
      of e)
    (CategoryStruct.comp (Y := a) (homOfPath T default)
      (Sum.recOn (motive := fun (x : a ⟶ b) ↦ a ⟶ b)
        (↑(Subtype.mk (p := fun (f : a ⟶ b) ↦ f ∈ T a b) (Sum.inl e) H) : a ⟶ b) (fun (e : a ⟶ b) ↦ of e)
        fun (e : b ⟶ a) ↦ inv (of e)))
⊢ Eq (α := root' T ⟶ b)
    (treeHom T
        (have this := a;
        this) ≫
      of e)
    (treeHom T b)

Tactic:
rw [treeHom_eq T (Path.cons default ⟨Sum.inl e, H⟩), homOfPath]

Premises used: IsFreeGroupoid.SpanningTree.homOfPath, Inhabited.default, IsFreeGroupoid.SpanningTree.treeHom_eq, Sum.inl, Subtype.mk, Quiver.Path.cons
-- 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)
a b : Generators G
e : a ⟶ b
H : Sum.inl e ∈ T a b
⊢ Eq (α := root' T ⟶ b)
    (treeHom T
        (have this := a;
        this) ≫
      of e)
    (CategoryStruct.comp (Y := a) (homOfPath T default)
      (Sum.recOn (motive := fun (x : a ⟶ b) ↦ a ⟶ b)
        (↑(Subtype.mk (p := fun (f : a ⟶ b) ↦ f ∈ T a b) (Sum.inl e) H) : a ⟶ b) (fun (e : a ⟶ b) ↦ of e)
        fun (e : b ⟶ a) ↦ inv (of e)))

Tactic:
rfl
-- 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)
a b : Generators G
e : a ⟶ b
H : Sum.inr e ∈ T b a
inr :
  Eq (α := root' T ⟶ b)
    (CategoryStruct.comp (Y := b) (homOfPath T default)
        (Sum.recOn (motive := fun (x : b ⟶ a) ↦ b ⟶ a)
          (↑(Subtype.mk (p := fun (f : b ⟶ a) ↦ f ∈ T b a) (Sum.inr e) H) : b ⟶ a) (fun (e : b ⟶ a) ↦ of e)
          fun (e : a ⟶ b) ↦ inv (of e)) ≫
      of e)
    (treeHom T b)
⊢ Eq (α := root' T ⟶ b)
    (treeHom T
        (have this := a;
        this) ≫
      of e)
    (treeHom T b)

Tactic:
rw [treeHom_eq T (Path.cons default ⟨Sum.inr e, H⟩), homOfPath]

Premises used: IsFreeGroupoid.SpanningTree.homOfPath, Inhabited.default, IsFreeGroupoid.SpanningTree.treeHom_eq, Subtype.mk, Quiver.Path.cons, Sum.inr
-- 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)
a b : Generators G
e : a ⟶ b
H : Sum.inr e ∈ T b a
⊢ Eq (α := root' T ⟶ b)
    (CategoryStruct.comp (Y := b) (homOfPath T default)
        (Sum.recOn (motive := fun (x : b ⟶ a) ↦ b ⟶ a)
          (↑(Subtype.mk (p := fun (f : b ⟶ a) ↦ f ∈ T b a) (Sum.inr e) H) : b ⟶ a) (fun (e : b ⟶ a) ↦ of e)
          fun (e : a ⟶ b) ↦ inv (of e)) ≫
      of e)
    (treeHom T b)

Tactic:
simp only [IsIso.inv_hom_id, Category.comp_id, Category.assoc, treeHom]

Premises used: CategoryTheory.Category.assoc, CategoryTheory.IsIso.inv_hom_id, CategoryTheory.Category.comp_id, IsFreeGroupoid.SpanningTree.treeHom
-- 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
dsimp :
  Eq.{u_1 + 1} (α := () ⟶ ()) ((f : (a : End (root' T)) → X) (treeHom T a ≫ 𝟙 a ≫ inv (treeHom T a)) : X)
    (𝟙 () : () ⟶ ())
⊢ Eq.{u_1 + 1} (α := () ⟶ ()) ((f : (a : End (root' T)) → X) (loopOfHom T (𝟙 a)) : X) (𝟙 () : () ⟶ ())

Tactic:
dsimp only [loopOfHom]

Premises used: IsFreeGroupoid.SpanningTree.loopOfHom