Search rule
sr(T,CO,AN)
sr(T,CO)
sr
with:
The keywords are the following:
This command allows to search one or several rules in the group of rules used by the prover.
CO and AN are lists of formulae and translate the criteria that the selected rules have to verify.
CO identifies the constraints related to the consequent of the rules and AN those related to the antecedent.
The search criteria which may concern the antecedent and/or the consequent of a rule, are of two types:
If the selection only concerns the consequent of the rule, AN can be omitted.
If the user is only searching for the rules applying to the current proof obligation, he just keys in sr, and the choice will be made among the rules selected by the keywords Back and Rewr (sr is equivalent to sr(All, Goal)).
The criteria C, D, A and B can be omitted. If the criteria A or B are present, the criteria C et D must also be present (the order of parameters is important). In this case, the user will use abs(No),No for C, D so as to show that no criteria applies to the consequent. The command will be sr(T, abs(No), No, abs(A), B).
Generally, the formulae keyed in are made of expressions separated by special operators __and, _or and __not. The parameter of _not should not be put between brackets.
So as to be selected, a rule must contain the expressions which are concerned according to the
indications given by these operators. For example, the following formula allows to select the
rules whose consequent is of the form a=b (absolute constraint), which contains overloadings,
unions but not sets in comprehension:
abs(a = b),((a < +b) __and (a ∪ b) __and (__not({x|Q})))
Keywords __and and __or are forbidden inside a __not where their use would be superfluous. In fact, __not(X __and Y) is equivalent to __not(X) __or _not(Y).
By default, sr is equivalent to sr(Rewr.Back,Goal).
PRI> sr Searching rules matching with goal in : Rewr.Back
|
Let us search in the theories SimplifyX and DifferenceX the rules whose consequent matches with the current goal.
PRI> sr(SimplifyX.DifferenceXY, Goal) Searching rules matching with goal in : SimplifyX.DifferenceXY
|
Finally, it is possible to select the rules according to the general form and the expressions appearing in the consequents and antecedents.
We are searching for all the rules whose consequent is of the form a = b and which contain at least one of the formula of the form ¬(c):
PRI> sr(All, abs(a=b), not(c)) Searching in All rules with filter consequent should contain not(c) consequent should match with a = b
|
We are looking for rules whose consequent is a = b and which contain at least one formula of the form ¬(c), and whose antecedent is a ≥ b:
PRI> sr(All, abs(a =b), not(c), abs(a>=b)) Searching in All rules with filter consequent should contain not(c) consequent should match with a = b antecedent should match with a >= b
|
We are looking for the rules which have an antecedent of the form a ≥ b:
PRI> sr(All, abs(No), No, abs(a>=b)) Searching in All rules with filter antecedent should match with a >= b
|
We are looking for rules which have the form a ≥ b as a consequent:
PRI> sr(All, No, abs(a>=b)) Searching in All rules with filter consequent should match with a >= b
|
We are looking for rules that have one of their antecedents including at least one formula ¬(a - b):
PRI> sr(Goal.Rewr, abs(No), No, abs(No), not(a-b)) Searching in Goal.Rewr rules with filter antecedent should contain not(a-b)
|