NLA-lib Explorer

NLAlib.Ops.RCLikeBlas.writes_dot

Library ยท theorem

A Hermitian dot call reads both blocks and writes their exact scalar product.

NLAlib.Ops.RCLikeBlas.writes_dot {๐•œ 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 b z : โ„• ร— โ„•} {xs ys : List ๐•œ} (hd : Ops.IExp.evalList ฯ.idx ds = some [n])
  (ha : Ops.Operand.evalList ฯ ins = some [a, b]) (hz : Ops.Operand.evalList ฯ outs = some [z])
  (hl : m.Live [a, b, z]) (hA : m.store.readBlock a.1 a.2 n = some xs)
  (hB : m.store.readBlock b.1 b.2 n = some ys)
  (hZA : Ops.Fp.Disj (Ops.Store.inBlock z.1 z.2 1) (Ops.Store.inBlock a.1 a.2 n))
  (hZB : Ops.Fp.Disj (Ops.Store.inBlock z.1 z.2 1) (Ops.Store.inBlock b.1 b.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.dot) 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 [Ops.RCLikeBlas.dot n xs ys]) m

Full source on GitHub

Import NLAlib.Ops.Logic.RCLikeBlas.