Documentation

Mathlib.LinearAlgebra.Matrix.Determinant.Bird.Correctness

Correctness of Bird's determinant algorithm #

This file contains a proof that Bird's division-free algorithm computes Matrix.det, in both its matrix form BirdDet.Spec.birdDet (birdDetSpec_eq_det) and its flat-array form BirdDet.birdDet (det_eq_birdDet), formalizing the combinatorial argument of Richard S. Bird, A simple division-free algorithm for computing determinants.

Correspondence with the paper #

The theorem names paper_eq1, ..., paper_eq5 follow Bird's numbering.

Main results #

Decomposition S_{p+1}(βᵢ) = { kα | k ∈ βᵢ, α ∈ S_p(β_k) } #

Equations (2) and (3): substituting the induction hypothesis #

Equation (5): first-column Laplace expansion #

Comparing equations (3) and (5): reindex by sorted insert/delete #

Bird's Equation (1) #

instantiating equation (1) to prove Theorem 1 #

theorem BirdDet.det_eq_birdDet {R : Type u_1} [CommRing R] {n : } (A : Array R) (hA : A.size = n * n) :

BirdDet.birdDet n A computes the determinant of the n × n matrix whose entries are stored in row-major order in A.