NLA-lib Explorer

NLAlib.Ops.RCLikeScalar.scal_writes

Library ยท theorem

The shared broadcast lowering computes vector division with the exact scalar machine. The tree implements scal out of place and in place, two routines (scalRoutine, scalInPlaceRoutine); this lemma, stated for both layouts, is their common proof. Shared by the trees of NLAlib.Krylov.Lanczos.normalize, NLAlib.CGS2.cgs2Extend, NLAlib.CGS2.cgs2ExtendFinish and 10 more.

NLAlib.Ops.RCLikeScalar.scal_writes {Op Tst : Type} [Ops.Has Ops.ScalarOp Op] {๐•œ : Type} [RCLike ๐•œ]
  {I : Ops.Interp Op Tst ๐•œ} {tape : Ops.Tape ๐•œ} {m : Ops.Mem ๐•œ}
  (hS : Ops.IsScalar Ops.RCLikeBlas.machine I) {n : โ„•} {a x y : โ„• ร— โ„•} (xs : List ๐•œ) (alpha : ๐•œ)
  (hl : m.Live [a, x, y]) (hX : m.store.readBlock x.1 x.2 n = some xs)
  (hA : m.store.get a.1 a.2 = some alpha)
  (hXY : Ops.Fp.Disj (Ops.Store.inBlock x.1 x.2 n) (Ops.Store.inBlock y.1 y.2 n) โˆจ x = y)
  (hAY : Ops.Fp.Disj (Ops.Store.inBlock a.1 a.2 1) (Ops.Store.inBlock y.1 y.2 n))
  (hy : y.2 + n โ‰ค m.store.len y.1) :
  Ops.Writes Ops.Mode.total I tape Ops.RCLikeScalar.scal (Ops.Env.frame [n] [a, x, y])
    (Ops.Store.inBlock y.1 y.2 n)
    (fun m' โ†ฆ
      m'.pos = m.pos โˆง
        m'.store.readBlock y.1 y.2 n = some (List.ofFn fun i โ†ฆ xs.getD (โ†‘i) 0 / alpha))
    m

Full source on GitHub

Import NLAlib.Ops.Profiles.RCLikeScalarTrees.