title: Predicate must be true of all elements in a list
body: <p>I have a set of facts:</p>
  
  <pre><code>likes(john,mary).
  likes(mary,robert).
  likes(robert,kate).
  likes(alan,george).
  likes(alan,mary).
  likes(george,mary).
  likes(harry,mary).
  likes(john,alan).
  </code></pre>
  
  <p>Now I want to write a relation which will check for all element X of an input list if <code>likes(X,A)</code> is true. my relation should return true once if <code>likes(X,A)</code> is true for all element X in my list L.
  If I try this this:</p>
  
  <pre><code>relat(X) :- member(A,[john,alan,george,harry]), likes(A,X).
  </code></pre>
  
  <p>but the output is </p>
  
  <pre><code>?- relat(mary).
  true ;
  true ;
  true ;
  true.
  </code></pre>
  
  <p>I want to write it such that it returns one true once it found that <code>likes(john,mary),likes(alan,mary),likes(george,mary),likes(harry,mary)</code> all are true.
  How to approach this problem? </p>