Skip to content

Instantly share code, notes, and snippets.

@qaisjp
Last active October 24, 2016 22:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qaisjp/bd0d47d3846d9675e93f2555558b6cc5 to your computer and use it in GitHub Desktop.
Save qaisjp/bd0d47d3846d9675e93f2555558b6cc5 to your computer and use it in GitHub Desktop.

I don't know if we've been taught the general method for De Morgan's, but I'll say it anyway:

  • NOT the whole sentence
  • NOT each item in the brackets (direct children only)
  • INVERT each AND/OR. This makes AND become OR, and vice-versa (direct children only)

When I say direct children only, I mean that if you have (A or (B and C)), you should end up with not (not A and not (B and C)) by De Morgan's.

You should NOT end up with not (not A and (not B or not C)).

Notice how, in the correct example, the things in the inner "brackets" haven't changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment