Order theory of the bounded loop approximants #
The mass whileApprox guard body n h assigns to a value is non-decreasing in the
budget n, the mass it assigns to failure is non-increasing, and the value mass
is bounded by 1 at every budget. Together these make the pointwise supremum
over n a well-defined sub-probability assignment, which is what a limit
construction for while guard do body consumes.
Main results #
SDistr.bind_apply_mono—bindis monotone in its continuation, pointwise at a fixed outcomewhileApprox_apply_le_succ,whileApprox_apply_mono,monotone_whileApprox_apply— the value mass is non-decreasing in the budgetwhileApprox_apply_none_succ_le,whileApprox_apply_none_antitone— the failure mass is non-increasing in the budgetwhileApprox_apply_le_one,tsum_whileApprox_apply_le_one— the value mass is bounded by1at every budgetiSup_whileApprox_apply_le_one,tsum_iSup_whileApprox_apply_le_one— the same bounds for the pointwise supremum over budgets
Unfolding at a fixed outcome #
The guarded step of an approximant as an SDistr bind: the body is run once
and the remaining budget is spent from the resulting heap.
The value mass is non-decreasing in the budget #
Raising the budget by one does not decrease the mass at a value: a run that has not yet left the loop contributes no mass at the smaller budget.
The mass at a value is non-decreasing in the budget.
The mass at a value, as a function of the budget, is monotone.
The failure mass is non-increasing in the budget #
Raising the budget by one does not increase the mass at failure.
The mass at failure is non-increasing in the budget.
The mass at failure, as a function of the budget, is antitone.
The value mass is bounded #
The mass at a single value is at most 1.
The mass at a single value is finite.
The bounds for the supremum over budgets #
The supremum over budgets of the mass at a value is at most 1.
The total mass on values of the pointwise supremum over budgets is at most 1,
so the supremum is a sub-probability assignment.