NLA-lib Explorer

NLAlib.Ops.Examples.runsLaw_srsum_link

Library Ā· theorem

Random tape

The corollary for the program that draws, one application of the law-level linking lemma: n draws and n sraddXi, one scratch cell, the sure bound for every sample, and š”¼ ŝ = s.

NLAlib.Ops.Examples.runsLaw_srsum_link {K : Type} [Inhabited K] [MeasurableSpace K]
  {f : K → K → K → K} {I : Ops.Interp Ops.Examples.SrLo Empty K} (hI : Ops.Examples.IsSrLo f I)
  (hloc : āˆ€ (o : Ops.Examples.SrLo), I.TapeLocal o (Ops.Examples.srWindow o)) {u : ā„} {dec : K → ā„}
  {law : ā„• → Measure K} (hf : Ops.Examples.SrModel u dec (law Ops.Stream.unif) f) (hu : 0 ≤ u)
  {Ī© : Type} {mĪ© : MeasurableSpace Ī©} {P : Measure Ī©} {ξ : Ī© → Ops.Tape K}
  (h : Ops.IsTapeLaw law P ξ) {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 I (fun x x_1 ↦ 0) ξ (Ops.Stmt.link Ops.Examples.srTable Ops.Examples.srsum)
    { idx := [n, x.2, z.2], buf := [x.1, z.1] } m
    (n • (Ops.Count.one Ops.Examples.SrLo.draw [] + Ops.Count.one Ops.Examples.SrLo.sraddXi [])) 1
    (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.