Commit 8213baa
\`\`\`idris
writeAddsOne x buf buf' prf with (isFull buf)
writeAddsOne x buf buf' prf | True = case prf of Refl impossible
writeAddsOne x buf buf' prf | False = case prf of Refl => lengthSnoc
buf.content x
writeManyAddsLength xs buf buf' prf with (length xs > remaining buf)
writeManyAddsLength xs buf buf' prf | True = case prf of Refl impossible
writeManyAddsLength xs buf buf' prf | False = case prf of Refl =>
lengthDistributesOverAppend buf.content xs
\`\`\`
Same `with`-pattern as the existing \`writePreservesCapacity\` and
\`copyToPreservesDestCapacity\` in this file. Uses contrib's
\`Data.List.Equalities.lengthSnoc\` (proven#97 precedent) and
\`lengthDistributesOverAppend\`.
Adds `import Data.List.Equalities` (already used in #97 SafeUrl).
Surfaced by the post-empirical re-audit (proven#119) as a
HIGH-confidence candidate. The OWED comment said the proof was "blocked
on the cons-distribution lemma family" — but those lemmas exist in
contrib's `Data.List.Equalities`, just unused.
Refs #90 #107 #119
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 40daf0c commit 8213baa
1 file changed
Lines changed: 20 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
142 | 143 | | |
143 | 144 | | |
144 | 145 | | |
145 | | - | |
146 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
147 | 151 | | |
148 | | - | |
| 152 | + | |
149 | 153 | | |
150 | 154 | | |
151 | | - | |
152 | | - | |
153 | | - | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
154 | 164 | | |
155 | | - | |
| 165 | + | |
156 | 166 | | |
157 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
0 commit comments