If the given Id can be replaced with a simpler expression, return Some(expr) else None.
If the given Id can be replaced with a simpler expression, return Some(expr) else None.
If it is convenient, you might write a partial function and then call .lift to get the correct Function type
If the current rule cannot apply, then try the argument here.
If the current rule cannot apply, then try the argument here. Note, this applies in series at a given node, not on the whole Dag after the first rule has run. For that, see Dag.applySeq.
This implements a simplification rule on Dags