AngouriMath

Navigation

← Back to list of members

CollapseMultipleFractions

 Property

Summary

CollapseMultipleFractions(AngouriMath.Entity), as data.

Remarks

The second set expressed here, and chosen because it is harder in three ways that
test whether the shape generalises rather than whether it works once. It has eight
rules instead of three; it is order-dependent, since
Mulf(Divf, Divf) has to be tried before Mulf(a, Divf) or the more
general rule would swallow the special one; and it needs a predicate on a
hole
— Integer { IsPositive: true } — which the matcher did not have.
One feature was added for it and nothing else changed, which is the answer to the
question this set was picked to ask.
The order-dependence above is no longer maintained by hand.Subsumes(AngouriMath.Core.Transformations.Matching.MatchPattern) computes it — Mulf(a, Divf(b, c)) matches
everything Mulf(Divf(a, b), Divf(c, d)) matches and more — and
MatchedRuleSet.RulesByPriority puts the specific rule first because of that
rather than because of where it sits in this file. Four of this set's rule pairs are
ordered that way, and they are four of only six such conflicts in the whole registry;
RulePriorityTest lists them.

























Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 4378 pages online