NLAlib.SpectralBisection.compress_writes
Library · theorem
Compression succeeds on the actual readable basis, matrix and scalar words, with writable output capacity disjoint from the shift cell. Source matrices may overlap the output because all source reads finish before the final write. No numerical model or successful-run premise is assumed; the four scratch allocations are discharged together. A fragment of NLAlib.SpectralBisection.bisectionRoutine.
NLAlib.SpectralBisection.compress_writes {K Su Sg Op Tst : Type} [Inhabited K]
[Ops.Has Ops.ScalarOp Op] [Ops.Has Ops.MatrixOp Op] {M : Ops.Machine K} (dec : K → ℝ)
(mm : MatMulMap (K × K)) (qr : QRMap (K × K)) (unif : K → Su → K) (normal : Sg → K × K)
{I : Ops.Interp Op Tst K} (hS : Ops.IsScalar M I)
(hmm : Ops.IsMatrixMul (Ops.EntryCodec.pair K) (fun {l m n} ↦ mm) I) {τ : Ops.Tape K}
{μ : Ops.Mem K} {k r : ℕ} {q a two sigma y : ℕ × ℕ} (Q : Matrix (Fin k) (Fin r) (K × K))
(A : Matrix (Fin k) (Fin k) (K × K)) (t s : K) (hl : μ.Live [q, a, two, sigma, y])
(hQ : μ.store.readBlock q.1 q.2 (2 * (k * r)) = some ((Ops.EntryCodec.pair K).packFinMatrix Q))
(hA : μ.store.readBlock a.1 a.2 (2 * (k * k)) = some ((Ops.EntryCodec.pair K).packFinMatrix A))
(ht : μ.store.get two.1 two.2 = some t) (hs : μ.store.get sigma.1 sigma.2 = some s)
(hy : y.2 + 2 * (r * r) ≤ μ.store.len y.1)
(hsy :
Ops.Fp.Disj (Ops.Store.inBlock sigma.1 sigma.2 1) (Ops.Store.inBlock y.1 y.2 (2 * (r * r)))) :
Ops.Writes Ops.Mode.total I τ SpectralBisection.compress
(Ops.Env.frame [k, r] [q, a, two, sigma, y]) (Ops.Store.inBlock y.1 y.2 (2 * (r * r)))
(fun μ' ↦
μ'.pos = μ.pos ∧
μ'.store.readBlock y.1 y.2 (2 * (r * r)) =
some
((Ops.EntryCodec.pair K).packFinMatrix
((M.toFloatMachine dec (fun {l m n} ↦ mm) (fun {m n} ↦ qr) unif normal).hermShift
((M.toFloatMachine dec (fun {l m n} ↦ mm) (fun {m n} ↦ qr) unif normal).hermAvg
(mm
(mm
((M.toFloatMachine dec (fun {l m n} ↦ mm) (fun {m n} ↦ qr) unif
normal).conjTransposeMat
Q)
A)
Q)
t)
s)))
μImport NLAlib.Eigensolvers.SpectralBisection.Compression.