It would make sense to have true and false inherit from a common "SymPyBoolean" class for isinstance checking.