Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Truth function

From Wikipedia, the free encyclopedia
Function in logic
Logical connectives
NOT¬A,A,A¯,A{\displaystyle \neg A,-A,{\overline {A}},\sim A}
ANDAB,AB,AB,A & B,A && B{\displaystyle A\land B,A\cdot B,AB,A\ \&\ B,A\ \&\&\ B}
NANDA¯B,AB,AB,AB¯{\displaystyle A{\overline {\land }}B,A\uparrow B,A\mid B,{\overline {A\cdot B}}}
ORAB,A+B,AB,AB{\displaystyle A\lor B,A+B,A\mid B,A\parallel B}
NORA¯B,AB,A+B¯{\displaystyle A{\overline {\lor }}B,A\downarrow B,{\overline {A+B}}}
XNORAB,A¯B¯{\displaystyle A\odot B,{\overline {A{\overline {\lor }}B}}}
equivalentAB,AB,AB{\displaystyle A\equiv B,A\Leftrightarrow B,A\leftrightharpoons B}
XORA_B,AB{\displaystyle A{\underline {\lor }}B,A\oplus B}
└nonequivalentAB,AB,AB{\displaystyle A\not \equiv B,A\not \Leftrightarrow B,A\nleftrightarrow B}
impliesAB,AB,AB{\displaystyle A\Rightarrow B,A\supset B,A\rightarrow B}
nonimplication (NIMPLY)AB,AB,AB{\displaystyle A\not \Rightarrow B,A\not \supset B,A\nrightarrow B}
converseAB,AB,AB{\displaystyle A\Leftarrow B,A\subset B,A\leftarrow B}
converse nonimplicationAB,AB,AB{\displaystyle A\not \Leftarrow B,A\not \subset B,A\nleftarrow B}
Related concepts
Applications
Category

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.

Overview

[edit]

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

"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 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.

Table of binary truth functions

[edit]

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.

Contradiction/False
NotationEquivalent
formulas
Truth tableVenn diagram
{\displaystyle \bot }
"bottom"
P ∧ ¬P
Opq
 Q
01
P0   0  0 
1   0  0 


Tautology/True
NotationEquivalent
formulas
Truth tableVenn diagram
{\displaystyle \top }
"top"
P ∨ ¬P
Vpq
 Q
01
P0   1  1 
1   1  1 


PropositionP
NotationEquivalent
formulas
Truth tableVenn diagram
Pp
Ipq
 Q
01
P0   0  0 
1   1  1 


Negation ofP
NotationEquivalent
formulas
Truth tableVenn diagram
¬P
~P
Np
Fpq
 Q
01
P0   1  1 
1   0  0 


PropositionQ
NotationEquivalent
formulas
Truth tableVenn diagram
Qq
Hpq
 Q
01
P0   0  1 
1   0  1 


Negation ofQ
NotationEquivalent
formulas
Truth tableVenn diagram
¬Q
~Q
Nq
Gpq
 Q
01
P0   1  0 
1   1  0 


Conjunction
NotationEquivalent
formulas
Truth tableVenn diagram
PQ
P &Q
P · Q
P AND Q
P ↛¬Q
¬PQ
¬P ↓ ¬Q
Kpq
 Q
01
P0   0  0 
1   0  1 


Non-conjunction/Alternative denial
NotationEquivalent
formulas
Truth tableVenn diagram
PQ
P |Q
P NAND Q
P → ¬Q
¬PQ
¬P ∨ ¬Q
Dpq
 Q
01
P0   1  1 
1   1  0 


Disjunction
NotationEquivalent
formulas
Truth tableVenn diagram
PQ
P OR Q
P ← ¬Q
¬PQ
¬P ↑ ¬Q
¬(¬P ∧ ¬Q)
Apq
 Q
01
P0   0  1 
1   1  1 


Non-disjunction/Joint denial
NotationEquivalent
formulas
Truth tableVenn diagram
PQ
P NOR Q
P ↚ ¬Q
¬PQ
¬P ∧ ¬Q
Xpq
 Q
01
P0   1  0 
1   0  0 


Material nonimplication
NotationEquivalent
formulas
Truth tableVenn diagram
PQ
P{\displaystyle \not \supset }Q
P>{\displaystyle >}Q
P NIMPLY Q
P ∧ ¬Q
¬PQ
¬P ↚ ¬Q
Lpq
 Q
01
P0   0  0 
1   1  0 


Material implication
NotationEquivalent
formulas
Truth tableVenn diagram
PQ
PQ
P{\displaystyle \leq }Q
P IMPLY Q
P ↑ ¬Q
¬PQ
¬P ← ¬Q
Cpq
 Q
01
P0   1  1 
1   0  1 


Converse nonimplication
NotationEquivalent
formulas
Truth tableVenn diagram
PQ
P{\displaystyle \not \subset }Q
P<{\displaystyle <}Q
P ↓ ¬Q
¬PQ
¬P ↛ ¬Q
Mpq
 Q
01
P0   0  1 
1   0  0 


Converse implication
NotationEquivalent
formulas
Truth tableVenn diagram
PQ
PQ
P{\displaystyle \geq }Q
P ∨ ¬Q
¬PQ
¬P → ¬Q
Bpq
 Q
01
P0   1  0 
1   1  1 


Non-equivalence/Exclusive disjunction
NotationEquivalent
formulas
Truth tableVenn diagram
PQ
PQ
PQ
P XOR Q
P{\displaystyle \leftrightarrow } ¬Q
¬P{\displaystyle \leftrightarrow }Q
¬P ↮ ¬Q
Jpq
 Q
01
P0   0  1 
1   1  0 


Equivalence/Biconditional
NotationEquivalent
formulas
Truth tableVenn diagram
P{\displaystyle \leftrightarrow }Q
PQ
P XNOR Q
P IFF Q
P ↮ ¬Q
¬PQ
¬P{\displaystyle \leftrightarrow } ¬Q
Epq
 Q
01
P0   1  0 
1   0  1 


Functional completeness

[edit]
Main article:Functional completeness

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]

One element
{↑}, {↓}.
Two elements
{,¬}{\displaystyle \{\vee ,\neg \}},{,¬}{\displaystyle \{\wedge ,\neg \}},{,¬}{\displaystyle \{\to ,\neg \}},{,¬}{\displaystyle \{\gets ,\neg \}},{,}{\displaystyle \{\to ,\bot \}},{,}{\displaystyle \{\gets ,\bot \}},{,}{\displaystyle \{\to ,\nleftrightarrow \}},{,}{\displaystyle \{\gets ,\nleftrightarrow \}},{,}{\displaystyle \{\to ,\nrightarrow \}},{,}{\displaystyle \{\to ,\nleftarrow \}},{,}{\displaystyle \{\gets ,\nrightarrow \}},{,}{\displaystyle \{\gets ,\nleftarrow \}},{,¬}{\displaystyle \{\nrightarrow ,\neg \}},{,¬}{\displaystyle \{\nleftarrow ,\neg \}},{,}{\displaystyle \{\nrightarrow ,\top \}},{,}{\displaystyle \{\nleftarrow ,\top \}},{,}{\displaystyle \{\nrightarrow ,\leftrightarrow \}},{,}{\displaystyle \{\nleftarrow ,\leftrightarrow \}}.
Three elements
{,,}{\displaystyle \{\lor ,\leftrightarrow ,\bot \}},{,,}{\displaystyle \{\lor ,\leftrightarrow ,\nleftrightarrow \}},{,,}{\displaystyle \{\lor ,\nleftrightarrow ,\top \}},{,,}{\displaystyle \{\land ,\leftrightarrow ,\bot \}},{,,}{\displaystyle \{\land ,\leftrightarrow ,\nleftrightarrow \}},{,,}{\displaystyle \{\land ,\nleftrightarrow ,\top \}}.

Algebraic properties

[edit]

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:

  • associativity: Within an expression containing two or more of the same associative connectives in a row, the order of the operations does not matter as long as the sequence of the operands is not changed.
  • commutativity: The operands of the connective may be swapped without affecting the truth-value of the expression.
  • distributivity: A connective denoted by · distributes over another connective denoted by +, ifa · (b +c) = (a ·b) + (a ·c) for all operandsa,b,c.
  • idempotence: Whenever the operands of the operation are the same, the connective gives the operand as the result. In other words, the operation is both truth-preserving and falsehood-preserving (see below).
  • absorption: A pair of connectives,{\displaystyle \land ,\lor } satisfies the absorption law ifa(ab)=a(ab)=a{\displaystyle a\land (a\lor b)=a\lor (a\land b)=a} for all operandsa,b.

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:

Arity

[edit]
See also:arity

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, and22n{\displaystyle 2^{2^{n}}}n-ary operators. In three-valued logic there are 3 nullary operators (constants), 27unary operators, 19683binary operators, 7625597484987ternary operators, and33n{\displaystyle 3^{3^{n}}}n-ary operators. Ink-valued logic, there arek nullary operators,kk{\displaystyle k^{k}} unary operators,kk2{\displaystyle k^{k^{2}}} binary operators,kk3{\displaystyle k^{k^{3}}} ternary operators, andkkn{\displaystyle k^{k^{n}}}n-ary operators. Ann-ary operator ink-valued logic is a function fromZknZk{\displaystyle \mathbb {Z} _{k}^{n}\to \mathbb {Z} _{k}}. Therefore, the number of such operators is|Zk||Zkn|=kkn{\displaystyle |\mathbb {Z} _{k}|^{|\mathbb {Z} _{k}^{n}|}=k^{k^{n}}}, 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,(32)16(31)4+(30)2{\displaystyle {\binom {3}{2}}\cdot 16-{\binom {3}{1}}\cdot 4+{\binom {3}{0}}\cdot 2} of them are such degenerate forms of binary or lower-arity operators, using theinclusion–exclusion principle. The ternary operatorf(x,y,z)=¬x{\displaystyle f(x,y,z)=\lnot x} 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 (PQ, PQ, PQ, PQ).

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

Ω=Ω0Ω1ΩjΩm.{\displaystyle \Omega =\Omega _{0}\cup \Omega _{1}\cup \ldots \cup \Omega _{j}\cup \ldots \cup \Omega _{m}\,.}

In this partition,Ωj{\displaystyle \Omega _{j}} is the set of operator symbols ofarityj.

In the more familiar propositional calculi,Ω{\displaystyle \Omega } is typically partitioned as follows:

nullary operators:Ω0={,}{\displaystyle \Omega _{0}=\{\bot ,\top \}}
unary operators:Ω1={¬}{\displaystyle \Omega _{1}=\{\lnot \}}
binary operators:Ω2{,,,}{\displaystyle \Omega _{2}\supset \{\land ,\lor ,\rightarrow ,\leftrightarrow \}}

Principle of compositionality

[edit]

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:

  • fnand(T,T) = F;fnand(T,F) =fnand(F,T) =fnand(F,F) = T

Then, for convenience,fnot,forfand and so on are defined by means offnand:

  • fnot(x) =fnand(x,x)
  • for(x,y) =fnand(fnot(x),fnot(y))
  • fand(x,y) =fnot(fnand(x,y))

or, alternativelyfnot,forfand and so on are defined directly:

  • fnot(T) = F;fnot(F) = T;
  • for(T,T) =for(T,F) =for(F,T) = T;for(F,F) = F
  • fand(T,T) = T;fand(T,F) =fand(F,T) =fand(F,F) = F

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 ofI(s){\displaystyle I(s)} 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.

Formal definition

[edit]

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,

PROP={p1,p2,}{\displaystyle PROP=\{p_{1},p_{2},\dots \}}

We define atruth assignment to be any functionϕ:PROP{T,F}{\displaystyle \phi :PROP\to \{T,F\}}. 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,ϕ{\displaystyle \phi }, we define itsextended truth assignment,ϕ¯{\displaystyle {\overline {\phi }}}, as follows. This extendsϕ{\displaystyle \phi } to a new functionϕ¯{\displaystyle {\overline {\phi }}} which has domain equal to the set of all propositional formulas. The range ofϕ¯{\displaystyle {\overline {\phi }}} is still{T,F}{\displaystyle \{T,F\}}.

  1. IfAPROP{\displaystyle A\in PROP} thenϕ¯(A)=ϕ(A){\displaystyle {\overline {\phi }}(A)=\phi (A)}.
  2. IfA andB are any propositional formulas, then
    1. ϕ¯(¬A)=fnot(ϕ¯(A)){\displaystyle {\overline {\phi }}(\neg A)=f_{\text{not}}({\overline {\phi }}(A))}.
    2. ϕ¯(AB)=fand(ϕ¯(A),ϕ¯(B)){\displaystyle {\overline {\phi }}(A\land B)=f_{\text{and}}({\overline {\phi }}(A),{\overline {\phi }}(B))}.
    3. ϕ¯(AB)=for(ϕ¯(A),ϕ¯(B)){\displaystyle {\overline {\phi }}(A\lor B)=f_{\text{or}}({\overline {\phi }}(A),{\overline {\phi }}(B))}.
    4. ϕ¯(AB)=ϕ¯(¬AB){\displaystyle {\overline {\phi }}(A\to B)={\overline {\phi }}(\neg A\lor B)}.
    5. ϕ¯(AB)=ϕ¯((AB)(BA)){\displaystyle {\overline {\phi }}(A\leftrightarrow B)={\overline {\phi }}((A\to B)\land (B\to A))}.

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,fA{\displaystyle f_{A}}, has domain equal to the set of all truth assignments, and range equal to{T,F}{\displaystyle \{T,F\}}.

It is defined, for each truth assignmentϕ{\displaystyle \phi }, byfA(ϕ)=ϕ¯(A){\displaystyle f_{A}(\phi )={\overline {\phi }}(A)}. The value given byϕ¯(A){\displaystyle {\overline {\phi }}(A)} is the same as the one displayed in the final column of the truth table ofA, on the row identified withϕ{\displaystyle \phi }.

Computer science

[edit]

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.

See also

[edit]

Notes

[edit]
  1. ^Roy T. Cook (2009).A Dictionary of Philosophical Logic, p. 294: Truth Function. Edinburgh University Press.
  2. ^Roy T. Cook (2009).A Dictionary of Philosophical Logic, p. 295: Truth Functional. Edinburgh University Press.
  3. ^Internet Encyclopedia of Philosophy: Propositional Logic, by Kevin C. Klement
  4. ^Roy T. Cook (2009).A Dictionary of Philosophical Logic, p. 47: Classical Logic. Edinburgh University Press.
  5. ^Wernick, William (1942) "Complete Sets of Logical Functions,"Transactions of the American Mathematical Society 51: 117–32. In his list on the last page of the article, Wernick does not distinguish between ← and →, or between{\displaystyle \nleftarrow } and{\displaystyle \nrightarrow }.
  6. ^"An Introduction to Mathematical Logic".Dover Publications. Retrieved2025-02-20.

References

[edit]

Further reading

[edit]
  • Józef Maria Bocheński (1959),A Précis of Mathematical Logic, translated from the French and German versions by Otto Bird, Dordrecht, South Holland: D. Reidel.
  • Alonzo Church (1944),Introduction to Mathematical Logic, Princeton, NJ: Princeton University Press. See the Introduction for a history of the truth function concept.
General
Law of noncontradiction
Classical logics
Principles
Rules
Introduction
Elimination
People
Works
Functional:
Formal:
Negation 
Retrieved from "https://en.wikipedia.org/w/index.php?title=Truth_function&oldid=1276646199"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp