Skip to content

Commit 15c082f

Browse files
Coq: re-verify 0 real gaps + fix build/verify from clean; add just run launcher (#164)
Two outstanding items, both verified with the actual toolchain. ## 1. Coq proof stack — re-verified 0 admits / 0 real gaps (Coq 8.18.0) The full `_CoqProject` (11 files) compiles with **zero `admit`/`Admitted`/`Axiom`** markers. `Print Assumptions` on the load-bearing theorems: | Theorem | Assumptions | |---------|-------------| | `obliterate_overwrites_all_blocks` | **Closed under the global context** (zero axioms) | | `overwrite_pass_equalizes_storage` (#57) | **Closed under the global context** | | `single_op_reversible` / `operation_sequence_reversible` / `copy_file_reversible` / `mkdir_two_dirs_reversible` (#56) / `obliterate_not_injective` (#58) | `functional_extensionality_dep` only | The historically-tracked "1 real gap" and the three 2026-06-02 admits (#56/#57/#58) are all closed. Remaining assumptions are standard/justified: Coq `functional_extensionality` (stdlib) + `is_empty_dir_dec` (justified classical), Agda `funext` (structural). **Net: 2 documented axioms, 0 real gaps.** Docs reconciled (live docs only; dated audit snapshots left as records): `PROOF_HOLES_AUDIT.md`, `README.adoc`, `FAQ.adoc`, `CLAUDE.md`, `docs/wiki/`, `ROADMAP*.{adoc,md}`, `STATE.a2ml`, `methodology.a2ml`, `CHANGELOG.adoc`. ## 2. Coq build/verify entry points — fixed to work from a clean checkout - `just build-coq` and `scripts/verify-proofs.sh` compiled an incomplete file subset (missing `filesystem_composition.v` etc.), so `posix_errors.v` failed with *"Cannot find a physical path bound to logical path filesystem_composition."* Both now compile the full `_CoqProject` chain in order and `mkdir -p extracted` before `extraction.v`, matching the `validation.yml` CI oracle. - `scripts/verify-proofs.sh`: fixed two latent `set -e` bugs that aborted before any test ran — `((VAR++))` counters (first bump from 0 returns exit 1) → assignment form; per-test `cd` leaks → each command runs in a subshell. Script now runs end-to-end (exit 0). - gitignore `proofs/coq/.lia.cache`. ## 3. Launcher — add `just run` / `just launch` The user-facing launcher was missing (no `run`/`setup`/`install` recipe), and `QUICKSTART-USER.adoc` was an unfilled template promising recipes that didn't exist. - Added `just run *ARGS` (alias `just launch`): builds and starts the interactive `vsh` shell, passing args through. **Verified end-to-end:** `just run --version` → `vsh 0.9.0` (exit 0); REPL banner starts; `just run <script>` executes and exits 0. - Rewrote `QUICKSTART-USER.adoc` to the real flow — every `just` command it cites is a real recipe (verified via `just --show`). **Scope note:** full alignment to the external *launcher standard* (`hyperpolymath/standards`) is not attempted — that repo is outside this session's GitHub scope. This adds a real, verified launch entry point consistent with what the quickstart already promised; standard-conformance can follow when the standard is readable. ## Validation - `coqc -R . ValenceShell` on all 11 files: clean; `Print Assumptions` as tabulated. - `just build-coq` and `scripts/verify-proofs.sh` from a cleaned tree: exit 0. - `just run --version`, `just run <script>`: exit 0 with correct output. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01KfgJznd6jzSeDYsSXGAXkU --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent dbab186 commit 15c082f

16 files changed

Lines changed: 281 additions & 151 deletions

.machine_readable/6a2/STATE.a2ml

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -71,28 +71,33 @@ tasks-completed = [
7171
]
7272

7373
[coq-proof-status]
74-
admitted = 3
74+
admitted = 0
7575
axioms-justified = 1
7676
admitted-detail = """
77-
3 Admitted markers as of 2026-06-02 post-PR #55 design-gap surfacing:
78-
79-
1. mkdir_two_dirs_reversible (filesystem_composition.v:697) — non-LIFO
80-
sequence reversal; not derivable from two_op_sequence_reversible as
81-
stated. Tracked as #56 (restate as LIFO sequence).
82-
83-
2. overwrite_pass_equalizes_storage (rmo_operations.v:422) — model gap.
84-
Needs Hgeom strengthening or conclusion relaxation. Tracked as #57.
85-
86-
3. obliterate_not_injective (rmo_operations.v:535) — downstream of #57;
87-
reconnects once #57 closes. Tracked as #58.
88-
89-
The prior single_op_reversible OpRmdir admit (declared 2026-04-19) was
90-
Qed-closed by PR #67 (2026-06-01) via OpMkdirWithPerms +
91-
OpCreateFileWithPerms constructor-variant approach — zero new axioms.
77+
0 Admitted markers. Re-verified 2026-07-16 with `coqc` + `Print Assumptions`
78+
under Coq 8.18.0: the full _CoqProject (11 files) compiles with zero
79+
admit/Admitted/Axiom markers. The 3 admits recorded here on 2026-06-02 are all
80+
now Qed-closed:
81+
82+
1. mkdir_two_dirs_reversible (filesystem_composition.v:681, now an Example)
83+
— CLOSED (#56); Print Assumptions: functional_extensionality_dep only.
84+
85+
2. overwrite_pass_equalizes_storage (rmo_operations.v:398) — CLOSED (#57);
86+
Print Assumptions: Closed under the global context (zero axioms).
87+
88+
3. obliterate_not_injective (rmo_operations.v:530) — CLOSED (#58);
89+
Print Assumptions: functional_extensionality_dep only.
90+
91+
The single_op_reversible OpRmdir model-permission admit (declared 2026-04-19)
92+
was Qed-closed via OpMkdirWithPerms + OpCreateFileWithPerms constructor variants
93+
— zero new axioms. The 1 real gap the audit historically tracked
94+
(obliterate_overwrites_all_blocks) is CLOSED: Print Assumptions reports Closed
95+
under the global context. Remaining Coq assumptions: functional_extensionality_dep
96+
(stdlib standard) + is_empty_dir_dec (1 justified classical).
9297
"""
9398
axiom-detail = "is_empty_dir_dec: Filesystem = Path -> option FSNode is infinite-domain; universal quantification over all paths is not constructively decidable. Migration: switch to FMaps.t FSNode."
94-
proof-debt-items-closed = [1, 2]
95-
proof-debt-open = [3]
99+
proof-debt-items-closed = [1, 2, 3]
100+
proof-debt-open = []
96101

97102
[dogfooding-status]
98103
# Section present per CRG v2.0 schema. Honest disclosure follows.

.machine_readable/bot_directives/methodology.a2ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ constraints = [
9898
"Lean -> Rust correspondence is property-tested only (~85% confidence), NOT mechanised — closing this is the critical-path blocker to v1.0.0",
9999
"Elixir NIF build is broken — impl/elixir/ is reference-only; do not block work on it",
100100
"BEAM daemon is designed but not implemented — no current SNIF carrier",
101-
"Coq has 1 remaining real proof gap: obliterate_overwrites_all_blocks (mechanical induction over overwrite passes) — see docs/PROOF_HOLES_AUDIT.md",
101+
"Coq has 0 remaining real proof gaps: obliterate_overwrites_all_blocks is CLOSED (Print Assumptions: Closed under the global context, re-verified 2026-07-16 under Coq 8.18.0) — see docs/PROOF_HOLES_AUDIT.md",
102102
"Agda has 1 structural axiom (funext) — provable in cubical Agda, intentional in intensional TT",
103103
"Coq has 1 justified decidability axiom (is_empty_dir_dec) — infinite-domain Filesystem = Path -> option FSNode; switching to FMaps.t FSNode is the documented migration",
104104
"RMO (GDPR / secure deletion) primitives are stubs in impl/rust-cli/src/commands/secure_deletion.rs — proofs exist for the model, runtime does not yet bind to them",

CHANGELOG.adoc

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,59 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717
- Full POSIX shell compliance (subset)
1818
- RMO (Remove-Match-Obliterate) proofs for GDPR compliance
1919

20+
=== Added — 2026-07-16
21+
22+
==== Launcher
23+
- `just run` (alias `just launch`) — the user-facing launcher for the `vsh`
24+
shell, previously missing. Builds and starts the interactive REPL; passes
25+
extra arguments through to the binary (`just run --version`,
26+
`just run script.vsh`). Verified end-to-end: `--version` prints `vsh 0.9.0`
27+
(exit 0), the REPL banner starts interactively, and script execution runs and
28+
exits 0.
29+
- `QUICKSTART-USER.adoc` rewritten from the unfilled RSR template to the real,
30+
working flow — it no longer references non-existent recipes (`just setup`,
31+
`just uninstall`, `just stapeln-run`, `just install --portable`); every `just`
32+
command it now cites is a real recipe (verified via `just --show`). Uninstall
33+
documents the honest `cargo uninstall vsh` path.
34+
35+
=== Verified — 2026-07-16
36+
37+
==== Proofs
38+
- Coq proof-debt re-verified to **0 admits / 0 real gaps** under Coq
39+
8.18.0. The full `_CoqProject` (11 files) compiles with no
40+
`admit`/`Admitted`/`Axiom` markers. `Print Assumptions` on the
41+
load-bearing theorems: `obliterate_overwrites_all_blocks` and
42+
`overwrite_pass_equalizes_storage` are *Closed under the global
43+
context* (zero axioms); `single_op_reversible`,
44+
`operation_sequence_reversible`, `copy_file_reversible`,
45+
`mkdir_two_dirs_reversible`, `obliterate_not_injective` depend only on
46+
the standard `functional_extensionality_dep`. The historically-tracked
47+
"1 real gap" (`obliterate_overwrites_all_blocks`) and the three
48+
2026-06-02 admits (#56/#57/#58) are all closed. Remaining assumptions
49+
are standard/justified: Coq `functional_extensionality` (stdlib) +
50+
`is_empty_dir_dec` (justified classical), Agda `funext` (structural).
51+
Docs reconciled: `PROOF_HOLES_AUDIT.md`, `README.adoc`, `FAQ.adoc`,
52+
`CLAUDE.md`, `docs/wiki/`, `ROADMAP*.{adoc,md}`,
53+
`.machine_readable/6a2/STATE.a2ml`, `bot_directives/methodology.a2ml`.
54+
55+
=== Fixed — 2026-07-16
56+
57+
==== Build / tooling
58+
- `just build-coq` and `scripts/verify-proofs.sh` now succeed from a
59+
clean checkout. Both previously compiled an incomplete file subset
60+
(missing `filesystem_composition.v` and others), so `posix_errors.v`
61+
failed with "Cannot find a physical path bound to logical path
62+
filesystem_composition"; both now compile the full `_CoqProject`
63+
chain in dependency order and `mkdir -p extracted` before
64+
`extraction.v` (the gitignored output dir), matching the CI oracle in
65+
`validation.yml`.
66+
- `scripts/verify-proofs.sh`: fixed two latent `set -e` bugs that
67+
aborted the script before any test ran — `((VAR++))` counters
68+
(post-increment returns the pre-value, so the first bump from 0
69+
yields exit status 1) replaced with assignment form; and per-test
70+
`cd` side effects that leaked between tests are now isolated by
71+
running each test command in a subshell.
72+
2073
=== Added — 2026-06-02
2174

2275
==== Implementation

CLAUDE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ The Rust CLI is a functional interactive shell with these features:
8686

8787
- 21,331 lines of Rust across 32 source files (`find impl/rust-cli/src -name '*.rs' | wc -l`; `wc -l` aggregate, measured 2026-06-01)
8888
- ~478 theorem candidates across 6 proof systems + Idris2 ABI layer (per issue #42 deep-audit inventory, 2026-06-01)
89-
- 3 proof holes remaining: 1 real gap (Coq `obliterate_overwrites_all_blocks`), 1 justified axiom (Coq `is_empty_dir_dec` — infinite-domain decidability), 1 structural axiom (Agda `funext` — standard in intensional TT) — see `docs/PROOF_HOLES_AUDIT.md`
89+
- 2 proof holes remaining, **0 real gaps**: 1 justified axiom (Coq `is_empty_dir_dec` — infinite-domain decidability), 1 structural axiom (Agda `funext` — standard in intensional TT). The former real gap (Coq `obliterate_overwrites_all_blocks`) is CLOSED — re-verified 2026-07-16 via `Print Assumptions` (*Closed under the global context*) under Coq 8.18.0 — see `docs/PROOF_HOLES_AUDIT.md`
9090
- Idris2 ABI layer: **0 proof holes** (all closed 2026-07-01, issue #151 root — builds under `--total`), 0 `partial` markers, 2 registered primitive-eq axioms (`axStringEqRefl`, `axBits8EqRefl`; gated by `.github/scripts/check-idris2-believe-me.sh`)
9191
- 7 fuzz targets in `impl/rust-cli/fuzz/fuzz_targets/` (parser, arith, job-spec, signal-parse, path-ops, glob-expansion, state-machine)
9292

@@ -95,7 +95,7 @@ The Rust CLI is a functional interactive shell with these features:
9595
### Critical Priority
9696

9797
1. **No mechanized Lean -> Rust correspondence** — testing only, ~85% confidence
98-
2. **1 real proof gap** remaining (Coq `obliterate_overwrites_all_blocks` — mechanical induction over overwrite passes), plus 2 documented axioms (1 justified decidability + 1 structural funext) — see `docs/PROOF_HOLES_AUDIT.md`
98+
2. **0 real proof gaps** — the former Coq `obliterate_overwrites_all_blocks` gap is CLOSED (re-verified 2026-07-16, *Closed under the global context*); 2 documented axioms remain (1 justified decidability + 1 structural funext) — see `docs/PROOF_HOLES_AUDIT.md`
9999
3. **NOT production-ready** — research prototype only
100100

101101
### High Priority
@@ -191,7 +191,7 @@ valence-shell/
191191
mcp/ # MCP server bindings
192192
proofs/
193193
lean4/ # Primary proof source (101 theorems)
194-
coq/ # CIC proofs + extraction (131 theorems, 3 admits in extraction.v)
194+
coq/ # CIC proofs + extraction (131 theorems, 0 admits — re-verified 2026-07-16, Coq 8.18.0)
195195
agda/ # Type theory proofs (85 theorems, 3 postulates including funext)
196196
isabelle/ # HOL proofs (76 theorems)
197197
mizar/ # Set theory proofs (63 theorems)
@@ -326,7 +326,7 @@ MPL-2.0 (Palimpsest License)
326326

327327
---
328328

329-
**Last Updated**: 2026-06-01 (drift reconcile: 32 src files / 21,331 LoC, 3 proof holes per audit, 478 theorem candidates, 7 fuzz targets)
329+
**Last Updated**: 2026-07-16 (Coq proof-debt re-verified: 0 admits / 0 real gaps under Coq 8.18.0; 2 justified/structural axioms remain. Prior 2026-06-01 drift reconcile: 32 src files / 21,331 LoC, 478 theorem candidates, 7 fuzz targets)
330330
**Version**: see `CHANGELOG.md` (release history) and `impl/rust-cli/Cargo.toml` `[package].version` (semver pin)
331331
**Status**: Advanced research prototype — NOT production-ready
332332
**Tests**: 736 passing, 0 failures, 14 ignored

FAQ.adoc

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,9 @@ deep-audit inventory in `docs/audits/2026-06-01-deep-audit.adoc`.
8686
What is solid:
8787

8888
* The 6-system proofs of the model-layer operations. ~478 theorem candidates;
89-
1 real gap remaining (Coq `obliterate_overwrites_all_blocks`) + 2 documented
90-
axioms (1 justified decidability + 1 structural funext).
89+
0 real gaps (Coq `obliterate_overwrites_all_blocks` CLOSED, re-verified
90+
2026-07-16 via `Print Assumptions` under Coq 8.18.0) + 2 documented axioms
91+
(1 justified decidability + 1 structural funext).
9192
* The Rust CLI. 736 tests passing, 0 failures, 7 fuzz targets, working shell
9293
surface (pipelines, redirections, here-docs, job control, variables, control
9394
structures, glob, quoting).
@@ -116,12 +117,12 @@ plus the Idris2 ABI layer, distributed as:
116117
|===
117118
|System |Count |Notes
118119
|Lean 4 |101 |Primary source of truth
119-
|Coq |131 |Includes `extraction.v` — 3 admits remaining
120+
|Coq |131 |Includes `extraction.v` — 0 admits (re-verified 2026-07-16, Coq 8.18.0)
120121
|Isabelle/HOL |76 |Cross-validation
121122
|Agda |85 |3 postulates remaining (including funext)
122123
|Mizar |63 |Set-theoretic foundation
123124
|Z3 SMT |125 asserts |Automated decision procedures
124-
|Idris2 (ABI + filesystem) |~22 |2 holes + 10 partial markers
125+
|Idris2 (ABI + filesystem) |~22 |0 holes, 0 partials, 2 primitive-eq axioms (closed #151/#152)
125126
|===
126127

127128
If you see a stale number elsewhere in the repo, please file an issue —
@@ -178,8 +179,8 @@ Valence-shell follows the estate boundary-convention policy
178179
(`feedback_estate_boundary_conventions`):
179180

180181
* In-process FFI (Rust ↔ C) — Zig scaffolding in `impl/zig/`.
181-
* Formal ABI / proof carrier — Idris2 in `proofs/idris2/` (~22 theorems, 2 holes,
182-
10 partial markers per issue #42).
182+
* Formal ABI / proof carrier — Idris2 in `proofs/idris2/` (~22 theorems, 0 holes,
183+
0 partial markers, 2 primitive-eq axioms; closed via #151/#152, builds under `--total`).
183184
* BEAM ↔ native — would use SNIFs; not currently wired (BEAM daemon is
184185
designed but not implemented).
185186
* Compile target / typed-wasm — not currently a target.

Justfile

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
# Default recipe - show available commands
55
import? "contractile.just"
66

7+
# `just launch` is a synonym for `just run` (launch the vsh shell)
8+
alias launch := run
9+
710
default:
811
@just --list
912

@@ -15,13 +18,22 @@ build-all: build-coq build-lean4 build-agda build-isabelle build-mizar build-idr
1518
verify-all:
1619
@./scripts/verify-proofs.sh
1720

18-
# Build Coq proofs
21+
# Build Coq proofs (full _CoqProject chain, in dependency order)
1922
build-coq:
2023
@echo "Building Coq proofs..."
21-
cd proofs/coq && coqc filesystem_model.v
22-
cd proofs/coq && coqc file_operations.v
23-
cd proofs/coq && coqc posix_errors.v
24-
cd proofs/coq && coqc extraction.v
24+
# extraction.v writes to extracted/filesystem.ml; the dir is gitignored, so create it.
25+
cd proofs/coq && mkdir -p extracted
26+
cd proofs/coq && coqc -R . ValenceShell filesystem_model.v
27+
cd proofs/coq && coqc -R . ValenceShell file_operations.v
28+
cd proofs/coq && coqc -R . ValenceShell file_content_operations.v
29+
cd proofs/coq && coqc -R . ValenceShell copy_move_operations.v
30+
cd proofs/coq && coqc -R . ValenceShell symlink_operations.v
31+
cd proofs/coq && coqc -R . ValenceShell permission_operations.v
32+
cd proofs/coq && coqc -R . ValenceShell filesystem_composition.v
33+
cd proofs/coq && coqc -R . ValenceShell filesystem_equivalence.v
34+
cd proofs/coq && coqc -R . ValenceShell posix_errors.v
35+
cd proofs/coq && coqc -R . ValenceShell rmo_operations.v
36+
cd proofs/coq && coqc -R . ValenceShell extraction.v
2537
@echo "✓ Coq proofs compiled"
2638

2739
# Build Lean 4 proofs
@@ -68,7 +80,8 @@ verify-idris2: build-idris2
6880
# Extract Coq to OCaml
6981
extract:
7082
@echo "Extracting Coq to OCaml..."
71-
cd proofs/coq && coqc extraction.v
83+
# extraction.v writes to extracted/filesystem.ml; the dir is gitignored, so create it.
84+
cd proofs/coq && mkdir -p extracted && coqc extraction.v
7285
@echo "✓ OCaml code extracted"
7386

7487
# Build OCaml FFI (legacy)
@@ -113,6 +126,14 @@ test-cli:
113126
cd impl/rust-cli && cargo test
114127
@echo "✓ Rust CLI tests passed"
115128

129+
# Launch the interactive vsh shell (the primary deliverable). Extra args pass
130+
# through to the binary:
131+
# just run # start the interactive REPL
132+
# just run --version # print version and exit
133+
# just run script.vsh # run a script
134+
run *ARGS:
135+
cd impl/rust-cli && cargo run -- {{ARGS}}
136+
116137
# Build all FFI layers
117138
build-ffi: build-ffi-zig build-ffi-ocaml
118139
@echo "✓ All FFI layers built"

0 commit comments

Comments
 (0)