name = 'aunt/2' slug = 'the aunt relation' description = '''\
aunt(X, Y)
: X
is an aunt of Y
.
?- aunt(sally, X). X = vanessa ; X = patricia.
Family trees are
described with predicates parent/2
, male/1
, and
female/1
.
Perhaps you can make use of the solution to one of the previous exercises?
''', '''\If X
is a sister of the parent of Y
,
then X
is the aunt of Y
.
X
should be the aunt of Y
, not the other way around.
Did you mix up the precedence of operators or & and?
Operator and has higher precedence than operator or. If you wish to change that you can use brackets (as usual in mathematics).
''', 'x_must_have_sibling': '''\An aunt usually has a sibling...
''', 'x_must_be_female': '''\An aunt is usually female.
''', # TODO: Loni should mark female gender on some aunt hints! 'y_must_have_parent': '''\It would probably make sense if the nephew has a parent, right?
''', 'aunt_vs_mother': '''\How can an aunt also be the mother of Y
?
Did you forget to specify that an aunt and the parent of Y
cannot be the same person?
X
doesn't need to have children to be somebody's aunt...
A nephew Y
doesn't need to have children...
A parent of nephew Y
can also be male
(which means that this parent cannot be a sister of X
).
It seems your predicate is always "false". Did you give it the correct name, or is it perhaps misspelled?
If the name is correct, check whether something else is misspelled, perhaps there is a full stop instead of a comma or vice versa, or maybe you typed a variable name in lowercase?
It is, of course, also possible that your conditions are too restrictive, or even impossible to satisfy
(as would be, for example, the condition that X
is both a parent and a sister of Y
, or
something similarly impossible).
Interesting tidbit. This exercise could also be solved using the solution to the sister/2
relation. An aunt is a sister of some parent of Y
.