NLA-lib Explorer

NLAlib.Ops.RCLikeBlas.writes_nrm2

Library ยท theorem

The norm primitive writes the embedded nonnegative square root of the real norm square.

NLAlib.Ops.RCLikeBlas.writes_nrm2 {๐•œ Op Tst : Type} [RCLike ๐•œ] [Ops.Has Ops.Blas1Op Op]
  {I : Ops.Interp Op Tst ๐•œ} {ฯ„ : Ops.Tape ๐•œ} {ฯ : Ops.Env} {m : Ops.Mem ๐•œ}
  (hI : Ops.RCLikeBlas.IsExact I) {ds : List Ops.IExp} {ins outs : List Ops.Operand} {n : โ„•}
  {a z : โ„• ร— โ„•} {xs : List ๐•œ} (hd : Ops.IExp.evalList ฯ.idx ds = some [n])
  (ha : Ops.Operand.evalList ฯ ins = some [a]) (hz : Ops.Operand.evalList ฯ outs = some [z])
  (hl : m.Live [a, z]) (hA : m.store.readBlock a.1 a.2 n = some xs)
  (hZA : Ops.Fp.Disj (Ops.Store.inBlock z.1 z.2 1) (Ops.Store.inBlock a.1 a.2 n))
  (hZ : z.2 + 1 โ‰ค m.store.len z.1) :
  Ops.Writes Ops.Mode.total I ฯ„ (Ops.Stmt.call (Ops.Has.inj Ops.Blas1Op.nrm2) ds ins outs) ฯ
    (Ops.Store.inBlock z.1 z.2 1)
    (fun m' โ†ฆ
      m'.pos = m.pos โˆง
        m'.store.readBlock z.1 z.2 1 = some [โ†‘โˆš(RCLike.re (Ops.RCLikeBlas.dot n xs xs))])
    m

Full source on GitHub

Import NLAlib.Ops.Logic.RCLikeBlas.