Repository navigation
lean: Level 0–2 proofs of the GC admission/liveness design - #780
Open
mengmengmengqiang wants to merge 1 commit into
Open
mengmengmengqiang wants to merge 1 commit into
mengmengmengqiang wants to merge 1 commit into
Conversation
mengmengmengqiang
force-pushed
the
lean-gc-admission-formal
branch
2 times, most recently
from
November 24, 2026 10:14
219ef74 to
4e27289
Compare
…wner fallback, H3/H4 and docs Ordered keeps the raw token (raw-first equality; two spellings of the same label/ms/nonce are .unordered); parseToken accepts only non-empty ASCII decimal digits below 2^64; ownerVerdict threads the Store kind (oldBoot is Dead only on a local SQLite Store) and the witness snapshots it; H3 is the existence form (a tombstone/incarnation may be replaced, never silently dropped) and H4 covers every map row; README documents H0/H2d/H-done-op-id/ H-no-prune, the corrected witness matrix, the actual LOC command and the Ephemeral-AI-Lab#782 dependency for Inv7. Examples gain raw-parse and auditWitness guards. Verified locally from the Branch: lake build green (0 warnings), 23 axiom receipts OK, step_preserves on [propext, Classical.choice, Quot.sound], no sorry/admit/axiom/native_decide.
mengmengmengqiang
force-pushed
the
lean-gc-admission-formal
branch
from
November 24, 2026 10:17
4e27289 to
1d09e14
Compare
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.
Adds
formal/lean/gc-admission/: a Level 0–2, Mathlib-free Lean 4 model of the shipped LayerFS GC admission/liveness design — the shipped subset of #770, not the Rust/DB implementation (Level 3+ is out of scope).What is proved
branch.remove/store.compact; (2) retained operator done rows and uncertain rows carry a consistent admission witness; (3) a Dead witness names an explicit ordered cause; (4) the ordered rule machine incarnation → Sandbox generation/tombstone → Live; (5) a live/uncertain intent blocksstore.compact; (7)Copy::Donenon-removal; (8) no automatic release — the operator is the only path. Inv6 (fence/lease) is deferred; Inv3/Inv4 are witness-level corollaries (README's matrix and Limits).machine_incarnation+sandbox_generationas ordered tokens (Ordered/comparePlace/parseToken), and the durable Sandbox tombstone.gc_intentrelease/preview/settlerows,Copy::Doneretention through compact, the compact barrier and the retained done-row audit;list/auditstay read-only (not state transitions).doctoris a product check the model deliberately leaves unmodelled.preview/settle/release(release only on an explicitly uncertain row) andforce remove's release-or-mark-uncertain.theorem step_preserves (op : Op) (s : State) (h : Inv s) : Inv (step op s)over the 13 transitions, with per-transition case analysis.no_reclaim_live,compact_barrier,reconcile_only_dead,done_is_operator,place_fallback_conservative,conservative_no_death,unordered_never_dead,restore_is_uncertain,ordered_rule,ordered_rule_sequential,compareMachine_uncertain_cases,unordered_place_never_dead,recorded_newer_is_uncertain,done_survives_compact,preview_is_done,force_remove_ends_mounts.Toolchain and policy
leanprover/lean4:v4.36.0(lean-toolchain), no Mathlib, no cache or network step after the toolchain install.sorry,admit,axiomornative_decide.GcAdmission/Axioms.leanprints the 21 receipts;tools/check_lean_axioms.pyaccepts onlypropext,Classical.choiceandQuot.sound.lake buildgreen (16 jobs,#guards included) andpython3 -B -m unittest discover -s tools -p 'test_*.py'green (182 tests).formal/is outside every roottools/production_loc.pycounts: 0 product LOC, guarded bytest_formal_lean_tree_is_outside_product_loc.CI (report-only)
The intended
.github/workflows/lean.ymlis report-only — never a required check, it cannot block a push or merge. It builds the tree withleanprover/lean-action@v1, greps forsorry/admit/native_decide/axiom/constant, and verifies the axiom receipt.The workflow file is included in this PR (commit
0b4b20a1).Scope and references
PlaceViewmerge andarchive --prune/ the exported set. There is deliberately no archive transition.Commits
lean: Level 0–2 proofs of the GC admission/liveness design— theformal/tree (12 files) + README.ci: report-only Lean job, axiom receipt and LOC guard—tools/check_lean_axioms.pyand the LOC regression test.Based on
87e46c65; the base head has since moved tofe9b4d1aand this branch merges cleanly.