This command is part of the experimental refinement editor.
The introduce invariant command refines a specification statement to introduce a new invariant. It applies the following inference rule of the refinement calculus.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
where J is the new invariant.
No code is implicitly generated by this refinement rule.
The introduce invariant command is applicable
when any specification statement F[P,I,Q] in a goal is inspected.
The new invariant J 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 predicate is typechecked in the environment of the inspected specification statement.
"introduce invariant" "J" p
This example applies the introduce invariant command to specification statement p using the predicate J.