NLA-lib Explorer

Test case: classical Gram–Schmidt in finite precision

Library · Source module

Test case: classical Gram–Schmidt in finite precision

NLAlib.Ops.Examples.cgs computes the factorization A ≈ Q R of an n × p matrix stored by columns, by p runs of NLAlib.Ops.Examples.cgsCol, with a scratch cell and a work vector.

Main results

* The certificate (NLAlib.Ops.Examples.cgs_satisfies): for every interpretation satisfying the contracts of scalar arithmetic and of the level-1 operations at ε, cgs satisfies its contract in operand form (NLAlib.Ops.Examples.cgsRel); proved in the program logic (NLAlib.Ops.Logic) from the column NLAlib.Ops.Examples.cgsCol_writes. * Abstract theorem (NLAlib.Ops.Examples.runs_cgs_rounded): for every interpretation satisfying the contracts of scalar arithmetic and of the level-1 operations at ε, the run terminates within NLAlib.Ops.Examples.cgsCount n p calls, writes only the blocks Q and R, and every column of the computed factors satisfies NLAlib.Ops.Examples.CgsCol (NLAlib.Ops.Examples.CgsFactored). * Backward error (NLAlib.Ops.Examples.CgsOut.backward, mathematics): if no diagonal entry of R̂ is zero, |A - Q̂ R̂| ≤ ((1 + ε_scal) (1 + ε_axpy) ^ j - 1) (|A| + |Q̂| |R̂|) entry by entry in column j (the last factor without the diagonal term). * Corollaries (NLAlib.Ops.Examples.runs_cgs_link_seq, NLAlib.Ops.Examples.runs_cgs_link_pairwise): the linked programs over scalar arithmetic meeting the standard model at u, where the backward error constant is (1 + u) ^ (2 j + 1) - 1 for both; one application of the certificate each.

Not proved: a bound on |Q̂| |R̂| in terms of the columns of A, and the loss of orthogonality in terms of κ(A) u.

Declarations