|  4.7.5 boolean expressions 
A boolean expression is an int expression used in a logical context:
 
An int expression <> 0 evaluates to TRUE (represented by 1),
0 evaluates to FALSE (represented by 0).
 
The following is the list of available comparisons of objects of the same type.
 
Note: There are no comparisons for ideals and modules, resolutions
and maps.
 
 
integer comparisons:
|  |   i == j
  i != j    // or     i <> j
  i <= j
  i >= j
  i > j
  i < j
 | 
number comparisons:
For numbers from Z/p or from field extensions not all operations are useful:|  |   m == n
  m != n    // or     m <> n
  m < n
  m > n
  m <= n
  m >= n
 | 
 - 0 is always the smallest element,
 - in Z/p the representatives in the range -(p-1)/2..(p-1)/2 when p>2 resp.
     0 and 1 for p=2 are used for comparisons,
 - in field extensions the last two operations
(
 >=,<=) yield always TRUE (1) and
the<and>are equivalent to!=.
polynomial or vector comparisons:
|  |   f == g
  f != g    // or     f <> g
  f <= g    // comparing the leading term w.r.t. the monomial order
  f <  g
  f >= g
  f >  g
 | 
intmat or matrix comparisons:
|  |   v == w
  v != w    // or     v <> w
 | 
intvec or  string comparisons:
|  |   f == g
  f != g    // or     f <> g
  f <= g    // comparing lexicographically
  f >= g    // w.r.t. the order specified by ASCII
  f >  g
  f <  g
 | 
boolean expressions combined by boolean operations (and,or,not) 
Note:
All arguments of a logical expression are first evaluated and
then the value of the logical expression is determined. For example, the
logical expression (a || b)is evaluated by first evaluatingaandb, even though the value ofbhas no
influence on the value of(a || b), ifaevaluates to
true. 
Note that this evaluation is different from the left-to-right, conditional
evaluation of logical expressions (as found in most programming
languages). For example, in these other languages, the value of (1
|| b)is determined without ever evaluatingb. 
See  Major differences to the C programming language.
 
 |