NLA-lib Explorer

A conjugate gradient run with bounded local errors

Library · Source module

A conjugate gradient run with bounded local errors

NLAlib.CGRun n k is k steps of the Hestenes–Stiefel recurrence from \mathbf{x}_0 = \mathbf{0}, \mathbf{r}_0 = \mathbf{p}_0 = \mathbf{b}, for a real symmetric \mathbf{A}, with a local error in each operation bounded relative to its operands by one accuracy parameter \varepsilon (0-based, step j < k): \nu_j = \|\mathbf{r}_j\|^2(1 + \theta_j),\quad \mathbf{s}_j = \mathbf{A}\mathbf{p}_j + \mathbf{e}^s_j,\quad \mu_j = \mathbf{p}_j^{\mathsf{T}}\mathbf{s}_j + e^\mu_j,\quad \gamma_j = \frac{\nu_j}{\mu_j}(1 + \eta^\gamma_j), \mathbf{x}_{j+1} = \mathbf{x}_j + \gamma_j\mathbf{p}_j + \mathbf{e}^\mathbf{x}_j,\quad \mathbf{r}_{j+1} = \mathbf{r}_j - \gamma_j\mathbf{s}_j + \mathbf{e}^r_j,\quad \delta_j = \frac{\nu_{j+1}}{\nu_j}(1 + \eta^\delta_j),\quad \mathbf{p}_{j+1} = \mathbf{r}_{j+1} + \delta_j\mathbf{p}_j + \mathbf{e}^p_j . This is an abstract local-error interface for the stability analysis. Applying its guarantees to a particular program requires a separate execution theorem constructing this interface from the decoded computed states; the recurrence assumptions alone do not provide that theorem.

The Lanczos data of the run (NLAlib.CGRun.toNormalizedLanczosData) are the normalised residuals \bar{\mathbf{v}}_{j+1} = (-1)^j\mathbf{r}_j/\|\mathbf{r}_j\| with the tridiagonal matrix NLAlib.cgTridiagonal of the computed \gamma_j and the norms \rho_j = \|\mathbf{r}_j\| of the computed residuals. The local errors of this datum (Lemmas A and B) are bounded a posteriori in terms of three run certificates: \Pi \ge \|\mathbf{p}_j\|/\|\mathbf{r}_j\|, K \ge \|\mathbf{A}\|_2\gamma_j\|\mathbf{p}_j\|^2/ \|\mathbf{r}_j\|^2, and B \mathbf{b}ounding the coefficients \beta_{j+1} = \rho_{j+1}/(\gamma_j\rho_j) and \delta_j/\gamma_j for j + 1 < k (the last pair, \beta_k and \delta_{k-1}/\gamma_{k-1}, does not enter the local errors of k steps). The a priori bounds on the certificates are in NLAlib/Krylov/FinitePrecision/CGBackward.lean.

Constants are unoptimised.

Main definitions

* NLAlib.CGRun: a run of k steps with accuracy parameter \varepsilon. * NLAlib.CGRun.toLanczosData, NLAlib.CGRun.toNormalizedLanczosData: its Lanczos data. * NLAlib.CGRun.backwardH: the backward model of the run.

Main results

* NLAlib.CGRun.tridiagonal_toLanczosData: the tridiagonal matrix is NLAlib.cgTridiagonal. * NLAlib.CGRun.norm_recurrenceError_le (Lemma A): the recurrence error, for 0 \le B. * NLAlib.dotProduct_add_pos_of_spectrum_subset_Icc: the next curvature is positive.

Lemma B, the a posteriori backward model, the next division and the residual gap are in NLAlib/Krylov/FinitePrecision/CGRunModel.lean.

Declarations