Documentation

CslibFrontier.Computability.Circuit.LinearSolve

Circuits for prescribed-entry kernel vectors and linear system solving #

Over the full binary basis fullInterpretation (k := 2) of a field F, where every operation on at most two field elements costs one gate, this module bounds the circuit size of the elimination routines in CslibFrontier.Foundations.LinearAlgebra.LinearSolve:

As in CslibFrontier.Computability.Circuit.KernelVector, these bounds count field operations in the full binary basis, not bit operations over an encoded field (ComputableInPolyTime for elimination over an encoded field remains open, with rational elimination over ℚ handled in CslibFrontier.Computability.PolyTime.LinearAlgebra.RationalElimination).

Main results #

theorem Cslib.Circuits.Synthesis.full_kernelVecAt {F : Type u_1} [Field F] [DecidableEq F] {N n r : ℕ} {s : Set ((Fin N → F) → F)} (A : Fin r → Fin n → (Fin N → F) → F) (hA : ∀ (k : Fin r) (l : Fin n), A k l ∈ s) (j : Fin n) :
Synthesis fullInterpretation s (Set.range fun (l : Fin n) (x : Fin N → F) => LinearAlgebra.kernelVecAt (fun (k : Fin r) (l : Fin n) => A k l x) j l) (kernelVecCost r n)

A kernel vector with a prescribed entry equal to one, by a circuit. If the entries of a matrix with r rows and n columns are available, the entries of kernelVecAt A j cost at most kernelVecCost r n = 8 * (r + 1) * (n + 1) ^ 2 gates of the full binary basis.

theorem Cslib.Circuits.Synthesis.full_vecMulSolve {F : Type u_1} [Field F] [DecidableEq F] {N n r : ℕ} {s : Set ((Fin N → F) → F)} (M : Fin r → Fin n → (Fin N → F) → F) (b : Fin n → (Fin N → F) → F) (hM : ∀ (k : Fin r) (l : Fin n), M k l ∈ s) (hb : ∀ (l : Fin n), b l ∈ s) :
Synthesis fullInterpretation s (Set.range fun (k : Fin r) (x : Fin N → F) => LinearAlgebra.vecMulSolve (fun (k : Fin r) (l : Fin n) => M k l x) (fun (l : Fin n) => b l x) k) (kernelVecCost n (r + 1) + r)

Solving w ᵥ* M = b by a circuit. If the entries of a matrix M with r rows and n columns and of a vector b are available, the entries of vecMulSolve M b cost at most kernelVecCost n (r + 1) + r gates of the full binary basis.