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), (Matrix.squareSetSubmatrix✝ A hXY).det ∈ SignType.cast.range)
Instances For
theorem
Matrix.submatrix_eq_submatrix_reindex
{r : Type u_1}
{c : Type u_2}
{n : Type u_3}
{o : Type u_4}
{p : Type u_5}
{q : Type u_6}
{α : Type u_7}
[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.