From e5cb369838836ff6dd67a90d78dd298756cdeef8 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Tue, 3 Dec 2024 22:56:11 -0600 Subject: [PATCH] NotImplementedError for nonliteral BooleanFunction.equals --- sympy/logic/boolalg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sympy/logic/boolalg.py b/sympy/logic/boolalg.py index 802cd0e3c5d0..c0c999647ee8 100644 --- a/sympy/logic/boolalg.py +++ b/sympy/logic/boolalg.py @@ -124,8 +124,8 @@ def equals(self, other): from sympy.logic.inference import satisfiable from sympy.core.relational import Relational - if self.has(Relational) or other.has(Relational): - raise NotImplementedError('handling of relationals') + if not all(is_literal(i) for i in (self, other)): + raise NotImplementedError('non-literal BooleanFunction') more = self.atoms() less = other.atoms() if len(more) < len(less):