我被告知要创建一个兄弟谓词来确定兄弟是否有兄弟姐妹。Brother(B, S) :-
. 我知道您需要确定他们是否有相同的父母,但我不知道该怎么做。
father(dan,phil).
father(dan,jack).
father(dan,christine).
father(phil,kenton).
father(phil,shula).
father(phil,david).
father(phil,elizabeth).
father(jack,lillian).
father(jack,tony).
father(jack,jenny).
father(tony,tommy).
father(tony,helen).
father(tony,john).
father(roger,adam).
father(roger,debbie).
father(brian,kate).
father(david,pip).
father(david,josh).
father(mark,daniel).
mother(doris,phil).
mother(doris,jack).
mother(doris,christine).
mother(jill,kenton).
mother(jill,shula).
mother(jill,david).
mother(jill,elizabeth).
mother(peggy,lillian).
mother(peggy,tony).
mother(peggy,jenny).
mother(pat,tommy).
mother(pat,helen).
mother(pat,john).
mother(jenny,adam).
mother(jenny,debbie).
mother(jenny,kate).
mother(ruth,pip).
mother(ruth,josh).
mother(shula,daniel).
male(dan).
male(phil).
male(jack).
male(kenton).
male(david).
male(tony).
male(brian).
male(roger).
male(mark).
male(john).
male(tommy).
male(adam).
male(daniel).
male(josh).
female(doris).
female(jill).
female(peggy).
female(christine).
female(shula).
female(ruth).
female(elizabeth).
female(lillian).
female(pat).
female(jenny).
female(helen).
female(debbie).
female(kate).
female(pip).
dead(dan).
dead(doris).
dead(jack).
dead(mark).
dead(john).
dead(fred).
parent(X,Y) :-
father(X,Y); mother(X,Y).
grandfather(X,Y) :-
father(X,Z), mother(Z,Y).
grandfather(X,Y) :-
father(X,Z), father(Z,Y).
ancestor(X,Y) :- parent(X,Y).
ancestor(X,Y) :- parent(X,Z), ancestor(Z,Y).
archer(dan).
archer(X) :- father(P,X), archer(P).
这是我拥有的定义父母、祖父等的文档。我需要创建一个兄弟谓词,它作为兄弟(B 是兄弟,S 是兄弟姐妹)。例如兄弟(利亚姆,乔治亚州)。利亚姆是乔治亚的兄弟应该是真的