-
Notifications
You must be signed in to change notification settings - Fork 43
Remove toPattern from Kore.Step.Simplification.Iff #2687
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
Conversation
|
|
|
| [ [fromNot cfCeil, fromNot chCeil] | ||
| , [chCeil, cgCeil, cfCeil] | ||
| , [chCeil, cfCeil] | ||
| , [chCeil, cfCeil, fromNot cgCeil] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a truth table to check this change, and found that the old output is equivalent to the new output. After that, I found a clear way to show that. Consider the second and third clauses, we have:
old: ( \ceil(f) ∧ \ceil(g) ∧ \ceil(h) ) ∨ ( \ceil(f) ∧ \ceil(h) )
If we do some factoring, we find:
old: \ceil(f) ∧ \ceil(h) ∧ ( \ceil(g) ∨ \top )
Look at the last conjunct: \ceil(g) ∨ \top. This is just \top. In other words, this term completely subsumes the last two clauses:
old: \ceil(f) ∧ \ceil(h)
In the new output, we are going to do the same factoring trick:
new: ( \ceil(f) ∧ \ceil(g) ∧ \ceil(h) ) ∨ ( \ceil(f) ∧ \not \ceil(g) ∧ \ceil(h) )
new: \ceil(f) ∧ \ceil(h) ∧ ( \ceil(g) ∨ \not \ceil(g) )
new: \ceil(f) ∧ \ceil(h)
So, the output in either case is equivalent. The output changes because it isn't minimal, in the sense that we don't do this kind of simplification.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, this is really helpful!
|
|
|
Fixes #2610
Review checklist
The author performs the actions on the checklist. The reviewer evaluates the work and checks the boxes as they are completed.