AngouriMath
Canonicalization
Property
Summary
A canonical form for the commutative structure: two expressions differing only in
how their sums, products, conjunctions, disjunctions and set operations are
arranged or nested come out as the identical tree.
how their sums, products, conjunctions, disjunctions and set operations are
arranged or nested come out as the identical tree.
Remarks
The order's key depends on a node's class and the normalisation changes classes:
in
a product, and is ordered against
the two alternate. Sorting a tree that has already settled sorts what the tree is
actually going to be.
the operands were written in, where ordering without the leading normalisation
fails 18 of the first and InnerSimplification alone fails 2024 of the
second. Its
exists, since zero-equivalence is undecidable here — and it is not a
simplification, since it makes an expression comparable rather than shorter.
Equal trees mean the expressions are equal; different trees mean nothing at all.
over one node, so it flattens as it sorts:
because InnerSimplification alone leaves those two as different trees
which print identically — associativity being normalised on the way out
rather than in the expression — so a comparison of printed forms cannot tell the
two situations apart.
InnerSimplification would move every commutative operand order in
every printed answer at once, which is a decision for a release rather than for a
transformation. #746 tier 1.
Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 4378 pages online