You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Simplify does not combine fractions over a common denominator #2137
With c*(c*z + d) in place of the nested c^2*(z + d/c), the last one does reach 0.
Transformation.RationalCanonicalization proves identities of this kind, but Simplify does not reach them. A reader of Modenov's Problems in Geometry (#2131) found that most of the book's complex-number proofs are rational identities in several letters, and these shapes are where they fail.
(1+l^3)/(1+l)^3 stays unchanged. Its numerator and denominator share the factor 1 + l.
Chapter II proves identities in the book's own affine coordinates, which need a sum of fractions in three variables over one denominator. Those never reach 0. The same proofs written as polynomial determinants, in homogeneous or barycentric coordinates, reach 0 in about a second.
The library can already prove these.Transformation.RationalCanonicalization is public and decides every row above. It was written for #1251.
Input
RationalCanonicalization
x/(x+y) + y/(x+y)
1 provided not x + y = 0
1/(1 - (b/a)^2) - a^2/(a^2 - b^2)
0 provided not a ^ 3 - a * b ^ 2 = 0
the nested-denominator row
0 provided not c ^ 2 * z + c * d = 0
(1+l^3)/(1+l)^3
(l ^ 2 - l + 1) / (l ^ 2 + 2 * l + 1)
Entity.AsSingleFraction (#1239) writes the first as (x + y) / (x + y).
So the defect is that Simplify does not reach the canonical form, not that the form is missing. #2146 asked for together and cancel. Those are AsSingleFraction and this transformation, which already exist; AGENTS.md records that Together was turned down as a name. I'm closing #2146 as a duplicate of this one.
Whether Simplify should try the canonical form as one of its candidates is a cost question. It probably fits 2.8 as a candidate tried only on rational expressions, measured against the Simplify benchmarks. Making it the default canonical form is v3's.
Activity
Rafael-SOWNet commentedon Oct 27, 2026
Two more shapes from the same reading:
(1+l^3)/(1+l)^3stays unchanged. Its numerator and denominator share the factor1 + l.0. The same proofs written as polynomial determinants, in homogeneous or barycentric coordinates, reach0in about a second.Rafael-SOWNet commentedon Oct 27, 2026
The library can already prove these.
Transformation.RationalCanonicalizationis public and decides every row above. It was written for #1251.RationalCanonicalizationx/(x+y) + y/(x+y)1 provided not x + y = 01/(1 - (b/a)^2) - a^2/(a^2 - b^2)0 provided not a ^ 3 - a * b ^ 2 = 00 provided not c ^ 2 * z + c * d = 0(1+l^3)/(1+l)^3(l ^ 2 - l + 1) / (l ^ 2 + 2 * l + 1)Entity.AsSingleFraction(#1239) writes the first as(x + y) / (x + y).So the defect is that
Simplifydoes not reach the canonical form, not that the form is missing. #2146 asked fortogetherandcancel. Those areAsSingleFractionand this transformation, which already exist;AGENTS.mdrecords thatTogetherwas turned down as a name. I'm closing #2146 as a duplicate of this one.Whether
Simplifyshould try the canonical form as one of its candidates is a cost question. It probably fits 2.8 as a candidate tried only on rational expressions, measured against theSimplifybenchmarks. Making it the default canonical form is v3's.Simplify does not add a condition the input does not have (#2171)
A sum of fractions that is a constant over one denominator simplifies…