l3lab/ntp-mathlib huggingface dataset:
theorem rcons_injective {i : ι} : Function.Injective (rcons (d := d) i) := by
  rintro ⟨⟨head₁, tail₁⟩, _⟩ ⟨⟨head₂, tail₂⟩, _⟩
  simp only [rcons, NormalWord.mk.injEq, EmbeddingLike.apply_eq_iff_eq,
    Word.Pair.mk.injEq, Pair.mk.injEq, and_imp]
  intro h₁ h₂ h₃
  

Proof state:
case mk.mk.mk.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)
i : ι
head₁ : G i
tail₁ : Word fun i => G i
fstIdx_ne✝¹ : Word.fstIdx tail₁ ≠ some i
normalized✝¹ :
  ∀ (i_1 : ι) (g : G i_1),
    { fst := i_1, snd := g } ∈ { head := head₁, tail := tail₁, fstIdx_ne := fstIdx_ne✝¹ }.tail.toList →
      g ∈ Transversal.set d i_1
head₂ : G i
tail₂ : Word fun i => G i
fstIdx_ne✝ : Word.fstIdx tail₂ ≠ some i
normalized✝ :
  ∀ (i_1 : ι) (g : G i_1),
    { fst := i_1, snd := g } ∈ { head := head₂, tail := tail₂, fstIdx_ne := fstIdx_ne✝ }.tail.toList →
      g ∈ Transversal.set d i_1
h₁ :
  ↑((equiv (_ : IsComplement (↑(MonoidHom.range (φ i))) (Transversal.set d i))) head₁).2 =
    ↑((equiv (_ : IsComplement (↑(MonoidHom.range (φ i))) (Transversal.set d i))) head₂).2
h₂ : tail₁ = tail₂
h₃ :
  ((equiv (_ : IsComplement (↑(MonoidHom.range (φ i))) (Transversal.set d i))) head₁).1 =
    ((equiv (_ : IsComplement (↑(MonoidHom.range (φ i))) (Transversal.set d i))) head₂).1
⊢ head₁ = head₂ ∧ tail₁ = tail₂

Next tactic:
subst h₂
theorem rcons_injective {i : ι} : Function.Injective (rcons (d := d) i) := by
  rintro ⟨⟨head₁, tail₁⟩, _⟩ ⟨⟨head₂, tail₂⟩, _⟩
  simp only [rcons, NormalWord.mk.injEq, EmbeddingLike.apply_eq_iff_eq,
    Word.Pair.mk.injEq, Pair.mk.injEq, and_imp]
  intro h₁ h₂ h₃
  subst h₂
  

Proof state:
case mk.mk.mk.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)
i : ι
head₁ : G i
tail₁ : Word fun i => G i
fstIdx_ne✝¹ : Word.fstIdx tail₁ ≠ some i
normalized✝¹ :
  ∀ (i_1 : ι) (g : G i_1),
    { fst := i_1, snd := g } ∈ { head := head₁, tail := tail₁, fstIdx_ne := fstIdx_ne✝¹ }.tail.toList →
      g ∈ Transversal.set d i_1
head₂ : G i
h₁ :
  ↑((equiv (_ : IsComplement (↑(MonoidHom.range (φ i))) (Transversal.set d i))) head₁).2 =
    ↑((equiv (_ : IsComplement (↑(MonoidHom.range (φ i))) (Transversal.set d i))) head₂).2
h₃ :
  ((equiv (_ : IsComplement (↑(MonoidHom.range (φ i))) (Transversal.set d i))) head₁).1 =
    ((equiv (_ : IsComplement (↑(MonoidHom.range (φ i))) (Transversal.set d i))) head₂).1
fstIdx_ne✝ : Word.fstIdx tail₁ ≠ some i
normalized✝ :
  ∀ (i_1 : ι) (g : G i_1),
    { fst := i_1, snd := g } ∈ { head := head₂, tail := tail₁, fstIdx_ne := fstIdx_ne✝ }.tail.toList →
      g ∈ Transversal.set d i_1
⊢ head₁ = head₂ ∧ tail₁ = tail₁

Next tactic:
rw [← equiv_fst_mul_equiv_snd (d.compl i) head₁,
      ← equiv_fst_mul_equiv_snd (d.compl i) head₂,
    h₁, h₃]
theorem rcons_injective {i : ι} : Function.Injective (rcons (d := d) i) := by
  rintro ⟨⟨head₁, tail₁⟩, _⟩ ⟨⟨head₂, tail₂⟩, _⟩
  simp only [rcons, NormalWord.mk.injEq, EmbeddingLike.apply_eq_iff_eq,
    Word.Pair.mk.injEq, Pair.mk.injEq, and_imp]
  intro h₁ h₂ h₃
  subst h₂
  rw [← equiv_fst_mul_equiv_snd (d.compl i) head₁,
      ← equiv_fst_mul_equiv_snd (d.compl i) head₂,
    h₁, h₃]
  

Proof state:
case mk.mk.mk.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)
i : ι
head₁ : G i
tail₁ : Word fun i => G i
fstIdx_ne✝¹ : Word.fstIdx tail₁ ≠ some i
normalized✝¹ :
  ∀ (i_1 : ι) (g : G i_1),
    { fst := i_1, snd := g } ∈ { head := head₁, tail := tail₁, fstIdx_ne := fstIdx_ne✝¹ }.tail.toList →
      g ∈ Transversal.set d i_1
head₂ : G i
h₁ :
  ↑((equiv (_ : IsComplement (↑(MonoidHom.range (φ i))) (Transversal.set d i))) head₁).2 =
    ↑((equiv (_ : IsComplement (↑(MonoidHom.range (φ i))) (Transversal.set d i))) head₂).2
h₃ :
  ((equiv (_ : IsComplement (↑(MonoidHom.range (φ i))) (Transversal.set d i))) head₁).1 =
    ((equiv (_ : IsComplement (↑(MonoidHom.range (φ i))) (Transversal.set d i))) head₂).1
fstIdx_ne✝ : Word.fstIdx tail₁ ≠ some i
normalized✝ :
  ∀ (i_1 : ι) (g : G i_1),
    { fst := i_1, snd := g } ∈ { head := head₂, tail := tail₁, fstIdx_ne := fstIdx_ne✝ }.tail.toList →
      g ∈ Transversal.set d i_1
⊢ ↑((equiv (_ : IsComplement (↑(MonoidHom.range (φ i))) (Transversal.set d i))) head₂).1 *
        ↑((equiv (_ : IsComplement (↑(MonoidHom.range (φ i))) (Transversal.set d i))) head₂).2 =
      ↑((equiv (_ : IsComplement (↑(MonoidHom.range (φ i))) (Transversal.set d i))) head₂).1 *
        ↑((equiv (_ : IsComplement (↑(MonoidHom.range (φ i))) (Transversal.set d i))) head₂).2 ∧
    tail₁ = tail₁

Next tactic:
simp
/-- The equivalence between `NormalWord`s and pairs. We can turn a `NormalWord` into a
pair by taking the head of the `List` if it is in `G i` and multiplying it by the element of the
base group. -/
noncomputable def equivPair (i) : NormalWord d ≃ Pair d i :=
  letI toFun : NormalWord d → Pair d i :=
    fun w =>
      letI p := Word.equivPair i (CoprodI.of (φ i w.head) • w.toWord)
      { toPair := p
        normalized := fun j g hg => 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 : ι
w : NormalWord d
p : Word.Pair (fun i => G i) i := (Word.equivPair i) (CoprodI.of ((φ i) w.head) • w.toWord)
j : ι
g : G j
hg : { fst := j, snd := g } ∈ p.tail.toList
⊢ g ∈ Transversal.set d j

Next tactic:
dsimp only at hg
/-- The equivalence between `NormalWord`s and pairs. We can turn a `NormalWord` into a
pair by taking the head of the `List` if it is in `G i` and multiplying it by the element of the
base group. -/
noncomputable def equivPair (i) : NormalWord d ≃ Pair d i :=
  letI toFun : NormalWord d → Pair d i :=
    fun w =>
      letI p := Word.equivPair i (CoprodI.of (φ i w.head) • w.toWord)
      { toPair := p
        normalized := fun j g hg => by
          dsimp only at hg
          

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 : ι
w : NormalWord d
p : Word.Pair (fun i => G i) i := (Word.equivPair i) (CoprodI.of ((φ i) w.head) • w.toWord)
j : ι
g : G j
hg : { fst := j, snd := g } ∈ ((Word.equivPair i) (CoprodI.of ((φ i) w.head) • w.toWord)).tail.toList
⊢ g ∈ Transversal.set d j

Next tactic:
rw [Word.of_smul_def, ← Word.equivPair_symm, Equiv.apply_symm_apply] at hg
/-- The equivalence between `NormalWord`s and pairs. We can turn a `NormalWord` into a
pair by taking the head of the `List` if it is in `G i` and multiplying it by the element of the
base group. -/
noncomputable def equivPair (i) : NormalWord d ≃ Pair d i :=
  letI toFun : NormalWord d → Pair d i :=
    fun w =>
      letI p := Word.equivPair i (CoprodI.of (φ i w.head) • w.toWord)
      { toPair := p
        normalized := fun j g hg => by
          dsimp only at hg
          rw [Word.of_smul_def, ← Word.equivPair_symm, Equiv.apply_symm_apply] at hg
          

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 : ι
w : NormalWord d
p : Word.Pair (fun i => G i) i := (Word.equivPair i) (CoprodI.of ((φ i) w.head) • w.toWord)
j : ι
g : G j
hg :
  { fst := j, snd := g } ∈
    (let src := (Word.equivPair i) w.toWord;
        { head := (φ i) w.head * ((Word.equivPair i) w.toWord).head, tail := src.tail,
          fstIdx_ne := (_ : Word.fstIdx src.tail ≠ some i) }).tail.toList
⊢ g ∈ Transversal.set d j

Next tactic:
dsimp at hg
/-- The equivalence between `NormalWord`s and pairs. We can turn a `NormalWord` into a
pair by taking the head of the `List` if it is in `G i` and multiplying it by the element of the
base group. -/
noncomputable def equivPair (i) : NormalWord d ≃ Pair d i :=
  letI toFun : NormalWord d → Pair d i :=
    fun w =>
      letI p := Word.equivPair i (CoprodI.of (φ i w.head) • w.toWord)
      { toPair := p
        normalized := fun j g hg => by
          dsimp only at hg
          rw [Word.of_smul_def, ← Word.equivPair_symm, Equiv.apply_symm_apply] at hg
          dsimp at hg
          

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 : ι
w : NormalWord d
p : Word.Pair (fun i => G i) i := (Word.equivPair i) (CoprodI.of ((φ i) w.head) • w.toWord)
j : ι
g : G j
hg : { fst := j, snd := g } ∈ ((Word.equivPair i) w.toWord).tail.toList
⊢ g ∈ Transversal.set d j

Next tactic:
exact w.normalized _ _ (Word.mem_of_mem_equivPair_tail _ hg)
/-- The equivalence between `NormalWord`s and pairs. We can turn a `NormalWord` into a
pair by taking the head of the `List` if it is in `G i` and multiplying it by the element of the
base group. -/
noncomputable def equivPair (i) : NormalWord d ≃ Pair d i :=
  letI toFun : NormalWord d → Pair d i :=
    fun w =>
      letI p := Word.equivPair i (CoprodI.of (φ i w.head) • w.toWord)
      { toPair := p
        normalized := fun j g hg => by
          dsimp only at hg
          rw [Word.of_smul_def, ← Word.equivPair_symm, Equiv.apply_symm_apply] at hg
          dsimp at hg
          exact w.normalized _ _ (Word.mem_of_mem_equivPair_tail _ hg) }
  haveI leftInv : Function.LeftInverse (rcons i) toFun :=
    fun w => ext_smul i <| 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 : ι
toFun : NormalWord d → Pair d i :=
  fun w =>
    { toPair := (Word.equivPair i) (CoprodI.of ((φ i) w.head) • w.toWord),
      normalized :=
        (_ :
          ∀ (j : ι) (g : G j),
            { fst := j, snd := g } ∈ ((Word.equivPair i) (CoprodI.of ((φ i) w.head) • w.toWord)).tail.toList →
              g ∈ Transversal.set d j) }
w : NormalWord d
⊢ CoprodI.of ((φ i) (rcons i (toFun w)).head) • (rcons i (toFun w)).toWord = CoprodI.of ((φ i) w.head) • w.toWord

Next tactic:
simp only [rcons, Word.equivPair_symm,
        Word.equivPair_smul_same, Word.equivPair_tail_eq_inv_smul, Word.rcons_eq_smul,
        MonoidHom.apply_ofInjective_symm, equiv_fst_eq_mul_inv, mul_assoc, map_mul, map_inv,
        mul_smul, inv_smul_smul, smul_inv_smul]
noncomputable instance summandAction (i : ι) : MulAction (G i) (NormalWord d) :=
  { smul := fun g w => (equivPair i).symm
      { equivPair i w with
        head := g * (equivPair i w).head }
    one_smul := fun _ => 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 : ι
x✝ : NormalWord d
⊢ 1 • x✝ = x✝

Next tactic:
dsimp [instHSMul]
noncomputable instance summandAction (i : ι) : MulAction (G i) (NormalWord d) :=
  { smul := fun g w => (equivPair i).symm
      { equivPair i w with
        head := g * (equivPair i w).head }
    one_smul := fun _ => by
      dsimp [instHSMul]
      

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 : ι
x✝ : NormalWord d
⊢ (equivPair i).symm
      {
        toPair :=
          { head := 1 * ((equivPair i) x✝).head, tail := ((equivPair i) x✝).tail,
            fstIdx_ne := (_ : Word.fstIdx ((equivPair i) x✝).tail ≠ some i) },
        normalized :=
          (_ :
            ∀ (i_1 : ι) (g : G i_1),
              { fst := i_1, snd := g } ∈ ((equivPair i) x✝).tail.toList → g ∈ Transversal.set d i_1) } =
    x✝

Next tactic:
rw [one_mul]
noncomputable instance summandAction (i : ι) : MulAction (G i) (NormalWord d) :=
  { smul := fun g w => (equivPair i).symm
      { equivPair i w with
        head := g * (equivPair i w).head }
    one_smul := fun _ => by
      dsimp [instHSMul]
      rw [one_mul]
      

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 : ι
x✝ : NormalWord d
⊢ (equivPair i).symm
      {
        toPair :=
          { head := ((equivPair i) x✝).head, tail := ((equivPair i) x✝).tail,
            fstIdx_ne := (_ : Word.fstIdx ((equivPair i) x✝).tail ≠ some i) },
        normalized :=
          (_ :
            ∀ (i_1 : ι) (g : G i_1),
              { fst := i_1, snd := g } ∈ ((equivPair i) x✝).tail.toList → g ∈ Transversal.set d i_1) } =
    x✝

Next tactic:
exact (equivPair i).symm_apply_apply _
noncomputable instance summandAction (i : ι) : MulAction (G i) (NormalWord d) :=
  { smul := fun g w => (equivPair i).symm
      { equivPair i w with
        head := g * (equivPair i w).head }
    one_smul := fun _ => by
      dsimp [instHSMul]
      rw [one_mul]
      exact (equivPair i).symm_apply_apply _
    mul_smul := fun _ _ _ => 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 : ι
x✝² x✝¹ : G i
x✝ : NormalWord d
⊢ (x✝² * x✝¹) • x✝ = x✝² • x✝¹ • x✝

Next tactic:
dsimp [instHSMul]
instance baseAction : MulAction H (NormalWord d) :=
  { smul := fun h w => { w with head := h * w.head },
    one_smul := 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)
⊢ ∀ (b : NormalWord d), 1 • b = b

Next tactic:
simp [instHSMul]
instance baseAction : MulAction H (NormalWord d) :=
  { smul := fun h w => { w with head := h * w.head },
    one_smul := by simp [instHSMul]
    mul_smul := 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)
⊢ ∀ (x y : H) (b : NormalWord d), (x * y) • b = x • y • b

Next tactic:
simp [instHSMul, mul_assoc]
noncomputable instance mulAction [DecidableEq ι] [∀ i, DecidableEq (G i)] :
    MulAction (PushoutI φ) (NormalWord d) :=
  MulAction.ofEndHom <|
    lift
      (fun i => MulAction.toEndHom)
      MulAction.toEndHom <| 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)
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → DecidableEq (G i)
⊢ ∀ (i : ι), MonoidHom.comp ((fun i => MulAction.toEndHom) i) (φ i) = MulAction.toEndHom

Next tactic:
intro i
noncomputable instance mulAction [DecidableEq ι] [∀ i, DecidableEq (G i)] :
    MulAction (PushoutI φ) (NormalWord d) :=
  MulAction.ofEndHom <|
    lift
      (fun i => MulAction.toEndHom)
      MulAction.toEndHom <| by
    intro i
    

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)
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → DecidableEq (G i)
i : ι
⊢ MonoidHom.comp ((fun i => MulAction.toEndHom) i) (φ i) = MulAction.toEndHom

Next tactic:
simp only [MulAction.toEndHom, FunLike.ext_iff, MonoidHom.coe_comp, MonoidHom.coe_mk,
      OneHom.coe_mk, comp_apply]
noncomputable instance mulAction [DecidableEq ι] [∀ i, DecidableEq (G i)] :
    MulAction (PushoutI φ) (NormalWord d) :=
  MulAction.ofEndHom <|
    lift
      (fun i => MulAction.toEndHom)
      MulAction.toEndHom <| by
    intro i
    simp only [MulAction.toEndHom, FunLike.ext_iff, MonoidHom.coe_comp, MonoidHom.coe_mk,
      OneHom.coe_mk, comp_apply]
    

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)
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → DecidableEq (G i)
i : ι
⊢ ∀ (x : H), (fun x_1 => (φ i) x • x_1) = fun x_1 => x • x_1

Next tactic:
intro h
noncomputable instance mulAction [DecidableEq ι] [∀ i, DecidableEq (G i)] :
    MulAction (PushoutI φ) (NormalWord d) :=
  MulAction.ofEndHom <|
    lift
      (fun i => MulAction.toEndHom)
      MulAction.toEndHom <| by
    intro i
    simp only [MulAction.toEndHom, FunLike.ext_iff, MonoidHom.coe_comp, MonoidHom.coe_mk,
      OneHom.coe_mk, comp_apply]
    intro h
    

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)
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → DecidableEq (G i)
i : ι
h : H
⊢ (fun x => (φ i) h • x) = fun x => h • x

Next tactic:
funext w
noncomputable instance mulAction [DecidableEq ι] [∀ i, DecidableEq (G i)] :
    MulAction (PushoutI φ) (NormalWord d) :=
  MulAction.ofEndHom <|
    lift
      (fun i => MulAction.toEndHom)
      MulAction.toEndHom <| by
    intro i
    simp only [MulAction.toEndHom, FunLike.ext_iff, MonoidHom.coe_comp, MonoidHom.coe_mk,
      OneHom.coe_mk, comp_apply]
    intro h
    funext w
    

Proof state:
case 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)
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → DecidableEq (G i)
i : ι
h : H
w : NormalWord d
⊢ (φ i) h • w = h • w

Next tactic:
apply NormalWord.ext_smul i
noncomputable instance mulAction [DecidableEq ι] [∀ i, DecidableEq (G i)] :
    MulAction (PushoutI φ) (NormalWord d) :=
  MulAction.ofEndHom <|
    lift
      (fun i => MulAction.toEndHom)
      MulAction.toEndHom <| by
    intro i
    simp only [MulAction.toEndHom, FunLike.ext_iff, MonoidHom.coe_comp, MonoidHom.coe_mk,
      OneHom.coe_mk, comp_apply]
    intro h
    funext w
    apply NormalWord.ext_smul i
    

Proof state:
case 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)
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → DecidableEq (G i)
i : ι
h : H
w : NormalWord d
⊢ CoprodI.of ((φ i) ((φ i) h • w).head) • ((φ i) h • w).toWord = CoprodI.of ((φ i) (h • w).head) • (h • w).toWord

Next tactic:
simp only [summand_smul_def', equivPair, rcons, Word.equivPair_symm, Equiv.coe_fn_mk,
      Equiv.coe_fn_symm_mk, Word.equivPair_smul_same, Word.equivPair_tail_eq_inv_smul,
      Word.rcons_eq_smul, equiv_fst_eq_mul_inv, map_mul, map_inv, mul_smul, inv_smul_smul,
      smul_inv_smul, base_smul_def', MonoidHom.apply_ofInjective_symm]
theorem base_smul_def (h : H) (w : NormalWord d) :
    base φ h • w = { w with head := h * w.head } := 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 =
    { toWord := w.toWord, head := h * w.head,
      normalized := (_ : ∀ (i : ι) (g : G i), { fst := i, snd := g } ∈ w.toList → g ∈ Transversal.set d i) }

Next tactic:
dsimp [NormalWord.mulAction, instHSMul, SMul.smul]
theorem base_smul_def (h : H) (w : NormalWord d) :
    base φ h • w = { w with head := h * w.head } := by
  dsimp [NormalWord.mulAction, instHSMul, SMul.smul]
  

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
⊢ (lift (fun i => MulAction.toEndHom) MulAction.toEndHom
        (_ : ∀ (i : ι), MonoidHom.comp ((fun i => MulAction.toEndHom) i) (φ i) = MulAction.toEndHom))
      ((base φ) h) w =
    { toWord := w.toWord, head := h * w.head,
      normalized := (_ : ∀ (i : ι) (g : G i), { fst := i, snd := g } ∈ w.toList → g ∈ Transversal.set d i) }

Next tactic:
rw [lift_base]
theorem base_smul_def (h : H) (w : NormalWord d) :
    base φ h • w = { w with head := h * w.head } := by
  dsimp [NormalWord.mulAction, instHSMul, SMul.smul]
  rw [lift_base]
  

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
⊢ MulAction.toEndHom h w =
    { toWord := w.toWord, head := h * w.head,
      normalized := (_ : ∀ (i : ι) (g : G i), { fst := i, snd := g } ∈ w.toList → g ∈ Transversal.set d i) }

Next tactic:
rfl
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
  

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 =
    (equivPair i).symm
      (let src := (equivPair i) w;
      {
        toPair :=
          { head := g * ((equivPair i) w).head, tail := src.tail, fstIdx_ne := (_ : Word.fstIdx src.tail ≠ some i) },
        normalized :=
          (_ : ∀ (i_1 : ι) (g : G i_1), { fst := i_1, snd := g } ∈ src.tail.toList → g ∈ Transversal.set d i_1) })

Next tactic:
dsimp [NormalWord.mulAction, instHSMul, SMul.smul]
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]
  

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
⊢ (lift (fun i => MulAction.toEndHom) MulAction.toEndHom
        (_ : ∀ (i : ι), MonoidHom.comp ((fun i => MulAction.toEndHom) i) (φ i) = MulAction.toEndHom))
      ((of i) 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:
rw [lift_of]