The areas / V34. The tactics of Mathlib
Mathlib.Tactic.Matrix.OfLists
12 declarations. Mathlib docs · Source
theorem Mathlib.Tactic.Matrix.ofList.match_1.congr_eq_3 E1 #
∀ {α : Type u_1} (motive : ℕ → List α → Sort u_2) (x : ℕ) (x_1 : List α) (h_1 : (x : List α) → motive 0 x)
(h_2 : (n : ℕ) → motive n.succ []) (h_3 : (n : ℕ) → (a : α) → (l : List α) → motive n.succ (a :: l)) (n : ℕ) (a : α)
(l : List α),
x = n.succ →
x_1 = a :: l →
(match x, x_1 with
| 0, x => h_1 x
| n.succ, [] => h_2 n
| n.succ, a :: l => h_3 n a l) ≍
h_3 n a l
theorem Mathlib.Tactic.Matrix.ofList.match_1.congr_eq_2 E1 #
∀ {α : Type u_1} (motive : ℕ → List α → Sort u_2) (x : ℕ) (x_1 : List α) (h_1 : (x : List α) → motive 0 x)
(h_2 : (n : ℕ) → motive n.succ []) (h_3 : (n : ℕ) → (a : α) → (l : List α) → motive n.succ (a :: l)) (n : ℕ),
x = n.succ →
x_1 = [] →
(match x, x_1 with
| 0, x => h_1 x
| n.succ, [] => h_2 n
| n.succ, a :: l => h_3 n a l) ≍
h_2 n
theorem Mathlib.Tactic.Matrix.ofList.match_1.congr_eq_1 E1 #
∀ {α : Type u_1} (motive : ℕ → List α → Sort u_2) (x : ℕ) (x_1 : List α) (h_1 : (x : List α) → motive 0 x)
(h_2 : (n : ℕ) → motive n.succ []) (h_3 : (n : ℕ) → (a : α) → (l : List α) → motive n.succ (a :: l)) (x_2 : List α),
x = 0 →
x_1 = x_2 →
(match x, x_1 with
| 0, x => h_1 x
| n.succ, [] => h_2 n
| n.succ, a :: l => h_3 n a l) ≍
h_1 x_2
def Mathlib.Tactic.Matrix.ofList E1 #
{α : Type u_1} → [Zero α] → (n : ℕ) → List α → Fin n → α
Construct a vector from the first n elements of a list, padded with 0.
theorem Mathlib.Tactic.Matrix.ofList_apply E0 #
∀ {α : Type u_1} [inst : Zero α] (n : ℕ) (l : List α) (i : Fin n), Mathlib.Tactic.Matrix.ofList n l i = l.getD (↑i) 0
def Mathlib.Tactic.Matrix.ofListsFun E1 #
{α : Type u_1} → [Zero α] → (m n : ℕ) → List (List α) → Fin m → Fin n → α
The first n elements of the first m lists as a function of two indices, padded with
0.
def Mathlib.Tactic.Matrix.ofLists E1 #
{α : Type u_1} → [Zero α] → (m n : ℕ) → List (List α) → Matrix (Fin m) (Fin n) α
Construct a matrix from the first n elements of the first m lists, padded with 0.
theorem Mathlib.Tactic.Matrix.ofLists_apply E0 #
∀ {α : Type u_1} [inst : Zero α] (m n : ℕ) (rows : List (List α)) (i : Fin m),
Mathlib.Tactic.Matrix.ofLists m n rows i = Mathlib.Tactic.Matrix.ofList n (rows.getD ↑i [])
theorem Mathlib.Tactic.Matrix.ListMatrix.dotProduct_eq E0 #
∀ {α : Type u_1} [inst : Mul α] [inst_1 : AddCommMonoid α] (n : ℕ) (l₁ l₂ : List α),
Mathlib.Tactic.Matrix.ListMatrix.dotProduct n l₁ l₂ =
Mathlib.Tactic.Matrix.ofList n l₁ ⬝ᵥ Mathlib.Tactic.Matrix.ofList n l₂
theorem Mathlib.Tactic.Matrix.ofLists_transpose E0 #
∀ {α : Type u_1} [inst : Zero α] (m n : ℕ) (rows : List (List α)),
Mathlib.Tactic.Matrix.ofLists n m (Mathlib.Tactic.Matrix.ListMatrix.transpose n rows) =
(Mathlib.Tactic.Matrix.ofLists m n rows).transpose
theorem Mathlib.Tactic.Matrix.ofLists_mul E1 #
∀ {α : Type u_1} [inst : Mul α] [inst_1 : AddCommMonoid α] (l m n : ℕ) (A B : List (List α)),
Mathlib.Tactic.Matrix.ofLists l m A * Mathlib.Tactic.Matrix.ofLists m n B =
Mathlib.Tactic.Matrix.ofLists l n (Mathlib.Tactic.Matrix.ListMatrix.mul l m n A B)
theorem Mathlib.Tactic.Matrix.toArray_ofLists E1 #
∀ {α : Type u_1} [inst : Zero α] {m n : ℕ} {rows : List (List α)},
(∀ row ∈ rows, row.length = n) →
rows.flatten.toArray.size = m * n → (Mathlib.Tactic.Matrix.ofLists m n rows).toArray = rows.flatten.toArray
The row-major array of the entries of the matrix of m rows of n entries is the array of
their concatenation.