let say
bigger(elephant,buffalo).
bigger(buffalo,dog).
bigger(dog,cat).
bigger(X,Y) :-
what do i write here to establish, elephant is bigger than buffalo, buffalo is bigger than dog etc?
let say
bigger(elephant,buffalo).
bigger(buffalo,dog).
bigger(dog,cat).
bigger(X,Y) :-
what do i write here to establish, elephant is bigger than buffalo, buffalo is bigger than dog etc?
First, you should separate the "bigger" facts from the "bigger_transitive" relation. (There are ways of avoiding this, but things are easier if you do this.)
Second, what is the definition of "bigger_transitive" in words? Here's a schema:
Now, generalize rule #2:
And generalize it more:
And generalize it fully:
Then, translate this "English" into Prolog.