Repository navigation
Conversation
|
Heads-up on the register count, not a review. This PR's base is The count is written in four places ( Separately: this PR changes Generated by Claude Code |
dd3af89 to
da31f6b
Compare
|
Maintainer triage (the author session has ended; I carry this PR). State at 18:05Z: closes #118, which is milestone v0.5, so it is outside the v0.4 release path. The branch is Generated by Claude Code |
|
Train status for #150 (the hand-written part now lives on Issue #118 Definition of Done: "A corpus derivation computes
Theorem count is now 39 in Not run: Generated by Claude Code |
One regeneration for #68, #150, #151, #157, #163, #91 slice 1 and stage 4 of #89 on main: the language-1.2 and 1.1 compiler-semantics IDs (lean_backend 10 and 20 by hand; the preservation library statement is the second hand edit), every lexlean.lock, the golden oracles, the calculus fixtures, the production export, the conformance fixtures, and the normalized verification records of every example that moves (all of them verified end to end with the pinned Lean, certificates A, B and E as data), then `validate-model --write`. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013QppGKetUURseXowZun9KY
|
Maintainer status: the content of this PR ( Generated by Claude Code |
humuhumu33
left a comment
There was a problem hiding this comment.
Content review of #150 as it lands on #167 (merge 6375f32, train head e24a7ff).
The decoding and the scale ratio are correct. binary32: subnormal exponent -149, normal biased-150 with the implicit 2^23. binary64: -1074 and biased-1075 with the implicit 2^52. Signed zero keeps its sign, and the 255/2047 exponents are refused. Byte order is little-endian. round(ab/c2^32) is exact with ties to even and symmetric in sign, and for every finite binary32 triple the shift (at most 389) stays under the 512 fuel. I checked every committed vector and about 60,000 random binary32 triples, ties included, against exact fractions: all agree. The u128 oracle cannot overflow (product below 2^48, shift below 80) and has no binary64 ratio. #118's acceptance is met.
- dyadicRoundShift (examples/models/src/Recognizer.lex.tex:356) drops iterate_until's fixed-point flag. For exponent + shift > 512 it returns mantissa * 2^512 without a signal (the binary64 max normal at shift 0 gives 2^564), and its sticky round-up branch is never run. Return Option and refuse when the flag is false, as dyadicRatioRound does, or remove dyadicRoundShift and dyadicMul, which no derivation uses.
- decodeBinary64 (:300) accepts both the signed and the unsigned 64-bit form. No theorem, oracle vector or seeded case reaches the unsigned branch, and out-of-range binary64 input (< -2^63, >= 2^64) has no rejection theorem. SPEC.md:3524 rule 15 should state each width's accepted range. Please add theorems: 13832806255468478464 decodes to (1, 6755399441055744, -52); 9223372036854775808 to (1, 0, -1074); -9223372036854775809 and 18446744073709551616 to none.
- CHANGELOG.md:55 says 43 theorems (39 + 4). The train adds 43 to Models.Recognizer and 4 to Models.Main, 47 in all. CHANGELOG.md:50 (and :66) say the register is 404 rows; the train is at 413.
- VERIFICATION.md:5238 records "..." for the skewed-oracle refusal. Please paste the real LLV7002 line for seeded_ratio_15.
- Nit: the k < 0 branch of dyadicRatioRound has only an even-quotient tie (scale_multipliers_channel_batch), so a round-half-down mutation there survives. scaleRatioRound32 1065353219 1065353216 1149239296 = some 4194306 covers it. The seeded ratios span only shifts of about [-16, 16] with normal operands, and the Bytes decoders have no past-the-end theorem.
- Nit: the fixed oracle tables in crates/conformance/src/cases/models.rs:3425, :3451 and :3486 are hand copies of the theorem literals; reading them from the module data would make the corpus-vs-oracle check real.
- Nit: rule 15 is normative text for corpus code in examples/models, and it does not state the little-endian byte order. byteToInt (:279) duplicates to_int (SM-32, same train). *_neg_one_half decodes -1.5.
The register agrees at 413 in all four places on e24a7ff. conformance_md_13 passed in that head's rest leg; the RP-08/11/12 failures there come from other members.
This is a comment review; formal approval will be given on #167's final head once both vv legs are green.
…, certificates A and B as data, package scaffolding, regenerated once (#167) Closes #114 Closes #118 Members: #68, #151 (#114), #150 (#118), #157 (SP-15), #163 (SP-16, SP-17), train/package-scaffold (#91 slice 1, #105 3b), fix(#117). Register 413. Gate: run 39101767733 on f574885, 25/25 green. Approved by humuhumu33 at f574885.
|
Landed through the v0.4 train, #167, merged to Generated by Claude Code |
Closes #118
Summary
Implements plan item L3.5 of #106 (IEEE-754 bit patterns as exact dyadic rationals, capability ID
MD-13):R1,RP-07):MD-13inmodel/ids.toml,SPEC.md §17.12(Rule 15), andSPEC.md §31(382total required capability IDs).R3):@MD-13 @buildscenario tofeatures/suites/models.featureandconformance_md_13incrates/conformance/src/cases/models.rsandcrates/conformance/tests/conformance.rs.examples/models):Dyadic((sign, mantissa, exponent)representingdyadicTriple,DyadicMatches,byteToInt,decodeBinary32,decodeBinary64,decodeBinary32Bytes,decodeBinary64Bytes,dyadicMul,dyadicRoundShift,dyadicRatioRound,scaleRatioRound32, andscaleMultipliersRound32inexamples/models/src/Recognizer.lex.tex, plusderiveScaleMultiplierandderiveChannelMultipliersinexamples/models/src/Main.lex.tex.Models.Recognizerand 4 theorems inModels.Mainbydecide{}under pinned Lean andleanchecker, coveringbinary32andbinary64positive/negative zero, minimum/maximum subnormal, minimum/maximum normal, unit scale (1/255), little-endian byte-slice decoding from the committedbannerartifact, non-finite/out-of-range rejection (+Inf,-Inf,NaN, negative/overflow widths), tie-to-even dyadic rounding, and exactVERIFICATION.md,conformance_md_13):binary32,binary64, andround(a * b / c * 2^32)theorems against an independentu128rational oracle under Lean, and verifies that planted mutations to the normal exponent offset (-150-149), the tie-to-even rounding rule, and a skewed oracle expectation are each accepted bycheckand refused byverifywithLLV7002.Verification
just model-writecargo xtask validate(382IDs,80codes)cargo xtask check-goldenLEXLEAN_ONLY_EXAMPLE=models cargo xtask verify-examples(161normalized verification records)cargo test -p repo-conformance --test bddcargo test -p repo-conformance --test conformance conformance_md_02 -- --exactcargo test -p repo-conformance --test conformance conformance_md_13 -- --exactcargo fmt --check&cargo clippy --workspace --all-targets -- -D warnings