Commit 4e333d0
\`\`\`idris
appendLengthInc v arr = cong Just (trans (lengthSnoc arr v)
(plusCommutative 1 (length arr)))
\`\`\`
Two-step proof:
1. \`lengthSnoc arr v : length (arr ++ [v]) = S (length arr)\` (contrib)
2. \`plusCommutative 1 (length arr) : 1 + length arr = length arr + 1\`
— where \`1 + n = S n\` by definition of Nat addition.
Combined via \`trans\` inside \`cong Just\`.
Adds \`Data.List.Equalities\` (already used by #97 SafeUrl + #124
SafeBuffer) and \`Data.Nat\`.
Refs #90 #107 #119
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 52a8dd3 commit 4e333d0
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