Skip to content

Commit 75e7dba

Browse files
Power and Factorization declare the rest of the collecting family (#1196)
* Power and Factorization declare the rest of the collecting family #1195 made Collects mean never larger and smaller for some input, and declared the thirteen rules of Common that are a hole matched twice and written once beside one new node. The guide named the relatives in Power and Factorization as next, and this declares them, each on its own count. Power declares nine. Eight are the family -- a ^ n * a, a / a ^ n, a ^ n / a, a ^ n * (a * rest), (c / a) ^ d * a, a / b / b, a / b ^ n / b and a / b / b ^ n -- and every one is 1 - |a| for the repeated hole: a base or a divisor matched twice and written once, against the one node the 1 in the new exponent or the exponent itself costs. The ninth, (c / a) ^ d * a ^ e = c ^ d * a ^ (e - d), was named a relative and is not one: the exponents fold to a leaf and the quotient goes, so it is -1 - |a| outright. Three more stay Unknown and say why beside the rule -- the logarithm of its own base attaches the node's domain condition, and the two radical rules compute through a helper whose answer is a whole times a root or a whole alone. Factorization declares its four: k + k*q, k + k, k - k*q and k*q - k, each 1 - |k|. Seven shapes join the corpus so that each newly declared rule fires on it at least once -- a power beside its own base on either side of a product or a quotient, and a divisor repeated, which the arithmetic grammar builds only with a power of a leaf. No pin moved this time: the safe ceiling still moves two of the five ordinary inputs. The census is 124 collect, 46 rearrange, 31 expand, 123 unjudged; the safe ceiling admits 170 of 324. Part of #746. Full suite 9579 passed, 0 failed -- one of them a throwaway census probe, not committed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura * Record the answers the thirteen declarations change Measured on a build of master (4b105e6) and of this branch, with one throwaway probe run on each. Over Transformation.CanonicalizationOverGraph(budget), (2 / x) ^ 3 * x was left as (2 * 1 / x) ^ 3 * x and is 8 * x ^ (-2); (2 / x) ^ 3 * x ^ 2 is 8 * 1 / x. The other Power shapes are unchanged for a measured reason -- x ^ 2 * x reaches x ^ (2 + 1) over the graph, no smaller at a leaf, and no safe rule folds the exponent, so the input is kept -- and Factorization's four have Common twins declared in #1195, so a + a * b was already (1 + b) * a. Entity.Canonicalize() is unchanged on every input probed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
1 parent 4b105e6 commit 75e7dba

7 files changed

Lines changed: 102 additions & 22 deletions

File tree

‎BREAKING-CHANGES.md‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ read first.
7474
| | the same on `x + x`, and `x + x * y` | `x + x`, `x * y + x` — left as written | `2 * x`, `(1 + y) * x` |
7575
| **Silent** | `RewriteRules.Common.Rules[i].Growth`, for sixteen rules | `Unknown` | `Collects` for fourteen, `Rearranges` and `Expands` for the reciprocal-factor pair |
7676
| **Silent** | what `RewriteRuleGrowth.Collects` promises | fewer nodes for every input | never more, and fewer for some — every rule that was `Collects` still is |
77+
| | `Transformation.CanonicalizationOverGraph(budget).ApplyOrKeep("(2 / x) ^ 3 * x")`, and its like with a power of the denominator | `(2 * 1 / x) ^ 3 * x` — left as written | `8 * x ^ (-2)`; `(2 / x) ^ 3 * x ^ 2` is `8 * 1 / x` |
78+
| **Silent** | `RewriteRules.Power.Rules[i].Growth` for nine rules, and `Factorization`'s for four | `Unknown` | `Collects` |
7779

7880
### A cancelled quotient says its operand is defined, not only non-zero
7981

@@ -900,6 +902,30 @@ and answers exactly as before on every input below.
900902
| `RewriteRules.All` by growth | 97 / 45 / 30 / 152 | 111 / 46 / 31 / 136 |
901903
| what `RewriteRuleGrowth.Collects` promises | fewer nodes for every input | never more, and fewer for some |
902904

905+
### `Power` and `Factorization` declare the rest of the collecting family
906+
907+
The entry above named the relatives of the `1 − |a|` shape in `Power` and `Factorization` as next.
908+
Nine rules of `Power` — `a ^ n * a`, `a / a ^ n`, `a ^ n / a`, `a ^ n * (a * rest)`,
909+
`(c / a) ^ d * a`, `(c / a) ^ d * a ^ e`, `a / b / b`, `a / b ^ n / b`, `a / b / b ^ n` — and four of
910+
`Factorization` — `k + k * q`, `k + k`, `k - k * q`, `k * q - k` — declare `Collects`, each on its
911+
own count; three more of `Power` stay `Unknown` with the reason written beside the rule. The safe
912+
ceiling admits 170 of 324 rules where it admitted 157.
913+
914+
On ordinary input little moves, and for a measured reason: `x ^ 2 * x` reaches `x ^ (2 + 1)` over
915+
the graph, which is no smaller at a leaf, and no safe rule folds the exponent, so the input is kept;
916+
and `Factorization`'s four have twins in `Common` that were declared in the entry above, so
917+
`a + a * b` was already `(1 + b) * a`. What does move is the power of a reciprocal beside its own
918+
denominator, whose exponents fold as the replacement is built.
919+
920+
| | Was | Is |
921+
|---|---|---|
922+
| `Transformation.CanonicalizationOverGraph(budget).ApplyOrKeep("(2 / x) ^ 3 * x")` | `(2 * 1 / x) ^ 3 * x` — left as written | `8 * x ^ (-2)` |
923+
| the same on `(2 / x) ^ 3 * x ^ 2` | `(2 * 1 / x) ^ 3 * x ^ 2` | `8 * 1 / x` |
924+
| the same on `x ^ 2 * x`, `x / x ^ 2`, `x ^ 2 / x`, `x / y / y`, `a + a * b`, `a + a` | `x ^ 2 * x`, `1 / x ^ 2 * x`, `1 / x * x ^ 2`, `(1 / y) ^ 2 * x`, `(1 + b) * a`, `2 * a` | the same |
925+
| `RewriteRules.Power.Rules` by growth — collects / rearranges / expands / unknown | 13 / 6 / 1 / 13 | 22 / 6 / 1 / 4 |
926+
| `RewriteRules.Factorization.Rules` by growth | 4 / 0 / 2 / 5 | 8 / 0 / 2 / 1 |
927+
| `RewriteRules.All` by growth | 111 / 46 / 31 / 136 | 124 / 46 / 31 / 123 |
928+
903929
## 2.4.0 — since 2.3.0
904930

905931
Released 2026-08-28. These entries sat under “Unreleased” while 2.4.0 was tagged and

‎Sources/AngouriMath/Core/Transformations/Matching/MatchedRules.cs‎

Lines changed: 60 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1450,15 +1450,21 @@ is var (divided, remainder)
14501450
MatchPattern.Commutative<Mulf>(MatchPattern.Any("k"), MatchPattern.Any("q"))),
14511451
bound => bound["k"] * (1 + bound["q"]),
14521452
Soundness.Sound,
1453-
description: "k + k*q = k*(1 + q)"),
1453+
description: "k + k*q = k*(1 + q)",
1454+
// The shared term is matched twice and written once, and the 1 is one node more:
1455+
// the delta is 1 - |k|, nothing at a leaf and a shrink beyond it.
1456+
growth: RewriteRuleGrowth.Collects),
14541457

14551458
// k + k -> 2k
14561459
new MatchedRule(
14571460
"a-term-added-to-itself-doubles",
14581461
MatchPattern.Node<Sumf>(MatchPattern.Any("k"), MatchPattern.Any("k")),
14591462
bound => 2 * bound["k"],
14601463
Soundness.Sound,
1461-
description: "k + k = 2k"),
1464+
description: "k + k = 2k",
1465+
// The term is matched twice and written once, and the 2 is one node more: the
1466+
// delta is 1 - |k|, nothing at a leaf and a shrink beyond it.
1467+
growth: RewriteRuleGrowth.Collects),
14621468

14631469
// k*p - k*q -> k*(p - q). The outer node is a difference and stays one.
14641470
new MatchedRule(
@@ -1480,7 +1486,10 @@ is var (divided, remainder)
14801486
MatchPattern.Commutative<Mulf>(MatchPattern.Any("k"), MatchPattern.Any("q"))),
14811487
bound => bound["k"] * (1 - bound["q"]),
14821488
Soundness.Sound,
1483-
description: "k - k*q = k*(1 - q)"),
1489+
description: "k - k*q = k*(1 - q)",
1490+
// The shared term is matched twice and written once, and the 1 is one node more:
1491+
// the delta is 1 - |k|, nothing at a leaf and a shrink beyond it.
1492+
growth: RewriteRuleGrowth.Collects),
14841493

14851494
// k*q - k -> k*(q - 1)
14861495
new MatchedRule(
@@ -1490,7 +1499,10 @@ is var (divided, remainder)
14901499
MatchPattern.Any("k")),
14911500
bound => bound["k"] * (bound["q"] - 1),
14921501
Soundness.Sound,
1493-
description: "k*q - k = k*(q - 1)"),
1502+
description: "k*q - k = k*(q - 1)",
1503+
// The shared term is matched twice and written once, and the 1 is one node more:
1504+
// the delta is 1 - |k|, nothing at a leaf and a shrink beyond it.
1505+
growth: RewriteRuleGrowth.Collects),
14941506

14951507
// k - k -> 0
14961508
new MatchedRule(
@@ -2767,7 +2779,10 @@ is var (divided, remainder)
27672779
MatchPattern.Any("a")),
27682780
bound => new Powf(bound["a"], bound["n"] + 1),
27692781
Soundness.SoundUnderAssumptions,
2770-
description: "a ^ n * a = a ^ (n + 1)"),
2782+
description: "a ^ n * a = a ^ (n + 1)",
2783+
// The base is matched twice and written once, and the 1 added to the exponent is
2784+
// one node more: the delta is 1 - |a|, nothing at a leaf and a shrink beyond it.
2785+
growth: RewriteRuleGrowth.Collects),
27712786

27722787
new MatchedRule(
27732788
"two-powers-of-one-base-multiply-by-adding-exponents",
@@ -2900,7 +2915,11 @@ is var (divided, remainder)
29002915
MatchPattern.Node<Powf>(MatchPattern.Any("a"), MatchPattern.Any("n"))),
29012916
bound => new Powf(bound["a"], 1 - bound["n"]),
29022917
Soundness.SoundUnderAssumptions,
2903-
description: "a / a ^ n = a ^ (1 - n)"),
2918+
description: "a / a ^ n = a ^ (1 - n)",
2919+
// The base is matched twice and written once, and the 1 the exponent is taken
2920+
// from is one node more: the delta is 1 - |a|, nothing at a leaf and a shrink
2921+
// beyond it.
2922+
growth: RewriteRuleGrowth.Collects),
29042923

29052924
new MatchedRule(
29062925
"a-power-over-its-own-base-lowers-the-exponent",
@@ -2909,7 +2928,10 @@ is var (divided, remainder)
29092928
MatchPattern.Any("a")),
29102929
bound => new Powf(bound["a"], bound["n"] - 1),
29112930
Soundness.SoundUnderAssumptions,
2912-
description: "a ^ n / a = a ^ (n - 1)"),
2931+
description: "a ^ n / a = a ^ (n - 1)",
2932+
// The base is matched twice and written once, and the 1 taken from the exponent
2933+
// is one node more: the delta is 1 - |a|, nothing at a leaf and a shrink beyond it.
2934+
growth: RewriteRuleGrowth.Collects),
29132935

29142936
new MatchedRule(
29152937
"a-number-raised-to-a-logarithm-of-itself-is-the-antilogarithm",
@@ -2957,7 +2979,10 @@ is var (divided, remainder)
29572979
MatchPattern.Commutative<Mulf>(MatchPattern.Any("a"), MatchPattern.Any("rest"))),
29582980
bound => new Powf(bound["a"], bound["n"] + 1) * bound["rest"],
29592981
Soundness.SoundUnderAssumptions,
2960-
description: "a ^ n * (a * rest) = a ^ (n + 1) * rest"),
2982+
description: "a ^ n * (a * rest) = a ^ (n + 1) * rest",
2983+
// The base is matched twice and written once, and the 1 added to the exponent is
2984+
// one node more: the delta is 1 - |a|, nothing at a leaf and a shrink beyond it.
2985+
growth: RewriteRuleGrowth.Collects),
29612986

29622987
// Taking a factor out from under a root needs that factor positive, or the root to be
29632988
// a whole power. https://github.com/asc-community/AngouriMath/issues/752
@@ -3001,7 +3026,11 @@ is var (divided, remainder)
30013026
bound => new Powf(bound["c"], bound["d"])
30023027
* new Powf(bound["a"], 1 - (Number)bound["d"]),
30033028
Soundness.SoundUnderAssumptions,
3004-
description: "(c / a) ^ d * a = c ^ d * a ^ (1 - d), for numeric c and d"),
3029+
description: "(c / a) ^ d * a = c ^ d * a ^ (1 - d), for numeric c and d",
3030+
// The two numbers are leaves and 1 - d folds to one; the base is matched twice
3031+
// and written once, and the second power is one node more than the quotient it
3032+
// replaces: the delta is 1 - |a|, nothing at a leaf and a shrink beyond it.
3033+
growth: RewriteRuleGrowth.Collects),
30053034

30063035
new MatchedRule(
30073036
"a-power-of-a-numeric-reciprocal-times-a-power-of-its-own-denominator-subtracts-the-exponents",
@@ -3013,7 +3042,10 @@ is var (divided, remainder)
30133042
bound => new Powf(bound["c"], bound["d"])
30143043
* new Powf(bound["a"], (Number)bound["e"] - (Number)bound["d"]),
30153044
Soundness.SoundUnderAssumptions,
3016-
description: "(c / a) ^ d * a ^ e = c ^ d * a ^ (e - d), for numeric c, d and e"),
3045+
description: "(c / a) ^ d * a ^ e = c ^ d * a ^ (e - d), for numeric c, d and e",
3046+
// The three numbers are leaves and e - d folds to one; the base is matched twice
3047+
// and written once, and the quotient goes: the delta is -1 - |a|, at most -2.
3048+
growth: RewriteRuleGrowth.Collects),
30173049

30183050
new MatchedRule(
30193051
"dividing-twice-by-one-thing-squares-it",
@@ -3022,7 +3054,10 @@ is var (divided, remainder)
30223054
MatchPattern.Any("b")),
30233055
bound => bound["a"] / new Powf(bound["b"], 2),
30243056
Soundness.SoundUnderAssumptions,
3025-
description: "a / b / b = a / b ^ 2"),
3057+
description: "a / b / b = a / b ^ 2",
3058+
// The divisor is matched twice and written once, and the exponent is one node
3059+
// more: the delta is 1 - |b|, nothing at a leaf and a shrink beyond it.
3060+
growth: RewriteRuleGrowth.Collects),
30263061

30273062
new MatchedRule(
30283063
"dividing-by-a-power-and-then-by-its-base-raises-the-exponent",
@@ -3033,7 +3068,10 @@ is var (divided, remainder)
30333068
MatchPattern.Any("b")),
30343069
bound => bound["a"] / new Powf(bound["b"], bound["n"] + 1),
30353070
Soundness.SoundUnderAssumptions,
3036-
description: "a / b ^ n / b = a / b ^ (n + 1)"),
3071+
description: "a / b ^ n / b = a / b ^ (n + 1)",
3072+
// The divisor is matched twice and written once, and the 1 added to the exponent
3073+
// is one node more: the delta is 1 - |b|, nothing at a leaf and a shrink beyond it.
3074+
growth: RewriteRuleGrowth.Collects),
30373075

30383076
new MatchedRule(
30393077
"dividing-by-a-thing-and-then-by-a-power-of-it-raises-the-exponent",
@@ -3042,7 +3080,10 @@ is var (divided, remainder)
30423080
MatchPattern.Node<Powf>(MatchPattern.Any("b"), MatchPattern.Any("n"))),
30433081
bound => bound["a"] / new Powf(bound["b"], bound["n"] + 1),
30443082
Soundness.SoundUnderAssumptions,
3045-
description: "a / b / b ^ n = a / b ^ (n + 1)"),
3083+
description: "a / b / b ^ n = a / b ^ (n + 1)",
3084+
// The divisor is matched twice and written once, and the 1 added to the exponent
3085+
// is one node more: the delta is 1 - |b|, nothing at a leaf and a shrink beyond it.
3086+
growth: RewriteRuleGrowth.Collects),
30463087

30473088
new MatchedRule(
30483089
"dividing-by-two-powers-of-one-base-adds-the-exponents",
@@ -3092,6 +3133,8 @@ is var (divided, remainder)
30923133
MatchPattern.Node<Logf>(MatchPattern.Any("a"), MatchPattern.Any("a")),
30933134
(node, bound) => new Providedf(1, ((Logf)node).DomainCondition),
30943135
Soundness.SoundUnderAssumptions,
3136+
// Left Unknown: the condition attached is the node's own domain condition, whose
3137+
// size nothing here bounds.
30953138
description: "log(a, a) = 1, where log(a, a) is defined"),
30963139

30973140
// ln(1/b) = -ln(b) is false on the negative reals: at b = -0.63 the two differ by the
@@ -3174,6 +3217,8 @@ is var (divided, remainder)
31743217
Soundness.Sound,
31753218
when: bound => Functions.Patterns.ReduceRadical(
31763219
(Integer)bound["radicand"], (Rational)bound["power"]) is not null,
3220+
// Left Unknown: the helper answers a whole times a root, two nodes more than the
3221+
// pattern, or a whole alone, two fewer.
31773222
description: "sqrt(8) = 2 * sqrt(2), and its like for a positive whole radicand"),
31783223

31793224
// The rule above takes a whole power out from under one root; this takes a root out
@@ -3192,6 +3237,8 @@ is var (divided, remainder)
31923237
bound => Functions.Patterns.DenestRadical(bound["radicand"])!,
31933238
Soundness.Sound,
31943239
when: bound => Functions.Patterns.DenestRadical(bound["radicand"]) is not null,
3240+
// Left Unknown: the helper computes the answer, and the radicands it denests take
3241+
// more shapes than one count covers.
31953242
description: "sqrt(5 + 2*sqrt(6)) = sqrt(2) + sqrt(3)"));
31963243

31973244
/// <summary>

‎Sources/AngouriMath/Core/Transformations/Saturation.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ internal static class Saturation
4444
/// ceiling should refuse — it means the rule's growth was not judged, because its
4545
/// replacement is code rather than a written pattern, so admitting it accepts a rewrite
4646
/// nobody measured. But it is where the rules are: of the 324 rules in
47-
/// <see cref="MatchedRules"/>, <b>111 collect, 46 rearrange, 31 expand and 136 are
48-
/// unjudged</b>. A ceiling that refuses the fourth value still refuses 42% of the library,
47+
/// <see cref="MatchedRules"/>, <b>124 collect, 46 rearrange, 31 expand and 123 are
48+
/// unjudged</b>. A ceiling that refuses the fourth value still refuses 38% of the library,
4949
/// and what is left could not do much when this was written — over six expression pairs
5050
/// equal only through a larger intermediate form, the
5151
/// <see cref="RewriteRuleGrowth.Rearranges"/> ceiling proved two, and

‎Sources/AngouriMath/Docs/Contributing/WritingARule.md‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ A pattern replacement gets:
135135
- **an exact growth**, counted from the two patterns rather than declared.
136136

137137
A code replacement gets neither, and its growth is `Unknown` unless you declare one. That is the
138-
honest default — **136** rules sit at `Unknown` — but declare it where you can justify it:
138+
honest default — **123** rules sit at `Unknown` — but declare it where you can justify it:
139139

140140
```csharp
141141
// The Chebyshev expansion of sin(n * a) is a sum of n terms where the pattern is one node,
@@ -181,9 +181,10 @@ corpus, and each is false:
181181
Two more used to be listed here and are not. The repeated hole that pays a literal to be gathered —
182182
`a * (a * b) = a ^ 2 * b`, `k + k = 2 * k` and their relatives, every one `1 - |a|` — was
183183
undeclarable only while `Collects` was read as "always fewer"; it is the commonest collecting shape
184-
there is, and `Collects` promises never larger. `Common`'s thirteen are declared, with the count in
185-
each one's comment; the relatives in `Power` and `Factorization` — `a ^ n * a`, `a / b / b` and
186-
theirs — are the next to declare, each on its own count. And the reciprocal-factor rules were said
184+
there is, and `Collects` promises never larger. `Common`'s thirteen, `Power`'s eight and
185+
`Factorization`'s four are declared, with the count in each one's comment — and the count is worth
186+
doing, since `Power`'s ninth relative, `(c / a) ^ d * a ^ e`, turned out to be `-1 - |a|` outright
187+
rather than one of the family. And the reciprocal-factor rules were said
187188
to admit two spellings of one thing; `IsWholeReciprocal` is `entity is Rational(...)`, so it admits
188189
the literal only, and the pair is exactly `Rearranges` and exactly `Expands`.
189190

‎Sources/Tests/UnitTests/Core/Transformations/ProvidedInAnEClassTest.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public void NoWrittenPatternIntroducesACondition()
9494
/// before the graph is wired into anything.
9595
/// </summary>
9696
/// <remarks>
97-
/// <c>SafeRules</c> is <c>RulesUpTo(Rearranges)</c>, 157 of 324 rules. The 136 sitting at
97+
/// <c>SafeRules</c> is <c>RulesUpTo(Rearranges)</c>, 170 of 324 rules. The 123 sitting at
9898
/// <c>Unknown</c> are excluded by design, since their growth was never judged — so the
9999
/// ceiling that is safe to run finds little, and the ceiling that finds things admits
100100
/// rewrites nobody measured. That trade is the open part of tier 2, and this pins where it

‎Sources/Tests/UnitTests/Core/Transformations/RuleAuthoringGuideTest.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,15 @@ public void ReplacementAPatternOrCode()
8989
"how many rules have a pattern on both sides");
9090
Stated(33, rules.Count(rule => rule.Reversed is not null),
9191
"how many two-sided rules have a direction");
92-
Stated(136, rules.Count(rule => rule.Growth is RewriteRuleGrowth.Unknown),
92+
Stated(123, rules.Count(rule => rule.Growth is RewriteRuleGrowth.Unknown),
9393
"how many rules sit at Unknown growth");
9494

9595
// The rest of the census, because `Saturation.RulesUpTo` argues from it in prose and
9696
// the figures it quoted had gone stale by a factor of four -- "26 collect, 17
9797
// rearrange, 9 expand and 270 unjudged", measured before the growth declarations
9898
// went in. The argument survived; the arithmetic did not. A number a remark reasons
9999
// from belongs somewhere that fails when it moves.
100-
Stated(111, rules.Count(rule => rule.Growth is RewriteRuleGrowth.Collects),
100+
Stated(124, rules.Count(rule => rule.Growth is RewriteRuleGrowth.Collects),
101101
"how many rules are declared Collects");
102102
Stated(46, rules.Count(rule => rule.Growth is RewriteRuleGrowth.Rearranges),
103103
"how many rules are declared Rearranges");

‎Sources/Tests/UnitTests/Core/Transformations/RuleGrowthAgreesWithTheCorpusTest.cs‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,12 @@ public sealed class RuleGrowthAgreesWithTheCorpusTest
145145
// a sum or a difference of itself -- and the sign-times-absolute-value cancellation.
146146
"x + x * y", "x + (x + y)", "x + (x - y)", "x - (y - x)", "(y - x) - x",
147147
"sgn(x) * (y * x) / abs(x)",
148+
149+
// A power beside its own base, on either side of a product or a quotient, and a
150+
// divisor repeated -- the collecting shapes of `Power` that the arithmetic grammar
151+
// builds only with a power of a leaf.
152+
"x ^ 2 * x", "x / x ^ 2", "x ^ 2 / x", "(2 / x) ^ 3 * x", "(2 / x) ^ 3 * x ^ 2",
153+
"x / y / y", "x / y ^ 2 / y",
148154
};
149155

150156
private static List<Entity> Corpus()

0 commit comments

Comments
 (0)