NLAlib.Ops.Examples.runsLaw_hutch_link
Library · theorem
Random tape
The corollary for the program with scalar draws: over every interpretation satisfying the base contracts whose operations read the tape only in their windows, for every sample N n scalar draws and N products, dot products and additions within 2 n + 1 scratch cells; the estimate is unbiased with the variance of one quadratic form divided by N.
NLAlib.Ops.Examples.runsLaw_hutch_link {K Tst : Type} [Inhabited K] [MeasurableSpace K]
{dec : K → ℝ} {n : ℕ} {A : Matrix (Fin n) (Fin n) ℝ} {I : Ops.Interp Ops.ROp Tst K}
(hI : Ops.IsRandBase dec A I) (hloc : ∀ (o : Ops.ROp), I.TapeLocal o (Ops.randWindow o))
{law : ℕ → Measure K} {Ω : Type} {mΩ : MeasurableSpace Ω} {P : Measure Ω} {ξ : Ω → Ops.Tape K}
(h : Ops.IsTapeLaw law P ξ) (hdec : Measurable dec)
(hiso : Ops.IsIsotropic (Ops.probeLaw dec (law Ops.Stream.gauss) n))
(hq : MemLp (Ops.quadForm A) 2 (Ops.probeLaw dec (law Ops.Stream.gauss) n)) {N : ℕ} (hN : 0 < N)
{e : ℕ × ℕ} {m : Ops.Mem K} {z₀ : K} (he : m.store.get e.1 e.2 = some z₀) (hz : dec z₀ = 0) :
Ops.ConditionalRunsLaw I (fun x x_1 ↦ 0) ξ
(Ops.Stmt.link Ops.Rand.gaussLoop.table Ops.Examples.hutch) (Ops.Env.frame [N, n] [e, e]) m
(N •
(n • Ops.Count.one Ops.ROp.draw [] +
(Ops.Count.one (Ops.ROp.operator Ops.OperatorOp.matvec) [n, n] +
(Ops.Count.one Ops.ROp.dot [n] + Ops.Count.one Ops.ROp.add []))))
(n + (n + 1)) (Ops.Examples.HutchPost dec N n e m) fun X ↦
∫ (ω : Ω), X ω / ↑N ∂P = A.trace ∧
Var[fun ω ↦ X ω / ↑N; P] = Var[Ops.quadForm A; Ops.probeLaw dec (law Ops.Stream.gauss) n] / ↑NImport NLAlib.Ops.Examples.HutchLinked.