NLAlib.Ops.Impl.Satisfies.runsLaw
Library · theorem
The bridge, law-level form. Satisfaction in total mode in operand form gives the law-level statement of the tree. For every sample the run terminates within its static counts and workspace and writes output blocks related to the inputs and to the window of the tape of the sample; X ω is the observable obs of these blocks. So every property Φ of a random variable that the relation implies, sample by sample, holds of X. The mathematics of a randomized algorithm is the proof of hΦ, from the relation and the law of the tape; no program is in it.
NLAlib.Ops.Impl.Satisfies.runsLaw {Op Tst K Ω α : Type} {E : Ops.Impl Op Tst}
{I : Ops.Interp Op Tst K} {B : Ops.BlockRel K} {adm : List ℕ → List (ℕ × ℕ) → List (ℕ × ℕ) → Prop}
(h : E.Satisfies I Ops.Mode.total (B.spec adm)) (W : Op → List ℕ → ℕ) (ξ : Ω → Ops.Tape K)
(obs : List (List K) → α) {d : List ℕ} {ins outs : List (ℕ × ℕ)} {m : Ops.Mem K}
{xs : List (List K)} (hnd : d.length = B.nd) (hadm : adm d ins outs) (hl : m.Live (ins ++ outs))
(hr : m.readBlocks ins (B.inLens d) = some xs)
(hdom : ∀ (ω : Ω), B.dom d xs ((ξ ω).window B.stream m.pos (B.win d)))
(hz : m.Room outs (B.outLens d)) {Φ : (Ω → α) → Prop}
(hΦ :
∀ (X : Ω → α),
(∀ (ω : Ω),
∃ ys,
X ω = obs ys ∧
List.map List.length ys = B.outLens d ∧
B.rel d xs ((ξ ω).window B.stream m.pos (B.win d)) ys) →
Φ X) :
Ops.ConditionalRunsLaw I W ξ E.body (Ops.Env.frame d (ins ++ outs)) m
(Ops.stmtCost E.body (d ++ List.map Prod.snd (ins ++ outs)))
(Ops.stmtPeak W E.body (d ++ List.map Prod.snd (ins ++ outs)))
(fun x m' ↦
∃ ys,
obs ys = x ∧
List.map List.length ys = B.outLens d ∧ m' = (m.updBlocks outs ys).advance (B.win d))
ΦImport NLAlib.Ops.Law.