Truth function

In mathematical logic, a truth function is a function from a set of truth values to truth values. Classically the domain and range of a truth function are {truth, falsehood}, but they may have any number of truth values, including an infinity of these.

Overview

A logical connective is truth-functional if the truth-value of a compound sentence is a function of the truth-value of its sub-sentences. A class of connectives is truth-functional if each of its members is. For example, the connective "and" is truth-functional since a sentence like "Apples are fruits and carrots are vegetables" is true if, and only if each of its sub-sentences "apples are fruits" and "carrots are vegetables" is true, and it is false otherwise. Some connectives of a natural language, such as English, are not truth-functional.

Connectives of the form "x believes that ..." are typical examples of connectives that are not truth-functional. If e.g. Mary mistakenly believes that Al Gore was President of the USA on April 20, 2000, but she does not believe that the moon is made of green cheese, then the sentence

"Mary believes that Al Gore was President of the USA on April 20, 2000"

is true while

"Mary believes that the moon is made of green cheese"

is false. In both cases, each component sentence (i.e. "Al Gore was president of the USA on April 20, 2000" and "the moon is made of green cheese") is false, but each compound sentence formed by prefixing the phrase "Mary believes that" differs in truth-value. That is, the truth-value of a sentence of the form "Mary believes that..." is not determined solely by the truth-value of its component sentence, and hence the (unary) connective (or simply operator since it is unary) is non-truth-functional.

The class of classical logic connectives (e.g. &, ) used in the construction of formulas is truth-functional. Their values for various truth-values as argument are usually given by truth tables. Truth-functional propositional calculus is a formal system whose formulas may be interpreted as either true or false.


Table of binary truth functions

In two-valued logic, there are sixteen possible truth functions, also called Boolean functions, of two inputs P and Q. Any of these functions corresponds to a truth table of a certain logical connective in classical logic, including several degenerate cases such as a function not depending on one or both of its arguments. Truth and falsehood is denoted as 1 and 0 in the following truth tables, respectively, for sake of brevity.

Contradiction/False
Notation Equivalent
formulas
Truth table Venn diagram

"bottom"
P ¬P
Opq
  Q
0 1
P 0    0   0 
1    0   0 
Tautology/True
Notation Equivalent
formulas
Truth table Venn diagram

"top"
P ¬P
Vpq
  Q
0 1
P 0    1   1 
1    1   1 
Proposition P
Notation Equivalent
formulas
Truth table Venn diagram
P p
Ipq
  Q
0 1
P 0    0   0 
1    1   1 
Negation of P
Notation Equivalent
formulas
Truth table Venn diagram
¬P
~P
Np
Fpq
  Q
0 1
P 0    1   1 
1    0   0 
Proposition Q
Notation Equivalent
formulas
Truth table Venn diagram
Q q
Hpq
  Q
0 1
P 0    0   1 
1    0   1 
Negation of Q
Notation Equivalent
formulas
Truth table Venn diagram
¬Q
~Q
Nq
Gpq
  Q
0 1
P 0    1   0 
1    1   0 
Conjunction
Notation Equivalent
formulas
Truth table Venn diagram
P Q
P & Q
P · Q
P AND Q
P ¬Q
¬P Q
¬P ¬Q
Kpq
  Q
0 1
P 0    0   0 
1    0   1 
Alternative denial
Notation Equivalent
formulas
Truth table Venn diagram
PQ
P | Q
P NAND Q
P → ¬Q
¬PQ
¬P ¬Q
Dpq
  Q
0 1
P 0    1   1 
1    1   0 
Disjunction
Notation Equivalent
formulas
Truth table Venn diagram
P Q
P OR Q
P ¬Q
¬PQ
¬P ↑ ¬Q
¬(¬P ¬Q)
Apq
  Q
0 1
P 0    0   1 
1    1   1 
Joint denial
Notation Equivalent
formulas
Truth table Venn diagram
PQ
P NOR Q
P ¬Q
¬P Q
¬P ¬Q
Xpq
  Q
0 1
P 0    1   0 
1    0   0 
Material nonimplication
Notation Equivalent
formulas
Truth table Venn diagram
P Q
P Q
P ¬Q
¬PQ
¬P ¬Q
Lpq
  Q
0 1
P 0    0   0 
1    1   0 
Material implication
Notation Equivalent
formulas
Truth table Venn diagram
PQ
P Q
P ↑ ¬Q
¬P Q
¬P ← ¬Q
Cpq
  Q
0 1
P 0    1   1 
1    0   1 
Converse nonimplication
Notation Equivalent
formulas
Truth table Venn diagram
P Q
P Q
P ↓ ¬Q
¬P Q
¬P ¬Q
Mpq
  Q
0 1
P 0    0   1 
1    0   0 
Converse implication
Notation Equivalent
formulas
Truth table Venn diagram
P Q
P Q
P ¬Q
¬PQ
¬P → ¬Q
Bpq
  Q
0 1
P 0    1   0 
1    1   1 
Exclusive disjunction
Notation Equivalent
formulas
Truth table Venn diagram
P Q
P Q
P Q
P XOR Q
P ¬Q
¬P Q
¬P ¬Q
Jpq
  Q
0 1
P 0    0   1 
1    1   0 
Biconditional
Notation Equivalent
formulas
Truth table Venn diagram
P Q
PQ
P XNOR Q
P IFF Q
P ¬Q
¬P Q
¬P ¬Q
Epq
  Q
0 1
P 0    1   0 
1    0   1 

Functional completeness

Because a function may be expressed as a composition, a truth-functional logical calculus does not need to have dedicated symbols for all of the above-mentioned functions to be functionally complete. This is expressed in a propositional calculus as logical equivalence of certain compound statements. For example, classical logic has ¬P ∨ Q equivalent to P → Q. The conditional operator "→" is therefore not necessary for a classical-based logical system if "¬" (not) and "∨" (or) are already in use.

A minimal set of operators that can express every statement expressible in the propositional calculus is called a minimal functionally complete set. A minimally complete set of operators is achieved by NAND alone {↑} and NOR alone {↓}.

The following are the minimal functionally complete sets of operators whose arities do not exceed 2:[1]

One element
{↑}, {↓}.
Two elements
, , , , , , , , , , , , , , , , , .
Three elements
, , , , , .

Algebraic properties

Some truth functions possess properties which may be expressed in the theorems containing the corresponding connective. Some of those properties that a binary truth function (or a corresponding logical connective) may have are:

A set of truth functions is functionally complete if and only if for each of the following five properties it contains at least one member lacking it:

Arity

See also: arity

A concrete function may be also referred to as an operator. In two-valued logic there are 2 nullary operators (constants), 4 unary operators, 16 binary operators, 256 ternary operators, and n-ary operators. In three-valued logic there are 3 nullary operators (constants), 27 unary operators, 19683 binary operators, 7625597484987 ternary operators, and n-ary operators. In k-valued logic, there are k nullary operators, unary operators, binary operators, ternary operators, and n-ary operators. An n-ary operator in k-valued logic is a function from . Therefore, the number of such operators is , which is how the above numbers were derived.

However, some of the operators of a particular arity are actually degenerate forms that perform a lower-arity operation on some of the inputs and ignores the rest of the inputs. Out of the 256 ternary boolean operators cited above, of them are such degenerate forms of binary or lower-arity operators, using the inclusion-exclusion principle. The ternary operator is one such operator which is actually a unary operator applied to one input, and ignoring the other two inputs.

"Not" is a unary operator, it takes a single term (¬P). The rest are binary operators, taking two terms to make a compound statement (P Q, P Q, PQ, PQ).

The set of logical operators Ω may be partitioned into disjoint subsets as follows:

In this partition, is the set of operator symbols of arity j.

In the more familiar propositional calculi, is typically partitioned as follows:

nullary operators:
unary operators:
binary operators:

Principle of compositionality

Instead of using truth tables, logical connective symbols can be interpreted by means of an interpretation function and a functionally complete set of truth-functions (Gamut 1991), as detailed by the principle of compositionality of meaning. Let I be an interpretation function, let Φ, Ψ be any two sentences and let the truth function fnand be defined as:

Then, for convenience, fnot, for fand and so on are defined by means of fnand:

or, alternatively fnot, for fand and so on are defined directly:

Then

  • I(~)=I()=fnot
  • I(&)=I()=fand
  • I(v)=I()= for
  • I(~Φ)=I(Φ)=I()(I(Φ))=fnot(I(Φ))
  • I(ΦΨ) = I()(I(Φ), I(Ψ))= fand(I(Φ), I(Ψ))

etc.

Thus if S is a sentence that is a string of symbols consisting of logical symbols v1...vn representing logical connectives, and non-logical symbols c1...cn, then if and only if I(v1)...I(vn) have been provided interpreting v1 to vn by means of fnand (or any other set of functional complete truth-functions) then the truth-value of is determined entirely by the truth-values of c1...cn, i.e. of I(c1)...I(cn). In other words, as expected and required, S is true or false only under an interpretation of all its non-logical symbols.

Computer science

Logical operators are implemented as logic gates in digital circuits. Practically all digital circuits (the major exception is DRAM) are built up from NAND, NOR, NOT, and transmission gates. NAND and NOR gates with 3 or more inputs rather than the usual 2 inputs are fairly common, although they are logically equivalent to a cascade of 2-input gates. All other operators are implemented by breaking them down into a logically equivalent combination of 2 or more of the above logic gates.

The "logical equivalence" of "NAND alone", "NOR alone", and "NOT and AND" is similar to Turing equivalence.

The fact that all truth functions can be expressed with NOR alone is demonstrated by the Apollo guidance computer.

See also

Notes

  1. Wernick, William (1942) "Complete Sets of Logical Functions," Transactions of the American Mathematical Society 51: 11732. In his list on the last page of the article, Wernick does not distinguish between ← and →, or between and .

References

Further reading

This article is issued from Wikipedia - version of the 11/4/2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.