chapter 1 symbolic logic 1 fundamentals of algebra of logic · chapter 1 symbolic logic 1...

23
Chapter 1 SYMBOLIC LOGIC 1 Fundamentals of Algebra of Logic Definition 1.1 An assertion is a statement. A proposition is a statement which is either true or false. If a proposition is true we assign the truth value “TRUE” to it. If a proposition is false, we assign the truth value “FALSE” to it. We will denote by “T” or “1”, the truth value TRUE and by “F” or “0” the truth value FALSE. Example 1.1 The following are propositions: 1. 9 is a prime number. 2. 4 + 6 = 10; 3. 10 > -4; 4. All men are mortals.; 5. It was raining in Madrid, when Magellan arrived in Mactan. The following are NOT propositions: 1. x + y< 3; 2. x = 10; 3. How old are you? Definition 1.2 A propositional variable, denoted by P, Q, R, . . . denotes an arbi- trary proposition with an unspecified truth value. Definition 1.3 Given two propositional variables P and Q. These two proposi- tional variables maybe combined to form a new one. These are combined using the logical operators or logical connectives : “and”, “or” or “not”. These new proposition are: 1. (Conjunction of P and Q) P and Q, denoted by P Q; 2. (Disjunction of P and Q) P or Q, denoted by P Q; 3. (Negation of P) not P, denoted by ¬P . 1

Upload: others

Post on 06-Mar-2020

225 views

Category:

Documents


8 download

TRANSCRIPT

Chapter 1SYMBOLIC LOGIC

1 Fundamentals of Algebra of Logic

Definition 1.1 An assertion is a statement. A proposition is a statement which iseither true or false. If a proposition is true we assign the truth value “TRUE” to it.If a proposition is false, we assign the truth value “FALSE” to it. We will denoteby “T” or “1”, the truth value TRUE and by “F” or “0” the truth value FALSE.

Example 1.1 The following are propositions:

1. 9 is a prime number.

2. 4 + 6 = 10;

3. 10 > −4;

4. All men are mortals.;

5. It was raining in Madrid, when Magellan arrived in Mactan.

The following are NOT propositions:

1. x+ y < 3;

2. x = 10;

3. How old are you?

Definition 1.2 A propositional variable, denoted by P,Q,R, . . . denotes an arbi-trary proposition with an unspecified truth value.

Definition 1.3 Given two propositional variables P and Q. These two proposi-tional variables maybe combined to form a new one. These are combined usingthe logical operators or logical connectives : “and”, “or” or “not”. These newproposition are:

1. (Conjunction of P and Q) P and Q, denoted by P ∧Q;

2. (Disjunction of P and Q) P or Q, denoted by P ∨Q;

3. (Negation of P) not P, denoted by ¬P .

1

Remark 1.1 When a logical operator is used to construct a new proposition fromold ones, the truth value of the new proposition depends on the logical operators andthe truth values of the original proposition.

P ¬P0 11 0

P Q P ∧Q P ∨Q0 0 0 00 1 0 11 0 0 11 1 1 1

Definition 1.4 The proposition “P implies Q”, denoted by P =⇒ Q is called animplication. The operand P is called the hypothesis, premise or antecedent and theoperand Q is called the conclusion or the consequence.

P Q P =⇒ Q

0 0 10 1 11 0 01 1 1

Definition 1.5 Given the implication P =⇒ Q, its converse is Q =⇒ P and itscontrapositive is ¬Q =⇒ ¬P .

P Q Q =⇒ P ¬Q =⇒ ¬P0 0 1 10 1 0 11 0 1 01 1 1 1

Definition 1.6 If the propositions P and Q have the same truth values, then theyare said to be logically equivalent propositions, denoted by P ⇐⇒ Q. We call thelogical operator ⇐⇒ equivalence.

Remark 1.2 Based on the truth tables above, we can see that

(P =⇒ Q) ⇐⇒ (¬Q =⇒ ¬P ).

Remark 1.3 We note that

(P ⇐⇒ Q) ⇐⇒ [(P =⇒ Q) ∧ (Q =⇒ P )].

2

Definition 1.7 A propositional form is an assertion which contains at least onepropositional variable and maybe generated by the following rules:

1. A propositional variable standing alone is a propositional form;

2. If P is a propositional form, then ¬P is also a propositional form;

3. If P and Q are propositional forms, then P ∨ Q, P ∧ Q, P ⇐⇒ Q arepropositional forms;

4. A string of symbols containing propositional variables, connectives and paren-theses is a propositional form if and only if it can be obtained by finitely manyapplications of rules (1.); (2.) or (3.) above.

Example 1.2 The following are propositional forms:

1. (Q ∧ ¬P ) =⇒ P ; 2. [(P ∧Q) ∨ ¬R] ⇐⇒ P .

Definition 1.8 A tautology is a propositional form which is always true. A contra-diction or absurdity is a propositional form which is always false. A contingency isa propositional form which is neither a tautology nor a contradiction.

Example 1.3 P ∨ ¬P is a tautology while P ∧ ¬P is a contradiction. The propo-sitional forms given in Example 2 are both contingencies.

Remark 1.4 Some words like “both” which goes with “and”; “either” which goeswith “or”; or “neither” which goes with “nor” have parenthetical meaning:

• Both P or Q and R : (P ∨Q) ∧R;

• P or both Q and R : P ∨ (Q ∧R);

• Either P and Q or R : (P ∧Q) ∨R;

• P and either Q or R : P ∧ (Q ∨R)

• Neither P nor Q : ¬(P ∨Q).

Definition 1.9 An equivalence which is a tautology is called an identity.

3

Remark 1.5 The following are logical identities or rules of replacement.

1. Idempotence

• P ⇐⇒ (P ∨ P );• P ⇐⇒ (P ∧ P )

2. Commutativity

• (P ∨Q) ⇐⇒ (Q ∨ P )• (P ∧Q) ⇐⇒ (Q ∧ P )

3. Associativity

• [(P ∨Q) ∨R] ⇐⇒ [P ∨ (Q ∨R)]• [(P ∧Q) ∧R] ⇐⇒ [(P ∧Q) ∧R]

4. De Morgan’s

• ¬(P ∨Q) ⇐⇒ ¬P ∧ ¬Q• ¬(P ∧Q) ⇐⇒ ¬P ∨ ¬Q

5. Distributivity of ∨ over ∧

[P ∨ (Q ∧R)] ⇐⇒ [(P ∨Q) ∧ (P ∨R)];

6. Distributivity of ∧ and ∨

[P ∧ (Q ∨R)] ⇐⇒ [(P ∧Q) ∨ (P ∧R)]

7. Double NegationP ⇐⇒ ¬(¬P )

8. Material Implication

(P =⇒ Q) ⇐⇒ (¬P ∨Q)

9. Material Equivalence

[P ⇐⇒ Q] ⇐⇒ [(P =⇒ Q) ∧ (Q =⇒ P )]

10. Absurdity[(P =⇒ Q) ∧ (P =⇒ ¬Q)] ⇐⇒ ¬P

11. Contrapositive or Transposition

(P =⇒ Q) ⇐⇒ (¬Q =⇒ ¬P )

4

12. Additional Identities

• (P ∨ 1) ⇐⇒ 1• (P ∧ 1) ⇐⇒ P

• ¬0 ⇐⇒ 1

• (P ∨ 0) ⇐⇒ P

• (P ∧ 0) ⇐⇒ 0• ¬1 ⇐⇒ 0

• (P ∨ ¬P ) ⇐⇒ 1

• (P ∧ ¬P ) ⇐⇒ 0

Theorem 1.1 (Rule of Replacement) If P ⇐⇒ Q is an identity then in anypropositional form, any occurrence of P maybe replaced by Q and the resulting newpropositional form is equivalent to the old one.

Example 1.4 Show that

[P ⇐⇒ Q] ⇐⇒ [(P ∧Q) ∨ (¬P ∧ ¬Q)].

Example 1.5 Show that: (Exportation)

[(P ∧Q) =⇒ R] ⇐⇒ [P =⇒ (Q =⇒ R)]

2 Arguments

2.1 Valid and invalid arguments

Definition 2.1 An argument is a collection of propositions wherein it is claimedthat one of the propositions, called the conclusion, follows from the other propo-sitions, called the premise of the argument. the conclusion is usually preceded bysuch words as therefore, hence, then, consequently.

Remark 2.1 Classifications of Arguments:

1. Inductive argument := an argument where it is claimed that within a certainprobability of error, the conclusion follows from the premise.

2. Deductive argument := an argument where it is claimed that the conclusionabsolutely follows from the premise.

Definition 2.2 A deductive argument is said to be valid if whenever the premisesare all true, then the conclusion is also true. In other words, if P1, P2, . . . Pn arethe premises and Q is the conclusion of the argument P1 and P2 and . . . , and Pn,therefore Q is valid if and only if the corresponding propositional form

(P1 ∧ P2 ∧ . . . ∧ Pn) =⇒ Q,

is a tautology. Otherwise, the argument is said to be invalid.

5

Remark 2.2 To show that an argument is invalid, we have to show an instancewhere the conclusion is free and the premises are all true.

Example 2.1 Show that the following argument is invalid.

J =⇒ (K =⇒ L)K =⇒ (¬L =⇒ M)

L ∨M =⇒ N∴ J =⇒ N

Remark 2.3 To show the validity of arguments, we may use the truth table. How-ever, this method is impractical specially if the argument contains several proposi-tional variables. A more convenient method is by deducing the conclusion from thepremises by a sequence of shorter, more elementary arguments known to be valid.

2.2 Rules of inference

Definition 2.3 The following are called the rules of inference. These are knownvalid argument forms.

1. Addition (Add.)

P∴ P ∨Q

2. Simplification (Simp.)

P ∧Q∴ P

3. Conjunction (Conj)

PQ

∴ P ∧Q

4. Absorption (Absp)

P =⇒ Q∴ P =⇒ (P ∧Q)

5. Modus Ponens (MP)

P =⇒ QP

∴ Q

6. Modus Tollens (MT)

P =⇒ Q¬Q

∴ ¬P

7. Hypothetical Syllogism (HS)

P =⇒ QQ =⇒ R

∴ P =⇒ R

8. Disjunctive Syllogism (DS)

P ∨Q¬P∴ Q

9. Constructive Dilemma (CD)

(P =⇒ Q) ∧ (R =⇒ S)P ∨R

∴ Q ∨ S

10. Destructive Dilemma (DD)

(P =⇒ Q) ∧ (R =⇒ S)¬Q ∨ ¬S

∴ ¬P ∨ ¬R

6

Definition 2.4 A formal proof of validity for a given argument is a sequence ofstatements, each of which is either a premise of that argument or one that followsfrom the preceding statements by an elementary valid argument(rule of inference).Furthermore, the last statement in the sequence is the conclusion of the argumentwhose validity is being proved.

Example 2.2 Construct a formal proof of validity for the following arguments:

1. (a) H =⇒ (K =⇒ M)

(b) ¬M ∧H/ ∴ ¬K

2. (a) M =⇒ N

(b) N =⇒ O

(c) (M =⇒ O) =⇒ (N =⇒ P )

(d) (M =⇒ P ) =⇒ Q/ ∴ Q

3. (a) E =⇒ (F ∧ ¬G)

(b) (F ∨G) =⇒ H

(c) E/ ∴ H

4. (a) J =⇒ K

(b) J ∨ (K ∨ ¬L)

(c) ¬K/ ∴ ¬L ∧ ¬K

5. (a) (R =⇒ ¬S) ∧ (T =⇒ ¬U)

(b) (V =⇒ ¬W ) ∧ (X =⇒ ¬Y )

(c) (T =⇒ W ) ∧ (U =⇒ S)

(d) V ∨R/ ∴ ¬T ∨ ¬U

6. (a) (A ∨B) =⇒ (C ∧D)

(b) ¬C/ ∴ ¬B

7. Either the Attorney-General has imposed a strict censorship or if Black mailedthe letter he wrote, then Davis received a warning. If our lines of communi-cation have not broken down completely, then if Davis received a warning,then Emory was informed about the matter. If the Attorney-General has im-posed a strict censorship, then our lines of communication have broken downcompletely. Our lines of communication have not broken down completely.Therefore, if Black mailed the letter he wrote, then Emory was informedabout the matter.

2.3 Rule of conditional proof

In an argument, suppose that the conclusion is the implication P =⇒ Q. Toshow the validity of this argument using the rule of conditional proof, we include Pamong the premises and we prove Q instead. This is so, because if

(P1 ∧ P2 ∧ . . . Pn) =⇒ (P =⇒ Q),

is a tautology then using exportation,

(P1 ∧ P2 ∧ . . . Pn ∧ P ) =⇒ Q,

is also a tautology.

7

Example 2.3 Construct a formal proof of validity using the rule of conditionalproof.

1. (a) P =⇒ Q/ ∴ P =⇒ (P ∧Q)

2. (a) (A =⇒ (B =⇒ C)

(b) B =⇒ (C =⇒ D)/ ∴ A =⇒ (B =⇒ D)

3. If you plant tulips then your garden will bloom early and if you plant astersthen your garden will bloom late. So, if you either plant tulips or asters, thenyour garden will bloom either early or late.

2.4 Rule of indirect proof

An indirect proof of an argument is constructed by assuming as an additionalpremise, the negation of the conclusion and then deriving an explicit contradic-tion from the set of premisses. We can do this because of the following:

Consider the argument,

(P1 ∧ P2 ∧ . . . Pn) =⇒ Q,

is a tautology then using martial implication, this argument is equivalent to

¬(P1 ∧ P2 ∧ . . . Pn) ∨Q,

is a tautology then using de Morgan’s, we obtain the equivalent form

¬[(P1 ∧ P2 ∧ . . . Pn) ∧ ¬Q],

is a tautology. This is equivalent to

[(P1 ∧ P2 ∧ . . . Pn) ∧ ¬Q],

is a contradiction, or equivalently

[(P1 ∧ P2 ∧ . . . Pn) ∧ ¬Q] =⇒ 0,

is a tautology. Therefore, we have the equivalent form:

(P1 ∧ P2 ∧ . . . Pn ∧ ¬Q =⇒ φ),

is a tautology, where φ is any contradiction.

Example 2.4 Prove the following arguments using indirect proof.

8

1. (a) A =⇒ (B ∧ C)

(b) (B ∨D) =⇒ E

(c) (D ∨A)/ ∴ E

2. (a) A ∨ (B ∧ C)

(b) A =⇒ C/ ∴ C

3. (a) A/ ∴ B ∨ (B =⇒ C)

Exercise 2.1 Answer the following questions completely.

1. The truth tables for the “exclusive or” ⊕; the Sheffer stroke or hand operator| and the Pierce operator or “nor” operator ↓ is given below:

P Q P ⊕Q P |Q P ↓ Q0 0 0 1 10 1 1 1 01 0 1 1 01 1 0 0 0

(a) Using the truth table, prove or disprove that ⊕, |, ↓ is/are commutative;associative.

(b) Show that

i. P |P ⇐⇒ ¬P ;ii. (P |P )|(Q|Q) ⇐⇒ P ∨Q

iii. (P |Q)|(P |Q) ⇐⇒ P ∧Q

(c) Using only ↓; find equivalent expressions for

i. ¬P ; ii. P ∨Q; iii. P ∧Q

2. Construct a formal proof of validity for the following arguments.

(a) i. (¬H ∨ I) =⇒ (J =⇒ K)ii. (¬L ∧ ¬M) =⇒ (K =⇒ N)

iii. (H =⇒ L) ∧ (L =⇒ H)iv. (¬L ∧ ¬M) ∧ ¬O/ ∴ J =⇒ N

(b) i. (P =⇒ Q) ∧ (R =⇒ S)ii. (Q =⇒ T ) ∧ (S =⇒ U)

iii. (¬P =⇒ T ) ∧ (¬Q =⇒ S)iv. ¬T/ ∴ ¬R ∨ ¬Q

(c) i. (B ∨ C) =⇒ (D ∨ E)ii. [(D ∨ E) ∨ F ] =⇒ (G ∨H)

9

iii. (G ∨H) =⇒ ¬Div. E =⇒ ¬Gv. B/ ∴ H

(d) i. (P =⇒ Q) ∧ (R =⇒ S)ii. P ∨R/ ∴ Q ∨ S

(e) i. (P =⇒ Q) ∧ (R =⇒ S)ii. ¬Q ∨ ¬S/ ∴ ¬P ∨ ¬R

(f) i. (A ∨B) =⇒ (C ∧D)ii. (D ∨ E) =⇒ F/ ∴ A =⇒ F

(g) i. (T =⇒ E) ∧ (A =⇒ L)/∴ (T ∧A) =⇒ (E ∧ L)

(h) If we go to Europe then we tour Scandinavia. If we go to Europe then ifwe tour Scandinavia then we visit Norway. If we tour Scandinavia thenif we visit Norway then we will a trip to a fiord. Therefore, if we go toEurope then we will take a trip on a fiord.

(i) If Argentina joins the alliance then either Brazil or Chile boycotts it. IfEcuador joins the alliance then either Chile or Peru boycotts it. Chiledoes not boycott it. therefore, if neither Brazil nor Peru boycotts it thenneither Argentina nor Ecuador joins the alliance.

10

3 Quantification Theory

3.1 Predicates and Quantifiers

Consider the following obviously valid argument:

All humans are mortalsSocrates is humanTherefore, Socrates is human.

Using the methods which we have discussed, this argument can be translatedas:

MS

∴ H

This translation is incorrect, because the first premise of the given argument is ofa different type of statement from the ones we have discussed. Thus, it should betranslated in a different way.

Two general types of propositions:

1. Compound propositions are propositions which can be expressed as P ∨ Q;P ∧Q; P =⇒ Q and P ⇐⇒ Q;

2. Simple propositions are propositions which are not compound propositions.

Classes of simple propositions:

1. Atomic is a simple proposition which can be understood as attributing a prop-erty to one specific thing or as attributing a relation to two or more specificthings.

Example 3.1 The following are atomic simple propositions:

(a) Socrates is human;

(b) x2 + 3y ≤ z;(c) 2 is an irrational number.

2. General are non-atomic simple propositions.

Example 3.2 The following are general simple propositions:

(a) All humans are mortals.

11

(b) Some real numbers are irrationals.

(c) For all real numbers x, sinx ≥ 0.

Remark 3.1 Any atomic proposition can be broken down into terms and predi-cates. A term is a specific thing which are said to have certain properties or thosethings related to other things. Terms are usually the subjects or objects in a sen-tence. Predicates designates the property or relations to things. Generally, this iswhat is left out of an atomic proposition, when the terms are removed from it. Apredicate may be one place/monadic/unary or many place/polyadic.

To symbolize atomic propositions, it is important to determine what individ-uals/things which have properties or relations and what property or relation thisis/are. We will use lower case English letters to denote the terms and upper caseEnglish letters for the predicates. Thus the atomic propositions given in Example3.1 are symbolized as follows:

1. H(s)

2. L(x, y, z);

3. I(2)

Remark 3.2 In the symbol I(2), if we take x to be any real number, then we cansymbolize the statement “x is an irrational number” by I(x). In here, the symbolI(x) is called a propositional function or what we earlier defined as a predicate– anunary predicate. x is an individual variable which represents an arbitrary element ina collection of terms, called the domain of the variable or the universe of discourse oruniverse. In this example, the universe is R, the set of real numbers. The universeof discourse, denoted by U is a collection of all terms from which the individualvariables must be drawn out.

Definition 3.1 A simple propositional function of n variables, denoted by Φ(x1, x2, . . . , xn)is defined to be an expression consisting of an n-ary predicate symbol such that theexpression becomes a proposition, when its variables are replaced by constants be-longing to its domain. Φ is an uppercase English letter.

Definition 3.2 A propositional function is an expression obtained by using thefollowing rules:

1. Every single propositional function is a propositional function;

2. If P is a propositional function, then ¬P is also a propositional function;

12

3. If P and Q are propositional function, then P ∨ Q, P ∧ Q, P ⇐⇒ Q arepropositional function;

4. Only those expressions obtained by using rules (1.); (2.) or (3.) above a finitenumber of times are propositional functions.

Definition 3.3 Let P (x1, x2, . . . , xn) be a n-ary predicate function.

1. We say that P is valid in U , if P (c1, c2, . . . , cn) is true for all possible choicesof individual symbols (variables or constants) c1, c2, . . . , cn from U .

2. We say that P is satisfiable in U , if P (c1, c2, . . . , cn) is true for some (butnot necessarily all) choices of individual symbols (variables or constants)c1, c2, . . . , cn from U .

Remark 3.3 In order for a proposition function to become a proposition, eachindividual variable must be bound. Variables which are not bounded are called freevariables. There are two ways of binding:

1. by assigning values to variables;

2. by quantification of the variable.

Definition 3.4 If P (x) is a predicate with the individual variable x as an argument,then the assertion:

“For all x, P (x),”

which is interpreted as:

“For all x, the assertion P (x) is true,”

symbolized as :∀xP (x)

is a statement in which the variable x is universally quantified.

Remark 3.4 The symbol ∀ is called the universal quantifier and is read as “forall”, “for every”, “for any”, “for each”. Furthermore, in U , ∀xP (x) is true if andonly if the predicate P is valid in U . Thus, it follows that for the predicate P andany element c in U , the implication:

∀xP (x) =⇒ P (c),

is a true proposition.

13

Example 3.3 Suppose the universe U = Z, the set of integers. The followingpropositions are formed by universal quantification:

1. For all x, x+ 1 > x. In symbols, this is ∀x[x+ 1 > x].

2. For every x, x = 5. In symbols, this is ∀x[x = 5].

Definition 3.5 If P (x) is a predicate with the individual variable x as an argument,then the assertion:

“For some x, P (x),”

which is interpreted as:

“There exists a value x for which the assertion P (x) is true,”

symbolized as :∃xP (x)

is a statement in which the variable x is said to be existentially quantified.

Remark 3.5 The symbol ∃ is called the existential quantifier and is read as: “forsome’, “for at least one”. Furthermore, in U , the assertion ∃xP (x) is true if andonly if P is satisfiable in U . Thus, for any element c in U ,

P (c) =⇒ ∃xP (x),

is a true proposition.

Example 3.4 Suppose the universe U = Z, the set of integers. The followingpropositions are formed by existential quantification:

1. There exists x, x+ 1 > x. In symbols, this is ∃x[x+ 1 > x].

2. For some x, x = 5. In symbols, this is ∃x[x = 5].

Remark 3.6 A third quantification is used to assert that there exists only oneelement in U , that satisfies a certain predicate. This quantifier is denoted by ∃!.Thus, the proposition, there exists a unique x that satisfies P (x) is symbolized as:

∃!xP (x).

Example 3.5 Suppose the universe U = Z, the set of integers.

1. There exists a unique x, x+ 1 > x. In symbols, this is ∃!x[x+ 1 > x].

14

2. There is one and only one x, x = 5. In symbols, this is ∃!x[x = 5].

Example 3.6 Let U = Z−Z−, the set of nonnegative integers and P (x) := [x ≤ 2].The proposition

∀xP (x),

is equivalent toP (0) ∧ P (1) ∧ P (2) ∧ P (3) ∧ . . . .

This has a truth value of false. The proposition

∃xP (x),

is equivalent toP (0) ∧ P (1) ∨ P (2) ∨ P (3) ∨ . . . .

This has a truth value of true. If we restrictt, U = {1, 2, 3}. The proposition

∃!xP (x),

is equivalent to

[P (1) ∧ ¬P (2) ∧ ¬P (3)] ∨ [¬P (1) ∧ P (2) ∧ ¬P (3)] ∨ [¬P (1) ∧ ¬P (2) ∧ P (3)].

This proposition has a truth value of false.

Example 3.7 Consider the equation x = y + z. Let this equation be representedby the predicate

P (x, y, z).

This predicate has three free variables. Let U = R, we may bind the variable z byassigning a value to it, say z = 3. Then, we can rewrite the predicate as

P (x, y, 3).

Furthermore, we can consider an equivalent predicate Q(x, y) defined a x − y = 3.This new predicate contains two free variables. The assertion ∃xP (x, y, z), also hastwo free variables.

Example 3.8 Let U = Z. Determine if the following assertion is true or false.

1. ∀x∃y[x+ y = 0];

2. ∃y∀x[x+ y = 0];

3. ∀x∀y∃!z[x+ y = z];

4. ∀x∃!z∀y[x+ y = z];

15

5. ∃!x[x · 5 = 0];

6. ∃!x∀y[x · y = 0];

7. ∀y∃!x[x · y = 0];

8. ∀y∃!x[x+ y ≤ 0]

Remark 3.7 The order in which individual variables are bounded affects the mean-ing of the assertion, except when ∀x∀y is replaced by ∀y∀x and ∃x∃y is replaced by∃y∃x.

Remark 3.8 It is common practice in Mathematics that leading universal quanti-fiers are deleted. Thus, to assert x+ y = y = x, we mean ∀x∀y[x+ y = y+x]. Thispractice of deleting eating universal quantifiers will be done in the later chapters,but not in this chapter.

Example 3.9 Let U = Z. Let N(x) denote “x is a nonnegative integer,” E(x)denote “x is even,” O(x), denote “x is odd” and P (x) denote “x is prime”. Thefollowing illustrates how assertions are transcribed into logical notations.

1. There exists an even integer. ∃xE(x)

2. Every integer is odd or even. ∀x[E(x) ∨O(x)]

3. All prime integers are nonnegative. ∀x[P (x) =⇒ N(x)]

4. The only even prime is two. ∀x[(E(x) ∧ P (x)) =⇒ x = 2]

5. There is one and only one even prime. ∃!x[E(x) ∧ P (x)]

6. Not all integers are odd. ¬∀xO(x) or ∃x¬O(x)

7. Not all primes are odd. ¬∀x[P (x) =⇒ O(x)] or ∃x[P (x) ∧ ¬O(x)]

8. If an integer is odd, then it is not even. ∀x[¬O(x) =⇒ E(x)]

Remark 3.9 We note that quantifiers do not always appear at he beginning of theassertion. Quantifiers may be in any part of the statement and their placement isimportant.

Example 3.10 Let U = Z. Let P (x, y, z) denote “xy = z.”

1. If x = 0, then xy = x for all values of y. ∀x[x = 0 =⇒ ∀yP (x, y, x)]

2. If xy = x for every y, then x = 0. ∀x[∀yP (x, y, x) =⇒ x = 0]

3. If xy 6= x for some y, then x 6= 0. ∀x[∃y¬P (x, y, x) =⇒ ¬(x = 0)]]

16

3.2 Identities involving quantifiers and quantification rules

The following are some identities involving quantifiers:

1. Quantification Negation:

(a) ¬∃xP (x) ⇐⇒ ∀x¬P (x)

(b) ¬∀xP (x) ⇐⇒ ∃x¬P (x)

(c) ¬∃x[P (x) ∧Q(x)] ⇐⇒ ∀x[P (x) =⇒ ¬Q(x)]

(d) ¬∀x[P (x) =⇒ Q(x)] ⇐⇒ ∃x[P (x) ∧ ¬Q(x)]

2. Additional Identities:

(a) ∃x[P (x) ∨Q(x)] ⇐⇒ [∃xP (x) ∨ ∃xQ(x)]

(b) ∀x[P (x) ∧Q(x)] ⇐⇒ [∀xP (x) ∧ ∀xQ(x)]

(c) In the following identities P has no free occurrence of x

i. ∀x[P ∨Q(x)] ⇐⇒ P ∨ ∀xQ(x)ii. ∃x[P ∧Q(x)] ⇐⇒ P ∧ ∃xQ(x)iii. ∀x[Q(x) =⇒ P ] ⇐⇒ ∃x[Q(x) =⇒ P ]iv. [∃xQ(x) =⇒ P ] ⇐⇒ ∀x[Q(x) =⇒ P ]v. [P =⇒ ∀xQ(x) ⇐⇒ ∀x[P =⇒ Q(x)]vi. [P =⇒ ∃xQ(x)] ⇐⇒ ∃x[P =⇒ Q(x)]

The following are quantification rules:

1. Universal Instantiation (UI):

∀xP (x)∴ P (k)

where k is any element of U .

2. Existential Instantiation (EI)

∃xP (x)∴ P (k)

where k is an element of U , which has no previous occurrence in the proof.

17

3. Existential Generalization (EG)

P (k)∴∴ ∃xP (x)

4. Universal Generalization (UG)

P (k)∴ ∀xP (x)

where k was introduced in the proof not by EI.

Example 3.11 Construct a formal proof of validity for the following arguments:

1. (a) All humans are mortals.

(b) Socrates is human∴ Socrates is mortal.

2. (a) No mortals are perfect.

(b) All humans are mortals.∴ no human are perfect.

3. (a) All dogs are carnivorous.

(b) Some animals are dogs.∴ some animals are carnivorous.

4. (a) ∀x[C(a, x) =⇒ D(x, b)]

(b) ∃xD(x, b) =⇒ ∃yD(b, y)/∃xC(a, x) =⇒ ∃yD(b, y)

5. (a) ∀x[Q(x) =⇒ R(x)]

(b) ∀x[S(x) =⇒ T (x)]

(c) ∀x[R(x) =⇒ S(x)]/ ∴ ∀x[R(x) =⇒ S(x)] =⇒ ∀y[Q(y) =⇒ T (y)]

18

Exercise 3.1 Answer the following questions completely.

1. Let U = Z. Let P (x, y, z) denote xy = z; E(x, y) denote x = y and G(x, y)denote x > y. Transcribe the following into logical notation.

(a) If y = 1, then xy = x, for any x;(b) If xy 6= 0, then x 6= 0 and y 6= 0;(c) 3x = 6 if and only if x = 2;(d) There is no solution to x2 = y unless y ≥ 0;(e) If x < y and z < 0, then xz > yz.

2. Put the following into logical notation. Choose predicates so that each asser-tion requires at least one quantifier.

(a) There is one and only one prime number.(b) No odd numbers are even.

3. Show that the following propositions are valid.

(a) ∀x[P ∨Q(x)] ⇐⇒ P ∨ ∀xQ(x)(b) ∃x[P ∧Q(x)] ⇐⇒ P ∧ ∃xQ(x)

4. Recall the definition of the limit of a function:

Definition 3.6 The limit of f(x) as x approaches a is L, denoted by limx→a f(x) =L, if for every ε > 0, there exists a δ > 0 such that for all x, if |x − a| < δ,then |f(x)− L| < ε.

Transcribe this definition using the appropriate logical notation.

5. Prove the following arguments:

(a) i. ∃xG(x) =⇒ ∃x¬(F (x) ∨ E(x))ii. ∀x[(¬F (x) ∨ ¬E(x)) =⇒ B(x)]iii. ∃x[G(x) ∧M(x) ∧ J(x)]

/ ∴ ∃xB(x)(b) i. ∃xU(x) =⇒ ∀y[(U(y) ∨ V (y)) =⇒ W (y)]

ii. ∃xU(x) ∧ ∃xW (x)/ ∴ ∃x[U(x) ∧W (x)]

(c) i. ∀x[F (x) =⇒ G(x)]ii. ∀x[∃y(H(x, y) =⇒ F (x))]iii. ¬∃xG(x)

/ ∴ ∃x∃y¬H(x, y)

19

4 Methods of Proof

We would like to consider some structures of proofs and strategies for their con-struction. We will describe only the more commonly use methods of proof.

The following are methods in proving the implication P =⇒ Q.

1. Vacuous Proof or Proof by default. This method uses the fact that the impli-cation P =⇒ Q is true when the hypothesis P is false. Thus, in this methodthe proof is constructed by establishing that the truth value of P is false.

2. Trivial Proof. This method uses the fact that the implication P =⇒ Q is truewhen the conclusion Q is true. Thus, in this method the proof is constructedby establishing that the truth value of Q is true.

Remark 4.1 Both the vacuous proof and the trivial proof have limited appli-cability. These two methods are usually use to prove special cases of assertions.

3. Direct Proof. This method shows that the truth value of Q, logically followsfrom the truth value of P . Thus, the proof begins with the assumption that thehypothesis P is true. Then, using whatever information is available, includingpreviously proven theorems, it is shown that Q must be true.

4. Indirect Proof or Proof of the contrapositive. In this method, we consider thefact that

(P =⇒ Q) ⇐⇒ (¬Q =⇒ ¬P ).

Thus, we assume that Q is false. Then, show that P is also false.

Example 4.1 Prove the following statements using the direct proof.

1. If 6x+ 9y = 101, then either x or y is not an integer.

2. Let S be a set of one- and two-digit integers such that each of the digits 0throughout 9 occurs exactly once in the set S. Then, the sum of the elementsof S is divisible by 9. Hint: One such set S is the set S = {1, 20, 34, 56, 78, 9}.

Definition 4.1 A perfect number is an integer which is equal to the sum of all itsdivisors except the number itself. Thus, 6 = 1 + 2 + 3 is a perfect number and28 = 1 + 2 + 4 + 7 + 14 is a perfect number.

Example 4.2 Prove the following statement using the indirect proof: “A perfectnumber is not a prime.”

20

Remark 4.2 For implications of the form:

(P1 ∧ P2 ∧ . . . ∧ Pn) =⇒ Q,

we can use its contrapositive:

¬Q =⇒ (¬P1 ∨ ¬P2 ∨ . . .¬Pn).

To establish this assertion, it is enough to show that

¬Q =⇒ ¬Pi,

for at least one value of i.

Remark 4.3 For implications of the form:

(P1 ∨ P2 ∨ . . . ∨ Pn) =⇒ Q,

we can use its equivalent form:

(P1 =⇒ Q) ∧ (P2 =⇒ Q) ∧ . . . ∧ (Pn =⇒ Q).

This requires us to prove P1 =⇒ Q for all i from 1 to n. This method is calledproof by cases. However, proofs by cases is usually not presented in full. This is so,because, the proofs of some of the cases are similar. Thus, only one case is treatedexplicit for each of the cases which has similar proofs.

Definition 4.2 Let t denote the operation “max” on the set of integers. If a ≥ b,then a t b = b t a = a.

Example 4.3 Show that the binary operation “max” is associative. That is, ifa, b, c are integers, then (a t b) t c = a t (b t c).

Remark 4.4 To prove the logical equivalence P ⇐⇒ Q, we use the fact that

(P ⇐⇒ Q) ⇐⇒ [(P =⇒ Q) ∧ (Q =⇒ P )].

Thus the separate implications

1. P =⇒ Q (called the “only if” part or “necessity”) and

2. Q =⇒ P (called the “if” part or the “sufficiency”)

21

are proven. Another way of proving P ⇐⇒ Q is by starting with a true assertion ofthe form P ⇐⇒ R1. Proceeding through a sequence of “if and only if” statementsof the form Ri ⇐⇒ Ri+1, i = 2, 3, . . . , n− 1. Until the last statement Rn ⇐⇒ Qis obtained.

Example 4.4 Prove the following statement: “For all integers x, x is even if andonly if x2 is even.

Remark 4.5 To establish the truth of proposition P , we can also use the proof bycontradiction or the reduction ad absurdum. In this method P is assumed to befalse and then a contradiction is obtained, such as Q ∧ ¬Q. This is equivalent toproving the implication

¬P =⇒ (Q ∧ ¬Q).

This is equivalent to(¬Q ∨Q) =⇒ P.

Since the premise of this implication is true and we have shown that the implicationis true, it follows that P is true.

Example 4.5 Prove that: “There is no largest prime.”

Example 4.6 Consider the following definitions and properties of integers.

1. An integer n is even if and only if n = 2k for some integer k.

2. An integer n is odd if and only if n = 2k + 1 for some integer k.

3. A real number r is rational if there exists two integers p and q, where q 6= 0,such that r = p

q .

4. The product of two nonzero integers is positive if and only if the integers havethe same sign.

5. For every pair of integers x and y exactly one of the following three statementshold:

(a) x < y (b) x = y (c) x > y

6. For integers x and y.

22

(a) If x > y, then x− y is positive;(b) If x = y, then x− y = 0;

(c) If x < y, then x− y is negative.

Prove or disprove the following assertions. Let U = Z.

1. An integer is odd if its square is odd.

2. The sum of two even integers is even.

3. There are two odd integers whose sum is odd.

4. There is some prime number whose square is even.

5. There does not exists an integer x such that x2 + 1 is negative.

6. For any two integers x and y either x− y or y − x is nonnegative.

7. If 1 = 3, then the square of any integer is negative.

8. The sum of any two primes is a prime number.

9. There exists two primes whose sum is a prime.

10.√

2 is irrational.

References:

1. Copi, Irvine. Symbolic Logic. Macmillan, New York. 1967

2. Diesto, Severino. Lecture Notes in Discrete Mathematics

3. Pinter. Set Theory, Addison-Wesley Publishing Co., USA, 1971

4. Stanat, Donald & McAllister, David. Discrete Mathematics for ComputerScience, Prentice Hall, New Jersey, 1977

23