Total Unimodularity Test #
This file provides means to (computably) test total unimodularity of small matrices.
Formally verified algorithm for testing total unimodularity.
Equations
Instances For
Faster algorithm for testing total unimodularity without permutation with pending formal guarantees.
Equations
- A.testTotallyUnimodularFast = decide (∀ (X : Finset (Fin m)) (Y : Finset (Fin n)) (hXY : X.card = Y.card), (A.squareSetSubmatrix hXY).det ∈ SignType.cast.range)
Instances For
theorem
Matrix.abs_det_reindex_self_self
{m n : Type}
[DecidableEq m]
[Fintype m]
[DecidableEq n]
[Fintype n]
{R : Type}
[LinearOrderedCommRing R]
(A : Matrix m m R)
(e₁ e₂ : m ≃ n)
:
theorem
range_eq_range_iff_exists_comp_equiv
{α β γ : Type}
{f : α → γ}
{g : β → γ}
(hf : Function.Injective f)
(hg : Function.Injective g)
:
theorem
Matrix.submatrix_eq_submatrix_reindex
{r c n o p q α : Type}
[DecidableEq r]
[Fintype r]
[DecidableEq c]
[Fintype c]
[DecidableEq n]
[Fintype n]
[DecidableEq o]
[Fintype o]
[DecidableEq p]
[Fintype p]
[DecidableEq q]
[Fintype q]
{f₁ : n → r}
{g₁ : o → c}
{f₂ : p → r}
{g₂ : q → c}
(A : Matrix r c α)
(hf₁ : Function.Injective f₁)
(hg₁ : Function.Injective g₁)
(hf₂ : Function.Injective f₂)
(hg₂ : Function.Injective g₂)
(hff : f₁.range = f₂.range)
(hgg : g₁.range = g₂.range)
:
theorem
Matrix.isTotallyUnimodular_of_testTotallyUnimodularFast
{m n : ℕ}
(A : Matrix (Fin m) (Fin n) ℚ)
:
A fast version of Matrix.testTotallyUnimodular
which doesn't test every permutation.