NLAlib.Krylov.GolubKahan.Band.runs_linkedSolve_rsvd
Library · theorem
Total counted execution of the linked program under exact contracts, with the factored identity. Let the lower interpretation have the exact products with \mathbf{A} and \mathbf{A}^{\mathsf{H}} and draws that return the words of the tape, let the scheme E be certified against the exact contract of a basis extension, cost at most κ d at the dimensions d and use at most w scratch, and let every lower primitive have workspace at most w. Then for all dimensions (m, n, \mathbf{b}, q), on five live output blocks in distinct buffers with room for the output lengths, the linked program terminates within the counts NLAlib.Krylov.GolubKahan.Band.linkedSolveCount and the scratch \max(m, n)\,\mathbf{b} + w, and the decoded stored blocks \mathbf{U}, \mathbf{V} and the matrix \mathbf{S} assembled from the packed block columns satisfy \mathbf{U}\mathbf{S}^{\mathsf{H}}\mathbf{V}^{\mathsf{H}} = \mathsf{rsvd}(\mathbf{A}, [\mathbf{\Omega}, \mathbf{A}^{\mathsf{H}}\mathbf{A}\mathbf{\Omega}, \dots, (\mathbf{A}^{\mathsf{H}}\mathbf{A})^{q-1}\mathbf{\Omega}])\,, with \mathbf{\Omega} the start block decoded from the window of the tape.
NLAlib.Krylov.GolubKahan.Band.runs_linkedSolve_rsvd {K Lo Tst : Type}
[Ops.Has Ops.OperatorPairOp Lo] [Ops.Has Ops.SampleOp Lo] [Inhabited K] {dec : K → ℝ}
{m n b q : ℕ} {A : Matrix (Fin m) (Fin n) ℝ} {I : Ops.Interp Lo Tst K} {E : Ops.Stmt Lo Tst}
(hA : Ops.IsExactMatvecPair dec A I) (hSample : Ops.IsSample I)
(hE : (Ops.extendRoutine E).Meets I (Ops.exactExtendSpec dec)) (κ : List ℕ → Ops.Count Lo Tst)
(W : Lo → List ℕ → ℕ) (w : ℕ)
(hcost :
∀ (d offs : List ℕ),
d.length = 3 →
offs.length = 5 → Ops.stmtCost E (d ++ offs) ≤ κ d ∧ Ops.stmtPeak W E (d ++ offs) ≤ w)
(hW : ∀ (o : Lo) (ds : List ℕ), W o ds ≤ w) (stream : ℕ) {τ : Ops.Tape K} {μ : Ops.Mem K}
{U V G R S : ℕ × ℕ} (hbuf : [U.1, V.1, G.1, R.1, S.1].Nodup) (hl : μ.Live [U, V, G, R, S])
(hz : μ.Room [U, V, G, R, S] (Krylov.GolubKahan.Band.outLens m n b q)) :
Ops.ConditionalRuns I W τ (Krylov.GolubKahan.Band.linkedSolve E stream)
(Ops.Env.frame [m, n, b, q] [U, V, G, R, S]) μ
(Krylov.GolubKahan.Band.linkedSolveCount κ stream m n b q) ((m + (n - m)) * b + w) fun μ' ↦
μ'.pos = μ.pos + n * b ∧
∃ us vs gs rs ss,
μ'.readBlocks [U, V, G, R, S] (Krylov.GolubKahan.Band.outLens m n b q) =
some [us, vs, gs, rs, ss] ∧
Ops.decodeMatrix dec m (q * b) us *
(Krylov.GolubKahan.Band.assembleRight b q fun j ↦
Ops.decodeMatrix dec ((j + 1) * b + b) b
(List.drop (Krylov.GolubKahan.Band.coefOffsetS b j) ss))ᴴ *
(Ops.decodeMatrix dec n ((q + 1) * b) vs)ᴴ =
rsvd A
(blockKrylovMatrix (Aᴴ * A) (Ops.decodeMatrix dec n b (τ.window stream μ.pos (n * b)))
q)Import NLAlib.Krylov.GolubKahan.Band.Linked.