Re: where do I think wrong
Roelof Wobben <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
> Date: Fri, 14 Mar 2014 12:03:03 +0100 > From: [email protected] > To: [email protected] > Subject: Re: [SWIPL] where do I think wrong > > On 14-03-14 07:54, Roelof Wobben wrote: > >> half_or_full_siblings(X, Y) :- > >> > ( same_father(X, Y), > >> > X \== Y > >> > ; same_mother(X, Y), > >> > \+ same_father(X, Y) > >> > ). > > > > Oke, I think this is what im searching for. > > One rule for full and half siblings. > > > > But I do not understand why "is not equal" is used. > > Because you don't usually want to say that a person is his or her own > sibling. No, that was is this one: X /== Y. Im talking about this one : ; same_mother(X, Y), <- have the same mother and \+ same_father(X, Y) <- is not equal to the same father. ). What if father is divorced and marry another female. Then the father is the same but the mother not. Roelof -------------- next part -------------- HTML attachment scrubbed and removed