NLAlib.MGS.normalize_writes
Library Β· theorem
Compute the actual Hermitian norm square and perform the guarded normalization. The statement covers every vector, including zero, with no execution-success premise. A fragment of NLAlib.MGS.factorRoutine: run only inside its tree, on its operands and the buffers it allocates.
NLAlib.MGS.normalize_writes {π Op Tst : Type} [RCLike π] [Ops.Has Ops.ScalarOp Op]
[Ops.Has Ops.Blas1Op Op] [Ops.Has Ops.CmpTst Tst] {I : Ops.Interp Op Tst π} {Ο : Ops.Tape π}
{m : Ops.Mem π} (hS : Ops.IsScalar Ops.RCLikeBlas.machine I) (hB : Ops.RCLikeBlas.IsExact I)
(hC : Ops.IsCmp (βRCLike.re) I) {n : β} {v t : β Γ β} (w : Fin n β π) (hl : m.Live [v, t])
(hv : m.store.readBlock v.1 v.2 n = some (List.ofFn w))
(htv : Ops.Fp.Disj (Ops.Store.inBlock t.1 t.2 2) (Ops.Store.inBlock v.1 v.2 n))
(ht : t.2 + 2 β€ m.store.len t.1) (hz : v.2 + n β€ m.store.len v.1) :
Ops.Writes Ops.Mode.total I Ο MGS.normalize (Ops.Env.frame [n] [v, t])
(Ops.Store.inBlock t.1 t.2 2 β Ops.Store.inBlock v.1 v.2 n)
(fun m' β¦
m'.pos = m.pos β§
m'.store.readBlock v.1 v.2 n =
some
(if RCLike.re (star w β¬α΅₯ w) = 0 then List.ofFn w
else List.ofFn fun i β¦ w i / ββ(RCLike.re (star w β¬α΅₯ w))))
mImport NLAlib.Matrix.Factorizations.MGS.Normalize.