[rules = arith].
'Rules: arith.                   Location: SPADE$CHECKER:ARITH.RUL'.
''.
'These rules are elementary arithmetic simplification rules, e.g.'.
''.
'          X*1, 1*X     -->  X            X+0, 0+X     -->  X'.
'          X*0,0*X      -->  0            X-0          -->  X'.
'          X div 1      -->  X            X/1          -->  X'.
'          (X*N) div N  -->  X            (N*X) div N  -->  X'.
'          (X/Y)*Y      -->  X            (X/Y)*Y      -->  X'.
'          (X*Y)/Y      -->  Y            (Y*X)/Y      -->  Y'.


[rules = assoc].
'Rules: assoc.                   Location: SPADE$CHECKER:ARITH.RUL'.
'                                        & SPADE$CHECKER:LOGIC.RUL'.
''.
'Rules for the associativity of the + and * arithmetic operators (in'.
'ARITH.RUL) and for the associativity of "and", "or" and "<->" (in'.
'LOGIC.RUL).'.
''.
'(N.B. For associativity of set operators, see rules "sets"; for'.
'associativity of sequence @ (append) operator, see rules "append".)'.


[rules = commut].
'Rules: commut.                  Location: SPADE$CHECKER:ARITH.RUL'.
'                                        & SPADE$CHECKER:LOGIC.RUL'.
''.
'Rules for the commutativity of the + and * arithmetic operators (in'.
'ARITH.RUL) and for the commutativity of "and", "or" and "<->" (in'.
'LOGIC.RUL).'.
''.


[rules = distrib].
'Rules: distrib.                 Location: SPADE$CHECKER:ARITH.RUL'.
'                                        & SPADE$CHECKER:LOGIC.RUL'.
''.
'Rules for the distributivity of * over + and - operators (in ARITH.RUL)'.
'and for the distributivity of "and" over "or" and of "or" over "and"'.
'(in LOGIC.RUL).'.
''.
'(N.B. For distributivity of set operators, see rules "sets".)'.


[rules = minus].
'Rules: minus.                   Location: SPADE$CHECKER:ARITH.RUL'.
''.
'A family of rules for the unary and binary minus operators, thus:'.
''.
'          X-X,-(0)   -->  0              -(-X)      -->  X'.
'            -(A+B)   <-->   (-A)+(-B)   <-->   (-A)-B'.
'            A+(-B)   <-->      A-B      <-->   -(B-A)'.
'            -A*B     <-->    -(A*B)     <-->   A*(-B)'.
'	    -A*(-B)   <-->      A*B .'.


[rules = intdiv].
'Rules: intdiv.                  Location: SPADE$CHECKER:ARITH.RUL'.
''.
'Rules about the integer "div" operator.'.
''.
'Rules include relationship between (A+B) div C and (A div C)+(B div C)'.
'when A (or B) is a multiple of C and arithmetic negation within div'.
'expressions.'.
