title: How to define a relative rule in Prolog?
body: <p>How to define a relative rule in Prolog?</p>
  
  <p>This is what I got so far:</p>
  
  <pre><code>spouce(X,Y) :-
      wife(X,Y).
  
  spouce(X,Y) :-
      husband(X,Y).
  
  relative-by-blood(X,Y) :-
      ancestor(Z,X),
      ancestor(Z,Y).
  
  
  relative(X,Y) :-
      relative-by-blood(X,Y).
  
  relative(X,Y) :-
      spouce(X,Y).
  
  relative(X,Y) :-
      relative-by-blood(X,Z), %&lt;- not sure what to do here.
  </code></pre>
  
  <p>Thanks in advance!</p>