Effect4

R13: A run's inputs are data: equal recorded inputs give equal replay observationsreq:R13

Requirement R13: A run's inputs are dataabout:req:R13

This page explains requirement R13 in Effect4. It covers what the requirement asks for execution inputs, why first-order replay matters, and how the property is checked.

What the requirement asksabout:req:R13:what-it-asks

Requirement R13 demands that every input influencing an execution run is first-order data (docs/core/system-map.md §8, DB-01):

  • Congruence: equal recorded program syntax, typing signatures, profiles, budgets, tapes, and load values yield equal replay observations.
  • Value admission: supplied load values fit admitted load requirements.
  • Replay from journal: an execution replays from its recorded journal without calling external hosts (journal_replays).
  • Pure decision tapes: decision sequences contain first-order branch choices rather than host functions or promises.

Host closures, uninspected promises, and hidden runtime objects never enter program state.

Why it mattersabout:req:R13:why-it-matters

Distributed and concurrent programs often fail in ways that are difficult to reproduce when inputs depend on ambient system state.

If a runtime allows unrecorded closures or implicit clocks to steer execution, recorded traces cannot reproduce defects reliably.

With every input held as first-order data, a recorded run replays exactly, and a counterexample is a value that can be stored and shared.

How it is checkedabout:req:R13:how-it-is-checked

The requirement is checked by proving replay theorems and congruence over journals and tapes:

  • Journal replay is stated by journal_replays in src/Effect4/Laws/Run.lean.
  • Tape cut replay is stated by tapeFrom_cut_replays (src/Effect4/Laws/Run/Tape.lean).
  • Tape position replay is stated by tapeFrom_position_replays in the same file.
  • Reached history congruence is stated by reached_history in src/Effect4/Laws/Run/Frame.lean.

The plan on this page gives each theorem's status and the goals it rests on.

R13 by concept: each concept its nodes are placed at, by tag or by module. An arrow goes where a node's proof reaches a node of another concept.
The figure in words
NodeStatusRests onNearest nodes
journal_replaysproved——
reachedproved——
reached_historyproved——
tapeFrom_appendproved——
tapeFrom_cutproved——
tapeFrom_cut_replaysproved—tape_replays, tapeFrom_cut
tapeFrom_position_replaysproved—tape_replays
historyproved—reached_history
keepsproved——
replaysproved—journal_replays
tape_replaysproved——