Theorem (Forward error of the stored output). Let \mathbf{A} be invertible of order n, with
\varphi=(1+\varepsilon)\bigl(\theta+(1+\theta)\kappa_2(\mathbf{A})(\zeta+\eta)\bigr)<1,\qquad\xi=(1+\varepsilon)(1+\theta)\,2\kappa_2(\mathbf{A})\eta+\varepsilon.
For every \mathbf{b} and \mathbf{x}_0, every interpretation satisfying the three contracts and every tape, the run of the fixed program from \mathbf{b}, \mathbf{x}_0 and two blank vectors succeeds within 25k+15 instructions, and buffer 1 then holds \hat{\mathbf{x}} with, for \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\|.
Lean statement and details
NLAlib.LinearSystems.Refinement.Certification.algorithm_checked (θ η ζ ε : ℝ)
(domain : (Fin 2 → ℕ) → Prop) (admitted : ∃ d, domain d)
(supply :
∀ (d : Fin 2 → ℕ), domain d → ∃ x, LinearSystems.Refinement.Certification.accepts θ η ζ ε d x)
(hθ : 0 ≤ θ) (hη : 0 ≤ η) (hζ : 0 ≤ ζ) (hε : 0 ≤ ε) (d : Fin 2 → ℕ) (hd : domain d)
(A : Matrix (Fin (d 0)) (Fin (d 0)) ℝ) (rhs x₀ : Fin (d 0) → ℝ) (hA : IsUnit A)
(hφ : refinementContractionFactor (pseudoConditionNumber A) θ η ζ ε < 1)
(I : Ops.Interp Ops.RefinementOp Empty ℝ)
(hI :
(LinearSystems.Refinement.Certification.model θ η ζ ε domain admitted supply hθ hη hζ
hε).contracts
d
((LinearSystems.Refinement.Certification.inputs θ η ζ ε domain admitted supply).input d
(A, rhs, x₀) ⋯)
I)
(τ : Ops.Tape ℝ) :
∃ st,
Ops.Reference.Execution LinearSystems.Refinement.Certification.program I
(LinearSystems.Refinement.Certification.model θ η ζ ε domain admitted supply hθ hη hζ
hε).resources
(LinearSystems.Refinement.Certification.inputs θ η ζ ε domain admitted supply).formats τ d
((LinearSystems.Refinement.Certification.inputs θ η ζ ε domain admitted supply).memory d
(A, rhs, x₀))
st ∧
(LinearSystems.Refinement.Certification.model θ η ζ ε domain admitted supply hθ hη hζ
hε).resources.work
st.cost ≤
25 * d 1 + 15 ∧
(LinearSystems.Refinement.Certification.inputs θ η ζ ε domain admitted supply).bytes d +
st.peak ≤
(LinearSystems.Refinement.Certification.inputs θ η ζ ε domain admitted supply).bytes d +
Ops.staticPeak
(LinearSystems.Refinement.Certification.model θ η ζ ε domain admitted supply hθ hη
hζ hε).resources
LinearSystems.Refinement.Certification.program d ∧
∃ x,
st.mem.Holds (Ops.Codec.vector (d 0)) 1 x ∧
∀ (xstar : Fin (d 0) → ℝ),
A *ᵥ xstar = rhs →
‖WithLp.toLp 2 (xstar - x)‖ ≤
refinementContractionFactor (pseudoConditionNumber A) θ η ζ ε ^ d 1 *
‖WithLp.toLp 2 (xstar - x₀)‖ +
refinementAccuracyBound (pseudoConditionNumber A) θ η ε /
(1 - refinementContractionFactor (pseudoConditionNumber A) θ η ζ ε) *
‖WithLp.toLp 2 xstar‖