let get_term_sort (term: term) : Symbol.sort =
  match term with
    | Const symbol
    | Func { symbol = symbol } ->
        Symbol.sort symbol

    | _ ->
        failwith "Term.get_term_sort"