NLA-lib Explorer

NLAlib.Krylov.CG.HSPCG.Rounded.StoredContext.guarded_laws

Library · theorem

Standard rounding Relative-error BLAS

Scalar, rounded BLAS, derived system, functional preconditioner and comparison laws for the same isolated two-operator implementation. No solver-success premise is required.

NLAlib.Krylov.CG.HSPCG.Rounded.StoredContext.guarded_laws
  {I : Ops.Interp Ops.RCLikeBlas.Operation Ops.CmpTst ℝ} {M : Ops.Machine ℝ} {u : ℝ}
  {e : Ops.Blas1Err} (hM : Ops.StdModel u id M) (hu : 0 ≤ u) (hS : Ops.IsScalar M I)
  (hB : Ops.IsBlas1 id e (fun x ↦ True) I) (hCmp : Ops.IsCmp id I) (context : List (ℕ × ℕ))
  (systemIndex preconditionerIndex : Fin context.length) {n : ℕ} {C : ℕ → Prop}
  (reference : Ops.Store ℝ) (systemRaw preconditionerRaw : List ℝ) (hc : ∀ z ∈ context, C z.1)
  (hA : reference.readBlock context[systemIndex].1 context[systemIndex].2 (n * n) = some systemRaw)
  (hP :
    reference.readBlock context[preconditionerIndex].1 context[preconditionerIndex].2 (n * n) =
      some preconditionerRaw) :
  have J :=
    Krylov.CG.HSPCG.Rounded.StoredContext.guarded I M e u context systemIndex preconditionerIndex C
      reference n systemRaw preconditionerRaw;
  Ops.IsScalar M J ∧
    Ops.IsBlas1 id e (fun x ↦ True) J ∧
      Ops.IsMatvec id (Ops.StoredOperator.denseMatrix n n systemRaw)
          (Krylov.CG.HSPCG.Rounded.StoredContext.relativeError u n *
            specNorm (Ops.StoredOperator.denseMatrix n n systemRaw))
          J ∧
        J.IsFn Ops.Mode.total (Ops.Tagged.inj Krylov.CG.HSPCG.Preconditioner Ops.OperatorOp.matvec)
            (Ops.matvecFn
              (Krylov.CG.HSPCG.Rounded.StoredContext.oracle hM hu n preconditionerRaw).mulVec)
            (Ops.MatvecOperands n n) ∧
          Ops.IsCmp id J

Full source on GitHub

Import NLAlib.Krylov.CG.HSPCG.Rounded.StoredContext.