Compare
Relational check
Mechanism
Evaluate relation between two values: Equal, Less, Greater, Incomparable.
Invariants
- Single outcome: Compare(A, B) returns exactly one of Equal, Less, Greater, or Incomparable.
- Reflexive: A equals A.
- Operand reversal: Compare(B, A) preserves Equal and Incomparable, and swaps Less with Greater.
- Exact equality is transitive; a tolerance-based Equal does not carry this guarantee.
Failure modes
- Tolerance chaining: under near-equality A≈B and B≈C without A≈C, so grouping by equality becomes order-dependent.
- Undeclared coercion: values are converted by a rule the comparator did not declare, producing Equal, Less, or Greater where its declared relation would return Incomparable.
Where this came from
—
Used by
- ParetoFront composes_with
- TranslationProxy references
- Webtrace references
Related
Identity
- Ref:
Compare#15a0 - Hash: sema:Compare#mh:SHA-256:15a079e73bd3c280efbe2b35ab4b082b2302ab65e5dd5eb1c4fba1a5f554cebe
- Library: bootstrap 0.11.0, root a6a3d1ff0f98
- License: Not stated; check the repository