Complete rewrite of inference script
Complete rewrite of inference script

This version takes a substantially different approach compared to the
earlier script.  As a result, all tests pass and the logic is organized
more consistently.  Some special cases are specified at the top.  Most
of the rules are specified with expand/3  Without having implemented a
completely equivalent version in Perl, it looks like the Prolog is quite
a bit shorter and easier to update with new rules.

mndrix/clk