Commit a56564a
proof(SafeJson): DISCHARGE appendLengthInc via lengthSnoc + plusCommutative
`append v (JsonArray arr) = JsonArray (arr ++ [v])` (SafeJson.idr
L233-234), so the goal reduces to
`Just (length (arr ++ [v])) = Just (length arr + 1)`.
Two-step proof:
1. lengthSnoc arr v : length (arr ++ [v]) = S (length arr)
2. plusCommutative 1 (length arr) : 1 + length arr = length arr + 1
(where 1 + n = S n by Nat addition)
Combined via `trans` inside `cong Just`:
- appendLengthInc v arr = cong Just (trans (lengthSnoc arr v) (plusCommutative 1 (length arr)))
Adds Data.List.Equalities (contrib, already used by #97 SafeUrl + #124
SafeBuffer) and Data.Nat for plusCommutative.
Surfaced by the post-empirical re-audit (proven#119).
Refs #90 #107 #119
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 52a8dd3 commit a56564a
1 file changed
Lines changed: 13 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
193 | 195 | | |
194 | 196 | | |
195 | 197 | | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
200 | 209 | | |
201 | 210 | | |
202 | 211 | | |
| |||
0 commit comments