ι : 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
ι : 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
unfold mulHead
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✝)

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₂✝)
ι : 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
induction' w with _ _ _ _ _ _ _ _ _ _ w_ih_w₁ w_ih_w₂
no goals
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✝)
simp [mulHead, replaceHead]
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₂✝)
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₂✝)
specialize w_ih_w₁ _ hnotone
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₂✝)
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₂✝)
clear w_ih_w₂
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₂✝
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₂✝)
simp [replaceHead, ← mul_assoc] at *
no goals
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₂✝
congr 1