theorem unitsSMul_neg (u : ℤˣ) (w : NormalWord d) :
    unitsSMul φ (-u) (unitsSMul φ u w) = w := by
  rw [unitsSMul]
  split_ifs with hcan
  · have hncan : ¬ Cancels u w := (unitsSMul_cancels_iff _ _ _).1 hcan
    unfold unitsSMul
    simp only [dif_neg hncan]
    simp [unitsSMulWithCancel, unitsSMulGroup, (d.compl u).equiv_snd_eq_inv_mul]
    -- This used to be the end of the proof before leanprover/lean4#2644
    erw [(d.compl u).equiv_snd_eq_inv_mul]
    simp
  · have hcan2 : Cancels u w := not_not.1 (mt (unitsSMul_cancels_iff _ _ _).2 hcan)
    unfold unitsSMul at hcan ⊢
    simp only [dif_pos hcan2] at hcan ⊢
    cases w using consRecOn with
    

Proof state:
case neg.ofGroup
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 : ℤˣ
g✝ : G
hcan✝ :
  ¬Cancels (-u)
      (if h : Cancels u (ofGroup g✝) then unitsSMulWithCancel φ u (ofGroup g✝) h
      else
        let g' := unitsSMulGroup φ d u (ofGroup g✝).toReducedWord.head;
        cons (↑g'.1) u ((↑g'.2 * (ofGroup g✝).toReducedWord.head⁻¹) • ofGroup g✝)
          (_ :
            ↑(unitsSMulGroup φ d u (ofGroup g✝).toReducedWord.head).2 * (ofGroup g✝).toReducedWord.head⁻¹ *
                (ofGroup g✝).toReducedWord.head ∈
              TransversalPair.set d u)
          (_ :
            ∀
              u' ∈
                Option.map Prod.fst
                  (List.head?
                    ((↑(unitsSMulGroup φ d u (ofGroup g✝).toReducedWord.head).2 * (ofGroup g✝).toReducedWord.head⁻¹) •
                        ofGroup g✝).toList),
              ((↑(unitsSMulGroup φ d u (ofGroup g✝).toReducedWord.head).2 * (ofGroup g✝).toReducedWord.head⁻¹) •
                      ofGroup g✝).head ∈
                  toSubgroup A B u →
                u = u'))
hcan2 : Cancels u (ofGroup g✝)
hcan : ¬Cancels (-u) (unitsSMulWithCancel φ u (ofGroup g✝) hcan2)
⊢ cons (↑(unitsSMulGroup φ d (-u) (unitsSMulWithCancel φ u (ofGroup g✝) hcan2).toReducedWord.head).1) (-u)
      ((↑(unitsSMulGroup φ d (-u) (unitsSMulWithCancel φ u (ofGroup g✝) hcan2).toReducedWord.head).2 *
          (unitsSMulWithCancel φ u (ofGroup g✝) hcan2).toReducedWord.head⁻¹) •
        unitsSMulWithCancel φ u (ofGroup g✝) hcan2)
      (_ :
        ((↑(unitsSMulGroup φ d (-u) (unitsSMulWithCancel φ u (ofGroup g✝) hcan2).toReducedWord.head).2 *
                (unitsSMulWithCancel φ u (ofGroup g✝) hcan2).toReducedWord.head⁻¹) •
              unitsSMulWithCancel φ u (ofGroup g✝) hcan2).head ∈
          TransversalPair.set d (-u))
      (_ :
        ∀
          u' ∈
            Option.map Prod.fst
              (List.head?
                ((↑(unitsSMulGroup φ d (-u) (unitsSMulWithCancel φ u (ofGroup g✝) hcan2).toReducedWord.head).2 *
                      (unitsSMulWithCancel φ u (ofGroup g✝) hcan2).toReducedWord.head⁻¹) •
                    unitsSMulWithCancel φ u (ofGroup g✝) hcan2).toList),
          ((↑(unitsSMulGroup φ d (-u) (unitsSMulWithCancel φ u (ofGroup g✝) hcan2).toReducedWord.head).2 *
                    (unitsSMulWithCancel φ u (ofGroup g✝) hcan2).toReducedWord.head⁻¹) •
                  unitsSMulWithCancel φ u (ofGroup g✝) hcan2).head ∈
              toSubgroup A B (-u) →
            -u = u') =
    ofGroup g✝

Next tactic:
| ofGroup => simp [Cancels] at hcan2