Repository navigation
Simplify does not add a condition the input does not have - #2171
Merged
Rafael-SOWNet merged 1 commit intoOct 27, 2026
Merged
Conversation
PolynomialLongDivision divides by the divisor's leading coefficient. Its first attempt, on the pair as written, declines a symbolic one for the simplifier, since a quotient that loses a value of a parameter is not an equivalence. The second attempt, with the variables replaced by temporaries, had no such guard: it predates it, and #1269 left it as it was. (t x + y)/(1 - y x) divided there in y is -1/x + (t x + 1/x)/(1 - x y), undefined at x = 0, where the divisor is 1, and Simplify answered -(t x + y)/(1 - y x) + (t x + y)/(1 - y x) with 0 provided not 1 - x y = 0 and not x = 0. The input is -y + y at x = 0. The replaced attempt now declines too where the coefficient is symbolic and the divisor has more than one term in the variable. A divisor of one term, a x^k, is zero wherever its coefficient is, so dividing by it loses nothing the input had, and is still done. Guarding that case as well changed the limit of (tan(a x) - sin(b x))/(a x) at 0 from (a - b)/a to 1 - b/a, because Simplify does not put 1 - b/a over one denominator (#2137), so it is not guarded. On 2.6.0 and on this branch: -(t*x + y)/(1 - y*x) + (t*x + y)/(1 - y*x) 0 provided not 1 - x * y = 0 and not x = 0 -> 0 provided not 1 - x * y = 0 Unit suite 17,130 passed, 0 failed. SimpSweep 10,463/10,463 agree; CanonCheck matches its baseline; BoundCheck 0 disagreements; CasBench 120/121, unchanged. Part of #2134 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2171 +/- ##
==========================================
- Coverage 86.42% 86.41% -0.02%
==========================================
Files 295 295
Lines 64806 64808 +2
Branches 19059 19060 +1
==========================================
- Hits 56009 56004 -5
- Misses 4768 4774 +6
- Partials 4029 4030 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This was referenced Oct 27, 2026
Rafael-SOWNet
added a commit
that referenced
this pull request
Oct 27, 2026
…2172) With no threshold, codecov/project fails on any fall at all from the base commit's figure. Now that reports reach Codecov (#2162, #2165), that turns ordinary changes red: #2171 was at -0.02%, five lines that a new guard returns before. A threshold of 1% lets that movement through and still fails what the status is for, such as a test leg whose report goes empty, which moved the figure from 86.41% to 0.38%. Codecov's validator accepts the file and reads the threshold back as 1.0. Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Rafael-SOWNet
deleted the
a-division-in-placeholders-keeps-the-symbols-values
branch
October 28, 2026 10:27
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 #2134: its second row. The first row, a condition left out, is the question #1648 decides.
The defect:
PolynomialLongDivisiondivides by the divisor's leading coefficient. Its first attempt, on the pair as written, declines a symbolic one for the simplifier, since a quotient that loses a value of a parameter is not an equivalence. The second attempt, with the variables replaced by temporaries, has no such guard. It predates the guard, and #1269 left it as it was.(t x + y)/(1 - y x)divided there inygives-1/x + (t x + 1/x)/(1 - x y). That is undefined atx = 0, where the divisor is 1, andSimplifypassed the condition on:Simplify-(t*x + y)/(1 - y*x) + (t*x + y)/(1 - y*x)0 provided not 1 - x * y = 0 and not x = 00 provided not 1 - x * y = 0At
x = 0the input is-y + y, so the old answer was undefined at a point where the input is defined.The change: the replaced attempt now also declines a symbolic leading coefficient, where the divisor has more than one term in the variable.
A divisor of one term,
a x^k, is still divided. It is zero wherever its coefficient is, so dividing by that coefficient loses nothing the input had. That case is load-bearing: the limit of(tan(a x) - sin(b x))/(a x)at 0 reaches(a - b)/athrough it. Without it the limit comes out1 - b/a, becauseSimplifydoes not put1 - b/aover one denominator (#2137).Checked:
SimplifiedConditionNotStricterTestevaluates the answer atx = 0, y = 2, t = 3and expects0. The old answer gives NaN there.codecov/projectis red at −0.02% (5 hits fewer). The new guard returns before lines that tests used to reach, so that is expected. The status fails on any decrease at all, which is a configuration problem rather than a finding, and is taken up separately.🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura