Commit 40c702f
proof(SafeEmail): DISCHARGE combineValidValid via constructor pattern + Refl premise (proven#90 #107)
The OWED comment for `combineValidValid` accurately diagnosed the
blocker (record-field projection of `(MkValidationResult ...).isValid`
doesn't reduce when r1, r2 are universally quantified) AND suggested
the discharge (case-split on r1, r2 to expose `MkValidationResult`).
This PR applies that suggestion.
DISCHARGE (one line):
```idris
combineValidValid (MkValidationResult True _) (MkValidationResult True _) Refl Refl = Refl
```
The pattern `MkValidationResult True _` plus the `Refl` premise binds
the `isValid` field to `True` at type-check time. With both fields
True, `(combineResults r1 r2).isValid` reduces to `True && True =
True` definitionally. The proof becomes `Refl`.
Empirically verified at `/tmp/charrefl/src/TestEmail.idr` (isolated)
and `/tmp/SafeEmailMinimal.idr` (against the actual proven
ValidationResult / combineResults definitions).
Note on local-vs-CI: the pre-existing `validResultIsValid` in the
same module fails to compile locally (record-field projection
through a `public export` top-level constant — same blocker family
as the SafeCSV `defaultDelimiterIsComma` issue). This error does NOT
reproduce in CI (PR #100 merged green with that proof). My change is
purely additive and verifies in isolation against the same Idris2
0.8.0 toolchain.
Zero `believe_me`/`postulate`/`idris_crash`.
Refs proven#90 (Phase 3 OWED triage), proven#107 (overly-cautious
OWED meta-issue).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 40b127f commit 40c702f
1 file changed
Lines changed: 10 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
118 | 112 | | |
119 | | - | |
120 | | - | |
121 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
122 | 117 | | |
123 | 118 | | |
124 | 119 | | |
| |||
0 commit comments