Skip to content

Byte singletons from prim update; evaluations checked by the kernel; one LexLean pin - #179

Merged
afflom merged 12 commits into
mainfrom
claude/project-thread-xvuzpy
Nov 16, 2026
Merged

afflom merged 12 commits into
mainfrom
claude/project-thread-xvuzpy

Conversation

@afflom

@afflom afflom commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

Requested by Alex · project thread

What

  • 763 register sites removed. The register goes from 5,498 to 4,735 on main after Model facets by outcome: consolidation count bits and a delta filter family per frame #174. Three definitions were byte-index trees of 255 comparisons each: Types.singletonSequence, ByteBuilder.byteSlice and Enumerate.natByteSlice. They are replaced by one definition, Types::byteCell (value : UInt8) : Option Bytes := prim update 0x00 0 value, and the callers reach it through helpers that match only on parameters. natByteSlice goes Nat → wordOfNat → checked_convert → byteCell, because checked_convert needs a fixed-width input.
  • Evaluation proofs (LexLean#553). The trees forced every byte to be a literal, and the reflexivity theorems over long step-machine runs depended on that. Without literal bytes, Lean's unifier needed more than 13 GB to compare the unevaluated byte terms, while the kernel checks the same theorems in seconds. A script applied one rule: every theorem without parameters proved by reflexivity{} is now evaluation{} (399 theorems in 39 modules). A second script rewrote exact axiom policies to what Lean observes (31 declarations).
  • One LexLean for everything. lexlean.pin.json (rev 2bf5c1e) is the only source for which LexLean runs:
    • Every recipe and script runs scripts/lexlean-pin.mjs exec / lexleanBinary(). The pin is named explicitly and never put on PATH, because the SDK refuses a shadowed PATH (PP5401).
    • The workspace lexlean crate (model, xtask, runtime staging) is a git dependency on the same revision. lexlean-pin.mjs refuses a Cargo.toml whose revision differs from the pin, and deny.toml admits that one git source.
    • The offline acquisition installs the pin into the sealed cache. It keeps only cargo's bare repository and drops the derived checkout, whose symlinks the sealed inventory refuses.

Verification

Follow-ups


Generated by Claude Code

…one LexLean pin

The three byte-index trees (Types.singletonSequence, ByteBuilder.byteSlice,
Enumerate.natByteSlice: 763 register sites) become one definition,
Types.byteCell = prim update of a one-byte seed at 0, reached through
helpers that match only on parameters. Register 6,151 -> 5,388.

The trees had forced every byte to a literal, and seven reflexivity theorems
over long runs leaned on that: without it Lean's unifier passed 13 GB. Every
parameterless theorem proved by reflexivity (399) is now an evaluation
(LexLean#553), checked by the kernel alone; axiom policies restate what Lean
observes. The authority verifies in 9 minutes at width 3.

The gate, the formal legs, the offline construction and the client export all
run one LexLean, pinned in lexlean.pin.json (2bf5c1e, branch
claude/evaluation-proof: #441, #443, #537, #553); the SDK's 0.4.0 has no
prim update.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3PPDQti4rghmmPSZGy
@afflom afflom self-assigned this Nov 15, 2026
The recipe containers mount a 2 GiB /tmp; cargo install's default build
directory filled it on the arm rest leg. The build now runs under
.lexlean/build/<rev> and is removed once the binary is installed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3PPDQti4rghmmPSZGy
…ions

The review-only projection job and the offline construction's own lexlean
calls ran the SDK's LexLean, which rejects the pinned lock (LLC0102).
offline-validation names the pinned binary (LEXLEAN, PATH) before any
lexlean call, so copied roots reuse it; the review job puts the pin on PATH.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3PPDQti4rghmmPSZGy
The Justfile's PATH reads lexlean.pin.json through scripts/lexlean-pin.mjs,
so the figures leg, which keeps only its declared inputs, could not
evaluate it. The three files are one factory set, `just`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3PPDQti4rghmmPSZGy
… .lexlean

The offline setup installs into its sealed cache and then requires a clean
checkout; a build directory under the checkout's .lexlean failed that
(URP002).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3PPDQti4rghmmPSZGy
The SDK refuses a PATH that shadows a tool it declares (PP5401 in
template-check and every prismpm lock check). Recipes now run LexLean
through `node scripts/lexlean-pin.mjs exec`, and the validation scripts
spawn lexleanBinary(); nothing changes PATH. The offline setup builds the
pin under a cargo home of its own, so the sealed cache holds its binary
and no git checkout (whose symlinks it refuses, URP001). The claims
harness accepts the kernel's refusal of an evaluation proof, which names
the owning theorem, beside the elaborator's rfl failure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3PPDQti4rghmmPSZGy
Both spawned `lexlean` from PATH, which is the SDK's compiler since the
pin is named rather than put on PATH; its semantics refuse the lock the
pin wrote (LLC0102).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3PPDQti4rghmmPSZGy
The model and xtask linked lexlean 0.4.0 from crates.io while the
compiler ran the pin, so the executed controls staged a runtime without
`LexLeanRuntime.update`, which the pinned compiler now emits for
Uorc.Core.Types. The workspace `lexlean` is now the pin's git revision;
scripts/lexlean-pin.mjs refuses a Cargo.toml whose revision differs from
lexlean.pin.json. deny.toml admits that one git source. The offline
acquisition seals cargo's bare repository of it and drops the derived
checkout, whose symlinks the sealed inventory refuses; cargo makes it
again offline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3PPDQti4rghmmPSZGy
cargo deny (wildcards = "deny") counts a git dependency without a
version as a wildcard. The workspace `lexlean` now names =0.4.0, the
version the pinned revision carries; cargo deny check passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3PPDQti4rghmmPSZGy
Conflicts: scripts/client-export.mjs keeps the pinned LexLean of
lexlean.pin.json (2bf5c1e, which contains #174's 560b649);
model/figures.toml is rewritten by `figures write` over the merged
tree: 4,735 sites (main 5,498, minus the 763 byte-tree sites).
Under the pin: lock --check, fmt --check and check --all pass; the two
src modules #174 changed (Page, Performance) verify.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3PPDQti4rghmmPSZGy
@afflom
afflom merged commit 9756b17 into main Nov 16, 2026
18 checks passed
afflom pushed a commit that referenced this pull request Nov 16, 2026
…by domains and slots

One export of the merged closure (#179 + #180 + this lane) at pin 2bf5c1e:
3 packages from 79 modules, 4 h 8 min on 4 cores.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3M7pu1nwsA7VLR4o6D
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.

2 participants