in reply to Re^2: Theorem proving and Unit testing
in thread Theorem proving and Unit testing
Structural induction is not only possible, but fun and easy (well, possibly for grad-student values thereof). What you want to do is remember that induction consists of a base and a recursive case -- for mathematical induction, this comes from the fact that every natural number but zero is the successor of another nat.
For a binary tree, you'd prove theorems inductively by proving them on leaf nodes, then proving that if both of an interior node's children satisfy the theorem, the interior node must as well. (It's a bit more difficult with lazy languages, but that's not your problem here.)
Nice job on the root node, btw.
--
F
o
x
t
r
o
t
U
n
i
f
o
r
m
Found a typo in this node? /msg me
% man 3 strfry
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Theorem proving and Unit testing
by stvn (Monsignor) on Aug 25, 2004 at 22:33 UTC |