remove some unused quantified variables from a theorem statement