Skip to content

Commit 3df29d2

Browse files
proof(model): close equivSym via Data.Bool.andCommutative (1/5 Cat B holes) (#123)
The two `all`-predicates inside `equiv` are conjoined; the reverse- direction goal is the same conjunction commuted, so a single rewrite by `andCommutative` collapses it to the premise. No primitive String/Bits8 `==` reflexivity needed — pure boolean algebra over the already-evaluated predicate values. Verified locally: 4/4 modules build clean with `--total`. Cat-B reclassification finding (see follow-up to #119): - `equivSym` — closed here (pure boolean algebra) - `equivRefl` — BLOCKED on primitive String/Bits8 `==` reflexivity - `equivTrans` — BLOCKED on `elem`-transitivity through filtered lists - `undoRedoIdentity` — non-theorem under propositional `=` (needs `equiv`) - `undoRedoComposition` — same as undoRedoIdentity - `cnoWriteSameContent` — body needs equiv-membership lemma chain (also blocked on primitive eq reflexivity at the leaves) So 1/5 closeable purely; remaining 4 need a Q4-style decision (axiom vs equiv-restate vs DecEq-rewrite of equiv). Refs: - valence-shell#119 — proof-hole inventory (Cat B) - memory: reference_idris2_0_8_0_reserved_keywords.md Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent af982ce commit 3df29d2

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

proofs/idris2/src/Filesystem/Model.idr

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
module Filesystem.Model
1010

11+
import Data.Bool
1112
import Data.List
1213
import Data.Maybe
1314
import Data.String
@@ -214,12 +215,25 @@ export
214215
equivRefl : (fs : Filesystem) -> equiv fs fs = True
215216
equivRefl (MkFS entries) = ?equivReflProof
216217

217-
||| Symmetry of equivalence
218+
||| Symmetry of equivalence.
219+
|||
220+
||| Closed via `Data.Bool.andCommutative` from Idris2 0.8.0's base
221+
||| stdlib. The two `all`-predicates inside `equiv` are conjoined; the
222+
||| reverse-direction goal is the same conjunction commuted, so a
223+
||| single rewrite by `andCommutative` collapses it to the premise.
224+
|||
225+
||| Does NOT need primitive String/Bits8 `==` reflexivity — this is
226+
||| pure boolean algebra over the already-evaluated predicate values.
227+
||| Contrast with `equivRefl` / `equivTrans`, which DO require leaf-
228+
||| level eq-reflexivity (tracked separately under issue #119).
218229
export
219230
equivSym : (fs1, fs2 : Filesystem) ->
220231
equiv fs1 fs2 = True ->
221232
equiv fs2 fs1 = True
222-
equivSym (MkFS e1) (MkFS e2) prf = ?equivSymProof
233+
equivSym (MkFS e1) (MkFS e2) prf =
234+
rewrite andCommutative (all (\e => elem e e1) e2)
235+
(all (\e => elem e e2) e1)
236+
in prf
223237

224238
||| Transitivity of equivalence
225239
export

0 commit comments

Comments
 (0)