Definition · applies to propositional formulas

High school

Consider a statement built from letters $p, q, r, \dots$ that each stand for a whole statement, such as $p \land \neg q$ (“$p$ and not $q$”). The truth table of the statement is a table with one row for each way of making each letter true or false, which lists in each row the truth value of the statement.

Undergraduate (propositional logic)

Consider a propositional formula $\varphi$ with the propositional variables $p_1, \dots, p_n$. The truth table of $\varphi$ is the table with one row for each of the $2^n$ truth assignments on $p_1, \dots, p_n$, which lists in each row the values of $p_1, \dots, p_n$ and the truth value of $\varphi$ under that truth assignment.

Examples

Examples

  • The truth table of $p \land \neg q$ is a truth table, because the table has one row for each of the four truth assignments on $p$ and $q$ and lists the truth value of $p \land \neg q$ in each row.

Properties

  • A propositional formula is a tautology if and only if every row of its truth table gives the value true.
  • A propositional formula is satisfiable if and only if some row of its truth table gives the value true.
  • Two propositional formulas with the same variables are logically equivalent if and only if they have the same truth table.
  • The truth table of a logical connective defines the connective. For example, the truth table of $p \land q$ has the value true only in the row where $p$ and $q$ are both true: \[\begin{array}{cc|c} p & q & p \land q \\ \hline \text{true} & \text{true} & \text{true} \\ \text{true} & \text{false} & \text{false} \\ \text{false} & \text{true} & \text{false} \\ \text{false} & \text{false} & \text{false} \end{array}\]
  • The truth table of a formula with $n$ variables has $2^n$ rows, so checking a formula by its truth table takes a number of steps that grows exponentially with $n$.

Notes

Truth tables often write $\mathrm{T}$ and $\mathrm{F}$, or $1$ and $0$, for true and false.

All definitions · All distinctions · All examples · Notation