Skip to content

A Gröbner root in decimals is checked to its precision - #2322

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
a-groebner-root-in-decimals-is-checked-to-its-precision
Nov 1, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
a-groebner-root-in-decimals-is-checked-to-its-precision

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

The Gröbner triangularisation keeps a tuple only where every equation comes back exactly zero with the tuple put in. A root of a univariate factor with no closed form is found numerically, and its residual is never exactly zero, so one such root declined the whole system. The eliminator it fell back to answered in decimals and could lose solutions.

x^2 + y^2 = 2, x^3 - y = -2 eliminates to (x + 1) times a quintic with no roots in radicals. 2.6.0 and master both answer its four complex solutions without either real one:

rows (-1, 1) (-1.3455, -0.4356)
2.6.0 4 missing missing
master 4 missing missing
this branch 6 exact yes

A tuple with a decimal in it is now kept where each equation's residual is under 1E-10 of the largest term the equation adds up to. A tuple that is no solution, as a basis out of shape position can give, misses by whole quantities. An exact tuple is still checked exactly, and the decimal test runs only after the exact one has failed. An entry in decimals is listed as the number it evaluates to.

No issue was filed. A check of generated systems with known solutions (1190 systems) found it: known solutions missing 10 → 7, wrong rows 0 → 0. The three recovered are all of that shape (x^2 + y^2 = 20, x^3 - y = -12 and x^2 + y^2 = 5, x^3 - y = 1 besides the one above), and the seven still missing are missing on master too.

BREAKING-CHANGES.md has an entry. Test: GroebnerSystemTest.ARationalSolutionBesideDecimalOnesIsKept, which fails on master. APolynomialSystemWithDecimalRootsIsStillAnswered's comment described the old decline, and is updated.

🤖 Generated with Claude Code

The Gröbner triangularisation kept a tuple only where every equation came back
exactly zero with the tuple put in. A root of a univariate factor with no closed
form is found numerically, and no structural pass makes its residual zero, so one
such root declined the whole system. The eliminator it fell back to answered in
decimals and could lose solutions: x^2 + y^2 = 2, x^3 - y = -2 eliminates to
(x + 1) times a quintic with no roots in radicals, and 2.6.0 and master both
answered its four complex solutions without either real one, (-1, 1) and
(-1.3455, -0.4356).

A tuple with a decimal in it is now kept where each equation's residual is under
1E-10 of the largest term the equation adds up to. A tuple that is no solution,
as a basis out of shape position can give, misses by whole quantities and fails
this as it fails the exact test. An exact tuple is still checked exactly, and the
decimal test is made only once the exact one has failed. An entry in decimals is
listed as the number it evaluates to, rather than as the polynomial in decimals
back-substitution wrote it as.

Generated systems with known solutions (e387 syscheck, 1190 systems): known
solutions missing 10 -> 7, wrong rows 0 -> 0.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Rafael-SOWNet Rafael-SOWNet added this to the 2.7.0 milestone Nov 1, 2026
@Rafael-SOWNet Rafael-SOWNet moved this from Todo to In review in AngouriMath Nov 1, 2026
@codecov

codecov Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 73.33333% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.75%. Comparing base (46a2e03) to head (b503b0c).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...Functions/Algebra/Groebner/GroebnerSystemSolver.cs 73.33% 1 Missing and 3 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2322      +/-   ##
==========================================
- Coverage   86.75%   86.75%   -0.01%     
==========================================
  Files         312      312              
  Lines       68338    68351      +13     
  Branches    19870    19877       +7     
==========================================
+ Hits        59289    59295       +6     
- Misses       4891     4895       +4     
- Partials     4158     4161       +3     
Flag Coverage Δ
cpp 37.77% <ø> (ø)
csharp 87.29% <73.33%> (-0.01%) ⬇️
fsharp 32.97% <ø> (ø)
interactive 40.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...Functions/Algebra/Groebner/GroebnerSystemSolver.cs 76.57% <73.33%> (+0.04%) ⬆️

... and 9 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Rafael-SOWNet
Rafael-SOWNet merged commit d6e8427 into master Nov 1, 2026
35 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in AngouriMath Nov 1, 2026
@Rafael-SOWNet
Rafael-SOWNet deleted the a-groebner-root-in-decimals-is-checked-to-its-precision branch November 1, 2026 21:27
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