NLAlib.ShiftedQR.sweepWithDiag_writes_of_sweep
Library · theorem
Any total sweep proof that identifies its final stored working and output matrices extends to the wrapper with their last working diagonal entry copied into D. The output pair has supplied capacity and is disjoint from the sweep's entire write footprint. All numerical information remains in P, so exact and rounded sweep analyses use the same memory proof. Shared by the trees of NLAlib.ShiftedQR.shiftedStepRoutine, NLAlib.ShiftedQR.shqrSmallEigRoutine and NLAlib.SmallEig.smallEigRoutine, on their scratch.
NLAlib.ShiftedQR.sweepWithDiag_writes_of_sweep {Op Tst : Type} [Ops.Has Ops.ScalarOp Op]
[Ops.Has Ops.CmpTst Tst] {M : Ops.Machine ℝ} {I : Ops.Interp Op Tst ℝ} (hS : Ops.IsScalar M I)
{τ : Ops.Tape ℝ} {m : Ops.Mem ℝ} {n : ℕ} {w z cf d : ℕ × ℕ}
{P : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ → Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ → Prop}
(hl : m.Live [w, z, cf, w, z, d]) (hd : d.2 + 2 ≤ m.store.len d.1)
(hfd :
(Ops.Store.inBlock w.1 w.2 (2 * ((n + 1) * (n + 1))) ⊔
Ops.Store.inBlock z.1 z.2 (2 * ((n + 1) * (n + 1))) ⊔
Ops.Store.inBlock cf.1 cf.2 4).Disj
(Ops.Store.inBlock d.1 d.2 2))
(hsweep :
Ops.Writes Ops.Mode.total I τ ShiftedQR.sweep (Ops.Env.frame [n + 1] [w, z, cf, w, z])
(Ops.Store.inBlock w.1 w.2 (2 * ((n + 1) * (n + 1))) ⊔
Ops.Store.inBlock z.1 z.2 (2 * ((n + 1) * (n + 1))) ⊔
Ops.Store.inBlock cf.1 cf.2 4)
(fun m' ↦ m'.pos = m.pos ∧ ∃ W Z, P W Z ∧ HoldsMatrix w W m'.store ∧ HoldsMatrix z Z m'.store)
m) :
Ops.Writes Ops.Mode.total I τ ShiftedQR.sweepWithDiag (Ops.Env.frame [n + 1] [w, z, cf, w, z, d])
(Ops.Store.inBlock w.1 w.2 (2 * ((n + 1) * (n + 1))) ⊔
Ops.Store.inBlock z.1 z.2 (2 * ((n + 1) * (n + 1))) ⊔
Ops.Store.inBlock cf.1 cf.2 4 ⊔
Ops.Store.inBlock d.1 d.2 2)
(fun m' ↦
m'.pos = m.pos ∧
∃ W Z,
P W Z ∧
HoldsMatrix w W m'.store ∧
HoldsMatrix z Z m'.store ∧
m'.store.readBlock d.1 d.2 2 =
some [(W (Fin.last n) (Fin.last n)).re, (W (Fin.last n) (Fin.last n)).im])
mImport NLAlib.Eigensolvers.ShiftedQR.SweepOutput.