NLA-lib Explorer

NLAlib.Ops.Hermitian.boxTest_wp

Library · theorem

The complete box test changes exactly its output flag to the actual machine literal of its interval predicate. No extra matrix-specific execution or cell-update proof is needed. A fragment of the tree NLAlib.Sign.test. A corollary of NLAlib.Ops.Hermitian.boxTest_writes, the primary statement, without the frame.

NLAlib.Ops.Hermitian.boxTest_wp {K Op Tst : Type} [Inhabited K] [Ops.Has Ops.ScalarOp Op]
  [Ops.Has Ops.CmpTst Tst] {M : Ops.Machine K} {dec : K → ℝ} {I : Ops.Interp Op Tst K}
  (hS : Ops.IsScalar M I) (hC : Ops.IsCmp dec I) {md : Ops.Mode} {τ : Ops.Tape K} {m : Ops.Mem K}
  {rows cols : ℕ} {x lo hi z : ℕ × ℕ} {a b : K} {xs : List K} (hl : m.Live [x, lo, hi, z])
  (hx : m.store.readBlock x.1 x.2 (2 * (rows * cols)) = some xs)
  (hlo : m.store.get lo.1 lo.2 = some a) (hhi : m.store.get hi.1 hi.2 = some b)
  (hz : z.2 < m.store.len z.1)
  (hXz : Ops.Fp.Disj (Ops.Store.inBlock x.1 x.2 (2 * (rows * cols))) (Ops.Store.inBlock z.1 z.2 1))
  (hloz : Ops.Fp.Disj (Ops.Store.inBlock lo.1 lo.2 1) (Ops.Store.inBlock z.1 z.2 1))
  (hhiz : Ops.Fp.Disj (Ops.Store.inBlock hi.1 hi.2 1) (Ops.Store.inBlock z.1 z.2 1))
  {Q : Ops.Mem K → Prop}
  (hQ :
    Q
      (m.upd z
        (M.lit (if Ops.InInterval dec a b (Ops.vec xs) (2 * (rows * cols)) then 0 else 1)))) :
  Ops.Wp md I τ Ops.Hermitian.boxTest (Ops.Env.frame [rows, cols] [x, lo, hi, z]) Q m

Full source on GitHub

Import NLAlib.Ops.Blas.HermitianTest.