It turns out that we only need to store the node formula_1 at the beginning of this path (and associate some meta-data with it to represent the removed nodes) and attach the subtree rooted at its end to formula_1.