This command is part of the experimental refinement editor.
The strengthen postcondition command refines a specification statement to another with a stronger postcondition. It applies the following inference rule of the refinement calculus.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
where R is the new postcondition.
No code is implicitly generated by this refinement rule.
The strengthen postcondition command is applicable
when any specification statement F[P,I,Q] in a goal is inspected,
except where the postcondition is already as strong as it can be (false).
The new postcondition is entered into a dialogue box using the syntax of a Z predicate. The default response is the previous response. Alternatively, if a suitable predicate is displayed in the same window, that can have been selected first (crossed). The new postcondition is typechecked in the environment of the inspected specification statement.
"strengthen postcondition" "R" p
This example applies the strengthen postcondition command to specification statement p using the predicate R.