Matrices from lists of rows #
ofLists reads a list of rows as a Matrix, and the results here transport the list
operations to the matrix ones.
Main results #
Implementation notes #
The definitions recurse on the dimensions, so on literals they reduce in the kernel to the
vecCons form of the !![…] notation, and a literal in that notation is definitionally an
ofLists term.
Construct a vector from the first n elements of a list, padded with 0.
Equations
Instances For
The first n elements of the first m lists as a function of two indices, padded with
0.
Equations
- Mathlib.Tactic.Matrix.ofListsFun 0 x✝¹ x✝ = ![]
- Mathlib.Tactic.Matrix.ofListsFun m.succ x✝ [] = Matrix.vecCons (Mathlib.Tactic.Matrix.ofList x✝ []) (Mathlib.Tactic.Matrix.ofListsFun m x✝ [])
- Mathlib.Tactic.Matrix.ofListsFun m.succ x✝ (row :: rows) = Matrix.vecCons (Mathlib.Tactic.Matrix.ofList x✝ row) (Mathlib.Tactic.Matrix.ofListsFun m x✝ rows)
Instances For
Construct a matrix from the first n elements of the first m lists, padded with 0.
Equations
- Mathlib.Tactic.Matrix.ofLists m n rows = Matrix.of (Mathlib.Tactic.Matrix.ofListsFun m n rows)
Instances For
@[simp]
theorem
Mathlib.Tactic.Matrix.ListMatrix.dotProduct_eq
{α : Type u_1}
[Mul α]
[AddCommMonoid α]
(n : ℕ)
(l₁ l₂ : List α)
:
theorem
Mathlib.Tactic.Matrix.ofLists_mul
{α : Type u_1}
[Mul α]
[AddCommMonoid α]
{l m n : ℕ}
{A B C : List (List α)}
(h : ListMatrix.mul l m n A B = C)
: