Documentation

Seymour.Matrix.TotalUnimodularityTest

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
    theorem Matrix.isTotallyUnimodular_of_aux_le {m n : } {A : Matrix (Fin m) (Fin n) } (hA : km, ∀ (x : Fin kFin m) (y : Fin kFin n), (A.submatrix x y).det SignType.cast.range) :
    theorem filter_length_card {n : } {s : Finset (Fin n)} :
    (List.filter (fun (x : Fin n) => decide (x s)) (List.finRange n)).length = s.card
    def Matrix.squareSetSubmatrix {m n : } (A : Matrix (Fin m) (Fin n) ) {X : Finset (Fin m)} {Y : Finset (Fin n)} (hXY : X.card = Y.card) :
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Faster algorithm for testing total unimodularity without permutation with pending formal guarantees.

      Equations
      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) :
        |((reindex e₁ e₂) A).det| = |A.det|
        theorem range_eq_range_iff_exists_comp_equiv {α β γ : Type} {f : αγ} {g : βγ} (hf : Function.Injective f) (hg : Function.Injective g) :
        f.range = g.range ∃ (e : α β), f = g e
        theorem range_of_list_get {α : Type} [DecidableEq α] {n : } {s : List α} (hn : n = s.length) :
        (fun (x : Fin n) => s[x]).range = s.toFinset
        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₁ : nr} {g₁ : oc} {f₂ : pr} {g₂ : qc} (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) :
        ∃ (e₁ : p n) (e₂ : q o), A.submatrix f₁ g₁ = (reindex e₁ e₂) (A.submatrix f₂ g₂)

        A fast version of Matrix.testTotallyUnimodular which doesn't test every permutation.