Algebraic structure classification #
Detects the strongest algebraic structure available for a type and caches
the classification in Arith.State.typeClassify. The state is a SymExtension,
so a type is classified once per SymM run and the result is shared by every
grind goal and every tactic of a sym block. The detection order is:
Grind.CommRing(includesFieldcheck)Grind.Ring(non-commutative)Grind.CommSemiring(viaOfSemiring.Qenvelope)Grind.Semiring(non-commutative)
Results (including failures) are cached in a single PHashMap ExprPtr ClassifyResult
to avoid repeated synthesis attempts.
Classify the algebraic structure of type, trying the strongest first:
CommRing > Ring > CommSemiring > Semiring.
Results are cached in Arith.State.typeClassify.