NLAlib.sketchAndSolve_eq_pinv_mul_add
Library 路 theorem
Sketch-and-solve error decomposition: when \operatorname{rank}(\mathbf{S}\mathbf{A}) = \operatorname{rank}\mathbf{A}, \mathsf{sketchAndSolve}(\mathbf{A}, \mathbf{S}, \mathbf{B}) = \mathbf{A}^{+}\mathbf{B} + \mathsf{sketchAndSolve}(\mathbf{A}, \mathbf{S}, (\mathbf{I}-\mathbf{P}_{\mathbf{A}})\mathbf{B})\,: the sketched solution is the exact minimum-norm solution plus the sketch-and-solve solution for the optimal residual. This is the exact identity beside the bound sketch-and-solve-ls (NLAlib.IsSubspaceInjection.frobNorm_sub_mul_pinv_mul_sq_le). [EpperlyWebber2026, Lemma 5.1, (5.1)]; there in a factorization \mathbf{A} = \mathbf{Q}\mathbf{R}, here basis-free. Result: sketch-and-solve-error-decomposition
NLAlib.sketchAndSolve_eq_pinv_mul_add.{u_1, u_3, u_4, u_5, u_6} {饾暅 : Type u_1} [RCLike 饾暅]
{m : Type u_3} {n : Type u_4} [Fintype m] [Fintype n] {k : Type u_5} {p : Type u_6} [Fintype k]
{S : Matrix k m 饾暅} [DecidableEq m] {A : Matrix m n 饾暅} (h : (S * A).rank = A.rank)
(B : Matrix m p 饾暅) :
sketchAndSolve A S B = pinv A * B + sketchAndSolve A S ((1 - rangeProjector A) * B)Import NLAlib.Matrix.Pseudoinverse.LeastSquares.