Introduction to
Logic Programming
What
versus
How
 

Exercise 9.3 - Same Height


Two blocks are at the same height if and only if they are resting on the same number of blocks. Define the sameheight relation in terms of block and on in such a way that it works no matter how many blocks there are in the Blocks World.