code: def is_variable(x):
      "A variable is an Expr with no args and a lowercase symbol as the op."
      return isinstance(x, Expr) and not x.args and is_var_symbol(x.opf is_variable(x):
      "A variable is an Expr with no args and a lowercase symbol as the op."
      return isinstance(x, Expr) and not x.args and is_var_symbol(x.op)
docs: A variable is an Expr with no args and a lowercase symbol as the op.