There are two categories of distributions: elementary ones that are built-in to cadiz, and ones that are coded explicitly as Z rewrite rules. An example of the latter is as follows.
[X] ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
The form of a rewrite rule must be as specified in rewrite by rule, and moreover its name must have distribution as a sub-string. The effect of a rewrite rule is also explained in rewrite by rule.
The built-in elementary distributions spread out, or distribute, the selected formula into the immediate parent formula of which it is a part. These distributions behave as in situ replacements of the parents. In each of the distribution rules, the left-hand side depicts the parent formula, with the inspected formula shown parenthesized. Only one distribution can be performed at once. They take precedence over any matching explicit rewrite rule. In each of the following subsections, the earliest applicable distribution in the list is the one that is applied.
p1 ![]() ![]() | ![]() | (p1 ![]() ![]() |
(p1 ![]() ![]() | ![]() | p1 ![]() ![]() |
p1 ![]() ![]() | ![]() | (p1 ![]() ![]() ![]() |
(p1 ![]() ![]() | ![]() | (p1 ![]() ![]() ![]() |
p1 ![]() ![]() | ![]() | ![]() ![]() |
(![]() ![]() | ![]() | ![]() ![]() |
p1 ![]() ![]() | ![]() | (p1 ![]() ![]() ![]() |
(p1 ![]() ![]() | ![]() | (p3 ![]() ![]() ![]() |
p1 ![]() ![]() | ![]() | p1 ![]() ![]() ![]() |
(p1 ![]() ![]() | ![]() | p3 ![]() ![]() ![]() |
p1 ![]() ![]() ![]() | ![]() | ![]() ![]() ![]() |
(![]() ![]() ![]() | ![]() | ![]() ![]() ![]() |
p1 ![]() ![]() ![]() | ![]() | ![]() ![]() ![]() |
(![]() ![]() ![]() | ![]() | ![]() ![]() ![]() |
p1 ![]() ![]() | ![]() | (p1 ![]() ![]() ![]() |
(p1 ![]() ![]() | ![]() | (p1 ![]() ![]() ![]() |
p1 ![]() ![]() | ![]() | (p1 ![]() ![]() |
(p1 ![]() ![]() | ![]() | p1 ![]() ![]() |
p1 ![]() ![]() | ![]() | p2 ![]() |
(![]() ![]() | ![]() | p1 ![]() |
p1 ![]() ![]() | ![]() | p2 ![]() ![]() |
(p1 ![]() ![]() | ![]() | p1 ![]() ![]() |
p1 ![]() ![]() | ![]() | p2 ![]() ![]() ![]() |
(p1 ![]() ![]() | ![]() | p1 ![]() ![]() ![]() |
p1 ![]() ![]() ![]() | ![]() | ![]() ![]() ![]() |
(![]() ![]() ![]() | ![]() | ![]() ![]() ![]() |
![]() ![]() | ![]() | ![]() ![]() ![]() |
![]() ![]() | ![]() | ![]() ![]() ![]() |
![]() ![]() | ![]() | p1 ![]() ![]() |
![]() ![]() | ![]() | ![]() ![]() |
p1 ![]() ![]() | ![]() | (p1 ![]() ![]() ![]() |
(p1 ![]() ![]() | ![]() | p1 ![]() ![]() |
p1 ![]() ![]() | ![]() | (p1 ![]() ![]() |
(p1 ![]() ![]() | ![]() | (p1 ![]() ![]() ![]() |
p1 ![]() ![]() | ![]() | ![]() ![]() |
(![]() ![]() | ![]() | p1 ![]() |
p1 ![]() ![]() | ![]() | (p1 ![]() ![]() |
(p1 ![]() ![]() | ![]() | (p1 ![]() ![]() ![]() |
p1 ![]() ![]() | ![]() | (p1 ![]() ![]() ![]() |
(p1 ![]() ![]() | ![]() | (p1 ![]() ![]() ![]() |
p1 ![]() ![]() ![]() | ![]() | ![]() ![]() ![]() |
(![]() ![]() ![]() | ![]() | ![]() ![]() ![]() |
p1 ![]() ![]() | ![]() | ![]() ![]() |
(![]() ![]() | ![]() | ![]() ![]() |
p1 ![]() ![]() | ![]() | (p1 ![]() ![]() |
(p1 ![]() ![]() | ![]() | p1 ![]() ![]() |
![]() ![]() ![]() | ![]() | (![]() ![]() ![]() ![]() ![]() |
![]() ![]() ![]() | ![]() | (![]() ![]() ![]() ![]() ![]() |
![]() ![]() ![]() | ![]() | (![]() ![]() ![]() ![]() ![]() |
![]() ![]() ![]() | ![]() | (![]() ![]() ![]() ![]() ![]() |
See also separation.
![]() ![]() ![]() | ![]() | (![]() ![]() ![]() ![]() ![]() |
![]() ![]() ![]() | ![]() | (![]() ![]() ![]() ![]() ![]() |
![]() ![]() ![]() | ![]() | (![]() ![]() ![]() ![]() ![]() |
![]() ![]() ![]() | ![]() | (![]() ![]() ![]() ![]() ![]() |
See also separation.
![]() ![]() ![]() | ![]() | (![]() ![]() ![]() ![]() ![]() |
![]() ![]() ![]() | ![]() | (![]() ![]() ![]() ![]() ![]() |
![]() ![]() ![]() | ![]() | (![]() ![]() ![]() ![]() ![]() |
See also separation.
relop (..., (if p then e1 else e2), ... ) | ![]() | (p ![]() ![]() ![]() ![]() |
relop (..., (![]() ![]() | ![]() | ![]() ![]() |
e1 ![]() ![]() ![]() | ![]() | e1 ![]() ![]() ![]() ![]() ![]() |
e1 ![]() ![]() ![]() ![]() | ![]() | e1 ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
e ![]() ![]() | ![]() | e ![]() ![]() ![]() |
e ![]() ![]() | ![]() | e ![]() ![]() ![]() |
e ![]() ![]() | ![]() | e ![]() ![]() ![]() |
e ![]() ![]() | ![]() | e ![]() ![]() ![]() |
e ![]() ![]() | ![]() | ![]() ![]() |
[ds | (p1 ![]() | ![]() | [ds | p1] ![]() |
[ds | (p1 ![]() | ![]() | [ds | p1] ![]() |
[ds | (p1 ![]() | ![]() | [ds | p1] ![]() |
[ds | (p1 ![]() | ![]() | [ds | p1] ![]() |
[ds | (![]() | ![]() | ![]() |
(![]() ![]() | ![]() | ![]() ![]() |
([ d1; ...; dn | p ]) + | ![]() | [ d1+; ...; dn+ | p + ] |
(![]() | ![]() | ![]() |
(e1 ![]() | ![]() | (e1 +) ![]() |
(e1 ![]() | ![]() | (e1 +) ![]() |
(e1 ![]() | ![]() | (e1 +) ![]() |
(e1 ![]() | ![]() | (e1 +) ![]() |
(e1 ![]() | ![]() | (e1 +) ![]() |
([ d1; ...; dn | p ]) [..., jk/ik, ...] | ![]() | [ d1[..., jk/ik, ...]; ...; dn[..., jk/ik, ...] | p [..., jk/ik, ...] ] |
(![]() | ![]() | ![]() |
(e1 ![]() | ![]() | (e1 [..., jk/ik, ...]) ![]() |
(e1 ![]() | ![]() | (e1 [..., jk/ik, ...]) ![]() |
(e1 ![]() | ![]() | (e1 [..., jk/ik, ...]) ![]() |
(e1 ![]() | ![]() | (e1 [..., jk/ik, ...]) ![]() |
(e1 ![]() | ![]() | (e1 [..., jk/ik, ...]) ![]() |
pre (e1 ![]() | ![]() | pre e1 ![]() |
![]() ![]() | ![]() | [ds2 \ ds1 | ![]() ![]() |
![]() ![]() | ![]() | [ds2 \ ds1 | ![]() ![]() |
![]() ![]() | ![]() | [ds2 \ ds1 | ![]() ![]() |
where there are no schema inclusions in ds1 or ds2.
...; ([ds | p1]); ... | p2 | ![]() | ...; ds; ... | p1 ![]() |
where the selection is a schema inclusion declaration, and the schema text is not immediately within a lambda expression.
...; ([ds | p]); ... | ps ![]() | ![]() | ...; ds; ... | p, ps ![]() |
where the selection is a schema inclusion declaration.
"distribution" p
This example applies the distribution command to predicate p.
Any jokers bound to the selected formula are rebound to the whole result, where those are both of the same syntactic category.