Vous êtes sur la page 1sur 22

SET THEORY

Logic


Proposition

We define a proposition to be a statement which is either true or false.

When we deal with propositions in logic we consider sentences without


being interested in their meanings, only examining them as true or false
statements.

For examples, “2 is even”, “2 + 2 = 4”, “2 + 2 = 5”.

Logical values

For a given statement P, we will look at the possible truth values of P. Namely,
either P is true (T) or P is False (F).

P
T
F

Examples.

1. P := for each real number x, x2 +1 is positive . The logical value of the


proposition P is true.


2. Q := if x=2 then x2−1=0.
 The logical value of the proposition Q is false.


If we are analyzing two statements P and Q at the same time, we need to


consider all possible combinations of truth values.

P Q
T T
T F
F T
F F
The first row is the case when both are true. The second row is the case where P
is true and Q is false. The third row is the case when P is false and Q is true. The
fourth row is the case when both P and Q are false. Using truth tables, we can
”define” what certain symbols and words mean in mathematics.

In mathematics, the terms ”and”, ”or”, ”not” have precise meaning and are often
written as symbols instead of words. We will use these symbols to construct
more complicated statements from ones that we have.

OPERATIONS BETWEEN PROPOSITIONS

a. The negation of a proposition Pis also called not P, and is denoted by ¬P.

Example: 1) If P: “2 is even” then ¬P: “2 is not even”. 2) If P: “2 + 2 = 5” then


¬P: “2 + 2 ≠ 5”.

¬ = ”NOT”:
 ¬P is true when P is false and ¬P is false when P is true.

P ¬P
T F
F T

b. If p and q are two propositions then their conjunction is the proposition


whose value is true only when both are true.

A conjunction can also be written PQwhich is read Pand Q.

1.1 Let P: “2 is even” and Q: “2 + 2 = 5”. State these propositions and find their
value.

a) PQ

b) P¬Q

c) ¬PQ

d) ¬P¬Q

 = ”AND”:

In order for the statement P  Q to be true, both P and Q must be true.


Otherwise, it is false.

P Q PQ
T T T
T F F
F T F
F F F

Now let’s move one step further and write the truth table for

¬(P  Q) which will be true exactly when (P  Q) is false.

P Q PQ ¬( P Q)
T T T F
T F F T
F T F T
F F F T

It is crucial to note the placement of the parenthesis and how this is crucial to
the meaning of the sentence. Without the parenthesis, we read from left to right.

So ¬P  Q is understood to mean (¬P ) (Q). Notice the difference in the truth


tables:

P Q ¬P ¬P  Q
T T F F
T F F F
F T T T
F F T F

c. Similarly the disjunction of p and q has value false only when both are false.
It is denoted by P  Qand read Por Q.

In mathematics, we use an inclusive ”or”. This means that for P  Q to be true,


we require that one of them be true but allow for the possibility that both are
true. Therefore, the truth table is as follows:

P Q P Q
T T T
T F T
F T T
F F F

d. We will now discuss what it means for a statement to imply another


statement. The symbol we use for this is ⇒ and P ⇒ Q is often read ”P implies
Q”. Logically, this statement is equivalent to ¬PQ and to understand the
mathematical implication consider the following:

If your mother tells you ”If I go to the candy store, I’ll buy you a candy”,
when has she told the truth? Well, there is really only one way that she has lied -
namely if she goes to the candy store and doesn’t buy you a candy. Notice that if
she doesn’t go to the candy store, it doesn’t really matter what happens later
since her promise was conditional on her going to the candy store.

The implication of p and q has value false only when P is true and Q is
false. A statement in the form P ⇒ Q is also called a conditional statement, in
which p is sufficient condition for q and q is a necessary condition for p.

Remarks.

(1) For P ⇒ Q we can also say that
if P then Q, P only if Q,
 P is a


sufficient condition for Q, Q is a necessary condition for P. 


P Q P ⇒Q
T T T
T F F
F T T
F F T

e.We now discuss what it means for two statements to be


equivalent. The symbol we use for this is ⇐⇒ and P ⇐⇒Q is often
read ”P if and only if Q”. Logically, this statement is equivalent to
(P ⇒ Q) (Q ⇒P ) and means that the two statements have exactly
the same truth values or truth tables. It is also called a
biconditional statement, in which P is necessary and sufficient
condition for Q, and vice versa.
Let us look at the truth table for P ⇐⇒ Q.
P Q P ⇒Q  Q⇒P P ⇐⇒ Q.
T T T T T T
T F F F T F
F T T F F F
F F T T T T

Remarks:
1. For P ⇐⇒Q we can also say that P if and only if Q, (P iff
Q)
2. 
P is a necessary and sufficient condition for Q. 

Problem:

1. 5 Let p: “Today is cold”, q: “Today is hot”, and r: “Today is


windy”. Write the following propositions using p, q, r.
a) Today is hot if and only if not windy. 

b) Either today is cold or not cold. 

c) If today is not windy then it is not hot. 

d) Today is neither cold nor windy. 

e) If today is windy then either it is hot or cold. 

TAUTOLOGIES and CONTRADICTIONS:

Here is a simple example:


Exercises:
Rule of replacement:

1. Associativity
(p q)  r  p  (q  r)
2. Commutativity
p q  q  p
3. Double negation
¬¬p p
4. Distributivity
(p q)  r  (p  r )  (q  r)
5. De morgans laws
¬(p q) ¬p ¬q
6. Transposition or contrapositive
p q ¬q ¬p
7. Material Implication
p q ¬p  q
8. Material Equivalence
p q  [ (p  q)  (q  p)]
p q  [ (p  q)  (¬p ¬q)]
9. Exportation
[ (p  q)  r]  [p (q  r)]
10. Tautology
(p  p)  p
(p v p)  p
11. Modus Ponens (MP)
(p q )
p_____
q
12. Modus Tollens
(p q )
¬q______
¬p

13. Hypothetical syllogism


(p q )
(q r )
(p r )

14. Disjunctive syllogism


(p v q)
¬p____
q
15. constructive dilemma
(p q ) (r s )
(p r)_____
q s

16. Destructive Dilemma


(p q ) (r s )
(¬q ¬s )______
¬p¬ r
17. Simplification
p q
____
p
18. Conjunction
p
q____
p q
19. Addition
p
______
p q

Prove:

1. a (b c)
c (d  e)
___________
a (b  d)
2. ¬ p
_____
p q

3.p q

__________

(p r)  q

3. p q
p r
____________
p (q  r)

4. p ( q ¬ r)
(q r)  s
p
__________________
s

Vous aimerez peut-être aussi