Alternative way (to that by
FoxtrotUniform) of structural induction for binary tress would be:
- to prove it for a tree build of only one node
- to prove it that if it is true for two binary trees than it is true for a tree build from those two trees connected with a node
The hard part is the 'if it is true ... then ...' - the induction step, I don't see how this can be achieved with random generated trees.