You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(proofs/idris2): redesign auditTrailCompleteness as per-insertion theorem (closes#131) (#135)
## Summary
- Redesigns the third non-theorem from the `#119` Category A inventory,
following the `#60` / `#61` / `#119A` precedent: restate-then-prove
rather than discharge with `believe_me`.
- The previous shape `Elem p (map AuditEntry.path entries)` was refuted
by `entries := []` (an `ObliterationProof` for any `p` is trivially
constructible, but the empty log contains no paths).
- New shape threads `(log, entry, p, insertedPath : AuditEntry.path
entry = p)` and proves `Elem p (map AuditEntry.path (appendAuditEntry
log entry))` — the actual invariant: the path is in the post-append log
*because* the entry recording it was appended via the official
constructor.
## Closure (zero new axioms, zero `believe_me`)
1. `appendAuditEntry log entry` reduces to `log ++ [entry]` by
definition (already discharged as `appendOnlyAuditLog : Refl`).
2. Stdlib `Data.List.Elem.elemMap` lifts membership through `map`.
3. A short local helper `elemAppRightSelf : (xs : List a) -> (x : a) ->
Elem x (xs ++ [x])` discharges the append-right case by induction —
Idris2 0.8.0 base does not ship this lemma.
4. `rewrite sym insertedPath` substitutes `AuditEntry.path entry` with
`p` in the goal.
## Files
- `proofs/idris2/src/Filesystem/RMO.idr` — redesigned signature + closed
proof + the local `elemAppRightSelf` helper + a doc comment recording
the design rationale (mirrors the `#60` / `#61` / `#119A` style).
- `PROOF-NEEDS.md` — inventory updated (`RMO.idr` hole count 3 → 2),
closure-history row added for 2026-06-03, drift paragraph + Cat-A bullet
reconciled.
## Test plan
- [x] `cd proofs/idris2 && rm -rf build && idris2 --build
valence-shell.ipkg` — exit 0, all four modules build clean
- [x] `grep -c '?auditTrailCompleteness'
proofs/idris2/src/Filesystem/RMO.idr` returns 0 (hole closed)
- [x] `grep -c 'believe_me' proofs/idris2/src/Filesystem/RMO.idr`
returns 2 — both inside `|||` doc comments, no actual invocations
- [x] No edits to `proofs/idris2/src/Filesystem/Axioms.idr` (the only
sanctioned `believe_me` location remains untouched)
- [ ] CI `verify-idris2` job (idris-verification.yml) green
- [ ] Owner sanity-check the redesigned signature reflects the intended
invariant
Closes#131.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|`Model.idr`| 2 (`equivReflProof`, `equivTransProof`; `equivSymProof` is closed via `andCommutative`) | 0 |
41
-
|`RMO.idr`|3 (`overwriteIrreversibleProof`, `hardwareEraseIrreversibleProof`, `auditTrailCompletenessProof`; `appendOnlyAuditLogProof` is closed via `Refl`) | 0 |
41
+
|`RMO.idr`|2 (`overwriteIrreversibleProof`, `hardwareEraseIrreversibleProof`; `appendOnlyAuditLogProof` is closed via `Refl`; `auditTrailCompletenessProof` is closed via redesign + `elemMap` + `elemAppRightSelf` — see #131) | 0 |
42
42
43
-
Drift from previous PROOF-NEEDS.md tally (22 holes) to current (16 holes) is mechanical: `equivSymProof` and `appendOnlyAuditLogProof` closed silently during the 2026-06-02 morning sweep (visible by grep but the inventory text was not updated). No body changes — this paragraph reconciles the count.
43
+
Drift from previous PROOF-NEEDS.md tally (22 holes) to current (15 holes) is mechanical: `equivSymProof` and `appendOnlyAuditLogProof` closed silently during the 2026-06-02 morning sweep (visible by grep but the inventory text was not updated), and `auditTrailCompletenessProof` closed via signature redesign on 2026-06-03 (#131). No structural changes to the live source beyond #131 — this paragraph reconciles the count.
44
44
45
45
All `partial` markers in `proofs/idris2/src/Filesystem/*.idr` were cleared 2026-06-02 (PRs #108 + #109, closing #89). The total `partial` count is zero.
46
46
@@ -61,6 +61,7 @@ All `partial` markers in `proofs/idris2/src/Filesystem/*.idr` were cleared 2026-
| 2026-06-02 PM | Coq admit triumvirate |`mkdir_two_dirs_reversible` restated to LIFO and closed (#56); `overwrite_pass_equalizes_storage` strengthened with `block_overwritten` constraint, closed with zero new axioms (#57); `obliterate_not_injective` threaded through the strengthened lemma + `multi_pass_same_start_same_result`, closed with only standard funext (#58). Coq layer now has **zero `Admitted` markers** (only the justified `Axiom is_empty_dir_dec` remains). |
64
+
| 2026-06-03 | Idris2 RMO `auditTrailCompleteness` redesign | Signature redesigned away from the `entries = []`-refutable shape into a per-insertion claim threading `(log, entry, p, insertedPath : path entry = p)`; closed via `elemMap` (stdlib) + a local `elemAppRightSelf` induction + `sym insertedPath` rewrite (#131, mirrors the #60 / #61 / #119A precedent). Zero new axioms; zero `believe_me`. |
64
65
65
66
### What Needs Proving (current, prioritised by tractability × value)
66
67
@@ -94,75 +95,60 @@ about `(q == p)` on opaque `Path` values inside `elem`, which Idris2
94
95
`HardwareEraseProof -> (Unit -> Filesystem) -> Void` is refuted by
95
96
any non-empty `recovery` (the function exists trivially). Correct
96
97
shape needs the recovery to take the post-erase state as input.
0 commit comments