0% found this document useful (0 votes)
87 views51 pages

Chap1 Propositional Logic HT 2

Uploaded by

phamgiakhanh0709
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)
87 views51 pages

Chap1 Propositional Logic HT 2

Uploaded by

phamgiakhanh0709
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/ 51

DISCRETE MATHEMATICS

&
APPLICATIONS

1
Chapter 1: Propositional Logic

1.1. Propositional Logic

1.2. Propositional Equivalences

1.3. Predicates and Quantifiers

1.4. Nested Quantifiers

1.5. Rules of Inference

2
1.1
Propositional Logic

3
DEFINITION

Definition. A proposition is a declarative sentence that is either true or false.

Examples. (1) If 𝑥 is divisible by 6 then 𝑥 is divisible by 3.

(2) 1 is the smallest prime number.

(3) After rain comes sunshine!

(4) 𝑥 + 2 > 0.

(5) For every 𝑥 ∈ ℝ, if 𝑥 + 3 ≥ 𝑎 and 𝑎 ≤ 1 then 𝑥 ≥ −2.

Convention. If a proposition 𝑝 is true then we say that its truth value is true (denoted by 𝑇).

Otherwise, we will say that the truth value of 𝑝 is false (denoted by 𝐹).

4
COMPOUND PROPOSITIONS
Definition. Let 𝑝 be a proposition.
(1) The negation of 𝑝:

¬𝑝 = not 𝑝 = proposition that is true if 𝑝 is false, and is false if 𝑝 is true.


Example. 𝑝 = "She is not only naughty but also obstinate".

¬𝑝 = "She is neither naughty nor obstinate".

5
COMPOUND PROPOSITIONS
Let 𝑝 and 𝑞 be two propositions.
(2) The conjunction of 𝑝 and 𝑞:

𝑝 ∧ 𝑞 = "𝑝 and 𝑞" = proposition that is true when both 𝑝 and 𝑞 are true, and is false otherwise.
Example. Let 𝑝 = "She is very naughty", 𝑞 = "She is not obstinate".

𝑝 ∧ 𝑞 = "She is very naughty but not obstinate".

6
COMPOUND PROPOSITIONS (cont.)

Let 𝑝 and 𝑞 be two propositions.

(3) The disjunction of 𝑝 and 𝑞:

𝑝 ∨ 𝑞 = "𝑝 or 𝑞"= proposition that is false when both 𝑝 and 𝑞 are false, and is true otherwise.

Example. 𝑝 = "Students who have missed more than 6 slots can not pass this class".

𝑞 = "Students who have not taken any progress test can not pass this class".
𝑝 ∨ 𝑞 = "Students who have not taken any progress or have missed more than 6 slots can not pass this class.

7
COMPOUND PROPOSITIONS (cont.)
Let 𝑝 and 𝑞 be two propositions.
(4) The exclusive or of 𝑝 and 𝑞:
𝑝 ⊕ 𝑞 = "only 𝑝 or only 𝑞" = proposition that is true when exactly one of 𝑝 and 𝑞 is true, and is false
otherwise.
Example. 𝑝 = "You can adopt a cat".
𝑞 = "You can adopt a hamster".
𝑝 ⊕ 𝑞 = "You can adopt a cat or a hamster, but not both".

8
COMPOUND PROPOSITIONS (cont.)
Let 𝑝 and 𝑞 be two propositions.

(5) Conditional statement:

𝑝 ⟶ 𝑞 = "if 𝑝 then 𝑞" = proposition that is false when 𝑝 is true and 𝑞 is false, and is true

otherwise.

Example. 𝑝 = "You get a 9 on the final exam".

𝑞 = "You will pass this class".

9
COMPOUND PROPOSITIONS (cont.)
Let 𝑝 and 𝑞 be two propositions.

(6) Biconditional statement:

𝑝 ⟷ 𝑞 = proposition that is true when 𝑝 and 𝑞 have the same truth value, and is false otherwise.

Example. 𝑝 = "He is now at least 18 years old".

𝑞 = "He is allowed to get married this year".

10
SUMMARY
Remark. A bit is a symbol taking two values, 0 and 1. A bit can represent the truth value of a
proposition:
1 = 𝑇𝑟𝑢𝑒 and 0 = 𝐹𝑎𝑙𝑠𝑒.

Table. Combined truth table using bit operations.

11
LOGICAL EXPRESSIONS
Example. Translate the following propositions into logical expressions.
(1) When I am over 25, I will marry her.
Put 𝑝 = "I am over 25 years old",
𝑞 = "I marry her".
Then logical expression of (1) is 𝑝 ⟶ 𝑞.

(2) I would marry Daisy or Kate when I am rich and famous.


Put 𝑝 = "I am rich" , 𝑞 = "I am famous"
𝑟 = "I marry Daisy" and 𝑠 = "I marry Kate".
Then logical expression of (2) is (𝑝 ∧ 𝑞) ⟶ (𝑟 ⊕ 𝑠).

12
1.2
Propositional Equivalences

13
LOGICAL EQUIVALENCES

Definition. (1) A compound proposition that is always true, no matter what the truth values of
propositions that occur in it, is called a tautology.
(2) A compound proposition that is always false is called a contradiction.
(3) A compound proposition that is neither a tautology nor a contradiction is called a contigency.

Definition. Two compound propositions are said to be (logically) equivalent if (𝑝 ⟷ 𝑞) is a


tautology.
If 𝑝 and 𝑞 are equivalent, we will write
𝑝 ≡ 𝑞.

14
SOME BASIC LOGICAL EQUIVALENCES

15
LOGICAL EQUIVALENCES - TRUTH TABLE METHOD
In practice, one can verify logical equivalences using truth tables.

Example. Prove that ¬(𝑝 ⊕ 𝑞) ≡ (¬𝑝 ∨ 𝑞) ∧ (𝑝 ∨ ¬𝑞).

𝑝 𝑞 𝑝⊕𝑞 ¬(𝑝 ⊕ 𝑞) (¬𝑝 ∨ 𝑞) ∧ (𝑝 ∨ ¬𝑞)


0 0
0 1
1 0
1 1

16
PRACTICE
Verify the following logical equivalences.
(a) 𝑝 ⟶ 𝑞 ≡ ¬𝑝 ∨ 𝑞 ≡ (¬𝑞) ⟶ (¬𝑝).
(b) 𝑝 ⟷ 𝑞 ≡ 𝑝⟶𝑞 ∧ 𝑞⟶𝑝 .
(c) ¬(𝑝 ⊕ 𝑞) ≡ (¬𝑝 ∨ 𝑞) ∧ (𝑝 ∨ ¬𝑞).
(d) 𝑝 ⊕ 𝑞 ≡ ¬ 𝑝 ⟷ 𝑞 .
(e) ¬ 𝑝 ⟶ 𝑞 ≡ 𝑝 ∧ ¬𝑞.

17
1.3
Predicates and Quantifiers

18
PREDICATE

Statements involving variables such as


"𝑥 > 3", "𝑥 + 𝑦 ≤ 5", "𝑥 + 𝑦 = 𝑧"
are not propositions. Such statements are called propositional function.

Example. Consider 𝑃 𝑥 = "𝑥 > 3". For specified values of 𝑥, then it becomes a proposition. For
instance, 𝑃 1 = 𝐹𝑎𝑙𝑠𝑒 and 𝑃 4 = 𝑇𝑟𝑢𝑒.

Remark. In 𝑃 𝑥 , the symbol "𝑥" is called variable and the part " > 3" is called predicate.

19
QUANTIFIERS: ∀, ∃
Let 𝑃(𝑥) be a propositional function.
∎ Universal quantification:
∀𝑥𝑃 𝑥 = "For all values of 𝑥, 𝑃(𝑥) is true".
∎ Existential quantification:
∃𝑥𝑃(𝑥) = "There is at least a value of 𝑥 such that 𝑃(𝑥) is true".

20
LOGICAL EXPRESSIONS WITH QUANTIFIERS

Example. For each of the following statements, find a logical expression using quantifiers and
propositional functions.
(1) "Every prime number is not divisible by 2".

Solution. First, introduce a variable 𝑥:


"For every number 𝑥 that is prime, 𝑥 is not divisible by 2".
Next, put 𝑃 𝑥 = "𝑥 is not divisible by 2".
With the domain 𝐷 = 𝑝𝑟𝑖𝑚𝑒 𝑛𝑢𝑚𝑏𝑒𝑟𝑠 , we find the logical expression
∀𝑥𝑃 𝑥 .

21
(2) "Some student in HT’s class has visited Thach That district".
Solution. First, introduce a variable 𝑥:
"There is a student 𝑥 in HT’s class with the property that 𝑥 has visited Thach That district".
Next, put 𝑃 𝑥 = "𝑥 has visited Thach That district".
With the domain 𝐷 = {students in HT’s class}, we find the logical expression
∃𝑥𝑃 𝑥 .

(3) "Every student of FPT University has visited Thach That and Quoc Oai".
Solution.

22
1.4
Nested Quantifiers

23
NESTED QUANTIFIERS

Exercise. Translate the following statements into English, where the domain of variables is ℝ.
a) ∀𝑥∃𝑦𝑃 𝑥, 𝑦 where 𝑃 𝑥, 𝑦 = "𝑥 < 𝑦".
b) ∃𝑥∀𝑦𝑄 𝑥, 𝑦 where 𝑄 𝑥, 𝑦 = "𝑥 + 𝑦 ≥ 𝑦".
c) ∀𝑥∀𝑦𝑅 𝑥, 𝑦 where 𝑅 𝑥, 𝑦 = "[(𝑥 ≥ 0) ∧ (𝑦 ≥ 0)] ⟶ (𝑥𝑦 ≥ 0)".

24
LOGICAL EXPRESSIONS WITH NESTED QUANTIFIERS

Examples. For each of the following statements, find a logical expression using quantifiers and
propositional functions.

(1) "Some student of FPT University gave flowers to all female students".

Solution. First, introduce two variables 𝑥 and 𝑦:


"There is a student 𝑥 of FPT University gave flower to all students 𝑦 that are female".
Next, put 𝑃 𝑥, 𝑦 = "𝑥 gave flower to 𝑦" and 𝑄 𝑦 = "𝑦 is female".
With the domain 𝐷 = {students of FPTU}, we find the logical expression
∃𝑥∀𝑦 𝑄 𝑦 ⟶ 𝑃 𝑥, 𝑦 .

25
(2) "If a person is female and is a parent, then this person is someone’s mother".
Solution. First, introduce two variables 𝑥 and 𝑦:
"For every person 𝑥, if 𝑥 is female and 𝑥 is a parent, then there is a person 𝑦 such that 𝑥 is the
mother of 𝑦".
Next, put 𝑃 𝑥, 𝑦 = "𝑥 is the mother of 𝑦", 𝑄 𝑥 = "𝑥 is female"
and 𝑅 𝑥 = "𝑥 is a parent".
With the domain 𝐷 = {all people}, we find the logical expression
∀𝑥∃𝑦 𝑄 𝑥 ∧ 𝑅 𝑥 ⟶ 𝑃 𝑥, 𝑦 .

26
NEGATING NESTED QUANTIFIERS
(1) ¬ ∀𝑥𝑃 𝑥 ≡ ∃𝑥¬𝑃(𝑥). (2) ¬ ∃𝑥𝑃 𝑥 ≡ ∀𝑥¬𝑃(𝑥).

(3) ¬ ∀𝑥∀𝑦𝑃 𝑥, 𝑦 ≡ ∃𝑥∃𝑦¬𝑃(𝑥, 𝑦). (4) ¬ ∃𝑥∀𝑦𝑃 𝑥, 𝑦 ≡ ∀𝑥∃𝑦¬𝑃(𝑥, 𝑦).

(5) ¬ ∃𝑥∃𝑦𝑃 𝑥, 𝑦 ≡ ∀𝑥∀𝑦¬𝑃(𝑥, 𝑦). (6) ¬ ∀𝑥∃𝑦𝑃 𝑥, 𝑦 ≡ ∃𝑥∀𝑦¬𝑃(𝑥, 𝑦).

27
1.5
Rules of Inference

28
AN EXAMPLE
Example. Suppose we have an argument:
"If you have one million dollars, then you can buy a villa".
Put 𝑝 = "You have one million dollars" and 𝑞 = "You can buy a villa".
How do we deduce that 𝑞 is true provided 𝑝 is true?
Observe that 𝑝 ∧ 𝑝 ⟶ 𝑞 ⟶ 𝑞 is a tautology.
Now, since both 𝑝 and 𝑝 ⟶ 𝑞 are true, it implies that 𝑞 must be true also.

∎ In summary, the process of inference can be depicted as

29
DEFINITIONS

Definition. (1) An argument is a sequence of propositions


𝑝1 , 𝑝2 , ⋯ , 𝑝𝑛 , 𝑞.
The final proposition 𝑞 is called the conclusion, while 𝑝1 , ⋯ , 𝑝𝑛 are called premises.
(2) An argument is said to be valid if the truth of all premises implies that the conclusion is true.
(3) The verification of validity must be based on a tautology. Otherwise, arguments are called
fallacies.

30
TABLE: RULES OF INFERENCES

31
Example. Show that the following premises
"If you send me an email, then I will finish writing the program",
"If you do not send me an email, then I will go to sleep early",
"If I go to sleep early, then I will wake up feeling refreshed"
together lead to the conclusion
"If I do not finish writing the program, then I will wake up feeling refreshed".
Solution. Put 𝑝1 = "You send me an email", 𝑝2 = "I will finish writing the program",
𝑝3 = "I will go to sleep early", 𝑝4 = "I will wake up feeling refreshed".
𝑞 = (¬𝑝2 ⟶ 𝑝4 ).

32
TABLE: RULES OF INFERENCES FOR QUANTIFIED STATEMENTS

33
EXAMPLE
Example. Show that the following premises
𝑝1 = "Everyone in this class has taken a course in computer science",
𝑝2 = "Jillian is a student in this class"
together lead to the conclusion "Jillian has taken a course in computer science".

Solution. 𝑃 𝑥 = "𝑥 has taken a course in computer science".


With domain 𝐷 = students in this class , the logical expression of 𝑝1 is ∀𝑥𝑃 𝑥 .
Put 𝑐 = Jillian, we have 𝑐 ∈ 𝐷.
The inference is

34
PRACTICE

35
PRACTICE

36
PRACTICE

37
PRACTICE

38
PRACTICE

39
PRACTICE

40
PRACTICE

41
PRACTICE

42
PRACTICE

43
PRACTICE

44
45
46
47
48
49
50
51

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy