Now we prove equation A.1 in Igloo. Before getting started on the proof, a small amount of housekeeping needs to be performed: connect to the Isabelle Server, and select the theories to work with.
For the moment, this window is largely unused, except to connect to
the Isabelle Server (figure A.2), start
a new theory, or quit Igloo.
|
To connect to the Isabelle Server, the user
selects Connect from the
Proof Engine menu.
|
Once the connection is successful, the user is notified via the
status bar.
|
Next, the user can define new theories. To get started, they
select New Theory from the
Theory menu.
|
To specify a theorem to be proven, Isabelle
requires a name and a list of theories to extend.
|
Most proofs can make good use of previously proven theorems.
In order to do this, we tell Isabelle which
theories our new theory should inherit. This requires that the
user have some knowledge
of Isabelle's theories. This is a restriction
due to the current implementation of PGIP. For
proposed amendments that would remove these limitations,
see §5.1.
|
To begin proving a theorem, the user selects
New Theorem from the Theory menu.
|
To begin proving a theorem, Isabelle requires a
name and a specification (we have chosen ``sum of naturals''),
figure A.10 shows the specification.
|
Note that
the user is currently expected to know how to specify theorems in
Isabelle. This indicates a weak point of the
current PGIP interface.
|
The result from defining the name and specification of the theorem,
is a proof state, which Isabelle calls
Step 0.
|
By expanding the node for the proof state, the user is
able to see the current subgoals that need to be proven.
Since this is the initial proof state, the goal that needs to
be proven is the theorem itself.
|
As in the human-written proof, we decide to apply mathematical
induction, and split the proof into a base case and an inductive
case. To do this, the user right-clicks on the
subgoal they wish
to induct on, and selects induct from the
apply tactic submenu. The tactics that are
available are currently hard coded into Igloo,
this is another feature that PGIP could provide.
|
By expanding the proof state, we can see the two subgoals.
The first subgoal is the base case, the second is the inductive case.
|
Again, as in the human-written proof, we attempt to prove the
base case of the induction, this time by the simp
tactic, which rewrites subterms in the hope of making the term
simpler.
|
Since the previous proof state is the only one we are interested
in, we can close the initial proof state.
|
Expanding the most recent proof state, we can see that the base
case has been proven, and we are only left with the inductive case
to prove.
|
Next, we attempt to prove the inductive case by simplification.
|
The next proof state is expanded to reveal no subgoals.
This means the proof is now complete.
|
|
|
|