NLA-lib Explorer

NLAlib.Ops.Examples.runsLaw_srsum

Library Ā· theorem

Random tape

The abstract theorem of srsum, for every interpretation satisfying the contract of srAdd and every law of the tape: for every sample, n calls within the workspace of one and the sure bound; and the computed sum is unbiased, š”¼ ŝ = s.

NLAlib.Ops.Examples.runsLaw_srsum {K : Type} [Inhabited K] [MeasurableSpace K] {g : K → K → K → K}
  {J : Ops.Interp Ops.Examples.SrOp Empty K} (hJ : Ops.Examples.IsSrAdd g J) {u : ā„} {dec : K → ā„}
  {law : ā„• → Measure K} (hg : Ops.Examples.SrModel u dec (law Ops.Stream.unif) g) (hu : 0 ≤ u)
  {Ī© : Type} {mĪ© : MeasurableSpace Ī©} {P : Measure Ī©} {ξ : Ī© → Ops.Tape K}
  (h : Ops.IsTapeLaw law P ξ) (W : Ops.Examples.SrOp → List ā„• → ā„•) {n : ā„•} {x z : ā„• Ɨ ā„•}
  {m : Ops.Mem K} {xs : List K} {zā‚€ : K} (hxz : x.1 ≠ z.1)
  (hx : m.store.readBlock x.1 x.2 n = some xs) (hz : m.store.get z.1 z.2 = some zā‚€) :
  Ops.ConditionalRunsLaw J W ξ Ops.Examples.srsum { idx := [n, x.2, z.2], buf := [x.1, z.1] } m
    (n • Ops.Count.one Ops.Examples.SrOp.srAdd []) (W Ops.Examples.SrOp.srAdd [])
    (Ops.Examples.SrsumPost dec u n z zā‚€ xs m) fun X ↦
    ∫ (ω : Ī©), X ω āˆ‚P = dec zā‚€ + āˆ‘ k ∈ Finset.range n, dec (Ops.vec xs k)

Full source on GitHub

Import NLAlib.Ops.Examples.StochRound.