Skip to content

1.2 Semantics: Truth Tables

Truth values, valuations, and evaluation of propositional formulas using truth tables.

Semantics assigns meaning to the formulas of propositional logic by assigning truth values to propositional variables and then extending this assignment to all formulas according to the logical connectives.

Truth Values

We use two truth values:

T \mathrm{T}

and:

F \mathrm{F}

The value T\mathrm{T} means true, and the value F\mathrm{F} means false, and every formula in classical propositional logic will receive exactly one of these two values once a valuation has been fixed.

Definition 1.10 (Valuation)

A valuation is a function:

v:Var{T,F} v : \mathrm{Var} \to \{\mathrm{T}, \mathrm{F}\}

from the set of propositional variables to the set of truth values.

Thus a valuation assigns to each propositional variable either T\mathrm{T} or F\mathrm{F}, and it should be understood as one possible assignment of truth values to the atomic statements of the language.

For example, if the variables are pp, qq, and rr, then one possible valuation is given by:

v(p)=T,v(q)=F,v(r)=T v(p)=\mathrm{T}, \quad v(q)=\mathrm{F}, \quad v(r)=\mathrm{T}

Definition 1.11 (Evaluation of Formulas)

Every valuation vv extends uniquely to a function on all formulas, also denoted by vv, by recursion on the structure of formulas.

If AA is a propositional variable, then v(A)v(A) is the value already assigned to AA by the valuation.

If A=¬BA = ¬B, then:

v(A)=T v(A)=\mathrm{T}

if and only if:

v(B)=F v(B)=\mathrm{F}

If A=(BC)A = (B \land C), then:

v(A)=T v(A)=\mathrm{T}

if and only if:

v(B)=Tandv(C)=T v(B)=\mathrm{T} \quad \text{and} \quad v(C)=\mathrm{T}

If A=(BC)A = (B \lor C), then:

v(A)=T v(A)=\mathrm{T}

if and only if:

v(B)=Torv(C)=T v(B)=\mathrm{T} \quad \text{or} \quad v(C)=\mathrm{T}

If A=(BC)A = (B \to C), then:

v(A)=F v(A)=\mathrm{F}

if and only if:

v(B)=Tandv(C)=F v(B)=\mathrm{T} \quad \text{and} \quad v(C)=\mathrm{F}

If A=(BC)A = (B \leftrightarrow C), then:

v(A)=T v(A)=\mathrm{T}

if and only if:

v(B)=v(C) v(B)=v(C)

This recursive definition is possible because formulas were defined inductively, and it gives a precise way to compute the truth value of any formula from the truth values of its variables.

Example 1.12

Let vv be the valuation defined by:

v(p)=Tandv(q)=F v(p)=\mathrm{T} \quad \text{and} \quad v(q)=\mathrm{F}

Then:

v(¬p)=F v(¬p)=\mathrm{F}

because pp is true under vv, and negation reverses the truth value.

Also:

v(pq)=F v(p \land q)=\mathrm{F}

because a conjunction is true only when both conjuncts are true.

We have:

v(pq)=T v(p \lor q)=\mathrm{T}

because a disjunction is true when at least one disjunct is true.

Finally:

v(pq)=F v(p \to q)=\mathrm{F}

because implication is false exactly when its antecedent is true and its consequent is false.

Truth Tables

A truth table records the value of a formula under all possible valuations of the variables that occur in it.

If a formula contains nn distinct variables, then there are:

2n 2^n

possible assignments of truth values to those variables, and therefore the truth table has 2n2^n rows.

Truth tables are useful because they give a complete semantic description of a formula in a finite and explicit form, at least when the number of variables is small enough to make the table manageable.

Example 1.13

Consider the formula:

(pq)p (p \land q) \to p

The truth table is:

ppqqpqp \land q(pq)p(p \land q) \to p
T\mathrm{T}T\mathrm{T}T\mathrm{T}T\mathrm{T}
T\mathrm{T}F\mathrm{F}F\mathrm{F}T\mathrm{T}
F\mathrm{F}T\mathrm{T}F\mathrm{F}T\mathrm{T}
F\mathrm{F}F\mathrm{F}F\mathrm{F}T\mathrm{T}

The last column is T\mathrm{T} in every row, so the formula is true under every valuation.

Definition 1.14 (Satisfiability, Validity, Contradiction)

A formula AA is satisfiable if there exists a valuation vv such that:

v(A)=T v(A)=\mathrm{T}

A formula AA is valid if for every valuation vv:

v(A)=T v(A)=\mathrm{T}

A formula AA is a contradiction if for every valuation vv:

v(A)=F v(A)=\mathrm{F}

These three notions classify formulas according to their behavior across all possible valuations.

Example 1.15

The formula:

p¬p p \lor ¬p

is valid, because for every valuation either pp is true or pp is false, and in both cases the disjunction is true.

The formula:

p¬p p \land ¬p

is a contradiction, because no valuation can make both pp and ¬p¬p true at the same time.

The formula:

pq p \land q

is satisfiable but not valid, because it is true when both pp and qq are true, but it is false under many other valuations.

Lemma 1.16 (Unique Evaluation)

For every valuation vv and every formula AA, the truth value v(A)v(A) is uniquely determined.

Proof

The proof is by structural induction on the formula AA.

If AA is a propositional variable, then v(A)v(A) is uniquely determined by the definition of the valuation.

If A=¬BA = ¬B, then by the induction hypothesis the value v(B)v(B) is uniquely determined, and therefore the value of v(¬B)v(¬B) is uniquely determined by the truth rule for negation.

If A=(BC)A = (B \circ C) for a binary connective \circ, then by the induction hypothesis the values v(B)v(B) and v(C)v(C) are uniquely determined, and therefore the value of v(BC)v(B \circ C) is uniquely determined by the truth rule for the connective \circ.

Boolean Function View

If a formula AA contains variables among:

p1,p2,,pn p_1, p_2, \dots, p_n

then AA determines a Boolean function:

fA:{T,F}n{T,F} f_A : \{\mathrm{T}, \mathrm{F}\}^n \to \{\mathrm{T}, \mathrm{F}\}

This function sends each tuple of truth values assigned to the variables to the truth value of the formula under the corresponding valuation.

This viewpoint is useful because it connects propositional logic with Boolean algebra, digital circuits, and computation, where formulas can be studied as functions from binary inputs to binary outputs.