Application of interactive commands during a proof division
bb(f)
with:
This command enables the application of a sequence of commands on all the branches of a part of the proof tree, when there is division of the proof. Thus the user does not need to enter and execute the same sequence of commands several times. If the command sequence does not succeed in proving one of the branches, the loop stops.
The bb command also applies when there is no proof division but the advantage of bb is in this case much reduced.
The presence of ll inside of the loop enables the application of interactive commands, when a proof branch cannot be automatically proved. In this case, the commands (d1 & d2 & ... & dm) will be tried. If the proof of the branch succeeds, we change branches and re-apply c1 & c2 & .. & cn. If the proof does not succeed, the following commands will be tried. This process is iterated until the proof of the branch succeeds or the commands z1 & z2 & ... & zp have been tried unsuccessfully.
Given the following proof obligation:
ENS = {e1, e2 e3, e4, e5} & ENS: FIN(NATURAL*{ENS.enum}) & not (ENS={}) & xx: ENS & not(xx = e5) => xx = e1 or xx = e2 or xx = e3 or xx = e4
|
We can perform one proof by cases:
dc(xx, ENS)
|
To avoid entering 5 times the pr command, we can enter:
bb(pr)
|
We then obtain the messages:
Starting Prover Call Starting Prover Call Starting Prover Call Starting Prover Call Starting Prover Call
|
and the proof obligation is demonstrated.
The Commands window (Executed / Next) now contains:
dc(xx,ENS) & fc(1) & pr & fc(1) & pr & fc(1) & pr & fc(1) & pr & fc(1) & pr & Next
|
Each fc(1) 3 indicates the start of the execution of the pr command (parameter of the loop command). The number (here 1) indicates the number of nested loops.
We find the 5 cases of the proof by cases (fc(1)).
Given the following proof obligation:
ENS = {e1, e2 e3, e4, e5} & ENS: FIN(NATURAL*{ENS.enum}) & not(ENS = {}) & xx: ENS & not(xx = e5) => xx = e1 or xx = e2 or xx = e3 or xx = e4
|
we can perform a proof by cases:
dc(xx, ENS)
|
If we execute the command:
bb(ch & bb(dd & bb(pr)))
|
we obtain:
Starting creating hyp Starting Deduction Starting Prover Call Starting creating hyp Starting Deduction Starting Prover Call Starting creating hyp Starting Deduction Starting Prover Call Starting creating hyp Starting Deduction Starting Prover Call Starting creating hyp Starting Deduction Starting Prover Call
|
and the proof obligation is demonstrated.
The Commands window (Executed / Next) now contains:
dc(xx,ENS) & fc(3) & ch & fc(2) & dd & fc(1) & pr & fc(3) & ch & fc(2) & dd & fc(1) & pr & fc(3) & ch & fc(2) & dd & fc(1) & pr & fc(3) & ch & fc(2) & dd & fc(1) & pr & fc(3) & ch & fc(2) & dd & fc(1) & pr & Next
|
Each fc() 4 indicates the start of the execution of a sequence of commands (parameter of the loop command). The number (1, 2 ou 3) indicates the number of nested loops.
We find the 5 cases of the proof by case (fc(3)).
After saving, the command line saved is:
dc(xx,ENS) & bb(ch & bb(dd & bb(pr & ll(?)) & ll(?)) & ll(?))
|
The command ll() has been added to the entries saved and contains any interactive commands added by the user, during the proof and inside the loops. In this case, no commands have been added and we thus obtain ll(?).
This command line can in fact be entered directly by the user: this leads to the same result. However, the command ll() must be at the end of the command line contained in bb().
For example, the following command is incorrect:
bb(ch & ll(dd) & pr)
|
and gives when executed:
Starting creating hyp Unknown command ll(dd) Starting Prover Call Starting creating hyp Unknown command ll(dd) Starting Prover Call Starting creating hyp Unknown command ll(dd) Starting Prover Call Starting creating hyp Unknown command ll(dd) Starting Prover Call Starting creating hyp Unknown command ll(dd) Starting Prover Call
|
However, the following command line is correct:
bb(ch & pr & ll(dd))
|
and gives when executed:
Starting creating hyp Starting Prover Call Starting creating hyp Starting Prover Call Starting creating hyp Starting Prover Call Starting creating hyp Starting Prover Call Starting creating hyp Starting Prover Call
|
We are aware that the dd command contained in ll has not been executed.