NLA-lib Explorer

NLAlib.Ops.PairScalar.normSq_writes

Library · theorem

Exact arithmetic

The same reading under an exact machine: output cell two holds \mathbf{x}_r^2 + \mathbf{x}_i^2. A corollary of NLAlib.Ops.PairScalar.normSqRoutine_meets, kept for the same callers as NLAlib.Ops.PairScalar.normSq_writes_word.

NLAlib.Ops.PairScalar.normSq_writes {Op Tst : Type} [Ops.Has Ops.ScalarOp Op] {M : Ops.Machine ℝ}
  {I : Ops.Interp Op Tst ℝ} (hS : Ops.IsScalar M I) (hE : Ops.ExactModel id M) {τ : Ops.Tape ℝ}
  {m : Ops.Mem ℝ} {x t : ℕ × ℕ} {xr xi : ℝ} (hxr : m.store.get x.1 x.2 = some xr)
  (hxi : m.store.get x.1 (x.2 + 1) = some xi) (hroom : t.2 + 3 ≤ m.store.len t.1)
  (hsep : Ops.Fp.Disj (Ops.Store.inBlock x.1 x.2 2) (Ops.Store.inBlock t.1 t.2 3)) :
  Ops.Writes Ops.Mode.total I τ Ops.PairScalar.normSq (Ops.Env.frame [] [x, t])
    (Ops.Store.inBlock t.1 t.2 3)
    (fun m' ↦ m'.pos = m.pos ∧ m'.store.get t.1 (t.2 + 2) = some (xr ^ 2 + xi ^ 2)) m

Full source on GitHub

Import NLAlib.Ops.Blas.NormSq.