let B be a Set
(the specification),
A another Set
(set of states), and
Pre,Post:A->Prop
(the pre- and post- conditions);
If we build:
:{a:
A|(
Pre a)}
:(a:
A)(
Pre a)->{a':
A|(
Post a')}
:(a:
A)(
Post a)->
B)
The usage of this construction is the following:
If the current goal is B, then the command
Apply Imperative with A Pre Post;[ Realizer <init:A> | Realizer <body:A->A> | Realizer <return:A->B> ].followed by
Program_all
,
will leave you some logical goals to solve.
An example can be found in the implementation of the logarithm of base 2
See also the while loop.
Realizer {nat x y; while (zerop x) { ... }; return y;}We hope this will be done in few weeks.