On Sun, Jul 03, 2005 at 10:24:50PM +0900, Pit Capitain wrote:
> Ruby Quiz schrieb:
> >This week's Ruby Quiz is to build an inference engine that is capable of
> >answering questions based on the provided truths.
> >
> >...
> 
> Just out of curiosity, after entering
> 
>   > All Foos are Bars
>   OK.
> 
> what should be the response to
> 
>   > No Foos are Bars
> 
> If the answer is "OK." it would mean that the set of "Foos" is empty, 
> because no Foo can be a Bar and not be a Bar. Questions like
> 
>   > Are all Foos <whatever>?
> 
> should then be answered with Yes.
> 
> The other alternative would be to assume that when speaking of "Foos" 
> the set of "Foos" isn't empty and there exists at least one Foo?

I'd go with this last interpretation. I'm assuming the input is not
talking about abstract concepts, but about sets of "real, existing" things.

In the same vein:

    > All dogs are mammals.
    > All mammals are dogs.

Could be taken to mean that the set of dogs and the set of mammals are
equivalent (so, basically dogs == mammals) OR it could be taken to be
contradictory, if we assume a maximum amount of information conveyed by
the input (i.e. if all dogs are mammals then mammals is a larger set 
than dogs and there are other mammals that are not dogs)

Going for the latter interpretation will probably simplify some inferences.

Joost.