Skip to content
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

Rules to convert logical expressions to CNF (Issue 152) #155

Merged
merged 17 commits into from
Jan 31, 2024

Conversation

gskorokhod
Copy link
Contributor

Basic rules to simplify logical expressions (e.g. unwrap nested AND and nested OR, distribute NOT over an expression, etc)

See: #152

Depends on PR #83

@gskorokhod gskorokhod self-assigned this Jan 29, 2024
@gskorokhod gskorokhod marked this pull request as draft January 29, 2024 10:38
@gskorokhod
Copy link
Contributor Author

This is not ready to merge yet, just putting it out there :)

@gskorokhod
Copy link
Contributor Author

One problem I've encountered so far is this:

This thread suggests using distributive laws:

  1. (P⋁(Q⋀R))↔(P⋁Q)⋀(P⋁R)

  2. (P⋀(Q⋁R))↔(P⋀Q)⋁(P⋀R)

However, these would cause a loop (see attached image)

image

Not sure what to do about this yet..

@gskorokhod gskorokhod linked an issue Jan 29, 2024 that may be closed by this pull request
@ozgurakgun
Copy link
Contributor

I like the look of these rules! We can talk about the looping behaviour.

@gskorokhod gskorokhod marked this pull request as ready for review January 29, 2024 15:50
@gskorokhod
Copy link
Contributor Author

I think that's it in terms of rules actually!
(I have De Morgan's Law and one of the 2 distributive rules)

Might be better to wait for Kieran's PR to get merged, then rebase and test the rules before we merge though?

@gskorokhod gskorokhod changed the title Basic rules to simplify logical expressions (Part of Issue 152) Rules to convert logical expressions to CNF (Issue 152) Jan 29, 2024
@ozgurakgun ozgurakgun merged commit 96601b0 into conjure-cp:main Jan 31, 2024
11 checks passed
@gskorokhod gskorokhod deleted the issue-152 branch January 31, 2024 15:45
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

Successfully merging this pull request may close these issues.

Basic rules to translate logical expressions into CNF
2 participants