Skip to content

docs(proofs): record what the active Agda CNO/OND terms actually state - #197

Open
hyperpolymath wants to merge 1 commit into
mainfrom
docs/proof-claims-audit-2026-11-09
Open

hyperpolymath wants to merge 1 commit into
mainfrom
docs/proof-claims-audit-2026-11-09

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

A statement-level review of proofs/agda/ (2026-11-09) found that the ledger and docs claim more than the active Agda proves. This PR corrects the labels and prose only. No proof term changes. The redesign of the CNO definition is a separate follow-up.

Item What the Agda states Label now
IsCNO state-eq includes state-pc, and every instruction except Halt moves the PC, so cno-identity holds only for Halt-only programs. The archived Coq fixed this on 2026-05-18; the active Agda did not. Degenerate class. Results over it are proven about that class only.
terminates ∃ s′. eval p s ≡ s′, inhabited by (eval p s , refl) Holds by construction; not a termination result
thermodynamically-reversible energy-dissipated _ _ _ = zero Holds by construction; not a Landauer/Bennett result
OND-5 "mirrored" Agda states it under O-out, Coq/Lean under O_all Different propositions; correspondence unassessed
OND-3 anchoring to is_CNO Only in the archived Coq; OND.agda never imports CNO Not anchored in the active Agda
Grades The superseded "Grade 3" label PROOF-POLICY §8: proven, ungraded until a PWG-3 receipt is recorded

Also:

  • flags the z3 5.3.3 receipt version as unverified, since the file also records 4.16.0 elsewhere;
  • corrects EXPLAINME's description of the active prover stack;
  • adds an audit note at the IsCNO definition (comment only).

Verification

All four modules recheck cold under agda --safe --without-K --cubical-compatible, using Agda 2.6.3 with agda-stdlib 2.3. This was a local run, not a CI receipt.

Follow-ups (not in this PR)

  • Redefine state-eq without the PC.
  • Give termination and reversibility real content, or drop them from IsCNO.
  • Restate Agda OND-5 to match the other provers, or record the difference.
  • Strict pragmas.
  • Make the CI invocation canonical: add --cubical-compatible.
  • Record a PWG-3 receipt.
  • Record the PROOF-POLICY §6 toolchain deviation, since CI installs Agda from apt and stdlib from git.

Generated by Claude Code

A statement-level review (2026-11-09) found that several claims in the
ledger and docs say more than the active Agda proves. This commit changes
labels and prose only; no proof term changes.

- IsCNO is degenerate: state-eq includes the program counter, which every
  instruction except Halt moves, so cno-identity holds only for Halt-only
  programs. The archived Coq fixed this on 2026-05-18; the Agda did not.
- terminates and thermodynamically-reversible hold by construction for
  every program (eval is total; energy-dissipated is constantly zero).
- The Agda OND-5 (under O-out) and the archived Coq/Lean OND-5 (under
  O_all) are different propositions; correspondence is unassessed.
- The OND-3 anchoring to is_CNO exists only in the archived Coq.
- Grades now follow PROOF-POLICY §8 (PWG). The Agda proofs are `proven`
  but `ungraded` until a PWG-3 receipt is recorded; the superseded
  "Grade 3" label is removed.
- Flags the unverified "z3 5.3.3" receipt version and corrects
  EXPLAINME's description of the active prover stack.

All four modules recheck cold under
`agda --safe --without-K --cubical-compatible` (Agda 2.6.3, stdlib 2.3,
local, not a CI receipt).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MF5GeeBBDF6sUzr6pZTjWV
@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 51 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 e466001.

Files selected for processing: 5

  • EXPLAINME.adoc
  • PROOF-STATUS.adoc
  • README.adoc
  • docs/TWO-PILLARS.adoc
  • proofs/agda/CNO.agda
  • 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

@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:52:42.842233Z
We couldn’t complete this review. Comment @codex review to try again.
e466001 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 23:31
hyperpolymath added a commit that referenced this pull request Nov 10, 2026
Stacked on #197 (the claims audit). Merge
that first; this PR then shows only its own commit, `d8abb02`.

## Why

The 2026-11-09 design audit found the active Agda `IsCNO` degenerate:

- `state-eq` compares the program counter, and `step` advances it, so
only `Halt`-only programs were CNOs.
- `terminates` held for every program because `eval` is a total fold
over the list. `Jump` did not change control flow.
- `energy-dissipated` was constantly zero, so `cno-reversible` held for
every program.

## What changes in `proofs/agda/CNO.agda`

- **A pc-driven machine.** The big-step relation `_⊢_⇓_` stops when the
pc runs off the end or hits `Halt`. The fuel interpreter `run` agrees
with it in both directions (`run-sound`, `run-complete`). A Store or Add
on a missing register faults: no normal stop. The machine is
deterministic (`⇓-det`).
- **`obs-eq`.** Memory, registers and I/O. `state-eq` is kept as full
equality.
- **`IsCNO p`.** From every state, started at pc 0, the machine stops
normally, and every normal stop is `obs-eq` to the start. Purity
(`cno-pure-thm`) and observational reversibility (`cno-left-inverse`)
are derived, not assumed. The constant energy model and the unused
`reversible` are removed; nothing thermodynamic is claimed here.
- **Composition.** `seq-comp` relocates the second program's jumps.
`cno-composition` needs `Closed p₁` (no jump past `p₁`'s end).
`closedness-needed` is a checked counterexample showing the condition
cannot be dropped.
- **Witnesses for and against.**
- `nop-is-cno`, `jump-exit-is-cno` and `nop-nop-is-cno`: the class is
not Halt-only.
  - `load-not-cno`: the class is not everything.
  - `jump-self-diverges`: termination is not automatic.

`EchoBridgeCNO.agda` is restated over `cno-result` and `obs-eq`. The `≡`
form is on the observable projection `observe`, and
`program-state-model` is a `CNOModel` over observable states.

## Strict flags

All four modules now declare `--safe --without-K --cubical-compatible
--exact-split --no-sized-types --no-guardedness`. The CI job runs each
module with the PROOF-POLICY §2.1 invocation plus `--double-check -W
error -W noUnsupportedIndexedMatch`. The earlier `Add` overlap that
`--exact-split` rejected is gone, because Store and Add now dispatch
through `store-at` and `add-at`.

## Checks run locally

| Toolchain | CNO | OND | EchoBridgeScaffold | EchoBridgeCNO |
|---|---|---|---|---|
| Agda 2.6.3 + stdlib v1.7.3 (as CI) | pass | pass | pass | pass |
| Agda 2.7.0.1 + stdlib 2.3, cold (`--ignore-interfaces`) | pass | pass
| pass | pass |

`scripts/check-proof-patterns.sh`, `tests/check-proof-patterns.sh` and
`scripts/check-adoc-tables.sh` on the edited docs all pass. No
postulates, no escape pragmas.

## Docs

The `PROOF-STATUS.adoc` audit rows are marked resolved, with the
original findings kept as history. README, EXPLAINME, GLOSSARY,
TWO-PILLARS and `proofs/agda/README.adoc` are updated to match.

## Downstream

hyperpolymath/echo-types pins absolute-zero at `f486c29`, so nothing
breaks now. Its CNO modules (`EchoCNOBridge`, `EchoCNOSemantics`,
`EchoCNOPackaging`, `EchoThermodynamicsArbitrary`) will need adapting
when it repins.

## Not touched

The `CNO.agda` header still says `License: AGPL-3.0 / Palimpsest 0.5`.
AGPL is on the estate deny list, but licence edits are owner-only, so it
is left as it is.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01MF5GeeBBDF6sUzr6pZTjWV)_

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Formalization Updates**
* The active Agda proofs now model program-counter-driven execution,
normal termination, and observable state preservation. The documented
CNO claims no longer include a thermodynamic guarantee.
* Added examples covering sequential composition and programs that fail
to meet CNO conditions.

* **Verification**
* Agda checks now apply stricter validation. Z3 checks remain bounded
and are marked tested-only.

* **Documentation**
* Proof statuses now use Proof Witness Grades: active Agda proofs are
ungraded pending a receipt, and OND-6 remains open. Archived prover work
is distinguished from active checks.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
hyperpolymath added a commit to hyperpolymath/echo-types that referenced this pull request Nov 10, 2026
## Summary

A statement-level review (2026-11-09) compared PROOF-STATUS, the
`Smoke.agda` comments and module headers with the Agda statements they
describe. This PR changes **comments, ledger text and labels only**. No
proof term changes, and every theorem name and Smoke pin is kept.
Strengthening the thin results is a separate follow-up.

**Vacuous or hypothesis-restating results, now labelled as such:**

| Result | What it states |
|---|---|
| `bennett-reversible-arbitrary` | The `inj` hypothesis is unused; the
cost is 0 for **every** `f`, because occupancy is 0 or 1 and ⌊log₂⌋ of
either is 0. |
| `partial-deniable-restricted` | `= const`: the theorem restates its
hypothesis. |
| `measure-not-injective` | Conditional on the measure already agreeing
on two distinct echoes; it does not show every measure is lossy. |

**Overclaims corrected:**
- PROOF-STATUS "Pillars A–D COMPLETE" restated claims that R-2026-05-18
withdrew: graded-comonad laws, the terminal-cone universal property,
model-independence, and the conservativity metatheorem.
- `EchoAbstractionBarrier` claimed a guarantee, but there is no enforced
barrier: `Echo` is a transparent Σ.
- `EchoEntropy`'s "blind" results hold by construction (the shadow is
constant).
- `EchoLLEncoding` holds only for encodings whose linear carrier is a
proposition.
- F5 proves that a comparison iso exists, not that it is unique, and its
lifting uses only that one leg is an equivalence.
- The EchoVariance/F1 Smoke comments overclaimed: there is no graded
monad and no adjunction, and F1 is a lossless writer that does not
mention Echo.
- `EchoProvenance`'s Echo-vs-Σ clearance claim does not hold.
- `ImageFactorizationProp` is conditional on a `TruncInterface` that the
`--safe` build does not supply.

**Stale text fixed:**
- the nonexistent names `const-fibre-↔-domain` and
`aggregate-non-injective`;
- "F5-3 remains the final open slice";
- the "scaffold" labels in `All.agda`;
- σ–π "set equality", which is actually ⇔;
- the CNO module list in MAP.adoc.

PROOF-STATUS gains a "Design audit (2026-11-09)" table. It also records
that every theorem is `ungraded` under PROOF-POLICY §8: no PWG-3 receipt
is in the repo and no Rocq/Lean leg exists.

## Verification (local, not CI receipts)

Run with the pinned toolchain from `scripts/setup-agda.sh`: Agda
2.7.0.1, stdlib `8326c74`, absolute-zero `f486c29`.
- `All`, `Smoke` and `AuditSmoke` compile under `--safe --without-K
--cubical-compatible`.
- `kernel-guard.sh`, `check-agda-invocations.sh`, `check-no-unsafe.sh`
and `tools/check-guardrails.sh` pass.
- Earlier today, all eight CI entrypoints of `main` passed cold on the
same toolchain.

## Related

hyperpolymath/absolute-zero#197 records that the active Agda `IsCNO` is
degenerate. That affects every CNO-facing result here (`EchoCNOBridge`,
`EchoCNOSemantics`, `EchoCNOPackaging`, `EchoThermodynamicsArbitrary`).

---
_Generated by [Claude
Code](https://claude.ai/code/session_01MF5GeeBBDF6sUzr6pZTjWV)_

Co-authored-by: Claude <noreply@anthropic.com>
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