Skip to content

Commit 9292171

Browse files
hyperpolymathclaude
andcommitted
docs(proof): reconcile OWED section — additive<->ceil equivalence RESOLVED
The VERIFICATION-STANCE.adoc OWED bullet still described the additive<->ceil proof as a partial advance with a residual alignUpADividesSuccOWED String stub (plus EuclidView/sPlusMinus/alignUpADividesZero infrastructure). None of that exists in the code: the proof is the single unified total theorem alignUpAdditiveEquivAlignTo closing both remainder cases, no residual. Rewrote the bullet to RESOLVED and dropped the stale '9th/10th module' ordinals (Layout/LayoutProofs are 2nd/3rd of 12). Prose only; build exit 0, guard Clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent a007955 commit 9292171

1 file changed

Lines changed: 23 additions & 26 deletions

File tree

verification/proofs/VERIFICATION-STANCE.adoc

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ OWED section.
152152
longer outstanding.
153153
. *(Phase 3c — RESOLVED for `ABI.Layout`; re-scoped for `ABI.Foreign`).*
154154
`VclTotal.ABI.Layout` is now *sound, compiling, and CI-gated* (it is
155-
the 9th module in `vclut-core.ipkg`). The three unsound claims were
155+
one of the 12 modules in `vclut-core.ipkg`). The three unsound claims were
156156
*deleted, not faked*: `alignUpCorrect` (used `(align > 0)`, a `Bool`,
157157
as a type, and a bogus `Refl` asserting the divisibility goal);
158158
`offsetInBounds` (an open `?metavariable` — never a proof, false in
@@ -166,7 +166,7 @@ OWED section.
166166
machine-checked. *(Phase 4a — RESOLVED.)* The genuine
167167
alignment/no-padding/bounds theorems are discharged in the new,
168168
self-contained, CI-gated module `VclTotal.ABI.LayoutProofs`
169-
(10th `vclut-core.ipkg` module; byte-identical `PField`/`qphFields`
169+
(a `vclut-core.ipkg` module; byte-identical `PField`/`qphFields`
170170
model of `Layout.queryPlanHeaderLayout`): `alignToDivides`
171171
(alignment divisibility *by construction* for the canonical
172172
round-up-to-multiple form `alignTo size a = ⌈size/a⌉ * a` — witness
@@ -176,30 +176,27 @@ OWED section.
176176
`fieldWithin` (membership-quantified bound: any field *provably in*
177177
the layout, via `Data.Vect.Elem` and `Data.So.soAnd`, satisfies
178178
`foff + fsize <= cap` — the honest replacement for the deleted false
179-
`offsetInBounds`/`?metavariable`). *Phase 5 — partial advance on the
180-
additive↔ceil sliver:* the previously-`String` OWED
181-
`alignUpAdditiveEquivOWED` is replaced by a real proof
182-
infrastructure that closes the substantive content for the
183-
zero-remainder case:
184-
* `EuclidView`/`euclid` — the Euclidean decomposition view, built
185-
from `Data.Nat.Division.DivisionTheorem` + `boundModNatNZ`.
186-
* `sIdentZero`/`sIdentSucc` — Euclidean identity refinements
187-
tagged by the value of `modNatNZ s (S k) ItIsSucc`.
188-
* `sPlusMinus` — the `r ≤ k` ⇒ `S r + (k - r) = S k` identity.
189-
* `alignUpADividesZero` — `(modNatNZ s (S k) ItIsSucc = Z) ⇒
190-
Divides (S k) (alignUpA s k)`. Genuine `Refl`-closed theorem
191-
with witness `divNatNZ s (S k) ItIsSucc`, zero proof-escape.
192-
+
193-
The remaining residual is purely the non-zero remainder case's
194-
*rewrite chain*: the math is `S r' + (k `minus` r') = S k` (closed
195-
by `sPlusMinus` + `boundModNatNZ`), but the multi-step
196-
`plusAssociative`/`plusCommutative` chain triggers an idris2 0.8.0
197-
elaborator quirk (`FromString` mis-elaboration). Disclosed as
198-
`alignUpADividesSuccOWED` — a precisely-scoped String stub that
199-
names the obstruction. Strictly smaller than the original OWED
200-
(which covered both cases) and is a toolchain-sequencing limit
201-
rather than a missing lemma. Re-attempt under idris2 0.8.1+ or via
202-
manual `replace` chaining; tracked at standards#124 follow-up.
179+
`offsetInBounds`/`?metavariable`). *Phase 5 — RESOLVED (2026-06-14):* the previously-`String` OWED
180+
`alignUpAdditiveEquivOWED` is now a single, fully total theorem
181+
`alignUpAdditiveEquivAlignTo : (s, a : Nat) -> (0 nz : NonZero a) -> s +
182+
paddingForLocal s a nz = alignTo s a` in `VclTotal.ABI.LayoutProofs`,
183+
closing *both* remainder cases with no residual. It is proved by Euclidean
184+
case split on `modNatNZ s (S predA) nz == 0` (via `Syntax.WithProof`'s
185+
`@@`), discharged with `Data.Nat.Division.{DivisionTheorem,
186+
DivisionTheoremUniqueness, boundModNatNZ}` and `Syntax.PreorderReasoning`
187+
`Calc` chains. The `Calc`-rather-than-nested-`rewrite` form sidesteps the
188+
idris2 0.8.0 `FromString` elaborator quirk that had blocked the earlier
189+
non-zero-remainder case; `alignTo` is defined by case split so `divNatNZ`
190+
stays in head position and reduces by `Refl`; `paddingForLocal` mirrors
191+
`Layout.paddingFor` (they agree on every `NonZero` alignment). In the
192+
non-zero case the stuck `modNatNZ` term will not substitute via
193+
`case … Refl`, so it is bridged explicitly with `cong`/`replace` and a
194+
re-stated division theorem. The earlier
195+
`EuclidView`/`sPlusMinus`/`alignUpADividesZero` split and the
196+
`alignUpADividesSuccOWED` String stub were *superseded and removed*;
197+
nothing in `LayoutProofs` uses
198+
`believe_me`/`postulate`/`assert_*`/`idris_crash`/`sorry`, verified by
199+
`--build` (exit 0) and `scripts/honesty-guard.sh` (Clean).
203200
+
204201
The `Data.Nat.Division` dependency is now declared in
205202
`verification/proofs/vclut-core.ipkg` (`depends = contrib`); the

0 commit comments

Comments
 (0)