Add formal/: machine-checked coverage and compaction arguments in Lean - #776
Merged
Merged
Conversation
Two developments, with a summarizing README. Differential/Coverage.lean: for any function of an accumulated input, output changes are confined to joins of input update times; per round, to the novel-involving joins, which coincide exactly with the seed-and- close enumeration reduce.rs performs. Emitting at those times advances the correctness invariant; deferred (pending) times cover exactly the stored output's staleness and are necessary. Exact times throughout; logically compacted input is the intended next step. Differential/Compaction.lean: soundness and canonicity of Lattice::advance_by, with a note bounding its scope. Doc pointers added at Lattice::advance_by and in the reduce module. The directory is a self-contained lake project; nothing in the Rust workspace depends on it, and no CI gates on it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Merged
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.
This adds a
formal/directory: a self-contained Lean 4 + Mathlib project with machine-checked arguments about differential dataflow, and a README summarizing them.Differential/Coverage.leanconcerns which times an incremental computation must revisit.It proves that for any function of an accumulated input, the output is again a difference trace whose updates fall only at joins of input update times; that a round's change is covered by the joins involving at least one novel time; and that this set coincides exactly with the seed-and-close enumeration the reduce operator performs.
It further proves that emitting corrections at those times keeps the output correct up to the frontier, and that joins deferred beyond the frontier — the pending obligations — cover exactly the staleness of the stored output and cannot be dropped.
All statements use exact times; extending them to logically compacted input is the intended next step.
Differential/Compaction.leanproves soundness and canonicity ofLattice::advance_by: at or beyond the frontier the representative compares exactly as the original, and two times share a representative precisely when they are indistinguishable there.A scope note bounds what this does and does not establish.
Doc comments at
Lattice::advance_byand in the reduce module point at the corresponding files.The directory builds with
lake build(instructions informal/README.md); nothing in the Rust workspace depends on it, and no CI gates on it.🤖 Generated with Claude Code