Logical connectives | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||
Related concepts | ||||||||||||||||||||||||||
Applications | ||||||||||||||||||||||||||
![]() | ||||||||||||||||||||||||||
Inlogic, atruth function[1] is afunction that acceptstruth values as input and produces a unique truth value as output. In other words: the input and output of a truth function are all truth values; a truth function will always output exactly one truth value, and inputting the same truth value(s) will always output the same truth value. The typical example is inpropositional logic, wherein a compound statement is constructed using individual statements connected bylogical connectives; if the truth value of the compound statement is entirely determined by the truth value(s) of the constituent statement(s), the compound statement is called a truth function, and any logical connectives used are said to betruth functional.[2]
Classical propositional logic is a truth-functional logic,[3] in that every statement has exactly one truth value which is either true or false, and every logical connective is truth functional (with a correspondenttruth table), thus every compound statement is a truth function.[4] On the other hand,modal logic is non-truth-functional.
Alogical 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 trueif, 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 "xbelieves 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
is true while
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 simplyoperator since it is unary) is non-truth-functional.
The class ofclassical logic connectives (e.g.&,→) used in the construction of formulas is truth-functional. Their values for various truth-values as argument are usually given bytruth tables.Truth-functional propositional calculus is aformal system whose formulae may be interpreted as either true or false.
In two-valued logic, there are sixteen possible truth functions, also calledBoolean functions, of two inputsP andQ. Any of these functions corresponds to a truth table of a certainlogical connective in classical logic, including severaldegenerate cases such as a function not depending on one or both of its arguments. Truth and falsehood are denoted as 1 and 0, respectively, in the following truth tables for sake of brevity.
|
| ||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||
|
|
Because a function may be expressed as acomposition, a truth-functional logical calculus does not need to have dedicated symbols for all of the above-mentioned functions to befunctionally complete. This is expressed in apropositional calculus aslogical equivalence of certain compound statements. For example, classical logic has¬P ∨ Q equivalent toP → Q. The conditional operator "→" is therefore not necessary for a classical-basedlogical system if "¬" (not) and "∨" (or) are already in use.
Aminimal set of operators that can express every statement expressible in thepropositional calculus is called aminimal 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:[5]
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 isfunctionally complete if and only if for each of the following five properties it contains at least one member lacking it:
A concrete function may be also referred to as anoperator. In two-valued logic there are 2 nullary operators (constants), 4unary operators, 16binary operators, 256ternary operators, andn-ary operators. In three-valued logic there are 3 nullary operators (constants), 27unary operators, 19683binary operators, 7625597484987ternary operators, andn-ary operators. Ink-valued logic, there arek nullary operators, unary operators, binary operators, ternary operators, andn-ary operators. Ann-ary operator ink-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 ignore 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 theinclusion–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 aunary operator, it takes a single term (¬P). The rest arebinary operators, taking two terms to make a compound statement (P ∧Q, P ∨Q, P →Q, P ↔Q).
The set of logical operatorsΩ may bepartitioned into disjoint subsets as follows:
In this partition, is the set of operator symbols ofarityj.
In the more familiar propositional calculi, is typically partitioned as follows:
Instead of usingtruth 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 theprinciple of compositionality of meaning.LetI be an interpretation function, letΦ, Ψ be any two sentences and let the truth functionfnand be defined as:
Then, for convenience,fnot,forfand and so on are defined by means offnand:
or, alternativelyfnot,forfand and so on are defined directly:
Then
etc.
Thus ifS is a sentence that is a string of symbols consisting of logical symbolsv1...vn representing logical connectives, and non-logical symbolsc1...cn, then if and only ifI(v1)...I(vn) have been provided interpretingv1 tovn by means offnand (or any other set of functional complete truth-functions) then the truth-value of is determined entirely by the truth-values ofc1...cn, i.e. ofI(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.
Using the functions defined above, we can give a formal definition of a proposition's truth function.[6]
LetPROP be the set of all propositional variables,
We define atruth assignment to be any function. A truth assignment is therefore an association of each propositional variable with a particular truth value. This is effectively the same as a particular row of a proposition's truth table.
For a truth assignment,, we define itsextended truth assignment,, as follows. This extends to a new function which has domain equal to the set of all propositional formulas. The range of is still.
Finally, now that we have defined the extended truth assignment, we can use this to define the truth-function of a proposition. For a proposition,A, itstruth function,, has domain equal to the set of all truth assignments, and range equal to.
It is defined, for each truth assignment, by. The value given by is the same as the one displayed in the final column of the truth table ofA, on the row identified with.
Logical operators are implemented aslogic gates indigital circuits. Practically all digital circuits (the major exception isDRAM) are built up fromNAND,NOR,NOT, andtransmission 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 toTuring equivalence.
The fact that all truth functions can be expressed with NOR alone is demonstrated by theApollo guidance computer.