Negation

From Free net encyclopedia

(Redirected from Logical not)

In grammar, logic, and mathematics, negation is an operation on truth values, for instance, the truth value of a proposition, that sends true to false and false to true.

Contents

Definition and notation

In logic, logical negation is a unary logical operator that reverses the truth value of its operand.

The negation of the statement p is written in various ways:

  • p (which is p with a bar over it)
  • ~p
  • ¬p
  • NOT p
  •  !p
  • p'

It is read as "It is not the case that p", or simply "not p".

Truth Table
A not A
F T
T F

~p is true if and only if p is false. For instance, if p denotes the statement "today is Saturday", then its negation ~p is the statement "today is not Saturday".

  • In intuitionistic logic, however, ~~p is a weaker statement than p. Nevertheless, ~~~p and ~p are logically equivalent.

Logical negation can be defined in terms of other logical operations. For example, ~p can be defined as pF, where → is material implication and F is absolute falsehood. Conversely, one can define F as p & ~p for any proposition p, where & is logical conjunction. The idea here is that any contradiction is false. While these ideas work in both classical and intuitionistic logic, they don't work in Brazilian logic, where contradictions are not necessarily false. But in classical logic, we get a further identity: pq can be defined as ~pq, where ∨ is logical disjunction.

Algebraically, logical negation corresponds to the complement in a Boolean algebra (for classical logic) or a Heyting algebra (for intuitionistic logic).

Grammar

In grammar, negation is the process that turns an affirmative statement (I am the walrus) into its opposite denial (I am not the walrus). Nouns as well as verbs can be grammatically negated, by the use of a negative adjective (There is no walrus), a negative pronoun (Nobody is the walrus), or a negative adverb (I never was the walrus).

In English, negation for most verbs other than be and have, or verb phrases in which be, have or do already occur, requires the recasting of the sentence using the dummy auxiliary verb do, which adds little to the meaning of the negative phrase, but serves as a place to attach the negative particles not, or its contracted form -n't, to:

  • I have a walrus.
  • I haven't a walrus. (rare, but it is still possible to negate have without the auxiliary do.)
  • I don't have a walrus. (the most common way in contemporary English.)

In Middle English, the particle not could be attached to any verb:

  • I see not the walrus.

In Modern English, these forms fell out of use, and the use of an auxiliary such as do or be is obligatory in most cases:

  • I do not see the walrus.
  • I am not seeing the walrus.
  • I have not seen the walrus.

The verb do also follows this rule, and therefore requires a second instance of itself in order to be marked for negation:

  • The walrus doesn't do tricks
not
  • The walrus doesn't tricks.

In English, as in most other Germanic languages, the use of double negatives as grammatical intensifiers was formerly in frequent use:

  • We don't have no walruses here.

Usage prescriptivists consider this use of double negatives to be a solecism, and condemn it. It makes the rhetorical figure of litotes ambiguous. It remains common in colloquial English. In Ancient Greek, a simple negative (οὐ or μὴ) following another simple or compound negative (e.g., οὐδείς, no one) results in an affirmation, whereas a compound negative following a simple or compound negative strengthens the negation.

  • οὐδείς οὐκ ἔπασχε τι, everyone was suffering, literally no one was not suffering something.
  • μὴ θορυβήσῃ μηδείς, let no one raise an uproar, literally do not let no one raise an uproar.

Other languages have simpler forms of negation; in Latin, simple negation is a matter of adding the negative particles non or ne to the verb. In French, the most basic form of verb negation involves adding the circumflexion ne ... pas to the main verb or its auxiliary; je veux un morse ("I want a walrus"); je ne veux pas de morse ("I do not want a walrus.")

Philologically, from the Latin non: no, not indeed, a categoric negative root concept found in languages, even if in different forms. "Not that I know of", expressive of categoric negative assertion, egotistic, defensive, cognitive. Also a negative prefix to concepts, especially as expressed in L. nihil, Eng. emphatic no, definitively not. L. nemo is person oriented, and opposite to L. nihil and means no man, nobody. ne hemo (old form) = no man (homo). Nihil, no+thing, nothing is thing oriented, opposite to nemo. L. nullus means no, not, none (of all those or anything involved). ne ullus = not any one, where unulus is the diminutive of unus, one. Both person and thing oriented, where emphasis is on insignificance. None has ever been so - emphatic, person oriented expression, emphasis being here also denoted by ever (L. aevum, Gr. aion}which here really means: No (one + ever) has been.

Computer science

As in mathematics, negation is used in computer science to prove the logic of a statement.

   if (!(r == t))
   {
       //the statements that happen when r does NOT equal t
   }

The ! signifies logical NOT in C, [[C++]], Java, JavaScript, Perl and PHP. "NOT" is the operation used in ALGOL 60, BASIC, Pascal, Ada, Eiffel and Seed7. The ! operator has proven so popular over the years that the operation "!=" is used for not equal to. However, "!(r == t)" and "r != t" are often equivalent after compilation (but not under the X86 processor, as it has a separate "not equal" assembly). This is called logical not which changes a truth to a false or vice versa.

In computer science there is also bitwise negation. This takes the value given and switches all the binary 1's to 0's and 0's to 1's. See bitwise operation. This is often used to create ones' complement or "~" in C or C++ and two's complement (just simplified to "-" or the negative sign) as it basically creates the opposite (negative value equivalent) or mathematical complement of the value (where both values are added together they create a whole).

Take the following for example:

Say we wanted to get the absolute (positive equivalent) value of a given integer to following would work as the "-" changes it from negative to positive (we know it is negative because it is true that "x < 0")

   unsigned int abs(int x)
   {
       if(x<0)
           return -x;
       else
           return x;
   }

To prove logical negation the following should work

   unsigned int abs(int x)
   {
       if(!(x<0))
           return x;
       else
           return -x;
   }

We have applied NOT to the if statement boolean variable to create the opposite effect. This still works as we have also swapped the outcome to ensure the same thing happens. However this is less efficient as the if now takes an extra operation and is larger when converted into binary. To make similarities with mathematics ~~q is equivalent to q but is less strong.

Similarly the following would do the same on two's complement machines.

   unsigned int abs(int x)
   {
       if(x<0)
           return ((~x)+1);
       else
           return x;
   }

However this is machine-dependent and will not work on machines that use sign bits or one's complement.

References

  • Horn, L., A Natural History of Negation, Stanford 2001.
  • von Wright, G.H., "On the Logic of Negation", Commentationes Physico-Mathematicae, vol. 22, 1953–1959.

See also

External links

de:Negation et:Eitus es:Puerta lógica#Puerta NO (NOT) fr:Négation logique it:Negazione he:לא (לוגיקה) ja:否定 mk:Логичка негација nl:Ontkenning no:Negasjon pl:Negacja sv:Logisk negation th:นิเสธ zh:逻辑非