The areas / V07. Linear algebra
Mathlib.Data.Matrix.Composition
28 declarations. Mathlib docs · Source
Composition of matrices
This file shows that Mₙ(Mₘ(R)) ≃ Mₙₘ(R), Mₙ(Rᵒᵖ) ≃ₐ[K] Mₙ(R)ᵒᵖ
and also different levels of equivalence when R is an AddCommMonoid,
Semiring, and Algebra over a CommSemiring K.
Main definitions
Matrix.compis an equivalence betweenMatrix I J (Matrix K L R)andI × KbyJ × Lmatrices.Matrix.compAddEquiv:Matrix.compas anAddEquivMatrix.compRingEquiv:Matrix.compas aRingEquivMatrix.compLinearEquiv:Matrix.compas aLinearEquivMatrix.compAlgEquiv:Matrix.compas anAlgEquiv
def Matrix.comp E3 #
(I : Type u_1) →
(J : Type u_2) →
(K : Type u_3) → (L : Type u_4) → (R : Type u_5) → Matrix I J (Matrix K L R) ≃ Matrix (I × K) (J × L) R
An I by J matrix where each entry is a K by L matrix is equivalent to
an I × K by J × L matrix.
This is available in bundled forms as:
Matrix.compAddEquivMatrix.compLinearEquivMatrix.compRingEquivMatrix.compAlgEquiv
theorem Matrix.comp_apply E0 #
∀ (I : Type u_1) (J : Type u_2) (K : Type u_3) (L : Type u_4) (R : Type u_5) (m : Matrix I J (Matrix K L R))
(ik : I × K) (jl : J × L), (Matrix.comp I J K L R) m ik jl = m ik.1 jl.1 ik.2 jl.2
theorem Matrix.comp_symm_apply E0 #
∀ (I : Type u_1) (J : Type u_2) (K : Type u_3) (L : Type u_4) (R : Type u_5) (n : Matrix (I × K) (J × L) R) (i : I)
(j : J) (k : K) (l : L), (Matrix.comp I J K L R).symm n i j k l = n (i, k) (j, l)
theorem Matrix.comp_one E1 #
∀ {I : Type u_1} {J : Type u_2} {R : Type u_5} [inst : DecidableEq I] [inst_1 : DecidableEq J] [inst_2 : Zero R]
[inst_3 : One R], (Matrix.comp I I J J R) 1 = 1
theorem Matrix.comp_map_map E1 #
∀ {I : Type u_1} {J : Type u_2} {K : Type u_3} {L : Type u_4} {R : Type u_5} (R' : Type u_6)
(M : Matrix I J (Matrix K L R)) (f : R → R'),
(Matrix.comp I J K L R') (M.map fun M' ↦ M'.map f) = ((Matrix.comp I J K L R) M).map f
theorem Matrix.comp_single_single E0 #
∀ {I : Type u_1} {J : Type u_2} {K : Type u_3} {L : Type u_4} {R : Type u_5} [inst : DecidableEq I]
[inst_1 : DecidableEq J] [inst_2 : DecidableEq K] [inst_3 : DecidableEq L] [inst_4 : Zero R] (i : I) (j : J) (k : K)
(l : L) (r : R), (Matrix.comp I J K L R) (Matrix.single i j (Matrix.single k l r)) = Matrix.single (i, k) (j, l) r
theorem Matrix.comp_symm_single E0 #
∀ {I : Type u_1} {J : Type u_2} {K : Type u_3} {L : Type u_4} {R : Type u_5} [inst : DecidableEq I]
[inst_1 : DecidableEq J] [inst_2 : DecidableEq K] [inst_3 : DecidableEq L] [inst_4 : Zero R] (ii : I × K) (jj : J × L)
(r : R), (Matrix.comp I J K L R).symm (Matrix.single ii jj r) = Matrix.single ii.1 jj.1 (Matrix.single ii.2 jj.2 r)
theorem Matrix.comp_diagonal_diagonal E0 #
∀ {I : Type u_1} {J : Type u_2} {R : Type u_5} [inst : DecidableEq I] [inst_1 : DecidableEq J] [inst_2 : Zero R]
(d : I → J → R),
(Matrix.comp I I J J R) (Matrix.diagonal fun i ↦ Matrix.diagonal fun j ↦ d i j) = Matrix.diagonal fun ij ↦ d ij.1 ij.2
theorem Matrix.comp_symm_diagonal E0 #
∀ {I : Type u_1} {J : Type u_2} {R : Type u_5} [inst : DecidableEq I] [inst_1 : DecidableEq J] [inst_2 : Zero R]
(d : I × J → R),
(Matrix.comp I I J J R).symm (Matrix.diagonal d) = Matrix.diagonal fun i ↦ Matrix.diagonal fun j ↦ d (i, j)
theorem Matrix.comp_transpose E1 #
∀ {I : Type u_1} {J : Type u_2} {K : Type u_3} {L : Type u_4} {R : Type u_5} (M : Matrix I J (Matrix K L R)),
(Matrix.comp J I K L R) M.transpose = ((Matrix.comp I J L K R) (M.map fun x ↦ x.transpose)).transpose
theorem Matrix.comp_map_transpose E1 #
∀ {I : Type u_1} {J : Type u_2} {K : Type u_3} {L : Type u_4} {R : Type u_5} (M : Matrix I J (Matrix K L R)),
(Matrix.comp I J L K R) (M.map fun x ↦ x.transpose) = ((Matrix.comp J I K L R) M.transpose).transpose
theorem Matrix.comp_symm_transpose E1 #
∀ {I : Type u_1} {J : Type u_2} {K : Type u_3} {L : Type u_4} {R : Type u_5} (M : Matrix (I × K) (J × L) R),
(Matrix.comp J I L K R).symm M.transpose = (((Matrix.comp I J K L R).symm M).map fun x ↦ x.transpose).transpose
theorem Matrix.transpose_comp E1 #
∀ {I : Type u_1} {J : Type u_2} {K : Type u_3} {L : Type u_4} {R : Type u_5} (M : Matrix I J (Matrix K L R)),
((Matrix.comp I J K L R) M).transpose = (Matrix.comp J I L K R) (M.transpose.map fun x ↦ x.transpose)
def Matrix.compAddEquiv E3 #
(I : Type u_1) →
(J : Type u_2) →
(K : Type u_3) →
(L : Type u_4) → (R : Type u_5) → [inst : Add R] → Matrix I J (Matrix K L R) ≃+ Matrix (I × K) (J × L) R
Matrix.comp as AddEquiv
theorem Matrix.compAddEquiv_apply E0 #
∀ (I : Type u_1) (J : Type u_2) (K : Type u_3) (L : Type u_4) (R : Type u_5) [inst : Add R]
(M : Matrix I J (Matrix K L R)), (Matrix.compAddEquiv I J K L R) M = (Matrix.comp I J K L R) M
theorem Matrix.compAddEquiv_symm_apply E0 #
∀ (I : Type u_1) (J : Type u_2) (K : Type u_3) (L : Type u_4) (R : Type u_5) [inst : Add R]
(M : Matrix (I × K) (J × L) R), (Matrix.compAddEquiv I J K L R).symm M = (Matrix.comp I J K L R).symm M
def Matrix.compRingEquiv E3 #
(I : Type u_1) →
(J : Type u_2) →
(R : Type u_5) →
[inst : AddCommMonoid R] →
[inst_1 : Mul R] →
[inst_2 : Fintype I] → [inst_3 : Fintype J] → Matrix I I (Matrix J J R) ≃+* Matrix (I × J) (I × J) R
Matrix.comp as RingEquiv
theorem Matrix.compRingEquiv_apply E0 #
∀ (I : Type u_1) (J : Type u_2) (R : Type u_5) [inst : AddCommMonoid R] [inst_1 : Mul R] [inst_2 : Fintype I]
[inst_3 : Fintype J] (M : Matrix I I (Matrix J J R)), (Matrix.compRingEquiv I J R) M = (Matrix.comp I I J J R) M
theorem Matrix.compRingEquiv_symm_apply E0 #
∀ (I : Type u_1) (J : Type u_2) (R : Type u_5) [inst : AddCommMonoid R] [inst_1 : Mul R] [inst_2 : Fintype I]
[inst_3 : Fintype J] (M : Matrix (I × J) (I × J) R),
(Matrix.compRingEquiv I J R).symm M = (Matrix.comp I I J J R).symm M
instance Matrix.instIsStablyFiniteRing E0 #
∀ (I : Type u_1) [inst : Fintype I] (R : Type u_7) [inst_1 : MulOne R] [inst_2 : AddCommMonoid R]
[inst_3 : DecidableEq I] [IsStablyFiniteRing R], IsStablyFiniteRing (Matrix I I R)
def Matrix.compLinearEquiv E3 #
(I : Type u_1) →
(J : Type u_2) →
(K : Type u_3) →
(L : Type u_4) →
(R : Type u_5) →
(R₀ : Type u_7) →
[inst : Semiring R₀] →
[inst_1 : AddCommMonoid R] →
[inst_2 : Module R₀ R] → Matrix I J (Matrix K L R) ≃ₗ[R₀] Matrix (I × K) (J × L) R
Matrix.comp as LinearEquiv
theorem Matrix.compLinearEquiv_symm_apply E0 #
∀ (I : Type u_1) (J : Type u_2) (K : Type u_3) (L : Type u_4) (R : Type u_5) (R₀ : Type u_7) [inst : Semiring R₀]
[inst_1 : AddCommMonoid R] [inst_2 : Module R₀ R] (a : Matrix (I × K) (J × L) R),
(Matrix.compLinearEquiv I J K L R R₀).symm a = (Matrix.comp I J K L R).symm a
theorem Matrix.compLinearEquiv_apply E0 #
∀ (I : Type u_1) (J : Type u_2) (K : Type u_3) (L : Type u_4) (R : Type u_5) (R₀ : Type u_7) [inst : Semiring R₀]
[inst_1 : AddCommMonoid R] [inst_2 : Module R₀ R] (a : Matrix I J (Matrix K L R)),
(Matrix.compLinearEquiv I J K L R R₀) a = (Matrix.comp I J K L R) a
def Matrix.compAlgEquiv E3 #
(I : Type u_1) →
(J : Type u_2) →
(R : Type u_5) →
(K : Type u_7) →
[inst : CommSemiring K] →
[inst_1 : Semiring R] →
[inst_2 : Fintype I] →
[inst_3 : Fintype J] → [inst_4 : Algebra K R] → Matrix I I (Matrix J J R) ≃ₐ[K] Matrix (I × J) (I × J) R
Matrix.comp as AlgEquiv
theorem Matrix.compAlgEquiv_apply E0 #
∀ (I : Type u_1) (J : Type u_2) (R : Type u_5) (K : Type u_7) [inst : CommSemiring K] [inst_1 : Semiring R]
[inst_2 : Fintype I] [inst_3 : Fintype J] [inst_4 : Algebra K R] (M : Matrix I I (Matrix J J R)),
(Matrix.compAlgEquiv I J R K) M = (Matrix.comp I I J J R) M
theorem Matrix.compAlgEquiv_symm_apply E0 #
∀ (I : Type u_1) (J : Type u_2) (R : Type u_5) (K : Type u_7) [inst : CommSemiring K] [inst_1 : Semiring R]
[inst_2 : Fintype I] [inst_3 : Fintype J] [inst_4 : Algebra K R] (M : Matrix (I × J) (I × J) R),
(Matrix.compAlgEquiv I J R K).symm M = (Matrix.comp I I J J R).symm M
theorem Matrix.isUnit_comp_iff E0 #
∀ (I : Type u_1) (J : Type u_2) (R : Type u_5) [inst : Semiring R] [inst_1 : Fintype I] [inst_2 : Fintype J]
[inst_3 : DecidableEq I] [inst_4 : DecidableEq J] {M : Matrix I I (Matrix J J R)},
IsUnit ((Matrix.comp I I J J R) M) ↔ IsUnit M
theorem Matrix.isUnit_comp_symm_iff E0 #
∀ (I : Type u_1) (J : Type u_2) (R : Type u_5) [inst : Semiring R] [inst_1 : Fintype I] [inst_2 : Fintype J]
[inst_3 : DecidableEq I] [inst_4 : DecidableEq J] {M : Matrix (I × J) (I × J) R},
IsUnit ((Matrix.comp I I J J R).symm M) ↔ IsUnit M