Documentation

Complexity.Computability.Circuit.Bird

Shared correctness bridges for Bird's determinant algorithm #

These commutative-ring bridges connect the flat-array implementation and the matrix specification of Bird's division-free algorithm. They form a lightweight shared dependency of the integer staged algorithm and the arithmetic-circuit synthesis, without importing either client hierarchy. No algorithm or resource bound is introduced here.

Main results #

References #

theorem Cslib.Circuits.Bird.sumFrom_eq_sum_Ico {R : Type u_1} [CommRing R] {n lo : ℕ} (f : ℕ → R) :
BirdDet.sumFrom n lo f = ∑ k ∈ Finset.Ico lo n, f k

The recursive suffix sum is the sum over a natural-number interval.

theorem Cslib.Circuits.Bird.sumFrom_fin_tail {R : Type u_1} [CommRing R] {n : ℕ} (i : Fin n) (f : ℕ → R) :
BirdDet.sumFrom n (↑i + 1) f = ∑ k > i, f ↑k

A suffix starting after a finite index is the sum over its strict upper interval.

theorem Cslib.Circuits.Bird.iterate_array_spec {R : Type u_1} [CommRing R] {n : ℕ} (A : Array R) (hA : A.size = n * n) (t : ℕ) (i j : Fin n) :

Iterated flat-array stages agree with iterated matrix stages.

theorem Cslib.Circuits.Bird.array_spec {R : Type u_1} [CommRing R] {n : ℕ} (A : Array R) (hA : A.size = n * n) :

The flat-array determinant agrees with the matrix specification, including dimension zero.

theorem Cslib.Circuits.Bird.spec_eq_det {R : Type u_1} [CommRing R] {n : ℕ} (A : Matrix (Fin n) (Fin n) R) :

Bird's matrix specification computes the determinant over every commutative ring.