NLAlib.Ops.writes_bindIdx_of_decode_nat
Library · theorem
Bind a readable natural word, under the actual conversion contract and the explicit runtime upper bound. The body is proved at that natural, with no guessed conversion result.
NLAlib.Ops.writes_bindIdx_of_decode_nat {K Op Tst : Type} {I : Ops.Interp Op Tst K} {τ : Ops.Tape K}
{ρ : Ops.Env} {m : Ops.Mem K} [Ops.Has Ops.IdxTst Tst] {md : Ops.Mode} {dec : K → ℝ}
(hI : Ops.IsToNat dec I) {input : Ops.Operand} {bound : Ops.IExp} {body : Ops.Stmt Op Tst}
{x : ℕ × ℕ} {w : K} {n B : ℕ} {F : Ops.Fp} {P : Ops.Mem K → Prop}
(ha : Ops.Operand.eval ρ input = some x) (hB : Ops.IExp.eval ρ.idx bound = some B)
(hx : m.store.get x.1 x.2 = some w) (hw : dec w = ↑n) (hn : n ≤ B)
(h : Ops.Writes md I τ body (ρ.pushIdx n) F P m) :
Ops.Writes md I τ (Ops.Stmt.bindIdx (Ops.Has.inj Ops.IdxTst.toNat) [input] bound body) ρ F P mImport NLAlib.Ops.Logic.IndexLiteral.