Skip to content

Seven rules say how much they expand (#825) - #1159

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
growth-declared-negations
Sep 4, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
growth-declared-negations

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Growth is Unknown for a code replacement unless it is declared, and 262 rules sat there. Seven can
say what they do. 255 now do not.

Argued from the code, measured against the corpus

Two mechanisms, the same arithmetic.

Six negation rules — (-a) + (-b), (-a) - x, and the four that bring a negative factor out of
a product, a numerator or a denominator. The operators map one for one, the literal is replaced by
its magnitude, and the negation the replacement puts round the whole of it is two nodes:

y / (-a * x)   ->   -(y / (a * x))          five nodes to seven, for every input

One power rule — a ^ n = 1 / a ^ (-n). The power stays a power with its exponent replaced one
for one; the quotient and its numerator 1 are the two.

Each was also run against the generated corpus by RuleGrowthAgreesWithTheCorpusTest, between 9 and
84 firings apiece, none contradicting. That is corroboration and not the argument — the corpus can
only refute.

Why Expands is the right first batch

Not only because it is what they do. Saturation.RulesUpTo builds its set as the rules up to
Rearranges
, so:

  • declaring Collects or Rearranges adds a rule to what equality saturation fires;
  • declaring Expands changes nothing about what runs.

These seven record something that was already true without moving anything. The Collects and
Rearranges candidates in the measurement are real too, but each of those is a behavioural change
and wants the saturation measured before and after — a separate PR, not a line in this one.

The eighth, left alone

a-negated-reciprocal-rational-factor-is-a-negated-division measures +2 on all 18 of its
firings
, which is exactly the evidence the other seven have. It stays Unknown.

Working through its pattern I count five nodes to five, so the measurement and my reading of the
code disagree, and I cannot argue the claim. WritingARule.md says that where you cannot argue it
from the code you leave it Unknown — and that sentence was written in the previous PR, by me, so
it applies here first.

Declaring it on corpus agreement alone would be the same mistake #1158 caught: a growth asserted
from what it looked like rather than from what it does.

Verification

Full suite 9552 passed, 0 failed, 14 skipped. The census moves 262 → 255 in
WritingARule.md and RuleAuthoringGuideTest.

Part of #825.

Growth is `Unknown` for a code replacement unless it is declared, and 262 rules
sat there. Seven of them can say what they do, each argued from the shape of the
replacement rather than from the corpus, and each measured against the corpus as
well.

Two mechanisms, the same arithmetic. Six are negation rules -- (-a) + (-b),
(-a) - x, and the four that bring a negative factor out of a product, a
numerator or a denominator -- where the operators map one for one, the literal
is replaced by its magnitude, and the negation the replacement puts round the
whole of it is two nodes. The seventh is a ^ n = 1 / a ^ (-n), where the power
stays a power with its exponent replaced one for one and the quotient and its
numerator are the two.

Expands rather than the other two on purpose, and not only because it is what
they do. Saturation.RulesUpTo builds its set as the rules up to Rearranges, so
Collects and Rearranges are declarations that change which rules equality
saturation fires while Expands is one that does not. These seven record what was
already true without moving anything, which is the right first batch; the ones
that would change the saturation want it measured before and after, and that is
a separate change.

An eighth was measured at +2 on all 18 of its firings and is left alone.
`a-negated-reciprocal-rational-factor-is-a-negated-division` counts five nodes to
five when I work through its pattern, so the measurement and the reading disagree
and I cannot argue the claim. WritingARule.md says to leave such a rule Unknown,
and that applies to the person who wrote the sentence.

Full suite 9552 passed, 0 failed.

Part of #825.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
@Rafael-SOWNet
Rafael-SOWNet merged commit 7c642ce into master Sep 4, 2026
31 checks passed
@Rafael-SOWNet
Rafael-SOWNet deleted the growth-declared-negations branch September 4, 2026 12:25
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