Theorem: FreeProduct.NeWord.mulHead_prod
File: Mathlib/GroupTheory/FreeProduct.lean

tactic: unfold mulHead
state_before: ι : Type u_1
M : ι → Type u_2
inst✝¹ : (i : ι) → Monoid (M i)
N : Type ?u.619397
inst✝ : Monoid N
i j : ι
w : NeWord M i j
x : M i
hnotone : x * head w ≠ 1
⊢ prod (mulHead w x hnotone) = ↑of x * prod w

tactic: induction' w with _ _ _ _ _ _ _ _ _ _ w_ih_w₁ w_ih_w₂
state_before: ι : Type u_1
M : ι → Type u_2
inst✝¹ : (i : ι) → Monoid (M i)
N : Type ?u.619397
inst✝ : Monoid N
i j : ι
w : NeWord M i j
x : M i
hnotone : x * head w ≠ 1
⊢ prod (replaceHead (x * head w) hnotone w) = ↑of x * prod w

tactic: simp [mulHead, replaceHead]
state_before: case singleton
ι : Type u_1
M : ι → Type u_2
inst✝¹ : (i : ι) → Monoid (M i)
N : Type ?u.619397
inst✝ : Monoid N
i j : ι
w : NeWord M i j
x✝¹ : M i
hnotone✝ : x✝¹ * head w ≠ 1
i✝ : ι
x✝ : M i✝
a✝ : x✝ ≠ 1
x : M i✝
hnotone : x * head (singleton x✝ a✝) ≠ 1
⊢ prod (replaceHead (x * head (singleton x✝ a✝)) hnotone (singleton x✝ a✝)) = ↑of x * prod (singleton x✝ a✝)

tactic: specialize w_ih_w₁ _ hnotone
state_before: case append
ι : Type u_1
M : ι → Type u_2
inst✝¹ : (i : ι) → Monoid (M i)
N : Type ?u.619397
inst✝ : Monoid N
i j : ι
w : NeWord M i j
x✝ : M i
hnotone✝ : x✝ * head w ≠ 1
i✝ j✝ k✝ l✝ : ι
_w₁✝ : NeWord M i✝ j✝
_hne✝ : j✝ ≠ k✝
_w₂✝ : NeWord M k✝ l✝
w_ih_w₁ :
  ∀ (x : M i✝) (hnotone : x * head _w₁✝ ≠ 1), prod (replaceHead (x * head _w₁✝) hnotone _w₁✝) = ↑of x * prod _w₁✝
w_ih_w₂ :
  ∀ (x : M k✝) (hnotone : x * head _w₂✝ ≠ 1), prod (replaceHead (x * head _w₂✝) hnotone _w₂✝) = ↑of x * prod _w₂✝
x : M i✝
hnotone : x * head (append _w₁✝ _hne✝ _w₂✝) ≠ 1
⊢ prod (replaceHead (x * head (append _w₁✝ _hne✝ _w₂✝)) hnotone (append _w₁✝ _hne✝ _w₂✝)) =
    ↑of x * prod (append _w₁✝ _hne✝ _w₂✝)

tactic: clear w_ih_w₂
state_before: case append
ι : Type u_1
M : ι → Type u_2
inst✝¹ : (i : ι) → Monoid (M i)
N : Type ?u.619397
inst✝ : Monoid N
i j : ι
w : NeWord M i j
x✝ : M i
hnotone✝ : x✝ * head w ≠ 1
i✝ j✝ k✝ l✝ : ι
_w₁✝ : NeWord M i✝ j✝
_hne✝ : j✝ ≠ k✝
_w₂✝ : NeWord M k✝ l✝
w_ih_w₂ :
  ∀ (x : M k✝) (hnotone : x * head _w₂✝ ≠ 1), prod (replaceHead (x * head _w₂✝) hnotone _w₂✝) = ↑of x * prod _w₂✝
x : M i✝
hnotone : x * head (append _w₁✝ _hne✝ _w₂✝) ≠ 1
w_ih_w₁ : prod (replaceHead (x * head _w₁✝) hnotone _w₁✝) = ↑of x * prod _w₁✝
⊢ prod (replaceHead (x * head (append _w₁✝ _hne✝ _w₂✝)) hnotone (append _w₁✝ _hne✝ _w₂✝)) =
    ↑of x * prod (append _w₁✝ _hne✝ _w₂✝)

tactic: simp [replaceHead, ← mul_assoc] at *
state_before: case append
ι : Type u_1
M : ι → Type u_2
inst✝¹ : (i : ι) → Monoid (M i)
N : Type ?u.619397
inst✝ : Monoid N
i j : ι
w : NeWord M i j
x✝ : M i
hnotone✝ : x✝ * head w ≠ 1
i✝ j✝ k✝ l✝ : ι
_w₁✝ : NeWord M i✝ j✝
_hne✝ : j✝ ≠ k✝
_w₂✝ : NeWord M k✝ l✝
x : M i✝
hnotone : x * head (append _w₁✝ _hne✝ _w₂✝) ≠ 1
w_ih_w₁ : prod (replaceHead (x * head _w₁✝) hnotone _w₁✝) = ↑of x * prod _w₁✝
⊢ prod (replaceHead (x * head (append _w₁✝ _hne✝ _w₂✝)) hnotone (append _w₁✝ _hne✝ _w₂✝)) =
    ↑of x * prod (append _w₁✝ _hne✝ _w₂✝)

tactic: congr 1
state_before: case append
ι : Type u_1
M : ι → Type u_2
inst✝¹ : (i : ι) → Monoid (M i)
N : Type ?u.619397
inst✝ : Monoid N
i j : ι
w : NeWord M i j
x✝ : M i
hnotone✝ : ¬x✝ * head w = 1
i✝ j✝ k✝ l✝ : ι
_w₁✝ : NeWord M i✝ j✝
_hne✝ : j✝ ≠ k✝
_w₂✝ : NeWord M k✝ l✝
x : M i✝
hnotone : x * head (append _w₁✝ _hne✝ _w₂✝) ≠ 1
w_ih_w₁ : prod (replaceHead (x * head _w₁✝) hnotone _w₁✝) = ↑of x * prod _w₁✝
⊢ prod (replaceHead (x * head _w₁✝) (_ : x * head _w₁✝ ≠ 1) _w₁✝) * prod _w₂✝ = ↑of x * prod _w₁✝ * prod _w₂✝