Skip to content

#276 member 1 (SL-09): hexadecimal and decimal in the standard library (LexLeanStd.Numeral) — draft - #326

Open
humuhumu33 wants to merge 16 commits into
release/v0.4from
member1-numeral
Open

humuhumu33 wants to merge 16 commits into
release/v0.4from
member1-numeral

Conversation

@humuhumu33

Copy link
Copy Markdown
Contributor

#276 member 1 (SL-09): hexadecimal and decimal in the standard library (LexLeanStd.Numeral) — draft

Rebuild of the closed draft #281 (head e7f942c7) onto release/v0.4 = a1b925dc (register 458), renumbered to SL-09 per my derivation comment on #276 (SL-08 is taken on release/v0.5 by #126 stage-2; SL-09 is the first number free on both lines).

Hand-written part and its local gates only — no record sweep (the stdlib records, goldens, coverage/closure and the committed tests/production-export/stdlib/packages/** for the five new roots are the landing wave's; a red just vv before that sweep is expected and this draft states exactly which assertion moves).

What changed vs #281:

  • SL-08 → SL-09 at every site; register row, §31 row, scenario all re-derived against 458, not 443 (count mirrors: 458→459, README, spec-links, repository case).
  • README capability row claims discrete `SL-01`, … `SL-05`, `SL-09` — the line's SL series has gaps (06–08 are v0.5-only), and RP-11 recomputes any a..b range against the register, which a gapped range would fail.
  • Locks rewritten by the built lexlean lock (the draft carried pre-Buffer values; the entrypoint digest moved when #92 BS-06: LexLeanBoot.RustPrint, the Rust printer as language-1.2 source (draft: register row and failing test) #253 landed).
  • Entrypoints sorted (config.rs: sorted unique; the draft inserted Numeral out of order).
  • The draft's \title was kept as Natural number addition: every title word must be a concept of the project's glossary (lexlean.std.nat) and "Hexadecimal" is not one (LLL1004) — which is why all four stdlib modules, Text, Sha256 and Buffer included, carry the same title by necessity.

Delivered (6 commits): register row + §31 prose/row + scenario + count mirrors → fail-first case wired (R3, panic evidence below) → module + entrypoint + differential + roots.json → locks → CONFORMANCE.md via just model-write → title/lock correction.

Local gates on a1b925dc + this branch:

  • cargo fmt --all -- --check: clean
  • cargo xtask validate-model: validate-model: documents current, 459 ids, 86 codes, meta-gate and audits clean (R1)
  • cargo xtask validate-spec-links: validate-spec-links: 459 table rows bijective with the register (RP-07)
  • R3 fail-first (stub body at 2e081fe00): SL-09 is not implemented: the LexLeanStd.Numeral module and its differential land next — test result: FAILED. 0 passed; 1 failed; 458 filtered out.
  • conformance_sl_09 at 623d3285: project check and build pass; the eligibility report matches the five roots and their exact effects; all five evaluator differentials (600 runs each) pass; both reader round trips pass; the five rendered rust-std packages build under the pinned rustc; the case then stops red at the committed-exports step — stdlib/decimal is no package of the committed exports (stack_bounds.rs:349). The five certified packages are what the landing wave regenerates; this draft deliberately does not write them. The armed hexValue plant and the export comparison sit behind that step, so they did not run locally; CI (Linux x86-64 with the pinned Lean) reaches them.
  • cargo xtask check-test-inventory: clean (rc 0).
  • Not run here: just bdd (whole-suite meta-gate — attempted twice, the shared WSL VM was recycled mid-run by host load both times; CI runs it), just vv (owner's wave), the record sweep.

Known-red until the wave: the case's stack-bounds/committed-export step — packages/rust-std/{decimal,hex_nat,parse_decimal,hex,parse_hex}/** are not committed on release/v0.4 and this PR deliberately does not write them.

Bootstrap private copies (CalculusCheck/RustValidate/AxiomOutput/PrimitiveScan/Buffer decimal printers; CalculusCheck/RustPrint/TokenAudit/PrimitiveScan/Sha256 hex digits) are untouched — they migrate to this member by the module owners after it lands.

Refs #276 (member 1 of 4; members 2–4 take SL-10/SL-11/SL-12).

…the count mirrors

The Numeral member of the standard library (SPEC.md §17.22): register row in
model/ids.toml (458 to 459), the byte-exact §31 row and the §17.22 prose with
the member/oracle table, the README capability claim (discrete IDs: the line's
SL series has gaps, SL-06..SL-08 are taken on release/v0.5) and count, the one
long @SL-09 @build scenario of features/suites/stdlib.feature, and the count
mirrors (xtask spec-links, the repository case, 458 to 459).
conformance_sl_09 dispatches to stdlib_numeral::run and its body panics with
the missing-work message; the fail-first run is recorded in the PR.
The module (decimal, hexNat, parseDecimal, hex, parseHex over Nat and Bytes)
joins stdlib/lexlean.toml's sorted entrypoints; the case runs 600 evaluator
and 3,000 rustc differentials per member with the seeded corpora, the reader
round trips over the printers, the armed hexValue plant, and the certified
export comparison. roots.json names the five roots the export must publish.
The module title is corrected to "Hexadecimal and decimal" (the draft carried
Buffer's copy-pasted title).
…he lock command

The entrypoint moves the stdlib manifest digest; bootstrap and examples/helpdesk
read the stdlib tree, so their locks move with it. Written by the built
`lexlean lock`, not carried from the draft (its values were stale once Buffer
landed).
… admits no word Hexadecimal, and all four stdlib modules carry this title by the same necessity; locks regenerated by lexlean lock after the revert
…256_hex broke SL-01, SL-02, SL-05 at production_export.rs:66)
opencode added 2 commits October 27, 2026 16:12
The numeral module adds five packages (decimal, hex, hex_nat,
parse_decimal, parse_hex) and changes the stdlib source digest. The
committed production-export fixtures were stale, so SL-01, SL-02, SL-05
and SL-09 disagreed with the export. Regenerated with
`cargo xtask check-production-export --write`.
The numeral source, its lock, and its export roots change the source and
build identity of the stdlib, so the committed oracles under stdlib/,
bootstrap/ and examples/helpdesk/ no longer equal their generator. The
golden check runs after the conformance suite and was failing on the
helpdesk manifest (§28.3). Regenerated with
`cargo xtask check-golden --write`.
humuhumu33 and others added 2 commits October 31, 2026 09:51
The conflicted generated files take the release side: locks, records, and the
production export are regenerated next by their own commands. CHANGELOG.md
keeps both Unreleased entries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Clean merge of ccbf038 on top of the first merge. Locks, records, and the production export are regenerated next.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
humuhumu33 and others added 5 commits November 1, 2026 01:44
The five new packages add three crates under the evaluator cap of BS-05 and ten
committed vectors to BS-06. The other two evaluator vectors of BS-06 come from its
every-seventh sample, which moved to two lighter crates. VERIFICATION.md holds the
comparison with release/v0.4. The BS-05 register row also takes the run counts the
case asserts, which it had not stated since before this member.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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