NLA-lib Explorer

NLAlib.Ops.toNatFn_clampWord

Library · theorem

With endpoints decoding to zero and bound, the selected word converts to the bounded natural floor. Negative input is clamped before conversion rather than admitted as an index.

NLAlib.Ops.toNatFn_clampWord {K : Type} {dec : K → ℝ} {lo hi w : K} {bound : ℕ} (hlo : dec lo = 0)
  (hhi : dec hi = ↑bound) : Ops.toNatFn dec [Ops.clampWord dec lo hi w] = some (min bound ⌊dec w⌋₊)

Full source on GitHub

Import NLAlib.Ops.Blas.Clamp.