utils: add equivalence
This commit is contained in:
parent
43b2dc9e93
commit
18a813f4c7
1 changed files with 4 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue