Академический Документы
Профессиональный Документы
Культура Документы
A proposition, p, is a statement which is either true or false (called its truth value).
For example, the following are propositions:
1. The sun is shining.
2. The sum of two prime numbers is even.
3. 4 + 5 = 9
4. n is a prime number.
5. The moon is made of green cheese.
Truth tables
Truth tables represent the relationship between the truth values of propositions and compound propositions
formed from those propositions.
Negation (~)
p ~p
T F
F T
If a proposition p is true, its negation ~p is false. Notice that negation is a logical operation on a single
proposition.
Logical AND (Ù) – conjunction
p q pÙq p q pÙq
T T T 1 1 1
T F F 1 0 0
F T F 0 1 0
F F F 0 0 0
The second table is an alternative representation of the first where true is represented by 1 and false is
represented by 0.
In the truth table above, we see that the truth value of both propositions must be true, for AND to be true.
Consider the following propositions:
p: It is raining.
q: It is cold.
pÙq is only true if it is raining and it is cold, i.e, both propositions must be true.
Given two propositions, p and q, pÚq is true is either p is true and/or q is true. Note that only one proposition
has to be true, but both can also be true for pÚq to be true. For this reason, OR is also called inclusive OR or
inclusive disjunction.
Example 1
If you get an A, then I'll give you a dollar.
Example 2
If you score 85% or above in this class, then you will get an A.
Suppose you score a 90% in the class. If your final grade is an A, then the promise was kept and Statement 1 is
true. If your grade is not an A, then the promise was broken and Statement 1 is false.
But what if you do not score 85% or above? Is Statement 1 true or false in this case? Statement 1 does not say
what grade you will receive if you score less than 85%. If you score 75% in the class and receive a B, you
cannot complain that the promise was broken. If you score 84% and end up with an A, you still cannot say that
the promise was broken.
p q p«q p q p«q
T T T 1 1 1
T F F 1 0 0
F T F 0 1 0
F F T 0 0 1
p«q means that p and q are equivalent. So, the double implication is true if p and q are both true or if p and q
are both false; otherwise, the double implication is false.
NOTE:
A tautology is a formula which is "always true" --- that is, it is true for every assignment of truth values to its
simple components. You can think of a tautology as a rule of logic.
The opposite of a tautology is a contradiction, a formula which is "always false". In other words, a
contradiction is false for every assignment of truth values to its simple components.
Exercise
1. Show that (p ® q) Ú (q ® p) is a tautology.
2. Construct a truth table for (p ® q) Ù ( q ® r).
3. Show that p ® q and ~p Ú q are logically equivalent.
4. Write down the negation of the following statements, simplifying so that only simple statements are
negated.
(a) p Ú ~q
(b) (p Ù q) ® r