title: Why Plus operator does not work on integers in Alloy?
body: <p>below alloy code is for 8Queens problem<br>
  I do not know why plus operator and minus operator does not work correctly<br>
  so after execution there are queens in same diagonal<br>
  Moreover I am face to this error when use plus and minus operator between 2 #<br>
  for example :<br>
      #q1.row+#q2.col-#q1.col != #q2.row  </p>
  
  <p>thanks for any response<br>
  best regards  </p>
  
  <hr>
  
  <p>here that's 8Queens code:</p>
  
  <pre><code>sig Queens{
  row:Int,
  col:Int
  }
  {row&gt;=0 and row &lt;#Queens and col&gt;=0 and col&lt;#Queens}
  
  pred nothreat(q1,q2 : Queens) {
     q1.row != q2.row 
     and q1.col != q2.col 
     and q1.row+q2.col-q1.col != q2.row
     and q1.row-q2.col+q1.col != q2.row
  }
  
  pred valid { 
  all q1,q2 : Queens |   q1 != q2 =&gt; nothreat[q1, q2]
   }
  fact card {#Queens =8}
  run valid for 8 Queens, 8 Int
  </code></pre>