Commit a9f4350
committed
proof(idris2/abi): port to Idris2 0.8.0 syntax; add ipkg for verifiable builds (#27)
Followup to aac48b7. With idris2 0.8.0 now bootstrapped locally, this
makes the issue-#27 module surface actually typecheck:
* `postulate name : Ty` is not parsed in Idris2 0.8.0 (the keyword
only survives as an IDE-protocol decoration tag). Replace with the
canonical `name = believe_me ()` idiom in `Proofs/DivMod.idr`. Each
axiom remains individually named so discharge stays incremental
and grep-able.
* `align - remainder` in `alignedSize` required `Neg Nat` (which
doesn't exist). Replace with `align `minus` remainder`.
* `programStateAlignmentValid` cannot be discharged by direct `Oh`
after Platform case-split: Idris2 0.8.0 will not reduce through
`divNat`'s non-covering clause at type-level, even when both args
are concrete. Route through `believe_me ()` with a doc-comment
distinguishing this from the deleted unsound axiom:
- per-instance (n=8 only), not universal — no further consumer
can pivot to a false proposition;
- the claim is computationally true; the gap is unifier strategy,
not the proposition itself.
Replaceable with an explicit rewrite once `DivMod` supplies the
per-platform reduction equations.
* Add `absolute-zero-abi.ipkg` so `idris2 --build absolute-zero-abi`
becomes a meaningful CI target. The build still surfaces five
pre-existing errors in `src/abi/Types.idr` (missing
`Decidable.Equality` import; `%runElab` without enabling
`ElabReflection`; `MkStateHandle ptr` not providing the
`nonNull : So (ptr /= 0)` proof; `No absurd` without an
`Uninhabited` instance for the constructor inequalities). These
are orthogonal to #27 and warrant a separate audit; flagged in
the issue comment.
Verified: `idris2 --check AbsoluteZero/ABI/Proofs/DivMod.idr` compiles
cleanly under Idris2 0.8.0. A harness module exercising the
`believe_me`-based pattern also compiles.1 parent ef523e0 commit a9f4350
3 files changed
Lines changed: 68 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
251 | 261 | | |
252 | 262 | | |
253 | | - | |
| 263 | + | |
| 264 | + | |
254 | 265 | | |
255 | 266 | | |
256 | 267 | | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
| 268 | + | |
262 | 269 | | |
263 | 270 | | |
264 | 271 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
18 | 26 | | |
19 | 27 | | |
20 | 28 | | |
| |||
38 | 46 | | |
39 | 47 | | |
40 | 48 | | |
41 | | - | |
| 49 | + | |
42 | 50 | | |
43 | 51 | | |
44 | 52 | | |
45 | 53 | | |
46 | | - | |
47 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
48 | 57 | | |
49 | 58 | | |
50 | 59 | | |
51 | 60 | | |
52 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
53 | 71 | | |
54 | 72 | | |
55 | 73 | | |
56 | 74 | | |
57 | | - | |
| 75 | + | |
58 | 76 | | |
59 | 77 | | |
60 | 78 | | |
| |||
64 | 82 | | |
65 | 83 | | |
66 | 84 | | |
67 | | - | |
68 | | - | |
69 | 85 | | |
70 | | - | |
| 86 | + | |
71 | 87 | | |
72 | 88 | | |
73 | 89 | | |
| 90 | + | |
74 | 91 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
79 | 96 | | |
80 | | - | |
| 97 | + | |
81 | 98 | | |
82 | 99 | | |
83 | 100 | | |
| 101 | + | |
84 | 102 | | |
85 | 103 | | |
| 104 | + | |
86 | 105 | | |
87 | | - | |
| 106 | + | |
88 | 107 | | |
89 | 108 | | |
90 | 109 | | |
| 110 | + | |
91 | 111 | | |
92 | 112 | | |
93 | 113 | | |
94 | 114 | | |
95 | | - | |
| 115 | + | |
96 | 116 | | |
97 | 117 | | |
98 | 118 | | |
| 119 | + | |
0 commit comments