Double Negation - Artificial intelligence:
Always parents are correcting their children for the use of double negatives, but we have to be very alert with them in natural language: "He didn't tell me not to do it" doesn't necessarily mean the same as "He did tell me to do it". The similar of it is true with logical sentences: for example, we cannot change ¬(P ∧ Q) to (¬ P ∧ ¬Q) without risking the meaning of the sentence changing. However, there are firm cases when we can alter expressions with negation. Two options are given by de Morgan's law below, and we can also make simpler the statements by removing double negation.
You can be wondering why on earth anyone would ever write down a sentence in the first place with such a double negation. Of course, you are right. As humans, we would not write a sentence in logic like that. Still, remember that our agent will be doing search by using rewrite rules. It can be that as part of the search, they introduce a double negation, by following a certain rewrite rule to the letter. In this type of case, the agent would probably tidy it up by using this equivalence:
¬¬P ≡ P