title: Why is this prolog query both true and false?
body: <p>My SWI-Prolog knowledge base contains the following two facts:</p>
  
  <pre><code>f(a,b).
  f(a,c).
  </code></pre>
  
  <p>Now if I pose the query</p>
  
  <pre><code>?- f(a,c).
  true.
  </code></pre>
  
  <p>But </p>
  
  <pre><code>?- f(a,b).
  true ;
  false.
  </code></pre>
  
  <p>Why is f(a,b) both true and false?  This also happens when there are three facts in the KB.  If I append f(a,d). to the KB, then f(a,d) is true (only), but f(a,b) and f(a,c) are both true and false.  What's going on, and what can I do so that Prolog answers (only) true to these queries?</p>