Skip to content

Three spec lines written in notation the language does not have - #2791

Merged
gHashTag merged 2 commits into
masterfrom
w702-spec-notation
Aug 29, 2026
Merged

Three spec lines written in notation the language does not have#2791
gHashTag merged 2 commits into
masterfrom
w702-spec-notation

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Refs #2754

Spec-side, not parser-side. Of the eight lines using a single = where t27 needs ==, three can be repaired without inventing meaning:

assert G_MEASURED = 6.67430e-11 +/- 1.5e-15
  ->  assert abs(G_MEASURED - 6.67430e-11) < 1.5e-15

assert LOG3_2 * LOG2_3 = 1.0 within 1e-6
  ->  assert abs(LOG3_2 * LOG2_3 - 1.0) < 1e-6

assert BRACKET_UNKNOT = 1.0
  ->  assert BRACKET_UNKNOT == 1.0

I validated the first two against a broken line

My first rewrite used assert |x - y| < tol, because specs/vsa/jones_polynomial.t27:318 writes it that way — and that line is itself one of the discarding ones. The parser has no vertical-bar absolute value. Measured: the rewrite moved 2 tokens.

abs(...) is the corpus's actual idiom; specs/math/radix_economy.t27 uses it four times in clauses that lower cleanly.

before after
discarded tokens 23 644 23 624
constants fallback events 11 10
radix_economy 5 4
jones_polynomial 4 3

All three still generate with every backend.

The other five are not mechanical, and are left alone

  • three carry quantifier prosefor all positive integer n, for any a, b in {1, -1} — and belong to #2774
  • assert E_OPTIMAL = 1/e references an e the spec never defines. Its own constant reads = 0.36787944117144233; // 1/e, so the assertion restates the definition and needs an author, not an edit
  • assert jones_polynomial(…) = jones_polynomial(…) is followed by when bracket1 and bracket2 are related by Reidemeister moves — an English sentence, not a clause
suite --ratchet             RATCHET: CLEAN, three entries re-blessed
check_specs_generate.py     exit 0
check_seal_coverage.py      exit 0
check_elab_ratchet.py       exit 0

🤖 Generated with Claude Code

Spec-side, not parser-side. Of the eight lines using a single `=` where t27
needs `==`, three can be repaired without inventing meaning:

    assert G_MEASURED = 6.67430e-11 +/- 1.5e-15
      -> assert abs(G_MEASURED - 6.67430e-11) < 1.5e-15
    assert LOG3_2 * LOG2_3 = 1.0 within 1e-6
      -> assert abs(LOG3_2 * LOG2_3 - 1.0) < 1e-6
    assert BRACKET_UNKNOT = 1.0
      -> assert BRACKET_UNKNOT == 1.0

AND I VALIDATED THE FIRST TWO AGAINST A BROKEN LINE. My first rewrite used
`assert |x - y| < tol`, because specs/vsa/jones_polynomial.t27:318 writes it that
way -- and that line is itself one of the discarding ones. The parser has no
vertical-bar absolute value. Measured: the rewrite moved 2 tokens.

`abs(...)` is the corpus's actual idiom; specs/math/radix_economy.t27 uses it
four times in clauses that lower cleanly. With it:

    discarded tokens  23644 -> 23624
    constants        11 -> 10 fallback events
    radix_economy     5 ->  4
    jones_polynomial  4 ->  3
    all three still generate with every backend

THE OTHER FIVE ARE NOT MECHANICAL, and are left alone:

  * three carry quantifier prose (`for all positive integer n`,
    `for any a, b in {1, -1}`) and belong to #2774
  * `assert E_OPTIMAL = 1/e` references an `e` the spec never defines; the
    constant's own definition line says `= 0.36787944117144233; // 1/e`, so the
    assertion is a restatement of the definition and needs an author, not an edit
  * `assert jones_polynomial(...) = jones_polynomial(...)` is followed by
    `when bracket1 and bracket2 are related by Reidemeister moves` -- an English
    sentence, not a clause

    suite --ratchet     RATCHET: CLEAN, three entries re-blessed
    check_specs_generate.py / check_seal_coverage.py / check_elab_ratchet.py  exit 0

Refs #2754

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-29 07:57:47 UTC

Summary

Status Count
Total Open PRs 10
PRs with Failing Checks 7
PRs with All Checks Green 3
READY 2
FAILING 7
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=d25ac0cc159e != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@github-actions

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-29 08:07:03 UTC

Summary

Status Count
Total Open PRs 9
PRs with Failing Checks 7
PRs with All Checks Green 2
READY 1
FAILING 7
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=d25ac0cc159e != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag
gHashTag merged commit 3ef5a59 into master Aug 29, 2026
24 checks passed
@gHashTag
gHashTag deleted the w702-spec-notation branch August 29, 2026 09:40
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