Repository navigation
Commit ad69ddf
proofs: scope vacuous Agda CNO fields, fix archived PROOF-STATUS paths, pin stdlib, make OND-3 writer Z3 check real (#198)
## Summary
This PR acts on the absolute-zero items in the ephapax v2 survey's
cross-repo action list, plus one Z3 finding.
1. **Agda CNO fields (comments and docs only, no definitions changed).**
In `proofs/agda/CNO.agda`, `terminates` holds by definition: `eval` is
total over a finite list, so `(eval p s , refl)` inhabits it for every
program. `energy-dissipated _ _ _ = zero`, so
`thermodynamically-reversible` holds for every program by `refl`. The
notes beside the definitions and on `IsCNO` now say what these fields
establish and what they do not. They also record that `IsCNO` never uses
the non-trivial `reversible` predicate, and that `cno-identity` is the
only field that constrains a program. PROOF-STATUS gains a new section,
"Scope of the Agda CNO fields".
2. **Archived paths in PROOF-STATUS.** `proofs/coq` and
`proofs/verify-all-provers.sh` no longer exist. Rows and sections now
point at `archive/proofs/{coq,lean4,isabelle,mizar}` and
`archive/proofs/verify-all-provers.six-prover.sh`. The Coq, Lean 4,
Isabelle/HOL and Mizar headings change from "VERIFIED (this
environment)" to "ARCHIVED (historical receipt)", and claims that they
are CI-gated now read as past tense. A pre-existing unescaped `|` in the
Z3 table row (`sat|unsat`) split the canonical table:
`scripts/check-adoc-tables.sh` failed on `main` and now passes.
3. **Reproducible stdlib.** The new `scripts/provision-agda-stdlib.sh`
clones agda-stdlib `v1.7.3`. It fails unless the tag resolves to the
pinned commit `0817da6877aa045932221134913d8511caa78d97`. It then
renames the manifest to `standard-library` and writes
`$AGDA_DIR/{libraries,defaults}`. The CI `agda` job now runs this script
in place of its inline steps. The script is also the `just
provision-agda-stdlib` recipe and is named in
`verify-active-provers.sh`.
4. **The OND-3 dir 2 Z3 check was vacuous.** The block asserted `(not
(and (= 0 0) (= 1 1)))`, which is unsat for any program. It now models
`writer_op` per `OND.v`: memory as an array, `inj`, `writer_step = store
m 0 7`, time 1, with the `O_all` observable computed from them. That
check returns `unsat`. A control with a leaking writer returns `sat`,
and a `writer_not_null` witness returns `sat`. If `writer_step` is
mutated to leak, the main verdict flips to `sat`.
## Checks run (actual output)
- `z3 proofs/z3/ond/OND_checks.smt2` (Z3 4.8.12): `sat unsat sat sat
sat`, exit 0.
- `bash proofs/z3/verify.sh`: `Z3-CHECK OK` (5 verdicts match).
- Agda 2.6.3 with the stdlib provisioned by the new script in a scratch
`AGDA_DIR`:
- `--safe --without-K`: CNO, OND, EchoBridgeScaffold and EchoBridgeCNO
each exit 0.
- `--safe --without-K --cubical-compatible`: all four exit 0.
- `bash proofs/tests/gate-selftest.sh`: `GATE-SELFTEST OK: 27/27`.
- `bash scripts/check-proof-patterns.sh`: OK.
- `bash scripts/check-adoc-tables.sh PROOF-STATUS.adoc`: OK.
- Idris 2: not run.
## Not done (follow-ups)
- The OND-3 dir 1 and OND-5 Z3 blocks still write the observables down
directly rather than computing them. This is recorded in PROOF-STATUS.
- Many other docs (README, EXPLAINME, ROADMAP, AUDIT, `docs/*`,
`docs/wiki/*`) still cite `proofs/coq` and `verify-all-provers.sh`. This
PR fixes PROOF-STATUS only.
- CI does not yet gate `--cubical-compatible`.
- The `License:` line in the `CNO.agda` header comment was left
untouched (licence edits are owner-only).
## Follow-up commit 37c792a: archived-path sweep in the other docs
This commit picks up the "many other docs" follow-up above. It changes
documentation only: no proof file, script or workflow.
Docs that state current facts now cite
`archive/proofs/{coq,lean4,isabelle,mizar}/…` and
`archive/proofs/verify-all-provers.six-prover.sh` in place of the
removed `proofs/…` paths. Where a doc claimed those provers are built,
verified or CI-gated now, it says "archived" or uses the past tense,
worded the way PROOF-STATUS is. The active gate is named as
`proofs/verify-active-provers.sh` (Agda + Z3 bounded + Idris 2 ABI). CI
is described as the `agda`, `z3` and `idris` jobs in `proofs.yml`.
Files changed (18):
- `README.adoc`, `EXPLAINME.adoc`, `ROADMAP.adoc`: layout rows, evidence
pointers, the "What genuinely verifies" receipts (now labelled as
2026-07-07 receipts) and the CI row.
- `docs/proof-debt.adoc`: ledger file pointers now go to
`archive/proofs/`, and the status banner has an archive note.
- `docs/COOKBOOK.adoc`, `ECHIDNA.adoc`: archive notice added; input
paths moved.
- `docs/JUSTFILE-COOKBOOK.adoc`: `build-all` now matches the Justfile
(Agda + Idris). `build-coq`, `build-lean` and `verify-coq` are marked
historical because the Justfile no longer has them. The
`clean-coq`/`clean-lean` paths now match the Justfile.
- `docs/OND-PILLAR-STRUCTURE.adoc`, `docs/OND-ROADMAP.adoc`,
`docs/ECOSYSTEM-CONNECTIONS.adoc`, `docs/MACHINE_VERIFICATION.adoc`,
`docs/VERIFICATION_RESULTS.adoc`: status text and commands.
-
`docs/wiki/{Architecture,Verification,Proof-Systems,Home,Roadmap,Audit-Trail}.md`.
References left on purpose:
- **Dated records, kept as written:** `CHANGELOG.adoc`, the resolved
items in `AUDIT.adoc`, `docs/archive/*`, `docs/PROOF-INSIGHTS.adoc`
(session note, 2026-02-05), `docs/PROOF-COMPLETION-PLAN.adoc`
(historical plan), `docs/proof-debt-triage.adoc` (self-described
historical triage), `docs/PROOF-CLASSIFICATION.adoc` (pre-completion
classification) and the historical sample output in the two cookbooks.
- **`docs/OND-PILLAR-STRUCTURE.adoc` layout tables:** these are the
original design sketch, and several of their paths exist in neither
`proofs/` nor `archive/proofs/`. The status banner now says this rather
than rewriting the tables.
- **`docs/CLAUDE.adoc`:** its `proofs/coq` references describe the
separate GitLab repository.
- **Paths that are created rather than moved:** `docs/COOKBOOK.adoc`
"Adding a New Language" (`proofs/coq/mylang/…`), and the ECHIDNA plan's
output paths (`proofs/coq-completed/`,
`proofs/lean4/CNO_translated.lean`).
- **Old names kept with their replacement:** where a sentence names the
old path, it is in the form "`proofs/verify-all-provers.sh` (now
archived as `archive/proofs/verify-all-provers.six-prover.sh`)".
Checks (actual output):
- Every path written in the added lines exists (`test -e`). The only old
paths left in added lines are the "old name → new name" phrasings.
- `bash scripts/check-adoc-tables.sh` on the 12 touched `.adoc` files:
11 OK. `EXPLAINME.adoc:134: unterminated table block` also fails on the
base commit: the file ends in `|===abc def ghi …`. That line is not
touched here.
- `asciidoctor -w` on the 12 touched `.adoc` files: the same 6
warnings/errors before and after the change (identical once line numbers
are normalised). They are the EXPLAINME table above, two "table missing
leading separator" errors in README, and the missing `pygments.rb` gem.
- No Markdown link checker exists in the repo, so none was run.
Found but not changed (outside a docs-only sweep):
- `verification/run-local-verification.sh` and
`verification/setup-and-verify.sh` still run `coqc`, `lake` and
`isabelle` against `proofs/coq`, `proofs/lean4` and `proofs/isabelle`.
- Several docs still cite `proofs/z3/cno_properties.smt2`. That file was
not moved to the archive; it no longer exists (`proofs/z3/verify.sh`
notes it was dropped on 2026-09-23).
---
_Generated by [Claude
Code](https://claude.ai/code/session_01J4QvDjUNwStGwcKTtAQ3NY)_
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01J4QvDjUNwStGwcKTtAQ3NY
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent ffcfed1 commit ad69ddf
23 files changed
Lines changed: 429 additions & 216 deletions
File tree
- .github/workflows
- docs
- wiki
- proofs
- z3/ond
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
69 | 65 | | |
70 | 66 | | |
71 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
18 | 28 | | |
19 | 29 | | |
20 | 30 | | |
| |||
95 | 105 | | |
96 | 106 | | |
97 | 107 | | |
98 | | - | |
| 108 | + | |
99 | 109 | | |
100 | 110 | | |
101 | 111 | | |
| |||
229 | 239 | | |
230 | 240 | | |
231 | 241 | | |
232 | | - | |
| 242 | + | |
233 | 243 | | |
234 | 244 | | |
235 | 245 | | |
| |||
248 | 258 | | |
249 | 259 | | |
250 | 260 | | |
251 | | - | |
| 261 | + | |
252 | 262 | | |
253 | 263 | | |
254 | | - | |
| 264 | + | |
255 | 265 | | |
256 | 266 | | |
257 | 267 | | |
258 | 268 | | |
259 | 269 | | |
260 | | - | |
261 | | - | |
| 270 | + | |
| 271 | + | |
262 | 272 | | |
263 | 273 | | |
264 | 274 | | |
| |||
340 | 350 | | |
341 | 351 | | |
342 | 352 | | |
343 | | - | |
| 353 | + | |
344 | 354 | | |
345 | 355 | | |
346 | 356 | | |
| |||
359 | 369 | | |
360 | 370 | | |
361 | 371 | | |
362 | | - | |
| 372 | + | |
363 | 373 | | |
364 | 374 | | |
365 | 375 | | |
| |||
371 | 381 | | |
372 | 382 | | |
373 | 383 | | |
374 | | - | |
| 384 | + | |
375 | 385 | | |
376 | 386 | | |
377 | 387 | | |
378 | 388 | | |
379 | 389 | | |
380 | 390 | | |
381 | 391 | | |
382 | | - | |
| 392 | + | |
383 | 393 | | |
384 | 394 | | |
385 | 395 | | |
| |||
418 | 428 | | |
419 | 429 | | |
420 | 430 | | |
421 | | - | |
| 431 | + | |
422 | 432 | | |
423 | 433 | | |
424 | 434 | | |
| |||
508 | 518 | | |
509 | 519 | | |
510 | 520 | | |
511 | | - | |
| 521 | + | |
512 | 522 | | |
513 | 523 | | |
514 | 524 | | |
| |||
574 | 584 | | |
575 | 585 | | |
576 | 586 | | |
577 | | - | |
| 587 | + | |
578 | 588 | | |
579 | 589 | | |
580 | 590 | | |
| |||
604 | 614 | | |
605 | 615 | | |
606 | 616 | | |
607 | | - | |
| 617 | + | |
608 | 618 | | |
609 | 619 | | |
610 | 620 | | |
611 | 621 | | |
612 | 622 | | |
613 | 623 | | |
614 | | - | |
| 624 | + | |
615 | 625 | | |
616 | 626 | | |
617 | 627 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
| |||
0 commit comments