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

Double negation bug #1

Closed
scottmangiapane opened this issue Sep 22, 2016 · 3 comments
Closed

Double negation bug #1

scottmangiapane opened this issue Sep 22, 2016 · 3 comments

Comments

@scottmangiapane
Copy link

Double negation results in an error message saying that the input is invalid.

Ex:
    AvB works
    (AvB) works
    
(~(AvB)) doesn't work

@mrieppel
Copy link
Owner

Thanks! But that's just the syntax I'm using for propositional logic. The grammar is:

p ::= Atomic | ~p | (p & p) | (p v p) | (p > p) | (p <> p)

Negation doesn't introduce parentheses, so the double negation of (AvB) would be ~~(AvB), just like the double negation of P would be ~~P, rather than ((P)).

@scottmangiapane
Copy link
Author

scottmangiapane commented Sep 27, 2016

Oh okay, I see what you mean. My original though process was that (A NAND
B) NAND C could only be written as ((A&B)&C) (and therefore cause the
parenthesis problem), because I didn't know that Sheffer stroke was the
same thing as NAND and I can just use that instead.

Also, great website! I particularly like the conversion to LaTeX table.

@mrieppel
Copy link
Owner

mrieppel commented Sep 27, 2016

Cool, happy to hear you like the program! The double-NAND formula you have ((A&B)&C) is well formed as it stands. It would only be ill-formed if you didn't have the second conjunct, as in ((A&B)).

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