liveBook · Manning

Mathematical equivalence

As explained in Think Distributed Systems

A relation in which two system states or outcomes are considered indistinguishable according to an application-defined criterion, even if their representations differ.

Mathematical equivalence treats two system states or outcomes as interchangeable under an application-defined criterion, even when their representations are not equal. The practical question is not “Are they identical?” but “Do their differences matter here?” section 4.4 section 8.2

For message processing, this can be written P(m) ≡ P(m) • … P(m): processing a message repeatedly produces an equivalent system state. Duplicate log entries may differ literally while remaining inconsequential to the application. section 4.4

When are two books one item?

A library may count editions of the same work as one logical item, while another perspective counts only a particular language or edition. The physical inventory is unchanged; the equivalence criterion changes the answer. section 8.2

Table 8.1 Book editions

Name

Edition

Year

SICP

First

1984

SICP

Second

1996

SICP

JavaScript

2022

Compare the listed editions to see how different representations can be grouped under a shared logical identity. section 8.2

Equivalence also connects higher-level abstractions with lower-level executions: reasoning at either level should produce the same result. Transactions use this relationship to hide concurrency and failure behind simpler definitions. section 5.1

A useful guarantee has explicit limits:

  • Define equivalence for the application; different observers may judge the same difference important or irrelevant. section 4.4
  • Treat exactly-once processing as an end-to-end property requiring at-least-once delivery and processing by both sender and receiver. section 4.4

How Think Distributed Systems covers it

How deep it goes
Defines application-specific equivalence, gives repeated-processing and edition examples, and connects it to abstractions without implementation detail.
Examples
Uses duplicate logs, book editions, library inventory, and higher- versus lower-level transaction abstractions.
What you can do after
Evaluate/understand whether differing states, representations, or repeated operations remain interchangeable under a chosen criterion.
How it connects
Connects exactly-once processing semantics, replication, consistency, abstractions, transactions, and at-least-once delivery.

Also explained in

Compare how 2 books explain mathematical equivalence →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Think Distributed Systems. The section links point to the parts of the book it draws on.