From 18a813f4c782df0d707b72d7785d89ccf7330eca Mon Sep 17 00:00:00 2001 From: Antoine Viallon Date: Fri, 5 Jan 2024 23:12:22 +0100 Subject: [PATCH] utils: add equivalence --- compiler/utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/utils.py b/compiler/utils.py index 1f562a5..5bbc102 100644 --- a/compiler/utils.py +++ b/compiler/utils.py @@ -1,2 +1,6 @@ def implies(a: bool, b: bool) -> bool: return (not b and not a) or b + + +def equivalence(a: bool, b: bool) -> bool: + return implies(a, b) and implies(b, a)