Skip to content

SM-39: isolate language-1.2 decimal formatting from parsing axioms #434

Open

Description

@afflom

Scoped implementation slice of #381, targeting release/v0.5. #381 remains open for the decoder, String length/splitting and remaining design decisions. Reserve SM-39; SM-37 belongs to nested induction and SM-38 to Nat bit operations. Live/local claim inventory found no SM-39 reservation.

Problem: Decimal bundles formatting with parsing. Its instance therefore brings String.toInt? axioms into format_decimal even though the formatter itself only needs ToString. Native language-1.2 formatting should verify with no axioms at fixed widths and exactly propext at Int, while keeping output bytes and parsing behavior.

Implementation must be complete across the authored Portable, Fixed and RustLemmas native core sources and the production certificate constructor. Shared Decimal evidence nodes also serve parse proofs: retain them for parse and change only formatting operands. Do not author generated Lean, weaken certificate policies, or globally replace shared instance nodes.

Acceptance:

  • Add the normative SM-39 row, matching scenario and named native language-1.2 regression before implementation; witness the current fixed-width LLV7005 refusal once the execution lock is available.
  • Verify typed formatters and transitive callers across all eight fixed widths with empty policy and Int with exact propext. Check signed/unsigned boundaries and Int values beyond fixed ranges, preserving canonical decimal strings.
  • Preserve parse canonicality/range refusals and the existing legacy SM-19 coverage; retain a false-output rejection and the Int empty-policy refusal. Reuse the regression project rather than duplicate unrelated verification.
  • Keep production root exact policies and frozen language-1.0/1.1 bytes unchanged. Reconcile with Port Host to v0.5 and make closed byte and string proofs practical #396/Forward-merge release/v0.4 backlog into release/v0.5 (integration blocked) #405/Move the Lean pin from v4.32.1 to v4.33.1 #433 before the coordinated v0.5 identity/writer wave; no concurrent wave with Host.
  • Use official writers, review generated/negative-output deltas and complete final-head CI. Close through a reviewed issue-closing PR only.

Draft #437 now owns the complete four-part authored source change on release/v0.5. The revised named SM-39 regression first reproduced the actual fixed-width LLV7005 on landed #396; its official model projection, model/spec checks, formatting and focused Clippy passed before implementation. Independent review then cleared the formatting-only source unit and unchanged shared parsing/frozen older-language bytes. Post-fix native compilation, positive/negative SM39 evidence, coordinated identities/artifacts and final full CI remain required. No post-fix pass or completion is claimed; #381 stays open.

Activity

  1. added this to the LexLean v0.5 milestone on Nov 3, 2026
  2. self-assigned this
    on Nov 3, 2026
  3. afflom commented on Nov 3, 2026

    @afflom
    MemberAuthor

    Published the independently reviewed R3 source preparation at 2c49d3235 on maintainer/381-format-isolation (tree f17c61353ff4b503a81dbb70e111b11e897e1e96). This adds the authored SM-39 row/normative text, exact scenario, named native-1.2 regression, formatter/caller policy checks, boundary/parsing proofs and two negative mutations. It contains no runtime implementation or generated projections, and no PR or CI was requested.

    Source review corrected the aggregate-audit name mismatch, unresolved imports from a copied Lean module, and a false Boolean control that was not source-proof rejection. The case now reads actual attestation observations and verifies authored boundary/parsing proofs in the same project; a changed boundary proof must fail LLV7002.

    Order from here: reconcile #396's closed decide +kernel source with #405/#433 on the coordinated v0.5 base; after the Host validation lock is available, witness an actual fixed-width LLV7005 on the unchanged Decimal-coupled runtime; then implement the complete native Portable/Fixed/RustLemmas and certificate-constructor change, preserving shared parse evidence and frozen older-language bytes; finally run the official coordinated writers and final-head gate. An unsupported proof or unrelated failure does not count as the R3 witness.

    Measured only source checks: pinned Rust 1.97.1 rustfmt on the three authored Rust files, exact row/scenario equality, fixture counts (27 definitions/18 theorems), unique boundary mutation marker and whitespace. No Cargo/build/test/Lean verification/model writer/identity wave ran. VERIFICATION.md records these limits. #434 and parent #381 remain open.

  4. afflom commented on Nov 4, 2026

    @afflom
    MemberAuthor

    The unchanged-runtime policy regression now has a concrete witness on the landed #396 implementation. Using its frozen CLI (5076c71e), checked against the actual2b039 source/runtime and all905 embedded inputs, one fresh native language-1.2 project with the exact existing formatUInt8/callUInt8 definitions completed official lock/check, then verify refused formatUInt8 with LLV7005: empty policy, observed [Classical.choice, Quot.sound, propext]. Verification took7.052s; no caller-policy result is claimed because refusal stops at the formatter. Inputs/tool hashes were preserved and no implementation or identity writer ran.

    The earlier full27-definition/18-theorem fixture failed first with18 LLV7002 diagnostics: closed decide+kernel proofs cannot reduce its opaque formatting/parsing terms. That result is preserved and is NOT the policy witness or a passing SM39 case. The minimal diagnostic does not replace full acceptance.

    Test design is being corrected before implementation: existing SM19 native-runtime observation and preservation-certificate machinery can cover the required canonical outputs/policies without adding a new proof feature solely for our draft closed-decision test. All eight widths, unbounded Int, parse refusals, real false-output rejection, exact policies, frozen older-runtime bytes and final official generation/CI remain required. No boundary check is being silently removed, and no fresh passing acceptance is claimed. #381/#434 remain open.

  5. afflom commented on Nov 4, 2026

    @afflom
    MemberAuthor

    The revised named SM-39 test has now passed independent source review, after reconciliation with the actual landed #396 source. It preserves all 151 original boundary/parsing conjuncts (136 fixed-width and 15 native unbounded-Int observations) and all 27 formatter/caller/parser definitions and exact policies. The normative claim is unchanged.

    The test method now uses the existing native-runtime observation and A/B/E preservation machinery, with explicit replay and exact axiom audit. This transparently replaces our unmerged 18 closed-decision proofs, whose earlier LLV7002 failures were not policy evidence. The false-output controls distinguish an incorrect expected output from a well-typed 255→254 lowering mutation; the existing constructor's targeted LLI9001 derivation refusal is reported as pre-kernel refusal, not relabeled a Lean rejection. The Int negative changes only the formatter's policy and checks its exact LLV7005 observation.

    Review caught and corrected the parser-root allocation contract (String parameters require it), overly broad negative-diagnostic matching, and process-status handling. The original definitions, literal expectations and historical failed-run evidence remain preserved. No new product law or proof interface was added.

    One bounded phase is now authorized: the official model projection required by R3, formatting/focused compilation checks, and exactly one revised named SM-39 run on the unchanged Decimal-coupled runtime. It must reach the intended fixed-width LLV7005; unrelated failures do not count. No runtime implementation, identity/artifact wave or passing SM39 acceptance is claimed. The existing scoped UInt8 diagnostic remains valid and will not be repeated.

  6. afflom commented on Nov 4, 2026

    @afflom
    MemberAuthor

    Published the independently reviewed named-regression preparation at 3fd873224, preserving the original preparation and actual landed #396 as merge parents on the existing maintainer/381-format-isolation branch.

    The revised named conformance_sm_39 ran exactly once on the unchanged runtime: 0 passed, 1 failed, 483 filtered, 7.15s. Its sole diagnostic was the intended LLV7005 for LexLeanExample.Main.formatUInt8: empty policy, observed [Classical.choice, Quot.sound, propext]. This establishes the named prerequisite; caller and later boundary/certificate assertions were not reached and are not claimed as passing.

    The official model writer changed only SPEC.md, model/ids.toml and CONFORMANCE.md. Model comparison (484 IDs/86 codes), spec links, formatting and focused conformance Clippy passed. Both selected executables had the correct model/support/fixture roots and all 905 compiler inputs matched landed #396; the frozen binaries and source were independently checked. VERIFICATION records the exact receipt and historical failures.

    The complete authored formatting-only implementation can now proceed across Portable, Fixed, RustLemmas and the certificate constructor, retaining shared parsing evidence. No native implementation, identity/artifact regeneration or final acceptance was included in this commit. The coordinated v0.5 wave and reviewed issue-closing PR remain required; #381 stays open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions