We have converted the Simpsons-Bouvier family tree into prolog relations. Now we will use these to define more complicated relations.
Implement following relations:
is_mother(X)
: X
is a motheris_father(X)
: X
is a fatheris_son(X)
: X
is a sonsister_of(X,Y)
: X
is a sister of Y
grandpa_of(X,Y)
: X
is a grandfather Y
sibling(X,Y)
: X
is a sibling of Y
You may use the relations father(Father,Child)
and mother(Mother,Child)
, male(X)
and female(X)
.