Fixpoint trans {b} (phi : form b) : form b :=
  match phi with
  | Impl phi1 phi2 => Impl (trans phi1) (trans phi2)
  | All x phi => All x (trans phi)
  | Pr s t => dnQ (Pr s t)
  | Q =>  Q  
  | Fal => Q
  end.

(* Specifications: *)
Lemma consts_trans b phi : consts (trans phi) = consts phi.
Lemma trans_subst b x t (phi : form b) : trans (subst x t phi) = subst x t (trans phi).