Go backward to 2.2.1 Logical ConstantsGo up to 2.2 Propositional LogicGo forward to 2.2.3 Conjunctions

2.2.2 Negations

If A is a formula, then
~A
is a formula.

Alternative Forms  Other syntactic forms of negation are

• A, ~ A, -A, `!A`;
• non-A;
• "not A", "never A", "in no case A";
• `not(A)`.

The last line denotes the input syntax of the Logic Evaluator.

Negation of infix atomic formulas is often expressed by crossing the predicate symbol, e.g.

x not < y
represents ~(x < y).

Definition 5 (Semantics of Negation) For every formula A, the meaning of ~A is denoted by the following  truth table (Wahrheitstabelle) that lists the possible truth values for A in the first column and the truth value of its negation in the second column:
 A ~A false true true false

In other words, ~A is true if and only if A is false.

Operational Interpretation  A logical formula can be given an operational interpretation by a program that computes its truth value. For instance, in the Logic Evaluator, a negation is represented by an object of Java type

```public final class Not implements Formula
{
private Formula formula;

public Not(Formula _formula)
{
formula = _formula;
}

public boolean eval() throws EvalException
{
if (formula.eval())
return false;
else
return true;
}
}
```

The Java expression `(new Not(A)).eval()` thus computes the truth value of the negation of A. The result is true only if the truth value of A is false.

We conclude the discussion of negation by stating a simple law and proving its correctness.

Proposition 2 (Inversion of Negation) For every formula A, we have
~~A iff A.

Proof  Let A be an arbitrary formula. We have to show that the meaning of ~~A is the same as the meaning of A, i.e., that they have the same truth values. From Definition Semantics of Negation, we can construct the following truth table.
 A ~A ~~A false true false true false true
Since the last column coincides with the first column, we are done.

Author: Wolfgang Schreiner
Last Modification: October 4, 1999