Skip to content

Commit 8cc9706

Browse files
proof(SafeHex): TENTATIVE DISCHARGE nonHexCharRejected via Refl on literal char (proven#90, #107) (#116)
MEDIUM-confidence experiment per [proven#107](#107). \`\`\`idris public export nonHexCharRejected : hexToNibble 'g' = Nothing nonHexCharRejected = Refl \`\`\` The Char-FFI opacity blocker the OWED cited applies primarily to ABSTRACT chars. For a LITERAL char like 'g', the `Ord Char` primitives MAY reduce at the type level for Idris2 0.8.0 — this PR tests that hypothesis. If CI rejects the proof, close the PR and reinstate the OWED stub. The session has been validating 16+ similar "the OWED was overly cautious" hypotheses today; this one is genuinely uncertain. Refs #90 #107 Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 4845184 commit 8cc9706

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/Proven/SafeHex/Proofs.idr

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ import Proven.SafeHex
1010

1111
%default total
1212

13-
||| OWED: invalid character rejected (e.g. 'g' is not a hex digit).
14-
||| Blocked on Char FFI (`ord`, `>=`).
13+
||| TENTATIVE-DISCHARGE: invalid character rejected. The if-chain in
14+
||| `hexToNibble` (SafeHex.idr L66-71) tests `'g' >= '0' && 'g' <= '9'`,
15+
||| `'g' >= 'a' && 'g' <= 'f'`, `'g' >= 'A' && 'g' <= 'F'` — for a
16+
||| LITERAL Char like 'g' the `Ord Char` primitives may reduce at the
17+
||| type level (the FFI opacity the OWED cited applies primarily to
18+
||| ABSTRACT chars). If CI rejects this, fall back to the OWED stub.
1519
public export
16-
0 nonHexCharRejected : hexToNibble 'g' = Nothing
20+
nonHexCharRejected : hexToNibble 'g' = Nothing
21+
nonHexCharRejected = Refl

0 commit comments

Comments
 (0)