Running a computation for a bounded number of steps #
Computation.runFor s n is the result of the computation s after n steps, or none if s has
not terminated by then. Once s has terminated it keeps its result, so a ∈ s.runFor n exactly
when s terminates with result a within n steps (Computation.mem_runFor_iff_exists_results).
The steps add up along bind (Computation.mem_runFor_bind), and map takes no steps of its own
(Computation.runFor_map).
Main results #
Computation.mem_runFor_of_le: a result available aftermsteps is available aftern ≥ msteps.Computation.mem_iff_exists_mem_runFor,Computation.mem_runFor_iff_exists_results: results of a computation and their times.Computation.runFor_map,Computation.mem_runFor_bind:mapandbindagainst the clock.
A result available after m steps is available after n ≥ m steps.
A result available after n steps is a result of the computation.
Two results of the same computation, at any two times, are equal.
A computation terminating after exactly n steps has its result after n steps.
map takes no steps of its own.
The steps of a computation and of its continuation add up along bind.