The areas / V34. The tactics of Mathlib
Mathlib.Tactic.Echelon.Reflection
18 declarations. Mathlib docs · Source
Reflection certificates for the echelon decomposition
The list-based certificates for a part of Echelon.Decomposition and their bridge lemmas.
Main definitions
IsLowerTriangularDiagList: a list of rows is lower triangular with nonzero diagonal.IsPivotedList: a list of rows has the given pivot columns.pivotOfList: the pivot function corresponding to a given list of pivot columns.
Implementation notes
The two conditions are kept as separate predicates for optimised checks.
The pivot cert states that each row is 0 up to its pivot column as the one equation
row = List.replicate k 0 ++ d :: suffix, which the kernel checks in one traversal of the row.
The lower-triangularity check requires each row to be 0 beyond the diagonal, so it skips the
prefix by drop.
Lower triangularity and nonzero diagonal of L
Both conditions read the same suffix of each row, so one sweep certifies them together.
Pivots of U
ctor Mathlib.Tactic.Echelon.IsLowerTriangularDiagList.below.nil E0 #
∀ {α : Type u_1} [inst : Zero α]
{motive : (a a_1 : ℕ) → (a_2 : List (List α)) → Mathlib.Tactic.Echelon.IsLowerTriangularDiagList a a_1 a_2 → Prop}
{k : ℕ} {rows : List (List α)}, Mathlib.Tactic.Echelon.IsLowerTriangularDiagList.below ⋯
ctor Mathlib.Tactic.Echelon.IsLowerTriangularDiagList.below.cons E0 #
∀ {α : Type u_1} [inst : Zero α]
{motive : (a a_1 : ℕ) → (a_2 : List (List α)) → Mathlib.Tactic.Echelon.IsLowerTriangularDiagList a a_1 a_2 → Prop}
{k c : ℕ} {row : List α} {rows : List (List α)} {d : α} (hdrop : List.drop k row = d :: List.replicate c 0)
(hd : d ≠ 0) (h : Mathlib.Tactic.Echelon.IsLowerTriangularDiagList (k + 1) c rows),
Mathlib.Tactic.Echelon.IsLowerTriangularDiagList.below h →
motive (k + 1) c rows h → Mathlib.Tactic.Echelon.IsLowerTriangularDiagList.below ⋯
ctor Mathlib.Tactic.Echelon.IsPivotedList.below.nil E0 #
∀ {α : Type u_1} {n : ℕ} [inst : Zero α]
{motive : (a : List (Fin n)) → (a_1 : List (List α)) → Mathlib.Tactic.Echelon.IsPivotedList a a_1 → Prop}
{rows : List (List α)} (hz : rows = List.map (fun x ↦ List.replicate n 0) rows),
Mathlib.Tactic.Echelon.IsPivotedList.below ⋯
ctor Mathlib.Tactic.Echelon.IsPivotedList.below.cons E0 #
∀ {α : Type u_1} {n : ℕ} [inst : Zero α]
{motive : (a : List (Fin n)) → (a_1 : List (List α)) → Mathlib.Tactic.Echelon.IsPivotedList a a_1 → Prop} {k : Fin n}
{ks : List (Fin n)} {row : List α} {rows : List (List α)} {d : α} {suffix : List α}
(hrow : row = List.replicate (↑k) 0 ++ d :: suffix) (hd : d ≠ 0) (h : Mathlib.Tactic.Echelon.IsPivotedList ks rows),
Mathlib.Tactic.Echelon.IsPivotedList.below h → motive ks rows h → Mathlib.Tactic.Echelon.IsPivotedList.below ⋯
inductive Mathlib.Tactic.Echelon.IsLowerTriangularDiagList E3 #
{α : Type u_1} → [Zero α] → ℕ → ℕ → List (List α) → Prop
c rows starting at row k, each with a nonzero entry at its diagonal position and zeros
after it to the end of the row.
ctor Mathlib.Tactic.Echelon.IsLowerTriangularDiagList.nil E0 #
∀ {α : Type u_1} [inst : Zero α] {k : ℕ} {rows : List (List α)},
Mathlib.Tactic.Echelon.IsLowerTriangularDiagList k 0 rows
ctor Mathlib.Tactic.Echelon.IsLowerTriangularDiagList.cons E0 #
∀ {α : Type u_1} [inst : Zero α] {k c : ℕ} {row : List α} {rows : List (List α)} {d : α},
List.drop k row = d :: List.replicate c 0 →
d ≠ 0 →
Mathlib.Tactic.Echelon.IsLowerTriangularDiagList (k + 1) c rows →
Mathlib.Tactic.Echelon.IsLowerTriangularDiagList k (c + 1) (row :: rows)
theorem Mathlib.Tactic.Echelon.getD_of_isLowerTriangularDiagList E1 #
∀ {α : Type u_1} [inst : Zero α] {k c i : ℕ} {rows : List (List α)},
Mathlib.Tactic.Echelon.IsLowerTriangularDiagList k c rows →
i < c → (rows.getD i []).getD (k + i) 0 ≠ 0 ∧ ∀ (j : ℕ), k + i < j → (rows.getD i []).getD j 0 = 0
Lookup specification for IsLowerTriangularDiagList.
theorem Mathlib.Tactic.Echelon.isLowerTriangular_ofLists E1 #
∀ {α : Type u_1} [inst : Zero α] {m : ℕ} {rows : List (List α)},
Mathlib.Tactic.Echelon.IsLowerTriangularDiagList 0 m rows → (Mathlib.Tactic.Matrix.ofLists m m rows).IsLowerTriangular
theorem Mathlib.Tactic.Echelon.diag_ofLists_ne_zero E1 #
∀ {α : Type u_1} [inst : Zero α] {m : ℕ} {rows : List (List α)},
Mathlib.Tactic.Echelon.IsLowerTriangularDiagList 0 m rows →
∀ (i : Fin m), (Mathlib.Tactic.Matrix.ofLists m m rows).diag i ≠ 0
inductive Mathlib.Tactic.Echelon.IsPivotedList E3 #
{α : Type u_1} → {n : ℕ} → [Zero α] → List (Fin n) → List (List α) → Prop
The rows with a nonzero entry at their pivot columns and zeros before it, then the rows beyond the pivot list (all 0).
ctor Mathlib.Tactic.Echelon.IsPivotedList.nil E0 #
∀ {α : Type u_1} {n : ℕ} [inst : Zero α] {rows : List (List α)},
rows = List.map (fun x ↦ List.replicate n 0) rows → Mathlib.Tactic.Echelon.IsPivotedList [] rows
ctor Mathlib.Tactic.Echelon.IsPivotedList.cons E0 #
∀ {α : Type u_1} {n : ℕ} [inst : Zero α] {k : Fin n} {ks : List (Fin n)} {row : List α} {rows : List (List α)} {d : α}
{suffix : List α},
row = List.replicate (↑k) 0 ++ d :: suffix →
d ≠ 0 → Mathlib.Tactic.Echelon.IsPivotedList ks rows → Mathlib.Tactic.Echelon.IsPivotedList (k :: ks) (row :: rows)
def Mathlib.Tactic.Echelon.pivotOfList E3 #
{n : ℕ} → List (Fin n) → ℕ → WithTop (Fin n)
The pivot function of the list of pivot columns. WithTop (Fin n) is Option (Fin n), so
the lookup cols[i]? is the value.
theorem Mathlib.Tactic.Echelon.getD_of_isPivotedList E1 #
∀ {α : Type u_1} {n : ℕ} [inst : Zero α] {cols : List (Fin n)} {rows : List (List α)},
Mathlib.Tactic.Echelon.IsPivotedList cols rows →
∀ (i : ℕ),
(∀ (j : Fin n), ↑j < Mathlib.Tactic.Echelon.pivotOfList cols i → (rows.getD i []).getD (↑j) 0 = 0) ∧
∀ (c : Fin n), Mathlib.Tactic.Echelon.pivotOfList cols i = ↑c → (rows.getD i []).getD (↑c) 0 ≠ 0
Lookup specification for IsPivotedList.
theorem Mathlib.Tactic.Echelon.pivotOfList_lt_pivotOfList E1 #
∀ {n : ℕ} {cols : List (Fin n)},
cols.SortedLT →
∀ {i j : ℕ},
i < j →
Mathlib.Tactic.Echelon.pivotOfList cols j ≠ ⊤ →
Mathlib.Tactic.Echelon.pivotOfList cols i < Mathlib.Tactic.Echelon.pivotOfList cols j
theorem Mathlib.Tactic.Echelon.pivotOfList_mono_of_sortedLT E1 #
∀ {n : ℕ} {cols : List (Fin n)}, cols.SortedLT → Monotone (Mathlib.Tactic.Echelon.pivotOfList cols)
theorem Mathlib.Tactic.Echelon.isPivotedBy_ofLists E1 #
∀ {α : Type u_1} {n : ℕ} [inst : Zero α] {m : ℕ} {rows : List (List α)} {cols : List (Fin n)},
cols.SortedLT →
Mathlib.Tactic.Echelon.IsPivotedList cols rows →
(Mathlib.Tactic.Matrix.ofLists m n rows).IsPivotedBy fun i ↦ Mathlib.Tactic.Echelon.pivotOfList cols ↑i