The areas / V34. The tactics of Mathlib
Mathlib.Tactic.Linarith.Oracle.SimplexAlgorithm.Datatypes
33 declarations. Mathlib docs · Source
def Mathlib.Tactic.Linarith.SimplexAlgorithm.UsableInSimplexAlgorithm.ctorIdx E1 #
{α : ℕ → ℕ → Type} → Mathlib.Tactic.Linarith.SimplexAlgorithm.UsableInSimplexAlgorithm α → ℕ
theorem Mathlib.Tactic.Linarith.SimplexAlgorithm.DenseMatrix.mk.injEq E0 #
∀ {n m : ℕ} (data data_1 : Array (Array ℚ)), ({ data := data } = { data := data_1 }) = (data = data_1)
def Mathlib.Tactic.Linarith.SimplexAlgorithm.DenseMatrix.ctorIdx E1 #
{n m : ℕ} → Mathlib.Tactic.Linarith.SimplexAlgorithm.DenseMatrix n m → ℕ
theorem Mathlib.Tactic.Linarith.SimplexAlgorithm.Tableau.mk.inj E1 #
∀ {matType : ℕ → ℕ → Type} {inst : Mathlib.Tactic.Linarith.SimplexAlgorithm.UsableInSimplexAlgorithm matType}
{basic free : Array ℕ} {mat : matType basic.size free.size} {basic_1 free_1 : Array ℕ}
{mat_1 : matType basic_1.size free_1.size},
{ basic := basic, free := free, mat := mat } = { basic := basic_1, free := free_1, mat := mat_1 } →
basic = basic_1 ∧ free = free_1 ∧ mat ≍ mat_1
theorem Mathlib.Tactic.Linarith.SimplexAlgorithm.SparseMatrix.mk.inj E1 #
∀ {n m : ℕ} {data data_1 : Array (Std.HashMap ℕ ℚ)}, { data := data } = { data := data_1 } → data = data_1
theorem Mathlib.Tactic.Linarith.SimplexAlgorithm.SparseMatrix.mk.injEq E0 #
∀ {n m : ℕ} (data data_1 : Array (Std.HashMap ℕ ℚ)), ({ data := data } = { data := data_1 }) = (data = data_1)
def Mathlib.Tactic.Linarith.SimplexAlgorithm.SparseMatrix.ctorIdx E1 #
{n m : ℕ} → Mathlib.Tactic.Linarith.SimplexAlgorithm.SparseMatrix n m → ℕ
def Mathlib.Tactic.Linarith.SimplexAlgorithm.Tableau.ctorIdx E1 #
{matType : ℕ → ℕ → Type} →
{inst : Mathlib.Tactic.Linarith.SimplexAlgorithm.UsableInSimplexAlgorithm matType} →
Mathlib.Tactic.Linarith.SimplexAlgorithm.Tableau matType → ℕ
theorem Mathlib.Tactic.Linarith.SimplexAlgorithm.Tableau.mk.injEq E0 #
∀ {matType : ℕ → ℕ → Type} [inst : Mathlib.Tactic.Linarith.SimplexAlgorithm.UsableInSimplexAlgorithm matType]
(basic free : Array ℕ) (mat : matType basic.size free.size) (basic_1 free_1 : Array ℕ)
(mat_1 : matType basic_1.size free_1.size),
({ basic := basic, free := free, mat := mat } = { basic := basic_1, free := free_1, mat := mat_1 }) =
(basic = basic_1 ∧ free = free_1 ∧ mat ≍ mat_1)
theorem Mathlib.Tactic.Linarith.SimplexAlgorithm.DenseMatrix.mk.inj E1 #
∀ {n m : ℕ} {data data_1 : Array (Array ℚ)}, { data := data } = { data := data_1 } → data = data_1
class Mathlib.Tactic.Linarith.SimplexAlgorithm.UsableInSimplexAlgorithm E1 #
(ℕ → ℕ → Type) → Type
Specification for matrix types over ℚ which can be used in the Gauss Elimination and the Simplex Algorithm. It was introduced to unify dense matrices and sparse matrices.
ctor Mathlib.Tactic.Linarith.SimplexAlgorithm.UsableInSimplexAlgorithm.mk E0 #
{α : ℕ → ℕ → Type} →
({n m : ℕ} → α n m → ℕ → ℕ → ℚ) →
({n m : ℕ} → α n m → ℕ → ℕ → ℚ → α n m) →
({n m : ℕ} → α n m → List (ℕ × ℕ × ℚ)) →
({n m : ℕ} → List (ℕ × ℕ × ℚ) → α n m) →
({n m : ℕ} → α n m → ℕ → ℕ → α n m) →
({n m : ℕ} → α n m → ℕ → ℕ → ℚ → α n m) →
({n m : ℕ} → α n m → ℕ → ℚ → α n m) → Mathlib.Tactic.Linarith.SimplexAlgorithm.UsableInSimplexAlgorithm α
abbrev Mathlib.Tactic.Linarith.SimplexAlgorithm.UsableInSimplexAlgorithm.getElem E1 #
{α : ℕ → ℕ → Type} →
[self : Mathlib.Tactic.Linarith.SimplexAlgorithm.UsableInSimplexAlgorithm α] → {n m : ℕ} → α n m → ℕ → ℕ → ℚ
Returns mat[i, j].
abbrev Mathlib.Tactic.Linarith.SimplexAlgorithm.UsableInSimplexAlgorithm.setElem E1 #
{α : ℕ → ℕ → Type} →
[self : Mathlib.Tactic.Linarith.SimplexAlgorithm.UsableInSimplexAlgorithm α] → {n m : ℕ} → α n m → ℕ → ℕ → ℚ → α n m
Sets mat[i, j].
abbrev Mathlib.Tactic.Linarith.SimplexAlgorithm.UsableInSimplexAlgorithm.getValues E1 #
{α : ℕ → ℕ → Type} →
[self : Mathlib.Tactic.Linarith.SimplexAlgorithm.UsableInSimplexAlgorithm α] → {n m : ℕ} → α n m → List (ℕ × ℕ × ℚ)
Returns the list of elements of mat in the form (i, j, mat[i, j]).
abbrev Mathlib.Tactic.Linarith.SimplexAlgorithm.UsableInSimplexAlgorithm.ofValues E1 #
{α : ℕ → ℕ → Type} →
[self : Mathlib.Tactic.Linarith.SimplexAlgorithm.UsableInSimplexAlgorithm α] → {n m : ℕ} → List (ℕ × ℕ × ℚ) → α n m
Creates a matrix from a list of elements in the form (i, j, mat[i, j]).
abbrev Mathlib.Tactic.Linarith.SimplexAlgorithm.UsableInSimplexAlgorithm.swapRows E1 #
{α : ℕ → ℕ → Type} →
[self : Mathlib.Tactic.Linarith.SimplexAlgorithm.UsableInSimplexAlgorithm α] → {n m : ℕ} → α n m → ℕ → ℕ → α n m
Swaps two rows.
abbrev Mathlib.Tactic.Linarith.SimplexAlgorithm.UsableInSimplexAlgorithm.subtractRow E1 #
{α : ℕ → ℕ → Type} →
[self : Mathlib.Tactic.Linarith.SimplexAlgorithm.UsableInSimplexAlgorithm α] → {n m : ℕ} → α n m → ℕ → ℕ → ℚ → α n m
Subtracts i-th row multiplied by coef from j-th row.
abbrev Mathlib.Tactic.Linarith.SimplexAlgorithm.UsableInSimplexAlgorithm.divideRow E1 #
{α : ℕ → ℕ → Type} →
[self : Mathlib.Tactic.Linarith.SimplexAlgorithm.UsableInSimplexAlgorithm α] → {n m : ℕ} → α n m → ℕ → ℚ → α n m
Divides the i-th row by coef.
instance Mathlib.Tactic.Linarith.SimplexAlgorithm.instGetElemProdNatRatAndLtFstSndOfUsableInSimplexAlgorithm E0 #
(n m : ℕ) →
(matType : ℕ → ℕ → Type) →
[Mathlib.Tactic.Linarith.SimplexAlgorithm.UsableInSimplexAlgorithm matType] →
GetElem (matType n m) (ℕ × ℕ) ℚ fun x p ↦ p.1 < n ∧ p.2 < m
structure Mathlib.Tactic.Linarith.SimplexAlgorithm.DenseMatrix E1 #
ℕ → ℕ → Type
Structure for matrices over ℚ.
So far it is just a 2d-array carrying dimensions (that are supposed to match with the actual
dimensions of data), but the plan is to add some Prop-data and make the structure strict and
safe.
Note: we avoid using Matrix because it is far more efficient to store a matrix as its entries than
as function between Fin-s.
ctor Mathlib.Tactic.Linarith.SimplexAlgorithm.DenseMatrix.mk E0 #
{n m : ℕ} → Array (Array ℚ) → Mathlib.Tactic.Linarith.SimplexAlgorithm.DenseMatrix n m
abbrev Mathlib.Tactic.Linarith.SimplexAlgorithm.DenseMatrix.data E1 #
{n m : ℕ} → Mathlib.Tactic.Linarith.SimplexAlgorithm.DenseMatrix n m → Array (Array ℚ)
The content of the matrix.
instance Mathlib.Tactic.Linarith.SimplexAlgorithm.instUsableInSimplexAlgorithmDenseMatrix E0 #
Mathlib.Tactic.Linarith.SimplexAlgorithm.UsableInSimplexAlgorithm Mathlib.Tactic.Linarith.SimplexAlgorithm.DenseMatrix
structure Mathlib.Tactic.Linarith.SimplexAlgorithm.SparseMatrix E1 #
ℕ → ℕ → Type
Structure for sparse matrices over ℚ, implemented as an array of hashmaps, containing only nonzero values.
ctor Mathlib.Tactic.Linarith.SimplexAlgorithm.SparseMatrix.mk E0 #
{n m : ℕ} → Array (Std.HashMap ℕ ℚ) → Mathlib.Tactic.Linarith.SimplexAlgorithm.SparseMatrix n m
abbrev Mathlib.Tactic.Linarith.SimplexAlgorithm.SparseMatrix.data E1 #
{n m : ℕ} → Mathlib.Tactic.Linarith.SimplexAlgorithm.SparseMatrix n m → Array (Std.HashMap ℕ ℚ)
The content of the matrix.
instance Mathlib.Tactic.Linarith.SimplexAlgorithm.instUsableInSimplexAlgorithmSparseMatrix E0 #
Mathlib.Tactic.Linarith.SimplexAlgorithm.UsableInSimplexAlgorithm Mathlib.Tactic.Linarith.SimplexAlgorithm.SparseMatrix
structure Mathlib.Tactic.Linarith.SimplexAlgorithm.Tableau E1 #
(matType : ℕ → ℕ → Type) → [Mathlib.Tactic.Linarith.SimplexAlgorithm.UsableInSimplexAlgorithm matType] → Type
Tableau is a structure the Simplex Algorithm operates on. The i-th row of mat expresses the
variable basic[i] as a linear combination of variables from free.
ctor Mathlib.Tactic.Linarith.SimplexAlgorithm.Tableau.mk E0 #
{matType : ℕ → ℕ → Type} →
[inst : Mathlib.Tactic.Linarith.SimplexAlgorithm.UsableInSimplexAlgorithm matType] →
(basic free : Array ℕ) → matType basic.size free.size → Mathlib.Tactic.Linarith.SimplexAlgorithm.Tableau matType
abbrev Mathlib.Tactic.Linarith.SimplexAlgorithm.Tableau.basic E1 #
{matType : ℕ → ℕ → Type} →
[inst : Mathlib.Tactic.Linarith.SimplexAlgorithm.UsableInSimplexAlgorithm matType] →
Mathlib.Tactic.Linarith.SimplexAlgorithm.Tableau matType → Array ℕ
Array containing the basic variables' indexes
abbrev Mathlib.Tactic.Linarith.SimplexAlgorithm.Tableau.free E1 #
{matType : ℕ → ℕ → Type} →
[inst : Mathlib.Tactic.Linarith.SimplexAlgorithm.UsableInSimplexAlgorithm matType] →
Mathlib.Tactic.Linarith.SimplexAlgorithm.Tableau matType → Array ℕ
Array containing the free variables' indexes
abbrev Mathlib.Tactic.Linarith.SimplexAlgorithm.Tableau.mat E1 #
{matType : ℕ → ℕ → Type} →
[inst : Mathlib.Tactic.Linarith.SimplexAlgorithm.UsableInSimplexAlgorithm matType] →
(self : Mathlib.Tactic.Linarith.SimplexAlgorithm.Tableau matType) → matType self.basic.size self.free.size
Matrix of coefficients the basic variables expressed through the free ones.