Correctness of the bit-charged integer and polynomial Berkowitz determinant programs
ProvedBipHamCount.Deterministic.berkowitz_det_correctbipartite-digraphsdeterminantsexact-counting
For a square array of integers, the division-free Berkowitz routine in the large-term algorithm returns the determinant of its input matrix. For an array of coefficient arrays representing polynomials in , the same routine with polynomial operations returns a coefficient array such that for every ,
Both identities hold in every order, including order zero, and for any initial work counter. Missing entries and coefficients are interpreted as zero. These are the correctness properties of the determinant computations in the large- and small-term algorithms of Section 4.
Preamble
import Mathlib import Definitions.Def_BipHamCount_Deterministic_Arithmetic open scoped BigOperators Polynomial
Formal statement
namespace BipHamCount.Deterministic
/-- Correctness of the two division-free determinant implementations used in Section 4. -/
theorem berkowitz_det_correct :
(∀ (M : Array (Array ℤ)) (n s : ℕ),
let A : Matrix (Fin n) (Fin n) ℤ :=
fun i j => ((M[i.val]?.getD #[])[j.val]?).getD 0
((berkowitz intOps n M).run s).1 = A.det) ∧
(∀ (M : Array (Array ZPoly)) (n s k : ℕ),
let decode := fun a : ZPoly => ∑ t ∈ Finset.range a.size,
Polynomial.monomial t (a[t]?.getD 0)
let A : Matrix (Fin n) (Fin n) ℤ[X] :=
fun i j => decode (((M[i.val]?.getD #[])[j.val]?).getD #[])
((((berkowitz polyOps n M).run s).1)[k]?).getD 0 = A.det.coeff k) := by sorry
end BipHamCount.DeterministicSource
Koana, Kumabe, Counting Hamiltonian Cycles in Bipartite Digraphs Deterministically in O(1.9526^n) Time, STOC 2027 submission #814 (October 2026), Lemma 4.4, p. 8. https://github.com/sigact-stoc/stoc2027/releases/download/papers-1/814.pdf