The areas / V07. Linear algebra
Mathlib.LinearAlgebra.Matrix.RowCol
79 declarations. Mathlib docs · Source
Row and column matrices
This file provides results about row and column matrices.
Main definitions
Matrix.replicateRow ι r : Matrix ι n α: the matrix where every row is the vectorr : n → αMatrix.replicateCol ι c : Matrix m ι α: the matrix where every column is the vectorc : m → αMatrix.updateRow M i r: update theith row ofMtorMatrix.updateCol M j c: update thejth column ofMtoc
Updating rows and columns
Updating rows and columns commutes in the obvious way with reindexing the matrix.
reindex versions of the above submatrix lemmas for convenience.
theorem Matrix.updateRow.congr_simp E1 #
∀ {m : Type u_2} {n : Type u_3} {α : Type v} {inst : DecidableEq m} [inst_1 : DecidableEq m] (M M_1 : Matrix m n α),
M = M_1 →
∀ (i i_1 : m),
i = i_1 →
∀ (b b_1 : n → α),
b = b_1 →
∀ (a a_1 : m), a = a_1 → ∀ (a_2 a_3 : n), a_2 = a_3 → M.updateRow i b a a_2 = M_1.updateRow i_1 b_1 a_1 a_3
theorem Matrix.updateCol.congr_simp E1 #
∀ {m : Type u_2} {n : Type u_3} {α : Type v} {inst : DecidableEq n} [inst_1 : DecidableEq n] (M M_1 : Matrix m n α),
M = M_1 →
∀ (j j_1 : n),
j = j_1 →
∀ (b b_1 : m → α),
b = b_1 →
∀ (a a_1 : m), a = a_1 → ∀ (a_2 a_3 : n), a_2 = a_3 → M.updateCol j b a a_2 = M_1.updateCol j_1 b_1 a_1 a_3
def Matrix.replicateCol E1 #
{m : Type u_2} → {α : Type v} → (ι : Type u_6) → (m → α) → Matrix m ι α
Matrix.replicateCol ι u is the matrix with all columns equal to the vector u.
To get a column matrix with exactly one column,
Matrix.replicateCol (Fin 1) u is the canonical choice.
theorem Matrix.replicateCol_apply E0 #
∀ {m : Type u_2} {α : Type v} {ι : Type u_6} (w : m → α) (i : m) (j : ι), Matrix.replicateCol ι w i j = w i
def Matrix.replicateRow E1 #
{n : Type u_3} → {α : Type v} → (ι : Type u_6) → (n → α) → Matrix ι n α
Matrix.replicateRow ι u is the matrix with all rows equal to the vector u.
To get a row matrix with exactly one row, Matrix.replicateRow (Fin 1) u is the canonical choice.
theorem Matrix.replicateRow_apply E0 #
∀ {n : Type u_3} {α : Type v} {ι : Type u_6} (v : n → α) (i : ι) (j : n), Matrix.replicateRow ι v i j = v j
theorem Matrix.vecMulVec_one E0 #
∀ {m : Type u_2} {n : Type u_3} {R : Type u_5} [inst : MulOneClass R] (x : n → R),
Matrix.vecMulVec x 1 = Matrix.replicateCol m x
theorem Matrix.one_vecMulVec E0 #
∀ {m : Type u_2} {n : Type u_3} {R : Type u_5} [inst : MulOneClass R] (x : n → R),
Matrix.vecMulVec 1 x = Matrix.replicateRow m x
theorem Matrix.replicateCol_injective E1 #
∀ {m : Type u_2} {α : Type v} {ι : Type u_6} [Nonempty ι], Function.Injective (Matrix.replicateCol ι)
theorem Matrix.replicateCol_inj E0 #
∀ {m : Type u_2} {α : Type v} {ι : Type u_6} [Nonempty ι] {v w : m → α},
Matrix.replicateCol ι v = Matrix.replicateCol ι w ↔ v = w
theorem Matrix.replicateCol_zero E0 #
∀ {m : Type u_2} {α : Type v} {ι : Type u_6} [inst : Zero α], Matrix.replicateCol ι 0 = 0
theorem Matrix.replicateCol_eq_zero E0 #
∀ {m : Type u_2} {α : Type v} {ι : Type u_6} [inst : Zero α] [Nonempty ι] (v : m → α),
Matrix.replicateCol ι v = 0 ↔ v = 0
theorem Matrix.replicateCol_add E0 #
∀ {m : Type u_2} {α : Type v} {ι : Type u_6} [inst : Add α] (v w : m → α),
Matrix.replicateCol ι (v + w) = Matrix.replicateCol ι v + Matrix.replicateCol ι w
theorem Matrix.replicateCol_smul E0 #
∀ {m : Type u_2} {R : Type u_5} {α : Type v} {ι : Type u_6} [inst : SMul R α] (x : R) (v : m → α),
Matrix.replicateCol ι (x • v) = x • Matrix.replicateCol ι v
theorem Matrix.replicateRow_injective E1 #
∀ {n : Type u_3} {α : Type v} {ι : Type u_6} [Nonempty ι], Function.Injective (Matrix.replicateRow ι)
theorem Matrix.replicateRow_inj E0 #
∀ {n : Type u_3} {α : Type v} {ι : Type u_6} [Nonempty ι] {v w : n → α},
Matrix.replicateRow ι v = Matrix.replicateRow ι w ↔ v = w
theorem Matrix.replicateRow_zero E0 #
∀ {n : Type u_3} {α : Type v} {ι : Type u_6} [inst : Zero α], Matrix.replicateRow ι 0 = 0
theorem Matrix.replicateRow_eq_zero E0 #
∀ {n : Type u_3} {α : Type v} {ι : Type u_6} [inst : Zero α] [Nonempty ι] (v : n → α),
Matrix.replicateRow ι v = 0 ↔ v = 0
theorem Matrix.replicateRow_add E0 #
∀ {m : Type u_2} {α : Type v} {ι : Type u_6} [inst : Add α] (v w : m → α),
Matrix.replicateRow ι (v + w) = Matrix.replicateRow ι v + Matrix.replicateRow ι w
theorem Matrix.replicateRow_smul E0 #
∀ {m : Type u_2} {R : Type u_5} {α : Type v} {ι : Type u_6} [inst : SMul R α] (x : R) (v : m → α),
Matrix.replicateRow ι (x • v) = x • Matrix.replicateRow ι v
theorem Matrix.transpose_replicateCol E0 #
∀ {m : Type u_2} {α : Type v} {ι : Type u_6} (v : m → α), (Matrix.replicateCol ι v).transpose = Matrix.replicateRow ι v
theorem Matrix.transpose_replicateRow E0 #
∀ {m : Type u_2} {α : Type v} {ι : Type u_6} (v : m → α), (Matrix.replicateRow ι v).transpose = Matrix.replicateCol ι v
theorem Matrix.conjTranspose_replicateCol E0 #
∀ {m : Type u_2} {α : Type v} {ι : Type u_6} [inst : Star α] (v : m → α),
(Matrix.replicateCol ι v).conjTranspose = Matrix.replicateRow ι (star v)
theorem Matrix.conjTranspose_replicateRow E0 #
∀ {m : Type u_2} {α : Type v} {ι : Type u_6} [inst : Star α] (v : m → α),
(Matrix.replicateRow ι v).conjTranspose = Matrix.replicateCol ι (star v)
theorem Matrix.replicateRow_vecMul E1 #
∀ {m : Type u_2} {n : Type u_3} {α : Type v} {ι : Type u_6} [inst : Fintype m] [inst_1 : NonUnitalNonAssocSemiring α]
(M : Matrix m n α) (v : m → α), Matrix.replicateRow ι (Matrix.vecMul v M) = Matrix.replicateRow ι v * M
v ᵥ* M is the vector whose entries are those of replicateRow ι v * M.
theorem Matrix.replicateCol_vecMul E1 #
∀ {m : Type u_2} {n : Type u_3} {α : Type v} {ι : Type u_6} [inst : Fintype m] [inst_1 : NonUnitalNonAssocSemiring α]
(M : Matrix m n α) (v : m → α), Matrix.replicateCol ι (Matrix.vecMul v M) = (Matrix.replicateRow ι v * M).transpose
theorem Matrix.replicateCol_mulVec E1 #
∀ {m : Type u_2} {n : Type u_3} {α : Type v} {ι : Type u_6} [inst : Fintype n] [inst_1 : NonUnitalNonAssocSemiring α]
(M : Matrix m n α) (v : n → α), Matrix.replicateCol ι (M.mulVec v) = M * Matrix.replicateCol ι v
M *ᵥ v is the vector whose entries are those of M * replicateCol ι v.
theorem Matrix.replicateRow_mulVec E1 #
∀ {m : Type u_2} {n : Type u_3} {α : Type v} {ι : Type u_6} [inst : Fintype n] [inst_1 : NonUnitalNonAssocSemiring α]
(M : Matrix m n α) (v : n → α), Matrix.replicateRow ι (M.mulVec v) = (M * Matrix.replicateCol ι v).transpose
theorem Matrix.replicateRow_mulVec_eq_const E1 #
∀ {m : Type u_2} {α : Type v} {ι : Type u_6} [inst : Fintype m] [inst_1 : NonUnitalNonAssocSemiring α] (v w : m → α),
(Matrix.replicateRow ι v).mulVec w = Function.const ι (v ⬝ᵥ w)
theorem Matrix.mulVec_replicateCol_eq_const E1 #
∀ {m : Type u_2} {α : Type v} {ι : Type u_6} [inst : Fintype m] [inst_1 : NonUnitalNonAssocSemiring α] (v w : m → α),
Matrix.vecMul v (Matrix.replicateCol ι w) = Function.const ι (v ⬝ᵥ w)
theorem Matrix.replicateRow_mul_replicateCol E1 #
∀ {m : Type u_2} {α : Type v} {ι : Type u_6} {κ : Type u_7} [inst : Fintype m] [inst_1 : Mul α]
[inst_2 : AddCommMonoid α] (v w : m → α),
Matrix.replicateRow ι v * Matrix.replicateCol κ w = Matrix.of fun x x_1 ↦ v ⬝ᵥ w
theorem Matrix.replicateRow_mul_replicateCol_apply E0 #
∀ {m : Type u_2} {α : Type v} {ι : Type u_6} {κ : Type u_7} [inst : Fintype m] [inst_1 : Mul α]
[inst_2 : AddCommMonoid α] (v w : m → α) (i : ι) (j : κ),
(Matrix.replicateRow ι v * Matrix.replicateCol κ w) i j = v ⬝ᵥ w
theorem Matrix.diag_replicateCol_mul_replicateRow E0 #
∀ {n : Type u_3} {α : Type v} {ι : Type u_6} [inst : Mul α] [inst_1 : AddCommMonoid α] [inst_2 : Unique ι]
(a b : n → α), (Matrix.replicateCol ι a * Matrix.replicateRow ι b).diag = a * b
theorem Matrix.vecMulVec_eq E0 #
∀ {m : Type u_2} {n : Type u_3} {α : Type v} (ι : Type u_6) [inst : Mul α] [inst_1 : AddCommMonoid α]
[inst_2 : Unique ι] (w : m → α) (v : n → α), Matrix.vecMulVec w v = Matrix.replicateCol ι w * Matrix.replicateRow ι v
def Matrix.updateRow E1 #
{m : Type u_2} → {n : Type u_3} → {α : Type v} → [DecidableEq m] → Matrix m n α → m → (n → α) → Matrix m n α
Update, i.e. replace the ith row of matrix A with the values in b.
def Matrix.updateCol E1 #
{m : Type u_2} → {n : Type u_3} → {α : Type v} → [DecidableEq n] → Matrix m n α → n → (m → α) → Matrix m n α
Update, i.e. replace the jth column of matrix A with the values in b.
theorem Matrix.updateRow_self E0 #
∀ {m : Type u_2} {n : Type u_3} {α : Type v} {M : Matrix m n α} {i : m} {b : n → α} [inst : DecidableEq m],
M.updateRow i b i = b
theorem Matrix.updateCol_self E0 #
∀ {m : Type u_2} {n : Type u_3} {α : Type v} {M : Matrix m n α} {i : m} {j : n} {c : m → α} [inst : DecidableEq n],
M.updateCol j c i j = c i
theorem Matrix.updateRow_ne E0 #
∀ {m : Type u_2} {n : Type u_3} {α : Type v} {M : Matrix m n α} {i : m} {b : n → α} [inst : DecidableEq m] {i' : m},
i' ≠ i → M.updateRow i b i' = M i'
theorem Matrix.updateCol_ne E0 #
∀ {m : Type u_2} {n : Type u_3} {α : Type v} {M : Matrix m n α} {i : m} {j : n} {c : m → α} [inst : DecidableEq n]
{j' : n}, j' ≠ j → M.updateCol j c i j' = M i j'
theorem Matrix.updateRow_apply E0 #
∀ {m : Type u_2} {n : Type u_3} {α : Type v} {M : Matrix m n α} {i : m} {j : n} {b : n → α} [inst : DecidableEq m]
{i' : m}, M.updateRow i b i' j = if i' = i then b j else M i' j
theorem Matrix.updateCol_apply E0 #
∀ {m : Type u_2} {n : Type u_3} {α : Type v} {M : Matrix m n α} {i : m} {j : n} {c : m → α} [inst : DecidableEq n]
{j' : n}, M.updateCol j c i j' = if j' = j then c i else M i j'
theorem Matrix.updateCol_subsingleton E0 #
∀ {m : Type u_2} {n : Type u_3} {R : Type u_5} [inst : Subsingleton n] (A : Matrix m n R) (i : n) (b : m → R),
A.updateCol i b = (Matrix.replicateCol (Fin 1) b).submatrix id (Function.const n 0)
theorem Matrix.updateRow_subsingleton E0 #
∀ {m : Type u_2} {n : Type u_3} {R : Type u_5} [inst : Subsingleton m] (A : Matrix m n R) (i : m) (b : n → R),
A.updateRow i b = (Matrix.replicateRow (Fin 1) b).submatrix (Function.const m 0) id
theorem Matrix.map_updateRow E0 #
∀ {m : Type u_2} {n : Type u_3} {α : Type v} {β : Type w} {M : Matrix m n α} {i : m} {b : n → α} [inst : DecidableEq m]
(f : α → β), (M.updateRow i b).map f = (M.map f).updateRow i (f ∘ b)
theorem Matrix.map_updateCol E0 #
∀ {m : Type u_2} {n : Type u_3} {α : Type v} {β : Type w} {M : Matrix m n α} {j : n} {c : m → α} [inst : DecidableEq n]
(f : α → β), (M.updateCol j c).map f = (M.map f).updateCol j (f ∘ c)
theorem Matrix.updateRow_transpose E1 #
∀ {m : Type u_2} {n : Type u_3} {α : Type v} {M : Matrix m n α} {j : n} {c : m → α} [inst : DecidableEq n],
M.transpose.updateRow j c = (M.updateCol j c).transpose
theorem Matrix.updateCol_transpose E1 #
∀ {m : Type u_2} {n : Type u_3} {α : Type v} {M : Matrix m n α} {i : m} {b : n → α} [inst : DecidableEq m],
M.transpose.updateCol i b = (M.updateRow i b).transpose
theorem Matrix.updateRow_conjTranspose E1 #
∀ {m : Type u_2} {n : Type u_3} {α : Type v} {M : Matrix m n α} {j : n} {c : m → α} [inst : DecidableEq n]
[inst_1 : Star α], M.conjTranspose.updateRow j (star c) = (M.updateCol j c).conjTranspose
theorem Matrix.updateCol_conjTranspose E1 #
∀ {m : Type u_2} {n : Type u_3} {α : Type v} {M : Matrix m n α} {i : m} {b : n → α} [inst : DecidableEq m]
[inst_1 : Star α], M.conjTranspose.updateCol i (star b) = (M.updateRow i b).conjTranspose
theorem Matrix.updateRow_eq_self E0 #
∀ {m : Type u_2} {n : Type u_3} {α : Type v} [inst : DecidableEq m] (A : Matrix m n α) (i : m), A.updateRow i (A i) = A
theorem Matrix.updateCol_eq_self E0 #
∀ {m : Type u_2} {n : Type u_3} {α : Type v} [inst : DecidableEq n] (A : Matrix m n α) (i : n),
(A.updateCol i fun j ↦ A j i) = A
theorem Matrix.updateRow_zero_zero E0 #
∀ {m : Type u_2} {n : Type u_3} {α : Type v} [inst : DecidableEq m] [inst_1 : Zero α] (i : m),
Matrix.updateRow 0 i 0 = 0
theorem Matrix.updateCol_zero_zero E0 #
∀ {m : Type u_2} {n : Type u_3} {α : Type v} [inst : DecidableEq n] [inst_1 : Zero α] (i : n),
Matrix.updateCol 0 i 0 = 0
theorem Matrix.diagonal_updateCol_single E1 #
∀ {n : Type u_3} {α : Type v} [inst : DecidableEq n] [inst_1 : Zero α] (v : n → α) (i : n) (x : α),
(Matrix.diagonal v).updateCol i (Pi.single i x) = Matrix.diagonal (Function.update v i x)
theorem Matrix.diagonal_updateRow_single E1 #
∀ {n : Type u_3} {α : Type v} [inst : DecidableEq n] [inst_1 : Zero α] (v : n → α) (i : n) (x : α),
(Matrix.diagonal v).updateRow i (Pi.single i x) = Matrix.diagonal (Function.update v i x)
theorem Matrix.updateRow_idem E0 #
∀ {m : Type u_2} {n : Type u_3} {α : Type v} [inst : DecidableEq m] (A : Matrix m n α) (i : m) (x y : n → α),
(A.updateRow i x).updateRow i y = A.updateRow i y
theorem Matrix.updateRow_comm E1 #
∀ {m : Type u_2} {n : Type u_3} {α : Type v} [inst : DecidableEq m] (A : Matrix m n α) {i i' : m},
i ≠ i' → ∀ (x y : n → α), (A.updateRow i x).updateRow i' y = (A.updateRow i' y).updateRow i x
theorem Matrix.updateCol_idem E0 #
∀ {m : Type u_2} {n : Type u_3} {α : Type v} [inst : DecidableEq n] (A : Matrix m n α) (j : n) (x y : m → α),
(A.updateCol j x).updateCol j y = A.updateCol j y
theorem Matrix.updateCol_comm E1 #
∀ {m : Type u_2} {n : Type u_3} {α : Type v} [inst : DecidableEq n] (A : Matrix m n α) {j j' : n},
j ≠ j' → ∀ (x y : m → α), (A.updateCol j x).updateCol j' y = (A.updateCol j' y).updateCol j x
theorem Matrix.updateRow_submatrix_equiv E1 #
∀ {l : Type u_1} {m : Type u_2} {n : Type u_3} {o : Type u_4} {α : Type v} [inst : DecidableEq l]
[inst_1 : DecidableEq m] (A : Matrix m n α) (i : l) (r : o → α) (e : l ≃ m) (f : o ≃ n),
(A.submatrix ⇑e ⇑f).updateRow i r = (A.updateRow (e i) fun j ↦ r (f.symm j)).submatrix ⇑e ⇑f
theorem Matrix.submatrix_updateRow_equiv E1 #
∀ {l : Type u_1} {m : Type u_2} {n : Type u_3} {o : Type u_4} {α : Type v} [inst : DecidableEq l]
[inst_1 : DecidableEq m] (A : Matrix m n α) (i : m) (r : n → α) (e : l ≃ m) (f : o ≃ n),
(A.updateRow i r).submatrix ⇑e ⇑f = (A.submatrix ⇑e ⇑f).updateRow (e.symm i) fun i ↦ r (f i)
theorem Matrix.updateCol_submatrix_equiv E1 #
∀ {l : Type u_1} {m : Type u_2} {n : Type u_3} {o : Type u_4} {α : Type v} [inst : DecidableEq o]
[inst_1 : DecidableEq n] (A : Matrix m n α) (j : o) (c : l → α) (e : l ≃ m) (f : o ≃ n),
(A.submatrix ⇑e ⇑f).updateCol j c = (A.updateCol (f j) fun i ↦ c (e.symm i)).submatrix ⇑e ⇑f
theorem Matrix.submatrix_updateCol_equiv E1 #
∀ {l : Type u_1} {m : Type u_2} {n : Type u_3} {o : Type u_4} {α : Type v} [inst : DecidableEq o]
[inst_1 : DecidableEq n] (A : Matrix m n α) (j : n) (c : m → α) (e : l ≃ m) (f : o ≃ n),
(A.updateCol j c).submatrix ⇑e ⇑f = (A.submatrix ⇑e ⇑f).updateCol (f.symm j) fun i ↦ c (e i)
theorem Matrix.updateRow_reindex E1 #
∀ {l : Type u_1} {m : Type u_2} {n : Type u_3} {o : Type u_4} {α : Type v} [inst : DecidableEq l]
[inst_1 : DecidableEq m] (A : Matrix m n α) (i : l) (r : o → α) (e : m ≃ l) (f : n ≃ o),
((Matrix.reindex e f) A).updateRow i r = (Matrix.reindex e f) (A.updateRow (e.symm i) fun j ↦ r (f j))
theorem Matrix.reindex_updateRow E1 #
∀ {l : Type u_1} {m : Type u_2} {n : Type u_3} {o : Type u_4} {α : Type v} [inst : DecidableEq l]
[inst_1 : DecidableEq m] (A : Matrix m n α) (i : m) (r : n → α) (e : m ≃ l) (f : n ≃ o),
(Matrix.reindex e f) (A.updateRow i r) = ((Matrix.reindex e f) A).updateRow (e i) fun i ↦ r (f.symm i)
theorem Matrix.updateCol_reindex E1 #
∀ {l : Type u_1} {m : Type u_2} {n : Type u_3} {o : Type u_4} {α : Type v} [inst : DecidableEq o]
[inst_1 : DecidableEq n] (A : Matrix m n α) (j : o) (c : l → α) (e : m ≃ l) (f : n ≃ o),
((Matrix.reindex e f) A).updateCol j c = (Matrix.reindex e f) (A.updateCol (f.symm j) fun i ↦ c (e i))
theorem Matrix.reindex_updateCol E1 #
∀ {l : Type u_1} {m : Type u_2} {n : Type u_3} {o : Type u_4} {α : Type v} [inst : DecidableEq o]
[inst_1 : DecidableEq n] (A : Matrix m n α) (j : n) (c : m → α) (e : m ≃ l) (f : n ≃ o),
(Matrix.reindex e f) (A.updateCol j c) = ((Matrix.reindex e f) A).updateCol (f j) fun i ↦ c (e.symm i)
theorem Matrix.single_eq_updateRow_zero E1 #
∀ {m : Type u_2} {n : Type u_3} {α : Type v} [inst : DecidableEq m] [inst_1 : DecidableEq n] [inst_2 : Zero α] (i : m)
(j : n) (r : α), Matrix.single i j r = Matrix.updateRow 0 i (Pi.single j r)
theorem Matrix.single_eq_updateCol_zero E1 #
∀ {m : Type u_2} {n : Type u_3} {α : Type v} [inst : DecidableEq m] [inst_1 : DecidableEq n] [inst_2 : Zero α] (i : m)
(j : n) (r : α), Matrix.single i j r = Matrix.updateCol 0 j (Pi.single i r)
theorem Matrix.updateRow_mulVec E1 #
∀ {l : Type u_1} {m : Type u_2} {α : Type v} [inst : DecidableEq l] [inst_1 : Fintype m]
[inst_2 : NonUnitalNonAssocSemiring α] (A : Matrix l m α) (i : l) (c v : m → α),
(A.updateRow i c).mulVec v = Function.update (A.mulVec v) i (c ⬝ᵥ v)
theorem Matrix.vecMul_updateCol E1 #
∀ {m : Type u_2} {n : Type u_3} {α : Type v} [inst : DecidableEq n] [inst_1 : Fintype m]
[inst_2 : NonUnitalNonAssocSemiring α] (v : m → α) (B : Matrix m n α) (j : n) (r : m → α),
Matrix.vecMul v (B.updateCol j r) = Function.update (Matrix.vecMul v B) j (v ⬝ᵥ r)
theorem Matrix.update_vecMulVec E1 #
∀ {m : Type u_2} {n : Type u_3} {α : Type v} [inst : DecidableEq m] [inst_1 : Mul α] (u : m → α) (v : n → α) (i : m)
(a : α), Matrix.vecMulVec (Function.update u i a) v = (Matrix.vecMulVec u v).updateRow i (a • v)
theorem Matrix.vecMulVec_update E1 #
∀ {m : Type u_2} {n : Type u_3} {α : Type v} [inst : DecidableEq n] [inst_1 : Mul α] (u : m → α) (v : n → α) (j : n)
(a : α), Matrix.vecMulVec u (Function.update v j a) = (Matrix.vecMulVec u v).updateCol j (MulOpposite.op a • u)
theorem Matrix.updateRow_mul E1 #
∀ {l : Type u_1} {m : Type u_2} {n : Type u_3} {α : Type v} [inst : DecidableEq l] [inst_1 : Fintype m]
[inst_2 : NonUnitalNonAssocSemiring α] (A : Matrix l m α) (i : l) (r : m → α) (B : Matrix m n α),
A.updateRow i r * B = (A * B).updateRow i (Matrix.vecMul r B)
theorem Matrix.mul_updateCol E1 #
∀ {l : Type u_1} {m : Type u_2} {n : Type u_3} {α : Type v} [inst : DecidableEq n] [inst_1 : Fintype m]
[inst_2 : NonUnitalNonAssocSemiring α] (A : Matrix l m α) (B : Matrix m n α) (j : n) (c : m → α),
A * B.updateCol j c = (A * B).updateCol j (A.mulVec c)
theorem Matrix.mul_single_eq_updateCol_zero E1 #
∀ {l : Type u_1} {m : Type u_2} {n : Type u_3} {α : Type v} [inst : DecidableEq m] [inst_1 : DecidableEq n]
[inst_2 : Fintype m] [inst_3 : NonUnitalNonAssocSemiring α] (A : Matrix l m α) (i : m) (j : n) (r : α),
A * Matrix.single i j r = Matrix.updateCol 0 j (MulOpposite.op r • A.col i)
theorem Matrix.single_mul_eq_updateRow_zero E1 #
∀ {l : Type u_1} {m : Type u_2} {n : Type u_3} {α : Type v} [inst : DecidableEq l] [inst_1 : DecidableEq m]
[inst_2 : Fintype m] [inst_3 : NonUnitalNonAssocSemiring α] (i : l) (j : m) (r : α) (B : Matrix m n α),
Matrix.single i j r * B = Matrix.updateRow 0 i (r • B.row j)
theorem Matrix.updateRow_zero_mul_updateCol_zero E0 #
∀ {l : Type u_1} {m : Type u_2} {n : Type u_3} {α : Type v} [inst : DecidableEq l] [inst_1 : DecidableEq n]
[inst_2 : Fintype m] [inst_3 : NonUnitalNonAssocSemiring α] (i : l) (r : m → α) (j : n) (c : m → α),
Matrix.updateRow 0 i r * Matrix.updateCol 0 j c = Matrix.single i j (r ⬝ᵥ c)