Skip to content

Commit 6cd1c72

Browse files
committed
proof(absolute-zero): close FilesystemCNO.lean sorry (idempotent != CNO)
Restructure the "idempotent does NOT imply CNO" example to destructure mkdir_not_identity first and exhibit the specific witness path p, then derive the contradiction with h_neq (h fs) in a single step — no sorry needed. Also drops the vestigial `import Std.Data.List.Basic`. That module does not exist in current Lean 4 (Std.Data.List.Basic was subsumed by Batteries / core Init in the 4.x line); the file uses only the `List` type from core Init, so the import was scaffolding drift. VERIFICATION STATUS: - Logical correctness of the fix: manually validated against the isFsCNO definition and mkdir_not_identity's type. - Local `lean --check` blocked by pre-existing drift elsewhere in the same file that is unrelated to this sorry: * line 39 / 46: `deriving Repr, BEq` on `def PermSet : Type := ...` aliases (not supported in current Lean 4). * line 100: `(meta : FileMetadata)` parameter binder — `meta` is now a reserved word in Lean 4. These are file-wide issues separate from the proof-debt sorry and would benefit from a coordinated absolute-zero toolchain refresh (pin `lean-toolchain`, run `lake update`, add `deriving` for the record types rather than the aliases, rename `meta` binder). Refs: proof-debt-plan.md Dependability / absolute-zero Lean4.
1 parent 02c2c85 commit 6cd1c72

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

proofs/lean4/FilesystemCNO.lean

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
License: AGPL-3.0 / Palimpsest 0.5
99
-/
1010

11-
import Std.Data.List.Basic
11+
-- Std.Data.List.Basic was vestigial in pre-Batteries layouts. The List
12+
-- type used here comes from core Lean 4's Init; no external imports required.
1213

1314
namespace FilesystemCNO
1415

@@ -287,15 +288,18 @@ def isIdempotent (op : FsOp) : Prop :=
287288
axiom mkdir_idempotent (p : Path) :
288289
isIdempotent (fun fs => mkdir p fs)
289290

290-
/-- Idempotent does NOT imply CNO -/
291+
/-- Idempotent does NOT imply CNO.
292+
Proof: destructure mkdir_not_identity to get a specific (p, fs) where
293+
mkdir p fs ≠ fs, then exhibit `fun fs => mkdir p fs` as the witness.
294+
It is idempotent (mkdir_idempotent), but it cannot be a CNO: if it were,
295+
applying it to fs would leave fs unchanged, contradicting h_neq. -/
291296
example : ∃ op : FsOp, isIdempotent op ∧ ¬ isFsCNO op := by
292-
exists (fun fs => mkdir "test" fs)
297+
obtain ⟨p, fs, h_neq⟩ := mkdir_not_identity
298+
exists (fun fs' => mkdir p fs')
293299
constructor
294-
· exact mkdir_idempotent "test"
300+
· exact mkdir_idempotent p
295301
· intro h
296302
unfold isFsCNO at h
297-
obtain ⟨p, fs, h_neq⟩ := mkdir_not_identity
298-
have := h fs
299-
sorry -- mkdir changes filesystem
303+
exact h_neq (h fs)
300304

301305
end FilesystemCNO

0 commit comments

Comments
 (0)