Commit 031bcbb
\`\`\`idris
public export
isScalarCorrect : (val : YAMLValue) -> isScalar val = True -> not
(isCollection val) = True
isScalarCorrect YNull _ = Refl
isScalarCorrect (YBool _) _ = Refl
isScalarCorrect (YInt _) _ = Refl
isScalarCorrect (YFloat _) _ = Refl
isScalarCorrect (YString _) _ = Refl
isScalarCorrect (YArray _) Refl impossible
isScalarCorrect (YObject _) Refl impossible
isScalarCorrect (YBinary _) _ = Refl
isScalarCorrect (YTimestamp _) _ = Refl
\`\`\`
7 scalar constructors → \`Refl\` (each reduces \`not (not True) =
True\`).
2 collection constructors (YArray, YObject) → \`Refl impossible\`
(premise \`isScalar val = True\` reduces to \`False = True\` which is
uninhabited).
This is a slightly different shape from the prior
[proven#107](#107) PRs —
here the OWED comment correctly identified the 9-arm case-split
discharge, the work was just OWED to be done.
Refs #90 #107
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent da929da commit 031bcbb
1 file changed
Lines changed: 19 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
253 | 259 | | |
254 | 260 | | |
255 | 261 | | |
| |||
0 commit comments