NLAlib.Krylov.Lanczos.Reorth.updateAndSweep_writes
Library · theorem
Exact arithmetic Oracle: matrix–vector product
The raw update and both classical passes execute without a nonbreakdown premise.
A fragment of NLAlib.Krylov.Lanczos.Reorth.solveRoutine: the update and reorthogonalization sweep of one round, on the scratch the solver allocates.
NLAlib.Krylov.Lanczos.Reorth.updateAndSweep_writes {K Op Tst : Type} [Inhabited K]
[Ops.Has Ops.ScalarOp Op] [Ops.Has Ops.Blas1Op Op] [Ops.Has Ops.OperatorOp Op]
[Ops.Has Ops.CmpTst Tst] {M : Ops.Machine K} {dec : K → ℝ} {n cap j L B V C bo vo co : ℕ}
{A : Matrix (Fin n) (Fin n) ℝ} {I : Ops.Interp Op Tst K} {ok : ℕ → Prop} (hS : Ops.IsScalar M I)
(hM : Ops.ExactModel dec M) (hB : Ops.IsExactBlas1 dec ok I) (hok : ok n)
(hA : Ops.IsExactMatvec dec A I) (hCmp : Ops.IsCmp dec I) {τ : Ops.Tape K} {μ : Ops.Mem K}
{ps qs basis : List K} {β ν₀ : K} (hj : j < cap) (hVL : V < L) (hCL : C < L) (hVC : V ≠ C)
(hlen : List.length μ.store = L + 3) (hw : μ.store.len (L + 1) = n) (ht : μ.store.len (L + 2) = 2)
(hroom : co + 3 * cap + 2 ≤ μ.store.len C) (hps : μ.store.readBlock L 0 n = some ps)
(hqs : μ.store.readBlock V (vo + j * n) n = some qs)
(hbasis : μ.store.readBlock V vo ((j + 1) * n) = some basis)
(hβ : μ.store.get C (co + cap + j) = some β)
(hν₀ : μ.store.get C (co + 2 * cap + 2 + j) = some ν₀) (hνzero : dec ν₀ = 0) :
Ops.Writes Ops.Mode.total I τ Krylov.Lanczos.Reorth.updateAndSweep
{ idx := [n, cap, bo, vo, co, j], buf := [B, V, C, L, L + 1, L + 2] }
(Ops.Fp.blocks [(L + 1, 0), (L + 2, 0), (C, co + j), (C, co + 2 * cap + 2 + j)] [n, 2, 1, 1])
(fun μ' ↦
μ'.pos = μ.pos ∧
∃ raw reduced α ν,
μ'.store.readBlock (L + 1) 0 n = some reduced ∧
μ'.store.get C (co + j) = some α ∧
μ'.store.get C (co + 2 * cap + 2 + j) = some ν ∧
dec α =
lanczosAlpha A
{ prev := Ops.decv dec n ps, cur := Ops.decv dec n qs, beta := dec β } ∧
Ops.decv dec n raw =
A *ᵥ Ops.decv dec n qs - dec β • Ops.decv dec n ps -
dec α • Ops.decv dec n qs ∧
dec ν = ‖WithLp.toLp 2 (Ops.decv dec n raw)‖ ∧
Krylov.Lanczos.Reorth.TwoPassOut dec 0 0 n (j + 1) basis raw reduced)
μImport NLAlib.Krylov.Lanczos.Reorth.Advance.