Skip to content

formal: pending as an upper set, and rounds enumerating through views - #1110

Merged
frankmcsherry merged 1 commit into
master-nextfrom
formal-pending-views
Nov 22, 2026
Merged

frankmcsherry merged 1 commit into
master-nextfrom
formal-pending-views

Conversation

@frankmcsherry

Copy link
Copy Markdown
Member

Two relaxations of the reduce model in formal/, so that it covers two shortcuts the cursor reduce takes.
Both came up while reviewing #1108 and #1109.
That PR fixes a real gap between the code and the model; these changes do not bear on it.

Pending as an upper set

Step.pending_super asked that every deferred time be in the new pending set.
The proof used it only to find some pending time below a live point.
Enumerates.pending_below asks for exactly that: every deferred or carried time is at or above some new pending time.
This covers the reduce pending a reached time beyond upper without its joins against the times its sweep has already passed, since those joins lie above it.

Enumerating through a view

The cursor reduce advances its histories by the meet of the times it will visit, and consolidates.
Updates that land on the same time and cancel then vanish, and their times stop being join partners.
The model joined against the stored state as it is, so it did not license this.

  • Enumerates: a round may now join against a view (vS, vO) of the stored input and output. The view must agree with the state in accumulation on some upper set holding every seed.
  • meet_view_agrees: the state compacted by any time below every seed is such a view.
  • view_round_coverage: everything the round must touch is in the view's join-closure. The round-start staleness is re-derived over the view rather than carried.
  • Compaction stays optional: the state itself is a view, which is what Step.of_pending_eq builds. Any frontier sequence is still allowed, and each round picks its view independently.
  • Run.correct_at: correctness at every frontier a run passes, not only the last. A round run as finer steps, each cancelling by a time below its own seeds, is therefore correct at the coarse frontiers. This is how cancelling by a meet that rises during a round is covered.

Transfer drops its closure hypothesis, which transfer_always never used and which views do not preserve.

Not covered

The model still does not describe the sweep itself.
The sweep forms each join when it reaches the later of the two times, where the model forms joins eagerly within a round.
That the sweep visits every time the finer schedule requires is an informal correspondence, as before.

Checks

lake build succeeds on mini-00 with toolchain v4.31.0.
The only warning in Model.lean is the copyright-header lint every file already has.
#print axioms on streamCorrectness_holds, Run.stream_correct, Run.correct_at, meet_view_agrees, view_round_coverage and scenario1_streamCorrect reports only propext, Classical.choice and Quot.sound.

Lean changes written by Claude Code (Claude Opus 5.5) from a design discussion; built and axiom-checked on mini-00.

🤖 Generated with Claude Code

…erate through views

`Step.pending_super` asked that every deferred time be in the new pending set.
The proof used it only to find some pending time below a live point.
`Enumerates.pending_below` asks for exactly that: every deferred or carried time is at or above some new pending time.
This covers the reduce pending a reached time beyond `upper` without its joins against times its sweep has already passed.

The enumeration may now join against a view of the stored input and output, rather than the state itself.
The view must agree with the state in accumulation on some upper set holding every seed (`Enumerates.view_agrees`).
The state compacted by any time below every seed is such a view (`meet_view_agrees`), so updates that cancel need not serve as join partners.
Coverage through a view is `view_round_coverage`, with the round-start staleness re-derived over the view rather than carried.
The state itself remains a view, so compaction is optional (`Step.of_pending_eq`).
`Run.correct_at` gives correctness at every frontier a run passes, so a round run as finer steps, each cancelling by a time below its own seeds, is correct at the coarse frontiers.

`Transfer` drops its closure hypothesis, which `transfer_always` never used and which views do not preserve.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@frankmcsherry
frankmcsherry merged commit 519099d into master-next Nov 22, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant