NLA-lib Explorer

NLAlib.Ops.Examples.div_link_total

Library · theorem

The induced interpretation satisfies the total contract of div, when the reciprocal is defined away from zero: on readable operands and a nonzero divisor the implementation succeeds with the quotient up to 2 u + u ^ 2.

NLAlib.Ops.Examples.div_link_total {K : Type} {recipF : K → Option K} {mulF : K → K → K}
  {I : Ops.Interp Ops.Examples.ROp Empty K}
  (hI : Ops.Examples.IsRecipMul Ops.Mode.total recipF mulF I) {u : ℝ} {dec : K → ℝ}
  (hM : Ops.Examples.RecipModel u dec recipF mulF)
  (hdef : ∀ (b : K), dec b ≠ 0 → (recipF b).isSome = true) (hu : 0 ≤ u) :
  (I.link Ops.Examples.divTable).Satisfies Ops.Mode.total Ops.Examples.DOp.div
    (Ops.Examples.divSpec dec (2 * u + u ^ 2))

Full source on GitHub

Import NLAlib.Ops.Examples.Liberal.