Skip to content

Happened-before

The least strict partial order on distributed events generated by local program order, message send-before-receive, and transitivity, capturing potential causality without assuming synchronized physical clocks.

Core Idea

Lamport's happened-before relation a→b holds when a precedes b in one process, a sends a message received at b, or a→c→b; unrelated events are concurrent. Local order and communication propagate causal influence; logical clocks assign increasing timestamps consistent with the relation, though scalar timestamps cannot characterize concurrency conversely. The abstraction is therefore identified by a declared carrier, a transformation or constraint over that carrier, and an invariant that tells an analyst whether the named structure is genuinely present.

How would you explain it like I'm…

Who Could Have Told Whom

Imagine friends in different rooms who can only talk by passing notes. One thing "happened before" another if it came earlier for the same friend, or if a note carried news of it to the other friend. If no note could have connected two things, we can't say which came first.

What Could Cause What

In computer science, many computers work at once and send messages without sharing one clock. The happened-before rule tells you when one event could have affected another. Event A happened before event B if A came first on the same computer, or if A sent a message that B received. It also holds if there is a chain of these steps linking A to B. If no such chain exists in either direction, the two events are called concurrent. That means neither could have influenced the other, not that they happened at the exact same time.

Causal Order Without Clocks

Lamport's happened-before relation, written a→b, orders events in a distributed system without relying on real clocks. It holds in three cases: - a comes before b in the same process, - a is sending a message and b is its receipt, - a→c and c→b for some event c. Events not related either way are concurrent. The relation captures potential causality: which events could have influenced which. That is different from the order in which some observer happened to see them. Logical clocks give events timestamps that always increase along happened-before. However, a smaller timestamp does not prove one event happened before another.

 

Lamport's happened-before relation is the smallest relation on events of an asynchronous distributed system that satisfies three rules. Program order: if a precedes b in one process, a→b. Messages: a send precedes its matching receive. Transitivity: a→c and c→b imply a→b. It is irreflexive and acyclic, so it is a strict partial order. Pairs unrelated in either direction are concurrent. It models potential causal influence without physical clocks, and it must be distinguished from any total order in which events are observed or logged. Lamport logical clocks assign scalar timestamps so that a→b implies C(a) < C(b). The converse fails, so scalar timestamps cannot detect concurrency. The relation must contain exactly the generating program and message edges plus their transitive closure. Adding or omitting edges changes the object.

Scope of Application

Happened-before belongs to distributed systems and is useful where the analyst can specify events in processes, within-process order, message send and receive pairs and transitive closure, then evaluate the relation contains exactly the generating program and message edges plus transitive consequences and remains irreflexive and acyclic. The scope is broad within that domain but bounded by the need for the relation contains exactly the generating program and message edges plus transitive consequences and remains irreflexive and acyclic. The entry records a descriptive analytical identity; practical use requires the governing domain's evidence, standards, and safety obligations.

Clarity

The abstraction clarifies a crowded vocabulary by making the relation contains exactly the generating program and message edges plus transitive consequences and remains irreflexive and acyclic the center of the account. A claim should name the carrier, the governing operation or relation, the applicable assumptions, and the recognition test. A bare label is insufficient because the name Happened-before can be used for a formal identity, an implementation, or a neighboring result unless carrier and convention are stated.

Manages Complexity

Without the abstraction, an analyst must reason directly over many local details: the carrier roles, admissibility assumptions, competing conventions, derived invariants, boundary cases, and proof or validation obligations specific to Happened-before. Happened-before compresses them into the roles in the structural signature. That compression permits comparison across instances without erasing the variables that determine validity. It also exposes which details may be varied safely and which are constitutive.

Abstract Reasoning

  1. Identify the carrier. State what the elements, states, objects, or observations are: events in processes, within-process order, message send and receive pairs and transitive closure. Reject examples whose alleged carrier belongs to a different problem.
  2. Lock the constitutive rule. Express the relation contains exactly the generating program and message edges plus transitive consequences and remains irreflexive and acyclic independently of one notation or implementation.

Knowledge Transfer

Knowledge transfers strongly among subfields of distributed systems because they reuse events in processes, within-process order, message send and receive pairs and transitive closure, Local order and communication propagate causal influence; logical clocks assign increasing timestamps consistent with the relation, though scalar timestamps cannot characterize concurrency conversely., and type the carrier, state every parameter and convention in the definition, test that the relation contains exactly the generating program and message edges plus transitive consequences and remains irreflexive and acyclic, compare the nearest accepted identity, and report counterexamples, uncertainty, and limiting cases.

Relationships to Other Abstractions

Local relationship map for Happened-beforeParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.Happened-beforeDOMAINPrime abstraction: Causality — is a kind ofCausalityPRIME

Current abstraction Happened-before Domain-specific

Parents (1) — outgoing typed relations

  • Happened-before is a kind of Causality Prime

    The relation formalizes potential causal precedence.

Hierarchy path (1) — routes to 1 parentless root

Neighborhood in Abstraction Space

Happened-before sits in a crowded region of the domain-specific corpus (20th percentile for distinctiveness): several abstractions share nearly its structure, so a description that fits it tends to fit its neighbors too.

Family — Concurrency & Parallel Computation (35 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-10-25