NLA-lib Explorer

NLAlib.Ops.Pair.linearCombination_writes

Library · theorem

The judgment of NLAlib.Ops.Pair.linearCombinationRoutine read at cells. A corollary of NLAlib.Ops.Pair.linearCombinationRoutine_meets, kept because its callers hold the four input pairs as cells of matrix entries inside loop rules.

NLAlib.Ops.Pair.linearCombination_writes {K Op Tst : Type} [Ops.Has Ops.ScalarOp Op]
  {M : Ops.Machine K} {I : Ops.Interp Op Tst K} (hI : Ops.IsScalar M I) {τ : Ops.Tape K}
  {m : Ops.Mem K} {a b x y t z : ℕ × ℕ} {av bv xv yv : K × K}
  (ht : Ops.Fp.Disj (Ops.Store.inBlock t.1 t.2 2) (Ops.Fp.blocks [a, b, x, y] [2, 2, 2, 2]))
  (hz : Ops.Fp.Disj (Ops.Store.inBlock z.1 z.2 2) (Ops.Fp.blocks [a, b, x, y] [2, 2, 2, 2]))
  (htz : Ops.Fp.Disj (Ops.Store.inBlock t.1 t.2 2) (Ops.Store.inBlock z.1 z.2 2))
  (ha₀ : m.store.get a.1 a.2 = some av.1) (ha₁ : m.store.get a.1 (a.2 + 1) = some av.2)
  (hb₀ : m.store.get b.1 b.2 = some bv.1) (hb₁ : m.store.get b.1 (b.2 + 1) = some bv.2)
  (hx₀ : m.store.get x.1 x.2 = some xv.1) (hx₁ : m.store.get x.1 (x.2 + 1) = some xv.2)
  (hy₀ : m.store.get y.1 y.2 = some yv.1) (hy₁ : m.store.get y.1 (y.2 + 1) = some yv.2)
  (htroom : t.2 + 2 ≤ m.store.len t.1) (hzroom : z.2 + 2 ≤ m.store.len z.1) :
  Ops.Writes Ops.Mode.total I τ Ops.Pair.linearCombination (Ops.Env.frame [] [a, b, x, y, t, z])
    (Ops.Store.inBlock t.1 t.2 2 ⊔ Ops.Store.inBlock z.1 z.2 2)
    (fun μ ↦
      μ.pos = m.pos ∧
        μ.store.readBlock z.1 z.2 2 =
          some [(Ops.Pair.linearWords M av bv xv yv).1, (Ops.Pair.linearWords M av bv xv yv).2])
    m

Full source on GitHub

Import NLAlib.Ops.Blas.Pair.