Binary tree height predicate?

Quote:

>How do you make a predicate that counts the height of a binary tree?

>(Edinburgh syntax)

Well, the height of an empty tree is 0, and the height of a

non-empty tree is 1 plus the max of the heights of the two sub-trees.

This definition should imply a simple recursive predicate with

two clauses which is just a translation of that definition into

predicate logic.

Thomas

--

ZZ:wq!

^X^C

AD DEUM ET VINUM Every sword has two edges.