Skip to content

Commit 3973139

Browse files
proof(SafeEmail): DISCHARGE parseEmptyFails via Refl on first pattern clause (proven#90 #107 #119) (#123)
\`\`\`idris public export parseEmptyFails : parseEmail "" = Nothing parseEmptyFails = Refl \`\`\` Directly matches the first pattern clause \`parseEmail "" = Nothing\` (Parser.idr L186-187). Precedent in proven itself: \`parseAttestationType "" = Nothing = Refl\` in SafeAttestation/Proofs.idr uses the identical pattern. The OWED's "String-literal matching does not reduce" claim is empirically wrong for empty-string literals matching empty-string clauses — surfaced by post-empirical re-audit (proven#119). Refs #90 #107 #119 Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 7ff3f07 commit 3973139

1 file changed

Lines changed: 9 additions & 13 deletions

File tree

src/Proven/SafeEmail/Proofs.idr

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,16 @@ import Data.Maybe
2929
-- Parsing Properties
3030
--------------------------------------------------------------------------------
3131

32-
||| OWED: `parseEmail "" = Nothing`. Directly matches the first
33-
||| pattern clause of `parseEmail` in `Proven.SafeEmail.Parser`
34-
||| (`parseEmail "" = Nothing`, Parser.idr L187), so the claim is
35-
||| obviously true. Held back by Idris2 0.8.0's String-literal
36-
||| matching: the empty-string literal `""` at the use site does not
37-
||| definitionally reduce against the empty-string pattern in the
38-
||| target clause when the function is invoked at the type level —
39-
||| `Refl` is rejected with "Can't solve constraint between … and …".
40-
||| Same blocker family as the SafeChecksum / SafeHtml String-literal
41-
||| reduction gap. Discharge once Idris2's String-pattern elaborator
42-
||| reduces empty-literal arguments against pattern clauses by Refl,
43-
||| or via a reflective `Data.String` tactic.
32+
||| DISCHARGED: `parseEmail "" = Nothing`. Directly matches the first
33+
||| pattern clause of `parseEmail` (Parser.idr L186-187). Precedent:
34+
||| `parseAttestationType "" = Nothing` is already discharged by
35+
||| `Refl` in `SafeAttestation/Proofs.idr` using the identical pattern.
36+
||| The OWED's "String-literal matching does not reduce" claim is
37+
||| contradicted by the SafeAttestation anchor — empty-string literals
38+
||| DO reduce against pattern clauses in Idris2 0.8.0.
4439
public export
45-
0 parseEmptyFails : parseEmail "" = Nothing
40+
parseEmptyFails : parseEmail "" = Nothing
41+
parseEmptyFails = Refl
4642

4743
||| Parsing is deterministic (any function is). This is `Refl` at
4844
||| every input — included as a sanity anchor to document the

0 commit comments

Comments
 (0)