NLAlib.ShiftedQR.rangePop_writes_of_isExactNatLit
Library · theorem
Pop reads the actual bounded count, copies the last pair into a separate output view, and writes the decremented count. The persistent stack and output capacities are raw premises; the earlier ranges and tape position are preserved by the same total run. Only the count literal needs to be exact. Shared by the trees of NLAlib.ShiftedQR.shqrSmallEigRoutine and NLAlib.SmallEig.smallEigRoutine, on their scratch.
NLAlib.ShiftedQR.rangePop_writes_of_isExactNatLit {Op Tst : Type} [Ops.Has Ops.IndexOp Op]
[Ops.Has Ops.IdxTst Tst] [Ops.Has Ops.ScalarOp Op] {M : Ops.Machine ℝ} {I : Ops.Interp Op Tst ℝ}
(hS : Ops.IsScalar M I) (hL : Ops.IsIndexLit M I) (hQ : Ops.IsToNat id I) {capacity : ℕ}
(hN : Ops.IsExactNatLit id M capacity) {τ : Ops.Tape ℝ} {m : Ops.Mem ℝ} {b out : ℕ × ℕ}
{rs : List (ℕ × ℕ)} {r : ℕ × ℕ} (hSt : ShiftedQR.StackHolds b (rs ++ [r]) m.store)
(hcap : rs.length + 1 ≤ capacity) (hroom : b.2 + 1 + 2 * capacity ≤ m.store.len b.1)
(hout : out.2 + 2 ≤ m.store.len out.1) (hl : m.Live [b, out])
(hd :
Ops.Fp.Disj (Ops.Store.inBlock out.1 out.2 2) (Ops.Store.inBlock b.1 b.2 (1 + 2 * capacity))) :
Ops.Writes Ops.Mode.total I τ ShiftedQR.rangePop (Ops.Env.frame [capacity] [b, out])
(Ops.Store.inBlock b.1 b.2 1 ⊔ Ops.Store.inBlock out.1 out.2 2)
(fun m' ↦
m'.pos = m.pos ∧
ShiftedQR.StackHolds b rs m'.store ∧ m'.store.readBlock out.1 out.2 2 = some [↑r.1, ↑r.2])
mImport NLAlib.Eigensolvers.ShiftedQR.Worklist.