Repository navigation
formal: pending as an upper set, and rounds enumerating through views - #1110
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_superasked 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_belowasks 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
upperwithout 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.Step.of_pending_eqbuilds. 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.Transferdrops its closure hypothesis, whichtransfer_alwaysnever 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 buildsucceeds on mini-00 with toolchain v4.31.0.The only warning in
Model.leanis the copyright-header lint every file already has.#print axiomsonstreamCorrectness_holds,Run.stream_correct,Run.correct_at,meet_view_agrees,view_round_coverageandscenario1_streamCorrectreports onlypropext,Classical.choiceandQuot.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