title: How to find Nephew in Prolog Family Code?
body: <p>I'm trying to get Prolog to output people in the family trees nephew, as in <code>nephew(X,Y)</code> will list </p>
  
  <pre><code>X = the nephew
  Y = Aunt/ Uncle
  </code></pre>
  
  <p>I've tried writing some of the code already, I'm pretty confident the son command works, and I believe sibling works, however combining these is proving, difficult.</p>
  
  <pre><code>parent(pam,bob).
  parent(john,bob).
  parent(john,liz).
  parent(bob,ann).
  parent(bob,pat).
  parent(pat,jim).
  parent(liz,joe).
  parent(liz,tim).
  parent(joe,kim).
  
  female(pam).
  female(liz).
  female(ann).
  female(pat).
  female(zoe).
  female(kim).
  
  male(bob).
  male(john).
  male(jim).
  male(joe).
  male(tim).
  
  sibling(X, Y) :- parent(Z, X), parent(Z, Y), X \= Y.
  
  son(X,Y) :- parent(Y, X), male(X).
  
  nephew(X, Y) :- sibling(Y, Z), son(Z, X).
  </code></pre>