NLAlib.Krylov.GolubKahan.Band.extend_writes_product
Library · theorem
The call rule of a basis extension by a related block. On a readable basis qs of k columns at Q and a readable block ws of b columns at W, in three distinct buffers with room for the new block directly after the basis and for the coefficients at C, let the decoded ws be related by Rel to the decoded readable block xs at X, no cell of which is an output cell of the call. Then a call of an operation that satisfies the contract of a basis extension for the predicate Ext at admitted dimensions [r, k, b] writes only its three output blocks, does not move the tape, and leaves a stored extension by a block related to the block at X. Shared by the trees of NLAlib.Krylov.GolubKahan.Band.step, NLAlib.Krylov.GolubKahan.Band.solve.
NLAlib.Krylov.GolubKahan.Band.extend_writes_product {K Op Tst : Type} [Inhabited K] {dec : K → ℝ}
{Ext : Ops.ExtendPred ℝ} {ok : ℕ → ℕ → ℕ → Prop} {I : Ops.Interp Op Tst K} {o : Op}
(hO : I.Satisfies Ops.Mode.total o ((Ops.extendRelOf dec ok Ext).spec Ops.ExtendOperands))
{τ : Ops.Tape K} {ρ : Ops.Env} {ds : List Ops.IExp} {ins outs : List Ops.Operand} {r c k b : ℕ}
{Rel : Matrix (Fin c) (Fin b) ℝ → Matrix (Fin r) (Fin b) ℝ → Prop} {X Q W C : ℕ × ℕ}
{μ : Ops.Mem K} {xs qs ws : List K} (hd : Ops.IExp.evalList ρ.idx ds = some [r, k, b])
(ha : Ops.Operand.evalList ρ ins = some [Q, W])
(hb : Ops.Operand.evalList ρ outs = some [(Q.1, Q.2 + k * r), W, C]) (hQW : Q.1 ≠ W.1)
(hQC : Q.1 ≠ C.1) (hWC : W.1 ≠ C.1) (hok : ok r k b) (hl : μ.Live [Q, W, C])
(hq : μ.store.readBlock Q.1 Q.2 (k * r) = some qs)
(hw : μ.store.readBlock W.1 W.2 (b * r) = some ws) (hQr : Q.2 + k * r + b * r ≤ μ.store.len Q.1)
(hWr : W.2 + b * r ≤ μ.store.len W.1) (hCr : C.2 + (k + b) * b ≤ μ.store.len C.1)
(hx : μ.store.readBlock X.1 X.2 (b * c) = some xs)
(hrel : Rel (Ops.decodeMatrix dec c b xs) (Ops.decodeMatrix dec r b ws))
(hX :
∀ i < b * c,
¬Ops.Fp.blocks [(Q.1, Q.2 + k * r), W, C] [b * r, b * r, (k + b) * b] X.1 (X.2 + i)) :
Ops.Writes Ops.Mode.total I τ (Ops.Stmt.call o ds ins outs) ρ
(Ops.Fp.blocks [(Q.1, Q.2 + k * r), W, C] [b * r, b * r, (k + b) * b])
(fun μ' ↦ μ'.pos = μ.pos ∧ Krylov.GolubKahan.Band.ProductExtAt dec Ext Rel μ'.store k X Q C) μImport NLAlib.Krylov.GolubKahan.Band.StoredExtension.