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

tactic: rcases H with ⟨L₀, L₀', D₀, h₀⟩
state_before: n : Type u_3
p : Type u_1
R : Type u₂
𝕜 : Type u_2
inst✝⁵ : Field 𝕜
inst✝⁴ : DecidableEq n
inst✝³ : DecidableEq p
inst✝² : CommRing R
r : ℕ
M✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜
inst✝¹ : Fintype n
inst✝ : Fintype p
M : Matrix p p 𝕜
e : p ≃ n
H : ∃ L L' D, List.prod (List.map toMatrix L) ⬝ ↑(reindexAlgEquiv 𝕜 e) M ⬝ List.prod (List.map toMatrix L') = diagonal D
⊢ ∃ L L' D, List.prod (List.map toMatrix L) ⬝ M ⬝ List.prod (List.map toMatrix L') = diagonal D

tactic: refine' ⟨L₀.map (reindexEquiv e.symm), L₀'.map (reindexEquiv e.symm), D₀ ∘ e, _⟩
state_before: case intro.intro.intro
n : Type u_3
p : Type u_1
R : Type u₂
𝕜 : Type u_2
inst✝⁵ : Field 𝕜
inst✝⁴ : DecidableEq n
inst✝³ : DecidableEq p
inst✝² : CommRing R
r : ℕ
M✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜
inst✝¹ : Fintype n
inst✝ : Fintype p
M : Matrix p p 𝕜
e : p ≃ n
L₀ L₀' : List (TransvectionStruct n 𝕜)
D₀ : n → 𝕜
h₀ : List.prod (List.map toMatrix L₀) ⬝ ↑(reindexAlgEquiv 𝕜 e) M ⬝ List.prod (List.map toMatrix L₀') = diagonal D₀
⊢ ∃ L L' D, List.prod (List.map toMatrix L) ⬝ M ⬝ List.prod (List.map toMatrix L') = diagonal D

tactic: have : M = reindexAlgEquiv 𝕜 e.symm (reindexAlgEquiv 𝕜 e M) := by
  simp only [Equiv.symm_symm, submatrix_submatrix, reindex_apply, submatrix_id_id,
    Equiv.symm_comp_self, reindexAlgEquiv_apply]
state_before: case intro.intro.intro
n : Type u_3
p : Type u_1
R : Type u₂
𝕜 : Type u_2
inst✝⁵ : Field 𝕜
inst✝⁴ : DecidableEq n
inst✝³ : DecidableEq p
inst✝² : CommRing R
r : ℕ
M✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜
inst✝¹ : Fintype n
inst✝ : Fintype p
M : Matrix p p 𝕜
e : p ≃ n
L₀ L₀' : List (TransvectionStruct n 𝕜)
D₀ : n → 𝕜
h₀ : List.prod (List.map toMatrix L₀) ⬝ ↑(reindexAlgEquiv 𝕜 e) M ⬝ List.prod (List.map toMatrix L₀') = diagonal D₀
⊢ List.prod (List.map toMatrix (List.map (reindexEquiv e.symm) L₀)) ⬝ M ⬝
      List.prod (List.map toMatrix (List.map (reindexEquiv e.symm) L₀')) =
    diagonal (D₀ ∘ ↑e)

tactic: rw [this]
state_before: case intro.intro.intro
n : Type u_3
p : Type u_1
R : Type u₂
𝕜 : Type u_2
inst✝⁵ : Field 𝕜
inst✝⁴ : DecidableEq n
inst✝³ : DecidableEq p
inst✝² : CommRing R
r : ℕ
M✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜
inst✝¹ : Fintype n
inst✝ : Fintype p
M : Matrix p p 𝕜
e : p ≃ n
L₀ L₀' : List (TransvectionStruct n 𝕜)
D₀ : n → 𝕜
h₀ : List.prod (List.map toMatrix L₀) ⬝ ↑(reindexAlgEquiv 𝕜 e) M ⬝ List.prod (List.map toMatrix L₀') = diagonal D₀
this : M = ↑(reindexAlgEquiv 𝕜 e.symm) (↑(reindexAlgEquiv 𝕜 e) M)
⊢ List.prod (List.map toMatrix (List.map (reindexEquiv e.symm) L₀)) ⬝ M ⬝
      List.prod (List.map toMatrix (List.map (reindexEquiv e.symm) L₀')) =
    diagonal (D₀ ∘ ↑e)

tactic: simp only [toMatrix_reindexEquiv_prod, List.map_map, reindexAlgEquiv_apply]
state_before: case intro.intro.intro
n : Type u_3
p : Type u_1
R : Type u₂
𝕜 : Type u_2
inst✝⁵ : Field 𝕜
inst✝⁴ : DecidableEq n
inst✝³ : DecidableEq p
inst✝² : CommRing R
r : ℕ
M✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜
inst✝¹ : Fintype n
inst✝ : Fintype p
M : Matrix p p 𝕜
e : p ≃ n
L₀ L₀' : List (TransvectionStruct n 𝕜)
D₀ : n → 𝕜
h₀ : List.prod (List.map toMatrix L₀) ⬝ ↑(reindexAlgEquiv 𝕜 e) M ⬝ List.prod (List.map toMatrix L₀') = diagonal D₀
this : M = ↑(reindexAlgEquiv 𝕜 e.symm) (↑(reindexAlgEquiv 𝕜 e) M)
⊢ List.prod (List.map toMatrix (List.map (reindexEquiv e.symm) L₀)) ⬝
        ↑(reindexAlgEquiv 𝕜 e.symm) (↑(reindexAlgEquiv 𝕜 e) M) ⬝
      List.prod (List.map toMatrix (List.map (reindexEquiv e.symm) L₀')) =
    diagonal (D₀ ∘ ↑e)

tactic: simp only [← reindexAlgEquiv_apply, ← reindexAlgEquiv_mul, h₀]
state_before: case intro.intro.intro
n : Type u_3
p : Type u_1
R : Type u₂
𝕜 : Type u_2
inst✝⁵ : Field 𝕜
inst✝⁴ : DecidableEq n
inst✝³ : DecidableEq p
inst✝² : CommRing R
r : ℕ
M✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜
inst✝¹ : Fintype n
inst✝ : Fintype p
M : Matrix p p 𝕜
e : p ≃ n
L₀ L₀' : List (TransvectionStruct n 𝕜)
D₀ : n → 𝕜
h₀ : List.prod (List.map toMatrix L₀) ⬝ ↑(reindexAlgEquiv 𝕜 e) M ⬝ List.prod (List.map toMatrix L₀') = diagonal D₀
this : M = ↑(reindexAlgEquiv 𝕜 e.symm) (↑(reindexAlgEquiv 𝕜 e) M)
⊢ ↑(reindex e.symm e.symm) (List.prod (List.map toMatrix L₀)) ⬝ ↑(reindex e.symm e.symm) (↑(reindex e e) M) ⬝
      ↑(reindex e.symm e.symm) (List.prod (List.map toMatrix L₀')) =
    diagonal (D₀ ∘ ↑e)

tactic: simp only [Equiv.symm_symm, reindex_apply, submatrix_diagonal_equiv, reindexAlgEquiv_apply]
state_before: case intro.intro.intro
n : Type u_3
p : Type u_1
R : Type u₂
𝕜 : Type u_2
inst✝⁵ : Field 𝕜
inst✝⁴ : DecidableEq n
inst✝³ : DecidableEq p
inst✝² : CommRing R
r : ℕ
M✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜
inst✝¹ : Fintype n
inst✝ : Fintype p
M : Matrix p p 𝕜
e : p ≃ n
L₀ L₀' : List (TransvectionStruct n 𝕜)
D₀ : n → 𝕜
h₀ : List.prod (List.map toMatrix L₀) ⬝ ↑(reindexAlgEquiv 𝕜 e) M ⬝ List.prod (List.map toMatrix L₀') = diagonal D₀
this : M = ↑(reindexAlgEquiv 𝕜 e.symm) (↑(reindexAlgEquiv 𝕜 e) M)
⊢ ↑(reindexAlgEquiv 𝕜 e.symm) (diagonal D₀) = diagonal (D₀ ∘ ↑e)

tactic: simp only [Equiv.symm_symm, submatrix_submatrix, reindex_apply, submatrix_id_id,
  Equiv.symm_comp_self, reindexAlgEquiv_apply]
state_before: n : Type u_3
p : Type u_1
R : Type u₂
𝕜 : Type u_2
inst✝⁵ : Field 𝕜
inst✝⁴ : DecidableEq n
inst✝³ : DecidableEq p
inst✝² : CommRing R
r : ℕ
M✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜
inst✝¹ : Fintype n
inst✝ : Fintype p
M : Matrix p p 𝕜
e : p ≃ n
L₀ L₀' : List (TransvectionStruct n 𝕜)
D₀ : n → 𝕜
h₀ : List.prod (List.map toMatrix L₀) ⬝ ↑(reindexAlgEquiv 𝕜 e) M ⬝ List.prod (List.map toMatrix L₀') = diagonal D₀
⊢ M = ↑(reindexAlgEquiv 𝕜 e.symm) (↑(reindexAlgEquiv 𝕜 e) M)