title: Simplify boolean expression algorithm
body: <p>Anybody knows of an algorithm to simplify boolean expressions?</p>
  
  <p>I remember the boolean algebra and Karnaught maps, but this is meant for digital hardware where EVERITHING is boolean. I would like something that takes into account that some sub-expressions are not boolean. </p>
  
  <p>For example: </p>
  
  <pre><code>a == 1 &amp;&amp; a == 3
  </code></pre>
  
  <p>this could be translated to a pure boolean expression: </p>
  
  <pre><code>a1 &amp;&amp; a3 
  </code></pre>
  
  <p>but this is expression is irreducible, while with a little bit of knowledge of arithmetics everibody can determine that the expression is just: </p>
  
  <pre><code>false
  </code></pre>
  
  <p>Some body knows some links?</p>