Commit 9f7fd41
proof(SafeEmail): DISCHARGE combineValidValid via constructor pattern + Refl premise (#142)
## Summary
Discharge `Proven.SafeEmail.Proofs.combineValidValid` in one line by
case-splitting on the `ValidationResult` constructor and using the
`Refl` premise to bind the `isValid` field to `True`.
The OWED comment already diagnosed the blocker correctly AND suggested
the discharge — this PR just applies it.
## Discharge
\`\`\`idris
combineValidValid (MkValidationResult True _) (MkValidationResult True
_) Refl Refl = Refl
\`\`\`
The pattern \`MkValidationResult True _\` plus the \`Refl\` premise
binds the \`isValid\` field to \`True\`. With both fields True,
\`(combineResults r1 r2).isValid\` reduces to \`True && True = True\`
definitionally. Proof = \`Refl\`.
## Verification
- \`/tmp/charrefl/src/TestEmail.idr\` (isolated): Exit 0
- \`/tmp/SafeEmailMinimal.idr\` (against actual proven ValidationResult
/ combineResults): Exit 0
- Zero \`believe_me\` / \`postulate\` / \`idris_crash\`
## Local-vs-CI note
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 SafeCSV's \`defaultDelimiterIsComma\`
we hit in PR #137). This error does NOT reproduce in CI (PR #100 merged
green with that proof). My change is purely additive.
Refs proven#90 (Phase 3 OWED triage), proven#107 (overly-cautious OWED
meta).
## Test plan
- [x] Local isolated discharge proof: Exit 0
- [ ] CI \`idris2 --check proven.ipkg\` green
- [ ] CI test suite green
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent d09d822 commit 9f7fd41
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