
%                        The Animals
%
%     (1)  The only animals in this house are cats.
%     (2)  Every animal is suitable for a pet, that loves  to
%          gaze at the moon.
%     (3)  When I detest an animal, I avoid it.
%     (4)  No animals are carnivorous, unless they  prowl  at
%          night.
%     (5)  No cat fails to kill mice.
%     (6)  No animals ever take to me,  except  what  are  in
%          this house.
%     (7)  Kangaroos are not suitable for pets.
%     (8)  None but carnivora kill mice.
%     (9)  I detest animals that do not take to me.
%     (10) Animals that prowl at night always love to gaze at
%          the moon.
%     The problem is to prove that "I  always  avoid  a  kangaroo".
%                                        Lewis Carroll
%

predicates([inhouse, cat, gazer, suitablepet, detested, avoided,
	    carnivore, prowler, mousekiller, takestome, kangaroo]).


axiom( [ [inhouse(X)],			[cat(X)] ] ).
axiom( [ [gazer(X)],			[suitablepet(X)] ] ).
axiom( [ [detested(X)], 		[avoided(X)] ] ). 
axiom( [ [carnivore(X)], 		[prowler(X)] ] ).
axiom( [ [cat(X)], 			[mousekiller(X)] ] ).
axiom( [ [takestome(X)], 		[inhouse(X)] ] ).
axiom( [ [kangaroo(X), suitablepet(X)], [] ] ). 
axiom( [ [mousekiller(X)], 		[carnivore(X)] ] ).
axiom( [ [], 				[takestome(X), detested(X)] ] ).
axiom( [ [prowler(X)], 			[gazer(X)] ] ). 


axiom( [ [], 				[kangaroo(a)] ] ).
axiom( [ [avoided(a)], 			[] ] ).
 

precedence( [a] ).

first_predicate_precedence([inhouse, cat, gazer, suitablepet, detested, avoided,carnivore, prowler, mousekiller, takestome, kangaroo]).



/*
-INHOUSE(x1) | CAT(x1).
-GAZER(x1) | SUITABLEPET(x1).
-DETESTED(x1) | AVOIDED(x1). 
-CARNIVORE(x1) | PROWLER(x1).
-CAT(x1) | MOUSEKILLER(x1).
-TAKESTOME(x1) | INHOUSE(x1).
-KANGAROO(x1) | -SUITABLEPET(x1). 
-MOUSEKILLER(x1) | CARNIVORE(x1).
TAKESTOME(x1) | DETESTED(x1).
-PROWLER(x1) | GAZER(x1). 


KANGAROO(f1).
-AVOIDED(f1).
*/

