Documentation

Complexity.Computability.Circuit.Rational.Determinant

A staged division-free integer determinant #

An executable determinant for integer matrices. It runs the stages of Bird's division-free algorithm, but stores every intermediate stage as a dense table of row vectors, so that each stage is computed from the materialized previous one. This is meant to avoid recomputation: Mathlib's BirdDet.birdDet represents each stage as a function whose entries are recomputed recursively, and Matrix.det is a permutation sum. No bound on the number of ring operations is proved here; the result is proved equal to Matrix.det.

Main definitions #

Main results #

References #

@[reducible, inline]

A dense square integer matrix stored as a vector of row vectors.

Instances For

    Read a dense integer table as a matrix.

    Instances For

      Materialize every entry of an integer matrix into a dense table.

      Instances For

        One division-free Bird determinant stage on stored tables.

        Instances For

          Iterate the division-free determinant stage.

          Instances For

            Compute the determinant from the final Bird stage, including dimension zero.

            Instances For

              Compatibility bridges #

              The public integer-specialized interfaces are retained. Their proofs use the shared commutative-ring bridges in Complexity/Computability/Circuit/Bird.lean.

              theorem Cslib.Circuits.Rational.DeterminantAlgorithm.sumFrom_fin_tail {n : ℕ} (i : Fin n) (f : ℕ → ℤ) :
              BirdDet.sumFrom n (↑i + 1) f = ∑ k > i, f ↑k

              A genuine executable determinant, not Matrix.det's permutation sum.