Skip to content

Same operands in AND expression after simplification #111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tomas789 opened this issue Nov 16, 2022 · 2 comments
Closed

Same operands in AND expression after simplification #111

tomas789 opened this issue Nov 16, 2022 · 2 comments

Comments

@tomas789
Copy link
Contributor

When simplifying the expression

AND(TRUE, OR(OR(symbol("x0"), FALSE), AND(symbol("x2"), TRUE), NOT(TRUE)), AND(AND(TRUE, TRUE, symbol("x2"), TRUE), NOT(symbol("x0"))))

Which produces the expression

AND(NOT(Symbol('x0')), Symbol('x2'), Symbol('x2'))

Which could be trivially simplified to

AND(NOT(Symbol('x0')), Symbol('x2'))
@tomas789
Copy link
Contributor Author

I can confirm that the PR #113 also fixes this issue.

pombredanne added a commit that referenced this issue Nov 15, 2024
This fixes the issues #112 and #111
Main reason was that when doing the negative absorption the result
was the same as one of the arguments already present.
This caused it to be duplicated in arguments.

Reference: #111
Reference: #112
Co-authored-by: Frank Dana <[email protected]>
Co-authored-by: Philippe Ombredanne <[email protected]>
Authored-by: Tomas Krejci @tomas789
Signed-off-by: Philippe Ombredanne <[email protected]>
@pombredanne
Copy link
Collaborator

Fixed with #113 Thank you ++

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Apr 20, 2025
5.0 (2025-04-03)
----------------

* API changes

 * Drop support for Python versions older than 3.9.
 * Add support by testing on Python 3.11 to 3.14
 * Fix absorption issues bastikr/boolean.py#111 and
   bastikr/boolean.py#112
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants