AngouriMath
Subsumes(AngouriMath.Core.Transformations.Matching.MatchPattern)
Method (no overloads)
Summary
Whether every expression other matches, this one matches too — so
that this pattern is the more general of the two, and a rule written on it
would swallow a rule written onother if it were tried first.
that this pattern is the more general of the two, and a rule written on it
would swallow a rule written on
Remarks
order-dependent, since
this relation, observed by hand and then maintained by hand. Computed instead, the
order it implies is derived from the patterns rather than from where somebody typed
them.
expression the other matches, this matches — and every clause below is structural, so
the claim holds for all expressions rather than for the ones a test happened to
generate.
a hole carrying a predicate is arbitrary code, an
a value of another runtime type (a rational that reduced to an integer), and an n-ary
those answers
written, which is what the code did before.
pattern is an equality constraint —
against the other as a term, carrying an assignment from this pattern's holes to
the other's subpatterns and requiring a repeated hole to be assigned consistently.
Comparing NodeCount would call those two equally general and get the
ordering wrong in the one case the ordering exists for.
Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 4378 pages online