You are on page 1of 35

Chapter 2 Logic

2.1 Statements
2.2 The Negation of a Statement
2.3 The Disjunction and Conjunction of Statements
2.4 The Implication
2.5 More on Implications
2.6 The Biconditional
2.7 Tautologies and Contradictions
2.8 Logical Equivalence
2.9 Some Fundamental Properties of Logical Equivalence
2.10 Quantifies Statements

2.1 Statements

A statement is a declarative sentence or assertion that is true or false


(but not both).
Example: The integer 2 is even. The integer -4 is postive.
Every statement has a true value: true (T), or false (F).
We often use P, Q and R to denote statements, or perhaps P1, P2, ,
Pn if several statements are involved.
For example: P1: The integer 2 is even.
P2: The integer - 4 is positive.
P1 and P2 are both statements, where P1 has truth value T and P2 has
truth value F.

Sentences That are Not Statements


The following sentences are NOT statements:
Commands:
Example: Divide 4x by the number 2

Questions:
Example: Is the integer 3 even?

Exclamatory:
Example: What a difficult problem!

Open Sentence
Example: Is the number x is an integer a statement?
An open sentence is a declarative sentence that satisfies the following
properties:
It contains one or more variables, each variable representing a
value in some prescribed set, called the domain of the variable;
It becomes a statement when values from their respective domain
are substituted for these variables.
Example: The open sentence x+4=10 is an open sentence. It is true
only when x=6.

Representation
An open sentence that contains a variable x is represented by P(x),
Q(x), or R(x).
If P(x) is an open sentence, where the domain of x is S, then we say
P(x) is an open sentence over the domain S. Here P(x) is a
statement for each x S.
Example: the open statement P(x): 0<x-3<5 over the domain Z is a true
statement when x {4, 5, 6, 7}, and it is a false statement
otherwise.

Truth Table
The possible true values of a statement are often given in a table,
called a true table.
Example: True table for P is
P , the truth table for Q is Q
T
T
F
F
The truth table for two statements P and Q is
P Q
T T
T F
F T
F F
What is the truth table for three statements P, Q and R?
In general, a truth table involving n statements contains 2n possible
combinations of truth values for these statements.

Section 2.2 The Negation of a Statement


We are interested in investigating the truth or falseness of new
statements that can be produced from one or more given
statements by performing certain operations on them.
The negation of a statement P is the statement: not P, and is denoted
by P. Although P could always be expressed as It is not the case
that P.
Example:
P: The integer 4 is even. P: The integer 4 is not even, or the integer is
odd.
P: The number e is a rational number. P: The number e is not a
rational number, or the integer e is a irrational number.

Truth Table for Negation


The negation of a true statement is always false, and the negation of a
false statement is always true. Here is the true table for P (in terms
of the possible truth values of P).
P P
T F
F T

Section 2.3 The Disjunction and Conjunction of Statements

The disjunction of the statements P and Q is the statement: P or Q, and


is denoted by PQ.
The disjunction is true if at least one of P and Q is true; otherwise, PQ
is false. Therefore, PQ is true if exactly one of P and Q is true or
both P and Q are true.
Example: P1: The integer 4 is even. P2: The integer 10 is prime.
P1 P2: Either 4 is even or 10 is prime.
It is true since at least one of P1 and P2 is true.

Truth Table for Disjunction


For two statements P and Q, the truth table for PQ is
P
T
T
F
F

Q PQ
T T
F T
T T
F F

Conjunction of Statements
The conjunction of the statement P and Q is the statement: P and Q,
and is denoted by PQ.
Example: P1: The integer 4 is even. P2: The integer 10 is prime.
P1 P2: 4 is even and 10 is prime. It is false since at P2 is false.

Truth Table for Conjunction


The conjunction PQ is true only when both P and Q are true;
otherwise, PQ is false.
For two statements P and Q, the truth table for PQ is
P Q PQ
T T T
T F F
F T F
F F F

Section 2.4 The Implication


For statements P and Q, the implication is the statement: If P, then Q,
and is denoted by PQ. In addition to the wording if P, then Q, we
also express PQ in words as P implies Q.
Example: P1: The integer 4 is even. P2: The integer 10 is prime.
P1 P2: If 4 is even, then 10 is prime. (It is false.)
P2 P1: If 10 is prime, then 4 is even. (It is true, however.)
Example: The teacher promised
If you earn an A on the final exam (P), then you receive an A for your
final grade (Q).
Note: If P is false and Q is true, P Q is still true since you may get an
A from other reasons.
If P is false and Q is false, P Q is still true since the teacher promised
nothing if you didnt get an A on the final exam.

Truth Table for Implication


Note that the only situation for PQ is false is when P is true and Q is
false, and PQ is true otherwise.
For two statements P and Q, the truth table for PQ is
P Q PQ
T T T
T F F
F T T
F F T

Expression of the Implication


The implication PQ can be expressed a the following:
If P, then Q.
Q if P.
P implies Q.

P only if Q.
P is sufficient for Q.
Q is necessary for P.

Section 2.5 More on Implications

Just as new statements can be formed from statements P and Q by


negation, disjunction, conjunction, or implication, new open
statements can be constructed from open statements in the same
manner.

Example
Example: Consider the open sentences P1: x=-2 and P2: |x|=2,
where x R. We can form the following open sentences.
P1(x): x-2.
P1 (x) P2(x): x=-2 or |x|=2.
P1 (x) P2(x): x=-2 and |x|=2.
P1(x) P2(x): If x=-2, then |x|=2.
For each given value of x R, the truth value of each resulting
statement can be determined.
P1(3) is true;
P1 (2) P2(2) is true;
P1 (2) P2(2) is false;
P1(x) P2(x) is true for all x R. Why?

Example
In general, the sentence P in the implication PQ is referred to as the
hypothesis or premise of PQ, while Q is called the conclusion of
PQ.
Example: Let S={2, 3, 5} and let P(n): n-1 is even, and Q(n): n+3 is
odd.
be open sentences over the domain S. Determine the truth or falseness
of the implication for each n S.
Solution: P(2)Q(2) is ?
P(3)Q(3) is ?

Section 2.6 The Biconditional


For statement (or open sentences) P and Q, the implication P Q is
called the converse of P Q.
Example: P1: The integer 4 is even. P2: The integer 10 is prime.
The converse of the implication P1 P2: If 4 is even, then 10 is prime.
Is the implication P2 P1: If 10 is prime, then 4 is even.
For statements (or open sentences) P and Q, the conjunction
(P Q) (Q P)
is called the biconditional of P and Q, is denoted by P Q.

Truth Table for the Biconditional


The truth table for the biconditional PQ is
P
Q
PQ
T
T
T
T
F
F
F
T
F
F
F
T
Why?
We see that PQ is true precisely when P and Q have the same truth
values.
The biconditional PQ is often stated as
P is equivalent to Q
or
P is and only if Q
or
P is necessary and sufficient condition for Q

Example
For statements P and Q, it then follows that the biconditional P if and
only if Q is true only when P and Q have the same truth values.
Example: Consider the open sentences P1: x=-2 and P2: |x|=2,
where x R. P1(x) P2(x): If x=-2, then |x|=2.
Then P1(x) P2(x) is false when x=2, and is true for all other real
numbers x. Why?
Example:
Let P(x, y): |x|=|y| and Q(x, y):x=y, where (x, y) {(6, 6), (2, -2)}.
Solution: P(6, 6) is true and Q(6, 6) is true, so P(6, 6) Q(6, 6) is true;
P(2, -2) is true and Q(2, -2) is false, so P(2, -2) Q(2, -2) is false.

Section 2.7 Tautologies and Contradictions


The symbols , , , , and are sometimes referred to as logical
connectives. A compound statement is a statement composed of
one or more given statements, and at least one logical connective.
Example: P (P) is a compound statement. Furthermore, it is true
regardless of the truth value of P.
A compound statement S is called a tautology if it is true for all possible
combinations of truth values of the component statements that
comprise S.
Example: P (P), and (Q) (P Q) are both tautologies. Verify
them.
Example: Let P: 4 is even, then P (P): 4 is even or 4 is not even is
always true.

Contradictions
On the other hand, a compound statement S is called a contradiction if
it is false for all possible combination of truth values of the
component statements that are used to form S.
Example: P (P) and (P Q) (Q(P)) are both contradictions.
Verify them.
Indeed, if a compound statement is a tautology, then its negation S is
a contradiction.

2.8 Logical Equivalence


Give a truth table for the two statements: P Q and (P) Q.

If two (compound) statements R and S have the same truth values for
combinations of truth values of their component statements, then we
say that R and S are logically equivalent and indicate this by writing
R S.
Example: P Q (P) Q.

Logically Equivalence and Tautology


Suppose R and S are logically equivalent compound statements. Then
by the definition, the biconiditional RS is true for all possible
combinations of truth values of their component statements and
hence RS is a tautology.
Conversely, if RS is a tautology, then R and S are logically
equivalent.
Theorem
Let P and Q be two statements. Then P Q and (P) Q. are logically
equivalent.
PQ can be expressed as P if and only if Q, and P is necessary and
sufficient for Q.

Section 2.9 Some Fundamental Properties of


Logical Equivalence
Verify the following by means of a truth table.
P (P)
Theorem For statements P, Q and R,
1. Commutative Laws
(a) P Q Q P
(b) P Q Q P

2. Associative Laws
(a) P (Q R) (P Q) R
(b) P (Q R) (P Q) R

3. Distributive Laws
(a) P (Q R) (P Q) (P R)
(b) P (Q R) (P Q) (P R)

Theorem
4. De Morgans Laws
(P Q) ( P) ( Q)
(P Q) ( P) ( Q)

Each part of the theorem can be verifies by means of a truth table.


The laws given here, together with other known logical equivalences,
can be used to good advantage at times to prove other logical
equivalences (without introducing a truth table).
Theorem: For statements P and Q,
(a) (P Q) (P) ( Q)
(P Q) ((P) ( Q)) ((Q) ( P))

Section 2.10 Quantified Statements


There is a method that an open sentence can be converted into a
statement, called quantification.
Let P(x) be an open sentence over a domain S. Adding the phrase For
every x S to P(x) produces a statement called a quantified
statement.
The phrase for every is referred to as the universal quantifier and is
denoted by the symbol . Other ways to express the universal
quantifier are for each and for all.

Universal Quantifier
This quantified statement is expressed in symbols by
x S, P(x)
and is expressed in words by
For every x S, P(x).

(1)

The quantified statement (1) is true if P(x) is true for every x S; while
the quantified statement (1) is false if P(x) is false for at least one
element x S.

Examples
Note that the quantified statement x S, P(x) can be expressed as
If x S, then P(x).
Example: x R, x20 can be expressed as
For every real number, x20.
or
If x is a real number, then x20.
Notices that x R, x20 is true since x20 is true for every real
number x.
Example: x R, x2>0 is false when x=0.

Existential Quantifier
Another way to convert an open sentence P(x) over a domain S into a
statement is by a quantifier called an existential quantifier.
Each of the phrases there exists, there is, for some, and for at least
one is referred to as an existential quantifier and is denoted by the
symbol .
This quantified statement is expressed in symbols by
x S, P(x)
and is expressed in words by
There exists x S such that P(x).

(1)

The quantified statement (1) is true if P(x) is true for at least one element x
S; while the quantified statement (1) is false if P(x) is false for all x S.

Examples
Example: x R, x2>0 is true, but x R, x2<0 false.
Generally, if we are considering an open sentence P(x) over a domain
S, then
(x S, P(x)) x S, P(x).
And
( x S, P(x)) x S, P(x).
Example: (x R, x20) x R, x2>0).
Example: ( x R, 3x=12) x R, 3x12.

Example
The statement
There exists a real number x such that x2=3.
Express this using a quantifier.
x R, x2=3.

Is it true or false?

True.
Express in word the negation of the statement.
For every real number x, x23.

Express the negation of the statement in symbols.


x R, x23.
False.

Generalized Case
Let P(x, y) be an open sentence, where the domain of the variable x in
S and domain of the variable y is T. The quantified statement
For all x S and y T, P(x, y).
Can be expressed symbolically as
x S, y T, P(x, y).
The negation of the statement
(x S, y T, P(x, y)) x S, y T, P(x, y).

(1)

You might also like