remove the else condition and added the is.Boolean condition to general Basic instances.
Removed redundant tests count_ops(Basic()) = S.zero