Reasoning about theory formulation and reformulation: a new solution to the qualifation problem