Skip to content

Simplify does not combine fractions over a common denominator #2137

Closed

Description

@Rafael-SOWNet

Simplify leaves a sum of fractions over one denominator apart:

Input Simplify Should be
x/(x+y) + y/(x+y) unchanged 1 provided not x + y = 0
1/(1 - (b/a)^2) - a^2/(a^2 - b^2) unchanged, also by simplifyn::8 0 provided …
x/c + (y*c - x*d)/(c^2*(z + d/c)) - (x*z + y)/(c*z + d) unchanged 0 provided …

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.

Activity

  1. added this to the 2.8 milestone on Oct 27, 2026
  2. Rafael-SOWNet commented on Oct 27, 2026

    @Rafael-SOWNet
    MemberAuthor

    Two more shapes from the same reading:

    • (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.
  3. Rafael-SOWNet commented on Oct 27, 2026

    @Rafael-SOWNet
    MemberAuthor

    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.

  4. moved this from Todo to In Progress in AngouriMathon Oct 27, 2026
  5. modified the milestones: 2.8, 2.7.0 on Oct 27, 2026
  6. moved this from In Progress to Done in AngouriMathon Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions