NLA-lib Explorer

NLAlib.Ops.Store.readBlock_one_eq_some

Library · theorem

A block of one cell that is read is the cell. After a call that reports a cell zs, obtain ⟨v, hv, rfl⟩ := Store.readBlock_one_eq_some.mp hzs names it.

NLAlib.Ops.Store.readBlock_one_eq_some {K : Type} {s : Ops.Store K} {b off : ℕ} {xs : List K} :
  s.readBlock b off 1 = some xs ↔ ∃ v, s.get b off = some v ∧ xs = [v]

Full source on GitHub

Import NLAlib.Ops.Logic.RoutineIntro.