NLA-lib Explorer

NLAlib.Ops.Examples.read_of_hundred

Library · theorem

A hundred buffers, one disjointness hypothesis: reads after writes to other buffers of an injective family, a scratch buffer included.

NLAlib.Ops.Examples.read_of_hundred {K : Type} (s : Ops.Store K) (B : Fin 100 → ℕ)
  (hB : Function.Injective B) (hl : ∀ (i : Fin 100), B i < List.length s) (xs ys : List K) (v : K)
  (n : ℕ) (hx : xs.length = n) (hlen : 5 + n ≤ s.len (B 3))
  (hq : s.readBlock (B 57) 0 n = some ys) :
  ((((s.push 2).updBlock (B 3) 5 xs).upd (List.length s) 1 v).upd (B 99) 0 v).readBlock (B 57) 0 n =
      some ys ∧
    ((((s.push 2).updBlock (B 3) 5 xs).upd (List.length s) 1 v).upd (B 99) 0 v).readBlock (B 3) 5
          n =
        some xs ∧
      ((((s.push 2).updBlock (B 3) 5 xs).upd (List.length s) 1 v).upd (B 99) 0 v).get
          (List.length s) 1 =
        some v

Full source on GitHub

Import NLAlib.Ops.Examples.Loops.