All Topics  
Negation

 

   Email Print
   Bookmark   Link






 

Negation



 
 
In logic
Logic

Logic is the study of the principles of valid demonstration and inference. Logic is a branch of philosophy, a part of the classical Trivium . The word derives from Greek language ?????? , fem....
 and mathematics
Mathematics

Mathematics is the study of quantity, structure, space, change, and related topics of pattern and form. Mathematicians seek out patterns whether found in numbers, space, natural science, computers, imaginary abstractions, or elsewhere....
, negation or not is an operation
Operation (mathematics)

In its simplest meaning in mathematics and logic, an operation is an action or procedure which produces a new value from one or more input values....
 on logical value
Logical value

In logic and mathematics, a logical value, also called a truth value, is a value indicating the extent to which a proposition is truth.In classical logic, the only possible truth values are true and false....
s, for example, the logical value of a proposition
Proposition

This article is about the term proposition in logic and philosophy; for other uses see PropositionIn logic and philosophy, proposition refers to either the "content" or Meaning of a meaningful declarative sentence or the pattern of symbols, marks, or sounds that make up a meaningful declarative sentence....
, that sends true
True

True is the adjective form of the word truth.True may also refer to:...
 to false
False

False is the antonym of the adjective true.False is the 2nd album of Gorefest, False .False may also refer to:* FALSE, an esoteric stack-oriented programming language...
 and false
False

False is the antonym of the adjective true.False is the 2nd album of Gorefest, False .False may also refer to:* FALSE, an esoteric stack-oriented programming language...
 to true
True

True is the adjective form of the word truth.True may also refer to:...
. Intuitively, the negation of a proposition holds exactly when that proposition does not hold. In grammar
Grammar

Grammar is the field of linguistics that covers the conventions governing the use of any given natural language. It includes morphology and syntax, often complemented by phonetics, phonology, semantics, and pragmatics....
, nor is an adverb
Adverb

An adverb is a part of speech. It is any word that modifies any other part of language: verbs, adjectives , clauses, sentence s and other adverbs, except for nouns; modifiers of nouns are primarily determiners and adjectives....
 which acts as a coordinating conjunction
Grammatical conjunction

In grammar, a conjunction is a part of speech that connects two words, phrases or clauses together. This definition may overlap with that of other parts of speech, so what constitutes a "conjunction" should be defined for each language....
.

Definition
Logical negation is an operation on one logical value
Logical value

In logic and mathematics, a logical value, also called a truth value, is a value indicating the extent to which a proposition is truth.In classical logic, the only possible truth values are true and false....
, typically the value of a proposition
Proposition

This article is about the term proposition in logic and philosophy; for other uses see PropositionIn logic and philosophy, proposition refers to either the "content" or Meaning of a meaningful declarative sentence or the pattern of symbols, marks, or sounds that make up a meaningful declarative sentence....
, that produces a value of true when its operand is false and a value of false when its operand is true.






Discussion
Ask a question about 'Negation'
Start a new discussion about 'Negation'
Answer questions from other users
Full Discussion Forum



Encyclopedia


In logic
Logic

Logic is the study of the principles of valid demonstration and inference. Logic is a branch of philosophy, a part of the classical Trivium . The word derives from Greek language ?????? , fem....
 and mathematics
Mathematics

Mathematics is the study of quantity, structure, space, change, and related topics of pattern and form. Mathematicians seek out patterns whether found in numbers, space, natural science, computers, imaginary abstractions, or elsewhere....
, negation or not is an operation
Operation (mathematics)

In its simplest meaning in mathematics and logic, an operation is an action or procedure which produces a new value from one or more input values....
 on logical value
Logical value

In logic and mathematics, a logical value, also called a truth value, is a value indicating the extent to which a proposition is truth.In classical logic, the only possible truth values are true and false....
s, for example, the logical value of a proposition
Proposition

This article is about the term proposition in logic and philosophy; for other uses see PropositionIn logic and philosophy, proposition refers to either the "content" or Meaning of a meaningful declarative sentence or the pattern of symbols, marks, or sounds that make up a meaningful declarative sentence....
, that sends true
True

True is the adjective form of the word truth.True may also refer to:...
 to false
False

False is the antonym of the adjective true.False is the 2nd album of Gorefest, False .False may also refer to:* FALSE, an esoteric stack-oriented programming language...
 and false
False

False is the antonym of the adjective true.False is the 2nd album of Gorefest, False .False may also refer to:* FALSE, an esoteric stack-oriented programming language...
 to true
True

True is the adjective form of the word truth.True may also refer to:...
. Intuitively, the negation of a proposition holds exactly when that proposition does not hold. In grammar
Grammar

Grammar is the field of linguistics that covers the conventions governing the use of any given natural language. It includes morphology and syntax, often complemented by phonetics, phonology, semantics, and pragmatics....
, nor is an adverb
Adverb

An adverb is a part of speech. It is any word that modifies any other part of language: verbs, adjectives , clauses, sentence s and other adverbs, except for nouns; modifiers of nouns are primarily determiners and adjectives....
 which acts as a coordinating conjunction
Grammatical conjunction

In grammar, a conjunction is a part of speech that connects two words, phrases or clauses together. This definition may overlap with that of other parts of speech, so what constitutes a "conjunction" should be defined for each language....
.

Definition


Logical negation is an operation on one logical value
Logical value

In logic and mathematics, a logical value, also called a truth value, is a value indicating the extent to which a proposition is truth.In classical logic, the only possible truth values are true and false....
, typically the value of a proposition
Proposition

This article is about the term proposition in logic and philosophy; for other uses see PropositionIn logic and philosophy, proposition refers to either the "content" or Meaning of a meaningful declarative sentence or the pattern of symbols, marks, or sounds that make up a meaningful declarative sentence....
, that produces a value of true when its operand is false and a value of false when its operand is true. So, if statement A is true, then ¬A (pronounced "not A") would therefore be false; and conversely, if ¬A is true, then A would be false.

The truth table
Truth table

A truth table is a mathematical table used in logic?specifically in connection with Boolean algebra , boolean functions, and propositional calculus?to compute the functional values of logical expression s on each of their functional arguments, that is, on each combination of values taken by their logical variables....
 of ¬p (also written as ~p or NOT p) is as follows:



The logical negation of a proposition p is notated in different ways in various contexts of discussion and fields of application. Among these variants are the following:

Variant Notations
Notation Vocalization
bar p,

p bar

p prime,

p complement

bang p


No matter how it is notated or symbolized, the logical negation ¬p is read as "it is not the case that p", or usually more simply as "not p".

  • Within a system of classical logic
    Classical logic

    Classical logic identifies a class of formal logics that have been most intensively studied and most widely used. They are characterised by a number of properties; non-classical logics are those that lack one or more of these properties, which are:...
    , double negation, that is, the negation of the negation of a proposition p, is logically equivalent to the initial proposition p. Expressed in symbolic terms, ¬(¬p) ⇔ p.


  • Within a system of intuitionistic logic
    Intuitionistic logic

    Intuitionistic logic, or constructivist logic, is the symbolic logic system originally developed by Arend Heyting to provide a formal basis for Luitzen Egbertus Jan Brouwer's programme of intuitionism....
    , however, ¬¬p is a weaker statement than p. On the other hand, the logical equivalence ¬¬¬p ⇔ ¬p remains valid.


Logical negation can be defined in terms of other logical operations. For example, ¬p can be defined as pF, where "→" is logical implication and F is absolute falsehood. Conversely, one can define F as p & ¬p for any proposition p, where "&" is logical conjunction
Logical conjunction

In logic and/or mathematics, logical conjunction or and is a two-place logical operation that results in a value of true if both of its operands are true, otherwise a value of false....
. The idea here is that any contradiction
Contradiction

In classical logic, a contradiction consists of a logical incompatibility between two or more propositions. It occurs when the propositions, taken together, yield two logical consequences which form the logical inversions of each other....
 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
Logical disjunction

File:ORGate2.pngIn logic and mathematics, or, also known as logical disjunction or inclusive disjunction is a logical operator that results in true whenever one or more of its operands are true....
.

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

In mathematics, Heyting algebras are special partially ordered sets that constitute a generalization of Boolean algebra s, named after Arend Heyting....
 (for intuitionistic logic).

Properties


  • distributivity
    Distributivity

    In mathematics, and in particular in abstract algebra, distributivity is a property of binary operations that generalises the distributive law from elementary algebra....
    : ~~


  • linear
    Linear

    The word linear comes from the Latin word linearis, which means created by lines.In mathematics, a linear map or function f is a function which satisfies the following two properties......
    : In Boolean algebra, a linear function is one such that:


If there exists a0, a1, ... , an such that f(b1, ... , bn) = a0 ⊕ (a1 b1) ⊕ ... ⊕ (an bn), for all b1, ... , bn .

Another way to express this is that each variable always makes a difference in the truth-value of the operation or it never makes a difference. Negation is a linear logical operator.

  • self dual
    Duality (mathematics)

    In mathematics, duality has numerous meanings. Generally speaking, duality is a metamathematics Involution . Some duality concepts are closely related and there are explicit theorems governing their relationships....
    : In Boolean algebra a self dual function is one such that:


If f(a1, ... , an) = ~f(~a1, ... , ~an) for all a1, ... , an . Negation is a self dual logical operator.

Rules of Inference


Like the other logical connectors, negation has two major rules of inference associated with it. The first could be called negation introduction, though it is more commonly known as reductio ad absurdum
Reductio ad absurdum

Reductio ad absurdum , also known as an apagogical argument, reductio ad impossibile, or proof by contradiction, is a type of logical argument where one assumes a claim for the sake of argument and derives an absurd or ridiculous outcome, and then concludes that the original claim must have been wrong as it led to an abs...
, or proof by contradiction. In propositional logic, this allows you to claim the negation of a proposition, if it would lead to a contradiction if it were true. This is also a common technique in mathematical and rhetorical arguments.

The other rule is known as double negation elimination. This is a feature of standard first order logic, that allows you to remove double negatives in front of propositions. Under the standard framework, double negatives can also introduced in front of propositions anywhere in a sentence without affecting the sentence's truth value. However, this is not true in intuitionist logic.

Computer science

As in mathematics, negation is used in computer science
Computer science

Computer science is the study of the theoretical foundations of information and computation, and of practical techniques for their implementation and application in computer systems....
 to construct logical statements.

if (!(r

t))

The "!" signifies logical NOT in B, C, and languages with a C-inspired syntax such as C++
C++

C++ is a general-purpose programming language. It is regarded as a middle-level language, as it comprises a combination of both high-level programming language and low-level programming language language features....
, Java
Java (programming language)

Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java ....
, JavaScript
JavaScript

JavaScript is a scripting language widely used for client-side web development. It was the originating Programming language dialect of the ECMAScript standard....
, Perl
Perl

In computer programming, Perl is a high-level programming language, List of programming languages by category, Interpreter , dynamic programming language....
, and PHP
PHP

PHP is a scripting language originally designed for producing dynamic web pages. It has evolved to include a command line interface capability and can be used in Standalone software Graphical user interface....
. "NOT" is the operator used in ALGOL 60, BASIC, and languages with an ALGOL-inspired syntax such as Pascal, Ada, and Eiffel
Eiffel (programming language)

Eiffel is an International Organization for Standardization-standardized, object-oriented programming language designed to enable programmers to efficiently develop extensible, reusable, reliable software....
. Some languages (C++, Perl, etc.) provide more than one operator for negation. A few languages like PL/I
PL/I

PL/I is an imperative programming computer programming programming language designed for scientific, engineering, and business applications. It is one of the most feature-rich programming languages and one of the very first in the highly-feature-rich category....
 and Ratfor
Ratfor

Ratfor is a programming language implemented as a preprocessor for Fortran 66. It provided modern control structures, unavailable in Fortran 66, to replace GOTOs and statement numbers....
, use ¬ for negation. Some modern computers and operating systems will display ¬ as ! on files encoded in ASCII
ASCII

American Standard Code for Information Interchange , is a coding standard that can be used for interchanging information, if the information is expressed mainly by the written form of English words....
.

In computer science there is also bitwise negation. This takes the value given and switches all the binary
Binary numeral system

The binary numeral system, or notation with a radix of 2. Owing to its straightforward implementation in digital electronic circuitry using logic gates, the binary system is used internally by all modern computers....
 1s to 0s and 0s to 1s. See bitwise operation
Bitwise operation

In computer programming, a bitwise operation operates on one or two bit patterns or Binary numeral system at the level of their individual bits....
. This is often used to create ones' complement
Signed number representations

In mathematics, negative numbers in any base are represented in the usual way, by prefixing them with a "−" sign. However, on a computer, there are various ways of representing a number's sign....
 or "~" in C or C++ and two's complement
Two's complement

The two's complement of a binary number is defined as the value obtained by subtracting the number from a large power of two .A two's-complement system or two's-complement arithmetic is a system in which negative numbers are represented by the two's complement of the absolute value; this system is the most common Signed number r...
 (just simplified to "-" or the negative sign since this is equivalent to taking the arithmetic negative value of the number) 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)

To demonstrate logical negation:

unsigned int abs(int x)

Inverting the condition and reversing the outcomes produces code that is logically equivalent to the original code, i.e. will have identical results for any input. (Note that depending on the compiler used, the actual instructions performed by the computer may differ.)

Similarly, the following is equivalent on two's complement machines:

unsigned int abs(int x)

However, since this relies on the binary representation of integers, it will not work on machines that do not use a two's-complement representation for negative numbers.

See also

  • Ampheck
  • Apophasis
    Apophasis

    Apophasis refers, in general, to "mentioning by not mentioning". Apophasis covers a wide variety of figures of speech....
  • Bitwise NOT
  • Cyclic negation
    Cyclic negation

    In logic, cyclic negation is a unary truth function that takes a truth value n and returns n-1 as value if n isn't the lowest value; otherwise it returns the highest value....
  • Double negative elimination
    Double negative elimination

    In propositional logic, the inference rules double negative elimination allow deriving the double negative equivalent by adding or removing a pair of negation signs....
  • Grammatical polarity
    Grammatical polarity

    Grammatical polarity is the distinction of affirmative and negative, which indicates the truth or falsehood of a statement respectively. In English language, grammatical polarity is generally indicated by the presence or absence of the modifier not, which negates the statement....
  • Minimal negation operator
    Minimal negation operator

    In logic and mathematics, the minimal negation operator is a multigrade operator where each is a k-ary boolean function defined in such a way that if and only if exactly one of the arguments is 0....
  • Negation (linguistics)
  • Negation as failure
    Negation as failure

    Negation as failure is a non-monotonic logic inference rule in logic programming, used to derive from failure to derive . It has been an important feature of logic programming since the earliest days of both Planner and Prolog....
  • NOT gate
  • Square of opposition
    Square of opposition

    In the system of Term Logic , the square of opposition is a diagram representing the different ways in which each of the four propositions of the system are logically related to each of the others....


External links



  • , on MathWorld
    MathWorld

    MathWorld is an online mathematics reference work, created and largely written by Eric W. Weisstein. It is sponsored by Wolfram Research Inc. and was partially funded by the National Science Foundation's National Science Digital Library grant to the University of Illinois at Urbana-Champaign....