NLAlib.Ops.writes_patch
Library · theorem
A loop of single-cell patches follows any supplied mathematical update recurrence. No injectivity of the addresses is needed. All capacity and source facts outside the block remain available to each round through the frame from the initial store.
NLAlib.Ops.writes_patch {K Op Tst : Type} {md : Ops.Mode} {I : Ops.Interp Op Tst K} {τ : Ops.Tape K}
{ρ : Ops.Env} {m : Ops.Mem K} {n : Ops.IExp} {body : Ops.Stmt Op Tst} {N b off len : ℕ}
(hn : Ops.IExp.eval ρ.idx n = some N) (state : ℕ → ℕ → K) (address : ℕ → ℕ) (value : ℕ → K)
(hinit : m.store.HoldsVec b off len (state 0)) (haddr : ∀ i < N, address i < len)
(hnext : ∀ i < N, state (i + 1) = Function.update (state i) (address i) (value i))
(hstep :
∀ i < N,
∀ (m' : Ops.Mem K),
Ops.Store.EqOff (Ops.Store.inBlock b off len) m.store m'.store →
m'.store.HoldsVec b off len (state i) →
m'.pos = m.pos →
Ops.Writes md I τ body (ρ.pushIdx i) (Ops.Store.inBlock b (off + address i) 1)
(fun m'' ↦ m''.store.get b (off + address i) = some (value i) ∧ m''.pos = m.pos)
m') :
Ops.Writes md I τ (Ops.Stmt.loop n body) ρ (Ops.Store.inBlock b off len)
(fun m' ↦ m'.store.HoldsVec b off len (state N) ∧ m'.pos = m.pos) mImport NLAlib.Ops.Logic.VectorUpdate.