On the representation of dynamic search spaces in theorem proving