The areas / V07. Linear algebra
Mathlib.LinearAlgebra.Matrix.ToLin
195 declarations. Mathlib docs · Source
Linear maps and matrices
This file defines the maps to send matrices to a linear map, and to send linear maps between modules with a finite bases to matrices. This defines a linear equivalence between linear maps between finite-dimensional vector spaces and matrices indexed by the respective bases.
Main definitions
In the list below, and in all this file, R is a commutative ring (semiring
is sometimes enough), M and its variations are R-modules, ι, κ, n and m are finite
types used for indexing.
LinearMap.toMatrix: given basesv₁ : ι → M₁andv₂ : κ → M₂, theR-linear equivalence fromM₁ →ₗ[R] M₂toMatrix κ ι RMatrix.toLin: the inverse ofLinearMap.toMatrixLinearMap.toMatrix': theR-linear equivalence from(m → R) →ₗ[R] (n → R)toMatrix m n R(with the standard basis onm → Randn → R)Matrix.toLin': the inverse ofLinearMap.toMatrix'algEquivMatrix: given a basis indexed byn, theR-algebra equivalence betweenR-endomorphisms ofMandMatrix n n R
Issues
This file was originally written without attention to non-commutative rings, and so mostly only works in the commutative setting. This should be fixed.
In particular, Matrix.mulVec gives us a linear equivalence
Matrix m n R ≃ₗ[R] (n → R) →ₗ[Rᵐᵒᵖ] (m → R)
while Matrix.vecMul gives us a linear equivalence
Matrix m n R ≃ₗ[Rᵐᵒᵖ] (m → R) →ₗ[R] (n → R).
At present, the first equivalence is developed in detail but only for commutative rings
(and we omit the distinction between Rᵐᵒᵖ and R),
while the second equivalence is developed only in brief, but for not-necessarily-commutative rings.
Naming is slightly inconsistent between the two developments.
In the original (commutative) development linear is abbreviated to lin,
although this is not consistent with the rest of mathlib.
In the new (non-commutative) development linear is not abbreviated, and declarations use _right
to indicate they use the right action of matrices on vectors (via Matrix.vecMul).
When the two developments are made uniform, the names should be made uniform, too,
by choosing between linear and lin consistently,
and (presumably) adding _left where necessary.
Tags
linear_map, matrix, linear_equiv, diagonal, det, trace
Bilinear versions of matrix products
The definitions in this section are stated with two extra rings, to allow for non-commutative rings.
From this point on, we only work with commutative rings,
and fail to distinguish between Rᵐᵒᵖ and R.
This should eventually be remedied.
theorem Matrix.stdBasis.congr_simp E1 #
∀ (R : Type u_1) (m : Type u_2) (n : Type u_3) [inst : Fintype m] [inst_1 : Finite n] [inst_2 : Semiring R],
Matrix.stdBasis R m n = Matrix.stdBasis R m n
theorem AlgEquiv.ofLinearEquiv.congr_simp E1 #
∀ {R : Type uR} {A₁ : Type u_1} {A₂ : Type u_2} [inst : Semiring R] [inst_1 : NonUnitalNonAssocSemiring A₁]
[inst_2 : NonUnitalNonAssocSemiring A₂] [inst_3 : Module R A₁] [inst_4 : Module R A₂] (l l_1 : A₁ ≃ₗ[R] A₂)
(e_l : l = l_1) (map_mul : ∀ (x y : A₁), l (x * y) = l x * l y),
AlgEquiv.ofLinearEquiv l map_mul = AlgEquiv.ofLinearEquiv l_1 ⋯
theorem DistribMulAction.toLinearEquiv.congr_simp E1 #
∀ (R : Type u_1) {S : Type u_4} (M : Type u_5) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
[inst_3 : Group S] [inst_4 : DistribMulAction S M] [inst_5 : SMulCommClass S R M] (s s_1 : S),
s = s_1 → DistribMulAction.toLinearEquiv R M s = DistribMulAction.toLinearEquiv R M s_1
theorem Module.Basis.smulTower'.congr_simp E1 #
∀ {R : Type u_1} {S : Type u_2} {A : Type u_3} [inst : Semiring R] [inst_1 : Semiring S] [inst_2 : AddCommMonoid A]
[inst_3 : Module R S] [inst_4 : Module S A] [inst_5 : Module R A] [inst_6 : IsScalarTower R S A] {ι : Type u_5}
{ι' : Type u_6} (b b_1 : Module.Basis ι R S),
b = b_1 → ∀ (c c_1 : Module.Basis ι' S A), c = c_1 → b.smulTower' c = b_1.smulTower' c_1
theorem LinearMap.toMatrix.congr_simp E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype n] [inst_2 : Finite m]
[inst_3 : DecidableEq n] {M₁ : Type u_5} {M₂ : Type u_6} [inst_4 : AddCommMonoid M₁] [inst_5 : AddCommMonoid M₂]
[inst_6 : Module R M₁] [inst_7 : Module R M₂] (v₁ v₁_1 : Module.Basis n R M₁),
v₁ = v₁_1 → ∀ (v₂ v₂_1 : Module.Basis m R M₂), v₂ = v₂_1 → LinearMap.toMatrix v₁ v₂ = LinearMap.toMatrix v₁_1 v₂_1
theorem Matrix.toLin.congr_simp E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype n] [inst_2 : Finite m]
[inst_3 : DecidableEq n] {M₁ : Type u_5} {M₂ : Type u_6} [inst_4 : AddCommMonoid M₁] [inst_5 : AddCommMonoid M₂]
[inst_6 : Module R M₁] [inst_7 : Module R M₂] (v₁ v₁_1 : Module.Basis n R M₁),
v₁ = v₁_1 → ∀ (v₂ v₂_1 : Module.Basis m R M₂), v₂ = v₂_1 → Matrix.toLin v₁ v₂ = Matrix.toLin v₁_1 v₂_1
theorem Matrix.vecMulBilin.congr_simp E1 #
∀ {m : Type u_1} {n : Type u_2} (R : Type u_3) (S : Type u_4) {A : Type u_5} [inst : Semiring R] [inst_1 : Semiring S]
[inst_2 : NonUnitalNonAssocSemiring A] [inst_3 : Module R A] [inst_4 : Module S A] [inst_5 : SMulCommClass S R A]
[inst_6 : SMulCommClass S A A] [inst_7 : IsScalarTower R A A] [inst_8 : Fintype m],
Matrix.vecMulBilin R S = Matrix.vecMulBilin R S
theorem Module.Basis.smulTower.congr_simp E1 #
∀ {R : Type u_1} {S : Type u_2} {A : Type u_3} [inst : Semiring R] [inst_1 : Semiring S] [inst_2 : AddCommMonoid A]
[inst_3 : Module R S] [inst_4 : Module S A] [inst_5 : Module R A] [inst_6 : IsScalarTower R S A] {ι : Type u_5}
{ι' : Type u_6} (b b_1 : Module.Basis ι R S),
b = b_1 → ∀ (c c_1 : Module.Basis ι' S A), c = c_1 → b.smulTower c = b_1.smulTower c_1
def Matrix.vecMulBilin E1 #
{m : Type u_1} →
{n : Type u_2} →
(R : Type u_3) →
(S : Type u_4) →
{A : Type u_5} →
[inst : Semiring R] →
[inst_1 : Semiring S] →
[inst_2 : NonUnitalNonAssocSemiring A] →
[inst_3 : Module R A] →
[inst_4 : Module S A] →
[inst_5 : SMulCommClass S R A] →
[SMulCommClass S A A] →
[IsScalarTower R A A] → [Fintype m] → (m → A) →ₗ[R] Matrix m n A →ₗ[S] n → A
Matrix.vecMul as a bilinear map.
When A is non-commutative, this can be instantiated as vecMulBilin A Aᵐᵒᵖ
theorem Matrix.vecMulBilin_apply E0 #
∀ {m : Type u_1} {n : Type u_2} (R : Type u_3) (S : Type u_4) {A : Type u_5} [inst : Semiring R] [inst_1 : Semiring S]
[inst_2 : NonUnitalNonAssocSemiring A] [inst_3 : Module R A] [inst_4 : Module S A] [inst_5 : SMulCommClass S R A]
[inst_6 : SMulCommClass S A A] [inst_7 : IsScalarTower R A A] [inst_8 : Fintype m] (v : m → A) (M : Matrix m n A),
((Matrix.vecMulBilin R S) v) M = Matrix.vecMul v M
def Matrix.mulVecBilin E1 #
{m : Type u_1} →
{n : Type u_2} →
(R : Type u_3) →
(S : Type u_4) →
{A : Type u_5} →
[inst : Semiring R] →
[inst_1 : Semiring S] →
[inst_2 : NonUnitalNonAssocSemiring A] →
[inst_3 : Module R A] →
[inst_4 : Module S A] →
[inst_5 : SMulCommClass S R A] →
[SMulCommClass S A A] →
[IsScalarTower R A A] → [Fintype n] → Matrix m n A →ₗ[R] (n → A) →ₗ[S] m → A
Matrix.mulVec as a bilinear map.
When A is non-commutative, this can be instantiated as mulVecBilin A Aᵐᵒᵖ
theorem Matrix.mulVecBilin_apply E0 #
∀ {m : Type u_1} {n : Type u_2} (R : Type u_3) (S : Type u_4) {A : Type u_5} [inst : Semiring R] [inst_1 : Semiring S]
[inst_2 : NonUnitalNonAssocSemiring A] [inst_3 : Module R A] [inst_4 : Module S A] [inst_5 : SMulCommClass S R A]
[inst_6 : SMulCommClass S A A] [inst_7 : IsScalarTower R A A] [inst_8 : Fintype n] (M : Matrix m n A) (v : n → A),
((Matrix.mulVecBilin R S) M) v = M.mulVec v
def vecMulVecBilin E1 #
{m : Type u_1} →
{n : Type u_2} →
(R : Type u_3) →
(S : Type u_4) →
{A : Type u_5} →
[inst : Semiring R] →
[inst_1 : Semiring S] →
[inst_2 : NonUnitalNonAssocSemiring A] →
[inst_3 : Module R A] →
[inst_4 : Module S A] →
[inst_5 : SMulCommClass S R A] →
[SMulCommClass S A A] → [IsScalarTower R A A] → (m → A) →ₗ[R] (n → A) →ₗ[S] Matrix m n A
vecMulVec as a bilinear map.
When A is noncommutative, R and S can be instantiated as vecMulVecBilin A Aᵐᵒᵖ.
theorem vecMulVecBilin_apply_apply E0 #
∀ {m : Type u_1} {n : Type u_2} (R : Type u_3) (S : Type u_4) {A : Type u_5} [inst : Semiring R] [inst_1 : Semiring S]
[inst_2 : NonUnitalNonAssocSemiring A] [inst_3 : Module R A] [inst_4 : Module S A] [inst_5 : SMulCommClass S R A]
[inst_6 : SMulCommClass S A A] [inst_7 : IsScalarTower R A A] (x : m → A) (y : n → A),
((vecMulVecBilin R S) x) y = Matrix.vecMulVec x y
def dotProductBilin E1 #
{m : Type u_1} →
(R : Type u_3) →
(S : Type u_4) →
{A : Type u_5} →
[inst : Semiring R] →
[inst_1 : Semiring S] →
[inst_2 : NonUnitalNonAssocSemiring A] →
[inst_3 : Module R A] →
[inst_4 : Module S A] →
[inst_5 : SMulCommClass S R A] →
[SMulCommClass S A A] → [IsScalarTower R A A] → [Fintype m] → (m → A) →ₗ[R] (m → A) →ₗ[S] A
dotProduct as a bilinear map.
When A is noncommutative, R and S can be instantiated as dotProductBilin A Aᵐᵒᵖ.
theorem dotProductBilin_apply_apply E0 #
∀ {m : Type u_1} (R : Type u_3) (S : Type u_4) {A : Type u_5} [inst : Semiring R] [inst_1 : Semiring S]
[inst_2 : NonUnitalNonAssocSemiring A] [inst_3 : Module R A] [inst_4 : Module S A] [inst_5 : SMulCommClass S R A]
[inst_6 : SMulCommClass S A A] [inst_7 : IsScalarTower R A A] [inst_8 : Fintype m] (x y : m → A),
((dotProductBilin R S) x) y = x ⬝ᵥ y
abbrev Matrix.vecMulLinear E1 #
{R : Type u_1} →
[inst : Semiring R] → {m : Type u_3} → {n : Type u_4} → [Fintype m] → Matrix m n R → (m → R) →ₗ[R] n → R
Matrix.vecMul M is a linear map.
Note this is a special case of Matrix.vecMulBilin.
theorem Matrix.vecMulLinear_apply E0 #
∀ {R : Type u_1} [inst : Semiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype m] (M : Matrix m n R) (x : m → R),
M.vecMulLinear x = Matrix.vecMul x M
theorem Matrix.coe_vecMulLinear E0 #
∀ {R : Type u_1} [inst : Semiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype m] (M : Matrix m n R),
⇑M.vecMulLinear = fun v ↦ Matrix.vecMul v M
theorem range_vecMulLinear E1 #
∀ {R : Type u_1} [inst : Semiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype m] (M : Matrix m n R),
M.vecMulLinear.range = Submodule.span R (Set.range M.row)
theorem Matrix.vecMul_injective_iff E0 #
∀ {R : Type u_1} [inst : Semiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype m] {M : Matrix m n R},
(Function.Injective fun v ↦ Matrix.vecMul v M) ↔ LinearIndependent R M.row
theorem Matrix.linearIndependent_rows_of_isUnit E1 #
∀ {R : Type u_1} [inst : Semiring R] {m : Type u_3} [inst_1 : Fintype m] {A : Matrix m m R} [inst_2 : DecidableEq m],
IsUnit A → LinearIndependent R A.row
def LinearMap.toMatrixRight' E1 #
{R : Type u_1} →
[inst : Semiring R] →
{m : Type u_3} → {n : Type u_4} → [Fintype m] → [DecidableEq m] → ((m → R) →ₗ[R] n → R) ≃ₗ[Rᵐᵒᵖ] Matrix m n R
Linear maps (m → R) →ₗ[R] (n → R) are linearly equivalent over Rᵐᵒᵖ to Matrix m n R,
by having matrices act by right multiplication.
abbrev Matrix.toLinearMapRight' E1 #
{R : Type u_1} →
[inst : Semiring R] →
{m : Type u_3} → {n : Type u_4} → [Fintype m] → [DecidableEq m] → Matrix m n R ≃ₗ[Rᵐᵒᵖ] (m → R) →ₗ[R] n → R
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.
theorem Matrix.toLinearMapRight'_apply E0 #
∀ {R : Type u_1} [inst : Semiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype m] [inst_2 : DecidableEq m]
(M : Matrix m n R) (v : m → R), (Matrix.toLinearMapRight' M) v = Matrix.vecMul v M
theorem Matrix.toLinearMapRight'_mul E0 #
∀ {R : Type u_1} [inst : Semiring R] {l : Type u_2} {m : Type u_3} {n : Type u_4} [inst_1 : Fintype m]
[inst_2 : DecidableEq m] [inst_3 : Fintype l] [inst_4 : DecidableEq l] (M : Matrix l m R) (N : Matrix m n R),
Matrix.toLinearMapRight' (M * N) = Matrix.toLinearMapRight' N ∘ₗ Matrix.toLinearMapRight' M
theorem Matrix.toLinearMapRight'_mul_apply E0 #
∀ {R : Type u_1} [inst : Semiring R] {l : Type u_2} {m : Type u_3} {n : Type u_4} [inst_1 : Fintype m]
[inst_2 : DecidableEq m] [inst_3 : Fintype l] [inst_4 : DecidableEq l] (M : Matrix l m R) (N : Matrix m n R)
(x : l → R), (Matrix.toLinearMapRight' (M * N)) x = (Matrix.toLinearMapRight' N) ((Matrix.toLinearMapRight' M) x)
theorem LinearMap.toMatrixRight'_comp E0 #
∀ {R : Type u_1} [inst : Semiring R] {l : Type u_2} {m : Type u_3} {n : Type u_4} [inst_1 : Fintype m]
[inst_2 : DecidableEq m] [inst_3 : Fintype l] [inst_4 : DecidableEq l] (f : (l → R) →ₗ[R] m → R)
(g : (m → R) →ₗ[R] n → R), LinearMap.toMatrixRight' (g ∘ₗ f) = LinearMap.toMatrixRight' f * LinearMap.toMatrixRight' g
theorem Matrix.toLinearMapRight'_one E0 #
∀ {R : Type u_1} [inst : Semiring R] {m : Type u_3} [inst_1 : Fintype m] [inst_2 : DecidableEq m],
Matrix.toLinearMapRight' 1 = LinearMap.id
theorem LinearMap.toMatrixRight'_id E0 #
∀ {R : Type u_1} [inst : Semiring R] {m : Type u_3} [inst_1 : Fintype m] [inst_2 : DecidableEq m],
LinearMap.toMatrixRight' LinearMap.id = 1
def Matrix.toLinearEquivRight'OfInv E1 #
{R : Type u_1} →
[inst : Semiring R] →
{m : Type u_3} →
{n : Type u_4} →
[inst_1 : Fintype m] →
[inst_2 : DecidableEq m] →
[inst_3 : Fintype n] →
[inst_4 : DecidableEq n] →
{M : Matrix m n R} → {M' : Matrix n m R} → M * M' = 1 → M' * M = 1 → (n → R) ≃ₗ[R] m → R
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.
theorem Matrix.toLinearEquivRight'OfInv_symm_apply E0 #
∀ {R : Type u_1} [inst : Semiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype m] [inst_2 : DecidableEq m]
[inst_3 : Fintype n] [inst_4 : DecidableEq n] {M : Matrix m n R} {M' : Matrix n m R} (hMM' : M * M' = 1)
(hM'M : M' * M = 1) (a : m → R) (a_1 : n),
(Matrix.toLinearEquivRight'OfInv hMM' hM'M).symm a a_1 = (Matrix.toLinearMapRight' M) a a_1
theorem Matrix.toLinearEquivRight'OfInv_apply E0 #
∀ {R : Type u_1} [inst : Semiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype m] [inst_2 : DecidableEq m]
[inst_3 : Fintype n] [inst_4 : DecidableEq n] {M : Matrix m n R} {M' : Matrix n m R} (hMM' : M * M' = 1)
(hM'M : M' * M = 1) (a : n → R) (a_1 : m),
(Matrix.toLinearEquivRight'OfInv hMM' hM'M) a a_1 = (Matrix.toLinearMapRight' M') a a_1
abbrev Matrix.mulVecLin E1 #
{R : Type u_1} →
[inst : CommSemiring R] → {m : Type u_4} → {n : Type u_5} → [Fintype n] → Matrix m n R → (n → R) →ₗ[R] m → R
Matrix.mulVec M as a linear map.
Note this is a special case of Matrix.mulVecBilin.
theorem Matrix.coe_mulVecLin E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_4} {n : Type u_5} [inst_1 : Fintype n] (M : Matrix m n R),
⇑M.mulVecLin = M.mulVec
theorem Matrix.mulVecLin_apply E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_4} {n : Type u_5} [inst_1 : Fintype n] (M : Matrix m n R)
(v : n → R), M.mulVecLin v = M.mulVec v
theorem Matrix.mulVecLin_zero E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_4} {n : Type u_5} [inst_1 : Fintype n], Matrix.mulVecLin 0 = 0
theorem Matrix.mulVecLin_add E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_4} {n : Type u_5} [inst_1 : Fintype n] (M N : Matrix m n R),
(M + N).mulVecLin = M.mulVecLin + N.mulVecLin
theorem Matrix.mulVecLin_transpose E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_4} {n : Type u_5} [inst_1 : Fintype m] (M : Matrix m n R),
M.transpose.mulVecLin = M.vecMulLinear
theorem Matrix.vecMulLinear_transpose E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_4} {n : Type u_5} [inst_1 : Fintype n] (M : Matrix m n R),
M.transpose.vecMulLinear = M.mulVecLin
theorem Matrix.mulVecLin_submatrix E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {k : Type u_2} {l : Type u_3} {m : Type u_4} {n : Type u_5}
[inst_1 : Fintype n] [inst_2 : Fintype l] (f₁ : m → k) (e₂ : n ≃ l) (M : Matrix k l R),
(M.submatrix f₁ ⇑e₂).mulVecLin = LinearMap.funLeft R R f₁ ∘ₗ M.mulVecLin ∘ₗ LinearMap.funLeft R R ⇑e₂.symm
theorem Matrix.mulVecLin_reindex E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {k : Type u_2} {l : Type u_3} {m : Type u_4} {n : Type u_5}
[inst_1 : Fintype n] [inst_2 : Fintype l] (e₁ : k ≃ m) (e₂ : l ≃ n) (M : Matrix k l R),
((Matrix.reindex e₁ e₂) M).mulVecLin =
↑(LinearEquiv.funCongrLeft R R e₁.symm) ∘ₗ M.mulVecLin ∘ₗ ↑(LinearEquiv.funCongrLeft R R e₂)
A variant of Matrix.mulVecLin_submatrix that keeps around LinearEquivs.
theorem Matrix.mulVecLin_one E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_5} [inst_1 : Fintype n] [inst_2 : DecidableEq n],
Matrix.mulVecLin 1 = LinearMap.id
theorem Matrix.mulVecLin_mul E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {l : Type u_3} {m : Type u_4} {n : Type u_5} [inst_1 : Fintype n]
[inst_2 : Fintype m] (M : Matrix l m R) (N : Matrix m n R), (M * N).mulVecLin = M.mulVecLin ∘ₗ N.mulVecLin
theorem Matrix.ker_mulVecLin_eq_bot_iff E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_4} {n : Type u_5} [inst_1 : Fintype n] {M : Matrix m n R},
M.mulVecLin.ker = ⊥ ↔ ∀ (v : n → R), M.mulVec v = 0 → v = 0
theorem Matrix.range_mulVecLin E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_4} {n : Type u_5} [inst_1 : Fintype n] (M : Matrix m n R),
M.mulVecLin.range = Submodule.span R (Set.range M.col)
theorem Matrix.mulVec_injective_iff E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_4} {n : Type u_5} [inst_1 : Fintype n] {M : Matrix m n R},
Function.Injective M.mulVec ↔ LinearIndependent R M.col
theorem Matrix.linearIndependent_cols_of_isUnit E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_4} [inst_1 : Fintype m] {A : Matrix m m R}
[inst_2 : DecidableEq m], IsUnit A → LinearIndependent R A.col
def LinearMap.toMatrix' E3 #
{R : Type u_1} →
[inst : CommSemiring R] →
{m : Type u_4} → {n : Type u_5} → [DecidableEq n] → [Fintype n] → ((n → R) →ₗ[R] m → R) ≃ₗ[R] Matrix m n R
Linear maps (n → R) →ₗ[R] (m → R) are linearly equivalent to Matrix m n R.
def Matrix.toLin' E3 #
{R : Type u_1} →
[inst : CommSemiring R] →
{m : Type u_4} → {n : Type u_5} → [DecidableEq n] → [Fintype n] → Matrix m n R ≃ₗ[R] (n → R) →ₗ[R] m → R
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.mulVecLin.
theorem Matrix.toLin'_apply' E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_4} {n : Type u_5} [inst_1 : DecidableEq n] [inst_2 : Fintype n]
(M : Matrix m n R), Matrix.toLin' M = M.mulVecLin
theorem LinearMap.toMatrix'_symm E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_4} {n : Type u_5} [inst_1 : DecidableEq n] [inst_2 : Fintype n],
LinearMap.toMatrix'.symm = Matrix.toLin'
theorem Matrix.toLin'_symm E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_4} {n : Type u_5} [inst_1 : DecidableEq n] [inst_2 : Fintype n],
Matrix.toLin'.symm = LinearMap.toMatrix'
theorem LinearMap.toMatrix'_toLin' E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_4} {n : Type u_5} [inst_1 : DecidableEq n] [inst_2 : Fintype n]
(M : Matrix m n R), LinearMap.toMatrix' (Matrix.toLin' M) = M
theorem Matrix.toLin'_toMatrix' E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_4} {n : Type u_5} [inst_1 : DecidableEq n] [inst_2 : Fintype n]
(f : (n → R) →ₗ[R] m → R), Matrix.toLin' (LinearMap.toMatrix' f) = f
theorem LinearMap.toMatrix'_apply E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_4} {n : Type u_5} [inst_1 : DecidableEq n] [inst_2 : Fintype n]
(f : (n → R) →ₗ[R] m → R) (i : m) (j : n), LinearMap.toMatrix' f i j = f (Pi.single j 1) i
theorem Matrix.toLin'_apply E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_4} {n : Type u_5} [inst_1 : DecidableEq n] [inst_2 : Fintype n]
(M : Matrix m n R) (v : n → R), (Matrix.toLin' M) v = M.mulVec v
theorem LinearMap.toMatrix'_mulVec E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_4} {n : Type u_5} [inst_1 : DecidableEq n] [inst_2 : Fintype n]
(f : (n → R) →ₗ[R] m → R) (v : n → R), (LinearMap.toMatrix' f).mulVec v = f v
theorem Matrix.toLin'_one E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_5} [inst_1 : DecidableEq n] [inst_2 : Fintype n],
Matrix.toLin' 1 = LinearMap.id
theorem LinearMap.toMatrix'_id E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_5} [inst_1 : DecidableEq n] [inst_2 : Fintype n],
LinearMap.toMatrix' LinearMap.id = 1
theorem LinearMap.toMatrix'_one E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_5} [inst_1 : DecidableEq n] [inst_2 : Fintype n],
LinearMap.toMatrix' 1 = 1
theorem Matrix.toLin'_mul E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {l : Type u_3} {m : Type u_4} {n : Type u_5} [inst_1 : DecidableEq n]
[inst_2 : Fintype n] [inst_3 : Fintype m] [inst_4 : DecidableEq m] (M : Matrix l m R) (N : Matrix m n R),
Matrix.toLin' (M * N) = Matrix.toLin' M ∘ₗ Matrix.toLin' N
theorem Matrix.toLin'_pow E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_5} [inst_1 : DecidableEq n] [inst_2 : Fintype n] (M : Matrix n n R)
(k : ℕ), Matrix.toLin' (M ^ k) = Matrix.toLin' M ^ k
theorem Matrix.toLin'_submatrix E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {k : Type u_2} {l : Type u_3} {m : Type u_4} {n : Type u_5}
[inst_1 : DecidableEq n] [inst_2 : Fintype n] [inst_3 : Fintype l] [inst_4 : DecidableEq l] (f₁ : m → k) (e₂ : n ≃ l)
(M : Matrix k l R),
Matrix.toLin' (M.submatrix f₁ ⇑e₂) = LinearMap.funLeft R R f₁ ∘ₗ Matrix.toLin' M ∘ₗ LinearMap.funLeft R R ⇑e₂.symm
theorem Matrix.toLin'_reindex E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {k : Type u_2} {l : Type u_3} {m : Type u_4} {n : Type u_5}
[inst_1 : DecidableEq n] [inst_2 : Fintype n] [inst_3 : Fintype l] [inst_4 : DecidableEq l] (e₁ : k ≃ m) (e₂ : l ≃ n)
(M : Matrix k l R),
Matrix.toLin' ((Matrix.reindex e₁ e₂) M) =
↑(LinearEquiv.funCongrLeft R R e₁.symm) ∘ₗ Matrix.toLin' M ∘ₗ ↑(LinearEquiv.funCongrLeft R R e₂)
A variant of Matrix.toLin'_submatrix that keeps around LinearEquivs.
theorem Matrix.toLin'_mul_apply E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {l : Type u_3} {m : Type u_4} {n : Type u_5} [inst_1 : DecidableEq n]
[inst_2 : Fintype n] [inst_3 : Fintype m] [inst_4 : DecidableEq m] (M : Matrix l m R) (N : Matrix m n R) (x : n → R),
(Matrix.toLin' (M * N)) x = (Matrix.toLin' M) ((Matrix.toLin' N) x)
Shortcut lemma for Matrix.toLin'_mul and LinearMap.comp_apply
theorem LinearMap.toMatrix'_comp E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {l : Type u_3} {m : Type u_4} {n : Type u_5} [inst_1 : DecidableEq n]
[inst_2 : Fintype n] [inst_3 : Fintype l] [inst_4 : DecidableEq l] (f : (n → R) →ₗ[R] m → R)
(g : (l → R) →ₗ[R] n → R), LinearMap.toMatrix' (f ∘ₗ g) = LinearMap.toMatrix' f * LinearMap.toMatrix' g
theorem LinearMap.toMatrix'_mul E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_4} [inst_1 : Fintype m] [inst_2 : DecidableEq m]
(f g : (m → R) →ₗ[R] m → R), LinearMap.toMatrix' (f * g) = LinearMap.toMatrix' f * LinearMap.toMatrix' g
theorem LinearMap.toMatrix'_algebraMap E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_5} [inst_1 : DecidableEq n] [inst_2 : Fintype n] (x : R),
LinearMap.toMatrix' ((algebraMap R (Module.End R (n → R))) x) = (Matrix.scalar n) x
theorem Matrix.ker_toLin'_eq_bot_iff E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_4} {n : Type u_5} [inst_1 : DecidableEq n] [inst_2 : Fintype n]
{M : Matrix m n R}, (Matrix.toLin' M).ker = ⊥ ↔ ∀ (v : n → R), M.mulVec v = 0 → v = 0
theorem Matrix.range_toLin' E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_4} {n : Type u_5} [inst_1 : DecidableEq n] [inst_2 : Fintype n]
(M : Matrix m n R), (Matrix.toLin' M).range = Submodule.span R (Set.range M.col)
def Matrix.toLin'OfInv E1 #
{R : Type u_1} →
[inst : CommSemiring R] →
{m : Type u_4} →
{n : Type u_5} →
[inst_1 : DecidableEq n] →
[inst_2 : Fintype n] →
[inst_3 : Fintype m] →
[inst_4 : DecidableEq m] →
{M : Matrix m n R} → {M' : Matrix n m R} → M * M' = 1 → M' * M = 1 → (m → R) ≃ₗ[R] n → R
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.
theorem Matrix.toLin'OfInv_symm_apply E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_4} {n : Type u_5} [inst_1 : DecidableEq n] [inst_2 : Fintype n]
[inst_3 : Fintype m] [inst_4 : DecidableEq m] {M : Matrix m n R} {M' : Matrix n m R} (hMM' : M * M' = 1)
(hM'M : M' * M = 1) (a : n → R) (a_1 : m), (Matrix.toLin'OfInv hMM' hM'M).symm a a_1 = (Matrix.toLin' M) a a_1
theorem Matrix.toLin'OfInv_apply E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_4} {n : Type u_5} [inst_1 : DecidableEq n] [inst_2 : Fintype n]
[inst_3 : Fintype m] [inst_4 : DecidableEq m] {M : Matrix m n R} {M' : Matrix n m R} (hMM' : M * M' = 1)
(hM'M : M' * M = 1) (a : m → R) (a_1 : n), (Matrix.toLin'OfInv hMM' hM'M) a a_1 = (Matrix.toLin' M') a a_1
def LinearMap.toMatrixAlgEquiv' E1 #
{R : Type u_1} →
[inst : CommSemiring R] →
{n : Type u_5} → [DecidableEq n] → [inst_2 : Fintype n] → ((n → R) →ₗ[R] n → R) ≃ₐ[R] Matrix n n R
Linear maps (n → R) →ₗ[R] (n → R) are algebra equivalent to Matrix n n R.
def Matrix.toLinAlgEquiv' E1 #
{R : Type u_1} →
[inst : CommSemiring R] →
{n : Type u_5} → [DecidableEq n] → [inst_2 : Fintype n] → Matrix n n R ≃ₐ[R] (n → R) →ₗ[R] n → R
A Matrix n n R is algebra equivalent to a linear map (n → R) →ₗ[R] (n → R).
theorem LinearMap.toMatrixAlgEquiv'_symm E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_5} [inst_1 : DecidableEq n] [inst_2 : Fintype n],
LinearMap.toMatrixAlgEquiv'.symm = Matrix.toLinAlgEquiv'
theorem Matrix.toLinAlgEquiv'_symm E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_5} [inst_1 : DecidableEq n] [inst_2 : Fintype n],
Matrix.toLinAlgEquiv'.symm = LinearMap.toMatrixAlgEquiv'
theorem LinearMap.toMatrixAlgEquiv'_toLinAlgEquiv' E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_5} [inst_1 : DecidableEq n] [inst_2 : Fintype n]
(M : Matrix n n R), LinearMap.toMatrixAlgEquiv' (Matrix.toLinAlgEquiv' M) = M
theorem Matrix.toLinAlgEquiv'_toMatrixAlgEquiv' E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_5} [inst_1 : DecidableEq n] [inst_2 : Fintype n]
(f : (n → R) →ₗ[R] n → R), Matrix.toLinAlgEquiv' (LinearMap.toMatrixAlgEquiv' f) = f
theorem LinearMap.toMatrixAlgEquiv'_apply E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_5} [inst_1 : DecidableEq n] [inst_2 : Fintype n]
(f : (n → R) →ₗ[R] n → R) (i j : n), LinearMap.toMatrixAlgEquiv' f i j = f (Pi.single j 1) i
theorem Matrix.toLinAlgEquiv'_apply E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_5} [inst_1 : DecidableEq n] [inst_2 : Fintype n] (M : Matrix n n R)
(v : n → R), (Matrix.toLinAlgEquiv' M) v = M.mulVec v
theorem Matrix.toLinAlgEquiv'_one E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_5} [inst_1 : DecidableEq n] [inst_2 : Fintype n],
Matrix.toLinAlgEquiv' 1 = LinearMap.id
theorem LinearMap.toMatrixAlgEquiv'_id E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_5} [inst_1 : DecidableEq n] [inst_2 : Fintype n],
LinearMap.toMatrixAlgEquiv' LinearMap.id = 1
theorem LinearMap.toMatrixAlgEquiv'_comp E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_5} [inst_1 : DecidableEq n] [inst_2 : Fintype n]
(f g : (n → R) →ₗ[R] n → R),
LinearMap.toMatrixAlgEquiv' (f ∘ₗ g) = LinearMap.toMatrixAlgEquiv' f * LinearMap.toMatrixAlgEquiv' g
theorem LinearMap.toMatrixAlgEquiv'_mul E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_5} [inst_1 : DecidableEq n] [inst_2 : Fintype n]
(f g : (n → R) →ₗ[R] n → R),
LinearMap.toMatrixAlgEquiv' (f * g) = LinearMap.toMatrixAlgEquiv' f * LinearMap.toMatrixAlgEquiv' g
theorem LinearMap.isUnit_toMatrix'_iff E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_5} [inst_1 : DecidableEq n] [inst_2 : Fintype n]
{f : (n → R) →ₗ[R] n → R}, IsUnit (LinearMap.toMatrix' f) ↔ IsUnit f
theorem Matrix.isUnit_toLin'_iff E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_5} [inst_1 : DecidableEq n] [inst_2 : Fintype n]
{M : Matrix n n R}, IsUnit (Matrix.toLin' M) ↔ IsUnit M
def LinearMap.toMatrix E3 #
{R : Type u_1} →
[inst : CommSemiring R] →
{m : Type u_3} →
{n : Type u_4} →
[Fintype n] →
[Finite m] →
[DecidableEq n] →
{M₁ : Type u_5} →
{M₂ : Type u_6} →
[inst_4 : AddCommMonoid M₁] →
[inst_5 : AddCommMonoid M₂] →
[inst_6 : Module R M₁] →
[inst_7 : Module R M₂] →
Module.Basis n R M₁ → Module.Basis m R M₂ → (M₁ →ₗ[R] M₂) ≃ₗ[R] Matrix m n R
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.
theorem LinearMap.toMatrix_eq_toMatrix' E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype n] [inst_2 : Finite m]
[inst_3 : DecidableEq n], LinearMap.toMatrix (Pi.basisFun R n) (Pi.basisFun R m) = LinearMap.toMatrix'
LinearMap.toMatrix' is a particular case of LinearMap.toMatrix, for the standard basis
Pi.basisFun R n.
def Matrix.toLin E3 #
{R : Type u_1} →
[inst : CommSemiring R] →
{m : Type u_3} →
{n : Type u_4} →
[Fintype n] →
[Finite m] →
[DecidableEq n] →
{M₁ : Type u_5} →
{M₂ : Type u_6} →
[inst_4 : AddCommMonoid M₁] →
[inst_5 : AddCommMonoid M₂] →
[inst_6 : Module R M₁] →
[inst_7 : Module R M₂] →
Module.Basis n R M₁ → Module.Basis m R M₂ → Matrix m n R ≃ₗ[R] M₁ →ₗ[R] M₂
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₂.
theorem Matrix.toLin_eq_toLin' E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype n] [inst_2 : Finite m]
[inst_3 : DecidableEq n], Matrix.toLin (Pi.basisFun R n) (Pi.basisFun R m) = Matrix.toLin'
Matrix.toLin' is a particular case of Matrix.toLin, for the standard basis
Pi.basisFun R n.
theorem LinearMap.toMatrix_symm E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype n] [inst_2 : Finite m]
[inst_3 : DecidableEq n] {M₁ : Type u_5} {M₂ : Type u_6} [inst_4 : AddCommMonoid M₁] [inst_5 : AddCommMonoid M₂]
[inst_6 : Module R M₁] [inst_7 : Module R M₂] (v₁ : Module.Basis n R M₁) (v₂ : Module.Basis m R M₂),
(LinearMap.toMatrix v₁ v₂).symm = Matrix.toLin v₁ v₂
theorem Matrix.toLin_symm E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype n] [inst_2 : Finite m]
[inst_3 : DecidableEq n] {M₁ : Type u_5} {M₂ : Type u_6} [inst_4 : AddCommMonoid M₁] [inst_5 : AddCommMonoid M₂]
[inst_6 : Module R M₁] [inst_7 : Module R M₂] (v₁ : Module.Basis n R M₁) (v₂ : Module.Basis m R M₂),
(Matrix.toLin v₁ v₂).symm = LinearMap.toMatrix v₁ v₂
theorem Matrix.toLin_toMatrix E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype n] [inst_2 : Finite m]
[inst_3 : DecidableEq n] {M₁ : Type u_5} {M₂ : Type u_6} [inst_4 : AddCommMonoid M₁] [inst_5 : AddCommMonoid M₂]
[inst_6 : Module R M₁] [inst_7 : Module R M₂] (v₁ : Module.Basis n R M₁) (v₂ : Module.Basis m R M₂) (f : M₁ →ₗ[R] M₂),
(Matrix.toLin v₁ v₂) ((LinearMap.toMatrix v₁ v₂) f) = f
theorem LinearMap.toMatrix_toLin E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype n] [inst_2 : Finite m]
[inst_3 : DecidableEq n] {M₁ : Type u_5} {M₂ : Type u_6} [inst_4 : AddCommMonoid M₁] [inst_5 : AddCommMonoid M₂]
[inst_6 : Module R M₁] [inst_7 : Module R M₂] (v₁ : Module.Basis n R M₁) (v₂ : Module.Basis m R M₂)
(M : Matrix m n R), (LinearMap.toMatrix v₁ v₂) ((Matrix.toLin v₁ v₂) M) = M
theorem LinearMap.toMatrix_apply E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype n] [inst_2 : Finite m]
[inst_3 : DecidableEq n] {M₁ : Type u_5} {M₂ : Type u_6} [inst_4 : AddCommMonoid M₁] [inst_5 : AddCommMonoid M₂]
[inst_6 : Module R M₁] [inst_7 : Module R M₂] (v₁ : Module.Basis n R M₁) (v₂ : Module.Basis m R M₂) (f : M₁ →ₗ[R] M₂)
(i : m) (j : n), (LinearMap.toMatrix v₁ v₂) f i j = (v₂.repr (f (v₁ j))) i
theorem LinearMap.toMatrix_transpose_apply E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype n] [inst_2 : Finite m]
[inst_3 : DecidableEq n] {M₁ : Type u_5} {M₂ : Type u_6} [inst_4 : AddCommMonoid M₁] [inst_5 : AddCommMonoid M₂]
[inst_6 : Module R M₁] [inst_7 : Module R M₂] (v₁ : Module.Basis n R M₁) (v₂ : Module.Basis m R M₂) (f : M₁ →ₗ[R] M₂)
(j : n), ((LinearMap.toMatrix v₁ v₂) f).transpose j = ⇑(v₂.repr (f (v₁ j)))
theorem LinearMap.toMatrix_apply' E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype n] [inst_2 : Finite m]
[inst_3 : DecidableEq n] {M₁ : Type u_5} {M₂ : Type u_6} [inst_4 : AddCommMonoid M₁] [inst_5 : AddCommMonoid M₂]
[inst_6 : Module R M₁] [inst_7 : Module R M₂] (v₁ : Module.Basis n R M₁) (v₂ : Module.Basis m R M₂) (f : M₁ →ₗ[R] M₂)
(i : m) (j : n), (LinearMap.toMatrix v₁ v₂) f i j = (v₂.repr (f (v₁ j))) i
theorem LinearMap.toMatrix_transpose_apply' E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype n] [inst_2 : Finite m]
[inst_3 : DecidableEq n] {M₁ : Type u_5} {M₂ : Type u_6} [inst_4 : AddCommMonoid M₁] [inst_5 : AddCommMonoid M₂]
[inst_6 : Module R M₁] [inst_7 : Module R M₂] (v₁ : Module.Basis n R M₁) (v₂ : Module.Basis m R M₂) (f : M₁ →ₗ[R] M₂)
(j : n), ((LinearMap.toMatrix v₁ v₂) f).transpose j = ⇑(v₂.repr (f (v₁ j)))
theorem LinearMap.toMatrix_id E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n] {M₁ : Type u_5}
[inst_3 : AddCommMonoid M₁] [inst_4 : Module R M₁] (v₁ : Module.Basis n R M₁),
(LinearMap.toMatrix v₁ v₁) LinearMap.id = 1
This will be a special case of LinearMap.toMatrix_id_eq_basis_toMatrix.
theorem LinearMap.toMatrix_one E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n] {M₁ : Type u_5}
[inst_3 : AddCommMonoid M₁] [inst_4 : Module R M₁] (v₁ : Module.Basis n R M₁), (LinearMap.toMatrix v₁ v₁) 1 = 1
theorem LinearMap.toMatrix_singleton E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {ι : Type u_7} {ι' : Type u_8} [inst_1 : Unique ι] [inst_2 : Unique ι']
(f : R →ₗ[R] R) (i : ι') (j : ι),
(LinearMap.toMatrix (Module.Basis.singleton ι R) (Module.Basis.singleton ι' R)) f i j = f 1
theorem Matrix.toLin_one E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n] {M₁ : Type u_5}
[inst_3 : AddCommMonoid M₁] [inst_4 : Module R M₁] (v₁ : Module.Basis n R M₁), (Matrix.toLin v₁ v₁) 1 = LinearMap.id
theorem Matrix.toLin_scalar E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n] {M₁ : Type u_5}
[inst_3 : AddCommMonoid M₁] [inst_4 : Module R M₁] (v₁ : Module.Basis n R M₁) (r : R),
(Matrix.toLin v₁ v₁) ((Matrix.scalar n) r) = r • LinearMap.id
theorem LinearMap.toMatrix_reindexRange E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype n] [inst_2 : Finite m]
[inst_3 : DecidableEq n] {M₁ : Type u_5} {M₂ : Type u_6} [inst_4 : AddCommMonoid M₁] [inst_5 : AddCommMonoid M₂]
[inst_6 : Module R M₁] [inst_7 : Module R M₂] (v₁ : Module.Basis n R M₁) (v₂ : Module.Basis m R M₂)
[inst_8 : DecidableEq M₁] (f : M₁ →ₗ[R] M₂) (k : m) (i : n),
(LinearMap.toMatrix v₁.reindexRange v₂.reindexRange) f ⟨v₂ k, ⋯⟩ ⟨v₁ i, ⋯⟩ = (LinearMap.toMatrix v₁ v₂) f k i
theorem LinearMap.toMatrix_algebraMap E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n] {M₁ : Type u_5}
[inst_3 : AddCommMonoid M₁] [inst_4 : Module R M₁] (v₁ : Module.Basis n R M₁) (x : R),
(LinearMap.toMatrix v₁ v₁) ((algebraMap R (Module.End R M₁)) x) = (Matrix.scalar n) x
theorem LinearMap.toMatrix_mulVec_repr E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype n] [inst_2 : Finite m]
[inst_3 : DecidableEq n] {M₁ : Type u_5} {M₂ : Type u_6} [inst_4 : AddCommMonoid M₁] [inst_5 : AddCommMonoid M₂]
[inst_6 : Module R M₁] [inst_7 : Module R M₂] (v₁ : Module.Basis n R M₁) (v₂ : Module.Basis m R M₂) (f : M₁ →ₗ[R] M₂)
(x : M₁), ((LinearMap.toMatrix v₁ v₂) f).mulVec ⇑(v₁.repr x) = ⇑(v₂.repr (f x))
theorem Matrix.repr_toLin E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype n] [inst_2 : Finite m]
[inst_3 : DecidableEq n] {M₁ : Type u_5} {M₂ : Type u_6} [inst_4 : AddCommMonoid M₁] [inst_5 : AddCommMonoid M₂]
[inst_6 : Module R M₁] [inst_7 : Module R M₂] (v₁ : Module.Basis n R M₁) (v₂ : Module.Basis m R M₂) (M : Matrix m n R)
(x : M₁), ⇑(v₂.repr (((Matrix.toLin v₁ v₂) M) x)) = M.mulVec ⇑(v₁.repr x)
theorem LinearMap.toMatrix_basis_equiv E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {l : Type u_2} {M₁ : Type u_5} {M₂ : Type u_6} [inst_1 : AddCommMonoid M₁]
[inst_2 : AddCommMonoid M₂] [inst_3 : Module R M₁] [inst_4 : Module R M₂] [inst_5 : Fintype l]
[inst_6 : DecidableEq l] (b : Module.Basis l R M₁) (b' : Module.Basis l R M₂),
(LinearMap.toMatrix b' b) ↑(b'.equiv b (Equiv.refl l)) = 1
theorem LinearMap.toMatrix_smulBasis_left E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype n] [inst_2 : Finite m]
[inst_3 : DecidableEq n] {M₁ : Type u_5} {M₂ : Type u_6} [inst_4 : AddCommMonoid M₁] [inst_5 : AddCommMonoid M₂]
[inst_6 : Module R M₁] [inst_7 : Module R M₂] (v₁ : Module.Basis n R M₁) (v₂ : Module.Basis m R M₂) {G : Type u_7}
[inst_8 : Group G] [inst_9 : DistribMulAction G M₁] [inst_10 : SMulCommClass G R M₁] (g : G) (f : M₁ →ₗ[R] M₂),
(LinearMap.toMatrix (g • v₁) v₂) f = (LinearMap.toMatrix v₁ v₂) (f ∘ₗ DistribSMul.toLinearMap R M₁ g)
theorem LinearMap.toMatrix_smulBasis_right E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype n] [inst_2 : Finite m]
[inst_3 : DecidableEq n] {M₁ : Type u_5} {M₂ : Type u_6} [inst_4 : AddCommMonoid M₁] [inst_5 : AddCommMonoid M₂]
[inst_6 : Module R M₁] [inst_7 : Module R M₂] (v₁ : Module.Basis n R M₁) (v₂ : Module.Basis m R M₂) {G : Type u_7}
[inst_8 : Group G] [inst_9 : DistribMulAction G M₂] [inst_10 : SMulCommClass G R M₂] (g : G) (f : M₁ →ₗ[R] M₂),
(LinearMap.toMatrix v₁ (g • v₂)) f = (LinearMap.toMatrix v₁ v₂) (DistribSMul.toLinearMap R M₂ g⁻¹ ∘ₗ f)
theorem LinearMap.toMatrix_map_left E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype n] [inst_2 : Finite m]
[inst_3 : DecidableEq n] {M₁ : Type u_5} {M₂ : Type u_6} [inst_4 : AddCommMonoid M₁] [inst_5 : AddCommMonoid M₂]
[inst_6 : Module R M₁] [inst_7 : Module R M₂] (v₁ : Module.Basis n R M₁) (v₂ : Module.Basis m R M₂) {M₃ : Type u_7}
[inst_8 : AddCommMonoid M₃] [inst_9 : Module R M₃] (f : M₃ →ₗ[R] M₂) (g : M₁ ≃ₗ[R] M₃),
(LinearMap.toMatrix (v₁.map g) v₂) f = (LinearMap.toMatrix v₁ v₂) (f ∘ₗ ↑g)
theorem LinearMap.toMatrix_map_right E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype n] [inst_2 : Finite m]
[inst_3 : DecidableEq n] {M₁ : Type u_5} {M₂ : Type u_6} [inst_4 : AddCommMonoid M₁] [inst_5 : AddCommMonoid M₂]
[inst_6 : Module R M₁] [inst_7 : Module R M₂] (v₁ : Module.Basis n R M₁) (v₂ : Module.Basis m R M₂) {M₃ : Type u_7}
[inst_8 : AddCommMonoid M₃] [inst_9 : Module R M₃] (f : M₁ →ₗ[R] M₃) (g : M₂ ≃ₗ[R] M₃),
(LinearMap.toMatrix v₁ (v₂.map g)) f = (LinearMap.toMatrix v₁ v₂) (↑g.symm ∘ₗ f)
theorem LinearMap.toMatrix_toSpanSingleton E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n]
{M₂ : Type u_6} [inst_3 : AddCommMonoid M₂] [inst_4 : Module R M₂] [inst_5 : Finite m] (v₁ : Module.Basis n R R)
(v₂ : Module.Basis m R M₂) (x : M₂),
(LinearMap.toMatrix v₁ v₂) (LinearMap.toSpanSingleton R M₂ x) = Matrix.vecMulVec ⇑(v₂.repr x) ⇑v₁
The matrix of toSpanSingleton R M₂ x given by bases v₁ and v₂ is equal to
vecMulVec (v₂.repr x) v₁. When v₁ = Module.Basis.singleton
then this is the column matrix of v₂.repr x.
theorem LinearMap.toMatrix_smulRight E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n]
{M₁ : Type u_5} {M₂ : Type u_6} [inst_3 : AddCommMonoid M₁] [inst_4 : AddCommMonoid M₂] [inst_5 : Module R M₁]
[inst_6 : Module R M₂] (v₁ : Module.Basis n R M₁) (v₂ : Module.Basis m R M₂) [inst_7 : Finite m] (f : M₁ →ₗ[R] R)
(x : M₂), (LinearMap.toMatrix v₁ v₂) (f.smulRight x) = Matrix.vecMulVec (⇑(v₂.repr x)) (⇑f ∘ ⇑v₁)
theorem Matrix.toLin_apply E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n]
{M₁ : Type u_5} {M₂ : Type u_6} [inst_3 : AddCommMonoid M₁] [inst_4 : AddCommMonoid M₂] [inst_5 : Module R M₁]
[inst_6 : Module R M₂] (v₁ : Module.Basis n R M₁) (v₂ : Module.Basis m R M₂) [inst_7 : Fintype m] (M : Matrix m n R)
(v : M₁), ((Matrix.toLin v₁ v₂) M) v = ∑ j, M.mulVec (⇑(v₁.repr v)) j • v₂ j
theorem Matrix.toLin_self E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n]
{M₁ : Type u_5} {M₂ : Type u_6} [inst_3 : AddCommMonoid M₁] [inst_4 : AddCommMonoid M₂] [inst_5 : Module R M₁]
[inst_6 : Module R M₂] (v₁ : Module.Basis n R M₁) (v₂ : Module.Basis m R M₂) [inst_7 : Fintype m] (M : Matrix m n R)
(i : n), ((Matrix.toLin v₁ v₂) M) (v₁ i) = ∑ j, M j i • v₂ j
theorem Matrix.toLin_apply_eq_zero_iff E0 #
∀ {m : Type u_3} {n : Type u_4} [inst : Fintype n] [inst_1 : DecidableEq n] {R : Type u_7} {M₁ : Type u_8}
{M₂ : Type u_9} [inst_2 : Finite m] [inst_3 : CommRing R] [inst_4 : AddCommGroup M₁] [inst_5 : AddCommGroup M₂]
[inst_6 : Module R M₁] [inst_7 : Module R M₂] {v₁ : Module.Basis n R M₁} {v₂ : Module.Basis m R M₂} {A : Matrix m n R}
{x : M₁}, ((Matrix.toLin v₁ v₂) A) x = 0 ↔ ∀ (j : m), A.mulVec (⇑(v₁.repr x)) j = 0
theorem LinearMap.toMatrix_comp E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {l : Type u_2} {m : Type u_3} {n : Type u_4} [inst_1 : Fintype n]
[inst_2 : DecidableEq n] {M₁ : Type u_5} {M₂ : Type u_6} [inst_3 : AddCommMonoid M₁] [inst_4 : AddCommMonoid M₂]
[inst_5 : Module R M₁] [inst_6 : Module R M₂] (v₁ : Module.Basis n R M₁) (v₂ : Module.Basis m R M₂)
[inst_7 : Fintype m] {M₃ : Type u_7} [inst_8 : AddCommMonoid M₃] [inst_9 : Module R M₃] (v₃ : Module.Basis l R M₃)
[inst_10 : Finite l] [inst_11 : DecidableEq m] (f : M₂ →ₗ[R] M₃) (g : M₁ →ₗ[R] M₂),
(LinearMap.toMatrix v₁ v₃) (f ∘ₗ g) = (LinearMap.toMatrix v₂ v₃) f * (LinearMap.toMatrix v₁ v₂) g
theorem LinearMap.toMatrix_mul E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n] {M₁ : Type u_5}
[inst_3 : AddCommMonoid M₁] [inst_4 : Module R M₁] (v₁ : Module.Basis n R M₁) (f g : M₁ →ₗ[R] M₁),
(LinearMap.toMatrix v₁ v₁) (f * g) = (LinearMap.toMatrix v₁ v₁) f * (LinearMap.toMatrix v₁ v₁) g
theorem LinearMap.toMatrix_pow E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n] {M₁ : Type u_5}
[inst_3 : AddCommMonoid M₁] [inst_4 : Module R M₁] (v₁ : Module.Basis n R M₁) (f : M₁ →ₗ[R] M₁) (k : ℕ),
(LinearMap.toMatrix v₁ v₁) f ^ k = (LinearMap.toMatrix v₁ v₁) (f ^ k)
theorem Matrix.toLin_mul E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {l : Type u_2} {m : Type u_3} {n : Type u_4} [inst_1 : Fintype n]
[inst_2 : DecidableEq n] {M₁ : Type u_5} {M₂ : Type u_6} [inst_3 : AddCommMonoid M₁] [inst_4 : AddCommMonoid M₂]
[inst_5 : Module R M₁] [inst_6 : Module R M₂] (v₁ : Module.Basis n R M₁) (v₂ : Module.Basis m R M₂)
[inst_7 : Fintype m] {M₃ : Type u_7} [inst_8 : AddCommMonoid M₃] [inst_9 : Module R M₃] (v₃ : Module.Basis l R M₃)
[inst_10 : Finite l] [inst_11 : DecidableEq m] (A : Matrix l m R) (B : Matrix m n R),
(Matrix.toLin v₁ v₃) (A * B) = (Matrix.toLin v₂ v₃) A ∘ₗ (Matrix.toLin v₁ v₂) B
theorem Matrix.toLin_pow E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n] {M₁ : Type u_5}
[inst_3 : AddCommMonoid M₁] [inst_4 : Module R M₁] (v₁ : Module.Basis n R M₁) (A : Matrix n n R) (k : ℕ),
(Matrix.toLin v₁ v₁) (A ^ k) = (Matrix.toLin v₁ v₁) A ^ k
theorem Matrix.toLin_mul_apply E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {l : Type u_2} {m : Type u_3} {n : Type u_4} [inst_1 : Fintype n]
[inst_2 : DecidableEq n] {M₁ : Type u_5} {M₂ : Type u_6} [inst_3 : AddCommMonoid M₁] [inst_4 : AddCommMonoid M₂]
[inst_5 : Module R M₁] [inst_6 : Module R M₂] (v₁ : Module.Basis n R M₁) (v₂ : Module.Basis m R M₂)
[inst_7 : Fintype m] {M₃ : Type u_7} [inst_8 : AddCommMonoid M₃] [inst_9 : Module R M₃] (v₃ : Module.Basis l R M₃)
[inst_10 : Finite l] [inst_11 : DecidableEq m] (A : Matrix l m R) (B : Matrix m n R) (x : M₁),
((Matrix.toLin v₁ v₃) (A * B)) x = ((Matrix.toLin v₂ v₃) A) (((Matrix.toLin v₁ v₂) B) x)
Shortcut lemma for Matrix.toLin_mul and LinearMap.comp_apply.
def Matrix.toLinOfInv E1 #
{R : Type u_1} →
[inst : CommSemiring R] →
{m : Type u_3} →
{n : Type u_4} →
[inst_1 : Fintype n] →
[inst_2 : DecidableEq n] →
{M₁ : Type u_5} →
{M₂ : Type u_6} →
[inst_3 : AddCommMonoid M₁] →
[inst_4 : AddCommMonoid M₂] →
[inst_5 : Module R M₁] →
[inst_6 : Module R M₂] →
Module.Basis n R M₁ →
Module.Basis m R M₂ →
[inst_7 : Fintype m] →
[inst_8 : DecidableEq m] →
{M : Matrix m n R} → {M' : Matrix n m R} → M * M' = 1 → M' * M = 1 → M₁ ≃ₗ[R] M₂
If M and M are each other's inverse matrices, Matrix.toLin M and Matrix.toLin M'
form a linear equivalence.
theorem Matrix.toLinOfInv_symm_apply E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n]
{M₁ : Type u_5} {M₂ : Type u_6} [inst_3 : AddCommMonoid M₁] [inst_4 : AddCommMonoid M₂] [inst_5 : Module R M₁]
[inst_6 : Module R M₂] (v₁ : Module.Basis n R M₁) (v₂ : Module.Basis m R M₂) [inst_7 : Fintype m]
[inst_8 : DecidableEq m] {M : Matrix m n R} {M' : Matrix n m R} (hMM' : M * M' = 1) (hM'M : M' * M = 1) (a : M₂),
(Matrix.toLinOfInv v₁ v₂ hMM' hM'M).symm a = ((Matrix.toLin v₂ v₁) M') a
theorem Matrix.toLinOfInv_apply E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n]
{M₁ : Type u_5} {M₂ : Type u_6} [inst_3 : AddCommMonoid M₁] [inst_4 : AddCommMonoid M₂] [inst_5 : Module R M₁]
[inst_6 : Module R M₂] (v₁ : Module.Basis n R M₁) (v₂ : Module.Basis m R M₂) [inst_7 : Fintype m]
[inst_8 : DecidableEq m] {M : Matrix m n R} {M' : Matrix n m R} (hMM' : M * M' = 1) (hM'M : M' * M = 1) (a : M₁),
(Matrix.toLinOfInv v₁ v₂ hMM' hM'M) a = ((Matrix.toLin v₁ v₂) M) a
def LinearMap.toMatrixAlgEquiv E1 #
{R : Type u_1} →
[inst : CommSemiring R] →
{n : Type u_4} →
[inst_1 : Fintype n] →
[DecidableEq n] →
{M₁ : Type u_5} →
[inst_3 : AddCommMonoid M₁] →
[inst_4 : Module R M₁] → Module.Basis n R M₁ → (M₁ →ₗ[R] M₁) ≃ₐ[R] Matrix n n R
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 Matrix.toLinAlgEquiv E1 #
{R : Type u_1} →
[inst : CommSemiring R] →
{n : Type u_4} →
[inst_1 : Fintype n] →
[DecidableEq n] →
{M₁ : Type u_5} →
[inst_3 : AddCommMonoid M₁] → [inst_4 : Module R M₁] → Module.Basis n R M₁ → Matrix n n R ≃ₐ[R] M₁ →ₗ[R] M₁
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₁.
theorem LinearMap.toMatrixAlgEquiv_symm E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n] {M₁ : Type u_5}
[inst_3 : AddCommMonoid M₁] [inst_4 : Module R M₁] (v₁ : Module.Basis n R M₁),
(LinearMap.toMatrixAlgEquiv v₁).symm = Matrix.toLinAlgEquiv v₁
theorem Matrix.toLinAlgEquiv_symm E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n] {M₁ : Type u_5}
[inst_3 : AddCommMonoid M₁] [inst_4 : Module R M₁] (v₁ : Module.Basis n R M₁),
(Matrix.toLinAlgEquiv v₁).symm = LinearMap.toMatrixAlgEquiv v₁
theorem Matrix.toLinAlgEquiv_toMatrixAlgEquiv E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n] {M₁ : Type u_5}
[inst_3 : AddCommMonoid M₁] [inst_4 : Module R M₁] (v₁ : Module.Basis n R M₁) (f : M₁ →ₗ[R] M₁),
(Matrix.toLinAlgEquiv v₁) ((LinearMap.toMatrixAlgEquiv v₁) f) = f
theorem LinearMap.toMatrixAlgEquiv_toLinAlgEquiv E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n] {M₁ : Type u_5}
[inst_3 : AddCommMonoid M₁] [inst_4 : Module R M₁] (v₁ : Module.Basis n R M₁) (M : Matrix n n R),
(LinearMap.toMatrixAlgEquiv v₁) ((Matrix.toLinAlgEquiv v₁) M) = M
theorem LinearMap.toMatrixAlgEquiv_apply E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n] {M₁ : Type u_5}
[inst_3 : AddCommMonoid M₁] [inst_4 : Module R M₁] (v₁ : Module.Basis n R M₁) (f : M₁ →ₗ[R] M₁) (i j : n),
(LinearMap.toMatrixAlgEquiv v₁) f i j = (v₁.repr (f (v₁ j))) i
theorem LinearMap.toMatrixAlgEquiv_transpose_apply E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n] {M₁ : Type u_5}
[inst_3 : AddCommMonoid M₁] [inst_4 : Module R M₁] (v₁ : Module.Basis n R M₁) (f : M₁ →ₗ[R] M₁) (j : n),
((LinearMap.toMatrixAlgEquiv v₁) f).transpose j = ⇑(v₁.repr (f (v₁ j)))
theorem LinearMap.toMatrixAlgEquiv_apply' E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n] {M₁ : Type u_5}
[inst_3 : AddCommMonoid M₁] [inst_4 : Module R M₁] (v₁ : Module.Basis n R M₁) (f : M₁ →ₗ[R] M₁) (i j : n),
(LinearMap.toMatrixAlgEquiv v₁) f i j = (v₁.repr (f (v₁ j))) i
theorem LinearMap.toMatrixAlgEquiv_transpose_apply' E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n] {M₁ : Type u_5}
[inst_3 : AddCommMonoid M₁] [inst_4 : Module R M₁] (v₁ : Module.Basis n R M₁) (f : M₁ →ₗ[R] M₁) (j : n),
((LinearMap.toMatrixAlgEquiv v₁) f).transpose j = ⇑(v₁.repr (f (v₁ j)))
theorem Matrix.toLinAlgEquiv_apply E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n] {M₁ : Type u_5}
[inst_3 : AddCommMonoid M₁] [inst_4 : Module R M₁] (v₁ : Module.Basis n R M₁) (M : Matrix n n R) (v : M₁),
((Matrix.toLinAlgEquiv v₁) M) v = ∑ j, M.mulVec (⇑(v₁.repr v)) j • v₁ j
theorem Matrix.toLinAlgEquiv_self E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n] {M₁ : Type u_5}
[inst_3 : AddCommMonoid M₁] [inst_4 : Module R M₁] (v₁ : Module.Basis n R M₁) (M : Matrix n n R) (i : n),
((Matrix.toLinAlgEquiv v₁) M) (v₁ i) = ∑ j, M j i • v₁ j
theorem LinearMap.toMatrixAlgEquiv_id E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n] {M₁ : Type u_5}
[inst_3 : AddCommMonoid M₁] [inst_4 : Module R M₁] (v₁ : Module.Basis n R M₁),
(LinearMap.toMatrixAlgEquiv v₁) LinearMap.id = 1
theorem Matrix.toLinAlgEquiv_one E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n] {M₁ : Type u_5}
[inst_3 : AddCommMonoid M₁] [inst_4 : Module R M₁] (v₁ : Module.Basis n R M₁),
(Matrix.toLinAlgEquiv v₁) 1 = LinearMap.id
theorem LinearMap.toMatrixAlgEquiv_reindexRange E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n] {M₁ : Type u_5}
[inst_3 : AddCommMonoid M₁] [inst_4 : Module R M₁] (v₁ : Module.Basis n R M₁) [inst_5 : DecidableEq M₁]
(f : M₁ →ₗ[R] M₁) (k i : n),
(LinearMap.toMatrixAlgEquiv v₁.reindexRange) f ⟨v₁ k, ⋯⟩ ⟨v₁ i, ⋯⟩ = (LinearMap.toMatrixAlgEquiv v₁) f k i
theorem LinearMap.toMatrixAlgEquiv_comp E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n] {M₁ : Type u_5}
[inst_3 : AddCommMonoid M₁] [inst_4 : Module R M₁] (v₁ : Module.Basis n R M₁) (f g : M₁ →ₗ[R] M₁),
(LinearMap.toMatrixAlgEquiv v₁) (f ∘ₗ g) = (LinearMap.toMatrixAlgEquiv v₁) f * (LinearMap.toMatrixAlgEquiv v₁) g
theorem LinearMap.toMatrixAlgEquiv_mul E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n] {M₁ : Type u_5}
[inst_3 : AddCommMonoid M₁] [inst_4 : Module R M₁] (v₁ : Module.Basis n R M₁) (f g : M₁ →ₗ[R] M₁),
(LinearMap.toMatrixAlgEquiv v₁) (f * g) = (LinearMap.toMatrixAlgEquiv v₁) f * (LinearMap.toMatrixAlgEquiv v₁) g
theorem Matrix.toLinAlgEquiv_mul E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n] {M₁ : Type u_5}
[inst_3 : AddCommMonoid M₁] [inst_4 : Module R M₁] (v₁ : Module.Basis n R M₁) (A B : Matrix n n R),
(Matrix.toLinAlgEquiv v₁) (A * B) = (Matrix.toLinAlgEquiv v₁) A ∘ₗ (Matrix.toLinAlgEquiv v₁) B
theorem LinearMap.isUnit_toMatrix_iff E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n] {M₁ : Type u_5}
[inst_3 : AddCommMonoid M₁] [inst_4 : Module R M₁] (v₁ : Module.Basis n R M₁) {f : M₁ →ₗ[R] M₁},
IsUnit ((LinearMap.toMatrix v₁ v₁) f) ↔ IsUnit f
theorem Matrix.isUnit_toLin_iff E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n] {M₁ : Type u_5}
[inst_3 : AddCommMonoid M₁] [inst_4 : Module R M₁] (v₁ : Module.Basis n R M₁) {M : Matrix n n R},
IsUnit ((Matrix.toLin v₁ v₁) M) ↔ IsUnit M
theorem Matrix.toLin_finTwoProd_apply E0 #
∀ {R : Type u_1} [inst : CommSemiring R] (a b c d : R) (x : R × R),
((Matrix.toLin (Module.Basis.finTwoProd R) (Module.Basis.finTwoProd R)) !![a, b; c, d]) x =
(a * x.1 + b * x.2, c * x.1 + d * x.2)
theorem Matrix.toLin_finTwoProd E1 #
∀ {R : Type u_1} [inst : CommSemiring R] (a b c d : R),
(Matrix.toLin (Module.Basis.finTwoProd R) (Module.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)
theorem toMatrix_distrib_mul_action_toLinearMap E0 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n] {M₁ : Type u_5}
[inst_3 : AddCommMonoid M₁] [inst_4 : Module R M₁] (v₁ : Module.Basis n R M₁) (x : R),
(LinearMap.toMatrix v₁ v₁) (DistribSMul.toLinearMap R M₁ x) = Matrix.diagonal fun x_1 ↦ x
theorem LinearMap.toMatrix_prod_eq_fromRows E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n] {M₁ : Type u_5}
[inst_3 : AddCommMonoid M₁] [inst_4 : Module R M₁] (v₁ : Module.Basis n R M₁) {m' : Type u_8} {n' : Type u_9}
{M₁' : Type u_10} {M₂' : Type u_11} [inst_5 : Finite n'] [inst_6 : Finite m'] [inst_7 : AddCommMonoid M₁']
[inst_8 : AddCommMonoid M₂'] [inst_9 : Module R M₁'] [inst_10 : Module R M₂'] (v₁' : Module.Basis n' R M₁')
(v₂' : Module.Basis m' R M₂') (φ : M₁ →ₗ[R] M₁') (φ₂ : M₁ →ₗ[R] M₂'),
(LinearMap.toMatrix v₁ (v₁'.prod v₂')) (φ.prod φ₂) =
((LinearMap.toMatrix v₁ v₁') φ).fromRows ((LinearMap.toMatrix v₁ v₂') φ₂)
Disambiguation: This statement is about LinearMap.prod. For the statement about maps between
product modules see LinearMap.toMatrix_prod_eq_fromBlocks.
theorem Matrix.toLin_fromRows E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n] {M₁ : Type u_5}
[inst_3 : AddCommMonoid M₁] [inst_4 : Module R M₁] (v₁ : Module.Basis n R M₁) {m' : Type u_8} {n' : Type u_9}
{M₁' : Type u_10} {M₂' : Type u_11} [inst_5 : Finite n'] [inst_6 : Finite m'] [inst_7 : AddCommMonoid M₁']
[inst_8 : AddCommMonoid M₂'] [inst_9 : Module R M₁'] [inst_10 : Module R M₂'] (v₁' : Module.Basis n' R M₁')
(v₂' : Module.Basis m' R M₂') (A : Matrix n' n R) (B : Matrix m' n R),
(Matrix.toLin v₁ (v₁'.prod v₂')) (A.fromRows B) = ((Matrix.toLin v₁ v₁') A).prod ((Matrix.toLin v₁ v₂') B)
theorem LinearMap.toMatrix_coprod E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n]
{M₁ : Type u_5} {M₂ : Type u_6} [inst_3 : AddCommMonoid M₁] [inst_4 : AddCommMonoid M₂] [inst_5 : Module R M₁]
[inst_6 : Module R M₂] (v₁ : Module.Basis n R M₁) (v₂ : Module.Basis m R M₂) [inst_7 : Fintype m] {n' : Type u_9}
{M₁' : Type u_10} [inst_8 : Finite n'] [inst_9 : AddCommMonoid M₁'] [inst_10 : Module R M₁']
(v₁' : Module.Basis n' R M₁') [inst_11 : DecidableEq m] (φ : M₁ →ₗ[R] M₁') (φ₂ : M₂ →ₗ[R] M₁'),
(LinearMap.toMatrix (v₁.prod v₂) v₁') (φ.coprod φ₂) =
((LinearMap.toMatrix v₁ v₁') φ).fromCols ((LinearMap.toMatrix v₂ v₁') φ₂)
theorem Matrix.toLin_fromCols E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n]
{M₁ : Type u_5} {M₂ : Type u_6} [inst_3 : AddCommMonoid M₁] [inst_4 : AddCommMonoid M₂] [inst_5 : Module R M₁]
[inst_6 : Module R M₂] (v₁ : Module.Basis n R M₁) (v₂ : Module.Basis m R M₂) [inst_7 : Fintype m] {n' : Type u_9}
{M₁' : Type u_10} [inst_8 : Finite n'] [inst_9 : AddCommMonoid M₁'] [inst_10 : Module R M₁']
(v₁' : Module.Basis n' R M₁') [inst_11 : DecidableEq m] (A : Matrix n' n R) (B : Matrix n' m R),
(Matrix.toLin (v₁.prod v₂) v₁') (A.fromCols B) = ((Matrix.toLin v₁ v₁') A).coprod ((Matrix.toLin v₂ v₁') B)
theorem LinearMap.toMatrix_prod_eq_fromBlocks E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n]
{M₁ : Type u_5} {M₂ : Type u_6} [inst_3 : AddCommMonoid M₁] [inst_4 : AddCommMonoid M₂] [inst_5 : Module R M₁]
[inst_6 : Module R M₂] (v₁ : Module.Basis n R M₁) (v₂ : Module.Basis m R M₂) [inst_7 : Fintype m] {m' : Type u_8}
{n' : Type u_9} {M₁' : Type u_10} {M₂' : Type u_11} [inst_8 : Finite n'] [inst_9 : Finite m']
[inst_10 : AddCommMonoid M₁'] [inst_11 : AddCommMonoid M₂'] [inst_12 : Module R M₁'] [inst_13 : Module R M₂']
(v₁' : Module.Basis n' R M₁') (v₂' : Module.Basis m' R M₂') [inst_14 : DecidableEq m] (φ : M₁ × M₂ →ₗ[R] M₁' × M₂'),
(LinearMap.toMatrix (v₁.prod v₂) (v₁'.prod v₂')) φ =
Matrix.fromBlocks ((LinearMap.toMatrix v₁ v₁') (LinearMap.fst R M₁' M₂' ∘ₗ φ ∘ₗ LinearMap.inl R M₁ M₂))
((LinearMap.toMatrix v₂ v₁') (LinearMap.fst R M₁' M₂' ∘ₗ φ ∘ₗ LinearMap.inr R M₁ M₂))
((LinearMap.toMatrix v₁ v₂') (LinearMap.snd R M₁' M₂' ∘ₗ φ ∘ₗ LinearMap.inl R M₁ M₂))
((LinearMap.toMatrix v₂ v₂') (LinearMap.snd R M₁' M₂' ∘ₗ φ ∘ₗ LinearMap.inr R M₁ M₂))
Disambiguation: This statement is about maps between product modules. For the statement about
LinearMap.prod see LinearMap.toMatrix_prod_eq_fromRows.
theorem Matrix.toLin_fromBlocks E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n]
{M₁ : Type u_5} {M₂ : Type u_6} [inst_3 : AddCommMonoid M₁] [inst_4 : AddCommMonoid M₂] [inst_5 : Module R M₁]
[inst_6 : Module R M₂] (v₁ : Module.Basis n R M₁) (v₂ : Module.Basis m R M₂) [inst_7 : Fintype m] {m' : Type u_8}
{n' : Type u_9} {M₁' : Type u_10} {M₂' : Type u_11} [inst_8 : Finite n'] [inst_9 : Finite m']
[inst_10 : AddCommMonoid M₁'] [inst_11 : AddCommMonoid M₂'] [inst_12 : Module R M₁'] [inst_13 : Module R M₂']
(v₁' : Module.Basis n' R M₁') (v₂' : Module.Basis m' R M₂') [inst_14 : DecidableEq m] (A : Matrix n' n R)
(B : Matrix n' m R) (C : Matrix m' n R) (D : Matrix m' m R),
(Matrix.toLin (v₁.prod v₂) (v₁'.prod v₂')) (Matrix.fromBlocks A B C D) =
(((Matrix.toLin v₁ v₁') A).prod ((Matrix.toLin v₁ v₂') C)).coprod
(((Matrix.toLin v₂ v₁') B).prod ((Matrix.toLin v₂ v₂') D))
theorem LinearMap.toMatrix_prodMap E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_3} {n : Type u_4} [inst_1 : Fintype n] [inst_2 : DecidableEq n]
{M₁ : Type u_5} {M₂ : Type u_6} [inst_3 : AddCommMonoid M₁] [inst_4 : AddCommMonoid M₂] [inst_5 : Module R M₁]
[inst_6 : Module R M₂] (v₁ : Module.Basis n R M₁) (v₂ : Module.Basis m R M₂) [inst_7 : Fintype m] {m' : Type u_8}
{n' : Type u_9} {M₁' : Type u_10} {M₂' : Type u_11} [inst_8 : Finite n'] [inst_9 : Finite m']
[inst_10 : AddCommMonoid M₁'] [inst_11 : AddCommMonoid M₂'] [inst_12 : Module R M₁'] [inst_13 : Module R M₂']
(v₁' : Module.Basis n' R M₁') (v₂' : Module.Basis m' R M₂') [inst_14 : DecidableEq m] (φ₁ : M₁ →ₗ[R] M₁')
(φ₂ : M₂ →ₗ[R] M₂'),
(LinearMap.toMatrix (v₁.prod v₂) (v₁'.prod v₂')) (φ₁.prodMap φ₂) =
Matrix.fromBlocks ((LinearMap.toMatrix v₁ v₁') φ₁) 0 0 ((LinearMap.toMatrix v₂ v₂') φ₂)
theorem Algebra.toMatrix_lmul' E1 #
∀ {R : Type u_1} {S : Type u_2} [inst : CommSemiring R] [inst_1 : Semiring S] [inst_2 : Algebra R S] {m : Type u_3}
[inst_3 : Fintype m] [inst_4 : DecidableEq m] (b : Module.Basis m R S) (x : S) (i j : m),
(LinearMap.toMatrix b b) ((Algebra.lmul R S) x) i j = (b.repr (x * b j)) i
theorem Algebra.toMatrix_lsmul E0 #
∀ {R : Type u_1} {S : Type u_2} [inst : CommSemiring R] [inst_1 : Semiring S] [inst_2 : Algebra R S] {m : Type u_3}
[inst_3 : Fintype m] [inst_4 : DecidableEq m] (b : Module.Basis m R S) (x : R),
(LinearMap.toMatrix b b) ((Algebra.lsmul R R S) x) = Matrix.diagonal fun x_1 ↦ x
def Algebra.leftMulMatrix E1 #
{R : Type u_1} →
{S : Type u_2} →
[inst : CommSemiring R] →
[inst_1 : Semiring S] →
[inst_2 : Algebra R S] →
{m : Type u_3} → [inst_3 : Fintype m] → [inst_4 : DecidableEq m] → Module.Basis m R S → S →ₐ[R] Matrix m m R
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.
theorem Algebra.leftMulMatrix_apply E0 #
∀ {R : Type u_1} {S : Type u_2} [inst : CommSemiring R] [inst_1 : Semiring S] [inst_2 : Algebra R S] {m : Type u_3}
[inst_3 : Fintype m] [inst_4 : DecidableEq m] (b : Module.Basis m R S) (x : S),
(Algebra.leftMulMatrix b) x = (LinearMap.toMatrix b b) ((Algebra.lmul R S) x)
theorem Algebra.leftMulMatrix_eq_repr_mul E1 #
∀ {R : Type u_1} {S : Type u_2} [inst : CommSemiring R] [inst_1 : Semiring S] [inst_2 : Algebra R S] {m : Type u_3}
[inst_3 : Fintype m] [inst_4 : DecidableEq m] (b : Module.Basis m R S) (x : S) (i j : m),
(Algebra.leftMulMatrix b) x i j = (b.repr (x * b j)) i
theorem Algebra.leftMulMatrix_mulVec_repr E1 #
∀ {R : Type u_1} {S : Type u_2} [inst : CommSemiring R] [inst_1 : Semiring S] [inst_2 : Algebra R S] {m : Type u_3}
[inst_3 : Fintype m] [inst_4 : DecidableEq m] (b : Module.Basis m R S) (x y : S),
((Algebra.leftMulMatrix b) x).mulVec ⇑(b.repr y) = ⇑(b.repr (x * y))
theorem Algebra.toMatrix_lmul_eq E0 #
∀ {R : Type u_1} {S : Type u_2} [inst : CommSemiring R] [inst_1 : Semiring S] [inst_2 : Algebra R S] {m : Type u_3}
[inst_3 : Fintype m] [inst_4 : DecidableEq m] (b : Module.Basis m R S) (x : S),
(LinearMap.toMatrix b b) (LinearMap.mulLeft R x) = (Algebra.leftMulMatrix b) x
theorem Algebra.leftMulMatrix_injective E1 #
∀ {R : Type u_1} {S : Type u_2} [inst : CommSemiring R] [inst_1 : Semiring S] [inst_2 : Algebra R S] {m : Type u_3}
[inst_3 : Fintype m] [inst_4 : DecidableEq m] (b : Module.Basis m R S), Function.Injective ⇑(Algebra.leftMulMatrix b)
theorem Algebra.smul_leftMulMatrix E0 #
∀ {R : Type u_1} {S : Type u_2} [inst : CommSemiring R] [inst_1 : Semiring S] [inst_2 : Algebra R S] {m : Type u_3}
[inst_3 : Fintype m] [inst_4 : DecidableEq m] (b : Module.Basis m R S) {G : Type u_4} [inst_5 : Group G]
[inst_6 : DistribMulAction G S] [inst_7 : SMulCommClass G R S] [SMulCommClass G S S] (g : G) (x : S),
(Algebra.leftMulMatrix (g • b)) x = (Algebra.leftMulMatrix b) x
theorem LinearMap.restrictScalars_toMatrix E1 #
∀ {R : Type u_1} [inst : CommSemiring R] {m : Type u_3} [inst_1 : Fintype m] [inst_2 : DecidableEq m] {A : Type u_4}
{M : Type u_5} {n : Type u_6} [inst_3 : Fintype n] [inst_4 : DecidableEq n] [inst_5 : CommSemiring A]
[inst_6 : AddCommMonoid M] [inst_7 : Module R M] [inst_8 : Module A M] [inst_9 : Algebra R A]
[inst_10 : IsScalarTower R A M] (bA : Module.Basis m R A) (bM : Module.Basis n A M) (f : M →ₗ[A] M),
(LinearMap.toMatrix (bA.smulTower' bM) (bA.smulTower' bM)) (↑R f) =
(Matrix.comp n n m m R) (((LinearMap.toMatrix bM bM) f).map ⇑(Algebra.leftMulMatrix bA))
theorem Algebra.smulTower_leftMulMatrix E1 #
∀ {R : Type u_1} {S : Type u_2} {T : Type u_3} [inst : CommSemiring R] [inst_1 : CommSemiring S] [inst_2 : Semiring T]
[inst_3 : Algebra R S] [inst_4 : Algebra S T] [inst_5 : Algebra R T] [inst_6 : IsScalarTower R S T] {m : Type u_4}
{n : Type u_5} [inst_7 : Fintype m] [inst_8 : Fintype n] [inst_9 : DecidableEq m] [inst_10 : DecidableEq n]
(b : Module.Basis m R S) (c : Module.Basis n S T) (x : T) (ik jk : m × n),
(Algebra.leftMulMatrix (b.smulTower c)) x ik jk =
(Algebra.leftMulMatrix b) ((Algebra.leftMulMatrix c) x ik.2 jk.2) ik.1 jk.1
theorem Algebra.smulTower_leftMulMatrix_algebraMap E1 #
∀ {R : Type u_1} {S : Type u_2} {T : Type u_3} [inst : CommSemiring R] [inst_1 : CommSemiring S] [inst_2 : Semiring T]
[inst_3 : Algebra R S] [inst_4 : Algebra S T] [inst_5 : Algebra R T] [inst_6 : IsScalarTower R S T] {m : Type u_4}
{n : Type u_5} [inst_7 : Fintype m] [inst_8 : Fintype n] [inst_9 : DecidableEq m] [inst_10 : DecidableEq n]
(b : Module.Basis m R S) (c : Module.Basis n S T) (x : S),
(Algebra.leftMulMatrix (b.smulTower c)) ((algebraMap S T) x) =
Matrix.blockDiagonal fun x_1 ↦ (Algebra.leftMulMatrix b) x
theorem Algebra.smulTower_leftMulMatrix_algebraMap_eq E0 #
∀ {R : Type u_1} {S : Type u_2} {T : Type u_3} [inst : CommSemiring R] [inst_1 : CommSemiring S] [inst_2 : Semiring T]
[inst_3 : Algebra R S] [inst_4 : Algebra S T] [inst_5 : Algebra R T] [inst_6 : IsScalarTower R S T] {m : Type u_4}
{n : Type u_5} [inst_7 : Fintype m] [inst_8 : Fintype n] [inst_9 : DecidableEq m] [inst_10 : DecidableEq n]
(b : Module.Basis m R S) (c : Module.Basis n S T) (x : S) (i j : m) (k : n),
(Algebra.leftMulMatrix (b.smulTower c)) ((algebraMap S T) x) (i, k) (j, k) = (Algebra.leftMulMatrix b) x i j
theorem Algebra.smulTower_leftMulMatrix_algebraMap_ne E1 #
∀ {R : Type u_1} {S : Type u_2} {T : Type u_3} [inst : CommSemiring R] [inst_1 : CommSemiring S] [inst_2 : Semiring T]
[inst_3 : Algebra R S] [inst_4 : Algebra S T] [inst_5 : Algebra R T] [inst_6 : IsScalarTower R S T] {m : Type u_4}
{n : Type u_5} [inst_7 : Fintype m] [inst_8 : Fintype n] [inst_9 : DecidableEq m] [inst_10 : DecidableEq n]
(b : Module.Basis m R S) (c : Module.Basis n S T) (x : S) (i j : m) {k k' : n},
k ≠ k' → (Algebra.leftMulMatrix (b.smulTower c)) ((algebraMap S T) x) (i, k) (j, k') = 0
def algEquivMatrix' E1 #
{R : Type u_1} →
[inst : CommSemiring R] →
{n : Type u_2} → [DecidableEq n] → [inst_2 : Fintype n] → Module.End R (n → R) ≃ₐ[R] Matrix n n R
The natural equivalence between linear endomorphisms of finite free modules and square matrices is compatible with the algebra structures.
def algEquivMatrix E3 #
{R : Type u_1} →
[inst : CommSemiring R] →
{n : Type u_2} →
[DecidableEq n] →
{M : Type u_3} →
[inst_2 : AddCommMonoid M] →
[inst_3 : Module R M] → [inst_4 : Fintype n] → Module.Basis n R M → Module.End R M ≃ₐ[R] Matrix n n R
A basis of a module induces an equivalence of algebras from the endomorphisms of the module to square matrices.
def Module.Basis.linearMap E1 #
{R : Type u_1} →
{M₁ : Type u_3} →
{M₂ : Type u_4} →
{ι₁ : Type u_6} →
{ι₂ : Type u_7} →
[inst : CommSemiring R] →
[inst_1 : AddCommMonoid M₁] →
[inst_2 : AddCommMonoid M₂] →
[inst_3 : Module R M₁] →
[inst_4 : Module R M₂] →
[Fintype ι₁] →
[Fintype ι₂] →
[DecidableEq ι₁] →
Module.Basis ι₁ R M₁ → Module.Basis ι₂ R M₂ → Module.Basis (ι₂ × ι₁) R (M₁ →ₗ[R] M₂)
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.
theorem Module.Basis.linearMap_repr_apply E0 #
∀ {R : Type u_1} {M₁ : Type u_3} {M₂ : Type u_4} {ι₁ : Type u_6} {ι₂ : Type u_7} [inst : CommSemiring R]
[inst_1 : AddCommMonoid M₁] [inst_2 : AddCommMonoid M₂] [inst_3 : Module R M₁] [inst_4 : Module R M₂]
[inst_5 : Fintype ι₁] [inst_6 : Fintype ι₂] [inst_7 : DecidableEq ι₁] (b₁ : Module.Basis ι₁ R M₁)
(b₂ : Module.Basis ι₂ R M₂) (x : M₁ →ₗ[R] M₂),
(b₁.linearMap b₂).repr x = (Matrix.stdBasis R ι₂ ι₁).repr ((LinearMap.toMatrix b₁ b₂) x)
theorem Module.Basis.linearMap_repr_symm_apply E0 #
∀ {R : Type u_1} {M₁ : Type u_3} {M₂ : Type u_4} {ι₁ : Type u_6} {ι₂ : Type u_7} [inst : CommSemiring R]
[inst_1 : AddCommMonoid M₁] [inst_2 : AddCommMonoid M₂] [inst_3 : Module R M₁] [inst_4 : Module R M₂]
[inst_5 : Fintype ι₁] [inst_6 : Fintype ι₂] [inst_7 : DecidableEq ι₁] (b₁ : Module.Basis ι₁ R M₁)
(b₂ : Module.Basis ι₂ R M₂) (a : ι₂ × ι₁ →₀ R),
(b₁.linearMap b₂).repr.symm a = (Matrix.toLin b₁ b₂) ((Finsupp.linearCombination R ⇑(Matrix.stdBasis R ι₂ ι₁)) a)
theorem Module.Basis.linearMap_apply E0 #
∀ {R : Type u_1} {M₁ : Type u_3} {M₂ : Type u_4} {ι₁ : Type u_6} {ι₂ : Type u_7} [inst : CommSemiring R]
[inst_1 : AddCommMonoid M₁] [inst_2 : AddCommMonoid M₂] [inst_3 : Module R M₁] [inst_4 : Module R M₂]
[inst_5 : Fintype ι₁] [inst_6 : Fintype ι₂] [inst_7 : DecidableEq ι₁] (b₁ : Module.Basis ι₁ R M₁)
(b₂ : Module.Basis ι₂ R M₂) (ij : ι₂ × ι₁), (b₁.linearMap b₂) ij = (Matrix.toLin b₁ b₂) ((Matrix.stdBasis R ι₂ ι₁) ij)
theorem Module.Basis.linearMap_apply_apply E0 #
∀ {R : Type u_1} {M₁ : Type u_3} {M₂ : Type u_4} {ι₁ : Type u_6} {ι₂ : Type u_7} [inst : CommSemiring R]
[inst_1 : AddCommMonoid M₁] [inst_2 : AddCommMonoid M₂] [inst_3 : Module R M₁] [inst_4 : Module R M₂]
[inst_5 : Fintype ι₁] [inst_6 : Fintype ι₂] [inst_7 : DecidableEq ι₁] (b₁ : Module.Basis ι₁ R M₁)
(b₂ : Module.Basis ι₂ R M₂) (ij : ι₂ × ι₁) (k : ι₁), ((b₁.linearMap b₂) ij) (b₁ k) = if ij.2 = k then b₂ ij.1 else 0
abbrev Module.Basis.end E1 #
{R : Type u_1} →
{M : Type u_2} →
{ι : Type u_5} →
[inst : CommSemiring R] →
[inst_1 : AddCommMonoid M] →
[inst_2 : Module R M] →
[Fintype ι] → [DecidableEq ι] → Module.Basis ι R M → Module.Basis (ι × ι) R (Module.End R M)
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.
theorem Module.Basis.end_repr_apply E0 #
∀ {R : Type u_1} {M : Type u_2} {ι : Type u_5} [inst : CommSemiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
[inst_3 : Fintype ι] [inst_4 : DecidableEq ι] (b : Module.Basis ι R M) (x : M →ₗ[R] M),
b.end.repr x = (Matrix.stdBasis R ι ι).repr ((LinearMap.toMatrix b b) x)
theorem Module.Basis.end_repr_symm_apply E0 #
∀ {R : Type u_1} {M : Type u_2} {ι : Type u_5} [inst : CommSemiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
[inst_3 : Fintype ι] [inst_4 : DecidableEq ι] (b : Module.Basis ι R M) (a : ι × ι →₀ R),
b.end.repr.symm a = (Matrix.toLin b b) ((Finsupp.linearCombination R ⇑(Matrix.stdBasis R ι ι)) a)
theorem Module.Basis.end_apply E0 #
∀ {R : Type u_1} {M : Type u_2} {ι : Type u_5} [inst : CommSemiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
[inst_3 : Fintype ι] [inst_4 : DecidableEq ι] (b : Module.Basis ι R M) (ij : ι × ι),
b.end ij = (Matrix.toLin b b) ((Matrix.stdBasis R ι ι) ij)
theorem Module.Basis.end_apply_apply E0 #
∀ {R : Type u_1} {M : Type u_2} {ι : Type u_5} [inst : CommSemiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
[inst_3 : Fintype ι] [inst_4 : DecidableEq ι] (b : Module.Basis ι R M) (ij : ι × ι) (k : ι),
(b.end ij) (b k) = if ij.2 = k then b ij.1 else 0
theorem Module.Basis.lie_end_of_apply_eq_smul E1 #
∀ {ι : Type u_5} [inst : Fintype ι] [inst_1 : DecidableEq ι] {R : Type u_8} {M : Type u_9} [inst_2 : CommRing R]
[inst_3 : AddCommGroup M] [inst_4 : Module R M] (b : Module.Basis ι R M) (a : ι → R) (s : Module.End R M),
(∀ (k : ι), s (b k) = a k • b k) → ∀ (i j : ι), ⁅s, b.end (i, j)⁆ = (a i - a j) • b.end (i, j)
def endVecRingEquivMatrixEnd E1 #
(ι : Type u_1) →
[inst : Fintype ι] →
[DecidableEq ι] →
(A : Type u_3) →
[inst_2 : Semiring A] →
(M : Type u_4) →
[inst_3 : AddCommMonoid M] → [inst_4 : Module A M] → Module.End A (ι → M) ≃+* Matrix ι ι (Module.End A M)
Let M be an A-module. Every A-linear map Mⁿ → Mⁿ corresponds to a n×n-matrix whose entries
are A-linear maps M → M. In another word, we have End(Mⁿ) ≅ Matₙₓₙ(End(M)) defined by:
(f : Mⁿ → Mⁿ) ↦ (x ↦ f (0, ..., x at j-th position, ..., 0) i)ᵢⱼ and
m : Matₙₓₙ(End(M)) ↦ (v ↦ ∑ⱼ mᵢⱼ(vⱼ)).
See also LinearMap.toMatrix'
def endVecAlgEquivMatrixEnd E1 #
(ι : Type u_1) →
[inst : Fintype ι] →
[DecidableEq ι] →
(R : Type u_2) →
[inst_2 : CommSemiring R] →
(A : Type u_3) →
[inst_3 : Semiring A] →
[inst_4 : Algebra R A] →
(M : Type u_4) →
[inst_5 : AddCommMonoid M] →
[inst_6 : Module R M] →
[inst_7 : Module A M] →
[inst_8 : IsScalarTower R A M] → Module.End A (ι → M) ≃ₐ[R] Matrix ι ι (Module.End A M)
Let M be an A-module. Every A-linear map Mⁿ → Mⁿ corresponds to a n×n-matrix whose entries
are R-linear maps M → M. In another word, we have End(Mⁿ) ≅ Matₙₓₙ(End(M)) defined by:
(f : Mⁿ → Mⁿ) ↦ (x ↦ f (0, ..., x at j-th position, ..., 0) i)ᵢⱼ and
m : Matₙₓₙ(End(M)) ↦ (v ↦ ∑ⱼ mᵢⱼ(vⱼ)).
See also LinearMap.toMatrix'
theorem endVecAlgEquivMatrixEnd_apply_apply E0 #
∀ (ι : Type u_1) [inst : Fintype ι] [inst_1 : DecidableEq ι] (R : Type u_2) [inst_2 : CommSemiring R] (A : Type u_3)
[inst_3 : Semiring A] [inst_4 : Algebra R A] (M : Type u_4) [inst_5 : AddCommMonoid M] [inst_6 : Module R M]
[inst_7 : Module A M] [inst_8 : IsScalarTower R A M] (f : Module.End A (ι → M)) (i j : ι) (x : M),
((endVecAlgEquivMatrixEnd ι R A M) f i j) x = f (Pi.single j x) i
theorem endVecAlgEquivMatrixEnd_symm_apply_apply E0 #
∀ (ι : Type u_1) [inst : Fintype ι] [inst_1 : DecidableEq ι] (R : Type u_2) [inst_2 : CommSemiring R] (A : Type u_3)
[inst_3 : Semiring A] [inst_4 : Algebra R A] (M : Type u_4) [inst_5 : AddCommMonoid M] [inst_6 : Module R M]
[inst_7 : Module A M] [inst_8 : IsScalarTower R A M] (m : Matrix ι ι (Module.End A M)) (x : ι → M) (i : ι),
((endVecAlgEquivMatrixEnd ι R A M).symm m) x i = ∑ j, (m i j) (x j)
def matrixAlgEquivEndVecMulOpposite E1 #
{ι : Type u_1} →
[inst : Fintype ι] →
[DecidableEq ι] →
(R : Type u_2) →
[inst_2 : CommSemiring R] →
{A : Type u_3} → [inst_3 : Semiring A] → [inst_4 : Algebra R A] → Matrix ι ι A ≃ₐ[R] (Module.End A (ι → A))ᵐᵒᵖ
A matrix algebra is isomorphic to the opposite of an endomorphism algebra.
def matrixRingEquivEndVecMulOpposite E1 #
{ι : Type u_1} →
[inst : Fintype ι] →
[DecidableEq ι] → {A : Type u_3} → [inst_2 : Semiring A] → Matrix ι ι A ≃+* (Module.End A (ι → A))ᵐᵒᵖ
A matrix ring is isomorphic to the opposite of an endomorphism ring.
theorem isStablyFiniteRing_iff_isDedekindFiniteMonoid_moduleEnd E1 #
∀ {A : Type u_3} [inst : Semiring A],
IsStablyFiniteRing A ↔ ∀ (n : ℕ), IsDedekindFiniteMonoid (Module.End A (Fin n → A))
instance instIsStablyFiniteRingEndForallOfFinite E0 #
∀ {A : Type u_3} [inst : Semiring A] (ι : Type u_5) [Finite ι] [IsStablyFiniteRing A],
IsStablyFiniteRing (Module.End A (ι → A))
theorem isStablyFiniteRing_iff_injective_of_surjective E1 #
∀ {A : Type u_3} [inst : Semiring A],
IsStablyFiniteRing A ↔ ∀ (n : ℕ) (f : Module.End A (Fin n → A)), Function.Surjective ⇑f → Function.Injective ⇑f
theorem Module.End.injective_of_surjective_fin E1 #
∀ {A : Type u_3} [inst : Semiring A] [IsStablyFiniteRing A] {n : ℕ} {f : Module.End A (Fin n → A)},
Function.Surjective ⇑f → Function.Injective ⇑f
Module.End.injective_of_surjective is the more general version for finite free A-modules
not necessarily of the form Fin n → A, but this version requires less imports.