Theorem: Matrix.Pivot.listTransvecCol_mul_last_row_drop
File: Mathlib/LinearAlgebra/Matrix/Transvection.lean

tactic: refine' Nat.decreasingInduction' _ hk _
state_before: n : Type ?u.140137
p : Type ?u.140140
R : Type u₂
𝕜 : Type u_1
inst✝³ : Field 𝕜
inst✝² : DecidableEq n
inst✝¹ : DecidableEq p
inst✝ : CommRing R
r : ℕ
M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜
i : Fin r ⊕ Unit
k : ℕ
hk : k ≤ r
⊢ (List.prod (List.drop k (listTransvecCol M)) ⬝ M) (inr ()) i = M (inr ()) i

tactic: intro n hn _ IH
state_before: case refine'_1
n : Type ?u.140137
p : Type ?u.140140
R : Type u₂
𝕜 : Type u_1
inst✝³ : Field 𝕜
inst✝² : DecidableEq n
inst✝¹ : DecidableEq p
inst✝ : CommRing R
r : ℕ
M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜
i : Fin r ⊕ Unit
k : ℕ
hk : k ≤ r
⊢ ∀ (k_1 : ℕ),
    k_1 < r →
      k ≤ k_1 →
        (List.prod (List.drop (k_1 + 1) (listTransvecCol M)) ⬝ M) (inr ()) i = M (inr ()) i →
          (List.prod (List.drop k_1 (listTransvecCol M)) ⬝ M) (inr ()) i = M (inr ()) i

tactic: have hn' : n < (listTransvecCol M).length := by simpa [listTransvecCol] using hn
state_before: case refine'_1
n✝ : Type ?u.140137
p : Type ?u.140140
R : Type u₂
𝕜 : Type u_1
inst✝³ : Field 𝕜
inst✝² : DecidableEq n✝
inst✝¹ : DecidableEq p
inst✝ : CommRing R
r : ℕ
M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜
i : Fin r ⊕ Unit
k : ℕ
hk : k ≤ r
n : ℕ
hn : n < r
a✝ : k ≤ n
IH : (List.prod (List.drop (n + 1) (listTransvecCol M)) ⬝ M) (inr ()) i = M (inr ()) i
⊢ (List.prod (List.drop n (listTransvecCol M)) ⬝ M) (inr ()) i = M (inr ()) i

tactic: rw [← @List.cons_get_drop_succ _ _ ⟨n, hn'⟩]
state_before: case refine'_1
n✝ : Type ?u.140137
p : Type ?u.140140
R : Type u₂
𝕜 : Type u_1
inst✝³ : Field 𝕜
inst✝² : DecidableEq n✝
inst✝¹ : DecidableEq p
inst✝ : CommRing R
r : ℕ
M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜
i : Fin r ⊕ Unit
k : ℕ
hk : k ≤ r
n : ℕ
hn : n < r
a✝ : k ≤ n
IH : (List.prod (List.drop (n + 1) (listTransvecCol M)) ⬝ M) (inr ()) i = M (inr ()) i
hn' : n < List.length (listTransvecCol M)
⊢ (List.prod (List.drop n (listTransvecCol M)) ⬝ M) (inr ()) i = M (inr ()) i

tactic: simpa [listTransvecCol, Matrix.mul_assoc]
state_before: case refine'_1
n✝ : Type ?u.140137
p : Type ?u.140140
R : Type u₂
𝕜 : Type u_1
inst✝³ : Field 𝕜
inst✝² : DecidableEq n✝
inst✝¹ : DecidableEq p
inst✝ : CommRing R
r : ℕ
M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜
i : Fin r ⊕ Unit
k : ℕ
hk : k ≤ r
n : ℕ
hn : n < r
a✝ : k ≤ n
IH : (List.prod (List.drop (n + 1) (listTransvecCol M)) ⬝ M) (inr ()) i = M (inr ()) i
hn' : n < List.length (listTransvecCol M)
⊢ (List.prod
          (List.get (listTransvecCol M) { val := n, isLt := hn' } ::
            List.drop (↑{ val := n, isLt := hn' } + 1) (listTransvecCol M)) ⬝
        M)
      (inr ()) i =
    M (inr ()) i

tactic: simpa [listTransvecCol] using hn
state_before: n✝ : Type ?u.140137
p : Type ?u.140140
R : Type u₂
𝕜 : Type u_1
inst✝³ : Field 𝕜
inst✝² : DecidableEq n✝
inst✝¹ : DecidableEq p
inst✝ : CommRing R
r : ℕ
M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜
i : Fin r ⊕ Unit
k : ℕ
hk : k ≤ r
n : ℕ
hn : n < r
a✝ : k ≤ n
IH : (List.prod (List.drop (n + 1) (listTransvecCol M)) ⬝ M) (inr ()) i = M (inr ()) i
⊢ n < List.length (listTransvecCol M)

tactic: simp only [listTransvecCol, List.length_ofFn, le_refl, List.drop_eq_nil_of_le, List.prod_nil,
  Matrix.one_mul]
state_before: case refine'_2
n : Type ?u.140137
p : Type ?u.140140
R : Type u₂
𝕜 : Type u_1
inst✝³ : Field 𝕜
inst✝² : DecidableEq n
inst✝¹ : DecidableEq p
inst✝ : CommRing R
r : ℕ
M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜
i : Fin r ⊕ Unit
k : ℕ
hk : k ≤ r
⊢ (List.prod (List.drop r (listTransvecCol M)) ⬝ M) (inr ()) i = M (inr ()) i