NLA-lib Explorer

NLAlib.Ops.PWrites.of_window

Library · theorem

A call with a bad window: if from every memory of the precondition the run ends in the postcondition unless the window of W entries of the stream s at the current position lies in a bad set Bad m, the bad sets are jointly measurable, and each has probability at most \varphi under the product law of the stream, then the block fails with probability at most \varphi.

NLAlib.Ops.PWrites.of_window {Op Tst K : Type} [Inhabited K] [MeasurableSpace K]
  {law : ℕ → Measure K} {I : Ops.Interp Op Tst K} {c : Ops.Stmt Op Tst} {ρ : Ops.Env} {F : Ops.Fp}
  {Pre Post : Ops.Mem K → Prop} {φ : ℝ} {s W : ℕ} {Bad : Ops.Mem K → Set (Fin W → K)}
  (hBad : MeasurableSet {x | x.2 ∈ Bad x.1})
  (hφ : ∀ (m : Ops.Mem K), Pre m → (Measure.pi fun x ↦ law s).real (Bad m) ≤ φ)
  (h :
    ∀ (m : Ops.Mem K) (τ : Ops.Tape K),
      Pre m → τ.windowFn s m.pos W ∉ Bad m → Ops.Writes Ops.Mode.total I τ c ρ F Post m) :
  Ops.PWrites law I c ρ F Pre Post φ

Full source on GitHub

Import NLAlib.Ops.Logic.Probabilistic.