Commit 3166a87
Closes the parked `?reverseConcatProof` hole from PR #109 (Composition.idr).
The Idris2 0.8.0 stdlib provides:
Data.List.revAppend :
(vs, ns : List a) -> reverse ns ++ reverse vs = reverse (vs ++ ns)
Which is exactly our claim, modulo direction of the equation. Applying
`sym` flips it to the conventional "concatenation distributes over
reverse" framing used by our local theorem:
reverseConcat xs ys : reverse (xs ++ ys) = reverse ys ++ reverse xs
reverseConcat xs ys = sym (revAppend xs ys)
The previous closed-form proof using induction + `rewrite` failed under
Idris2 0.8.0 because the stdlib's `reverse` is tail-recursive via
`reverseOnto`, and so does not structurally reduce per the Idris-1-style
expansion `reverse (x :: xs) = reverse xs ++ [x]`. Delegating to the
stdlib lemma is both shorter and more robust.
Verified locally with the full stacked context (#105 + #108 + #109 +
hardware-erase + audit-entry fixes + RMO overwriteIrreversible /
auditTrailCompleteness drive-bys for build progression). All 4 modules
build clean.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent c1d8dbc commit 3166a87
1 file changed
Lines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
157 | 159 | | |
158 | 160 | | |
159 | 161 | | |
160 | 162 | | |
161 | | - | |
| 163 | + | |
162 | 164 | | |
163 | 165 | | |
164 | 166 | | |
| |||
0 commit comments