Truth function


 * 'Truth functional' redirects here, for the truth functional conditional, see Material conditional.

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 generally they may have any number of truth-values, including an infinity of them. A sentential connective (see below) is called "truth functional" if it is assigned or denotes such a function.

A sentence is truth-functional if the truth-value of the sentence is a function of the truth-value of its subsentences. A class of sentences is truth-functional if each of its members is. For example, the sentence "Apples are fruits and carrots are vegetables" is truth-functional since it is true just in case each of its subsentences "apples are fruits" and "carrots are vegetables" is true, and it is false otherwise. Not all sentences of a natural language, such as English, are truth-functional.

Sentences of the form "x believes that..." are typical examples of sentences that are not truth-functional. Let us say that 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.

In classical logic, the class of its formulas (including sentences) is truth-functional since every sentential connective (e.g. &, →, etc.) used in the construction of formulas is truth-functional. Their values for various truth-values as argument are usually given by truth tables.