NLA-lib Explorer

NLAlib.Ops.RCLikeScalar.scal_blocks

Library · theorem

The run of the scaling tree on a scalar a, a vector x and an output z that is apart from x or is x, as the blocks of the exact scaling.

NLAlib.Ops.RCLikeScalar.scal_blocks {Op Tst : Type} [Ops.Has Ops.ScalarOp Op] {𝕜 : Type} [RCLike 𝕜]
  {I : Ops.Interp Op Tst 𝕜} (hS : Ops.IsScalar Ops.RCLikeBlas.machine I) {n : ℕ} {a x z : ℕ × ℕ}
  {τ : Ops.Tape 𝕜} {μ : Ops.Mem 𝕜} {vals : List (List 𝕜)} (hl : μ.Live [a, x, z])
  (hread : μ.readBlocks [a, x] [1, n] = some vals)
  (hxz : Ops.Fp.Disj (Ops.Store.inBlock x.1 x.2 n) (Ops.Store.inBlock z.1 z.2 n) ∨ x = z)
  (haz : Ops.Fp.Disj (Ops.Store.inBlock a.1 a.2 1) (Ops.Store.inBlock z.1 z.2 n))
  (hz : z.2 + n ≤ μ.store.len z.1) :
  Ops.Writes Ops.Mode.total I τ Ops.RCLikeScalar.scal (Ops.Env.frame [n] [a, x, z])
    (Ops.Fp.blocks [z] [n])
    (fun μ' ↦
      μ'.pos = μ.pos + 0 ∧
        ∃ ys,
          μ'.readBlocks [z] [n] = some ys ∧
            (Ops.RCLikeBlas.functions Ops.Blas1Op.scal).rel.rel [n] vals [] ys)
    μ

Full source on GitHub

Import NLAlib.Ops.Profiles.RCLikeScalar.