(b) The court shall declare the rule invalid if it finds that the rule violates constitutional provisions or exceeds the statutory authority or jurisdiction of the agency or was adopted without compliance with statutory rule-making procedures or is arbitrary or capricious, or that, in the case of a rule adopted pursuant to section five, article three of this chapter, action under said section five was not justified.
(c) When the invalidity of a rule has been so declared, the agency shall, within thirty days after such declaratory judgment has been entered, acquiesce therein and modify or rescind such invalidated rule in accord with the requirement of such declaratory judgment unless the agency promptly, and in any event within such thirty-day period, notifies the plaintiff or plaintiffs of its intention to apply for an appeal to the supreme court of appeals from such declaratory judgment pursuant to section one, article six of this chapter. In the event such agency shall thereafter make timely application for such appeal, the acquiescence of the agency in the invalidity of such rule shall not be required until thirty days after timely applications for such appeal have been refused or within thirty days after the appeal has been dismissed or otherwise disposed of in the supreme court of appeals by an affirmance of the judgment invalidating said rule.