Ordinal Data - Comparison Operator (Order, Equality)

1 - About

Comparison Operator

All comparison operators have the same priority, which is lower than that of all numerical operators.

The result of a comparison is a Boolean

Comparison Operator are tiddly coupled with the order and equivalence notion in order to sort data.

3 - Chain

Comparisons may be chained.

For example, a < b == c tests whether:

  • a < b
  • and moreover b == c

4 - Relation

Comparison operator models two kind of relation:

  • Order Relation
  • and Equivalence Relation

Binary relation are used in many branches of mathematics to model this relation. See Data Modeling - Binary Relation.

4.1 - Order relation

Order relation, including strict orders:

  • greater than
  • greater than or equal to
  • less than
  • less than or equal to
  • divides (evenly)
  • is a subset of

4.2 - Equivalence relation

  • equality
  • is parallel to (for affine spaces)
  • is in bijection with
  • isomorphy

5 - Combination

Comparisons may be combined using the Boolean operators and and or.

6 - List

6.1 - Order

Operation Description
< strictly less than
<= less than or equal
> strictly greater than
>= greater than or equal
in check whether a value occurs in a list
not in check whether a value does not occur in a list

6.2 - Equality

7 - Documentation / Reference

data/sort/comparison.txt ยท Last modified: 2018/11/24 12:24 by gerardnico