NLA-lib Explorer

NLAlib.Ops.PStep.bind

Library · theorem

Sequence of steps: if the first step reads the tape only up to its end position and is measurable, the failure probabilities add; the second must have \varphi_2 \ge 0.

NLAlib.Ops.PStep.bind {K : Type} [Inhabited K] [MeasurableSpace K] {law : ℕ → Measure K}
  {f g : Ops.Tape K → Ops.Mem K → Option (Ops.Mem K)} {Pre : Ops.Mem K → Prop}
  (hfm : Ops.MeasurableRun f) (hff : ∀ (τ τ' : Ops.Tape K), Ops.Follows τ τ' (f τ) (f τ'))
  {Mid : Ops.Mem K → Prop} {Q₁ Q₂ : Ops.Mem K → Ops.Mem K → Prop} {φ₁ φ₂ : ℝ}
  (h₁ : Ops.PStep law f Pre Q₁ φ₁) (hmid : ∀ (m m' : Ops.Mem K), Pre m → Q₁ m m' → Mid m')
  (h₂ : Ops.PStep law g Mid Q₂ φ₂) (hφ₂ : 0 ≤ φ₂) :
  Ops.PStep law (fun τ m ↦ (f τ m).bind (g τ)) Pre (fun m m'' ↦ ∃ m', Q₁ m m' ∧ Q₂ m' m'') (φ₁ + φ₂)

Full source on GitHub

Import NLAlib.Ops.Logic.Probabilistic.