NLA-lib Explorer

NLAlib.Ops.RoundedScalarBlas.nrm2_writes_exact

Library · theorem

Exact arithmetic

The judgment NLAlib.Ops.RoundedScalarBlas.nrm2_meets read at one cell: under exact arithmetic the run stores the Euclidean norm of the words read. A corollary kept in operand form because its caller frames the tree inside a stage whose contract states the stored cell (NLAlib.ShiftedQR.matrixNorm), not a reported block.

NLAlib.Ops.RoundedScalarBlas.nrm2_writes_exact {Tst Op : 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 ℝ} {n : ℕ} {x z : ℕ × ℕ} {xs : List ℝ} (hl : m.Live [x, z])
  (hx : m.store.readBlock x.1 x.2 n = some xs) (hz : z.2 < m.store.len z.1) (hxz : x.1 ≠ z.1) :
  Ops.Writes Ops.Mode.total I τ Ops.RoundedScalarBlas.nrm2.body (Ops.Env.frame [n] [x, z])
    (Ops.Store.inBlock z.1 z.2 1)
    (fun μ ↦ μ.pos = m.pos ∧ μ.store.get z.1 z.2 = some √(∑ i ∈ Finset.range n, Ops.vec xs i ^ 2)) m

Full source on GitHub

Import NLAlib.Ops.Profiles.RoundedScalarBlas.