title: Mathematica If-then vs. Implies
body: <p>I am new to Mathematica(v8) and am using it to program propositional logic. </p>
  
  <p>I'm wondering what the difference is between the <code>If</code> and the <code>Implies</code> operators. For example,<br>
  both <code>If[p,q]</code> and <code>Implies[p,q]</code> return <code>q</code> for <code>p=True</code> (as expected).</p>
  
  <p>But when I try to obtain SatisfiabilityInstances, I get the following:</p>
  
  <pre><code>SatisfiabilityInstances[If[p, q], {p, q}]
  (*
    {{True, True}}
  *)  
  </code></pre>
  
  <p>unless I ask it for more instances:</p>
  
  <pre><code>SatisfiabilityInstances[If[p, q], {p, q}, All]
  </code></pre>
  
  <blockquote>
    <p>SatisfiabilityInstances::boolv: "If[p,q] is not Boolean valued at {False,True}.</p>
  </blockquote>
  
  <p>However:</p>
  
  <pre><code>SatisfiabilityInstances[Implies[p, q], {p, q}, All]   
  </code></pre>
  
  <p>returns the expected out of: </p>
  
  <pre><code>(* {{True, True}, {False, True}, {False, False}} *)
  </code></pre>
  
  <p>What is causing this difference in the outputs?</p>