NLA-lib Explorer

NLAlib.Ops.Hermitian.upper_writes

Library · theorem

Strict-upper and diagonal procedure specifications compose into one inclusive upper matrix specification. Region disjointness preserves the strict-upper entries automatically. Shared by the trees of NLAlib.Schur.RandomRegularizerContract, NLAlib.Schur.HessenbergReducerContract, NLAlib.Schur.TerminatingSchurCore and 27 more.

NLAlib.Ops.Hermitian.upper_writes {K Op Tst : Type} {I : Ops.Interp Op Tst K} {τ : Ops.Tape K}
  (offDiagonal diagonalEntry : Ops.Stmt Op Tst) {n : ℕ} {x c y : ℕ × ℕ} {m : Ops.Mem K}
  (U : ℕ → ℕ → K × K) (D : ℕ → K × K) {A : ℕ → ℕ → K × K} {d : K}
  (hxy :
    Ops.Fp.Disj (Ops.Store.inBlock x.1 x.2 (2 * (n * n))) (Ops.Store.inBlock y.1 y.2 (2 * (n * n))))
  (hcy : Ops.Fp.Disj (Ops.Store.inBlock c.1 c.2 1) (Ops.Store.inBlock y.1 y.2 (2 * (n * n))))
  (hX :
    m.store.HoldsEntries (Ops.EntryCodec.pair K)
      { buf := x.1, off := x.2, rows := n, cols := n, ld := n } A)
  (hc : m.store.get c.1 c.2 = some d) (hY : y.2 + 2 * (n * n) ≤ m.store.len y.1)
  (hl : m.Live [x, c, y])
  (hu :
    Ops.Writes Ops.Mode.total I τ (Ops.Hermitian.triangle offDiagonal) (Ops.Env.frame [n] [x, c, y])
      ((Ops.EntryCodec.pair K).rowsFp { buf := y.1, off := y.2, rows := n, cols := n, ld := n } id)
      (fun μ ↦
        μ.store.HoldsRowEntries (Ops.EntryCodec.pair K)
            { buf := y.1, off := y.2, rows := n, cols := n, ld := n } id U ∧
          μ.pos = m.pos)
      m)
  (hd :
    ∀ (μ : Ops.Mem K),
      μ.store.HoldsEntries (Ops.EntryCodec.pair K)
          { buf := x.1, off := x.2, rows := n, cols := n, ld := n } A →
        μ.store.get c.1 c.2 = some d →
          y.2 + 2 * (n * n) ≤ μ.store.len y.1 →
            μ.Live [x, c, y] →
              Ops.Writes Ops.Mode.total I τ (Ops.Hermitian.diagonal diagonalEntry)
                (Ops.Env.frame [n] [x, c, y])
                ((Ops.EntryCodec.pair K).regionFp y.1 y.2 n (fun x j ↦ j * n + j) fun x ↦ 1)
                (fun μ' ↦
                  (μ'.store.HoldsEntryRegion (Ops.EntryCodec.pair K) y.1 y.2 n (fun x j ↦ j * n + j)
                      (fun x ↦ 1) fun x j ↦ D j) ∧
                    μ'.pos = μ.pos)
                μ) :
  Ops.Writes Ops.Mode.total I τ (Ops.Hermitian.upper offDiagonal diagonalEntry)
    (Ops.Env.frame [n] [x, c, y]) (Ops.Store.inBlock y.1 y.2 (2 * (n * n)))
    (fun μ ↦
      (μ.store.HoldsRowEntries (Ops.EntryCodec.pair K)
          { buf := y.1, off := y.2, rows := n, cols := n, ld := n } (fun j ↦ j + 1) fun i j ↦
          if i = j then D i else U i j) ∧
        μ.pos = m.pos)
    m

Full source on GitHub

Import NLAlib.Ops.Blas.HermitianUpper.