NLA-lib Explorer

NLAlib.SmallEig.ginibrePerturb_writes_word

Library · theorem

NLAlib.SmallEig.ginibrePerturb on a scalar machine with index literals and draws that store the tape entry: from \mathbf{A} of order N at a and the word \gamma at q, apart, it writes only the matrix, advances the position by 2N^2, and stores NLAlib.Ops.Machine.perturbWords \gamma \mathbf{A} of the 2N^2 entries of the stream sG at the start position. Shared by the trees of NLAlib.ShiftedQR.shqrSmallEigRoutine and NLAlib.SmallEig.smallEigRoutine, on their scratch.

NLAlib.SmallEig.ginibrePerturb_writes_word {O Q : Type} [Ops.Has Ops.ScalarOp O]
  [Ops.Has Ops.IndexOp O] [Ops.Has Ops.SampleOp O] {M : Ops.Machine ℝ} {I : Ops.Interp O Q ℝ}
  (hS : Ops.IsScalar M I) (hL : Ops.IsIndexLit M I) (hSmp : Ops.IsSample I) {sG N nq : ℕ}
  {τ : Ops.Tape ℝ} {μ : Ops.Mem ℝ} {a q : ℕ × ℕ} {A : Matrix (Fin N) (Fin N) ℂ} {γ : ℝ}
  (hl : μ.Live [a, q]) (hA : HoldsMatrix a A μ.store) (hq : μ.store.get q.1 q.2 = some γ) :
  Ops.Writes Ops.Mode.total I τ (SmallEig.ginibrePerturb sG) (Ops.Env.frame [N, nq] [a, q, a])
    (Ops.Store.inBlock a.1 a.2 (2 * (N * N)))
    (fun μ' ↦
      μ'.pos = μ.pos + 2 * (N * N) ∧
        HoldsMatrix a (M.perturbWords γ A fun j ↦ τ (μ.pos + j) sG) μ'.store)
    μ

Full source on GitHub

Import NLAlib.Eigensolvers.SmallEig.Perturb.