Theorem: Fin.partialProd_right_inv
File: Mathlib/Algebra/BigOperators/Fin.lean

tactic: cases' i with i hn
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Monoid α
n : ℕ
G : Type u_3
inst✝ : Group G
f : Fin n → G
i : Fin n
⊢ (partialProd f i.castSucc)⁻¹ * partialProd f i.succ = f i
state_after: case mk
α : Type u_1
β : Type u_2
inst✝¹ : Monoid α
n : ℕ
G : Type u_3
inst✝ : Group G
f : Fin n → G
i : ℕ
hn : i < n
⊢ (partialProd f ⟨i, hn⟩.castSucc)⁻¹ * partialProd f ⟨i, hn⟩.succ = f ⟨i, hn⟩

tactic: induction i with
| zero => simp [-Fin.succ_mk, partialProd_succ]
| succ i hi =>
  specialize hi (lt_trans (Nat.lt_succ_self i) hn)
  simp only [Fin.coe_eq_castSucc, Fin.succ_mk, Fin.castSucc_mk] at hi ⊢
  rw [← Fin.succ_mk _ _ (lt_trans (Nat.lt_succ_self _) hn), ← Fin.succ_mk _ _ hn]
  simp only [partialProd_succ, mul_inv_rev, Fin.castSucc_mk]
  rw [← mul_assoc, mul_left_eq_self, mul_assoc, hi, mul_left_inv]
state_before: case mk
α : Type u_1
β : Type u_2
inst✝¹ : Monoid α
n : ℕ
G : Type u_3
inst✝ : Group G
f : Fin n → G
i : ℕ
hn : i < n
⊢ (partialProd f ⟨i, hn⟩.castSucc)⁻¹ * partialProd f ⟨i, hn⟩.succ = f ⟨i, hn⟩
state_after: no goals

tactic: simp [-Fin.succ_mk, partialProd_succ]
state_before: case mk.zero
α : Type u_1
β : Type u_2
inst✝¹ : Monoid α
n : ℕ
G : Type u_3
inst✝ : Group G
f : Fin n → G
hn : 0 < n
⊢ (partialProd f ⟨0, hn⟩.castSucc)⁻¹ * partialProd f ⟨0, hn⟩.succ = f ⟨0, hn⟩
state_after: no goals

tactic: specialize hi (lt_trans (Nat.lt_succ_self i) hn)
state_before: case mk.succ
α : Type u_1
β : Type u_2
inst✝¹ : Monoid α
n : ℕ
G : Type u_3
inst✝ : Group G
f : Fin n → G
i : ℕ
hi : ∀ (hn : i < n), (partialProd f ⟨i, hn⟩.castSucc)⁻¹ * partialProd f ⟨i, hn⟩.succ = f ⟨i, hn⟩
hn : i + 1 < n
⊢ (partialProd f ⟨i + 1, hn⟩.castSucc)⁻¹ * partialProd f ⟨i + 1, hn⟩.succ = f ⟨i + 1, hn⟩
state_after: case mk.succ
α : Type u_1
β : Type u_2
inst✝¹ : Monoid α
n : ℕ
G : Type u_3
inst✝ : Group G
f : Fin n → G
i : ℕ
hn : i + 1 < n
hi : (partialProd f ⟨i, ⋯⟩.castSucc)⁻¹ * partialProd f ⟨i, ⋯⟩.succ = f ⟨i, ⋯⟩
⊢ (partialProd f ⟨i + 1, hn⟩.castSucc)⁻¹ * partialProd f ⟨i + 1, hn⟩.succ = f ⟨i + 1, hn⟩

tactic: simp only [Fin.coe_eq_castSucc, Fin.succ_mk, Fin.castSucc_mk] at hi ⊢
state_before: case mk.succ
α : Type u_1
β : Type u_2
inst✝¹ : Monoid α
n : ℕ
G : Type u_3
inst✝ : Group G
f : Fin n → G
i : ℕ
hn : i + 1 < n
hi : (partialProd f ⟨i, ⋯⟩.castSucc)⁻¹ * partialProd f ⟨i, ⋯⟩.succ = f ⟨i, ⋯⟩
⊢ (partialProd f ⟨i + 1, hn⟩.castSucc)⁻¹ * partialProd f ⟨i + 1, hn⟩.succ = f ⟨i + 1, hn⟩
state_after: case mk.succ
α : Type u_1
β : Type u_2
inst✝¹ : Monoid α
n : ℕ
G : Type u_3
inst✝ : Group G
f : Fin n → G
i : ℕ
hn : i + 1 < n
hi : (partialProd f ⟨i, ⋯⟩)⁻¹ * partialProd f ⟨i + 1, ⋯⟩ = f ⟨i, ⋯⟩
⊢ (partialProd f ⟨i + 1, ⋯⟩)⁻¹ * partialProd f ⟨i + 1 + 1, ⋯⟩ = f ⟨i + 1, hn⟩

tactic: rw [← Fin.succ_mk _ _ (lt_trans (Nat.lt_succ_self _) hn), ← Fin.succ_mk _ _ hn]
state_before: case mk.succ
α : Type u_1
β : Type u_2
inst✝¹ : Monoid α
n : ℕ
G : Type u_3
inst✝ : Group G
f : Fin n → G
i : ℕ
hn : i + 1 < n
hi : (partialProd f ⟨i, ⋯⟩)⁻¹ * partialProd f ⟨i + 1, ⋯⟩ = f ⟨i, ⋯⟩
⊢ (partialProd f ⟨i + 1, ⋯⟩)⁻¹ * partialProd f ⟨i + 1 + 1, ⋯⟩ = f ⟨i + 1, hn⟩
state_after: case mk.succ
α : Type u_1
β : Type u_2
inst✝¹ : Monoid α
n : ℕ
G : Type u_3
inst✝ : Group G
f : Fin n → G
i : ℕ
hn : i + 1 < n
hi : (partialProd f ⟨i, ⋯⟩)⁻¹ * partialProd f ⟨i + 1, ⋯⟩ = f ⟨i, ⋯⟩
⊢ (partialProd f ⟨i, ⋯⟩.succ)⁻¹ * partialProd f ⟨i + 1, hn⟩.succ = f ⟨i + 1, hn⟩

tactic: simp only [partialProd_succ, mul_inv_rev, Fin.castSucc_mk]
state_before: case mk.succ
α : Type u_1
β : Type u_2
inst✝¹ : Monoid α
n : ℕ
G : Type u_3
inst✝ : Group G
f : Fin n → G
i : ℕ
hn : i + 1 < n
hi : (partialProd f ⟨i, ⋯⟩)⁻¹ * partialProd f ⟨i + 1, ⋯⟩ = f ⟨i, ⋯⟩
⊢ (partialProd f ⟨i, ⋯⟩.succ)⁻¹ * partialProd f ⟨i + 1, hn⟩.succ = f ⟨i + 1, hn⟩
state_after: case mk.succ
α : Type u_1
β : Type u_2
inst✝¹ : Monoid α
n : ℕ
G : Type u_3
inst✝ : Group G
f : Fin n → G
i : ℕ
hn : i + 1 < n
hi : (partialProd f ⟨i, ⋯⟩)⁻¹ * partialProd f ⟨i + 1, ⋯⟩ = f ⟨i, ⋯⟩
⊢ (f ⟨i, ⋯⟩)⁻¹ * (partialProd f ⟨i, ⋯⟩)⁻¹ * (partialProd f ⟨i + 1, ⋯⟩ * f ⟨i + 1, hn⟩) = f ⟨i + 1, hn⟩

tactic: rw [← mul_assoc, mul_left_eq_self, mul_assoc, hi, mul_left_inv]
state_before: case mk.succ
α : Type u_1
β : Type u_2
inst✝¹ : Monoid α
n : ℕ
G : Type u_3
inst✝ : Group G
f : Fin n → G
i : ℕ
hn : i + 1 < n
hi : (partialProd f ⟨i, ⋯⟩)⁻¹ * partialProd f ⟨i + 1, ⋯⟩ = f ⟨i, ⋯⟩
⊢ (f ⟨i, ⋯⟩)⁻¹ * (partialProd f ⟨i, ⋯⟩)⁻¹ * (partialProd f ⟨i + 1, ⋯⟩ * f ⟨i + 1, hn⟩) = f ⟨i + 1, hn⟩
state_after: no goals