In the Current Goal(s) area enter
!btree:'a btree. Size btree > 0and select the Set Goal button. You may also press Ctrl-Return to set the goal when the keyboard focus is in the goal area. The goal should now be formatted in a pretty printed fashion.
The goal can be proved easily by structural induction on binary trees in simplification with the HOL arithmetic decision procedures. In the Next Tactic box enter
INDUCT_THEN btree_Induct STRIP_ASSUME_TACand press the Apply Tactic button. You may also press Ctrl-Return to apply a tactic, when the focus is in the Next Tactic area. Two subgoals should now be generated, and the first of these displayed.
To solve the first subgoal, simply apply the tactics
REWRITE_TAC [Size_DEF]and
CONV_TAC ARITH_CONV
Figure: The Second Case of the Induction
To solve the second subgoal we also need to expand the definition of Size. There is a history mechanism available in the Next Tactic window. Press Meta-P twice and
REWRITE_TAC [Size_DEF]should reappear. Again applying
CONV_TAC ARITH_CONVsolves the goal.
You will now be prompted with a box asking what you wish to do with the theorem you have just proved.
NOTE: The Goal Proof has several sophisticated features not explained in this tutorial. In due course a proper manual explaining things will appear. In the mean time just experiment.