l3lab/ntp-mathlib huggingface dataset:
theorem unitsSMul_one_group_smul (g : A) (w : NormalWord d) :
    unitsSMul φ 1 ((g : G) • w) = (φ g : G) • (unitsSMul φ 1 w) := by
  unfold unitsSMul
  have : Cancels 1 ((g : G) • w) ↔ Cancels 1 w := by
    simp [Cancels, Subgroup.mul_mem_cancel_left]
  by_cases hcan : Cancels 1 w
  · simp [unitsSMulWithCancel, dif_pos (this.2 hcan), dif_pos hcan]
    cases w using consRecOn
    · simp [Cancels] at hcan
    · simp only [smul_cons, consRecOn_cons, mul_smul]
      rw [← mul_smul, ← Subgroup.coe_mul, ← map_mul φ]
      rfl
  · rw [dif_neg (mt this.1 hcan), dif_neg hcan]
    

Proof state:
case neg
G : Type u_1
inst✝³ : Group G
A B : Subgroup G
φ : ↥A ≃* ↥B
H : Type u_2
inst✝² : Group H
M : Type u_3
inst✝¹ : Monoid M
d : TransversalPair G A B
inst✝ : DecidableEq G
g : ↥A
w : NormalWord d
this : Cancels 1 (↑g • w) ↔ Cancels 1 w
hcan : ¬Cancels 1 w
⊢ (let g' := unitsSMulGroup φ d 1 (↑g • w).head;
    cons (↑g'.1) 1 ((↑g'.2 * (↑g • w).head⁻¹) • ↑g • w)
      (_ : ↑(unitsSMulGroup φ d 1 (↑g • w).head).2 * (↑g • w).head⁻¹ * (↑g • w).head ∈ TransversalPair.set d 1)
      (_ :
        ∀
          u' ∈
            Option.map Prod.fst
              (List.head? ((↑(unitsSMulGroup φ d 1 (↑g • w).head).2 * (↑g • w).head⁻¹) • ↑g • w).toList),
          ((↑(unitsSMulGroup φ d 1 (↑g • w).head).2 * (↑g • w).head⁻¹) • ↑g • w).head ∈ toSubgroup A B 1 → 1 = u')) =
    ↑(φ g) •
      let g' := unitsSMulGroup φ d 1 w.head;
      cons (↑g'.1) 1 ((↑g'.2 * w.head⁻¹) • w)
        (_ : ↑(unitsSMulGroup φ d 1 w.head).2 * w.head⁻¹ * w.head ∈ TransversalPair.set d 1)
        (_ :
          ∀ u' ∈ Option.map Prod.fst (List.head? ((↑(unitsSMulGroup φ d 1 w.head).2 * w.head⁻¹) • w).toList),
            ((↑(unitsSMulGroup φ d 1 w.head).2 * w.head⁻¹) • w).head ∈ toSubgroup A B 1 → 1 = u')

Next tactic:
simp [← mul_smul, mul_assoc, unitsSMulGroup]
theorem unitsSMul_one_group_smul (g : A) (w : NormalWord d) :
    unitsSMul φ 1 ((g : G) • w) = (φ g : G) • (unitsSMul φ 1 w) := by
  unfold unitsSMul
  have : Cancels 1 ((g : G) • w) ↔ Cancels 1 w := by
    simp [Cancels, Subgroup.mul_mem_cancel_left]
  by_cases hcan : Cancels 1 w
  · simp [unitsSMulWithCancel, dif_pos (this.2 hcan), dif_pos hcan]
    cases w using consRecOn
    · simp [Cancels] at hcan
    · simp only [smul_cons, consRecOn_cons, mul_smul]
      rw [← mul_smul, ← Subgroup.coe_mul, ← map_mul φ]
      rfl
  · rw [dif_neg (mt this.1 hcan), dif_neg hcan]
    simp [← mul_smul, mul_assoc, unitsSMulGroup]
    -- This used to be the end of the proof before leanprover/lean4#2644
    

Proof state:
case neg
G : Type u_1
inst✝³ : Group G
A B : Subgroup G
φ : ↥A ≃* ↥B
H : Type u_2
inst✝² : Group H
M : Type u_3
inst✝¹ : Monoid M
d : TransversalPair G A B
inst✝ : DecidableEq G
g : ↥A
w : NormalWord d
this : Cancels 1 (↑g • w) ↔ Cancels 1 w
hcan : ¬Cancels 1 w
⊢ cons (↑(φ ((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1))) (↑g * w.head)).1))
      1
      ((↑((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1))) (↑g * w.head)).2 *
          w.head⁻¹) •
        w)
      (_ :
        ((↑((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1))) (↑g * w.head)).2 *
                w.head⁻¹) •
              w).head ∈
          TransversalPair.set d 1)
      (_ :
        ∀
          u' ∈
            Option.map Prod.fst
              (List.head?
                ((↑((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1)))
                            (↑g * w.head)).2 *
                      w.head⁻¹) •
                    w).toList),
          ((↑((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1))) (↑g * w.head)).2 *
                    w.head⁻¹) •
                  w).head ∈
              toSubgroup A B 1 →
            1 = u') =
    cons
      (↑(φ g) * ↑(φ ((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1))) w.head).1))
      1
      ((↑((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1))) w.head).2 *
          w.head⁻¹) •
        w)
      (_ :
        ((↑((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1))) w.head).2 *
                w.head⁻¹) •
              w).head ∈
          TransversalPair.set d 1)
      (_ :
        ∀
          u' ∈
            Option.map Prod.fst
              (List.head?
                ((↑((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1))) w.head).2 *
                      w.head⁻¹) •
                    w).toList),
          ((↑((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1))) w.head).2 *
                    w.head⁻¹) •
                  w).head ∈
              toSubgroup A B 1 →
            1 = u')

Next tactic:
dsimp
theorem unitsSMul_one_group_smul (g : A) (w : NormalWord d) :
    unitsSMul φ 1 ((g : G) • w) = (φ g : G) • (unitsSMul φ 1 w) := by
  unfold unitsSMul
  have : Cancels 1 ((g : G) • w) ↔ Cancels 1 w := by
    simp [Cancels, Subgroup.mul_mem_cancel_left]
  by_cases hcan : Cancels 1 w
  · simp [unitsSMulWithCancel, dif_pos (this.2 hcan), dif_pos hcan]
    cases w using consRecOn
    · simp [Cancels] at hcan
    · simp only [smul_cons, consRecOn_cons, mul_smul]
      rw [← mul_smul, ← Subgroup.coe_mul, ← map_mul φ]
      rfl
  · rw [dif_neg (mt this.1 hcan), dif_neg hcan]
    simp [← mul_smul, mul_assoc, unitsSMulGroup]
    -- This used to be the end of the proof before leanprover/lean4#2644
    dsimp
    

Proof state:
case neg
G : Type u_1
inst✝³ : Group G
A B : Subgroup G
φ : ↥A ≃* ↥B
H : Type u_2
inst✝² : Group H
M : Type u_3
inst✝¹ : Monoid M
d : TransversalPair G A B
inst✝ : DecidableEq G
g : ↥A
w : NormalWord d
this : Cancels 1 (↑g • w) ↔ Cancels 1 w
hcan : ¬Cancels 1 w
⊢ cons (↑(φ ((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1))) (↑g * w.head)).1))
      1
      ((↑((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1))) (↑g * w.head)).2 *
          w.head⁻¹) •
        w)
      (_ :
        ((↑((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1))) (↑g * w.head)).2 *
                w.head⁻¹) •
              w).head ∈
          TransversalPair.set d 1)
      (_ :
        ∀
          u' ∈
            Option.map Prod.fst
              (List.head?
                ((↑((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1)))
                            (↑g * w.head)).2 *
                      w.head⁻¹) •
                    w).toList),
          ((↑((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1))) (↑g * w.head)).2 *
                    w.head⁻¹) •
                  w).head ∈
              A →
            1 = u') =
    cons
      (↑(φ g) * ↑(φ ((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1))) w.head).1))
      1
      ((↑((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1))) w.head).2 *
          w.head⁻¹) •
        w)
      (_ : ↑(unitsSMulGroup φ d 1 w.head).2 * w.head⁻¹ * w.head ∈ TransversalPair.set d 1)
      (_ :
        ∀ u' ∈ Option.map Prod.fst (List.head? ((↑(unitsSMulGroup φ d 1 w.head).2 * w.head⁻¹) • w).toList),
          ((↑(unitsSMulGroup φ d 1 w.head).2 * w.head⁻¹) • w).head ∈ toSubgroup A B 1 → 1 = u')

Next tactic:
congr 1
theorem unitsSMul_one_group_smul (g : A) (w : NormalWord d) :
    unitsSMul φ 1 ((g : G) • w) = (φ g : G) • (unitsSMul φ 1 w) := by
  unfold unitsSMul
  have : Cancels 1 ((g : G) • w) ↔ Cancels 1 w := by
    simp [Cancels, Subgroup.mul_mem_cancel_left]
  by_cases hcan : Cancels 1 w
  · simp [unitsSMulWithCancel, dif_pos (this.2 hcan), dif_pos hcan]
    cases w using consRecOn
    · simp [Cancels] at hcan
    · simp only [smul_cons, consRecOn_cons, mul_smul]
      rw [← mul_smul, ← Subgroup.coe_mul, ← map_mul φ]
      rfl
  · rw [dif_neg (mt this.1 hcan), dif_neg hcan]
    simp [← mul_smul, mul_assoc, unitsSMulGroup]
    -- This used to be the end of the proof before leanprover/lean4#2644
    dsimp
    congr 1
    

Proof state:
case neg.e_g
G : Type u_1
inst✝³ : Group G
A B : Subgroup G
φ : ↥A ≃* ↥B
H : Type u_2
inst✝² : Group H
M : Type u_3
inst✝¹ : Monoid M
d : TransversalPair G A B
inst✝ : DecidableEq G
g : ↥A
w : NormalWord d
this : Cancels 1 (↑g • w) ↔ Cancels 1 w
hcan : ¬Cancels 1 w
⊢ ↑(φ ((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1))) (↑g * w.head)).1) =
    ↑(φ g) * ↑(φ ((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1))) w.head).1)
case neg.e_w
G : Type u_1
inst✝³ : Group G
A B : Subgroup G
φ : ↥A ≃* ↥B
H : Type u_2
inst✝² : Group H
M : Type u_3
inst✝¹ : Monoid M
d : TransversalPair G A B
inst✝ : DecidableEq G
g : ↥A
w : NormalWord d
this : Cancels 1 (↑g • w) ↔ Cancels 1 w
hcan : ¬Cancels 1 w
⊢ (↑((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1))) (↑g * w.head)).2 *
        w.head⁻¹) •
      w =
    (↑((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1))) w.head).2 * w.head⁻¹) • w

Next tactic:
conv_lhs => erw [IsComplement.equiv_mul_left]
theorem unitsSMul_one_group_smul (g : A) (w : NormalWord d) :
    unitsSMul φ 1 ((g : G) • w) = (φ g : G) • (unitsSMul φ 1 w) := by
  unfold unitsSMul
  have : Cancels 1 ((g : G) • w) ↔ Cancels 1 w := by
    simp [Cancels, Subgroup.mul_mem_cancel_left]
  by_cases hcan : Cancels 1 w
  · simp [unitsSMulWithCancel, dif_pos (this.2 hcan), dif_pos hcan]
    cases w using consRecOn
    · simp [Cancels] at hcan
    · simp only [smul_cons, consRecOn_cons, mul_smul]
      rw [← mul_smul, ← Subgroup.coe_mul, ← map_mul φ]
      rfl
  · rw [dif_neg (mt this.1 hcan), dif_neg hcan]
    simp [← mul_smul, mul_assoc, unitsSMulGroup]
    -- This used to be the end of the proof before leanprover/lean4#2644
    dsimp
    congr 1
    conv_lhs => 

Proof state:
G : Type u_1
inst✝³ : Group G
A B : Subgroup G
φ : ↥A ≃* ↥B
H : Type u_2
inst✝² : Group H
M : Type u_3
inst✝¹ : Monoid M
d : TransversalPair G A B
inst✝ : DecidableEq G
g : ↥A
w : NormalWord d
this : Cancels 1 (↑g • w) ↔ Cancels 1 w
hcan : ¬Cancels 1 w
| ↑(φ ((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1))) (↑g * w.head)).1)

Next tactic:
erw [IsComplement.equiv_mul_left]
theorem unitsSMul_one_group_smul (g : A) (w : NormalWord d) :
    unitsSMul φ 1 ((g : G) • w) = (φ g : G) • (unitsSMul φ 1 w) := by
  unfold unitsSMul
  have : Cancels 1 ((g : G) • w) ↔ Cancels 1 w := by
    simp [Cancels, Subgroup.mul_mem_cancel_left]
  by_cases hcan : Cancels 1 w
  · simp [unitsSMulWithCancel, dif_pos (this.2 hcan), dif_pos hcan]
    cases w using consRecOn
    · simp [Cancels] at hcan
    · simp only [smul_cons, consRecOn_cons, mul_smul]
      rw [← mul_smul, ← Subgroup.coe_mul, ← map_mul φ]
      rfl
  · rw [dif_neg (mt this.1 hcan), dif_neg hcan]
    simp [← mul_smul, mul_assoc, unitsSMulGroup]
    -- This used to be the end of the proof before leanprover/lean4#2644
    dsimp
    congr 1
    conv_lhs => erw [IsComplement.equiv_mul_left]
    

Proof state:
case neg.e_g
G : Type u_1
inst✝³ : Group G
A B : Subgroup G
φ : ↥A ≃* ↥B
H : Type u_2
inst✝² : Group H
M : Type u_3
inst✝¹ : Monoid M
d : TransversalPair G A B
inst✝ : DecidableEq G
g : ↥A
w : NormalWord d
this : Cancels 1 (↑g • w) ↔ Cancels 1 w
hcan : ¬Cancels 1 w
⊢ ↑(φ
        (g * ((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1))) w.head).1,
            ((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1))) w.head).2).1) =
    ↑(φ g) * ↑(φ ((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1))) w.head).1)
case neg.e_w
G : Type u_1
inst✝³ : Group G
A B : Subgroup G
φ : ↥A ≃* ↥B
H : Type u_2
inst✝² : Group H
M : Type u_3
inst✝¹ : Monoid M
d : TransversalPair G A B
inst✝ : DecidableEq G
g : ↥A
w : NormalWord d
this : Cancels 1 (↑g • w) ↔ Cancels 1 w
hcan : ¬Cancels 1 w
⊢ (↑((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1))) (↑g * w.head)).2 *
        w.head⁻¹) •
      w =
    (↑((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1))) w.head).2 * w.head⁻¹) • w

Next tactic:
simp? says
      simp only [toSubgroup_one, SetLike.coe_sort_coe, map_mul, Submonoid.coe_mul, coe_toSubmonoid]
theorem unitsSMul_one_group_smul (g : A) (w : NormalWord d) :
    unitsSMul φ 1 ((g : G) • w) = (φ g : G) • (unitsSMul φ 1 w) := by
  unfold unitsSMul
  have : Cancels 1 ((g : G) • w) ↔ Cancels 1 w := by
    simp [Cancels, Subgroup.mul_mem_cancel_left]
  by_cases hcan : Cancels 1 w
  · simp [unitsSMulWithCancel, dif_pos (this.2 hcan), dif_pos hcan]
    cases w using consRecOn
    · simp [Cancels] at hcan
    · simp only [smul_cons, consRecOn_cons, mul_smul]
      rw [← mul_smul, ← Subgroup.coe_mul, ← map_mul φ]
      rfl
  · rw [dif_neg (mt this.1 hcan), dif_neg hcan]
    simp [← mul_smul, mul_assoc, unitsSMulGroup]
    -- This used to be the end of the proof before leanprover/lean4#2644
    dsimp
    congr 1
    conv_lhs => erw [IsComplement.equiv_mul_left]
    simp? says
      

Proof state:
case neg.e_g
G : Type u_1
inst✝³ : Group G
A B : Subgroup G
φ : ↥A ≃* ↥B
H : Type u_2
inst✝² : Group H
M : Type u_3
inst✝¹ : Monoid M
d : TransversalPair G A B
inst✝ : DecidableEq G
g : ↥A
w : NormalWord d
this : Cancels 1 (↑g • w) ↔ Cancels 1 w
hcan : ¬Cancels 1 w
⊢ ↑(φ
        (g * ((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1))) w.head).1,
            ((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1))) w.head).2).1) =
    ↑(φ g) * ↑(φ ((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1))) w.head).1)
case neg.e_w
G : Type u_1
inst✝³ : Group G
A B : Subgroup G
φ : ↥A ≃* ↥B
H : Type u_2
inst✝² : Group H
M : Type u_3
inst✝¹ : Monoid M
d : TransversalPair G A B
inst✝ : DecidableEq G
g : ↥A
w : NormalWord d
this : Cancels 1 (↑g • w) ↔ Cancels 1 w
hcan : ¬Cancels 1 w
⊢ (↑((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1))) (↑g * w.head)).2 *
        w.head⁻¹) •
      w =
    (↑((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1))) w.head).2 * w.head⁻¹) • w

Next tactic:
simp only [toSubgroup_one, SetLike.coe_sort_coe, map_mul, Submonoid.coe_mul, coe_toSubmonoid]
theorem unitsSMul_one_group_smul (g : A) (w : NormalWord d) :
    unitsSMul φ 1 ((g : G) • w) = (φ g : G) • (unitsSMul φ 1 w) := by
  unfold unitsSMul
  have : Cancels 1 ((g : G) • w) ↔ Cancels 1 w := by
    simp [Cancels, Subgroup.mul_mem_cancel_left]
  by_cases hcan : Cancels 1 w
  · simp [unitsSMulWithCancel, dif_pos (this.2 hcan), dif_pos hcan]
    cases w using consRecOn
    · simp [Cancels] at hcan
    · simp only [smul_cons, consRecOn_cons, mul_smul]
      rw [← mul_smul, ← Subgroup.coe_mul, ← map_mul φ]
      rfl
  · rw [dif_neg (mt this.1 hcan), dif_neg hcan]
    simp [← mul_smul, mul_assoc, unitsSMulGroup]
    -- This used to be the end of the proof before leanprover/lean4#2644
    dsimp
    congr 1
    conv_lhs => erw [IsComplement.equiv_mul_left]
    simp? says
      simp only [toSubgroup_one, SetLike.coe_sort_coe, map_mul, Submonoid.coe_mul, coe_toSubmonoid]
    

Proof state:
case neg.e_w
G : Type u_1
inst✝³ : Group G
A B : Subgroup G
φ : ↥A ≃* ↥B
H : Type u_2
inst✝² : Group H
M : Type u_3
inst✝¹ : Monoid M
d : TransversalPair G A B
inst✝ : DecidableEq G
g : ↥A
w : NormalWord d
this : Cancels 1 (↑g • w) ↔ Cancels 1 w
hcan : ¬Cancels 1 w
⊢ (↑((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1))) (↑g * w.head)).2 *
        w.head⁻¹) •
      w =
    (↑((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1))) w.head).2 * w.head⁻¹) • w

Next tactic:
conv_lhs => erw [IsComplement.equiv_mul_left]
theorem unitsSMul_one_group_smul (g : A) (w : NormalWord d) :
    unitsSMul φ 1 ((g : G) • w) = (φ g : G) • (unitsSMul φ 1 w) := by
  unfold unitsSMul
  have : Cancels 1 ((g : G) • w) ↔ Cancels 1 w := by
    simp [Cancels, Subgroup.mul_mem_cancel_left]
  by_cases hcan : Cancels 1 w
  · simp [unitsSMulWithCancel, dif_pos (this.2 hcan), dif_pos hcan]
    cases w using consRecOn
    · simp [Cancels] at hcan
    · simp only [smul_cons, consRecOn_cons, mul_smul]
      rw [← mul_smul, ← Subgroup.coe_mul, ← map_mul φ]
      rfl
  · rw [dif_neg (mt this.1 hcan), dif_neg hcan]
    simp [← mul_smul, mul_assoc, unitsSMulGroup]
    -- This used to be the end of the proof before leanprover/lean4#2644
    dsimp
    congr 1
    conv_lhs => erw [IsComplement.equiv_mul_left]
    simp? says
      simp only [toSubgroup_one, SetLike.coe_sort_coe, map_mul, Submonoid.coe_mul, coe_toSubmonoid]
    conv_lhs => 

Proof state:
G : Type u_1
inst✝³ : Group G
A B : Subgroup G
φ : ↥A ≃* ↥B
H : Type u_2
inst✝² : Group H
M : Type u_3
inst✝¹ : Monoid M
d : TransversalPair G A B
inst✝ : DecidableEq G
g : ↥A
w : NormalWord d
this : Cancels 1 (↑g • w) ↔ Cancels 1 w
hcan : ¬Cancels 1 w
| (↑((IsComplement.equiv (_ : IsComplement (↑(toSubgroup A B 1)) (TransversalPair.set d 1))) (↑g * w.head)).2 *
      w.head⁻¹) •
    w

Next tactic:
erw [IsComplement.equiv_mul_left]
noncomputable instance : MulAction (HNNExtension G A B φ) (NormalWord d) :=
  MulAction.ofEndHom <| (MulAction.toEndHom (M := Equiv.Perm (NormalWord d))).comp
    (HNNExtension.lift (MulAction.toPermHom _ _) (unitsSMulEquiv φ) <| by
      

Proof state:
G : Type u_1
inst✝³ : Group G
A B : Subgroup G
φ : ↥A ≃* ↥B
H : Type u_2
inst✝² : Group H
M : Type u_3
inst✝¹ : Monoid M
d : TransversalPair G A B
inst✝ : DecidableEq G
⊢ ∀ (a : ↥A),
    unitsSMulEquiv φ * (MulAction.toPermHom G (NormalWord d)) ↑a =
      (MulAction.toPermHom G (NormalWord d)) ↑(φ a) * unitsSMulEquiv φ

Next tactic:
intro a
noncomputable instance : MulAction (HNNExtension G A B φ) (NormalWord d) :=
  MulAction.ofEndHom <| (MulAction.toEndHom (M := Equiv.Perm (NormalWord d))).comp
    (HNNExtension.lift (MulAction.toPermHom _ _) (unitsSMulEquiv φ) <| by
      intro a
      

Proof state:
G : Type u_1
inst✝³ : Group G
A B : Subgroup G
φ : ↥A ≃* ↥B
H : Type u_2
inst✝² : Group H
M : Type u_3
inst✝¹ : Monoid M
d : TransversalPair G A B
inst✝ : DecidableEq G
a : ↥A
⊢ unitsSMulEquiv φ * (MulAction.toPermHom G (NormalWord d)) ↑a =
    (MulAction.toPermHom G (NormalWord d)) ↑(φ a) * unitsSMulEquiv φ

Next tactic:
ext : 1
noncomputable instance : MulAction (HNNExtension G A B φ) (NormalWord d) :=
  MulAction.ofEndHom <| (MulAction.toEndHom (M := Equiv.Perm (NormalWord d))).comp
    (HNNExtension.lift (MulAction.toPermHom _ _) (unitsSMulEquiv φ) <| by
      intro a
      ext : 1
      

Proof state:
case H
G : Type u_1
inst✝³ : Group G
A B : Subgroup G
φ : ↥A ≃* ↥B
H : Type u_2
inst✝² : Group H
M : Type u_3
inst✝¹ : Monoid M
d : TransversalPair G A B
inst✝ : DecidableEq G
a : ↥A
x✝ : NormalWord d
⊢ (unitsSMulEquiv φ * (MulAction.toPermHom G (NormalWord d)) ↑a) x✝ =
    ((MulAction.toPermHom G (NormalWord d)) ↑(φ a) * unitsSMulEquiv φ) x✝

Next tactic:
simp [unitsSMul_one_group_smul]
@[simp]
theorem prod_group_smul (g : G) (w : NormalWord d) :
    (g • w).prod φ = of g * (w.prod φ) := by
  

Proof state:
G : Type u_1
inst✝³ : Group G
A B : Subgroup G
φ : ↥A ≃* ↥B
H : Type u_2
inst✝² : Group H
M : Type u_3
inst✝¹ : Monoid M
d : TransversalPair G A B
inst✝ : DecidableEq G
g : G
w : NormalWord d
⊢ ReducedWord.prod φ (g • w).toReducedWord = of g * ReducedWord.prod φ w.toReducedWord

Next tactic:
simp [ReducedWord.prod, smul_def, mul_assoc]
theorem of_smul_eq_smul (g : G) (w : NormalWord d) :
    (of g : HNNExtension G A B φ) • w = g • w := by
  

Proof state:
G : Type u_1
inst✝³ : Group G
A B : Subgroup G
φ : ↥A ≃* ↥B
H : Type u_2
inst✝² : Group H
M : Type u_3
inst✝¹ : Monoid M
d : TransversalPair G A B
inst✝ : DecidableEq G
g : G
w : NormalWord d
⊢ of g • w = g • w

Next tactic:
simp [instHSMul, SMul.smul, MulAction.toEndHom]
theorem t_smul_eq_unitsSMul (w : NormalWord d) :
    (t : HNNExtension G A B φ) • w = unitsSMul φ 1 w := by
  

Proof state:
G : Type u_1
inst✝³ : Group G
A B : Subgroup G
φ : ↥A ≃* ↥B
H : Type u_2
inst✝² : Group H
M : Type u_3
inst✝¹ : Monoid M
d : TransversalPair G A B
inst✝ : DecidableEq G
w : NormalWord d
⊢ t • w = unitsSMul φ 1 w

Next tactic:
simp [instHSMul, SMul.smul, MulAction.toEndHom]
theorem t_pow_smul_eq_unitsSMul (u : ℤˣ) (w : NormalWord d) :
    (t ^ (u : ℤ) : HNNExtension G A B φ) • w = unitsSMul φ u w := by
  

Proof state:
G : Type u_1
inst✝³ : Group G
A B : Subgroup G
φ : ↥A ≃* ↥B
H : Type u_2
inst✝² : Group H
M : Type u_3
inst✝¹ : Monoid M
d : TransversalPair G A B
inst✝ : DecidableEq G
u : ℤˣ
w : NormalWord d
⊢ t ^ ↑u • w = unitsSMul φ u w

Next tactic:
rcases Int.units_eq_one_or u with (rfl | rfl)
theorem t_pow_smul_eq_unitsSMul (u : ℤˣ) (w : NormalWord d) :
    (t ^ (u : ℤ) : HNNExtension G A B φ) • w = unitsSMul φ u w := by
  rcases Int.units_eq_one_or u with (rfl | rfl) <;>
    

Proof state:
case inl
G : Type u_1
inst✝³ : Group G
A B : Subgroup G
φ : ↥A ≃* ↥B
H : Type u_2
inst✝² : Group H
M : Type u_3
inst✝¹ : Monoid M
d : TransversalPair G A B
inst✝ : DecidableEq G
w : NormalWord d
⊢ t ^ ↑1 • w = unitsSMul φ 1 w

Next tactic:
simp [instHSMul, SMul.smul, MulAction.toEndHom, Equiv.Perm.inv_def]
theorem t_pow_smul_eq_unitsSMul (u : ℤˣ) (w : NormalWord d) :
    (t ^ (u : ℤ) : HNNExtension G A B φ) • w = unitsSMul φ u w := by
  rcases Int.units_eq_one_or u with (rfl | rfl) <;>
    

Proof state:
case inr
G : Type u_1
inst✝³ : Group G
A B : Subgroup G
φ : ↥A ≃* ↥B
H : Type u_2
inst✝² : Group H
M : Type u_3
inst✝¹ : Monoid M
d : TransversalPair G A B
inst✝ : DecidableEq G
w : NormalWord d
⊢ t ^ ↑(-1) • w = unitsSMul φ (-1) w

Next tactic:
simp [instHSMul, SMul.smul, MulAction.toEndHom, Equiv.Perm.inv_def]
@[simp]
theorem prod_cons (g : G) (u : ℤˣ) (w : NormalWord d) (h1 : w.head ∈ d.set u)
    (h2 : ∀ u' ∈ Option.map Prod.fst w.toList.head?,
      w.head ∈ toSubgroup A B u → u = u') :
    (cons g u w h1 h2).prod φ = of g * (t ^ (u : ℤ) * w.prod φ) := by
  

Proof state:
G : Type u_1
inst✝³ : Group G
A B : Subgroup G
φ : ↥A ≃* ↥B
H : Type u_2
inst✝² : Group H
M : Type u_3
inst✝¹ : Monoid M
d : TransversalPair G A B
inst✝ : DecidableEq G
g : G
u : ℤˣ
w : NormalWord d
h1 : w.head ∈ TransversalPair.set d u
h2 : ∀ u' ∈ Option.map Prod.fst (List.head? w.toList), w.head ∈ toSubgroup A B u → u = u'
⊢ ReducedWord.prod φ (cons g u w h1 h2).toReducedWord = of g * (t ^ ↑u * ReducedWord.prod φ w.toReducedWord)

Next tactic:
simp [ReducedWord.prod, cons, smul_def, mul_assoc]
theorem prod_unitsSMul (u : ℤˣ) (w : NormalWord d) :
    (unitsSMul φ u w).prod φ = (t^(u : ℤ) * w.prod φ : HNNExtension G A B φ) := by
  

Proof state:
G : Type u_1
inst✝³ : Group G
A B : Subgroup G
φ : ↥A ≃* ↥B
H : Type u_2
inst✝² : Group H
M : Type u_3
inst✝¹ : Monoid M
d : TransversalPair G A B
inst✝ : DecidableEq G
u : ℤˣ
w : NormalWord d
⊢ ReducedWord.prod φ (unitsSMul φ u w).toReducedWord = t ^ ↑u * ReducedWord.prod φ w.toReducedWord

Next tactic:
rw [unitsSMul]
theorem prod_unitsSMul (u : ℤˣ) (w : NormalWord d) :
    (unitsSMul φ u w).prod φ = (t^(u : ℤ) * w.prod φ : HNNExtension G A B φ) := by
  rw [unitsSMul]
  

Proof state:
G : Type u_1
inst✝³ : Group G
A B : Subgroup G
φ : ↥A ≃* ↥B
H : Type u_2
inst✝² : Group H
M : Type u_3
inst✝¹ : Monoid M
d : TransversalPair G A B
inst✝ : DecidableEq G
u : ℤˣ
w : NormalWord d
⊢ ReducedWord.prod φ
      (if h : Cancels u w then unitsSMulWithCancel φ u w h
        else
          let g' := unitsSMulGroup φ d u w.head;
          cons (↑g'.1) u ((↑g'.2 * w.head⁻¹) • w)
            (_ : ↑(unitsSMulGroup φ d u w.head).2 * w.head⁻¹ * w.head ∈ TransversalPair.set d u)
            (_ :
              ∀ u' ∈ Option.map Prod.fst (List.head? ((↑(unitsSMulGroup φ d u w.head).2 * w.head⁻¹) • w).toList),
                ((↑(unitsSMulGroup φ d u w.head).2 * w.head⁻¹) • w).head ∈ toSubgroup A B u → u = u')).toReducedWord =
    t ^ ↑u * ReducedWord.prod φ w.toReducedWord

Next tactic:
split_ifs with hcan