Skip to content

Learn modulo a prime whether the elimination over the rationals declines - #2007

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
decline-an-elimination-modulo-a-prime
Oct 21, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
decline-an-elimination-modulo-a-prime

Conversation

@Rafael-SOWNet

@Rafael-SOWNet Rafael-SOWNet commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Part of #233.

TrySolveOverPolynomials' reading and Bareiss elimination now run first on the system's image modulo 2^31 - 1. These are the same readings, pivots, products and exact divisions, but in residues, where a multiplication costs one machine instruction and a minor's rationals cost a greatest common divisor. The intermediates are minors, so an image has no monomial that the rational one lacks. Any of these on the image is therefore one over Q too, and the solve over Q is declined at once:

  • a product past MaxIntermediateTerms;
  • an exponent past MaxDegree;
  • an entry the reading refuses;
  • a row that reduces to 0 = c.

Anything else says nothing, such as an image that does not exist or a division that does not come out, and the solve runs as before. Nothing is ever answered on the strength of the images.

The images can mislead only where a nonzero polynomial of the elimination vanishes modulo the prime, i.e. every coefficient a multiple of 2^31 - 1. That would decline a system that would otherwise be solved. None of the measured rows does.

The Hermite reductions of Rubi's 1/(a + b cosh(x) + c sinh(x))^n under u = e^x are twenty-row systems whose minors pass four thousand terms by the sixth pivot. They spent seconds each before declining, and the rule reached after the decline answers in milliseconds.

Measured against master 20a4b39, then rebased onto a567c8b:

master this
pocket, 1,951 rows 1,889 solved 1,889 solved, verdicts identical
allocation over the 1,886 solved on both 654 GB 429 GB
time over the same 812 s 733 s
6.7.1:866 21.6 s, 57.7 GB 3.4 s, 1.3 GB
6.7.1:880 16.0 s, 39.6 GB 1.6 s, 0.7 GB
samples of families 0–8 — unchanged

The five rows that moved, re-run alone:

  • 6.7.1:921 and 929 go from timeout to 2.0 s and 2.8 s;
  • 3.2.1:152 and 6.7.1:715 and 725 have identical allocation on both arms. They take about 20 s on either arm, past the 5 s budget, so they flip with load.

No row solved on both grew its allocation past 1.3×. The one wrong in the pocket, 6.1.5:94, is wrong on master too.

Answers are unchanged, so there is no BREAKING-CHANGES entry. Master a567c8b answers 921 and 929 too, given 60 s, and the answers are identical character for character: 23.1 s and 49.8 GB, and 27.4 s and 61.3 GB, there; 3.9 s and 1.2 GB, and 5.7 s and 1.5 GB, here.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

TrySolveOverPolynomials' reading and Bareiss elimination now run first on
the system's image modulo 2^31 - 1: the same readings, pivots, products and
exact divisions, in residues that cost a machine multiplication where a
minor's rationals cost a greatest common divisor. The intermediates are
minors, so each image has no monomial the rational one lacks, and a product
past the term bound, an exponent past the degree bound, a refused entry or
a row reducing to 0 = c there is one over Q too. The solve over Q is then
declined at once. Anything else says nothing, and the solve runs as before;
nothing is answered on the strength of the images.

The Hermite reductions of Rubi's 1/(a + b cosh(x) + c sinh(x))^n under
u = e^x are twenty-row systems whose minors pass four thousand terms by the
sixth pivot, and they spent seconds each before declining.

Pocket of 1,951 rows: verdicts identical, 1,889 solved on both. Over the
1,886 solved on both, allocation 654 -> 429 GB, time 812 -> 733 s;
6.7.1:866 21.6 s -> 3.4 s (57.7 -> 1.3 GB), 880 16.0 s -> 1.6 s. Samples of
every family unchanged. The five rows that moved, re-run alone: 6.7.1:921
and 929 timeout -> 2.0 s and 2.8 s; the other three identical in
allocation. No row's allocation grew past 1.3x.

Part of #233.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
@Rafael-SOWNet Rafael-SOWNet added this to the 2.6.0 milestone Oct 21, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit 8c46d55 into master Oct 21, 2026
34 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in AngouriMath Oct 21, 2026
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