title: prolog not all the same
body: <p>Hi I am new to prolog and I want to know how to express "not all the same" logically in prolog.</p>
  
  <p>for example, if I have a function <code>valid(A, B, C, D)</code> that takes numbers as input and requires A B C D are not all the same, how do I state it?</p>
  
  <p>I tried <code>valid(A, B, C, D) :- not(A == B == C == D).</code> It seems not working.</p>