Reference manual / Z-related commands / In situ replacement commands / quantify by unification

The quantify by unification command performs reasoning analogous to the quantification tac built-in tactic, except that the values for the quantified declarations are supplied not explicitly but instead are determined by unification of two expressions. It should be applied to the two expressions to be unified. Both expressions must be within antecedent or consequent predicates of a goal. At least one of the expressions should be within a quantified predicate. Those quantified predicates should be entire antecedents or consequents, or else should be indicated by selection immediately after selecting the corresponding expression. They cannot be the same quantified predicate. The declarations of those quantified predicates are the jokers for the unification. If the two expressions are unifiable, a most general unifier is calculated and used to perform quantifications on the quantified predicates.

For example, if x + 0 and succ 0 + 0 are selected...

| \forall x : \nat @ x + 0 = x \vdash? succ 0 + 0 = succ 0   \trarrow   (\forall x : \nat @ x + 0 = x) \land (\forall x : \nat | x = succ 0 @ x + 0 = x) \vdash? succ 0 + 0 = succ 0

When both predicates are quantified and the expression found to match a declaration refers to out-of-scope jokers of the other predicate, universal quantifications of those jokers are introduced (the references are moved outside the scope of the jokers' original declarations).

| \forall a : \nat @ a = 0 \vdash? \exists b : \nat @ 2*b = 0   \trarrow   (\forall a : \nat @ a = 0) \land (\forall b : \nat @ \forall a : \nat | a = 2*b @ a = 0) \vdash? \exists b : \nat @ 2*b = 0

These additional quantified declarations are like those of the jokers, i.e. they are not necessarily in terms of carrier sets, but can include implicit constraints. If those constraints refer to other declarations that are similarly out-of-scope, then those are quantified similarly, etc.

In some cases, there isn't a unique most general unifier, but several possibilities. One of these is calculated and used. Selecting the two arguments in reverse may result in a different most general unifier, and hence a different quantification being performed.

Tactic example

"quantify by unification" e1 e2

This example applies the quantify by unification rule to the expressions e1 and e2.

IT 28-Dec-2005