Skip to content

Prove each arith host role in its own certificate theorem - #770

Merged
jasisz merged 1 commit into
mainfrom
split-host-role-proof
Aug 1, 2026
Merged

Prove each arith host role in its own certificate theorem#770
jasisz merged 1 commit into
mainfrom
split-host-role-proof

Conversation

@jasisz

@jasisz jasisz commented Aug 1, 2026

Copy link
Copy Markdown
Owner

A follow-up to the per-claim proof split. After that change, the one per-module conjunct still above the import floor is decodedHostRoles, whose proof was a single decide +kernel that materializes all five decoded and five synthesized host-helper bodies in one kernel reduction (~0.5 GB over the floor).

What changed

Producer-side only, two files. A carriered module now emits a small ArtifactHostRoles.lean unit holding five leaf theorems — one arithRoleCheck … = true per host role (box, toIndex, add, sub, mul), each its own freed top-level declaration proved by decide +kernel. Artifact.lean imports them and proves decodedHostRoles by rewriting the manifest projections to their literals, unfolding arithTableCheck, rewriting the five role subterms to true from the leaves, and closing the remaining carrier/index conjuncts with one decide +kernel. The theorem statement is byte-identical; only its proof changed. Carrierless modules keep the original single-step proof and emit no leaf file.

The wall is untouched — no assets/wall/**, CURRENT_WALL_ID does not move. A wrong split fails the kernel, so there is no soundness surface.

Measured (affine, capped)

  • The targeted module, Artifact.lean: 1.458 GB → 0.903 GB (1.6x), the shelf the earlier floor measurement projected.
  • The whole cert verify peak: 1.445 GB → 1.335 GB (~7%). The verify peak is the max over all Lean subprocesses, and once Artifact.lean drops, the ceiling becomes the wall's own RecursionSoundness build (~1.3 GB) — intrinsic to the unchanged wall and not movable from the producer side. This is the honest headline: the change takes the one currently-shaveable per-module cost off the table, but on a small module the practical win is modest because a wall-build cost sits just underneath. It helps most where Artifact.lean, not the wall build, is a module's ceiling.

Gates

cert_certify_spec 34/34 (no snapshot drift), wall-identity tests pass unchanged, axioms [propext, Classical.choice, Quot.sound], cargo fmt --check clean, clippy clean in all shapes.

The whole-module arith host-role check was proved as a single kernel
reduction that materialized all five decoded and synthesized helper
bodies at once, setting a high memory floor for every certificate over
a module that carries the Int runtime.

Split it: a carriered module now proves each declared role in its own
freed theorem in a separate generated file and recombines them with a
cheap rewrite. The emitted acceptance theorem's statement is unchanged
byte for byte; only its proof differs. A module without the Int carrier
keeps its original single-step proof and emits no extra file.
@jasisz
jasisz merged commit f141421 into main Aug 1, 2026
34 checks passed
@jasisz
jasisz deleted the split-host-role-proof branch August 1, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant