Commit 321d97f
The two OWED tracking-monotonic theorems were blocked by Idris2 0.8.0
not reducing record-update field projection through a function call.
The fix is two-part:
1. **Operations.idr**: Flip `updateAfterRead`/`updateAfterWrite` from
`export` to `public export`, AND replace the record-update sugar
(`{ bytesRead := ... } h`) with the explicit `MkSafeHandle`
constructor. Runtime behaviour is identical, but the explicit
constructor allows `(updateAfterRead h bytes).bytesRead` to reduce
definitionally to `h.bytesRead + bytes` at type-check time —
confirmed by /tmp/charrefl test harness.
2. **Proofs.idr**: Add helper `plusGteOriginal : (n, m : Nat) ->
(n + m) >= n = True` (induction on `n`, case-split on `m` in the
`Z` branch only). Discharge both theorems by applying the helper.
Empirical reduction map confirms `(n + m) >= n = True` reduces via
the `compare`-based Bool `>=` for Nat after pattern-matching on `n`
and `m` in the `Z` cases (`reference_idris2_0_8_0_reduction_map.md`).
Zero `believe_me`/`postulate`/`idris_crash`. No external API change
— `updateAfterRead`/`updateAfterWrite` already had no non-test
callers (grep'd whole tree). Visibility flip is monotonic
(`export` → `public export`).
Refs proven#90 (Phase 3 OWED triage), proven#107 (overly-cautious
OWED meta-issue), proven#119 (paths-forward proposal).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 477172b commit 321d97f
2 files changed
Lines changed: 43 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
160 | 167 | | |
161 | | - | |
| 168 | + | |
| 169 | + | |
162 | 170 | | |
163 | 171 | | |
164 | | - | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
165 | 175 | | |
166 | | - | |
| 176 | + | |
| 177 | + | |
167 | 178 | | |
168 | 179 | | |
169 | 180 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
210 | 211 | | |
211 | 212 | | |
212 | 213 | | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
242 | 241 | | |
243 | 242 | | |
244 | 243 | | |
| |||
0 commit comments