Documentation

CslibFrontier.Foundations.LinearAlgebra.Matrix.BranchingProgramDeterminant

Branching programs as determinants #

Let N be the weighted adjacency matrix of a directed acyclic graph on the vertices 0, …, m, numbered in topological order, so N i j = 0 unless i < j. The total weights q j of the paths from 0 to j satisfy q = Pi.single 0 1 + q ᵥ* N. The matrix 1 - N is upper unitriangular, so it has determinant 1 and its inverse is its adjugate. Hence q = Pi.single 0 1 ᵥ* (1 - N)⁻¹ is the first row of the adjugate. Its last entry, the value of the branching program, is the m × m determinant of N - 1 with its last row and first column deleted (Matrix.eq_det_submatrix_sub_one_of_eq_single_add_vecMul). This is the step from algebraic branching programs to determinants in Grenet's construction (Matrix.permanent_eq_det_grenetMatrix). The general form for any B with det B = 1 is Matrix.eq_det_neg_submatrix_of_vecMul_eq_single, a special case of the form without det B = 1, Matrix.det_mul_eq_det_neg_submatrix_of_vecMul_eq_single.

Main results #

theorem Matrix.det_mul_eq_det_neg_submatrix_of_vecMul_eq_single {R : Type u_1} [CommRing R] {m : ℕ} (B : Matrix (Fin (m + 1)) (Fin (m + 1)) R) {q : Fin (m + 1) → R} (hq : vecMul q B = Pi.single 0 1) :

If q ᵥ* B = Pi.single 0 1, then det B * q (last m) is the m × m determinant of -B with its last row and first column deleted: by Cramer's rule, det B • q is the first row of the adjugate of B.

theorem Matrix.eq_det_neg_submatrix_of_vecMul_eq_single {R : Type u_1} [CommRing R] {m : ℕ} (B : Matrix (Fin (m + 1)) (Fin (m + 1)) R) (hB : B.det = 1) {q : Fin (m + 1) → R} (hq : vecMul q B = Pi.single 0 1) :

If q ᵥ* B = Pi.single 0 1 and det B = 1, then q (last m) is the m × m determinant of -B with its last row and first column deleted.

theorem Matrix.eq_det_submatrix_sub_one_of_eq_single_add_vecMul {R : Type u_1} [CommRing R] {m : ℕ} (N : Matrix (Fin (m + 1)) (Fin (m + 1)) R) (hN : ∀ (i j : Fin (m + 1)), j ≤ i → N i j = 0) {q : Fin (m + 1) → R} (hq : q = Pi.single 0 1 + vecMul q N) :

Branching programs as determinants. Let N be the weighted adjacency matrix of a directed acyclic graph on 0, …, m in topological order (N i j = 0 unless i < j), and let q j be the total weight of the paths from 0 to j, characterized by q = Pi.single 0 1 + q ᵥ* N. Then the total weight q (last m) of the paths from the source 0 to the sink last m is the determinant of the m × m matrix N - 1 with its last row and first column deleted.