NLA-lib Explorer

NLAlib.slottedLogValidate_writes_of_exactNat

Library · theorem

Validating the pending slot with an exact literal one (NLAlib.slottedLogValidate_writes without a rounding model): if the natural literal 1 is exact, NLAlib.slottedLogValidate closes the pending slot as accepted, writes only the log and keeps the tape position. Shared by the trees of NLAlib.hessenbergReduceLast, NLAlib.ShiftedQR.trialAccept, NLAlib.SmallEig.decoupleLast and 1 more.

NLAlib.slottedLogValidate_writes_of_exactNat {O Q : Type} [Ops.Has Ops.IndexOp O]
  {Mch : Ops.Machine ℝ} {I : Ops.Interp O Q ℝ} (hL : Ops.IsIndexLit Mch I)
  (hNat : Ops.IsExactNatLit id Mch 1) {ns w : ℕ} {lg : ℕ × ℕ} {L : List (Option (List GivensEntry))}
  {P : List GivensEntry} {τ : Ops.Tape ℝ} {μ : Ops.Mem ℝ} (h : HoldsSlottedLog lg ns w L P μ.store)
  (hL' : L.length < ns) :
  Ops.Writes Ops.Mode.total I τ slottedLogValidate (Ops.Env.frame [w, L.length] [lg])
    (Ops.Store.inBlock lg.1 lg.2 (ns * (1 + 5 * w)))
    (fun μ' ↦ μ'.pos = μ.pos ∧ HoldsSlottedLog lg ns w (L ++ [some P]) [] μ'.store) μ

Full source on GitHub

Import NLAlib.Matrix.FinitePrecision.GivensLogSlots.