NLA-lib Explorer

NLAlib.slottedLogWrite_writes

Library · theorem

Writing an entry appends it to the pending slot. The plane is an exact natural below nmax (hNat); this hypothesis belongs to the log, not to the producer. Shared by the trees of NLAlib.reduceLastStep, NLAlib.ShiftedQR.stepWithDiag, NLAlib.SmallEig.rhess.

NLAlib.slottedLogWrite_writes {O Q : Type} [Ops.Has Ops.ScalarOp O] [Ops.Has Ops.IndexOp O]
  {Mch : Ops.Machine ℝ} {I : Ops.Interp O Q ℝ} (hS : Ops.IsScalar Mch I) (hL : Ops.IsIndexLit Mch I)
  {nmax : ℕ} (hNat : Ops.IsExactNatLit id Mch nmax) {ns w r : ℕ} (hr : r ≤ nmax) {lg pw qw : ℕ × ℕ}
  {L : List (Option (List GivensEntry))} {P : List GivensEntry} {p q : ℂ} {τ : Ops.Tape ℝ}
  {μ : Ops.Mem ℝ} (h : HoldsSlottedLog lg ns w L P μ.store) :
  L.length < ns →
    ∀ (hP : P.length < w) (hp : μ.store.readBlock pw.1 pw.2 2 = some [p.re, p.im])
      (hq : μ.store.readBlock qw.1 qw.2 2 = some [q.re, q.im])
      (hd :
        Ops.Fp.Disj (Ops.Store.inBlock lg.1 lg.2 (ns * (1 + 5 * w)))
          (Ops.Store.inBlock pw.1 pw.2 2 ⊔ Ops.Store.inBlock qw.1 qw.2 2)),
      Ops.Writes Ops.Mode.total I τ slottedLogWrite
        (Ops.Env.frame [w, L.length, P.length, r] [pw, qw, lg])
        (Ops.Store.inBlock lg.1 lg.2 (ns * (1 + 5 * w)))
        (fun μ' ↦ μ'.pos = μ.pos ∧ HoldsSlottedLog lg ns w L (P ++ [(r, p, q)]) μ'.store) μ

Full source on GitHub

Import NLAlib.Matrix.FinitePrecision.GivensLog.