NLA-lib Explorer

NLAlib.Ops.IsToNat.index_neg

Library · theorem

The conversion of a negative value fails: nothing is clamped.

NLAlib.Ops.IsToNat.index_neg {K Op Tst : Type} [Ops.Has Ops.IdxTst Tst] {dec : K → ℝ}
  {I : Ops.Interp Op Tst K} (h : Ops.IsToNat dec I) {x : ℕ × ℕ} {m : Ops.Mem K} {w : K}
  (hx : m.store.get x.1 x.2 = some w) (hw : dec w < 0) :
  I.index (Ops.Has.inj Ops.IdxTst.toNat) [x] m = none

Full source on GitHub

Import NLAlib.Ops.Catalog.Compare.