CADiZ

Reference manual / Z-related commands / Refinement commands / introduce constant


This command is part of the experimental refinement editor.

The introduce constant command refines a specification statement to introduce a logical constant. It applies the following inference rule of the refinement calculus.

\vdash? P \implies (\exists D @ P \land C)      \vdash? \forall D @ \specstmt F[P \land C, I, Q]
\vdash? \specstmt F[P,I,Q]

where D | C is the constant.

The code that is implicitly generated by this refinement rule is [| con D | C \specstmt F[P \land C, I, Q] |].

The introduce constant command is applicable when any specification statement \specstmt F[P,I,Q] in a goal is inspected.

The constant D | C is entered into a dialogue box using the syntax of a Z schema text, e.g. n == 42. The default response is the previous response. Alternatively, if a suitable schema text is displayed in the same window, that can have been selected first (crossed). The constant is typechecked in the environment of the inspected specification statement.

Tactic example

"introduce constant" "D | C" p

This example applies the introduce constant command to specification statement p using the constant D | C.

A tactic that applies the introduce constant command must be executed by play tactic; it is not applicable under apply tactic as the resulting code would not be accessible to the code command.


IT 20-Nov-2000