We have learned how to take sentences in English and translate them into logical statements using letters and the symbols for the logical connectives. We have talked about when a statement made from two simple statments joined by a single logical connective is true and when it is false. Now we need a systematic way to find the truth value of more complicated statements that contain multiple logical symbols. So how do we do this?
First of all, we need some sort of order of operations: if we have a statement with multiple logical symbols in it, how do we know which one should come first? Logicians decided to use much the same order of operations as we learned in set theory.
Just like in set theory, we usually need parintheses to tell us what to do first. So here is the order in which we should do things in logic:
Let's look at an example:
(~p∧q)∨p
If we wanted to see what the truth value is of this statement when p=T and q=F, then we would have to go step-by-step through the statement, doing each logical quantifier one by one.
What would we do first? The parintheses.
What is there to do in the parintheses? ~p∧qSo which should we do first, the negation (~) or the or (∨)?
Because negations always go first, we begin by finding the truth value of ~p.If p=T, then we must have ~p=F.
Now that we've done ~p, we can combine its truth value with q's truth value to find the truth value of ~p∧q.
(Remember than an "and" statment is true only when both statement on either side of it are true.)In this case, we have a ~p on the left, which we know is false, and a q on the right, which we also know is false.
So because we don't have statements on either side of the "and" symbol that are both true, the statment ~p∧q is false.
So ~p∧q=F.
Now that we know the truth value of everything in the parintheses (~p∧q), we can join this statement with ∨p to give us the final statement (~p∧q)∨p.
When is an "or" statment true?
Whenever at least one of the individual statements on either side of it is true.
In this case, the two statements on either side of the or sign are (~p∧q) and p.We know that ~p∧q is false, and we know that p is true.
Because at least one of these two is true, we know that our "or" statement, (~p∧q)∨p must be true.
So (~p∧q)∨p=T.Another way to write this problem step by step would look like this:
(~p∧q)∨p
=(~T∧F)∨T
=(F∧F)∨T
=F∨T
=T
We often want to find a systematic way to find all the possible truth values of a statement. In order to do this, we create a truth table. A truth table is a table that begins with all the possible combinations of truth values for the letters in the compound statement; it then breaks the compound statment down and one step at a time determines truth values for each of the parts of the logical statement.
Let's look at an example so that this definition makes more sense:
One of the simplest truth tables we can construct is the truth table for the expression ~p.p |
|
p |
|
T |
|
F |
p |
~p |
T |
|
F |
p |
~p |
T |
F |
F |
T |
p |
~p |
T |
F |
F |
T |
So our final truth table looks like this:
p |
~p |
T |
F |
F |
T |
Now let's make a truth table for each of the major logical connectives:
p |
q |
p∧q |
T |
T |
|
T |
F |
|
F |
T |
|
F |
F |
Notice that now that we have two letters, p and q, instead of just one letter, we have four possible combinations of truth values for p and q:
We know that p∧q is only true when both p and q are true.
So we can fill in the truth table as follows:
p |
q |
p∧q |
T |
T |
T |
T |
F |
F |
F |
T |
F |
F |
F |
F |
p |
q |
p∧q |
T |
T |
T |
T |
F |
F |
F |
T |
F |
F |
F |
F |
p |
q |
p∧q |
T |
T |
T |
T |
F |
F |
F |
T |
F |
F |
F |
F |
p |
q |
p∧q |
T |
T |
T |
T |
F |
F |
F |
T |
F |
F |
F |
F |
p |
q |
p∧q |
T |
T |
T |
T |
F |
F |
F |
T |
F |
F |
F |
F |
p |
q |
p∧q |
T |
T |
T |
T |
F |
F |
F |
T |
F |
F |
F |
F |
p |
q |
p∨q |
T |
T |
|
T |
F |
|
F |
T |
|
F |
F |
Remember that now that we have two letters, p and q, instead of just one letter, we have four possible combinations of truth values for p and q:
We know that p∨q is only true when at least one of p or q are true.
So we can fill in the truth table as follows:
p |
q |
p∨q |
T |
T |
T |
T |
F |
T |
F |
T |
T |
F |
F |
F |
p |
q |
p∨q |
T |
T |
T |
T |
F |
T |
F |
T |
T |
F |
F |
F |
p |
q |
p∨q |
T |
T |
T |
T |
F |
T |
F |
T |
T |
F |
F |
F |
p |
q |
p∨q |
T |
T |
T |
T |
F |
T |
F |
T |
T |
F |
F |
F |
p |
q |
p∨q |
T |
T |
T |
T |
F |
T |
F |
T |
T |
F |
F |
F |
p |
q |
p∨q |
T |
T |
T |
T |
F |
T |
F |
T |
T |
F |
F |
F |
p |
q |
p→q |
T |
T |
|
T |
F |
|
F |
T |
|
F |
F |
We know that p→q is only false when both p is true and q is false.
So we can fill in the truth table as follows:
p |
q |
p→q |
T |
T |
T |
T |
F |
F |
F |
T |
T |
F |
F |
T |
p |
q |
p→q |
T |
T |
T |
T |
F |
F |
F |
T |
T |
F |
F |
T |
p |
q |
p→q |
T |
T |
T |
T |
F |
F |
F |
T |
T |
F |
F |
T |
p |
q |
p→q |
T |
T |
T |
T |
F |
F |
F |
T |
T |
F |
F |
T |
p |
q |
p→q |
T |
T |
T |
T |
F |
F |
F |
T |
T |
F |
F |
T |
p |
q |
p→q |
T |
T |
T |
T |
F |
F |
F |
T |
T |
F |
F |
T |
p |
q |
p↔q |
T |
T |
|
T |
F |
|
F |
T |
|
F |
F |
We know that p↔q is only true when both p and q are true or when both p and q are false.
So we can fill in the truth table as follows:
p |
q |
p↔q |
T |
T |
T |
T |
F |
F |
F |
T |
F |
F |
F |
T |
p |
q |
p↔q |
T |
T |
T |
T |
F |
F |
F |
T |
F |
F |
F |
T |
p |
q |
p↔q |
T |
T |
T |
T |
F |
F |
F |
T |
F |
F |
F |
T |
p |
q |
p↔q |
T |
T |
T |
T |
F |
F |
F |
T |
F |
F |
F |
T |
p |
q |
p↔q |
T |
T |
T |
T |
F |
F |
F |
T |
F |
F |
F |
T |
p |
q |
p↔q |
T |
T |
T |
T |
F |
F |
F |
T |
F |
F |
F |
T |
Now, our final goal is to be able to fill in truth tables with more compound statements which have more than just one logical connective in them.
Statements like q→~s or (r∧~p)→r or (q&rarr~p)∧(p↔r) have multiple logical connectives, so we will need to do them one step at a time using the order of operations we defined at the beginning of this lecture.
q |
s |
||
T |
T |
||
T |
F |
||
F |
T |
||
F |
F |
q |
s |
~s |
|
T |
T |
F |
|
T |
F |
T |
|
F |
T |
F |
|
F |
F |
T |
q |
s |
~s |
q→~s |
T |
T |
F |
F |
T |
F |
T |
T |
F |
T |
F |
T |
F |
F |
T |
T |
q |
s |
~s |
q→~s |
T |
T |
F |
F |
T |
F |
T |
T |
F |
T |
F |
T |
F |
F |
T |
T |
p |
r |
|||
T |
T |
|||
T |
F |
|||
F |
T |
|||
F |
F |
p |
r |
~p |
||
T |
T |
F |
||
T |
F |
F |
||
F |
T |
T |
||
F |
F |
T |
p |
r |
~p |
r∧~p |
|
T |
T |
F |
F |
T |
F |
F |
F |
F |
T |
T |
T |
|
F |
F |
T |
F |
p |
r |
~p |
r∧~p |
(r∧~p)→r |
T |
T |
F |
F |
T |
T |
F |
F |
F |
T |
F |
T |
T |
T |
T |
F |
F |
T |
F |
T |
p |
r |
~p |
r∧~p |
(r∧~p)→r |
T |
T |
F |
F |
T |
T |
F |
F |
F |
T |
F |
T |
T |
T |
T |
F |
F |
T |
F |
T |
Because here we have 2 letters, p and r, we will have 2 columns at the beginning of the truth table labeled p and r:
p |
r |
|||
T |
T |
|||
T |
F |
|||
F |
T |
|||
F |
F |
Then, because p is the only letter in the expression ~p, we use the given truth values of p in the table to fill in the corresponding truth values for ~p:
p |
r |
~p |
||
T |
T |
F |
||
T |
F |
F |
||
F |
T |
T |
||
F |
F |
T |
p |
r |
~p |
~p→r |
T |
T |
F |
T |
T |
F |
F |
T |
F |
T |
T |
T |
F |
F |
T |
F |
p |
r | ~p |
~p→r |
r∧(~p→r) |
T |
T | F |
T |
T |
T |
F | F |
T |
F |
F |
T | T |
T |
T |
F |
F | T |
F |
F |
p |
r | ~p |
~p→r |
r∧(~p→r) |
T |
T | F |
T |
T |
T |
F | F |
T |
F |
F |
T | T |
T |
T |
F |
F | T |
F |
F |
Because here we have 3 letters, p, q and r, we will have 3 columns at the beginning of the truth table labeled p, q and r:
p |
q |
r |
|||
T |
T |
T |
|||
T |
T |
F |
|||
T |
F |
T |
|||
T |
F |
F |
|||
F |
T |
T |
|||
F |
T |
F |
|||
F |
F |
T |
|||
F |
F |
F |
The symbol ∨ always joins exactly two expressions; the two expressions it joins may themselves be more complicated statements, but we don't care how complicated they are, as long as we already have a column in the truth table with that logical expression at the top.
In this expression, the symbol ∨ joins the 2 expressions: p and q.p |
q |
r |
p∨q |
||
T |
T |
T |
T |
||
T |
T |
F |
T |
||
T |
F |
T |
T |
||
T |
F |
F |
T |
||
F |
T |
T |
T |
||
F |
T |
F |
T |
||
F |
F |
T |
F |
||
F |
F |
F |
F |
p |
q |
r |
p∨q |
~(p∨q) |
|
T |
T |
T |
T |
F |
|
T |
T |
F |
T |
F |
|
T |
F |
T |
T |
F |
|
T |
F |
F |
T |
F |
|
F |
T |
T |
T |
F |
|
F |
T |
F |
T |
F |
|
F |
F |
T |
F |
T |
|
F |
F |
F |
F |
T |
p |
q |
r |
p∨q |
~(p∨q) |
~(p∨q)↔r |
T |
T |
T |
T |
F |
F |
T |
T |
F |
T |
F |
T |
T |
F |
T |
T |
F |
F |
T |
F |
F |
T |
F |
T |
F |
T |
T |
T |
F |
F |
F |
T |
F |
T |
F |
T |
F |
F |
T |
F |
T |
T |
F |
F |
F |
F |
T |
F |
p |
q |
r |
p∨q |
~(p∨q) |
~(p∨q)↔r |
T |
T |
T |
T |
F |
F |
T |
T |
F |
T |
F |
T |
T |
F |
T |
T |
F |
F |
T |
F |
F |
T |
F |
T |
F |
T |
T |
T |
F |
F |
F |
T |
F |
T |
F |
T |
F |
F |
T |
F |
T |
T |
F |
F |
F |
F |
T |
F |
Because here we have 3 letters, p, q and r, we will have 3 columns at the beginning of the truth table labeled p, q and r:
p |
q |
r |
|||
T |
T |
T |
|||
T |
T |
F |
|||
T |
F |
T |
|||
T |
F |
F |
|||
F |
T |
T |
|||
F |
T |
F |
|||
F |
F |
T |
|||
F |
F |
F |
Because q is the statement in the expression ~q, we use the given truth values of q in the table to fill in the corresponding truth values for ~q:
p |
q |
r |
~q |
||
T |
T |
T |
F |
||
T |
T |
F |
F |
||
T |
F |
T |
T |
||
T |
F |
F |
T |
||
F |
T |
T |
F |
||
F |
T |
F |
F |
||
F |
F |
T |
T |
||
F |
F |
F |
T |
p |
q |
r |
~q |
p→~q |
|
T |
T |
T |
F |
F |
|
T |
T |
F |
F |
F |
|
T |
F |
T |
T |
T |
|
T |
F |
F |
T |
T |
|
F |
T |
T |
F |
T |
|
F |
T |
F |
F |
T |
|
F |
F |
T |
T |
T |
|
F |
F |
F |
T |
T |
Because r is the statement in the expression ~r, we use the given truth values of r in the table to fill in the corresponding truth values for ~r:
p |
q |
r |
~q |
p→~q |
~r |
T |
T |
T |
F |
F |
F |
T |
T |
F |
F |
F |
T |
T |
F |
T |
T |
T |
F |
T |
F |
F |
T |
T |
T |
F |
T |
T |
F |
T |
F |
F |
T |
F |
F |
T |
T |
F |
F |
T |
T |
T |
F |
F |
F |
F |
T |
T |
T |
p |
q |
r |
~q |
p→~q |
~r |
~r∧(p→~q) |
T |
T |
T |
F |
F |
F |
F |
T |
T |
F |
F |
F |
T |
F |
T |
F |
T |
T |
T |
F |
F |
T |
F |
F |
T |
T |
T |
T |
F |
T |
T |
F |
T |
F |
F |
F |
T |
F |
F |
T |
T |
T |
F |
F |
T |
T |
T |
F |
F |
F |
F |
F |
T |
T |
T |
T |
p |
q |
r |
~q |
p→~q |
~r |
~r∧(p→~q) | (~r∧(p→~q))→p |
T |
T |
T |
F |
F |
F |
F |
T |
T |
T |
F |
F |
F |
T |
F |
T |
T |
F |
T |
T |
T |
F |
F |
T |
T |
F |
F |
T |
T |
T |
T |
T |
F |
T |
T |
F |
T |
F |
F |
T |
F |
T |
F |
F |
T |
T |
T |
F |
F |
F |
T |
T |
T |
F |
F |
T |
F |
F |
F |
T |
T |
T |
T |
F |
p |
q |
r |
~q |
p→~q |
~r |
~r∧(p→~q) | (~r∧(p→~q))→p |
T |
T |
T |
F |
F |
F |
F |
T |
T |
T |
F |
F |
F |
T |
F |
T |
T |
F |
T |
T |
T |
F |
F |
T |
T |
F |
F |
T |
T |
T |
T |
T |
F |
T |
T |
F |
T |
F |
F |
T |
F |
T |
F |
F |
T |
T |
T |
F |
F |
F |
T |
T |
T |
F |
F |
T |
F |
F |
F |
T |
T |
T |
T |
F |
Are you ready to try making your own truth tables now?