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
proofs(idris2): Q1-C primitive-eq axiom pilot + equivRefl closure
Pilot for Q1 closure-path-C (believe_me axioms with CI allow-list).
Lands the smallest possible footprint to demonstrate the unlock and
gates further use behind a registry + CI check.
New module: proofs/idris2/src/Filesystem/Axioms.idr
* `axStringEqRefl : (s : String) -> (s == s) = True`
`believe_me`-backed primitive-eq reflexivity. Operational reason:
every Idris2 backend evaluates `prim__strEq s s` to True for any
`s`; the type-checker cannot see through the primitive on opaque
values. Same epistemic status as Agda funext or Coq Axiom
is_empty_dir_dec (both already accepted).
* `axBits8EqRefl : (b : Bits8) -> (b == b) = True`
Same shape for the byte-level primitive.
* `fileContentEqRefl : (xs : List Bits8) -> (xs == xs) = True`
Derived (not an axiom) — structural induction over the list using
axBits8EqRefl at the leaf.
Model.idr — equivRefl closed (was ?equivReflProof)
* `pathEqRefl` (structural induction over Path using axStringEqRefl)
* `fsEntryEqRefl` (case-split on Dir / File with fileContentEqRefl)
* `entryEqRefl` (tuple combinator)
* Idris2 0.8.0's `elem` is `Foldable.any (==)` which desugars to a
foldl form, not the textbook (x==y) || elem x ys recursion. The
proof threads through foldlOrTrueIdempotent — once the accumulator
hits True, the foldl stays True regardless of the tail.
* `equivRefl` then derives via `allElemSelf` (every entry is in
its own list under the propositional `Elem` witness).
Hole inventory: 16 -> 15.
CI guard: .github/scripts/check-idris2-believe-me.sh
* Reject any believe_me in proofs/idris2/**/*.idr that is NOT in
proofs/idris2/src/Filesystem/Axioms.idr.
* Sanity-check: registered-axiom count matches the believe_me count
in the allowed file.
* Wired into idris-verification.yml as a pre-build gate.
Registry: .machine_readable/IDRIS2_AXIOMS.a2ml
* Single source of truth for the believe_me allow-list.
* Each entry carries: type signature, operational justification,
morally-equivalent existing axioms, downstream consumers.
Tested locally:
* `idris2 --build valence-shell.ipkg` exit 0
* Guard: 2 occurrences in Axioms.idr / 2 axioms in registry — pass
* Guard rejection test (added believe_me in Model.idr): correctly
flagged + script exits 1
PROOF-NEEDS.md reconciled:
* Assumption Registry now lists the 2 Idris2 axioms.
* Idris2 hole tally: 16 -> 15.
* Model.idr row: equivReflProof moved from open to closed.
Q4 policy implication: this commit takes Q4 option B (soft policy with
named + gated axioms). If owner subsequently prefers option A (hard
"never believe_me"), revert this commit + accept the Q1-B (Nat-interned
Path) migration as the only path.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments