Skip to content

proofs: scope vacuous Agda CNO fields, fix archived PROOF-STATUS paths, pin stdlib, make OND-3 writer Z3 check real - #198

Open
hyperpolymath wants to merge 2 commits into
mainfrom
claude/ephapax-architecture-plan-gzyctr
Open

hyperpolymath wants to merge 2 commits into
mainfrom
claude/ephapax-architecture-plan-gzyctr

Conversation

@hyperpolymath

@hyperpolymath hyperpolymath commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

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

🤖 Generated with Claude Code

https://claude.ai/code/session_01J4QvDjUNwStGwcKTtAQ3NY

…dlib, make OND-3 writer check real

- CNO.agda (comments only): `terminates` is definitional (eval is total over a
  finite list, so every program "terminates") and `energy-dissipated` is the
  constant 0, so `thermodynamically-reversible` holds for every program. Say
  what they do and do not establish beside the definitions and on IsCNO.
- PROOF-STATUS.adoc: new "Scope of the Agda CNO fields" section; rows and
  sections that pointed at proofs/coq, proofs/lean4, proofs/isabelle,
  proofs/mizar and proofs/verify-all-provers.sh now point at archive/proofs/
  and are marked ARCHIVED instead of VERIFIED; 2026-11-09 receipts (z3 4.8.12,
  Agda 2.6.3 incl. --cubical-compatible); escape the `|` that split a table row.
- scripts/provision-agda-stdlib.sh: register agda-stdlib v1.7.3 pinned to
  commit 0817da68 (fails if the tag moves); used by CI's agda job, the
  Justfile (`just provision-agda-stdlib`) and named in verify-active-provers.sh.
- OND_checks.smt2: the OND-3 dir 2 block asserted (not (and (= 0 0) (= 1 1))),
  unsat for any program. It now computes the writer's O_all observable from a
  modelled writer_step/inj (per OND.v), plus a leaking-writer control (sat) and
  a writer_not_null witness (sat).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDjUNwStGwcKTtAQ3NY
@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 58 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between cbe9ae9 and 37c792a.

Files selected for processing: 25

  • .github/workflows/proofs.yml
  • ECHIDNA.adoc
  • EXPLAINME.adoc
  • Justfile
  • PROOF-STATUS.adoc
  • README.adoc
  • ROADMAP.adoc
  • docs/COOKBOOK.adoc
  • docs/ECOSYSTEM-CONNECTIONS.adoc
  • docs/JUSTFILE-COOKBOOK.adoc
  • docs/MACHINE_VERIFICATION.adoc
  • docs/OND-PILLAR-STRUCTURE.adoc
  • docs/OND-ROADMAP.adoc
  • docs/VERIFICATION_RESULTS.adoc
  • docs/proof-debt.adoc
  • docs/wiki/Architecture.md
  • docs/wiki/Audit-Trail.md
  • docs/wiki/Home.md
  • docs/wiki/Proof-Systems.md
  • docs/wiki/Roadmap.md
  • docs/wiki/Verification.md
  • proofs/agda/CNO.agda
  • proofs/verify-active-provers.sh
  • proofs/z3/ond/OND_checks.smt2
  • scripts/provision-agda-stdlib.sh
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

…ive gate

Follow-up to the PROOF-STATUS.adoc reconciliation in this PR. Docs that state
current facts now cite archive/proofs/{coq,lean4,isabelle,mizar}/... and
archive/proofs/verify-all-provers.six-prover.sh instead of the removed
proofs/... paths, and say "archived" / past tense where they claimed those
provers are currently built, verified or CI-gated. The active gate is named as
proofs/verify-active-provers.sh (Agda + Z3 bounded + Idris 2 ABI).

- README, EXPLAINME, ROADMAP: layout rows, evidence pointers, "what verifies"
  receipts and the CI row.
- docs/proof-debt.adoc: ledger file pointers moved to archive/proofs/, with an
  archive note in the status banner.
- docs/COOKBOOK.adoc, ECHIDNA.adoc: archive notice; input paths moved.
- docs/JUSTFILE-COOKBOOK.adoc: build-all matches the Justfile; build-coq,
  build-lean and verify-coq marked historical; clean-coq/clean-lean paths
  match the Justfile.
- docs/OND-PILLAR-STRUCTURE.adoc, OND-ROADMAP, ECOSYSTEM-CONNECTIONS,
  MACHINE_VERIFICATION, VERIFICATION_RESULTS: status text and commands.
- docs/wiki: Architecture data flow, Verification, Proof-Systems, Home,
  Roadmap, Audit-Trail.

Dated records (CHANGELOG, AUDIT resolved items, docs/archive/*, session notes,
historical plans) are left as written. No proof file changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDjUNwStGwcKTtAQ3NY
@hyperpolymath
hyperpolymath marked this pull request as ready for review November 9, 2026 15:45
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-09T15:45:48.369619Z
We couldn’t complete this review. Comment @codex review to try again.
37c792a Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@hyperpolymath
hyperpolymath enabled auto-merge (squash) November 9, 2026 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants