Skip to content

Expand a power of a long sum without visiting the combinations it does not return - #2030

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
expand-a-power-of-a-long-sum-without-dead-branches
Oct 21, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
expand-a-power-of-a-long-sum-without-dead-branches

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #233.

Combinations(min, max, cellCount) in Expansion.cs enumerates the ways to share a power among the terms of a sum. Its loop ran i up to max at every depth, so it visited every prefix of every length: about 2^(n + k - 1) of them, for the C(n + k - 1, k) it returns. Squaring a sum of thirty terms (465 terms, 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 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:

Rubi master f7f2a7a v2.5.0 this
3.2.1 1/((a g + b g x)^2 (A + B ln(e ((a + b x)/(c + d x))^n))^2) past 150 s declined 3.7 s
3.2.1, the same without the n past 150 s past 60 s 2.5 s
4.1.3.1:357 (a + a sin(e + f x))^(3/2) (A + B sin(e + f x))/(c + d sin(e + f x))^2 past 150 s declined 1.5 s
6.7.1:1178 sech(x)^2 tanh(x)^2/(2 + tanh(x)^3)^2 past 150 s past 60 s 6.7 s
6.7.1:1251 coth(x)^3 csch(x) sqrt(1 + csch(x)) past 150 s declined 9.1 s

Chain against master f7f2a7a:

  • The pocket of 571 rows went from 532 to 537 solved, with 0 wrong.
  • The samples are unchanged.
  • Of the 8 rows that moved, run alone, master solved none and this branch solves 5. The other three are declined here; master declined one of them and ran out of time on two.
  • 6,064 rows were compared for allocation, and none grew.

The full unit suite passes: 16286 passed, 0 failed.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant