Skip to content

#127: κ-addressing in LexLean (KA-01..KA-03), validated against uor-addr — draft - #368

Merged
afflom merged 7 commits into
release/v0.5from
claude/issue-127-kappa-addressing
Nov 1, 2026
Merged

afflom merged 7 commits into
release/v0.5from
claude/issue-127-kappa-addressing

Conversation

@afflom

@afflom afflom commented Oct 31, 2026

Copy link
Copy Markdown
Member

Requested by Alex · project thread

Implements #127 (L5.2 of #106) as decided in D7 (#110): κ-addressing is a workspace source package in this repository beside stdlib/, outside language/ and schemas/ (no compiler-semantics ID moves), gate-held, with uor-addr as the oracle. The labels take the form D3 (#108) handles consume.

What it adds

kappa/ (module prefix LexLeanKappa, source package std = stdlib), two modules, five production roots (rust-std, effects allocation, overflow):

Module Roots Oracle
Label kappaLabel (sha256: + hex SHA-256, 71 bytes), isLabel, handleWire kind canonical = kind@label uor_addr::json::address, the 12 committed JSON fixtures, the 5 committed .kappa-label files
Json canonicalJson, jsonLabel uor_addr::json::canonicalize / address

Register (R3 order: rows, scenarios, failing cases, implementation — one commit each)

KA-01 package, roots, no identity move; KA-02 label, D3 handle, fixtures; KA-03 canonical JSON differential. New prefix KA (suite kappa-addressing): SL-09..SL-12 are already taken by the open member stack (#326/#328/#363), so a new prefix avoids a collision on forward merge. Register 475 -> 478; README row KA-01..KA-03, "All 478 registered conformance IDs".

Choices the issue left open

  • Location/prefix: kappa/ workspace member, prefix KA (above).
  • Scope: sha256 axis, the JSON realization, the D3 handle. GGUF, ONNX, the other four hash axes and E-series composition are not written. So [0.5.0] κ-addressing in LexLean, validated against uor-addr #127's "every committed fixture yields the same label" holds for the 12 JSON fixtures; for the 5 GGUF/ONNX .kappa-label files only the label form (isLabel) is checked. [0.5.0] κ-addressing in LexLean, validated against uor-addr #127 should stay open for those forms.
  • D3 handle wire form: kind@label, kind = [a-z0-9-]+, else refused (Option). handleOf returns the Handle {kind, label} structure.
  • NFC: no UCD tables in LexLean, so NFC is computed only for ASCII, Latin-1 and the combining marks U+0300–0303, 0308, 030A, 0327 after a letter that composes with them (53 composites, each checked against Python unicodedata); any other non-ASCII scalar is refused with no output rather than guessed. Numbers: integers only (fraction, exponent, -0 refused). Fails closed.
  • Duplicate member names: refused. uor-addr 0.2.0 keeps both; its unreleased main (953fb68) refuses. The corpus treats this as a design divergence, not a disagreement.
  • No theorems: a reflexivity theorem on kappaLabel of a literal is refused by the kernel (LLV7002); the label is held by the differential, not a proof.
  • Oracle dependency: uor-addr =0.2.0 (default features off, std) in repo-conformance only. Its graph adds arrayref (BSD-2-Clause), added to deny.toml's allow list with the reason; I could not run cargo deny here (not installed), the licences were read from the crate manifests.
  • The 5 .kappa-label files are vendored under tests/kappa/ from uor-addr v0.2.0 (no authority row; they are oracle data used for the label form only).

#363 (canonical JSON writer)

#363 is open, draft, and based on member2-order, not release/v0.5, so nothing here depends on it. Json writes (and reads) its own canonical form because uor-addr's differs from §21.7 (NFC; no final LF). If #363 lands, escapeString there could replace Json.quoted.

Evidence (this host: Linux, Rust 1.97.1, Lean 4.32.1)

  • conformance_ka_01/02/03 pass (370 s together); plants observed failing (VERIFICATION.md): source package dropped; sha512: prefix (23/23 runs); uppercase hex in isLabel (7/127); handleWire label for kind (7/15); reversed key order (3/120); raw newline (1/120); dropped combining mark (6/120).
  • KA-03 corpus: 120 evaluator runs (78 refused, 42 accepted), 600 under rustc.
  • lexlean verify of kappa accepts with exact axiom policies; kappa/expected/ holds 23 build oracles and 105 verification records (written for the new project only).
  • cargo fmt --check, clippy --workspace --all-targets --all-features -D warnings, validate-model (478 ids), validate-spec-links (478 rows), check-golden, check-fixtures (309), check-reproducibility, cargo test -p repo-conformance --test bdd, conformance_rp_*, conformance_pk_05, conformance_ex_*: pass. conformance_ex_09 failed once under heavy host load alongside other work and passed alone (567 s).
  • Not run: just vv whole, check-test-inventory (disk full), cargo deny.

Generated by Claude Code

…es (#127, R3)

The rows for kappa-addressing in LexLean (decision D7 of #110): the kappa
project beside stdlib that moves no identity (KA-01), the sha256 kappa-label
and the D3 data handle (KA-02), and the JSON canonical form (KA-03), each held
to uor-addr as an oracle. The rows are written in spec/src (NS-03) and the
register, CONFORMANCE.md and SPEC.md regenerated; the prose is in section 17.22.
The cases fail: the project is not committed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3QZQru5a9Beo3r4Rfa
uor-addr is a dependency of repo-conformance only (the JSON realization, no
tensor features beyond what uor-prism brings), pinned exactly; its one licence
outside the allow list, arrayref (BSD-2-Clause), is added to deny.toml with its
reason. The five committed .kappa-label files of its GGUF and ONNX fixtures are
vendored under tests/kappa/ for the label form. The cases fail until the
package exists.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3QZQru5a9Beo3r4Rfa
…guage/ and schemas/ (#127, D7)

Label states the sha256 axis of the kappa-label and the D3 data handle
(kind@label); Json states uor-addr's JSON canonical form in one pass over an
explicit stack, with NFC computed only over ASCII, Latin-1 and the combining
marks that compose with Latin-1 letters, and everything else refused. The
project is a member of the workspace, declares stdlib as its one source
package, and verifies under the pinned Lean; its build oracles and verification
records are committed, and the gates that list the library's projects list it.
VERIFICATION.md records the plants as observed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3QZQru5a9Beo3r4Rfa
@afflom afflom self-assigned this Oct 31, 2026
Re-lock the kappa project and rewrite its build oracles and verification
records on the language-1.2 compiler-semantics ID 49a667a8; README count 478.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3QZQru5a9Beo3r4Rfa
The KA para item and the merged items both carried i0369 (NS-04).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3QZQru5a9Beo3r4Rfa
@afflom
afflom marked this pull request as ready for review November 1, 2026 04:56
…the aarch64 host

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3QZQru5a9Beo3r4Rfa
… stays under 2 GiB

BS-04's harness for checkProgram was one 9.5 MiB array literal in one
function; rustc needed 10 to 11 GiB for it on x86_64 (more on aarch64), which
with the rest of the aarch64 host (16 GiB) ended the job with a shutdown
signal. #368's kappa/expected/verify/preserve/program/R0..R4 are five more
committed programs that BS-03..06 read (committed() walks the repository), so
the corpus grew by 10 percent and the case no longer fit. The runs, their
order and what each prints are unchanged; measured on the captured crate,
rustc peaks at 1.9 GiB (from 10 to 11) and the build takes 51 s (from ~90 s).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3QZQru5a9Beo3r4Rfa
@afflom
afflom merged commit fd14c62 into release/v0.5 Nov 1, 2026
36 checks passed
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