I am learning Prolog and what i want is to do a simple "calculation"(i dont know how its called in Prolog) of the members of a simle family.
For example i have:
1)father of steve is petter
2)brother steve is john
3)A person is a son to a Father when the brother of the person has as father the Father
(it seems funny and completely out of logic when its out of my mind :) )
father(steve,petter).
brother(john,steve).
father(X,Y):-brother(X,Z),father(Z,Y)).
and my question is who is the father of john(the correct awnser would be petter)
?-father(john,X).
But it always giving me false.