docs: def is_symbol(string):
      """
      Return true if the string is a mathematical symbol.
      """
      return (
          is_int(string) or is_float(string) or
          is_constant(string) or is_unary(string) or
          is_binary(string) or
          (string == '(') or (string == ')')
      )