0% found this document useful (0 votes)
56 views10 pages

210 182 Logic

This document summarizes key concepts in logic and proofs including: 1) Statements are declarative sentences that are either true or false, while open sentences contain variables and become statements once the variables are assigned values. 2) Logical connectives like negation, disjunction, conjunction and implication can be used to relate statements and open sentences. 3) Tautologies and contradictions are types of compound statements that are always true or false regardless of the truth values of their components. 4) Logical equivalence defines when two compound statements will always take the same truth value regardless of the truth values assigned to their components.

Uploaded by

Abo Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views10 pages

210 182 Logic

This document summarizes key concepts in logic and proofs including: 1) Statements are declarative sentences that are either true or false, while open sentences contain variables and become statements once the variables are assigned values. 2) Logical connectives like negation, disjunction, conjunction and implication can be used to relate statements and open sentences. 3) Tautologies and contradictions are types of compound statements that are always true or false regardless of the truth values of their components. 4) Logical equivalence defines when two compound statements will always take the same truth value regardless of the truth values assigned to their components.

Uploaded by

Abo Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

rd

Notes based on Chartrand, Polimeni & Zhang’s "Mathematical Proofs: A Transition to Advanced Mathematics" (3 Ed.)

Logic
Statements
A statement (or proposition) is a declarative sentence (or assertion) that has a truth
value, i.e. that is either true (T) or false (F), but not both.
Examples

1. "The integer 3 is even." is a (false) statement (this is a declarative sentence).

2. "Every integer is a real number." is a (true) statement.

3. "Solve the equation x2 = 4 in R." is not a statement (this is an imperative sentence).

4. "What are the solutions of x2 = 4 in R?" is not a statement (this is an interrogative


sentence).

5. "What a nice formula!" is not a statement (this is an exclamatory sentence).

Note that it is not necessary for a statement that its truth value can be determined. For
100
example, we may perhaps never know if the statement "For n = 1010 ; the nth digit in the
decimal expansion of is a 9." is true, but we know it has a truth value.

Open Sentences
A declarative sentence containing one or more variables (where each variable is in some set
or domain) and which becomes a statement once the variables are given speci…c values from
their domains, is called an open sentence.
Examples

1. The statement P (x) : x2 = 4; where x 2 R, is an open sentence. It is true when x = 2


or x = 2 and is false otherwise.

2. Let P (x; y) : x + jy + 1j 1; where the domain of x is the set A = f0; 1; 2g and the
domain of y is the set B = f 1; 0g ; is an open sentence. It is false if (x; y) = (0; 1)
and is true otherwise.

1
Negation of a Statement
The negation (or denial) of a statement P is the statement "Not P " and is denoted P
(or :P ).

Example. The negation of the statement P : "The integer 3 is even." is the statement P:
"The integer 3 is not even." (Since every integer is either even or odd, we can also say that
P is the statement "The integer 3 is odd.")

Truth table for negation: P P


T F
F T

Disjunction and Conjunction


Let P and Q be statements.

The disjunction of P and Q is the statement "P or Q", denoted P _ Q:

The conjunction of P and Q is the statement "P and Q", denoted P ^ Q:

Example. Consider the statements


P : 3 is an even integer.
Q : 4 is a positive real number.
Then we have
P _ Q : 3 is an even integer or 4 is a positive real number.
P ^ Q : 3 is an even integer and 4 is a positive real number.

Since P is false, P ^ Q is false and since Q is true, P _ Q is true.

Truth table for disjunction and conjunction: P Q P _Q P ^Q


T T T T
F T T F
T F T F
F F F F

2
Implication and Biconditional
Given statements P and Q; the conditional statement "If P; then Q:" is called an implica-
tion and is denoted P ! Q (or P ) Q).

In the implication P ! Q, P is called hypothesis (or premise or antecedent) while Q


is called conclusion (or consequent).
Implication P ! Q can equivalently be stated as:

P implies Q:

P only if Q.

P is a su¢ cient condition for Q:

Q if P .

Q is a necessary condition for P:

Let P and Q be statements.

The converse of statement P ! Q is the statement Q ! P:

The statement (P ! Q)^(Q ! P ) ; which we often state as "P if and only if Q." (or
"P is necessary and su¢ cient for Q.", or simply "P i¤ Q:") is called the biconditional
of P and Q and is denoted P ! Q:

Truth table for implication and biconditional: P Q P !Q P !Q


T T T T
F T T F
T F F F
F F T T

Notes on the logical connectives (or logical operators) ; ^; _; !; !

For convenience (e.g. to avoid excessive use of parentheses), we will use the following
order of precedence: ; ^; _; !; !:

Logical connectives can be used not only for statements (as we saw above) but also
for open sentences.

3
Consider for example the open sentences

P (x) : x2 = 4 and Q (x) : x = 2; where x 2 R:

Then

P (x) : x2 6= 4

Q (x) : x 6= 2

P (x) _ Q (x) : x2 = 4 or x = 2

P (x) ^ Q (x) : x2 = 4 and x = 2

P (x) ! Q (x) : If x2 = 4; then x = 2

Q (x) ! P (x) : If x = 2; then x2 = 4

P (x) ! Q (x) : x2 = 4 i¤ x = 2

Note that:

P (x) is true if x 2 f 2; 2g and is false otherwise. Hence P (x) is true precisely


when x 62 f 2; 2g :

Clearly, Q (x) is true if x = 2 and Q (x) is true when x 6= 2.

P (x) _ Q (x) is true precisely when x2 = 4 or x = 2: Hence P (x) _ Q (x) is true


precisely when x 2 f 2; 2g :

P (x) ^ Q (x) is true precisely when x2 = 4 and x = 2: Hence P (x) ^ Q (x) is true
precisely when x = 2:

P (x) ! Q (x) is true when x 6= 2 and is false when x = 2.

Q (x) ! P (x) is true for all x 2 R:

P (x) ! Q (x) is true precisely when x 6= 2:

Tautologies and Contradictions


A compound statement is a statement where at least one logical connective is
applied to one or more given statements (called components statements or simply
components of the compound statement).

4
For example, if P and Q are statements, then P and P ^ (Q ! P ) are compound
statements.

A compound statement is a tautology if it is true for all possible truth values of its
components.

For example, for any statement P; the compound statements P ! P and P _ P


are tautologies.

A compound statement is a contradiction if it is false for all possible truth values of


its components.

For example, for any statement P; the compound statement P ! P and P ^ P


are contradictions.

Note that a statement is a tautology i¤ its negation is a contradiction.

Logical Equivalence
Let P and Q be compound statements composed of the same components (but possibly with
di¤erent connectives). If P and Q take the same truth value for each combination of the
truth values of the components, then we say that P and Q are logically equivalent and
write P Q:
Note that if P; Q; R are statements, then

P P

If P Q; then Q P

If P Q and Q R; then P R:

We also have
P !Q P _Q

5
which can easily be veri…ed by comparing the truth values in the last two columns of the
following truth table.

P Q P P !Q P _Q

T T F T T
F T T T T
T F F F F
F F T T T

It follows that P !Q ( P _ Q) ^ (P _ Q) :

Basic properties of logical equivalence

Let P; Q; R be statements. Then

( P) P (double negation)

P _P P and P ^ P P (idempotence)

P !Q Q ! P (contrapositive)

P _Q Q _ P and P ^ Q Q ^ P (commutativity)

(P _ Q) _ R P _ (Q _ R) and (P ^ Q) ^ R P ^ (Q ^ R) (associativity)

P _(Q ^ R) (P _ Q)^(P _ R) and P ^(Q _ R) (P ^ Q)_(P ^ R) (distributivity)

(P _ Q) P^ Q and (P ^ Q) P_ Q (De Morgan’s laws)

Note that if P is a statement, Q is a tautology, and R is a contradiction, then

P _Q Q; P ^ Q P; P _ R P; P ^ R R

Example. Let P; Q; R be statements. Show that

P ^ (P ! Q) P ^ Q and P _ (P ! Q) P !Q

and that the statement

(P ! Q) ! ((P ^ R) ! (Q ^ R))

is a tautology.

6
(a) Using a truth table.

(b) Using logical equivalence.

Solution. (a) By truth table:


Comparing Columns 5 and 6 in the table below, we see that P ^ (P ! Q) P ^ Q; and
comparing the last two columns we see that ( P ) _ (P ! Q) P ! Q:

P Q P P !Q P ^Q P ^ (P ! Q) P _ (P ! Q) P !Q

T T F T T T T T
F T T F F F T T
T F F F F F F F
F F T T F F T T

Next, let U be the statement (P ^ R) ! (Q ^ R) and S be the statement (P ! Q) ! U:

P Q R P !Q P ^R Q^R U S

T T T T T T T T
F T T F F T T T
T F T F T F F T
F F T T F F T T
T T F T F F T T
F T F F F F T T
T F F F F F T T
F F F T F F T T

The last column in the above table shows that S is true for all possible truth values of P;
Q, and R: Hence S is a tautology.

(b) By logical equivalence:

P ^ (P ! Q) P ^ (( P _ Q) ^ (P _ Q))

(P ^ ( P _ Q)) ^ (P _ Q)

(P ^ P ) _ (P ^ Q) ^ (P _ Q)

(P ^ Q) ^ (P _ Q) (since P ^ P is a contradiction)

(P ^ Q) _ ((P ^ Q) ^ Q)

P ^Q

7
( P ) _ (P ! Q) P _ ((P ! Q) ^ (Q ! P ))

P _ (( P _ Q) ^ (P _ Q))

( P _( P _ Q)) ^ ( P _ (P _ Q))

( P _ Q) ^ (( P _ P)_ Q) (since P _ P is a tautology)

( P _ Q) ^ ( P _ P)

P _Q

P !Q

(P ! Q) ! U (P ! Q) _ ((P ^ R) ! (Q ^ R))

(P ! Q) _ ( (P ^ R) _ (Q ^ R))

(P ! Q) _ ( P_ R) _ (Q ^ R)

(P ! Q) _ P _ (( R _ Q) ^ ( R _ R))

(P ! Q) _ P _( R _ Q)

((P ! Q) ^ P ) _ ( R _ Q)

(P ^ Q) _ ( R _ Q) (using P ^ (P ! Q) P ^ Q; proved above)

P_ Q_ R_Q

( P_ R) _ ( Q _ Q)

Q _ Q; which is a tautology.

Quanti…ed Statements
We have seen that an open sentence P (x) (where x is in a domain S) can be changed into
a statement by specifying a value for x: Another way to change it into a statement is by
quantifying it, i.e. adding such phrases as "for every x 2 S" or "for some x 2 S" to obtain
the quanti…ed statements:

"For every x 2 S; P (x) :" written in symbols as "8x 2 S; P (x)"

"For some x 2 S; P (x) :" written in symbols as "9x 2 S; P (x)"

8
The symbols 8 and 9 are respectively called universal quanti…er and existential quan-
ti…er.
There are several ways of expressing quanti…ed statements, e.g.:

"For every x 2 S; P (x) :" can be written "For each x 2 S; P (x) :", "P (x) for all
x 2 S.", "If x 2 S; then P (x)."

"For some x 2 S; P (x) : can be written "There exists x 2 S such that P (x) :", "There
is x 2 S such that P (x) :"

Note that if S = ;; then "8x 2 S; P (x)" is true and "9x 2 S; P (x)" is false for all open
sentences P (x) :

Negation of Quanti…ed Statements


For the open sentence P (x) ; where x 2 S; we have

(8x 2 S; P (x)) 9x 2 S; P (x)

(9x 2 S; P (x)) 8x 2 S; P (x)

For open sentences with two or more variables, similar logical equivalences hold. For exam-
ple,

(8x 2 S; 8y 2 T; P (x; y)) 9x 2 S; 9y 2 T; P (x; y)

(8x 2 S; 9y 2 T; P (x; y)) 9x 2 S; 8y 2 T; P (x; y)

(9x 2 S; 8y 2 T; P (x; y)) 8x 2 S; 9y 2 T; P (x; y)

(9x 2 S; 9y 2 T; P (x; y)) 8x 2 S; 8y 2 T; P (x; y)

Note that, in general, the statements "9x 2 S; 8y 2 T; P (x; y)" and "8x 2 S; 9y 2
T; P (x; y)" are not logically equivalent.

9
Example. Let S = T = Z and let P (x; y) be the statement x + y is odd. Then
9x 2 S; 8y 2 T; P (x; y) means "There is an integer x such that for each integer y; x + y is
odd." This sentence is false since x + x is not odd.
However, 8x 2 S; 9y 2 T; P (x; y) means "For each integer x; there is an integer y such that
x + y is odd.", which is true since x + (1 x) is odd.

Note. There are other quanti…ers (in addition to 8 and 9) that can be applied to open
sentences. One such is the quanti…er 9! often used to write existence-uniqueness statements
such as
9!x 2 S; P (x)

and which means "There exists a unique x in S such that P (x).", or, in symbols,

"9x 2 S; P (x) ^ (8y 2 S; P (y) ! (x = y)) :"

10

You might also like