NLA-lib Explorer

NLAlib.Ops.BlockFn.apply_bin_eq_some_iff

Library · theorem

A call of a function of two cells, on cells.

NLAlib.Ops.BlockFn.apply_bin_eq_some_iff {K : Type} {g : K → K → Option K} {x y z : ℕ × ℕ}
  {τ : Ops.Tape K} {m m' : Ops.Mem K} :
  (Ops.BlockFn.bin g).apply [] [x, y] [z] τ m = some m' ↔
    ∃ a b v,
      m.store.get x.1 x.2 = some a ∧
        m.store.get y.1 y.2 = some b ∧ g a b = some v ∧ z.2 < m.store.len z.1 ∧ m' = m.upd z v

Full source on GitHub

Import NLAlib.Ops.Blocks.