let decl fmt = function
  | Function (s, tl, t) ->
      fprintf fmt "logic %s: %a -> %a@\n"
        s (print_list comma pure_type) tl pure_type t
  | Predicate (s, tl) ->
      fprintf fmt "logic %s: %a -> prop@\n"
        s (print_list comma pure_type) tl
  | Axiom (s, p) ->
      fprintf fmt "axiom %s: %a@\n" s predicate p
  | Goal (s, p) ->
      fprintf fmt "goal %s:@.@[  %a@]@\n" s predicate p
  | Type (t) ->
      fprintf fmt "@[type %a@]@\n" pure_type t