Theorem: Matrix.compAlgEquiv_symm_apply
File: Mathlib/Data/Matrix/Composition.lean

Proof steps:
state_before: I : Type u_1
J : Type u_2
K✝ : Type u_3
L : Type u_4
R : Type u_5
K : Type u_6
inst✝⁶ : CommSemiring K
inst✝⁵ : Semiring R
inst✝⁴ : Fintype I
inst✝³ : Fintype J
inst✝² : Algebra K R
inst✝¹ : DecidableEq I
inst✝ : DecidableEq J
c : K
⊢ __spread✝⁻⁰.toFun ((algebraMap K (Matrix I I (Matrix J J R))) c) = (algebraMap K (Matrix (I × J) (I × J) R)) c
state_after: case a
I : Type u_1
J : Type u_2
K✝ : Type u_3
L : Type u_4
R : Type u_5
K : Type u_6
inst✝⁶ : CommSemiring K
inst✝⁵ : Semiring R
inst✝⁴ : Fintype I
inst✝³ : Fintype J
inst✝² : Algebra K R
inst✝¹ : DecidableEq I
inst✝ : DecidableEq J
c : K
i✝ j✝ : I × J
⊢ __spread✝⁻⁰.toFun ((algebraMap K (Matrix I I (Matrix J J R))) c) i✝ j✝ =
    (algebraMap K (Matrix (I × J) (I × J) R)) c i✝ j✝
tactic: ext _ _
state_before: case a
I : Type u_1
J : Type u_2
K✝ : Type u_3
L : Type u_4
R : Type u_5
K : Type u_6
inst✝⁶ : CommSemiring K
inst✝⁵ : Semiring R
inst✝⁴ : Fintype I
inst✝³ : Fintype J
inst✝² : Algebra K R
inst✝¹ : DecidableEq I
inst✝ : DecidableEq J
c : K
i✝ j✝ : I × J
⊢ __spread✝⁻⁰.toFun ((algebraMap K (Matrix I I (Matrix J J R))) c) i✝ j✝ =
    (algebraMap K (Matrix (I × J) (I × J) R)) c i✝ j✝
state_after: case a
I : Type u_1
J : Type u_2
K✝ : Type u_3
L : Type u_4
R : Type u_5
K : Type u_6
inst✝⁶ : CommSemiring K
inst✝⁵ : Semiring R
inst✝⁴ : Fintype I
inst✝³ : Fintype J
inst✝² : Algebra K R
inst✝¹ : DecidableEq I
inst✝ : DecidableEq J
c : K
i✝ j✝ : I × J
⊢ diagonal ((algebraMap K (I → Matrix J J R)) c) i✝.1 j✝.1 i✝.2 j✝.2 = diagonal ((algebraMap K (I × J → R)) c) i✝ j✝
tactic: simp only [compRingEquiv, compAddEquiv, comp, AddEquiv.toEquiv_eq_coe, RingEquiv.toEquiv_eq_coe,
      Equiv.toFun_as_coe, EquivLike.coe_coe, RingEquiv.coe_mk, AddEquiv.coe_mk, Equiv.coe_fn_mk,
      algebraMap_eq_diagonal]
state_before: case a
I : Type u_1
J : Type u_2
K✝ : Type u_3
L : Type u_4
R : Type u_5
K : Type u_6
inst✝⁶ : CommSemiring K
inst✝⁵ : Semiring R
inst✝⁴ : Fintype I
inst✝³ : Fintype J
inst✝² : Algebra K R
inst✝¹ : DecidableEq I
inst✝ : DecidableEq J
c : K
i✝ j✝ : I × J
⊢ diagonal ((algebraMap K (I → Matrix J J R)) c) i✝.1 j✝.1 i✝.2 j✝.2 = diagonal ((algebraMap K (I × J → R)) c) i✝ j✝
state_after: case a
I : Type u_1
J : Type u_2
K✝ : Type u_3
L : Type u_4
R : Type u_5
K : Type u_6
inst✝⁶ : CommSemiring K
inst✝⁵ : Semiring R
inst✝⁴ : Fintype I
inst✝³ : Fintype J
inst✝² : Algebra K R
inst✝¹ : DecidableEq I
inst✝ : DecidableEq J
c : K
i✝ j✝ : I × J
⊢ (if i✝.1 = j✝.1 then (fun r => r • diagonal fun x => 1) c else 0) i✝.2 j✝.2 =
    if i✝ = j✝ then (fun r => r • 1) c else 0
tactic: rw [Pi.algebraMap_def, Pi.algebraMap_def, Algebra.algebraMap_eq_smul_one',
      Algebra.algebraMap_eq_smul_one', ← diagonal_one, diagonal_apply, diagonal_apply]
state_before: case a
I : Type u_1
J : Type u_2
K✝ : Type u_3
L : Type u_4
R : Type u_5
K : Type u_6
inst✝⁶ : CommSemiring K
inst✝⁵ : Semiring R
inst✝⁴ : Fintype I
inst✝³ : Fintype J
inst✝² : Algebra K R
inst✝¹ : DecidableEq I
inst✝ : DecidableEq J
c : K
i✝ j✝ : I × J
⊢ (if i✝.1 = j✝.1 then (fun r => r • diagonal fun x => 1) c else 0) i✝.2 j✝.2 =
    if i✝ = j✝ then (fun r => r • 1) c else 0
state_after: no goals
tactic: aesop