Adjugate circuits from determinant circuits #
The partial derivative of the generic determinant along the entry (a, b) is the cofactor
adjugate (genericMatrix K n) b a (Cslib.Circuits.Arithmetic.pderiv_det_genericMatrix). This
follows from Laplace expansion along row a: the cofactors of row a do not involve the
variables of that row. Reverse-mode differentiation [BS83] therefore turns a circuit
with s gates computing the determinant into one with at most 5 s + 2 gates and three times the
multiplications computing all n² entries of the adjugate
(Cslib.Circuits.Arithmetic.exists_circuit_adjugate_of_det). With Bird's division-free
determinant circuits this gives adjugate circuits with at most 15 n⁴ + 22 gates over every
commutative ring (Cslib.Circuits.Arithmetic.exists_circuit_adjugate).
Over a field, the inverse of a matrix is its adjugate divided by its determinant. Baur and Strassen draw from this that inverting a matrix is no harder than computing its determinant, up to a constant factor. The circuits here have no division gate, so only the adjugate is formalized.
Main results #
Cslib.Circuits.Arithmetic.pderiv_det_genericMatrix:∂ det / ∂ x_{a b} = adj_{b a}.Cslib.Circuits.Arithmetic.exists_circuit_adjugate_of_det: the adjugate costs at most five times the determinant, plus two gates.Cslib.Circuits.Arithmetic.exists_circuit_adjugate: polynomial-size adjugate circuits.
References #
The partial derivative of the generic determinant along the variable of entry (a, b) is the
cofactor adjugate (genericMatrix K n) b a.
Adjugates from determinants [BS83]: if a circuit with s gates computes the
generic n × n determinant, then a circuit with at most 5 s + 2 gates and three times the
multiplications computes every entry of the adjugate; output n * a + b is entry (a, b).
The adjugate of the generic n × n matrix has circuits with at most 15 n⁴ + 22 gates over
every commutative ring.