The absorption command performs simplifications that
typically remove parts of formulae or at least make them smaller.
There are two categories of absorptions:
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.
The form of a rewrite rule must be as specified
in rewrite by rule,
and moreover its name must have absorption as a sub-string.
The effect of a rewrite rule is also explained
in rewrite by rule.
The built-in elementary absorptions are as follows.
They take precedence over any matching explicit rewrite rule.
In each of the following subsections,
the earliest applicable elementary simplification
in the list is the one that is applied.
Contents of this page
Predicates
Negations
false | | true |
true | | false |
p | | p |
Conjunctions
p false | | false |
false p | | false |
p p | | false |
p p | | false |
p true | | p |
true p | | p |
p p | | p |
p NL false | | false |
false NL p | | false |
p NL p | | false |
p NL p | | false |
p NL true | | p |
true NL p | | p |
p NL p | | p |
Disjunctions
p true | | true |
true p | | true |
p p | | true |
p p | | true |
p false | | p |
false p | | p |
p p | | p |
Implications
false p | | true |
p true | | true |
p p | | true |
true p | | p |
p p | | p |
p false | | p |
p p | | p |
Equivalences
p p | | true |
p p | | false |
p p | | false |
true p | | p |
p true | | p |
false p | | p |
p false | | p |
Universal quantifications
ds | false p | | true |
s true | | true |
ds | p p | | true |
| true p | | p |
| p1 p2 | | p1 p2 |
ds1 ds2 | p1 p2 | | ds1; ds2 | p1 p2 |
where the last rule is applicable only if
no name is declared in both ds1 and ds2, and
there are no references to ds1 from ds2.
Existential quantifications
ds | false p | | false |
s false | | false |
| true p | | p |
ds | p p | | ds p |
| p1 p2 | | p1 p2 |
ds1 ds2 | p1 p2 | | ds1; ds2 | p1 p2 |
where the last rule is applicable only if
no name is declared in both ds1 and ds2, and
there are no references to ds1 from ds2.
Unique existential quantifications
1 ds | false p | | false |
1 s false | | false |
1 | true p | | p |
1 ds | p p | | 1 ds p |
1 | p1 p2 | | p1 p2 |
Relations
e = e | | true |
e1 = e2 | | false where e1 and e2 are distinct literals. |
e1 e2 | | true where e2 denotes the carrier set of the non-empty type of e1. |
i e | | true where i's declaration is of the form i : e. |
i e2 | | true where i's declaration is of the form i : e and e2 is the carrier set of e. |
i . b eb | | true where i's declaration is of the form i : e1 ... eb ... en. |
i . b eb2 | | true where i's declaration is of the form i : e1 ... eb ... en and eb2 is the carrier set of eb. |
e1 . i e | | true where i's declaration in the signature of e1 is of the form i : e. |
e1 . i e2 | | true where i's declaration in the signature of e1 is of the form i : e and e2 is the carrier set of e. |
Literals are numbers, strings, or extensions (sets, tuples, bindings)
containing nothing but literals.
A type is non-empty in the following circumstances.
The given type
is known to be non-empty
(this follows from the prelude),
and free types that contain at least one element (nullary constructor)
are known to be non-empty,
but other given types cannot be assumed to be non-empty.
Powerset types are known to be non-empty.
Cartesian product and schema types are non-empty if all of their components are non-empty.
Generic types cannot be assumed to be non-empty.
So a type could be empty if it uses
any empty given or generic types
other than within powerset types.
Schema predicates
e | | true |
where e is a schema predicate,
and there is an inclusion declaration e in scope,
and the environment of the schema predicate
is given entirely by that declaration.
Expressions
{ ds | false e } | | { } |
{ | true e } | | { e } |
ds | false e | | { } |
| true e | | e |
let | true e | | e |
i1 == e1, ..., in == en . ik | | ek |
( e1, ..., en ) . b | | eb |
if true then e1 else e2 | | e1 |
if false then e1 else e2 | | e2 |
if p then e else e | | e |
{ ds } | | [ ds ] |
[ ds | false ] | | { } |
Tactic example
"absorption" e p
This example applies the absorption command
to expression e and predicate p.
IT 29-Nov-2001