NLAlib.HutchPlusPlus.Certification.estimate_checked
Library ยท theorem
What the certificate states, with no reference to routines or contracts. For every order n, sketch width k and positive probe count \ell, every stored operator supplied in the first buffer, every interpretation of the exact operations of the model, and every tape, the counted run of the fixed program succeeds, executes at most 230 + 155 k + 71 \ell + 38 k \ell + 6 n k + 6 n \ell + 38 k^2 instructions (each vector operation, draw and product with the operator counting one), keeps the resident memory (the supplied payload plus the peak scratch) within \mathrm{dataLength}(n, n) + 1 + 2 n (k + \ell) + 2 + w bytes, stops at tape position n (k + \ell), and leaves the second buffer holding the Hutch++ value of the operator for the sketch in the first n k words of the stream and the probes in the next n \ell. The accuracy of that value as a trace estimate, for Gaussian draws, is NLAlib.HutchPlusPlus.Certification.claim.
NLAlib.HutchPlusPlus.Certification.estimate_checked {๐ : Type} [RCLike ๐] (dataLength : โ โ โ โ โ)
(matrix : (m n : โ) โ List ๐ โ Matrix (Fin m) (Fin n) ๐)
(workspace : Ops.ExactLinear.Operation โ List โ โ โ) (w : โ)
(hW : โ (o : Ops.ExactLinear.Operation) (d : List โ), workspace o d โค w) (stream : โ)
(d : Fin 3 โ โ) (hd : 0 < d 2) (x : (HutchPlusPlus.Certification.problem dataLength).Input d)
(I : Ops.Interp Ops.ExactLinear.Operation Ops.CmpTst ๐)
(hI :
(Ops.ExactLinear.model (HutchPlusPlus.Certification.problem dataLength) dataLength matrix
(fun x x_1 โฆ 1) workspace).contracts
d x I)
(ฯ : Ops.Tape ๐) :
โ st,
Ops.Reference.Execution (HutchPlusPlus.estimateProgram stream) I
(Ops.ExactLinear.resources (fun x x_1 โฆ 1) workspace)
(HutchPlusPlus.Certification.problem dataLength).formats ฯ d
((HutchPlusPlus.Certification.problem dataLength).initial d x) st โง
(Ops.ExactLinear.resources (fun x x_1 โฆ 1) workspace).work st.cost โค
HutchPlusPlus.Certification.operationCount d โง
(HutchPlusPlus.Certification.problem dataLength).initialBytes d x + st.peak โค
dataLength (d 0) (d 0) + 1 + (2 * d 0 * (d 1 + d 2) + 2 + w) โง
st.mem.pos = d 0 * (d 1 + d 2) โง
st.mem.Holds Ops.Codec.scalar 1
(hutchpp (matrix (d 0) (d 0) โ(โx).1)
((Ops.EntryCodec.scalar ๐).matrix (d 0) (d 1) (ฯ.window stream 0 (d 0 * d 1)))
((Ops.EntryCodec.scalar ๐).matrix (d 0) (d 2)
(ฯ.window stream (d 0 * d 1) (d 0 * d 2))))Import NLAlib.Estimation.Trace.HutchPlusPlus.Certification.