Skip to content

Commit

Permalink
Update sympy/logic/boolalg.py
Browse files Browse the repository at this point in the history
  • Loading branch information
smichr authored Dec 4, 2024
1 parent 2116458 commit 0d41f96
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sympy/logic/boolalg.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,10 @@ def equals(self, other):
"""
from sympy.logic.inference import satisfiable

if not all(is_literal(i) for i in (self, other)):
def ok(f):
return isinstance(f, (BooleanFunction, Symbol)) and (not f.args or
all(ok(a) for a in f.args))
if not ok(self) or not ok(other):
raise NotImplementedError('non-literal BooleanFunction')
more = self.atoms()
less = other.atoms()
Expand Down

0 comments on commit 0d41f96

Please sign in to comment.