NLA-lib Explorer

Certified three-precision iterative refinement

Library · Result group

Theorem (LinearSystems.Refinement.Rounded.Certification.algorithm_checked). Forward error of certified three-precision refinement. Let three machines be in the standard model at unit roundoffs u_f, u, u_r \ge 0 with u_r < 1, the casts to the factorization precision and from the residual precision round at u_f and u, and the two widening casts be exact. At an admitted size [n, k], for every positive definite \mathbf{A} with 24(n + 1)^2(u_f + u_f)\kappa(\mathbf{A}) \le 1 and contraction factor \varphi < 1, every right-hand side \mathbf{b} and start \mathbf{x}_0, every interpretation of the operations satisfying the model, and every tape, the counted run of the fixed program from the three stored inputs succeeds, executes at most 52 n^3 + 104 n^2 k + 97 n^2 + 125 n k + 38 n + 113 k + 119 instructions, keeps its resident memory within the payload of the three buffers plus the static scratch of the tree, and the third buffer then holds \hat{\mathbf{x}} with, for every \mathbf{A}\mathbf{x}_\star = \mathbf{b}, \|\mathbf{x}_\star - \hat{\mathbf{x}}\| \le \varphi^k\|\mathbf{x}_\star - \mathbf{x}_0\| + \frac{\xi}{1 - \varphi}\,\|\mathbf{x}_\star\|\,. Here, with \kappa = \kappa(\mathbf{A}), \theta = 24(n + 1)^2(u_f + u_f)\kappa and \eta = (1 + u)(n + 1)\gamma_{n+1}(u_r), the contraction factor is the following, <!-- value refinementContractionFactor \kappa \theta \eta u u --> \varphi = (1+u)(\theta+(1+\theta)\kappa(u+\eta)), and the accuracy bound is the following, <!-- value refinementAccuracyBound \kappa \theta \eta u --> \xi = (1+u)(1+\theta)2\kappa\eta+u. [CarsonHigham2018, Corollary 3.3]; stated there in the \infty-norm, here normwise in the 2-norm, with the Cholesky factorization as the solver.

Headline

Notes

the machines are in the standard model on all operands, so overflow and underflow are not modelled. The matrix is stored and read through scalar operations: the model has no oracle.

Lean statement and details
NLAlib.LinearSystems.Refinement.Rounded.Certification.algorithm_checked {Mf Mw Mr : Ops.Machine ℝ}
  {cWF cFW cWR cRW : ℝ → ℝ} {uf u ur : ℝ}
  (hS :
    LinearSystems.Refinement.Rounded.Certification.IsArithmetic Mf Mw Mr cWF cFW cWR cRW uf u ur)
  (hur1 : ur < 1) (d : Fin 2 → ℕ)
  (hd : LinearSystems.Refinement.Rounded.Certification.valid uf u ur d)
  (A : Matrix (Fin (d 0)) (Fin (d 0)) ℝ) (rhs x₀ : Fin (d 0) → ℝ) (hA : A.PosDef)
  (hsmall : 24 * (↑(d 0) + 1) ^ 2 * (uf + uf) * pseudoConditionNumber A ≤ 1)
  (hφ :
    refinementContractionFactor (pseudoConditionNumber A)
        (24 * (↑(d 0) + 1) ^ 2 * (uf + uf) * pseudoConditionNumber A)
        ((1 + u) * ((↑(d 0) + 1) * Computation.roundingFactor (d 0 + 1) ur)) u u <
      1)
  (I : Ops.Interp LinearSystems.Refinement.Rounded.Signature Ops.CmpTst ℝ)
  (hI :
    (LinearSystems.Refinement.Rounded.Certification.model Mf Mw Mr cWF cFW cWR cRW uf u ur
          hur1).contracts
      d
      ((LinearSystems.Refinement.Rounded.Certification.inputs uf u ur hur1).input d (A, rhs, x₀) ⋯)
      I)
  (τ : Ops.Tape ℝ) :
  ∃ st,
    Ops.Reference.Execution LinearSystems.Refinement.Rounded.Certification.program I
        (LinearSystems.Refinement.Rounded.Certification.model Mf Mw Mr cWF cFW cWR cRW uf u ur
            hur1).resources
        (LinearSystems.Refinement.Rounded.Certification.inputs uf u ur hur1).formats τ d
        ((LinearSystems.Refinement.Rounded.Certification.inputs uf u ur hur1).memory d (A, rhs, x₀))
        st ∧
      (LinearSystems.Refinement.Rounded.Certification.model Mf Mw Mr cWF cFW cWR cRW uf u ur
                  hur1).resources.work
            st.cost ≤
          52 * d 0 ^ 3 + 104 * d 0 ^ 2 * d 1 + 97 * d 0 ^ 2 + 125 * d 0 * d 1 + 38 * d 0 +
              113 * d 1 +
            119 ∧
        (LinearSystems.Refinement.Rounded.Certification.inputs uf u ur hur1).bytes d + st.peak ≤
            (LinearSystems.Refinement.Rounded.Certification.inputs uf u ur hur1).bytes d +
              Ops.staticPeak
                (LinearSystems.Refinement.Rounded.Certification.model Mf Mw Mr cWF cFW cWR cRW uf u
                    ur hur1).resources
                LinearSystems.Refinement.Rounded.Certification.program d ∧
          ∃ x,
            st.mem.Holds (Ops.Codec.vector (d 0)) 2 x ∧
              ∀ (xstar : Fin (d 0) → ℝ),
                A *ᵥ xstar = rhs →
                  ‖WithLp.toLp 2 (xstar - x)‖ ≤
                    refinementContractionFactor (pseudoConditionNumber A)
                            (24 * (↑(d 0) + 1) ^ 2 * (uf + uf) * pseudoConditionNumber A)
                            ((1 + u) * ((↑(d 0) + 1) * Computation.roundingFactor (d 0 + 1) ur)) u
                            u ^
                          d 1 *
                        ‖WithLp.toLp 2 (xstar - x₀)‖ +
                      refinementAccuracyBound (pseudoConditionNumber A)
                            (24 * (↑(d 0) + 1) ^ 2 * (uf + uf) * pseudoConditionNumber A)
                            ((1 + u) * ((↑(d 0) + 1) * Computation.roundingFactor (d 0 + 1) ur)) u /
                          (1 -
                            refinementContractionFactor (pseudoConditionNumber A)
                              (24 * (↑(d 0) + 1) ^ 2 * (uf + uf) * pseudoConditionNumber A)
                              ((1 + u) * ((↑(d 0) + 1) * Computation.roundingFactor (d 0 + 1) ur)) u
                              u) *
                        ‖WithLp.toLp 2 xstar‖

Full source on GitHub

Copy link