File: Mathlib/LinearAlgebra/Matrix/ToLin.lean

full_name: Matrix.vecMulLinear
code: /-- `Matrix.vecMul M` is a linear map. -/
def Matrix.vecMulLinear [Fintype m] (M : Matrix m n R) : (m → R) →ₗ[R] n → R 
goal: (m → R) →ₗ[R] n → R

full_name: Matrix.vecMulLinear_apply
code: @[simp] theorem Matrix.vecMulLinear_apply [Fintype m] (M : Matrix m n R) (x : m → R) :
    M.vecMulLinear x = x ᵥ* M 
goal: M.vecMulLinear x = x ᵥ* M

full_name: Matrix.coe_vecMulLinear
code: theorem Matrix.coe_vecMulLinear [Fintype m] (M : Matrix m n R) :
    (M.vecMulLinear : _ → _) = M.vecMul 
goal: ⇑M.vecMulLinear = fun v => v ᵥ* M

full_name: Matrix.vecMul_stdBasis
code: @[simp]
theorem Matrix.vecMul_stdBasis (M : Matrix m n R) (i j) :
    (LinearMap.stdBasis R (fun _ ↦ R) i 1 ᵥ* M) j = M i j 
goal: ((LinearMap.stdBasis R (fun x => R) i) 1 ᵥ* M) j = M i j

full_name: range_vecMulLinear
code: theorem range_vecMulLinear (M : Matrix m n R) :
    LinearMap.range M.vecMulLinear = span R (range M) 
goal: LinearMap.range M.vecMulLinear = Submodule.span R (Set.range M)

full_name: Matrix.vecMul_injective_iff
code: theorem Matrix.vecMul_injective_iff {R : Type*} [CommRing R] {M : Matrix m n R} :
    Function.Injective M.vecMul ↔ LinearIndependent R (fun i ↦ M i) 
goal: (Function.Injective fun v => v ᵥ* M) ↔ LinearIndependent R fun i => M i

full_name: LinearMap.toMatrixRight'
code: /-- Linear maps `(m → R) →ₗ[R] (n → R)` are linearly equivalent over `Rᵐᵒᵖ` to `Matrix m n R`,
by having matrices act by right multiplication.
 -/
def LinearMap.toMatrixRight' : ((m → R) →ₗ[R] n → R) ≃ₗ[Rᵐᵒᵖ] Matrix m n R 
goal: ((m → R) →ₗ[R] n → R) ≃ₗ[Rᵐᵒᵖ] Matrix m n R

full_name: Matrix.toLinearMapRight'
code: /-- A `Matrix m n R` is linearly equivalent over `Rᵐᵒᵖ` to a linear map `(m → R) →ₗ[R] (n → R)`,
by having matrices act by right multiplication. -/
abbrev Matrix.toLinearMapRight' : Matrix m n R ≃ₗ[Rᵐᵒᵖ] (m → R) →ₗ[R] n → R 
goal: Matrix m n R ≃ₗ[Rᵐᵒᵖ] (m → R) →ₗ[R] n → R

full_name: Matrix.toLinearMapRight'_apply
code: @[simp]
theorem Matrix.toLinearMapRight'_apply (M : Matrix m n R) (v : m → R) :
    (Matrix.toLinearMapRight') M v = v ᵥ* M 
goal: (Matrix.toLinearMapRight' M) v = v ᵥ* M

full_name: Matrix.toLinearMapRight'_mul
code: @[simp]
theorem Matrix.toLinearMapRight'_mul [Fintype l] [DecidableEq l] (M : Matrix l m R)
    (N : Matrix m n R) :
    Matrix.toLinearMapRight' (M * N) =
      (Matrix.toLinearMapRight' N).comp (Matrix.toLinearMapRight' M) 
goal: Matrix.toLinearMapRight' (M * N) = Matrix.toLinearMapRight' N ∘ₗ Matrix.toLinearMapRight' M

full_name: Matrix.toLinearMapRight'_mul_apply
code: theorem Matrix.toLinearMapRight'_mul_apply [Fintype l] [DecidableEq l] (M : Matrix l m R)
    (N : Matrix m n R) (x) :
    Matrix.toLinearMapRight' (M * N) x =
      Matrix.toLinearMapRight' N (Matrix.toLinearMapRight' M x) 
goal: (Matrix.toLinearMapRight' (M * N)) x = (Matrix.toLinearMapRight' N) ((Matrix.toLinearMapRight' M) x)

full_name: Matrix.toLinearMapRight'_one
code: @[simp]
theorem Matrix.toLinearMapRight'_one :
    Matrix.toLinearMapRight' (1 : Matrix m m R) = LinearMap.id 
goal: Matrix.toLinearMapRight' 1 = LinearMap.id

full_name: Matrix.toLinearEquivRight'OfInv_apply
code: /-- If `M` and `M'` are each other's inverse matrices, they provide an equivalence between `n → A`
and `m → A` corresponding to `M.vecMul` and `M'.vecMul`. -/
@[simps]
def Matrix.toLinearEquivRight'OfInv [Fintype n] [DecidableEq n] {M : Matrix m n R}
    {M' : Matrix n m R} (hMM' : M * M' = 1) (hM'M : M' * M = 1) : (n → R) ≃ₗ[R] m → R 
goal: ∀ (a_1 : m), (Matrix.toLinearEquivRight'OfInv hMM' hM'M) a a_1 = (Matrix.toLinearMapRight' M') a a_1

full_name: Matrix.toLinearEquivRight'OfInv_symm_apply
code: /-- If `M` and `M'` are each other's inverse matrices, they provide an equivalence between `n → A`
and `m → A` corresponding to `M.vecMul` and `M'.vecMul`. -/
@[simps]
def Matrix.toLinearEquivRight'OfInv [Fintype n] [DecidableEq n] {M : Matrix m n R}
    {M' : Matrix n m R} (hMM' : M * M' = 1) (hM'M : M' * M = 1) : (n → R) ≃ₗ[R] m → R 
goal: ∀ (a_1 : n), (Matrix.toLinearEquivRight'OfInv hMM' hM'M).symm a a_1 = (Matrix.toLinearMapRight' M) a a_1

full_name: Matrix.toLinearEquivRight'OfInv
code: /-- If `M` and `M'` are each other's inverse matrices, they provide an equivalence between `n → A`
and `m → A` corresponding to `M.vecMul` and `M'.vecMul`. -/
@[simps]
def Matrix.toLinearEquivRight'OfInv [Fintype n] [DecidableEq n] {M : Matrix m n R}
    {M' : Matrix n m R} (hMM' : M * M' = 1) (hM'M : M' * M = 1) : (n → R) ≃ₗ[R] m → R 
goal: (n → R) ≃ₗ[R] m → R

full_name: Matrix.mulVecLin
code: /-- `Matrix.mulVec M` is a linear map. -/
def Matrix.mulVecLin [Fintype n] (M : Matrix m n R) : (n → R) →ₗ[R] m → R 
goal: (n → R) →ₗ[R] m → R

full_name: Matrix.coe_mulVecLin
code: theorem Matrix.coe_mulVecLin [Fintype n] (M : Matrix m n R) :
    (M.mulVecLin : _ → _) = M.mulVec 
goal: ⇑M.mulVecLin = M.mulVec

full_name: Matrix.mulVecLin_apply
code: @[simp]
theorem Matrix.mulVecLin_apply [Fintype n] (M : Matrix m n R) (v : n → R) :
    M.mulVecLin v = M *ᵥ v 
goal: M.mulVecLin v = M *ᵥ v

full_name: Matrix.mulVecLin_zero
code: @[simp]
theorem Matrix.mulVecLin_zero [Fintype n] : Matrix.mulVecLin (0 : Matrix m n R) = 0 
goal: Matrix.mulVecLin 0 = 0

full_name: Matrix.mulVecLin_add
code: @[simp]
theorem Matrix.mulVecLin_add [Fintype n] (M N : Matrix m n R) :
    (M + N).mulVecLin = M.mulVecLin + N.mulVecLin 
goal: (M + N).mulVecLin = M.mulVecLin + N.mulVecLin

full_name: Matrix.mulVecLin_transpose
code: @[simp] theorem Matrix.mulVecLin_transpose [Fintype m] (M : Matrix m n R) :
    Mᵀ.mulVecLin = M.vecMulLinear 
goal: Mᵀ.mulVecLin = M.vecMulLinear

full_name: Matrix.vecMulLinear_transpose
code: @[simp] theorem Matrix.vecMulLinear_transpose [Fintype n] (M : Matrix m n R) :
    Mᵀ.vecMulLinear = M.mulVecLin 
goal: Mᵀ.vecMulLinear = M.mulVecLin

full_name: Matrix.mulVecLin_submatrix
code: theorem Matrix.mulVecLin_submatrix [Fintype n] [Fintype l] (f₁ : m → k) (e₂ : n ≃ l)
    (M : Matrix k l R) :
    (M.submatrix f₁ e₂).mulVecLin = funLeft R R f₁ ∘ₗ M.mulVecLin ∘ₗ funLeft _ _ e₂.symm 
goal: (M.submatrix f₁ ⇑e₂).mulVecLin = LinearMap.funLeft R R f₁ ∘ₗ M.mulVecLin ∘ₗ LinearMap.funLeft R R ⇑e₂.symm

full_name: Matrix.mulVecLin_reindex
code: /-- A variant of `Matrix.mulVecLin_submatrix` that keeps around `LinearEquiv`s. -/
theorem Matrix.mulVecLin_reindex [Fintype n] [Fintype l] (e₁ : k ≃ m) (e₂ : l ≃ n)
    (M : Matrix k l R) :
    (reindex e₁ e₂ M).mulVecLin =
      ↑(LinearEquiv.funCongrLeft R R e₁.symm) ∘ₗ
        M.mulVecLin ∘ₗ ↑(LinearEquiv.funCongrLeft R R e₂) 
goal: ((Matrix.reindex e₁ e₂) M).mulVecLin =
  ↑(LinearEquiv.funCongrLeft R R e₁.symm) ∘ₗ M.mulVecLin ∘ₗ ↑(LinearEquiv.funCongrLeft R R e₂)

full_name: Matrix.mulVecLin_one
code: @[simp]
theorem Matrix.mulVecLin_one [DecidableEq n] :
    Matrix.mulVecLin (1 : Matrix n n R) = LinearMap.id 
goal: Matrix.mulVecLin 1 = LinearMap.id

full_name: Matrix.mulVecLin_mul
code: @[simp]
theorem Matrix.mulVecLin_mul [Fintype m] (M : Matrix l m R) (N : Matrix m n R) :
    Matrix.mulVecLin (M * N) = (Matrix.mulVecLin M).comp (Matrix.mulVecLin N) 
goal: (M * N).mulVecLin = M.mulVecLin ∘ₗ N.mulVecLin

full_name: Matrix.ker_mulVecLin_eq_bot_iff
code: theorem Matrix.ker_mulVecLin_eq_bot_iff {M : Matrix m n R} :
    (LinearMap.ker M.mulVecLin) = ⊥ ↔ ∀ v, M *ᵥ v = 0 → v = 0 
goal: LinearMap.ker M.mulVecLin = ⊥ ↔ ∀ (v : n → R), M *ᵥ v = 0 → v = 0

full_name: Matrix.mulVec_stdBasis
code: theorem Matrix.mulVec_stdBasis [DecidableEq n] (M : Matrix m n R) (i j) :
    (M *ᵥ LinearMap.stdBasis R (fun _ ↦ R) j 1) i = M i j 
goal: (M *ᵥ (LinearMap.stdBasis R (fun x => R) j) 1) i = M i j

full_name: Matrix.mulVec_stdBasis_apply
code: @[simp]
theorem Matrix.mulVec_stdBasis_apply [DecidableEq n] (M : Matrix m n R) (j) :
    M *ᵥ LinearMap.stdBasis R (fun _ ↦ R) j 1 = Mᵀ j 
goal: M *ᵥ (LinearMap.stdBasis R (fun x => R) j) 1 = Mᵀ j

full_name: Matrix.range_mulVecLin
code: theorem Matrix.range_mulVecLin (M : Matrix m n R) :
    LinearMap.range M.mulVecLin = span R (range Mᵀ) 
goal: LinearMap.range M.mulVecLin = Submodule.span R (Set.range Mᵀ)

full_name: Matrix.mulVec_injective_iff
code: theorem Matrix.mulVec_injective_iff {R : Type*} [CommRing R] {M : Matrix m n R} :
    Function.Injective M.mulVec ↔ LinearIndependent R (fun i ↦ Mᵀ i) 
goal: Function.Injective M.mulVec ↔ LinearIndependent R fun i => Mᵀ i

full_name: LinearMap.toMatrix'
code: /-- Linear maps `(n → R) →ₗ[R] (m → R)` are linearly equivalent to `Matrix m n R`. -/
def LinearMap.toMatrix' : ((n → R) →ₗ[R] m → R) ≃ₗ[R] Matrix m n R 
goal: ((n → R) →ₗ[R] m → R) ≃ₗ[R] Matrix m n R

full_name: Matrix.toLin'
code: /-- A `Matrix m n R` is linearly equivalent to a linear map `(n → R) →ₗ[R] (m → R)`.

Note that the forward-direction does not require `DecidableEq` and is `Matrix.vecMulLin`. -/
def Matrix.toLin' : Matrix m n R ≃ₗ[R] (n → R) →ₗ[R] m → R 
goal: Matrix m n R ≃ₗ[R] (n → R) →ₗ[R] m → R

full_name: Matrix.toLin'_apply'
code: theorem Matrix.toLin'_apply' (M : Matrix m n R) : Matrix.toLin' M = M.mulVecLin 
goal: Matrix.toLin' M = M.mulVecLin

full_name: LinearMap.toMatrix'_symm
code: @[simp]
theorem LinearMap.toMatrix'_symm :
    (LinearMap.toMatrix'.symm : Matrix m n R ≃ₗ[R] _) = Matrix.toLin' 
goal: LinearMap.toMatrix'.symm = Matrix.toLin'

full_name: Matrix.toLin'_symm
code: @[simp]
theorem Matrix.toLin'_symm :
    (Matrix.toLin'.symm : ((n → R) →ₗ[R] m → R) ≃ₗ[R] _) = LinearMap.toMatrix' 
goal: Matrix.toLin'.symm = LinearMap.toMatrix'

full_name: LinearMap.toMatrix'_toLin'
code: @[simp]
theorem LinearMap.toMatrix'_toLin' (M : Matrix m n R) : LinearMap.toMatrix' (Matrix.toLin' M) = M 
goal: LinearMap.toMatrix' (Matrix.toLin' M) = M

full_name: Matrix.toLin'_toMatrix'
code: @[simp]
theorem Matrix.toLin'_toMatrix' (f : (n → R) →ₗ[R] m → R) :
    Matrix.toLin' (LinearMap.toMatrix' f) = f 
goal: Matrix.toLin' (LinearMap.toMatrix' f) = f

full_name: LinearMap.toMatrix'_apply
code: @[simp]
theorem LinearMap.toMatrix'_apply (f : (n → R) →ₗ[R] m → R) (i j) :
    LinearMap.toMatrix' f i j = f (fun j' ↦ if j' = j then 1 else 0) i 
goal: LinearMap.toMatrix' f i j = f (fun j' => if j' = j then 1 else 0) i

full_name: Matrix.toLin'_apply
code: @[simp]
theorem Matrix.toLin'_apply (M : Matrix m n R) (v : n → R) : Matrix.toLin' M v = M *ᵥ v 
goal: (Matrix.toLin' M) v = M *ᵥ v

full_name: Matrix.toLin'_one
code: @[simp]
theorem Matrix.toLin'_one : Matrix.toLin' (1 : Matrix n n R) = LinearMap.id 
goal: Matrix.toLin' 1 = LinearMap.id

full_name: LinearMap.toMatrix'_id
code: @[simp]
theorem LinearMap.toMatrix'_id : LinearMap.toMatrix' (LinearMap.id : (n → R) →ₗ[R] n → R) = 1 
goal: LinearMap.toMatrix' LinearMap.id = 1

full_name: LinearMap.toMatrix'_one
code: @[simp]
theorem LinearMap.toMatrix'_one : LinearMap.toMatrix' (1 : (n → R) →ₗ[R] n → R) = 1 
goal: LinearMap.toMatrix' 1 = 1

full_name: Matrix.toLin'_mul
code: @[simp]
theorem Matrix.toLin'_mul [Fintype m] [DecidableEq m] (M : Matrix l m R) (N : Matrix m n R) :
    Matrix.toLin' (M * N) = (Matrix.toLin' M).comp (Matrix.toLin' N) 
goal: Matrix.toLin' (M * N) = Matrix.toLin' M ∘ₗ Matrix.toLin' N

full_name: Matrix.toLin'_submatrix
code: @[simp]
theorem Matrix.toLin'_submatrix [Fintype l] [DecidableEq l] (f₁ : m → k) (e₂ : n ≃ l)
    (M : Matrix k l R) :
    Matrix.toLin' (M.submatrix f₁ e₂) =
      funLeft R R f₁ ∘ₗ (Matrix.toLin' M) ∘ₗ funLeft _ _ e₂.symm 
goal: Matrix.toLin' (M.submatrix f₁ ⇑e₂) = LinearMap.funLeft R R f₁ ∘ₗ Matrix.toLin' M ∘ₗ LinearMap.funLeft R R ⇑e₂.symm

full_name: Matrix.toLin'_reindex
code: /-- A variant of `Matrix.toLin'_submatrix` that keeps around `LinearEquiv`s. -/
theorem Matrix.toLin'_reindex [Fintype l] [DecidableEq l] (e₁ : k ≃ m) (e₂ : l ≃ n)
    (M : Matrix k l R) :
    Matrix.toLin' (reindex e₁ e₂ M) =
      ↑(LinearEquiv.funCongrLeft R R e₁.symm) ∘ₗ (Matrix.toLin' M) ∘ₗ
        ↑(LinearEquiv.funCongrLeft R R e₂) 
goal: Matrix.toLin' ((Matrix.reindex e₁ e₂) M) =
  ↑(LinearEquiv.funCongrLeft R R e₁.symm) ∘ₗ Matrix.toLin' M ∘ₗ ↑(LinearEquiv.funCongrLeft R R e₂)

full_name: Matrix.toLin'_mul_apply
code: /-- Shortcut lemma for `Matrix.toLin'_mul` and `LinearMap.comp_apply` -/
theorem Matrix.toLin'_mul_apply [Fintype m] [DecidableEq m] (M : Matrix l m R) (N : Matrix m n R)
    (x) : Matrix.toLin' (M * N) x = Matrix.toLin' M (Matrix.toLin' N x) 
goal: (Matrix.toLin' (M * N)) x = (Matrix.toLin' M) ((Matrix.toLin' N) x)

full_name: LinearMap.toMatrix'_comp
code: theorem LinearMap.toMatrix'_comp [Fintype l] [DecidableEq l] (f : (n → R) →ₗ[R] m → R)
    (g : (l → R) →ₗ[R] n → R) :
    LinearMap.toMatrix' (f.comp g) = LinearMap.toMatrix' f * LinearMap.toMatrix' g 
goal: LinearMap.toMatrix' (f ∘ₗ g) = LinearMap.toMatrix' f * LinearMap.toMatrix' g

full_name: LinearMap.toMatrix'_mul
code: theorem LinearMap.toMatrix'_mul [Fintype m] [DecidableEq m] (f g : (m → R) →ₗ[R] m → R) :
    LinearMap.toMatrix' (f * g) = LinearMap.toMatrix' f * LinearMap.toMatrix' g 
goal: LinearMap.toMatrix' (f * g) = LinearMap.toMatrix' f * LinearMap.toMatrix' g

full_name: LinearMap.toMatrix'_algebraMap
code: @[simp]
theorem LinearMap.toMatrix'_algebraMap (x : R) :
    LinearMap.toMatrix' (algebraMap R (Module.End R (n → R)) x) = scalar n x 
goal: LinearMap.toMatrix' ((algebraMap R (Module.End R (n → R))) x) = (Matrix.scalar n) x

full_name: Matrix.ker_toLin'_eq_bot_iff
code: theorem Matrix.ker_toLin'_eq_bot_iff {M : Matrix n n R} :
    LinearMap.ker (Matrix.toLin' M) = ⊥ ↔ ∀ v, M *ᵥ v = 0 → v = 0 
goal: LinearMap.ker (Matrix.toLin' M) = ⊥ ↔ ∀ (v : n → R), M *ᵥ v = 0 → v = 0

full_name: Matrix.range_toLin'
code: theorem Matrix.range_toLin' (M : Matrix m n R) :
    LinearMap.range (Matrix.toLin' M) = span R (range Mᵀ) 
goal: LinearMap.range (Matrix.toLin' M) = Submodule.span R (Set.range Mᵀ)

full_name: Matrix.toLin'OfInv_symm_apply
code: /-- If `M` and `M'` are each other's inverse matrices, they provide an equivalence between `m → A`
and `n → A` corresponding to `M.mulVec` and `M'.mulVec`. -/
@[simps]
def Matrix.toLin'OfInv [Fintype m] [DecidableEq m] {M : Matrix m n R} {M' : Matrix n m R}
    (hMM' : M * M' = 1) (hM'M : M' * M = 1) : (m → R) ≃ₗ[R] n → R 
goal: ∀ (a_1 : m), (Matrix.toLin'OfInv hMM' hM'M).symm a a_1 = (Matrix.toLin' M) a a_1

full_name: Matrix.toLin'OfInv_apply
code: /-- If `M` and `M'` are each other's inverse matrices, they provide an equivalence between `m → A`
and `n → A` corresponding to `M.mulVec` and `M'.mulVec`. -/
@[simps]
def Matrix.toLin'OfInv [Fintype m] [DecidableEq m] {M : Matrix m n R} {M' : Matrix n m R}
    (hMM' : M * M' = 1) (hM'M : M' * M = 1) : (m → R) ≃ₗ[R] n → R 
goal: ∀ (a_1 : n), (Matrix.toLin'OfInv hMM' hM'M) a a_1 = (Matrix.toLin' M') a a_1

full_name: Matrix.toLin'OfInv
code: /-- If `M` and `M'` are each other's inverse matrices, they provide an equivalence between `m → A`
and `n → A` corresponding to `M.mulVec` and `M'.mulVec`. -/
@[simps]
def Matrix.toLin'OfInv [Fintype m] [DecidableEq m] {M : Matrix m n R} {M' : Matrix n m R}
    (hMM' : M * M' = 1) (hM'M : M' * M = 1) : (m → R) ≃ₗ[R] n → R 
goal: (m → R) ≃ₗ[R] n → R

full_name: LinearMap.toMatrixAlgEquiv'
code: /-- Linear maps `(n → R) →ₗ[R] (n → R)` are algebra equivalent to `Matrix n n R`. -/
def LinearMap.toMatrixAlgEquiv' : ((n → R) →ₗ[R] n → R) ≃ₐ[R] Matrix n n R 
goal: ((n → R) →ₗ[R] n → R) ≃ₐ[R] Matrix n n R

full_name: Matrix.toLinAlgEquiv'
code: /-- A `Matrix n n R` is algebra equivalent to a linear map `(n → R) →ₗ[R] (n → R)`. -/
def Matrix.toLinAlgEquiv' : Matrix n n R ≃ₐ[R] (n → R) →ₗ[R] n → R 
goal: Matrix n n R ≃ₐ[R] (n → R) →ₗ[R] n → R

full_name: LinearMap.toMatrixAlgEquiv'_symm
code: @[simp]
theorem LinearMap.toMatrixAlgEquiv'_symm :
    (LinearMap.toMatrixAlgEquiv'.symm : Matrix n n R ≃ₐ[R] _) = Matrix.toLinAlgEquiv' 
goal: LinearMap.toMatrixAlgEquiv'.symm = Matrix.toLinAlgEquiv'

full_name: Matrix.toLinAlgEquiv'_symm
code: @[simp]
theorem Matrix.toLinAlgEquiv'_symm :
    (Matrix.toLinAlgEquiv'.symm : ((n → R) →ₗ[R] n → R) ≃ₐ[R] _) = LinearMap.toMatrixAlgEquiv' 
goal: Matrix.toLinAlgEquiv'.symm = LinearMap.toMatrixAlgEquiv'

full_name: LinearMap.toMatrixAlgEquiv'_toLinAlgEquiv'
code: @[simp]
theorem LinearMap.toMatrixAlgEquiv'_toLinAlgEquiv' (M : Matrix n n R) :
    LinearMap.toMatrixAlgEquiv' (Matrix.toLinAlgEquiv' M) = M 
goal: LinearMap.toMatrixAlgEquiv' (Matrix.toLinAlgEquiv' M) = M

full_name: Matrix.toLinAlgEquiv'_toMatrixAlgEquiv'
code: @[simp]
theorem Matrix.toLinAlgEquiv'_toMatrixAlgEquiv' (f : (n → R) →ₗ[R] n → R) :
    Matrix.toLinAlgEquiv' (LinearMap.toMatrixAlgEquiv' f) = f 
goal: Matrix.toLinAlgEquiv' (LinearMap.toMatrixAlgEquiv' f) = f

full_name: LinearMap.toMatrixAlgEquiv'_apply
code: @[simp]
theorem LinearMap.toMatrixAlgEquiv'_apply (f : (n → R) →ₗ[R] n → R) (i j) :
    LinearMap.toMatrixAlgEquiv' f i j = f (fun j' ↦ if j' = j then 1 else 0) i 
goal: LinearMap.toMatrixAlgEquiv' f i j = f (fun j' => if j' = j then 1 else 0) i

full_name: Matrix.toLinAlgEquiv'_apply
code: @[simp]
theorem Matrix.toLinAlgEquiv'_apply (M : Matrix n n R) (v : n → R) :
    Matrix.toLinAlgEquiv' M v = M *ᵥ v 
goal: (Matrix.toLinAlgEquiv' M) v = M *ᵥ v

full_name: Matrix.toLinAlgEquiv'_one
code: theorem Matrix.toLinAlgEquiv'_one : Matrix.toLinAlgEquiv' (1 : Matrix n n R) = LinearMap.id 
goal: Matrix.toLinAlgEquiv' 1 = LinearMap.id

full_name: LinearMap.toMatrixAlgEquiv'_id
code: @[simp]
theorem LinearMap.toMatrixAlgEquiv'_id :
    LinearMap.toMatrixAlgEquiv' (LinearMap.id : (n → R) →ₗ[R] n → R) = 1 
goal: LinearMap.toMatrixAlgEquiv' LinearMap.id = 1

full_name: LinearMap.toMatrixAlgEquiv'_comp
code: theorem LinearMap.toMatrixAlgEquiv'_comp (f g : (n → R) →ₗ[R] n → R) :
    LinearMap.toMatrixAlgEquiv' (f.comp g) =
      LinearMap.toMatrixAlgEquiv' f * LinearMap.toMatrixAlgEquiv' g 
goal: LinearMap.toMatrixAlgEquiv' (f ∘ₗ g) = LinearMap.toMatrixAlgEquiv' f * LinearMap.toMatrixAlgEquiv' g

full_name: LinearMap.toMatrixAlgEquiv'_mul
code: theorem LinearMap.toMatrixAlgEquiv'_mul (f g : (n → R) →ₗ[R] n → R) :
    LinearMap.toMatrixAlgEquiv' (f * g) =
      LinearMap.toMatrixAlgEquiv' f * LinearMap.toMatrixAlgEquiv' g 
goal: LinearMap.toMatrixAlgEquiv' (f * g) = LinearMap.toMatrixAlgEquiv' f * LinearMap.toMatrixAlgEquiv' g

full_name: LinearMap.toMatrix
code: /-- Given bases of two modules `M₁` and `M₂` over a commutative ring `R`, we get a linear
equivalence between linear maps `M₁ →ₗ M₂` and matrices over `R` indexed by the bases. -/
def LinearMap.toMatrix : (M₁ →ₗ[R] M₂) ≃ₗ[R] Matrix m n R 
goal: (M₁ →ₗ[R] M₂) ≃ₗ[R] Matrix m n R

full_name: LinearMap.toMatrix_eq_toMatrix'
code: /-- `LinearMap.toMatrix'` is a particular case of `LinearMap.toMatrix`, for the standard basis
`Pi.basisFun R n`. -/
theorem LinearMap.toMatrix_eq_toMatrix' :
    LinearMap.toMatrix (Pi.basisFun R n) (Pi.basisFun R n) = LinearMap.toMatrix' 
goal: LinearMap.toMatrix (Pi.basisFun R n) (Pi.basisFun R n) = LinearMap.toMatrix'

full_name: Matrix.toLin
code: /-- Given bases of two modules `M₁` and `M₂` over a commutative ring `R`, we get a linear
equivalence between matrices over `R` indexed by the bases and linear maps `M₁ →ₗ M₂`. -/
def Matrix.toLin : Matrix m n R ≃ₗ[R] M₁ →ₗ[R] M₂ 
goal: Matrix m n R ≃ₗ[R] M₁ →ₗ[R] M₂

full_name: Matrix.toLin_eq_toLin'
code: /-- `Matrix.toLin'` is a particular case of `Matrix.toLin`, for the standard basis
`Pi.basisFun R n`. -/
theorem Matrix.toLin_eq_toLin' : Matrix.toLin (Pi.basisFun R n) (Pi.basisFun R m) = Matrix.toLin' 
goal: Matrix.toLin (Pi.basisFun R n) (Pi.basisFun R m) = Matrix.toLin'

full_name: LinearMap.toMatrix_symm
code: @[simp]
theorem LinearMap.toMatrix_symm : (LinearMap.toMatrix v₁ v₂).symm = Matrix.toLin v₁ v₂ 
goal: (LinearMap.toMatrix v₁ v₂).symm = Matrix.toLin v₁ v₂

full_name: Matrix.toLin_symm
code: @[simp]
theorem Matrix.toLin_symm : (Matrix.toLin v₁ v₂).symm = LinearMap.toMatrix v₁ v₂ 
goal: (Matrix.toLin v₁ v₂).symm = LinearMap.toMatrix v₁ v₂

full_name: Matrix.toLin_toMatrix
code: @[simp]
theorem Matrix.toLin_toMatrix (f : M₁ →ₗ[R] M₂) :
    Matrix.toLin v₁ v₂ (LinearMap.toMatrix v₁ v₂ f) = f 
goal: (Matrix.toLin v₁ v₂) ((LinearMap.toMatrix v₁ v₂) f) = f

full_name: LinearMap.toMatrix_toLin
code: @[simp]
theorem LinearMap.toMatrix_toLin (M : Matrix m n R) :
    LinearMap.toMatrix v₁ v₂ (Matrix.toLin v₁ v₂ M) = M 
goal: (LinearMap.toMatrix v₁ v₂) ((Matrix.toLin v₁ v₂) M) = M

full_name: LinearMap.toMatrix_apply
code: theorem LinearMap.toMatrix_apply (f : M₁ →ₗ[R] M₂) (i : m) (j : n) :
    LinearMap.toMatrix v₁ v₂ f i j = v₂.repr (f (v₁ j)) i 
goal: (LinearMap.toMatrix v₁ v₂) f i j = (v₂.repr (f (v₁ j))) i

full_name: LinearMap.toMatrix_transpose_apply
code: theorem LinearMap.toMatrix_transpose_apply (f : M₁ →ₗ[R] M₂) (j : n) :
    (LinearMap.toMatrix v₁ v₂ f)ᵀ j = v₂.repr (f (v₁ j)) 
goal: ((LinearMap.toMatrix v₁ v₂) f)ᵀ j = ⇑(v₂.repr (f (v₁ j)))

full_name: LinearMap.toMatrix_apply'
code: theorem LinearMap.toMatrix_apply' (f : M₁ →ₗ[R] M₂) (i : m) (j : n) :
    LinearMap.toMatrix v₁ v₂ f i j = v₂.repr (f (v₁ j)) i 
goal: (LinearMap.toMatrix v₁ v₂) f i j = (v₂.repr (f (v₁ j))) i

full_name: LinearMap.toMatrix_transpose_apply'
code: theorem LinearMap.toMatrix_transpose_apply' (f : M₁ →ₗ[R] M₂) (j : n) :
    (LinearMap.toMatrix v₁ v₂ f)ᵀ j = v₂.repr (f (v₁ j)) 
goal: ((LinearMap.toMatrix v₁ v₂) f)ᵀ j = ⇑(v₂.repr (f (v₁ j)))

full_name: LinearMap.toMatrix_id
code: /-- This will be a special case of `LinearMap.toMatrix_id_eq_basis_toMatrix`. -/
theorem LinearMap.toMatrix_id : LinearMap.toMatrix v₁ v₁ id = 1 
goal: (LinearMap.toMatrix v₁ v₁) LinearMap.id = 1

full_name: LinearMap.toMatrix_one
code: @[simp]
theorem LinearMap.toMatrix_one : LinearMap.toMatrix v₁ v₁ 1 = 1 
goal: (LinearMap.toMatrix v₁ v₁) 1 = 1

full_name: Matrix.toLin_one
code: @[simp]
theorem Matrix.toLin_one : Matrix.toLin v₁ v₁ 1 = LinearMap.id 
goal: (Matrix.toLin v₁ v₁) 1 = LinearMap.id

full_name: LinearMap.toMatrix_reindexRange
code: theorem LinearMap.toMatrix_reindexRange [DecidableEq M₁] (f : M₁ →ₗ[R] M₂) (k : m) (i : n) :
    LinearMap.toMatrix v₁.reindexRange v₂.reindexRange f ⟨v₂ k, Set.mem_range_self k⟩
        ⟨v₁ i, Set.mem_range_self i⟩ =
      LinearMap.toMatrix v₁ v₂ f k i 
goal: (LinearMap.toMatrix v₁.reindexRange v₂.reindexRange) f ⟨v₂ k, ⋯⟩ ⟨v₁ i, ⋯⟩ = (LinearMap.toMatrix v₁ v₂) f k i

full_name: LinearMap.toMatrix_algebraMap
code: @[simp]
theorem LinearMap.toMatrix_algebraMap (x : R) :
    LinearMap.toMatrix v₁ v₁ (algebraMap R (Module.End R M₁) x) = scalar n x 
goal: (LinearMap.toMatrix v₁ v₁) ((algebraMap R (Module.End R M₁)) x) = (Matrix.scalar n) x

full_name: LinearMap.toMatrix_mulVec_repr
code: theorem LinearMap.toMatrix_mulVec_repr (f : M₁ →ₗ[R] M₂) (x : M₁) :
    LinearMap.toMatrix v₁ v₂ f *ᵥ v₁.repr x = v₂.repr (f x) 
goal: (LinearMap.toMatrix v₁ v₂) f *ᵥ ⇑(v₁.repr x) = ⇑(v₂.repr (f x))

full_name: LinearMap.toMatrix_basis_equiv
code: @[simp]
theorem LinearMap.toMatrix_basis_equiv [Fintype l] [DecidableEq l] (b : Basis l R M₁)
    (b' : Basis l R M₂) :
    LinearMap.toMatrix b' b (b'.equiv b (Equiv.refl l) : M₂ →ₗ[R] M₁) = 1 
goal: (LinearMap.toMatrix b' b) ↑(b'.equiv b (Equiv.refl l)) = 1

full_name: LinearMap.toMatrix_smulBasis_left
code: theorem LinearMap.toMatrix_smulBasis_left {G} [Group G] [DistribMulAction G M₁]
    [SMulCommClass G R M₁] (g : G) (f : M₁ →ₗ[R] M₂) :
    LinearMap.toMatrix (g • v₁) v₂ f =
      LinearMap.toMatrix v₁ v₂ (f ∘ₗ DistribMulAction.toLinearMap _ _ g) 
goal: (LinearMap.toMatrix (g • v₁) v₂) f = (LinearMap.toMatrix v₁ v₂) (f ∘ₗ DistribMulAction.toLinearMap R M₁ g)

full_name: LinearMap.toMatrix_smulBasis_right
code: theorem LinearMap.toMatrix_smulBasis_right {G} [Group G] [DistribMulAction G M₂]
    [SMulCommClass G R M₂] (g : G) (f : M₁ →ₗ[R] M₂) :
    LinearMap.toMatrix v₁ (g • v₂) f =
      LinearMap.toMatrix v₁ v₂ (DistribMulAction.toLinearMap _ _ g⁻¹ ∘ₗ f) 
goal: (LinearMap.toMatrix v₁ (g • v₂)) f = (LinearMap.toMatrix v₁ v₂) (DistribMulAction.toLinearMap R M₂ g⁻¹ ∘ₗ f)

full_name: Matrix.toLin_apply
code: theorem Matrix.toLin_apply (M : Matrix m n R) (v : M₁) :
    Matrix.toLin v₁ v₂ M v = ∑ j, (M *ᵥ v₁.repr v) j • v₂ j 
goal: ((Matrix.toLin v₁ v₂) M) v = ∑ j : m, (M *ᵥ ⇑(v₁.repr v)) j • v₂ j

full_name: Matrix.toLin_self
code: @[simp]
theorem Matrix.toLin_self (M : Matrix m n R) (i : n) :
    Matrix.toLin v₁ v₂ M (v₁ i) = ∑ j, M j i • v₂ j 
goal: ((Matrix.toLin v₁ v₂) M) (v₁ i) = ∑ j : m, M j i • v₂ j

full_name: LinearMap.toMatrix_comp
code: theorem LinearMap.toMatrix_comp [Finite l] [DecidableEq m] (f : M₂ →ₗ[R] M₃) (g : M₁ →ₗ[R] M₂) :
    LinearMap.toMatrix v₁ v₃ (f.comp g) =
    LinearMap.toMatrix v₂ v₃ f * LinearMap.toMatrix v₁ v₂ g 
goal: (LinearMap.toMatrix v₁ v₃) (f ∘ₗ g) = (LinearMap.toMatrix v₂ v₃) f * (LinearMap.toMatrix v₁ v₂) g

full_name: LinearMap.toMatrix_mul
code: theorem LinearMap.toMatrix_mul (f g : M₁ →ₗ[R] M₁) :
    LinearMap.toMatrix v₁ v₁ (f * g) = LinearMap.toMatrix v₁ v₁ f * LinearMap.toMatrix v₁ v₁ g 
goal: (LinearMap.toMatrix v₁ v₁) (f * g) = (LinearMap.toMatrix v₁ v₁) f * (LinearMap.toMatrix v₁ v₁) g

full_name: LinearMap.toMatrix_pow
code: lemma LinearMap.toMatrix_pow (f : M₁ →ₗ[R] M₁) (k : ℕ) :
    (toMatrix v₁ v₁ f) ^ k = toMatrix v₁ v₁ (f ^ k) 
goal: (LinearMap.toMatrix v₁ v₁) f ^ k = (LinearMap.toMatrix v₁ v₁) (f ^ k)

full_name: Matrix.toLin_mul
code: theorem Matrix.toLin_mul [Finite l] [DecidableEq m] (A : Matrix l m R) (B : Matrix m n R) :
    Matrix.toLin v₁ v₃ (A * B) = (Matrix.toLin v₂ v₃ A).comp (Matrix.toLin v₁ v₂ B) 
goal: (Matrix.toLin v₁ v₃) (A * B) = (Matrix.toLin v₂ v₃) A ∘ₗ (Matrix.toLin v₁ v₂) B

full_name: Matrix.toLin_mul_apply
code: /-- Shortcut lemma for `Matrix.toLin_mul` and `LinearMap.comp_apply`. -/
theorem Matrix.toLin_mul_apply [Finite l] [DecidableEq m] (A : Matrix l m R) (B : Matrix m n R)
    (x) : Matrix.toLin v₁ v₃ (A * B) x = (Matrix.toLin v₂ v₃ A) (Matrix.toLin v₁ v₂ B x) 
goal: ((Matrix.toLin v₁ v₃) (A * B)) x = ((Matrix.toLin v₂ v₃) A) (((Matrix.toLin v₁ v₂) B) x)

full_name: Matrix.toLinOfInv
code: /-- If `M` and `M` are each other's inverse matrices, `Matrix.toLin M` and `Matrix.toLin M'`
form a linear equivalence. -/
@[simps]
def Matrix.toLinOfInv [DecidableEq m] {M : Matrix m n R} {M' : Matrix n m R} (hMM' : M * M' = 1)
    (hM'M : M' * M = 1) : M₁ ≃ₗ[R] M₂ 
goal: M₁ ≃ₗ[R] M₂

full_name: Matrix.toLinOfInv_apply
code: /-- If `M` and `M` are each other's inverse matrices, `Matrix.toLin M` and `Matrix.toLin M'`
form a linear equivalence. -/
@[simps]
def Matrix.toLinOfInv [DecidableEq m] {M : Matrix m n R} {M' : Matrix n m R} (hMM' : M * M' = 1)
    (hM'M : M' * M = 1) : M₁ ≃ₗ[R] M₂ 
goal: (Matrix.toLinOfInv v₁ v₂ hMM' hM'M) a = ((Matrix.toLin v₁ v₂) M) a

full_name: Matrix.toLinOfInv_symm_apply
code: /-- If `M` and `M` are each other's inverse matrices, `Matrix.toLin M` and `Matrix.toLin M'`
form a linear equivalence. -/
@[simps]
def Matrix.toLinOfInv [DecidableEq m] {M : Matrix m n R} {M' : Matrix n m R} (hMM' : M * M' = 1)
    (hM'M : M' * M = 1) : M₁ ≃ₗ[R] M₂ 
goal: (Matrix.toLinOfInv v₁ v₂ hMM' hM'M).symm a = ((Matrix.toLin v₂ v₁) M') a

full_name: LinearMap.toMatrixAlgEquiv
code: /-- Given a basis of a module `M₁` over a commutative ring `R`, we get an algebra
equivalence between linear maps `M₁ →ₗ M₁` and square matrices over `R` indexed by the basis. -/
def LinearMap.toMatrixAlgEquiv : (M₁ →ₗ[R] M₁) ≃ₐ[R] Matrix n n R 
goal: (M₁ →ₗ[R] M₁) ≃ₐ[R] Matrix n n R

full_name: Matrix.toLinAlgEquiv
code: /-- Given a basis of a module `M₁` over a commutative ring `R`, we get an algebra
equivalence between square matrices over `R` indexed by the basis and linear maps `M₁ →ₗ M₁`. -/
def Matrix.toLinAlgEquiv : Matrix n n R ≃ₐ[R] M₁ →ₗ[R] M₁ 
goal: Matrix n n R ≃ₐ[R] M₁ →ₗ[R] M₁

full_name: LinearMap.toMatrixAlgEquiv_symm
code: @[simp]
theorem LinearMap.toMatrixAlgEquiv_symm :
    (LinearMap.toMatrixAlgEquiv v₁).symm = Matrix.toLinAlgEquiv v₁ 
goal: (LinearMap.toMatrixAlgEquiv v₁).symm = Matrix.toLinAlgEquiv v₁

full_name: Matrix.toLinAlgEquiv_symm
code: @[simp]
theorem Matrix.toLinAlgEquiv_symm :
    (Matrix.toLinAlgEquiv v₁).symm = LinearMap.toMatrixAlgEquiv v₁ 
goal: (Matrix.toLinAlgEquiv v₁).symm = LinearMap.toMatrixAlgEquiv v₁

full_name: Matrix.toLinAlgEquiv_toMatrixAlgEquiv
code: @[simp]
theorem Matrix.toLinAlgEquiv_toMatrixAlgEquiv (f : M₁ →ₗ[R] M₁) :
    Matrix.toLinAlgEquiv v₁ (LinearMap.toMatrixAlgEquiv v₁ f) = f 
goal: (Matrix.toLinAlgEquiv v₁) ((LinearMap.toMatrixAlgEquiv v₁) f) = f

full_name: LinearMap.toMatrixAlgEquiv_toLinAlgEquiv
code: @[simp]
theorem LinearMap.toMatrixAlgEquiv_toLinAlgEquiv (M : Matrix n n R) :
    LinearMap.toMatrixAlgEquiv v₁ (Matrix.toLinAlgEquiv v₁ M) = M 
goal: (LinearMap.toMatrixAlgEquiv v₁) ((Matrix.toLinAlgEquiv v₁) M) = M

full_name: LinearMap.toMatrixAlgEquiv_apply
code: theorem LinearMap.toMatrixAlgEquiv_apply (f : M₁ →ₗ[R] M₁) (i j : n) :
    LinearMap.toMatrixAlgEquiv v₁ f i j = v₁.repr (f (v₁ j)) i 
goal: (LinearMap.toMatrixAlgEquiv v₁) f i j = (v₁.repr (f (v₁ j))) i

full_name: LinearMap.toMatrixAlgEquiv_transpose_apply
code: theorem LinearMap.toMatrixAlgEquiv_transpose_apply (f : M₁ →ₗ[R] M₁) (j : n) :
    (LinearMap.toMatrixAlgEquiv v₁ f)ᵀ j = v₁.repr (f (v₁ j)) 
goal: ((LinearMap.toMatrixAlgEquiv v₁) f)ᵀ j = ⇑(v₁.repr (f (v₁ j)))

full_name: LinearMap.toMatrixAlgEquiv_apply'
code: theorem LinearMap.toMatrixAlgEquiv_apply' (f : M₁ →ₗ[R] M₁) (i j : n) :
    LinearMap.toMatrixAlgEquiv v₁ f i j = v₁.repr (f (v₁ j)) i 
goal: (LinearMap.toMatrixAlgEquiv v₁) f i j = (v₁.repr (f (v₁ j))) i

full_name: LinearMap.toMatrixAlgEquiv_transpose_apply'
code: theorem LinearMap.toMatrixAlgEquiv_transpose_apply' (f : M₁ →ₗ[R] M₁) (j : n) :
    (LinearMap.toMatrixAlgEquiv v₁ f)ᵀ j = v₁.repr (f (v₁ j)) 
goal: ((LinearMap.toMatrixAlgEquiv v₁) f)ᵀ j = ⇑(v₁.repr (f (v₁ j)))

full_name: Matrix.toLinAlgEquiv_apply
code: theorem Matrix.toLinAlgEquiv_apply (M : Matrix n n R) (v : M₁) :
    Matrix.toLinAlgEquiv v₁ M v = ∑ j, (M *ᵥ v₁.repr v) j • v₁ j 
goal: ((Matrix.toLinAlgEquiv v₁) M) v = ∑ j : n, (M *ᵥ ⇑(v₁.repr v)) j • v₁ j

full_name: Matrix.toLinAlgEquiv_self
code: @[simp]
theorem Matrix.toLinAlgEquiv_self (M : Matrix n n R) (i : n) :
    Matrix.toLinAlgEquiv v₁ M (v₁ i) = ∑ j, M j i • v₁ j 
goal: ((Matrix.toLinAlgEquiv v₁) M) (v₁ i) = ∑ j : n, M j i • v₁ j

full_name: LinearMap.toMatrixAlgEquiv_id
code: theorem LinearMap.toMatrixAlgEquiv_id : LinearMap.toMatrixAlgEquiv v₁ id = 1 
goal: (LinearMap.toMatrixAlgEquiv v₁) LinearMap.id = 1

full_name: Matrix.toLinAlgEquiv_one
code: theorem Matrix.toLinAlgEquiv_one : Matrix.toLinAlgEquiv v₁ 1 = LinearMap.id 
goal: (Matrix.toLinAlgEquiv v₁) 1 = LinearMap.id

full_name: LinearMap.toMatrixAlgEquiv_reindexRange
code: theorem LinearMap.toMatrixAlgEquiv_reindexRange [DecidableEq M₁] (f : M₁ →ₗ[R] M₁) (k i : n) :
    LinearMap.toMatrixAlgEquiv v₁.reindexRange f
        ⟨v₁ k, Set.mem_range_self k⟩ ⟨v₁ i, Set.mem_range_self i⟩ =
      LinearMap.toMatrixAlgEquiv v₁ f k i 
goal: (LinearMap.toMatrixAlgEquiv v₁.reindexRange) f ⟨v₁ k, ⋯⟩ ⟨v₁ i, ⋯⟩ = (LinearMap.toMatrixAlgEquiv v₁) f k i

full_name: LinearMap.toMatrixAlgEquiv_comp
code: theorem LinearMap.toMatrixAlgEquiv_comp (f g : M₁ →ₗ[R] M₁) :
    LinearMap.toMatrixAlgEquiv v₁ (f.comp g) =
      LinearMap.toMatrixAlgEquiv v₁ f * LinearMap.toMatrixAlgEquiv v₁ g 
goal: (LinearMap.toMatrixAlgEquiv v₁) (f ∘ₗ g) = (LinearMap.toMatrixAlgEquiv v₁) f * (LinearMap.toMatrixAlgEquiv v₁) g

full_name: LinearMap.toMatrixAlgEquiv_mul
code: theorem LinearMap.toMatrixAlgEquiv_mul (f g : M₁ →ₗ[R] M₁) :
    LinearMap.toMatrixAlgEquiv v₁ (f * g) =
      LinearMap.toMatrixAlgEquiv v₁ f * LinearMap.toMatrixAlgEquiv v₁ g 
goal: (LinearMap.toMatrixAlgEquiv v₁) (f * g) = (LinearMap.toMatrixAlgEquiv v₁) f * (LinearMap.toMatrixAlgEquiv v₁) g

full_name: Matrix.toLinAlgEquiv_mul
code: theorem Matrix.toLinAlgEquiv_mul (A B : Matrix n n R) :
    Matrix.toLinAlgEquiv v₁ (A * B) =
      (Matrix.toLinAlgEquiv v₁ A).comp (Matrix.toLinAlgEquiv v₁ B) 
goal: (Matrix.toLinAlgEquiv v₁) (A * B) = (Matrix.toLinAlgEquiv v₁) A ∘ₗ (Matrix.toLinAlgEquiv v₁) B

full_name: Matrix.toLin_finTwoProd_apply
code: @[simp]
theorem Matrix.toLin_finTwoProd_apply (a b c d : R) (x : R × R) :
    Matrix.toLin (Basis.finTwoProd R) (Basis.finTwoProd R) !![a, b; c, d] x =
      (a * x.fst + b * x.snd, c * x.fst + d * x.snd) 
goal: ((Matrix.toLin (Basis.finTwoProd R) (Basis.finTwoProd R)) !![a, b; c, d]) x = (a * x.1 + b * x.2, c * x.1 + d * x.2)

full_name: Matrix.toLin_finTwoProd
code: theorem Matrix.toLin_finTwoProd (a b c d : R) :
    Matrix.toLin (Basis.finTwoProd R) (Basis.finTwoProd R) !![a, b; c, d] =
      (a • LinearMap.fst R R R + b • LinearMap.snd R R R).prod
        (c • LinearMap.fst R R R + d • LinearMap.snd R R R) 
goal: (Matrix.toLin (Basis.finTwoProd R) (Basis.finTwoProd R)) !![a, b; c, d] =
  (a • LinearMap.fst R R R + b • LinearMap.snd R R R).prod (c • LinearMap.fst R R R + d • LinearMap.snd R R R)

full_name: toMatrix_distrib_mul_action_toLinearMap
code: @[simp]
theorem toMatrix_distrib_mul_action_toLinearMap (x : R) :
    LinearMap.toMatrix v₁ v₁ (DistribMulAction.toLinearMap R M₁ x) =
    Matrix.diagonal fun _ ↦ x 
goal: (LinearMap.toMatrix v₁ v₁) (DistribMulAction.toLinearMap R M₁ x) = Matrix.diagonal fun x_1 => x

full_name: LinearMap.toMatrix_prodMap
code: lemma LinearMap.toMatrix_prodMap [DecidableEq n] [DecidableEq m] [DecidableEq (n ⊕ m)]
    (φ₁ : Module.End R M₁) (φ₂ : Module.End R M₂) :
    toMatrix (v₁.prod v₂) (v₁.prod v₂) (φ₁.prodMap φ₂) =
      Matrix.fromBlocks (toMatrix v₁ v₁ φ₁) 0 0 (toMatrix v₂ v₂ φ₂) 
goal: (LinearMap.toMatrix (v₁.prod v₂) (v₁.prod v₂)) (LinearMap.prodMap φ₁ φ₂) =
  Matrix.fromBlocks ((LinearMap.toMatrix v₁ v₁) φ₁) 0 0 ((LinearMap.toMatrix v₂ v₂) φ₂)

full_name: Algebra.toMatrix_lmul'
code: theorem toMatrix_lmul' (x : S) (i j) :
    LinearMap.toMatrix b b (lmul R S x) i j = b.repr (x * b j) i 
goal: (LinearMap.toMatrix b b) ((Algebra.lmul R S) x) i j = (b.repr (x * b j)) i

full_name: Algebra.toMatrix_lsmul
code: @[simp]
theorem toMatrix_lsmul (x : R) :
    LinearMap.toMatrix b b (Algebra.lsmul R R S x) = Matrix.diagonal fun _ ↦ x 
goal: (LinearMap.toMatrix b b) ((Algebra.lsmul R R S) x) = Matrix.diagonal fun x_1 => x

full_name: Algebra.leftMulMatrix
code: /-- `leftMulMatrix b x` is the matrix corresponding to the linear map `fun y ↦ x * y`.

`leftMulMatrix_eq_repr_mul` gives a formula for the entries of `leftMulMatrix`.

This definition is useful for doing (more) explicit computations with `LinearMap.mulLeft`,
such as the trace form or norm map for algebras.
-/
noncomputable def leftMulMatrix : S →ₐ[R] Matrix m m R 
goal: S →ₐ[R] Matrix m m R

full_name: Algebra.leftMulMatrix_apply
code: theorem leftMulMatrix_apply (x : S) : leftMulMatrix b x = LinearMap.toMatrix b b (lmul R S x) 
goal: (Algebra.leftMulMatrix b) x = (LinearMap.toMatrix b b) ((Algebra.lmul R S) x)

full_name: Algebra.leftMulMatrix_eq_repr_mul
code: theorem leftMulMatrix_eq_repr_mul (x : S) (i j) : leftMulMatrix b x i j = b.repr (x * b j) i 
goal: (Algebra.leftMulMatrix b) x i j = (b.repr (x * b j)) i

full_name: Algebra.leftMulMatrix_mulVec_repr
code: theorem leftMulMatrix_mulVec_repr (x y : S) :
    leftMulMatrix b x *ᵥ b.repr y = b.repr (x * y) 
goal: (Algebra.leftMulMatrix b) x *ᵥ ⇑(b.repr y) = ⇑(b.repr (x * y))

full_name: Algebra.toMatrix_lmul_eq
code: @[simp]
theorem toMatrix_lmul_eq (x : S) :
    LinearMap.toMatrix b b (LinearMap.mulLeft R x) = leftMulMatrix b x 
goal: (LinearMap.toMatrix b b) (LinearMap.mulLeft R x) = (Algebra.leftMulMatrix b) x

full_name: Algebra.leftMulMatrix_injective
code: theorem leftMulMatrix_injective : Function.Injective (leftMulMatrix b) 
goal: Function.Injective ⇑(Algebra.leftMulMatrix b)

full_name: Algebra.smul_leftMulMatrix
code: @[simp]
theorem smul_leftMulMatrix {G} [Group G] [DistribMulAction G S]
    [SMulCommClass G R S] [SMulCommClass G S S] (g : G) (x) :
    leftMulMatrix (g • b) x = leftMulMatrix b x 
goal: (Algebra.leftMulMatrix (g • b)) x = (Algebra.leftMulMatrix b) x

full_name: Algebra.smulTower_leftMulMatrix
code: theorem smulTower_leftMulMatrix (x) (ik jk) :
    leftMulMatrix (b.smulTower c) x ik jk =
      leftMulMatrix b (leftMulMatrix c x ik.2 jk.2) ik.1 jk.1 
goal: (Algebra.leftMulMatrix (b.smulTower c)) x ik jk =
  (Algebra.leftMulMatrix b) ((Algebra.leftMulMatrix c) x ik.2 jk.2) ik.1 jk.1

full_name: Algebra.smulTower_leftMulMatrix_algebraMap
code: theorem smulTower_leftMulMatrix_algebraMap (x : S) :
    leftMulMatrix (b.smulTower c) (algebraMap _ _ x) = blockDiagonal fun _ ↦ leftMulMatrix b x 
goal: (Algebra.leftMulMatrix (b.smulTower c)) ((algebraMap S T) x) =
  Matrix.blockDiagonal fun x_1 => (Algebra.leftMulMatrix b) x

full_name: Algebra.smulTower_leftMulMatrix_algebraMap_eq
code: theorem smulTower_leftMulMatrix_algebraMap_eq (x : S) (i j k) :
    leftMulMatrix (b.smulTower c) (algebraMap _ _ x) (i, k) (j, k) = leftMulMatrix b x i j 
goal: (Algebra.leftMulMatrix (b.smulTower c)) ((algebraMap S T) x) (i, k) (j, k) = (Algebra.leftMulMatrix b) x i j

full_name: Algebra.smulTower_leftMulMatrix_algebraMap_ne
code: theorem smulTower_leftMulMatrix_algebraMap_ne (x : S) (i j) {k k'} (h : k ≠ k') :
    leftMulMatrix (b.smulTower c) (algebraMap _ _ x) (i, k) (j, k') = 0 
goal: (Algebra.leftMulMatrix (b.smulTower c)) ((algebraMap S T) x) (i, k) (j, k') = 0

full_name: algEquivMatrix'
code: /-- The natural equivalence between linear endomorphisms of finite free modules and square matrices
is compatible with the algebra structures. -/
def algEquivMatrix' [Fintype n] : Module.End R (n → R) ≃ₐ[R] Matrix n n R 
goal: Module.End R (n → R) ≃ₐ[R] Matrix n n R

full_name: LinearEquiv.algConj
code: /-- A linear equivalence of two modules induces an equivalence of algebras of their
endomorphisms. -/
def LinearEquiv.algConj (e : M₁ ≃ₗ[R] M₂) : Module.End R M₁ ≃ₐ[R] Module.End R M₂ 
goal: Module.End R M₁ ≃ₐ[R] Module.End R M₂

full_name: algEquivMatrix
code: /-- A basis of a module induces an equivalence of algebras from the endomorphisms of the module to
square matrices. -/
def algEquivMatrix [Fintype n] (h : Basis n R M) : Module.End R M ≃ₐ[R] Matrix n n R 
goal: Module.End R M ≃ₐ[R] Matrix n n R

full_name: Basis.linearMap_repr_symm_apply
code: /-- The standard basis of the space linear maps between two modules
induced by a basis of the domain and codomain.

If `M₁` and `M₂` are modules with basis `b₁` and `b₂` respectively indexed
by finite types `ι₁` and `ι₂`,
then `Basis.linearMap b₁ b₂` is the basis of `M₁ →ₗ[R] M₂` indexed by `ι₂ × ι₁`
where `(i, j)` indexes the linear map that sends `b j` to `b i`
and sends all other basis vectors to `0`.  -/
@[simps! (config := .lemmasOnly) repr_apply repr_symm_apply]
noncomputable
def linearMap (b₁ : Basis ι₁ R M₁) (b₂ : Basis ι₂ R M₂) :
    Basis (ι₂ × ι₁) R (M₁ →ₗ[R] M₂) 
goal: ∀ (a : ι₂ × ι₁ →₀ R),
  (b₁.linearMap b₂).repr.symm a =
    (Matrix.toLin b₁ b₂) ((Finsupp.total (ι₂ × ι₁) (Matrix ι₂ ι₁ R) R ⇑(Matrix.stdBasis R ι₂ ι₁)) a)

full_name: Basis.linearMap_repr_apply
code: /-- The standard basis of the space linear maps between two modules
induced by a basis of the domain and codomain.

If `M₁` and `M₂` are modules with basis `b₁` and `b₂` respectively indexed
by finite types `ι₁` and `ι₂`,
then `Basis.linearMap b₁ b₂` is the basis of `M₁ →ₗ[R] M₂` indexed by `ι₂ × ι₁`
where `(i, j)` indexes the linear map that sends `b j` to `b i`
and sends all other basis vectors to `0`.  -/
@[simps! (config := .lemmasOnly) repr_apply repr_symm_apply]
noncomputable
def linearMap (b₁ : Basis ι₁ R M₁) (b₂ : Basis ι₂ R M₂) :
    Basis (ι₂ × ι₁) R (M₁ →ₗ[R] M₂) 
goal: ∀ (a : M₁ →ₗ[R] M₂), (b₁.linearMap b₂).repr a = (Matrix.stdBasis R ι₂ ι₁).repr ((LinearMap.toMatrix b₁ b₂) a)

full_name: Basis.linearMap
code: /-- The standard basis of the space linear maps between two modules
induced by a basis of the domain and codomain.

If `M₁` and `M₂` are modules with basis `b₁` and `b₂` respectively indexed
by finite types `ι₁` and `ι₂`,
then `Basis.linearMap b₁ b₂` is the basis of `M₁ →ₗ[R] M₂` indexed by `ι₂ × ι₁`
where `(i, j)` indexes the linear map that sends `b j` to `b i`
and sends all other basis vectors to `0`.  -/
@[simps! (config := .lemmasOnly) repr_apply repr_symm_apply]
noncomputable
def linearMap (b₁ : Basis ι₁ R M₁) (b₂ : Basis ι₂ R M₂) :
    Basis (ι₂ × ι₁) R (M₁ →ₗ[R] M₂) 
goal: Basis (ι₂ × ι₁) R (M₁ →ₗ[R] M₂)

full_name: Basis.linearMap_apply
code: lemma linearMap_apply (ij : ι₂ × ι₁) :
    (b₁.linearMap b₂ ij) = (Matrix.toLin b₁ b₂) (Matrix.stdBasis R ι₂ ι₁ ij) 
goal: (b₁.linearMap b₂) ij = (Matrix.toLin b₁ b₂) ((Matrix.stdBasis R ι₂ ι₁) ij)

full_name: Basis.linearMap_apply_apply
code: lemma linearMap_apply_apply (ij : ι₂ × ι₁) (k : ι₁) :
    (b₁.linearMap b₂ ij) (b₁ k) = if ij.2 = k then b₂ ij.1 else 0 
goal: ((b₁.linearMap b₂) ij) (b₁ k) = if ij.2 = k then b₂ ij.1 else 0

full_name: Basis.end_repr_apply
code: /-- The standard basis of the endomorphism algebra of a module
induced by a basis of the module.

If `M` is a module with basis `b` indexed by a finite type `ι`,
then `Basis.end b` is the basis of `Module.End R M` indexed by `ι × ι`
where `(i, j)` indexes the linear map that sends `b j` to `b i`
and sends all other basis vectors to `0`.  -/
@[simps! (config := .lemmasOnly) repr_apply repr_symm_apply]
noncomputable
abbrev _root_.Basis.end (b : Basis ι R M) : Basis (ι × ι) R (Module.End R M) 
goal: ∀ (a : M →ₗ[R] M), b.end.repr a = (Matrix.stdBasis R ι ι).repr ((LinearMap.toMatrix b b) a)

full_name: Basis.end
code: /-- The standard basis of the endomorphism algebra of a module
induced by a basis of the module.

If `M` is a module with basis `b` indexed by a finite type `ι`,
then `Basis.end b` is the basis of `Module.End R M` indexed by `ι × ι`
where `(i, j)` indexes the linear map that sends `b j` to `b i`
and sends all other basis vectors to `0`.  -/
@[simps! (config := .lemmasOnly) repr_apply repr_symm_apply]
noncomputable
abbrev _root_.Basis.end (b : Basis ι R M) : Basis (ι × ι) R (Module.End R M) 
goal: Basis (ι × ι) R (Module.End R M)

full_name: Basis.end_repr_symm_apply
code: /-- The standard basis of the endomorphism algebra of a module
induced by a basis of the module.

If `M` is a module with basis `b` indexed by a finite type `ι`,
then `Basis.end b` is the basis of `Module.End R M` indexed by `ι × ι`
where `(i, j)` indexes the linear map that sends `b j` to `b i`
and sends all other basis vectors to `0`.  -/
@[simps! (config := .lemmasOnly) repr_apply repr_symm_apply]
noncomputable
abbrev _root_.Basis.end (b : Basis ι R M) : Basis (ι × ι) R (Module.End R M) 
goal: ∀ (a : ι × ι →₀ R),
  b.end.repr.symm a = (Matrix.toLin b b) ((Finsupp.total (ι × ι) (Matrix ι ι R) R ⇑(Matrix.stdBasis R ι ι)) a)

full_name: Basis.end_apply
code: lemma end_apply (ij : ι × ι) : (b.end ij) = (Matrix.toLin b b) (Matrix.stdBasis R ι ι ij) 
goal: b.end ij = (Matrix.toLin b b) ((Matrix.stdBasis R ι ι) ij)

full_name: Basis.end_apply_apply
code: lemma end_apply_apply (ij : ι × ι) (k : ι) : (b.end ij) (b k) = if ij.2 = k then b ij.1 else 0 
goal: (b.end ij) (b k) = if ij.2 = k then b ij.1 else 0