---
slug: "Compare"
name: "Compare"
type: "Primitives"
layer: "Infrastructure"
ref: "Compare#15a0"
sema_id: "sema:Compare#mh:SHA-256:15a079e73bd3c280efbe2b35ab4b082b2302ab65e5dd5eb1c4fba1a5f554cebe"
tags: ["Infrastructure","Primitives"]
updated: 2026-11-11
mindscape: "bootstrap"
index_url: https://mindscape.pages.dev/bootstrap/index.json
url: https://mindscape.pages.dev/bootstrap/Compare/
related: ["ParetoFront","TranslationProxy","Webtrace","Webtrace#8a90"]
---

# Compare

Relational check

Layer: Infrastructure · Category: Primitives

## 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.

## Builds on

—

## Used by

- [ParetoFront](https://mindscape.pages.dev/bootstrap/ParetoFront.md) (Infrastructure; Composes with)
- [TranslationProxy](https://mindscape.pages.dev/bootstrap/TranslationProxy.md) (Society; References)
- [Webtrace](https://mindscape.pages.dev/bootstrap/Webtrace.md) (Mind; References)

## Identity

- Sema ID: `sema:Compare#mh:SHA-256:15a079e73bd3c280efbe2b35ab4b082b2302ab65e5dd5eb1c4fba1a5f554cebe`
- Ref: `Compare#15a0`
- Supersedes:
  - `sema:Compare#mh:SHA-256:ebab280da9048edf2cc508cf0e554b153e3afd516056b4c2ae51ca85ec6ad2e1`

## Links

- [Pattern page](https://mindscape.pages.dev/bootstrap/Compare/)
- [View in the interactive graph](https://mindscape.pages.dev/bootstrap/#Compare)
- [JSON](https://mindscape.pages.dev/bootstrap/Compare.json)
- [Index of all patterns](https://mindscape.pages.dev/bootstrap/index.json)
