Commit 0f8b01d
fix(CNO,lib): typecheck CNO.agda under --safe + add agda-lib
Unblocks the Echo<->CNO content-bridge in
hyperpolymath/echo-types#21. Three changes:
1. Adds top-level absolute-zero.agda-lib declaring this repo's
Agda library so downstream consumers (currently echo-types,
later VeriSim and others in the hyperpolymath ecosystem) can
`depend: absolute-zero` and resolve `open import CNO` cleanly.
2. Adds `{-# OPTIONS --safe --without-K #-}` to proofs/agda/CNO.agda
so it composes with the rest of the verification ecosystem
(echo-types, VeriSim, etc.), all of which run --safe --without-K.
Verified clean: `agda --safe CNO.agda` exits 0.
3. Closes three latent issues in CNO.agda that the --safe check
surfaces:
* Parse errors at lines 316/323 inside ternary-add and
crazy-op: `using (_Data.Nat.%_)` is not valid Agda
(qualifying an operator name inside `using` is rejected by
the parser). Replaces both helpers with a self-contained
structural-recursive `mod3` which terminates inside
--safe --without-K without pulling in Data.Nat.DivMod._%_'s
NonZero instance noise.
* Two unfilled holes (`{!!}`) at lines 303/304 in
cno-composition's cno-identity and cno-pure fields.
The former filled via state-eq-trans + transport along
eval-seq-comp. The latter required a new helper `pure-trans`,
defined via componentwise `trans` on the I/O and memory
equalities. Both holes now resolve into closed,
postulate-free IsCNO-record values.
Result: composing two CNO programs is now a constructive theorem
rather than a goal, and cno-composition is a real reusable lemma
for downstream content-bridges.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent abd5a3a commit 0f8b01d
2 files changed
Lines changed: 45 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| |||
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
16 | | - | |
| 18 | + | |
| 19 | + | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
| |||
293 | 296 | | |
294 | 297 | | |
295 | 298 | | |
296 | | - | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
297 | 312 | | |
298 | 313 | | |
299 | 314 | | |
300 | 315 | | |
301 | 316 | | |
302 | 317 | | |
303 | | - | |
304 | | - | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
305 | 329 | | |
306 | 330 | | |
307 | 331 | | |
308 | 332 | | |
309 | 333 | | |
310 | 334 | | |
311 | 335 | | |
312 | | - | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
313 | 347 | | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
| 348 | + | |
318 | 349 | | |
319 | | - | |
| 350 | + | |
320 | 351 | | |
321 | | - | |
322 | | - | |
323 | | - | |
| 352 | + | |
324 | 353 | | |
325 | 354 | | |
326 | 355 | | |
| |||
0 commit comments