Loading user rules (Pmm)
pc
This command allows the loading and compilation of manual rules.
So as to be able to treat the most difficult proof cases, manual rules can be written in the .pmm file (proof methods manual) (see chapter 6 page §), which is created by the user and has the name of the current component as a prefix.
This file should contain a group of valid theories, separated by &, written in the logic solver language. The use of these rules should remain marginal. In fact, these rules can be erroneous and cause the prover to prove false proof obligations.
When the interactive prover is launched, the pmm component file, if it exists, is automatically loaded into memory.
If the pmm file is modified by the user during the interactive proof, and if the latter wishes to use the latest pmm file rules, the pc command will allow the user to load the pmm file rules into memory.
While the pmm file is being loaded, the prover displays an acceptation or file error message.
Beware!
Whereas all the other functions of the interactive prover have been totally protected, this
possibility of using manually written rules is not.
It is possible to key in a false rule, leading to false demonstrations. If no manual rule of this type has been used, the proof, whichever interactive commands have been used, is valid because the prover mechanisms themselves (automatic + interactive) are all valid.
However if manual rules have been added, then it will be necessary to check the validity of these rules. The use of a rules demonstrator can be recommended for this task; but it is clear that the interactive prover has been constructed so as to avoid the use of these manual rules.
Given the following situation:
Hypothesis xx: 1..10 & yy: 1..10 & zz: 1..109 Goal (xx+1)*yy-1: 1..109
|
The user launches the prover
PRI> pr Starting Prover Call
|
The goal (xx + 1) * yy - 1 : 1..109 is broken down into two sub-goals 1 ≤ (xx + 1) * yy - 1 and (xx + 1) * yy - 1 ≤ 109. The first sub-goal is treated first.
The automatic prover stops because it can’t solve the inequality 0 <= -2 + yy + xx * yy.
New Hypothesis since last command 2: 1..109 & 2: 1..10 & 0<=2 & 2: NATURAL & 2: INTEGER & 0<=0 & 0: NATURAL & 0: INTEGER Goal 0<= -2+yy+xx*yy
|
So the user decides to introduce a new rule, via the pmm file, and to use it in its proof.
So the test.pmm test file contains:
THEORY test IS binhyp(a: 1..10) & binhyp(b: 1..10) => 0<= -2+a+b*a END
|
The rule is first loaded, then compiled.
PRI> pc Loading theory test
|
In order to discharge the sub-goal 0 <= -2 + yy + xx * yy, the rule of the test theory is applied.
PRI> ar(test.1,Once) Starting Apply Rule
|
The first sub-goal is discharged and the automatic prover now tries to prove the second sub-goal:
Hypothesis xx: 1..10 & yy: 1..10 & zz: 1..109 Goal (xx+1)*yy-1<=109
|
The second sub-goal is now to be proved, but is not proved by the means of the pr command. So the user adds the rule allowing to discharge this goal. Eventually, the pmm test. file contains:
THEORY test IS binhyp(a: 1..10) & binhyp(b: 1..10) => 0<= -2+a+b*a; binhyp(a: 1..10) & binhyp(b: 1..10) => (a+1)*b-1<=109 END
|
Since the pmm file has been modified, it has to be reloaded into memory. The previously loaded rules are replaced by the new ones.
PRI> pc Loading theory test
|
So as to discharge the sub-goal (a + 1) * b - 1 <= 109, rule number two of the test theory is applied.
PRI> ar(test.2,Once) Starting Apply Rule
|
The proof obligation is therefore proved.