title: PROLOG: Check if first list contains 3 times less of each element than second list
body: <p>I need to check if each element in second list has 3 times more instances then the same element in the first list. My function returns false all the time and I don't know what I'm dong wrong.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>fourth(_,[ ]).
  fourth(A,[HF|TF]) :-
      intersection(A, HF, NewA),
      intersection(TF, HF, NewB),
      append(HF, NewB, NewT),
      append(NewA, NewA, NewAA),
      append(NewA, NewAA, NewAAA),
      length(NewAAA) == length(NewT),
      select(HF, TF, NewTF),
      fourth(A, NewTF).
  </code></pre>
  
  <p>Example:</p>
  
  <pre><code>?- fourth([1,2,3], [1,1,1]).
  true.
  
  ?- fourth([1,2,3], [1,1,1,1]).
  false.
  
  ?- fourth([1,2,3], [1,1]).
  false.
  
  ?- fourth([1,2,2,3], [1,1,2,2,1,2,2,2,2]).
  true.
  </code></pre>