bossLib.Induct : tactic
``!list. LENGTH (REVERSE list) = LENGTH list``one can begin the proof by doing an induction on the list, thus:
- Induct ([], ``!list. LENGTH (REVERSE list) = LENGTH list``); > val it = ([([], `LENGTH (REVERSE []) = LENGTH []`), ([`LENGTH (REVERSE list) = LENGTH list`], `!h. LENGTH (REVERSE (CONS h list)) = LENGTH (CONS h list)`)], fn) : goal list * validationwhere the two subgoals in the list above are the base case and step case respectively of the induction theorem for lists.
The same tactic can be used for induction over numbers, thus:
- Induct ([], ``!n. n > 2 ==>
!x y z. ~(x EXP n + y EXP n = z EXP n)``);
> val it =
([([], `0 > 2 ==> !x y z. ~(x EXP 0 + y EXP 0 = z EXP 0)`),
([`n > 2 ==> !x y z. ~(x EXP n + y EXP n = z EXP n)`],
`SUC n > 2 ==>
!x y z. ~(x EXP SUC n + y EXP SUC n = z EXP SUC n)`)],
fn)
: goal list * validation