l3lab/ntp-mathlib huggingface dataset:
theorem summand_smul_def {i : ι} (g : G i) (w : NormalWord d) :
    of (φ := φ) i g • w = (equivPair i).symm
      { equivPair i w with
        head := g * (equivPair i w).head } := by
  dsimp [NormalWord.mulAction, instHSMul, SMul.smul]
  rw [lift_of]
  

Proof state:
ι : Type u_1
G : ι → Type u_2
H : Type u_3
K : Type u_4
inst✝⁴ : Monoid K
inst✝³ : (i : ι) → Group (G i)
inst✝² : Group H
φ : (i : ι) → H →* G i
d : Transversal φ
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → DecidableEq (G i)
i : ι
g : G i
w : NormalWord d
⊢ MulAction.toEndHom g w =
    (equivPair i).symm
      {
        toPair :=
          { head := g * ((equivPair i) w).head, tail := ((equivPair i) w).tail,
            fstIdx_ne := (_ : Word.fstIdx ((equivPair i) w).tail ≠ some i) },
        normalized :=
          (_ :
            ∀ (i_1 : ι) (g : G i_1),
              { fst := i_1, snd := g } ∈ ((equivPair i) w).tail.toList → g ∈ Transversal.set d i_1) }

Next tactic:
rfl
theorem of_smul_eq_smul {i : ι} (g : G i) (w : NormalWord d) :
    of (φ := φ) i g • w = g • w := by
  

Proof state:
ι : Type u_1
G : ι → Type u_2
H : Type u_3
K : Type u_4
inst✝⁴ : Monoid K
inst✝³ : (i : ι) → Group (G i)
inst✝² : Group H
φ : (i : ι) → H →* G i
d : Transversal φ
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → DecidableEq (G i)
i : ι
g : G i
w : NormalWord d
⊢ (of i) g • w = g • w

Next tactic:
rw [summand_smul_def, summand_smul_def']
theorem base_smul_eq_smul (h : H) (w : NormalWord d) :
    base φ h • w = h • w := by
  

Proof state:
ι : Type u_1
G : ι → Type u_2
H : Type u_3
K : Type u_4
inst✝⁴ : Monoid K
inst✝³ : (i : ι) → Group (G i)
inst✝² : Group H
φ : (i : ι) → H →* G i
d : Transversal φ
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → DecidableEq (G i)
h : H
w : NormalWord d
⊢ (base φ) h • w = h • w

Next tactic:
rw [base_smul_def, base_smul_def']
/-- Induction principle for `NormalWord`, that corresponds closely to inducting on
the underlying list. -/
@[elab_as_elim]
noncomputable def consRecOn {motive : NormalWord d → Sort _} (w : NormalWord d)
    (h_empty : motive empty)
    (h_cons : ∀ (i : ι) (g : G i) (w : NormalWord d) (hmw : w.fstIdx ≠ some i)
      (_hgn : g ∈ d.set i) (hgr : g ∉ (φ i).range) (_hw1 : w.head = 1),
      motive w →  motive (cons g w hmw hgr))
    (h_base : ∀ (h : H) (w : NormalWord d), w.head = 1 → motive w → motive
      (base φ h • w)) : motive w := by
  

Proof state:
ι : Type u_1
G : ι → Type u_2
H : Type u_3
K : Type u_4
inst✝⁴ : Monoid K
inst✝³ : (i : ι) → Group (G i)
inst✝² : Group H
φ : (i : ι) → H →* G i
d : Transversal φ
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → DecidableEq (G i)
motive : NormalWord d → Sort ?u.1659524
w : NormalWord d
h_empty : motive empty
h_cons :
  (i : ι) →
    (g : G i) →
      (w : NormalWord d) →
        (hmw : Word.fstIdx w.toWord ≠ some i) →
          g ∈ Transversal.set d i →
            (hgr : g ∉ MonoidHom.range (φ i)) → w.head = 1 → motive w → motive (cons g w hmw hgr)
h_base : (h : H) → (w : NormalWord d) → w.head = 1 → motive w → motive ((base φ) h • w)
⊢ motive w

Next tactic:
rcases w with ⟨w, head, h3⟩
/-- Induction principle for `NormalWord`, that corresponds closely to inducting on
the underlying list. -/
@[elab_as_elim]
noncomputable def consRecOn {motive : NormalWord d → Sort _} (w : NormalWord d)
    (h_empty : motive empty)
    (h_cons : ∀ (i : ι) (g : G i) (w : NormalWord d) (hmw : w.fstIdx ≠ some i)
      (_hgn : g ∈ d.set i) (hgr : g ∉ (φ i).range) (_hw1 : w.head = 1),
      motive w →  motive (cons g w hmw hgr))
    (h_base : ∀ (h : H) (w : NormalWord d), w.head = 1 → motive w → motive
      (base φ h • w)) : motive w := by
  rcases w with ⟨w, head, h3⟩
  

Proof state:
case mk
ι : Type u_1
G : ι → Type u_2
H : Type u_3
K : Type u_4
inst✝⁴ : Monoid K
inst✝³ : (i : ι) → Group (G i)
inst✝² : Group H
φ : (i : ι) → H →* G i
d : Transversal φ
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → DecidableEq (G i)
motive : NormalWord d → Sort ?u.1659524
h_empty : motive empty
h_cons :
  (i : ι) →
    (g : G i) →
      (w : NormalWord d) →
        (hmw : Word.fstIdx w.toWord ≠ some i) →
          g ∈ Transversal.set d i →
            (hgr : g ∉ MonoidHom.range (φ i)) → w.head = 1 → motive w → motive (cons g w hmw hgr)
h_base : (h : H) → (w : NormalWord d) → w.head = 1 → motive w → motive ((base φ) h • w)
w : Word fun i => G i
head : H
h3 : ∀ (i : ι) (g : G i), { fst := i, snd := g } ∈ w.toList → g ∈ Transversal.set d i
⊢ motive { toWord := w, head := head, normalized := h3 }

Next tactic:
convert h_base head ⟨w, 1, h3⟩ rfl ?_
/-- Induction principle for `NormalWord`, that corresponds closely to inducting on
the underlying list. -/
@[elab_as_elim]
noncomputable def consRecOn {motive : NormalWord d → Sort _} (w : NormalWord d)
    (h_empty : motive empty)
    (h_cons : ∀ (i : ι) (g : G i) (w : NormalWord d) (hmw : w.fstIdx ≠ some i)
      (_hgn : g ∈ d.set i) (hgr : g ∉ (φ i).range) (_hw1 : w.head = 1),
      motive w →  motive (cons g w hmw hgr))
    (h_base : ∀ (h : H) (w : NormalWord d), w.head = 1 → motive w → motive
      (base φ h • w)) : motive w := by
  rcases w with ⟨w, head, h3⟩
  convert h_base head ⟨w, 1, h3⟩ rfl ?_
  · 

Proof state:
case h.e'_1.h.e'_9
ι : Type u_1
G : ι → Type u_2
H : Type u_3
K : Type u_4
inst✝⁴ : Monoid K
inst✝³ : (i : ι) → Group (G i)
inst✝² : Group H
φ : (i : ι) → H →* G i
d : Transversal φ
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → DecidableEq (G i)
motive : NormalWord d → Sort ?u.1659524
h_empty : motive empty
h_cons :
  (i : ι) →
    (g : G i) →
      (w : NormalWord d) →
        (hmw : Word.fstIdx w.toWord ≠ some i) →
          g ∈ Transversal.set d i →
            (hgr : g ∉ MonoidHom.range (φ i)) → w.head = 1 → motive w → motive (cons g w hmw hgr)
h_base : (h : H) → (w : NormalWord d) → w.head = 1 → motive w → motive ((base φ) h • w)
w : Word fun i => G i
head : H
h3 : ∀ (i : ι) (g : G i), { fst := i, snd := g } ∈ w.toList → g ∈ Transversal.set d i
⊢ head = ((base φ) head • { toWord := w, head := 1, normalized := h3 }).head

Next tactic:
simp [base_smul_def]
/-- Induction principle for `NormalWord`, that corresponds closely to inducting on
the underlying list. -/
@[elab_as_elim]
noncomputable def consRecOn {motive : NormalWord d → Sort _} (w : NormalWord d)
    (h_empty : motive empty)
    (h_cons : ∀ (i : ι) (g : G i) (w : NormalWord d) (hmw : w.fstIdx ≠ some i)
      (_hgn : g ∈ d.set i) (hgr : g ∉ (φ i).range) (_hw1 : w.head = 1),
      motive w →  motive (cons g w hmw hgr))
    (h_base : ∀ (h : H) (w : NormalWord d), w.head = 1 → motive w → motive
      (base φ h • w)) : motive w := by
  rcases w with ⟨w, head, h3⟩
  convert h_base head ⟨w, 1, h3⟩ rfl ?_
  · simp [base_smul_def]
  · 

Proof state:
case mk
ι : Type u_1
G : ι → Type u_2
H : Type u_3
K : Type u_4
inst✝⁴ : Monoid K
inst✝³ : (i : ι) → Group (G i)
inst✝² : Group H
φ : (i : ι) → H →* G i
d : Transversal φ
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → DecidableEq (G i)
motive : NormalWord d → Sort ?u.1659524
h_empty : motive empty
h_cons :
  (i : ι) →
    (g : G i) →
      (w : NormalWord d) →
        (hmw : Word.fstIdx w.toWord ≠ some i) →
          g ∈ Transversal.set d i →
            (hgr : g ∉ MonoidHom.range (φ i)) → w.head = 1 → motive w → motive (cons g w hmw hgr)
h_base : (h : H) → (w : NormalWord d) → w.head = 1 → motive w → motive ((base φ) h • w)
w : Word fun i => G i
head : H
h3 : ∀ (i : ι) (g : G i), { fst := i, snd := g } ∈ w.toList → g ∈ Transversal.set d i
⊢ motive { toWord := w, head := 1, normalized := h3 }

Next tactic:
induction w using Word.consRecOn with
    | h_empty => exact h_empty
    | h_cons i g w h1 hg1 ih =>
      convert h_cons i g ⟨w, 1, fun _ _ h => h3 _ _ (List.mem_cons_of_mem _ h)⟩
        h1 (h3 _ _ (List.mem_cons_self _ _)) ?_ rfl
        (ih ?_)
      · ext
        simp only [Word.cons, Option.mem_def, cons, map_one, mul_one,
          (equiv_snd_eq_self_iff_mem (d.compl i) (one_mem _)).2
          (h3 _ _ (List.mem_cons_self _ _))]
      · apply d.injective i
        simp only [cons, equiv_fst_eq_mul_inv, MonoidHom.apply_ofInjective_symm,
          map_one, mul_one, mul_right_inv, (equiv_snd_eq_self_iff_mem (d.compl i) (one_mem _)).2
          (h3 _ _ (List.mem_cons_self _ _))]
      · rwa [← SetLike.mem_coe,
          ← coe_equiv_snd_eq_one_iff_mem (d.compl i) (d.one_mem _),
          (equiv_snd_eq_self_iff_mem (d.compl i) (one_mem _)).2
          (h3 _ _ (List.mem_cons_self _ _))]
/-- Induction principle for `NormalWord`, that corresponds closely to inducting on
the underlying list. -/
@[elab_as_elim]
noncomputable def consRecOn {motive : NormalWord d → Sort _} (w : NormalWord d)
    (h_empty : motive empty)
    (h_cons : ∀ (i : ι) (g : G i) (w : NormalWord d) (hmw : w.fstIdx ≠ some i)
      (_hgn : g ∈ d.set i) (hgr : g ∉ (φ i).range) (_hw1 : w.head = 1),
      motive w →  motive (cons g w hmw hgr))
    (h_base : ∀ (h : H) (w : NormalWord d), w.head = 1 → motive w → motive
      (base φ h • w)) : motive w := by
  rcases w with ⟨w, head, h3⟩
  convert h_base head ⟨w, 1, h3⟩ rfl ?_
  · simp [base_smul_def]
  · induction w using Word.consRecOn with
    

Proof state:
case mk.h_empty
ι : Type u_1
G : ι → Type u_2
H : Type u_3
K : Type u_4
inst✝⁴ : Monoid K
inst✝³ : (i : ι) → Group (G i)
inst✝² : Group H
φ : (i : ι) → H →* G i
d : Transversal φ
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → DecidableEq (G i)
motive : NormalWord d → Sort ?u.1720143
h_empty : motive empty
h_cons :
  (i : ι) →
    (g : G i) →
      (w : NormalWord d) →
        (hmw : Word.fstIdx w.toWord ≠ some i) →
          g ∈ Transversal.set d i →
            (hgr : g ∉ MonoidHom.range (φ i)) → w.head = 1 → motive w → motive (cons g w hmw hgr)
h_base : (h : H) → (w : NormalWord d) → w.head = 1 → motive w → motive ((base φ) h • w)
head : H
h3 : ∀ (i : ι) (g : G i), { fst := i, snd := g } ∈ Word.empty.toList → g ∈ Transversal.set d i
⊢ motive { toWord := Word.empty, head := 1, normalized := h3 }

Next tactic:
| h_empty => exact h_empty
/-- Induction principle for `NormalWord`, that corresponds closely to inducting on
the underlying list. -/
@[elab_as_elim]
noncomputable def consRecOn {motive : NormalWord d → Sort _} (w : NormalWord d)
    (h_empty : motive empty)
    (h_cons : ∀ (i : ι) (g : G i) (w : NormalWord d) (hmw : w.fstIdx ≠ some i)
      (_hgn : g ∈ d.set i) (hgr : g ∉ (φ i).range) (_hw1 : w.head = 1),
      motive w →  motive (cons g w hmw hgr))
    (h_base : ∀ (h : H) (w : NormalWord d), w.head = 1 → motive w → motive
      (base φ h • w)) : motive w := by
  rcases w with ⟨w, head, h3⟩
  convert h_base head ⟨w, 1, h3⟩ rfl ?_
  · simp [base_smul_def]
  · induction w using Word.consRecOn with
    | h_empty => 

Proof state:
case mk.h_empty
ι : Type u_1
G : ι → Type u_2
H : Type u_3
K : Type u_4
inst✝⁴ : Monoid K
inst✝³ : (i : ι) → Group (G i)
inst✝² : Group H
φ : (i : ι) → H →* G i
d : Transversal φ
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → DecidableEq (G i)
motive : NormalWord d → Sort ?u.1720143
h_empty : motive empty
h_cons :
  (i : ι) →
    (g : G i) →
      (w : NormalWord d) →
        (hmw : Word.fstIdx w.toWord ≠ some i) →
          g ∈ Transversal.set d i →
            (hgr : g ∉ MonoidHom.range (φ i)) → w.head = 1 → motive w → motive (cons g w hmw hgr)
h_base : (h : H) → (w : NormalWord d) → w.head = 1 → motive w → motive ((base φ) h • w)
head : H
h3 : ∀ (i : ι) (g : G i), { fst := i, snd := g } ∈ Word.empty.toList → g ∈ Transversal.set d i
⊢ motive { toWord := Word.empty, head := 1, normalized := h3 }

Next tactic:
exact h_empty
/-- Induction principle for `NormalWord`, that corresponds closely to inducting on
the underlying list. -/
@[elab_as_elim]
noncomputable def consRecOn {motive : NormalWord d → Sort _} (w : NormalWord d)
    (h_empty : motive empty)
    (h_cons : ∀ (i : ι) (g : G i) (w : NormalWord d) (hmw : w.fstIdx ≠ some i)
      (_hgn : g ∈ d.set i) (hgr : g ∉ (φ i).range) (_hw1 : w.head = 1),
      motive w →  motive (cons g w hmw hgr))
    (h_base : ∀ (h : H) (w : NormalWord d), w.head = 1 → motive w → motive
      (base φ h • w)) : motive w := by
  rcases w with ⟨w, head, h3⟩
  convert h_base head ⟨w, 1, h3⟩ rfl ?_
  · simp [base_smul_def]
  · induction w using Word.consRecOn with
    | h_empty => exact h_empty
    

Proof state:
case mk.h_cons
ι : Type u_1
G : ι → Type u_2
H : Type u_3
K : Type u_4
inst✝⁴ : Monoid K
inst✝³ : (i : ι) → Group (G i)
inst✝² : Group H
φ : (i : ι) → H →* G i
d : Transversal φ
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → DecidableEq (G i)
motive : NormalWord d → Sort ?u.1720143
h_empty : motive empty
h_cons :
  (i : ι) →
    (g : G i) →
      (w : NormalWord d) →
        (hmw : Word.fstIdx w.toWord ≠ some i) →
          g ∈ Transversal.set d i →
            (hgr : g ∉ MonoidHom.range (φ i)) → w.head = 1 → motive w → motive (cons g w hmw hgr)
h_base : (h : H) → (w : NormalWord d) → w.head = 1 → motive w → motive ((base φ) h • w)
head : H
i : ι
g : G i
w : Word fun i => G i
h1 : Word.fstIdx w ≠ some i
hg1 : g ≠ 1
ih :
  (h3 : ∀ (i : ι) (g : G i), { fst := i, snd := g } ∈ w.toList → g ∈ Transversal.set d i) →
    motive { toWord := w, head := 1, normalized := h3 }
h3 : ∀ (i_1 : ι) (g_1 : G i_1), { fst := i_1, snd := g_1 } ∈ (Word.cons g w h1 hg1).toList → g_1 ∈ Transversal.set d i_1
⊢ motive { toWord := Word.cons g w h1 hg1, head := 1, normalized := h3 }

Next tactic:
| h_cons i g w h1 hg1 ih =>
      convert h_cons i g ⟨w, 1, fun _ _ h => h3 _ _ (List.mem_cons_of_mem _ h)⟩
        h1 (h3 _ _ (List.mem_cons_self _ _)) ?_ rfl
        (ih ?_)
      · ext
        simp only [Word.cons, Option.mem_def, cons, map_one, mul_one,
          (equiv_snd_eq_self_iff_mem (d.compl i) (one_mem _)).2
          (h3 _ _ (List.mem_cons_self _ _))]
      · apply d.injective i
        simp only [cons, equiv_fst_eq_mul_inv, MonoidHom.apply_ofInjective_symm,
          map_one, mul_one, mul_right_inv, (equiv_snd_eq_self_iff_mem (d.compl i) (one_mem _)).2
          (h3 _ _ (List.mem_cons_self _ _))]
      · rwa [← SetLike.mem_coe,
          ← coe_equiv_snd_eq_one_iff_mem (d.compl i) (d.one_mem _),
          (equiv_snd_eq_self_iff_mem (d.compl i) (one_mem _)).2
          (h3 _ _ (List.mem_cons_self _ _))]
/-- Induction principle for `NormalWord`, that corresponds closely to inducting on
the underlying list. -/
@[elab_as_elim]
noncomputable def consRecOn {motive : NormalWord d → Sort _} (w : NormalWord d)
    (h_empty : motive empty)
    (h_cons : ∀ (i : ι) (g : G i) (w : NormalWord d) (hmw : w.fstIdx ≠ some i)
      (_hgn : g ∈ d.set i) (hgr : g ∉ (φ i).range) (_hw1 : w.head = 1),
      motive w →  motive (cons g w hmw hgr))
    (h_base : ∀ (h : H) (w : NormalWord d), w.head = 1 → motive w → motive
      (base φ h • w)) : motive w := by
  rcases w with ⟨w, head, h3⟩
  convert h_base head ⟨w, 1, h3⟩ rfl ?_
  · simp [base_smul_def]
  · induction w using Word.consRecOn with
    | h_empty => exact h_empty
    | h_cons i g w h1 hg1 ih =>
      

Proof state:
case mk.h_cons
ι : Type u_1
G : ι → Type u_2
H : Type u_3
K : Type u_4
inst✝⁴ : Monoid K
inst✝³ : (i : ι) → Group (G i)
inst✝² : Group H
φ : (i : ι) → H →* G i
d : Transversal φ
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → DecidableEq (G i)
motive : NormalWord d → Sort ?u.1720143
h_empty : motive empty
h_cons :
  (i : ι) →
    (g : G i) →
      (w : NormalWord d) →
        (hmw : Word.fstIdx w.toWord ≠ some i) →
          g ∈ Transversal.set d i →
            (hgr : g ∉ MonoidHom.range (φ i)) → w.head = 1 → motive w → motive (cons g w hmw hgr)
h_base : (h : H) → (w : NormalWord d) → w.head = 1 → motive w → motive ((base φ) h • w)
head : H
i : ι
g : G i
w : Word fun i => G i
h1 : Word.fstIdx w ≠ some i
hg1 : g ≠ 1
ih :
  (h3 : ∀ (i : ι) (g : G i), { fst := i, snd := g } ∈ w.toList → g ∈ Transversal.set d i) →
    motive { toWord := w, head := 1, normalized := h3 }
h3 : ∀ (i_1 : ι) (g_1 : G i_1), { fst := i_1, snd := g_1 } ∈ (Word.cons g w h1 hg1).toList → g_1 ∈ Transversal.set d i_1
⊢ motive { toWord := Word.cons g w h1 hg1, head := 1, normalized := h3 }

Next tactic:
convert h_cons i g ⟨w, 1, fun _ _ h => h3 _ _ (List.mem_cons_of_mem _ h)⟩
        h1 (h3 _ _ (List.mem_cons_self _ _)) ?_ rfl
        (ih ?_)
/-- Induction principle for `NormalWord`, that corresponds closely to inducting on
the underlying list. -/
@[elab_as_elim]
noncomputable def consRecOn {motive : NormalWord d → Sort _} (w : NormalWord d)
    (h_empty : motive empty)
    (h_cons : ∀ (i : ι) (g : G i) (w : NormalWord d) (hmw : w.fstIdx ≠ some i)
      (_hgn : g ∈ d.set i) (hgr : g ∉ (φ i).range) (_hw1 : w.head = 1),
      motive w →  motive (cons g w hmw hgr))
    (h_base : ∀ (h : H) (w : NormalWord d), w.head = 1 → motive w → motive
      (base φ h • w)) : motive w := by
  rcases w with ⟨w, head, h3⟩
  convert h_base head ⟨w, 1, h3⟩ rfl ?_
  · simp [base_smul_def]
  · induction w using Word.consRecOn with
    | h_empty => exact h_empty
    | h_cons i g w h1 hg1 ih =>
      convert h_cons i g ⟨w, 1, fun _ _ h => h3 _ _ (List.mem_cons_of_mem _ h)⟩
        h1 (h3 _ _ (List.mem_cons_self _ _)) ?_ rfl
        (ih ?_)
      · 

Proof state:
case h.e'_1.h.e'_8.h.h
ι : Type u_1
G : ι → Type u_2
H : Type u_3
K : Type u_4
inst✝⁴ : Monoid K
inst✝³ : (i : ι) → Group (G i)
inst✝² : Group H
φ : (i : ι) → H →* G i
d : Transversal φ
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → DecidableEq (G i)
motive : NormalWord d → Sort ?u.1720143
h_empty : motive empty
h_cons :
  (i : ι) →
    (g : G i) →
      (w : NormalWord d) →
        (hmw : Word.fstIdx w.toWord ≠ some i) →
          g ∈ Transversal.set d i →
            (hgr : g ∉ MonoidHom.range (φ i)) → w.head = 1 → motive w → motive (cons g w hmw hgr)
h_base : (h : H) → (w : NormalWord d) → w.head = 1 → motive w → motive ((base φ) h • w)
head : H
i : ι
g : G i
w : Word fun i => G i
h1 : Word.fstIdx w ≠ some i
hg1 : g ≠ 1
ih :
  (h3 : ∀ (i : ι) (g : G i), { fst := i, snd := g } ∈ w.toList → g ∈ Transversal.set d i) →
    motive { toWord := w, head := 1, normalized := h3 }
h3 : ∀ (i_1 : ι) (g_1 : G i_1), { fst := i_1, snd := g_1 } ∈ (Word.cons g w h1 hg1).toList → g_1 ∈ Transversal.set d i_1
⊢ Word.cons g w h1 hg1 =
    (cons g
        { toWord := w, head := 1,
          normalized := (_ : ∀ (x : ι) (x_1 : G x), { fst := x, snd := x_1 } ∈ w.toList → x_1 ∈ Transversal.set d x) }
        h1 ?mk.h_cons).toWord

Next tactic:
ext
/-- Induction principle for `NormalWord`, that corresponds closely to inducting on
the underlying list. -/
@[elab_as_elim]
noncomputable def consRecOn {motive : NormalWord d → Sort _} (w : NormalWord d)
    (h_empty : motive empty)
    (h_cons : ∀ (i : ι) (g : G i) (w : NormalWord d) (hmw : w.fstIdx ≠ some i)
      (_hgn : g ∈ d.set i) (hgr : g ∉ (φ i).range) (_hw1 : w.head = 1),
      motive w →  motive (cons g w hmw hgr))
    (h_base : ∀ (h : H) (w : NormalWord d), w.head = 1 → motive w → motive
      (base φ h • w)) : motive w := by
  rcases w with ⟨w, head, h3⟩
  convert h_base head ⟨w, 1, h3⟩ rfl ?_
  · simp [base_smul_def]
  · induction w using Word.consRecOn with
    | h_empty => exact h_empty
    | h_cons i g w h1 hg1 ih =>
      convert h_cons i g ⟨w, 1, fun _ _ h => h3 _ _ (List.mem_cons_of_mem _ h)⟩
        h1 (h3 _ _ (List.mem_cons_self _ _)) ?_ rfl
        (ih ?_)
      · ext
        

Proof state:
case h.e'_1.h.e'_8.h.h.toList.a.a
ι : Type u_1
G : ι → Type u_2
H : Type u_3
K : Type u_4
inst✝⁴ : Monoid K
inst✝³ : (i : ι) → Group (G i)
inst✝² : Group H
φ : (i : ι) → H →* G i
d : Transversal φ
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → DecidableEq (G i)
motive : NormalWord d → Sort ?u.1720143
h_empty : motive empty
h_cons :
  (i : ι) →
    (g : G i) →
      (w : NormalWord d) →
        (hmw : Word.fstIdx w.toWord ≠ some i) →
          g ∈ Transversal.set d i →
            (hgr : g ∉ MonoidHom.range (φ i)) → w.head = 1 → motive w → motive (cons g w hmw hgr)
h_base : (h : H) → (w : NormalWord d) → w.head = 1 → motive w → motive ((base φ) h • w)
head : H
i : ι
g : G i
w : Word fun i => G i
h1 : Word.fstIdx w ≠ some i
hg1 : g ≠ 1
ih :
  (h3 : ∀ (i : ι) (g : G i), { fst := i, snd := g } ∈ w.toList → g ∈ Transversal.set d i) →
    motive { toWord := w, head := 1, normalized := h3 }
h3 : ∀ (i_1 : ι) (g_1 : G i_1), { fst := i_1, snd := g_1 } ∈ (Word.cons g w h1 hg1).toList → g_1 ∈ Transversal.set d i_1
n✝ : ℕ
a✝ : (i : ι) × G i
⊢ a✝ ∈ get? (Word.cons g w h1 hg1).toList n✝ ↔
    a✝ ∈
      get?
        (cons g
              { toWord := w, head := 1,
                normalized :=
                  (_ : ∀ (x : ι) (x_1 : G x), { fst := x, snd := x_1 } ∈ w.toList → x_1 ∈ Transversal.set d x) }
              h1 ?mk.h_cons).toWord.toList
        n✝

Next tactic:
simp only [Word.cons, Option.mem_def, cons, map_one, mul_one,
          (equiv_snd_eq_self_iff_mem (d.compl i) (one_mem _)).2
          (h3 _ _ (List.mem_cons_self _ _))]
/-- Induction principle for `NormalWord`, that corresponds closely to inducting on
the underlying list. -/
@[elab_as_elim]
noncomputable def consRecOn {motive : NormalWord d → Sort _} (w : NormalWord d)
    (h_empty : motive empty)
    (h_cons : ∀ (i : ι) (g : G i) (w : NormalWord d) (hmw : w.fstIdx ≠ some i)
      (_hgn : g ∈ d.set i) (hgr : g ∉ (φ i).range) (_hw1 : w.head = 1),
      motive w →  motive (cons g w hmw hgr))
    (h_base : ∀ (h : H) (w : NormalWord d), w.head = 1 → motive w → motive
      (base φ h • w)) : motive w := by
  rcases w with ⟨w, head, h3⟩
  convert h_base head ⟨w, 1, h3⟩ rfl ?_
  · simp [base_smul_def]
  · induction w using Word.consRecOn with
    | h_empty => exact h_empty
    | h_cons i g w h1 hg1 ih =>
      convert h_cons i g ⟨w, 1, fun _ _ h => h3 _ _ (List.mem_cons_of_mem _ h)⟩
        h1 (h3 _ _ (List.mem_cons_self _ _)) ?_ rfl
        (ih ?_)
      · ext
        simp only [Word.cons, Option.mem_def, cons, map_one, mul_one,
          (equiv_snd_eq_self_iff_mem (d.compl i) (one_mem _)).2
          (h3 _ _ (List.mem_cons_self _ _))]
      · 

Proof state:
case h.e'_1.h.e'_9
ι : Type u_1
G : ι → Type u_2
H : Type u_3
K : Type u_4
inst✝⁴ : Monoid K
inst✝³ : (i : ι) → Group (G i)
inst✝² : Group H
φ : (i : ι) → H →* G i
d : Transversal φ
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → DecidableEq (G i)
motive : NormalWord d → Sort ?u.1720143
h_empty : motive empty
h_cons :
  (i : ι) →
    (g : G i) →
      (w : NormalWord d) →
        (hmw : Word.fstIdx w.toWord ≠ some i) →
          g ∈ Transversal.set d i →
            (hgr : g ∉ MonoidHom.range (φ i)) → w.head = 1 → motive w → motive (cons g w hmw hgr)
h_base : (h : H) → (w : NormalWord d) → w.head = 1 → motive w → motive ((base φ) h • w)
head : H
i : ι
g : G i
w : Word fun i => G i
h1 : Word.fstIdx w ≠ some i
hg1 : g ≠ 1
ih :
  (h3 : ∀ (i : ι) (g : G i), { fst := i, snd := g } ∈ w.toList → g ∈ Transversal.set d i) →
    motive { toWord := w, head := 1, normalized := h3 }
h3 : ∀ (i_1 : ι) (g_1 : G i_1), { fst := i_1, snd := g_1 } ∈ (Word.cons g w h1 hg1).toList → g_1 ∈ Transversal.set d i_1
⊢ 1 =
    (cons g
        { toWord := w, head := 1,
          normalized := (_ : ∀ (x : ι) (x_1 : G x), { fst := x, snd := x_1 } ∈ w.toList → x_1 ∈ Transversal.set d x) }
        h1 ?mk.h_cons).head

Next tactic:
apply d.injective i