Repository navigation
Expand a power of a long sum without visiting the combinations it does not return - #2030
Merged
Rafael-SOWNet merged 1 commit intoOct 21, 2026
Conversation
…s not return Combinations(min, max, cellCount) enumerates the ways to share a power among the terms of a sum, and its loop ran i up to max at every depth, so every prefix of every length was visited: about 2^(n + k - 1) of them for the C(n + k - 1, k) it returns. Squaring a sum of thirty terms, 465 terms and well inside MaxExpansionTermCount, ran past a minute. The loop now stops where too few values are left above i to fill the remaining cells; a branch past that yields nothing, so no result and no order changes. Five of Rubi's integrals whose working squares such a sum were past the budget and are answered: 3.2.1's 1/((a g + b g x)^2 (A + B ln(e (a + b x)/(c + d x)))^2) and its n-th power, 4.1.3.1:357, and 6.7.1:1178 and 1251. Master f7f2a7a ran past 150 s on each; 2.5.0 declined three and ran past 60 s on two. Chain against master f7f2a7a: pocket of 571 rows, 532 -> 537 solved, 0 wrong; the samples unchanged; of the 8 rows that moved, alone, master solved none and this solves 5, the other three declined here where master declined one and ran out of time on two; 6,064 rows compared for allocation, none grew. Part of #233. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
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.
Part of #233.
Combinations(min, max, cellCount)inExpansion.csenumerates the ways to share a power among the terms of a sum. Its loop raniup tomaxat every depth, so it visited every prefix of every length: about2^(n + k - 1)of them, for theC(n + k - 1, k)it returns. Squaring a sum of thirty terms (465 terms, well insideMaxExpansionTermCount) ran past a minute. The loop now stops where too few values are left aboveito fill the remaining cells. A branch past that point yields nothing, so no result and no order changes.Five of Rubi's integrals square such a sum in their working and are answered now:
1/((a g + b g x)^2 (A + B ln(e ((a + b x)/(c + d x))^n))^2)n(a + a sin(e + f x))^(3/2) (A + B sin(e + f x))/(c + d sin(e + f x))^2sech(x)^2 tanh(x)^2/(2 + tanh(x)^3)^2coth(x)^3 csch(x) sqrt(1 + csch(x))Chain against master f7f2a7a:
The full unit suite passes: 16286 passed, 0 failed.
🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura