-
-
Notifications
You must be signed in to change notification settings - Fork 0
Lean: port the Coq concrete filesystem model so the FilesystemCNO law axioms become theorems (follow-up to #125/#165) #167
Copy link
Copy link
Open
Labels
feeds:valence-shellFeeds valence-shell's proofs/engineering (D127): judge progress by what it contributes thereFeeds valence-shell's proofs/engineering (D127): judge progress by what it contributes theremigrationPorting between languages or toolchains (e.g. -> AffineScript)Porting between languages or toolchains (e.g. -> AffineScript)priority:p2Normal - queue itNormal - queue itproofsFormal verification: Agda, Coq, Idris, Lean, Z3/SMT, axiom debtFormal verification: Agda, Coq, Idris, Lean, Z3/SMT, axiom debtscope:repoConfined to this repositoryConfined to this repositorystatus:readyFully specified and ready to be picked upFully specified and ready to be picked uptech-debtKnown shortcut, drift, or hygiene owed - includes cleanupKnown shortcut, drift, or hygiene owed - includes cleanup
Description
Activity
Metadata
Metadata
Assignees
Labels
feeds:valence-shellFeeds valence-shell's proofs/engineering (D127): judge progress by what it contributes thereFeeds valence-shell's proofs/engineering (D127): judge progress by what it contributes theremigrationPorting between languages or toolchains (e.g. -> AffineScript)Porting between languages or toolchains (e.g. -> AffineScript)priority:p2Normal - queue itNormal - queue itproofsFormal verification: Agda, Coq, Idris, Lean, Z3/SMT, axiom debtFormal verification: Agda, Coq, Idris, Lean, Z3/SMT, axiom debtscope:repoConfined to this repositoryConfined to this repositorystatus:readyFully specified and ready to be picked upFully specified and ready to be picked uptech-debtKnown shortcut, drift, or hygiene owed - includes cleanupKnown shortcut, drift, or hygiene owed - includes cleanup
Context
#165 (fix for #125) makes the Lean filesystem law axioms carry the occupancy preconditions the Coq versions state, and proves
unconditional_mkdir_rmdir_inverse_is_false. What remains axiomatic inproofs/lean4/FilesystemCNO.leanafter that PR is the model:mkdir,rmdir,create,unlink,rename,read,write,chmod,snapshot/restoreare opaque constants and the laws about them are axioms (21 in total, 3 now with preconditions).LambdaCNO.leankeeps one axiom,y_combinator_not_identity.The Coq side (
proofs/coq/filesystem/*.v) has a concrete model where the same laws are theorems. Porting that model discharges, in one move:mkdir_not_identity(FilesystemCNO.lean:271)mkdir_idempotent(FilesystemCNO.lean:345)snapshot_restore_identity(FilesystemCNO.lean:320)mkdir_rmdir_inverse,create_unlink_inverse,rename_inverse) and the identity laws around themThe ledger rows in
docs/proof-debt.adoc(dated 2026-09-22) name this as the discharge route; #70 tracks the wider "overly-cautious OWED" pattern on the Coq side and is not this issue.Acceptance criteria
FilesystemCNO.leandefinesFilesystemas a concrete structure (e.g. a finite map fromPathto entries) and the operations as functions;noDirAt/noFileAt/noEntryAtstay as the semantic predicates introduced by fix(lean): #125 — law axioms carry Coq's occupancy preconditions; axiom audit + CI job #165.theorem;AxiomAudit.lean§D#print axiomsfor every downstream theorem lists none of them (the guards are updated to the new expected output, not deleted).unconditional_mkdir_rmdir_inverse_is_falsestill holds (it must, since the model witnesses it).proofs/lean4/check-core.shstays green in theleanjob; the audit guard count in the PR description is the new measured number.sorryreds#print axioms(guard showssorryAx).PROOF-STATUS.adocanddocs/proof-debt.adocaxiom counts updated from the measured output.🤖 Generated with Claude Code