/// Rewriting is complete when all rules have been attempted with no change. Rules may be organised
/// The engine will apply rules in an earlier group to the entire tree before trying later groups.
/// rules and the engine-created [`Update`] values which contain their modifications to the tree.
/// The engine provides events for more fine-tuned control over rewriting behaviour. Events have mutable
/// In effect, before a node is passed to rules, all nodes in the path from the root (including the
/// Event handling is useful when, for example, using a symbol table to keep track of variable definitions.
/// When entering a scope where a variable is defined, one can place the variable and its value into the table.
/// That stack can then be used for quick value lookup while inside the scope. When leaving the scope the
/// is purely a function of a node and its children, rules should only be checked once unless a node
/// fn rule_eval_mul(cmds: &mut Commands<Expr, i32>, subtree: &Expr, meta: &i32) -> Option<Expr> {
/// fn rule_expand_sqr(cmds: &mut Commands<Expr, i32>, subtree: &Expr, meta: &i32) -> Option<Expr> {