probUntil Properties #
This file proves evaluation and normalization results about probUntil.
Implementation Notes #
Many lemmas in this file deal are stated for truncations of the probUntil program
to a finite number of attempts. Because this term is not used outside this file, we
will not factor out an explicit probUntilCut term.
@[simp]
theorem
SLang.probUntilCut_zero
{T : Type}
(st : T)
(body : SLang T)
(cond : T → Bool)
(x : T)
:
SLang.probWhileCut (fun (v : T) => decide (cond v = false)) (fun (x : T) => body) 0 st x = 0
Truncation of probUntil program to zero unrollings is identically zero.
@[simp]
theorem
SLang.probUntilCut_apply_unsat
{T : Type}
(body : SLang T)
(cond : T → Bool)
(fuel : ℕ)
(i : T)
(x : T)
(h : ¬cond x = true)
:
SLang.probWhileCut (fun (v : T) => decide (cond v = false)) (fun (x : T) => body) fuel i x = 0
Truncation of probUntil program to any number of unrollings will evaluate to zero, for
values which do not satisfy cond.
Expression for the limit of the closed form of truncated until
@[simp]
Closed form for evaluation of until. until is:
@[simp]
theorem
SLang.probUntil_apply_norm
{T : Type}
(body : SLang T)
(cond : T → Bool)
(x : T)
(norm : ∑' (x : T), body x = 1)
:
When body is a proper PMF, until is