Calling the automatic prover
pr
pr(r.b.h,f,s)
pr(Tac(t),r.b.h,f,s)
pr(Tac(t))
pr(Red)
pr(Red,r.b.h,f,s)
with:
This command allows the use of the automatic prover, to prove the current proof obligation.
The pr command is also useful to start off again a proof which almost succeeded, but which stopped because the maximum number of tries has been reached. Effectively, the automatic prover has a certain number of counters which limit the number of applications of certain mechanisms in one call, so as to avoid loops. Launching pr several times in a row can therefore have an effect.
If a pr call has really not been effective, this is signalled by the message
In this case, it isn’t worthwhile re-launching it.
The commands pr(r.b.h,f,s) and pr(Tac(t),r.b.h,f,s) allow the launching of the prover in trace mode (see chapter 10 page §). The parameters f, s and Tac(t) are optional, but if one wishes to give s, then one needs to give f (the order of the parameters must be respected).
The following information are available:
The presence of the Tac(t) parameter allows the use of user rules(pmm (see chapter 6 page §), patchprover (see chapter 7 page §)) within the automatic prover. The user’s backward tactics can be applied once the local hypotheses have been raised in the stack, and before calling on the rules base. The forward tactics behave like the rules of a single theory. These rules are used with the prover’s forward rules. The user cannot use complex tactics with Forward rules.
For example, the following forward tactic is not valid:
If we use command pr(Tac(backward,forward)), the interactive prover will attempt to apply the rules of the backward tactic. If these rules generate hypotheses, the DED predefined theory must appear in the backward tactic. In that case, the rules of tactic forward will process the raising hypotheses.
In force 0 or 1, the pr(Red) command allows the use of the prover without starting proof by case. This use of the automatic prover is limited to:
As far as forces Fast, 2 and 3 are concerned, command pr(Red) behaves the same as pr and can probably attempt proofs by cases.
Given the following situation:
New Hypothesis since last command e1: ENS & 1: 1..5 & 1: 1..100 & 1: 1..10 & 0<=1 & 1: NATURAL & 1: INTEGER & 0<=zz & 0<=yy & 0<=xx & not(uu = e5) & not(1: NATURAL) => -1: NATURAL Goal not(uu = e1)
|
A first call to the automatic prover has not allowed the current goal to be discharged. The pr command is tried a second time, to see if the automatic prover has not failed in the proof, because of the limited number of applications of rules (internal prover counters, limiting the risk of loops (see chapter 2.9 page §)).
PRI> pr Starting Prover Call
|
The message Prover call did nothing indicates that the prover has not succeeded in a definite way, in proving the current goal, and that it has not produced another hypothesis.
Prover call did nothing Goal not(uu = e1)
|
Let us now observe the functioning of the Prover in Trace mode.
Let us consider the following situation:
Hypothesis xx: 1..10 & yy: 1..10 & zz: 1..100 Goal xx+yy-1: 1..100
|
The prover is started in trace mode; the rule bodies along with information relative to the hypotheses are not displayed, all the goals are listed.
PRI> pr(None.Goal.None) Starting Trace in mode None.Goal.None , NoFile Starting Prover Call After deduction, goal is now xx+yy-1: 1..100
|
The initial goal is decomposed into two sub-goals.
By applying atomic rule InSetXY.13, the goal xx+yy-1: 1..100 is now 1<=xx+yy-1 and xx+yy-1<=100 Goal 1<=xx+yy-1 is simplified in 0<= -2+xx+yy Because 0 is a lower bound of -2+xx+yy - 0 Goal 0<= -2+xx+yy is discharged.
|
The first sub-goal has been simplified then discharged. The second sub-goal can then be processed
As (xx,yy) ∈ (1..10) × (1..10), 101 - xx - yy is bounded by 81:
Goal xx+yy-1<=100 is simplified in 0<=101-xx-yy Because 81 is a lower bound of 101-xx-yy - 0 Goal 0<=101-xx-yy is discharged. End of trace
|
If the pr(Ru.Goal.None) command had been applied, the part of the trace concerning the InSetXY.13 rule, that is to say:
By applying atomic rule InSetXY.13,
|
would have been:
By applying atomic rule InSetXY.13, n<=a & a<=p => a: n..p
|
The following example shows the use of the Tac parameter, to use backward and forward tactics.
Let us consider the following proof obligation:
integers <: INTEGER & xx: INTEGER & xx-1: integers & => xx: integers
|
The associated file PMM contains the backward and forward theories:
THEORY backward IS xx-1: integers => xx: integers => p => p END & THEORY forward IS xx-1: integers => xx: integers END
|
The pr(Tac((backward;DED),forward)) command enables to discharge the current goal.