siblings



Hi.

I wrote a siblings example:

father_child(tom, sally).
father_child(tom, john).
mother_child(merry, sally).

siblings(X,Y) :-
parent_child(Z,X),
parent_child(Z,Y),

parent_child(X,Y) :-
father_child(X,Y);
mother_child(X,Y).

and when I enter query:

siblings(X,Y).

I also get results:

X=sally
Y=sally

and

X=john
Y=john

How can I add to the siblings rule that
X cannot be equal to Y ?


.



Relevant Pages

  • Re: A double wedding
    ... children in the same house with the same surname are siblings. ... between Jenny and Andrew Nuttal. ... that John and Betty Barnes are also siblings. ...
    (soc.genealogy.britain)
  • Re: Second Eldest Child
    ... correct to say "Which eldest child of the family is John?" ... a response indicating his birth order. ... What was the order in which John and his siblings were born? ...
    (alt.usage.english)
  • Re: PNW gathering: thanks!`
    ... , John S., Phil, and Dave, for a great weekend. ...
    (rec.music.makers.guitar.acoustic)
  • Re: FOOB 4/19/07
    ... anyone else here with siblings? ... Anyone else here feeling Liz and ... April will be just the tiniest bit hard done by when John and Elly ...
    (rec.arts.comics.strips)
  • Re: PNW gathering: thanks!`
    ... , John S., Phil, and Dave, for a great weekend. ... your lovely children, siblings, and spouses: ...
    (rec.music.makers.guitar.acoustic)