generic DAG of formulas in module Transform, for efficiently
transform sets of formulas in a recursive fashion