Skip to content

Add formal/: machine-checked coverage and compaction arguments in Lean - #776

Merged
frankmcsherry merged 1 commit into
TimelyDataflow:master-nextfrom
frankmcsherry:formal
Jul 1, 2026
Merged

Add formal/: machine-checked coverage and compaction arguments in Lean#776
frankmcsherry merged 1 commit into
TimelyDataflow:master-nextfrom
frankmcsherry:formal

Conversation

@frankmcsherry

Copy link
Copy Markdown
Member

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.lean concerns 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.lean proves soundness and canonicity of Lattice::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_by and in the reduce module point at the corresponding files.
The directory builds with lake build (instructions in formal/README.md); nothing in the Rust workspace depends on it, and no CI gates on it.

🤖 Generated with Claude Code

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>
@frankmcsherry
frankmcsherry merged commit dbb144f into TimelyDataflow:master-next Jul 1, 2026
6 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 15, 2026
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