NLA-lib Explorer

NLAlib.Ops.RCLikeScalar.copy_writes

Library ยท theorem

The scalar copy loop returns the original block under its admitted alias policy. The tree implements copy for two operand layouts, out of place and in place, which are two routines (copyRoutine, copyInPlaceRoutine); this lemma, stated for both layouts, is their common proof. Shared by the trees of NLAlib.Deflation.apply, NLAlib.reduceLastStep, NLAlib.ShiftedQR.acceptTrialWithScratch and 83 more.

NLAlib.Ops.RCLikeScalar.copy_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 : โ„•} {x y : โ„• ร— โ„•} (xs : List ๐•œ)
  (hX : m.store.readBlock x.1 x.2 n = some xs)
  (hXY : Ops.Fp.Disj (Ops.Store.inBlock x.1 x.2 n) (Ops.Store.inBlock y.1 y.2 n) โˆจ x = y)
  (hy : y.2 + n โ‰ค m.store.len y.1) :
  Ops.Writes Ops.Mode.total I tape Ops.RCLikeScalar.copy (Ops.Env.frame [n] [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 xs)
    m

Full source on GitHub

Import NLAlib.Ops.Profiles.RCLikeScalarTrees.