From cf6cb2afc9dd10d3892ab2e6c1331c5a85edb02a Mon Sep 17 00:00:00 2001 From: Rafael Vuijk Date: Mon, 7 Sep 2026 12:23:06 +0000 Subject: [PATCH] The two documents that still deferred a scheduling policy say what was measured EMatching.md deferred whether Expands rules ever join SafeRules to "a separate document's question, once one exists", and Transformations.md's list of what is left said the graph had no production caller. Both were true when written and are not now: #1193 and #1194 measured that the growth ceiling is the scheduling policy and that Expands rules do not join the safe set; #1198 and #1202 found what the graph did need -- a rational folded on insertion and an extraction that is a fixed point from the leaves up -- by running the safe ceiling over the corpus; and #1201 gave the graph its first production caller. The documents point at those rather than at a question nobody is going to open. Part of #746. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura --- .../AngouriMath/Docs/Contributing/EMatching.md | 16 ++++++++++++++-- .../Docs/Contributing/Transformations.md | 6 +++++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Sources/AngouriMath/Docs/Contributing/EMatching.md b/Sources/AngouriMath/Docs/Contributing/EMatching.md index 112d4ba78..e616963a7 100644 --- a/Sources/AngouriMath/Docs/Contributing/EMatching.md +++ b/Sources/AngouriMath/Docs/Contributing/EMatching.md @@ -26,6 +26,15 @@ using the reversibility work to avoid firing a rule right next to its own invers whichever matcher is underneath — not a consequence of this document. This document is scoped to what e-matching actually buys: not materialising a term to find out whether a rule's *shape* matches. +> **Answered since, by measurement rather than by a policy** (#1193, #1194). The one runaway at the +> widest ceiling is a single inverse pair split across `ExpandMultipleAngle` and `Trigonometric`, +> bounded to the trigonometric sets; at `RulesUpTo(Rearranges)` every member of that family +> saturates, because `ExpandMultipleAngle` declares `Expands`. **The growth ceiling is the +> scheduling policy**: it withholds the expanding direction of every pair whose two directions are +> declared, and can only protect a pair whose directions *are* declared — which is what declaring a +> growth for a code-built rule is for (#1195–#1197). `Expands` rules do not join `SafeRules`, and no +> second mechanism is planned. See `InversePairTable.md` and `RunawayBreadthTest`. + ## Where the patterns actually are `RewriteRules.All` — the public registry `Transformation.EqualitySaturation` drew `SafeRules` from @@ -168,8 +177,11 @@ bound are extracted — narrower than falling back on the whole rule. ## What is deliberately not decided here -**Whether `Growth.Expands` rules ever join `SafeRules`**, and under what scheduling policy — a -separate document's question, once one exists to answer it. +**Whether `Growth.Expands` rules ever join `SafeRules`** — decided since, and by measurement: they +do not, and the growth ceiling is the scheduling policy (see the note under *What this is not +trying to fix*, above). What the graph does need is a rational folded on insertion (#1198) and an +extraction that is a fixed point from the leaves up rather than a recursive walk (#1202), both of +which were found by running the safe ceiling over the corpus rather than over sixteen expressions. **Whether the local fallback (extract-then-`TryApply`, kept for `Gathered`-containing rules) is worth removing later** by also solving e-matching for `GatheredPattern`, or stays permanently as the honest diff --git a/Sources/AngouriMath/Docs/Contributing/Transformations.md b/Sources/AngouriMath/Docs/Contributing/Transformations.md index f36d1903a..0cb49b7f6 100644 --- a/Sources/AngouriMath/Docs/Contributing/Transformations.md +++ b/Sources/AngouriMath/Docs/Contributing/Transformations.md @@ -244,7 +244,11 @@ So what is left, in dependency order: consumer #746 tier 2 names is the inverse-pair table equality saturation needs, since a saturation engine keeps both results where this pipeline keeps one and so has to be told which rewrites undo each other. `RewriteRuleGrowth` does not answer that: it says which way a rule moves, not which - rule is the inverse of which. + rule is the inverse of which — though for a pair whose two directions are *declared*, the growth + ceiling already withholds the expanding one (#1194), which is as much of the table as saturation + has needed so far. The graph itself has its first production caller: the perfect-square collapse + asks `Saturation.ProvesEqual` before it asks `Simplify` (#1201), measured as a caller that meets + the standing performance condition rather than as a speed-up. - **Rendering a step as a sentence** — #746's v5.0. Everything a sentence needs is now on a step except one thing: *why the rewrite is allowed*. `Soundness` is declared, not checked, and a rule that holds only under an assumption does not say which. That is the same gap