Skip to content

Expose disaster recovery properties as proved statements - #8619

Merged
Amaury Chamayou (achamayou) merged 9 commits into
mainfrom
cjen1-msft-bookish-invention
Oct 22, 2026
Merged

Amaury Chamayou (achamayou) merged 9 commits into
mainfrom
cjen1-msft-bookish-invention

Conversation

@cjen1-msft

@cjen1-msft cjen1-msft commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Consolidate disaster recovery's safety proof API in DisasterRecovery/Properties.lean: seven safety theorems and seven existential witness lemmas state their full contracts and reference implementations under Proofs/. Keep Properties.lean and .Properties as the public entrypoint and namespace for both disaster recovery and CCF-Raft.

Remove disaster recovery's separate proposition definitions, Proof.lean, and redundant proof-coverage check. Update consumers, import roots, dependency-direction checks, documentation, and lean/AGENT.md. Model semantics, proof bodies, witness constructions, replay behavior, and dependency pins are unchanged.

Validated locally: warnings-as-errors builds for both protocols and the replayer; import coverage; package/declaration linters; pinned Lean formatting and documentation checks; public-import smoke tests and exact type comparisons for all 22 theorem/witness declarations; original DR claim comparisons; and the guide's Lean example. All 14 DR contracts also match #8620 by Lean definitional equality. Ordinary axiom inspection reports only propext, Classical.choice, and Quot.sound. Full lake check remains CI-only and was not run locally.

Replace the split claim/proof API with explicit safety theorems and witness lemmas in Properties. Keep implementations under Proofs, enforce dependency direction, and update consumers and documentation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 21, 2026 17:10
@cjen1-msft
cjen1-msft requested a review from a team as a code owner October 21, 2026 17:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human sign-off should confirm the outstanding whole-package kernel and axiom validation in CI.

1 open issue
What changed in this PR

Consolidates the disaster recovery proof API in Properties.lean, preserving the existing contracts and proof implementations.

Changes:

  • Exposes seven safety theorems and seven witness lemmas with complete statements.
  • Updates consumers and dependency-direction checks.
  • Removes the separate proof entrypoint and redundant coverage check.

Custom instructions used

  • lean/AGENT.md: module layout and review guidance.
File Description
lean/​disaster-recovery/​README.md Documents the new proof API.
lean/​disaster-recovery/​DisasterRecovery/​Tests/​Witnesses.lean Uses public witness lemmas and theorems.
lean/​disaster-recovery/​DisasterRecovery/​Tests/​Trace.lean Migrates trace checks to the public API.
lean/​disaster-recovery/​DisasterRecovery/​Tests/​ProofCoverage.lean Removes redundant coverage checks.
lean/​disaster-recovery/​DisasterRecovery/​Tests/​Architecture.lean Focuses checks on dependency direction.
lean/​disaster-recovery/​DisasterRecovery/​Properties.lean Exposes all 14 proved contracts.
lean/​disaster-recovery/​DisasterRecovery/​Proofs/​Witnesses.lean States witness contracts directly.
lean/​disaster-recovery/​DisasterRecovery/​Proofs/​Model.lean States model contracts directly.
lean/​disaster-recovery/​DisasterRecovery/​Proofs/​Local.lean States local contracts directly.
lean/​disaster-recovery/​DisasterRecovery/​Proofs/​Gossip.lean States gossip contracts directly.
lean/​disaster-recovery/​DisasterRecovery/​Proof.lean Removes the old proof entrypoint.
lean/​disaster-recovery/​DisasterRecovery.lean Removes obsolete generated imports.

Review effort: Balanced

Comment thread lean/disaster-recovery/README.md Outdated
cjen1-msft and others added 2 commits October 22, 2026 09:21
Rename both public modules and namespaces to Theorems, update imports and dependency audits, and align the Lean module guide with the proved-statement layout.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@cjen1-msft cjen1-msft changed the title Expose disaster recovery properties as proved statements Use theorem entrypoints for disaster recovery and CCF-Raft Oct 22, 2026
Comment thread lean/ccf-raft/README.md Outdated
Rename the public entrypoints and namespaces back to Properties, retaining proved statements and keeping imports, dependency checks, documentation and the module guide aligned.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@cjen1-msft cjen1-msft changed the title Use theorem entrypoints for disaster recovery and CCF-Raft Expose disaster recovery properties as proved statements Oct 22, 2026
Comment thread lean/disaster-recovery/README.md Outdated
Comment thread lean/disaster-recovery/README.md Outdated
Comment thread lean/AGENT.md Outdated
@achamayou
Amaury Chamayou (achamayou) merged commit 7951afd into main Oct 22, 2026
13 checks passed
@achamayou
Amaury Chamayou (achamayou) deleted the cjen1-msft-bookish-invention branch October 22, 2026 15:03
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.

6 participants