Repository navigation
Power and Factorization declare the rest of the collecting family - #1196
Merged
Merged
Conversation
#1195 made Collects mean never larger and smaller for some input, and declared the thirteen rules of Common that are a hole matched twice and written once beside one new node. The guide named the relatives in Power and Factorization as next, and this declares them, each on its own count. Power declares nine. Eight are the family -- a ^ n * a, a / a ^ n, a ^ n / a, a ^ n * (a * rest), (c / a) ^ d * a, a / b / b, a / b ^ n / b and a / b / b ^ n -- and every one is 1 - |a| for the repeated hole: a base or a divisor matched twice and written once, against the one node the 1 in the new exponent or the exponent itself costs. The ninth, (c / a) ^ d * a ^ e = c ^ d * a ^ (e - d), was named a relative and is not one: the exponents fold to a leaf and the quotient goes, so it is -1 - |a| outright. Three more stay Unknown and say why beside the rule -- the logarithm of its own base attaches the node's domain condition, and the two radical rules compute through a helper whose answer is a whole times a root or a whole alone. Factorization declares its four: k + k*q, k + k, k - k*q and k*q - k, each 1 - |k|. Seven shapes join the corpus so that each newly declared rule fires on it at least once -- a power beside its own base on either side of a product or a quotient, and a divisor repeated, which the arithmetic grammar builds only with a power of a leaf. No pin moved this time: the safe ceiling still moves two of the five ordinary inputs. The census is 124 collect, 46 rearrange, 31 expand, 123 unjudged; the safe ceiling admits 170 of 324. Part of #746. Full suite 9579 passed, 0 failed -- one of them a throwaway census probe, not committed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Measured on a build of master (4b105e6) and of this branch, with one throwaway probe run on each. Over Transformation.CanonicalizationOverGraph(budget), (2 / x) ^ 3 * x was left as (2 * 1 / x) ^ 3 * x and is 8 * x ^ (-2); (2 / x) ^ 3 * x ^ 2 is 8 * 1 / x. The other Power shapes are unchanged for a measured reason -- x ^ 2 * x reaches x ^ (2 + 1) over the graph, no smaller at a leaf, and no safe rule folds the exponent, so the input is kept -- and Factorization's four have Common twins declared in #1195, so a + a * b was already (1 + b) * a. Entity.Canonicalize() is unchanged on every input probed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Rafael-SOWNet
added a commit
that referenced
this pull request
Sep 7, 2026
#1195 and #1196 declared the collecting family and left the rest at Unknown, and the guide says a new Unknown should be a finding written beside the rule. This writes the finding beside every one that did not have it: Boolean's five and two of Trigonometric's attach a truth value or a value with a condition whose size nothing bounds; sin a cos a is 2 - |a|, one larger at a leaf, and so the collecting half of the runaway pair was never "never larger"; the six factorial rules answer the product between two offsets, which collects when they are one apart and expands when they are five; the long division, the gcd cancellation, the perfect square, the two rationalisations and the interval paraphrase compute through a helper, and the count each comment gives says where the size comes from -- the perfect square is 5 - |cross term|, the conjugate is seven nodes more as written and measured -2 and +2 on the corpus because the helper folds the denominator it builds, and a bounded interval is 1 + |x| more where a half-line is two fewer. Thirty-one rules sit at Unknown outside the three families the guide settles as families -- the comparison set, Sort and CommonDenominator -- and every one of them carries its reason now. Nothing declared changes: comments and one sentence in the guide. Part of #746. Full suite 9578 passed, 0 failed. Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#1195 refined
Collectsto never larger, smaller for some input and declaredCommon's thirteenrules of the
1 − |a|family. Its guide text named the relatives inPowerandFactorizationasnext; this declares them, each on its own count, and the count was worth doing.
What is declared
Poweraⁿ·a,a/aⁿ,aⁿ/a,aⁿ·(a·r),(c/a)ᵈ·a,a/b/b,a/bⁿ/b,a/b/bⁿPower(c/a)ᵈ · aᵉ = cᵈ · a^(e−d)Factorizationk + k·q,k + k,k − k·q,k·q − kThree of
Power's stayUnknownwith the reason beside the rule:log(a, a) = 1attaches thenode's own domain condition; the two radical rules compute through a helper whose answer is a
whole times a root (+2) or a whole alone (−2).
Seven shapes join the corpus so every newly declared rule fires on it at least once — a power
beside its own base on either side of a product or a quotient, and a divisor repeated — and the
corpus test found no contradiction.
What did not move
No pin this time: the safe ceiling still moves 2 of the 5 ordinary inputs. Census: 124 collect,
46 rearrange, 31 expand, 123 unjudged; the safe ceiling admits 170 of 324.
Changed answers
Measured on a build of master (
4b105e69) and of this branch, recorded inBREAKING-CHANGES.md.Over
Transformation.CanonicalizationOverGraph(budget),(2 / x) ^ 3 * xwas left as(2 * 1 / x) ^ 3 * xand is8 * x ^ (-2);(2 / x) ^ 3 * x ^ 2is8 * 1 / x. The otherPowershapes are unchanged for a measured reason —x ^ 2 * xreachesx ^ (2 + 1), no smallerat a leaf, and no safe rule folds the exponent, so the input is kept — and
Factorization's fourhave
Commontwins declared in #1195, soa + a * bwas already(1 + b) * a.Entity.Canonicalize()is unchanged on every input probed.Part of #746.
Checks
Full suite 9579 passed, 0 failed, 14 skipped — one of the 9579 a throwaway census probe, not committed.
🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura