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

tactic: cases' i with i hn
state_before: α : Type ?u.118731
β : Type ?u.118734
inst✝¹ : Monoid α
n : ℕ
G : Type u_1
inst✝ : Group G
f : Fin n → G
i : Fin n
⊢ (partialProd f (↑castSucc i))⁻¹ * partialProd f (succ i) = f i

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]
  rw [Nat.succ_eq_add_one] at 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.118731
β : Type ?u.118734
inst✝¹ : Monoid α
n : ℕ
G : Type u_1
inst✝ : Group G
f : Fin n → G
i : ℕ
hn : i < n
⊢ (partialProd f (↑castSucc { val := i, isLt := hn }))⁻¹ * partialProd f (succ { val := i, isLt := hn }) =
    f { val := i, isLt := hn }

tactic: simp [-Fin.succ_mk, partialProd_succ]
state_before: case mk.zero
α : Type ?u.118731
β : Type ?u.118734
inst✝¹ : Monoid α
n : ℕ
G : Type u_1
inst✝ : Group G
f : Fin n → G
hn : Nat.zero < n
⊢ (partialProd f (↑castSucc { val := Nat.zero, isLt := hn }))⁻¹ * partialProd f (succ { val := Nat.zero, isLt := hn }) =
    f { val := Nat.zero, isLt := hn }

tactic: specialize hi (lt_trans (Nat.lt_succ_self i) hn)
state_before: case mk.succ
α : Type ?u.118731
β : Type ?u.118734
inst✝¹ : Monoid α
n : ℕ
G : Type u_1
inst✝ : Group G
f : Fin n → G
i : ℕ
hi :
  ∀ (hn : i < n),
    (partialProd f (↑castSucc { val := i, isLt := hn }))⁻¹ * partialProd f (succ { val := i, isLt := hn }) =
      f { val := i, isLt := hn }
hn : Nat.succ i < n
⊢ (partialProd f (↑castSucc { val := Nat.succ i, isLt := hn }))⁻¹ *
      partialProd f (succ { val := Nat.succ i, isLt := hn }) =
    f { val := Nat.succ i, isLt := hn }

tactic: simp only [Fin.coe_eq_castSucc, Fin.succ_mk, Fin.castSucc_mk] at hi⊢
state_before: case mk.succ
α : Type ?u.118731
β : Type ?u.118734
inst✝¹ : Monoid α
n : ℕ
G : Type u_1
inst✝ : Group G
f : Fin n → G
i : ℕ
hn : Nat.succ i < n
hi :
  (partialProd f (↑castSucc { val := i, isLt := (_ : i < n) }))⁻¹ *
      partialProd f (succ { val := i, isLt := (_ : i < n) }) =
    f { val := i, isLt := (_ : i < n) }
⊢ (partialProd f (↑castSucc { val := Nat.succ i, isLt := hn }))⁻¹ *
      partialProd f (succ { val := Nat.succ i, isLt := hn }) =
    f { val := Nat.succ i, isLt := hn }

tactic: rw [← Fin.succ_mk _ _ (lt_trans (Nat.lt_succ_self _) hn), ← Fin.succ_mk]
state_before: case mk.succ
α : Type ?u.118731
β : Type ?u.118734
inst✝¹ : Monoid α
n : ℕ
G : Type u_1
inst✝ : Group G
f : Fin n → G
i : ℕ
hn : Nat.succ i < n
hi :
  (partialProd f { val := i, isLt := (_ : i < Nat.succ n) })⁻¹ *
      partialProd f { val := i + 1, isLt := (_ : Nat.succ i < Nat.succ n) } =
    f { val := i, isLt := (_ : i < n) }
⊢ (partialProd f { val := Nat.succ i, isLt := (_ : Nat.succ i < Nat.succ n) })⁻¹ *
      partialProd f { val := Nat.succ i + 1, isLt := (_ : Nat.succ (Nat.succ i) < Nat.succ n) } =
    f { val := Nat.succ i, isLt := hn }

tactic: rw [Nat.succ_eq_add_one] at hn
state_before: case mk.succ
α : Type ?u.118731
β : Type ?u.118734
inst✝¹ : Monoid α
n : ℕ
G : Type u_1
inst✝ : Group G
f : Fin n → G
i : ℕ
hn : Nat.succ i < n
hi :
  (partialProd f { val := i, isLt := (_ : i < Nat.succ n) })⁻¹ *
      partialProd f { val := i + 1, isLt := (_ : Nat.succ i < Nat.succ n) } =
    f { val := i, isLt := (_ : i < n) }
⊢ (partialProd f (succ { val := i, isLt := (_ : i < n) }))⁻¹ *
      partialProd f (succ { val := i + 1, isLt := ?mk.succ.h }) =
    f { val := Nat.succ i, isLt := hn }

case mk.succ.h
α : Type ?u.118731
β : Type ?u.118734
inst✝¹ : Monoid α
n : ℕ
G : Type u_1
inst✝ : Group G
f : Fin n → G
i : ℕ
hn : Nat.succ i < n
hi :
  (partialProd f { val := i, isLt := (_ : i < Nat.succ n) })⁻¹ *
      partialProd f { val := i + 1, isLt := (_ : Nat.succ i < Nat.succ n) } =
    f { val := i, isLt := (_ : i < n) }
⊢ i + 1 < n

tactic: simp only [partialProd_succ, mul_inv_rev, Fin.castSucc_mk]
state_before: case mk.succ
α : Type ?u.118731
β : Type ?u.118734
inst✝¹ : Monoid α
n : ℕ
G : Type u_1
inst✝ : Group G
f : Fin n → G
i : ℕ
hn✝ : Nat.succ i < n
hn : i + 1 < n
hi :
  (partialProd f { val := i, isLt := (_ : i < Nat.succ n) })⁻¹ *
      partialProd f { val := i + 1, isLt := (_ : Nat.succ i < Nat.succ n) } =
    f { val := i, isLt := (_ : i < n) }
⊢ (partialProd f (succ { val := i, isLt := (_ : i < n) }))⁻¹ *
      partialProd f (succ { val := i + 1, isLt := (_ : i + 1 < n) }) =
    f { val := Nat.succ i, isLt := hn✝ }

tactic: rw [← mul_assoc, mul_left_eq_self, mul_assoc, hi, mul_left_inv]
state_before: case mk.succ
α : Type ?u.118731
β : Type ?u.118734
inst✝¹ : Monoid α
n : ℕ
G : Type u_1
inst✝ : Group G
f : Fin n → G
i : ℕ
hn✝ : Nat.succ i < n
hn : i + 1 < n
hi :
  (partialProd f { val := i, isLt := (_ : i < Nat.succ n) })⁻¹ *
      partialProd f { val := i + 1, isLt := (_ : Nat.succ i < Nat.succ n) } =
    f { val := i, isLt := (_ : i < n) }
⊢ (f { val := i, isLt := (_ : i < n) })⁻¹ * (partialProd f { val := i, isLt := (_ : i < Nat.succ n) })⁻¹ *
      (partialProd f { val := i + 1, isLt := (_ : i + 1 < Nat.succ n) } * f { val := i + 1, isLt := (_ : i + 1 < n) }) =
    f { val := Nat.succ i, isLt := hn✝ }