Truth table

{{logicnav}}
A '''truth table''' is a table that lists all possible states of a statement.<ref>[https://towardsdatascience.com/logic-theory-truth-tables-de313f78a16a Logic Theory — Truth Tables]</ref> Truth tables are commonly used to compare statements; if two statements share the same truth table, then the two statements are said to be logically equivalent. Truth tables are also able to be used to find negations of statements.

==Equivalent statements==
If two statements, <math>P</math> and <math>Q</math>, have truth tables that contain the same elements, then the two statements are logically equivalent.<ref name=miller>[http://sites.millersville.edu/bikenaga/math-proof/truth-tables/truth-tables.html Truth Tables, Tautologies, and Logical Equivalences]</ref><ref name=kent>[http://www.personal.kent.edu/~rmuhamma/Philosophy/Logic/SymbolicLogic/3-equivalenence.htm Logical Equivalence]</ref> That is, the two statements will be true or false under the same conditions. <math>P</math> and <math>Q</math> being logically equivalent is denoted as: <math>P\equiv Q</math>. Finding equivalent statements is a tool used in [[mathematics]] as it may be difficult to directly prove one statement, but easy to prove an equivalent statement.

===Example of equivalent statements===
One can show that, for two statements <math>P</math> and <math>Q</math>, <math>P\implies Q</math> is logically equivalent to <math>\neg P\or Q</math> by showing that they have the same truth table. Consider the truth table for <math>P\implies Q</math>:
{| class="wikitable" style="text-align:center"
|+<math>P\implies Q</math>
|-
! <math>P</math> !! <math>Q</math> !! <math>P\implies Q</math>
|-
| T || T || T
|-
| F || F || T
|-
| T || F || F
|-
| F || T || T
|} 

In the above table, T is true and F is false. Now consider the truth table for <math>\neg P\or Q</math>:

{| class="wikitable" style="text-align:center"
|+<math>\neg P\or Q</math>
|-
! <math>P</math> !! <math>Q</math> !! <math>\neg P\or Q</math>
|-
| T || T || T
|-
| F || F || T
|-
| T || F || F
|-
| F || T || T
|} 

Observing the two tables, they have the same elements. Thus, <math>P\implies Q</math> is logically equivalent to <math>\neg P\or Q</math>.

==Negation of statements==
Given a statement <math>P</math>, another statement <math>Q</math> is the negation of <math>P</math> if the state of <math>Q</math> is opposite of <math>P</math> given the same conditions. That is, <math>Q</math> is false when <math>P</math> is true, and <math>Q</math> is true when <math>P</math> is false. If this holds, then <math>Q</math> is the negation of <math>P</math>, written as <math>\neg P</math> (sometimes as ~<math>P</math>).<ref>[https://medium.com/i-math/intro-to-truth-tables-boolean-algebra-73b331dd9b94 Intro to Truth Tables & Boolean Algebra]</ref>
{| class="wikitable" style="text-align:center"
! <math>P</math> !! <math>\neg P</math>
|-
| T || F
|-
| F || T
|} 

The negation of <math>P</math>, <math>\neg P</math>, is visualized in the above truth table.

===Example of negated statements===
One can show that <math>P\and\neg Q</math> is the negation of <math>P\implies Q</math> via a truth table.

{| class="wikitable" style="text-align:center"
! <math>P</math> !! <math>Q</math> !! <math>P\implies Q</math> !! <math>P\and\neg Q</math>
|-
| T || T || T || F
|-
| F || F || T || F
|-
| T || F || F || T
|-
| F || T || T || F
|}

==See also==
*[[Tautology]]
*[[Truth]]

==External links==
*[http://sites.millersville.edu/bikenaga/math-proof/truth-tables/truth-tables.html Truth Tables, Tautologies, and Logical Equivalences]

==References==
{{reflist}}

[[category:logic]]

Categories: logic