CADiZ

Reference manual / Z-related commands / In situ replacement commands / expansion


The expansion command performs the following in situ replacements. The inverses of some of the inferences are performed by the contraction command.

Predicates

p1 \implies p2   \trarrow   \lnot p1 \lor p2
p1 \iff p2   \trarrow   (p1 \implies p2) \land (p2 \implies p1)
p1 \xor p2   \trarrow   \lnot (p1 \iff p2)
p1 ; p2   \trarrow   p1 \land p2
p1 NL p2   \trarrow   p1 \land p2
\exists1 ds | p1 @ p2   \trarrow   \exists ds | p1 @ (p2 \land (\forall ds+ | p1+ @ p2+ \implies charac ds = charac ds+))
e \in { }   \trarrow   false
e \in { e1, ..., en }   \trarrow   e = e1 \lor ... \lor e = en
e1 \in { s @ e2 }   \trarrow   \exists s @ e1 = e2
e1 \in \lambda t @ e2   \trarrow   \exists t @ e1 = (chartuple t, e2)
e1 \in \power e2   \trarrow   \forall z : e1 @ z \in e2
e \in ( e1 \cross ... \cross en )   \trarrow   e . 1 \in e1 \land ... \land e . n \in en
e1 \in e2   \trarrow   \exists e2 @ e1 = \theta e2 where e1 is of the type of a binding.
e = ( e1, ..., en )   \trarrow   e . 1 = e1 \land ... \land e . n = en
e = \lblot i1 == e1, ..., in = en \rblot   \trarrow   e . i1 = e1 \land ... \land e . in = en
e1 = e2   \trarrow   \forall s : \tau @ s \in e1 \iff s \in e2 where e1 and e2 are of set type.
e   \trarrow   \theta e \in e

Expressions

i   \trarrow   e1

where i is bound either to the abbreviation declaration i == e1 or to the generic abbreviation declaration i == e2 where e1 is the appropriate instantiation of e2.

i   \trarrow   [ ds | p ]

where i is bound to a schema definition paragraph.

i   \trarrow   (i . 1, ..., i . n)

where i is bound to a colon declaration of cartesian product type.

i   \trarrow   \lblot i1 == i . i1, ..., in == i . in \rblot

where i is bound to a colon declaration of schema type.

\theta e +   \trarrow   \lblot i1 == i1+, ..., in == in+ \rblot

where i1 ... in are the variables declared in schema e.

e1 e2   \trarrow   (\mu x : \tau | (e2, x) \in e1)

where e1 e2 is either a juxtaposed application or a function operator application.

2   \trarrow   1 + 1
3   \trarrow   2 + 1
4   \trarrow   3 + 1
5   \trarrow   4 + 1
6   \trarrow   5 + 1
7   \trarrow   6 + 1
8   \trarrow   7 + 1
9   \trarrow   8 + 1
bc   \trarrow   b + b + b + b + b + b + b + b + b + b + c

where bc is a number literal in which c is the last digit and b is the preceding digits.

e1 \cross ... \cross en   \trarrow   { i1 : e1; ...; in : en }
"c1...cn"   \trarrow   {(1,c1), ..., (n,cn)}
pre e   \trarrow   \exists nextstatevars; outputvars @ e
\post e   \trarrow   e
e1 \implies e2   \trarrow   \lnot e1 \lor e2
e1 \iff e2   \trarrow   (e1 \implies e2) \land (e2 \implies e1)
e1 \xor e2   \trarrow   \lnot (e1 \iff e2)
e1 \semi e2   \trarrow   (e1[common names renaming matching next state names] \land e2[common names renaming matching current state names])
e1 >> e2   \trarrow   (e1[common names renaming matching output and next state names] \land e2[common names renaming matching input and current state names])
e1 \project e2   \trarrow   \exists sig(e1) \ sig(e2) @ e1 \land e2
e1 \zovr e2   \trarrow   e1 \land \lnot pre e2 \lor e2
e \ (i1, ..., in)   \trarrow   \exists i1 : \tau i1; ...; in : \tau in @ e

Tactic example

"expansion" p e

This example applies the expansion command to predicate p and expression e.


IT 5-Apr-2000