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
## Summary
Builds on PR #133 (Q1-C primitive-eq axiom pilot). Migrates
\`Filesystem.Model.equiv\` from a boolean \`Foldable\`-backed shape to a
propositional \`Data.List.Quantifiers.All\` / \`Data.List.Elem.Elem\`
shape, closing **equivTrans** (the hole that PR #133's pilot attempted
but couldn't reach).
## Background
The Q1-C pilot in #133 unblocked primitive-eq leaf reflexivity via 2
named \`axStringEqRefl\` / \`axBits8EqRefl\` axioms, sufficient to close
\`equivRefl\`. The same-session attempt to also close \`equivTrans\`
failed: in Idris2 0.8.0, \`all p (x :: rs)\` does NOT reduce to \`(p x
&& all p rs)\` by \`Refl\` — the elaborator produces a \`foldl\`-shaped
term via \`foldMap @{All}\` that no straightforward rewrite can
destructure.
Q5 option 3 (per the design report from this same session) replaces the
boolean form entirely.
## What's in this PR
### Model.idr
\`\`\`idris
public export
data Equiv : Filesystem -> Filesystem -> Type where
MkEquiv : All (\\e => Elem e (entries fs2)) (entries fs1) ->
All (\\e => Elem e (entries fs1)) (entries fs2) ->
Equiv fs1 fs2
\`\`\`
\`Data.List.Quantifiers.All\` reduces structurally on cons by definition
— no foldMap, no foldl wall.
| Theorem | Closure |
|---|---|
| \`equivRefl\` | Structural induction with \`Here\` at the head + local
\`allThere\` helper for the recursive case |
| \`equivSym\` | Constructor swap of the two \`All\` witnesses (was
\`andCommutative\` rewrite in boolean form) |
| \`equivTrans\` | \`mapProperty (\\e => indexAll e fwd23) fwd12\` +
symmetric backward direction. **Closes#119 Cat-B for equivTrans.** |
### Operations.idr
\`cnoWriteSameContent\`'s signature migrated from boolean to
propositional. Body **stays as \`?cnoWriteSameContentProof\`** with an
extended comment documenting a NEW finding: under the duplicate-keyed
entries model, the theorem is refutable even with the propositional
shape, because \`getFileContent\` only constrains the FIRST entry at
\`p\`. Closure needs a \"no duplicate keys\" invariant on
\`Filesystem\`. Recorded in PROOF-NEEDS.md.
### PROOF-NEEDS.md
* Hole tally: 15 → 14
* \`Model.idr\` row: 0 holes remaining (was 1)
* \`Operations.idr\` row: notes the propositional shape on
\`cnoWriteSameContent\`
## What does NOT close
* \`cnoWriteSameContent\` — see above; new model-invariant finding
documented
* 7 reversibility theorems in Operations.idr + 4 in Composition.idr + 3
RMO non-theorems-as-stated (#129/#130/#131)
These are tracked independently and unaffected by this change.
## Axiom inventory
* \`believe_me\` count in \`Axioms.idr\`: **2** (unchanged from pilot)
* \`IDRIS2_AXIOMS.a2ml\` entries: **2** (unchanged)
* CI guard passes
* \`pathEqRefl\` / \`fsEntryEqRefl\` / \`entryEqRefl\` kept in Model.idr
— unused for \`Equiv\` now, but available for future proofs that need
leaf-level \`(==) = True\`
## Test plan
- [x] \`idris2 --build valence-shell.ipkg\` exit 0 (all 5 modules clean)
- [x] \`.github/scripts/check-idris2-believe-me.sh\` passes
- [x] \`grep -c '?equivTrans' Model.idr\` → 0
- [x] \`grep -c '?equivRefl' Model.idr\` → 0
- [x] Model.idr has zero open \`?holes\`
- [ ] CI \`idris-verification.yml\` green
- [ ] Reviewer confirms the cnoWriteSameContent model-invariant finding
## Stacking
Depends on PR #133 (which lands the pilot axiom infrastructure). Once
#133 merges, this PR rebases trivially onto main. If #133 doesn't land,
this PR can stand on its own by dropping the \`Filesystem.Axioms\`
import from \`Model.idr\` (the propositional proofs don't actually use
it — Q5 option 3 eliminates the axiom dependency for \`equiv\`-related
theorems).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Copy file name to clipboardExpand all lines: PROOF-NEEDS.md
+63-47Lines changed: 63 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,18 +29,20 @@
29
29
| Coq | (closed) `mkdir_two_dirs_reversible`|`filesystem_composition.v`| Closed via LIFO restate — only standard funext (#56 closed) |
30
30
| Coq | (closed) `overwrite_pass_equalizes_storage`|`rmo_operations.v`| Closed via `Hgeom` strengthened with `block_overwritten` (#57 closed — zero axioms) |
31
31
| Coq | (closed) `obliterate_not_injective`|`rmo_operations.v`| Closed via threaded strengthened `Hgeom` through `multi_pass_same_start_same_result` (#58 closed — only standard funext) |
32
-
| Idris2 | 16 `?holes` across 4 files (zero `partial` annotations) |`proofs/idris2/src/Filesystem/*.idr`| Type-stated, body un-discharged; classification per issue #119|
32
+
| Idris2 |`axStringEqRefl` (primitive-eq axiom) |`proofs/idris2/src/Filesystem/Axioms.idr:42`|`believe_me`-backed; registered in `.machine_readable/IDRIS2_AXIOMS.a2ml`; CI-gated via `.github/scripts/check-idris2-believe-me.sh` (Q1-C pilot 2026-06-02 PM) |
|`Model.idr`|2 (`equivReflProof`, `equivTransProof`; `equivSymProof` is closed via `andCommutative`) | 0 |
41
-
|`RMO.idr`|2 (`overwriteIrreversibleProof`, `hardwareEraseIrreversibleProof`; `appendOnlyAuditLogProof` is closed via `Refl`; `auditTrailCompletenessProof` is closed via redesign + `elemMap` + `elemAppRightSelf` — see #131) | 0 |
42
+
|`Model.idr`|0 (`equivSym` closed via constructor-swap on the propositional form; `equivRefl` + `equivTrans`closed structurally via `Data.List.Quantifiers` Q5-option-3 migration) | 0 |
43
+
|`RMO.idr`|3 (`overwriteIrreversibleProof`, `hardwareEraseIrreversibleProof`, `auditTrailCompletenessProof`; `appendOnlyAuditLogProof` is closed via `Refl`) | 0 |
42
44
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.
45
+
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.
44
46
45
47
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
48
@@ -61,7 +63,6 @@ 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`. |
65
66
66
67
### What Needs Proving (current, prioritised by tractability × value)
67
68
@@ -95,60 +96,75 @@ about `(q == p)` on opaque `Path` values inside `elem`, which Idris2
95
96
`HardwareEraseProof -> (Unit -> Filesystem) -> Void` is refuted by
96
97
any non-empty `recovery` (the function exists trivially). Correct
97
98
shape needs the recovery to take the post-erase state as input.
98
-
-~~`auditTrailCompletenessProof` (`RMO.idr:270`)~~**CLOSED via #131**:
99
-
the previous shape `Elem p (map AuditEntry.path entries)` was refuted
100
-
by `entries = []`. Redesigned to thread a single `entry`, an
101
-
`insertedPath : AuditEntry.path entry = p` premise, and reason about
102
-
`appendAuditEntry log entry = log ++ [entry]`. Closure via
103
-
`elemMap` (stdlib) + `elemAppRightSelf` (local helper) + a
104
-
`sym insertedPath` rewrite. Zero new axioms, zero `believe_me`.
105
-
106
-
The remaining two should be filed/handled as **`#119` sub-issues** with
107
-
the non-theorem refutations, in line with the #60 / #61 / #131
0 commit comments