0% found this document useful (0 votes)
4 views

1. Logic

The document covers foundational concepts in mathematical logic, specifically focusing on propositions, logical connectives, and quantifiers. It defines propositions, explains logical connectives such as conjunction, disjunction, implication, and equivalence, and introduces quantifiers like existential and universal. Additionally, it discusses the negation of propositions and the importance of order when using quantifiers.

Uploaded by

Imba Tonk
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)
4 views

1. Logic

The document covers foundational concepts in mathematical logic, specifically focusing on propositions, logical connectives, and quantifiers. It defines propositions, explains logical connectives such as conjunction, disjunction, implication, and equivalence, and introduces quantifiers like existential and universal. Additionally, it discusses the negation of propositions and the importance of order when using quantifiers.

Uploaded by

Imba Tonk
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/ 39

CALCULUS 1

Mathematical
Logic

CALCULUS I
HELENA ALMEIDA, JOÃO FARINHA, PATRÍCIA XUFRE, PEDRO CHAVES

2
CALCULUS 1

Agenda

1. Definition of Proposition.
2. Logical Connectives and Truth Tables.
3. Quantifiers.

3
CALCULUS 1

1. Definition of proposition
A proposition is a statement that is, by itself, either true (T) or False (F).

These are NOT propositions:

“How far away do you live from Nova SBE?”


“Make sure you arrive there on time!”
“Please keep off the grass!”
“Salmon is a beautiful colour!”

4
CALCULUS 1

Examples of propostions:

“Dakar is the capital of Senegal.”


“If today is Friday, tomorrow is Sunday.”
“My team will win the championship.”
“There is a God.”

The statements are either true or false!

5
CALCULUS 1

2. Logical Connectives and Truth Tables


Consider two propositions, represented by the propositional variables 𝑝 and 𝑞 .

𝑝∧𝑞 𝑝∨𝑞 𝑝⇒𝑞 𝑝⇔𝑞 ~𝑝


Conjunction Disjunction Implication Equivalence Negation

6
CALCULUS 1

𝒑∧𝒒
2.1 Conjunction of 𝒑 and 𝒒 (write 𝒑 ∧ 𝒒, read 𝒑 AND 𝒒)
What is the truth value of the compound statement 𝒑 ∧ 𝒒 ?

Truth table

The conjunction 𝒑 ∧ 𝒒 is TRUE only if BOTH 𝑝 and 𝑞 are TRUE.

7
CALCULUS 1

𝒑∨𝒒
2.2 Disjunction of 𝒑 and 𝒒

We write 𝑝 ∨ 𝑞 . We read 𝑝 OR 𝑞 .

• 𝑝 ∨ 𝑞 is true if at least one of 𝑝 or 𝑞 are true.


• Both propositions 𝑝 and 𝑞 must be false, for

proposition 𝑝 ∨ 𝑞 to be false (inclusive OR).

8
CALCULUS 1

Quiz
Click the Quiz button to edit this object

8
CALCULUS 1

𝒑⇒𝒒
2.3 Implication (if 𝒑, then 𝒒 )

It is a relationship between two propositions 𝒑 and 𝒒 in which the


second is a logical consequence of the first. It is denoted by 𝒑 ⇒ 𝒒.
𝑝 is called the antecedent, while 𝑞 is called the consequent.

Whenever 𝒑 ⇒ 𝒒, we say that:

“𝑝 is a sufficient condition for 𝑞”


and that
“𝑞 is a necessary condition for 𝑝”

10
CALCULUS 1

𝒑: ”It is raining.”
Example:
𝒒: ”I carry an umbrella.” PROMISE

𝒑 ⇒ 𝒒: ”If it is raining, then I will carry an umbrella”

• Raining is a sufficient condition for carrying an umbrella.


• Carrying an umbrella does not create rain, carrying an umbrella is a
necessary condition for raining.

10
CALCULUS 1

𝒑 ⇒ 𝒒 is true 𝒑 ⇒ 𝒒 is false

11
CALCULUS 1

2.3 Implication (if 𝒑, then 𝒒): truth table

12
CALCULUS 1

𝒑⇔𝒒
2.4 Equivalence between 𝒑 and 𝒒

The equivalence between two propositions 𝑝 and 𝑞 is written as 𝒑 ⇔ 𝒒.


It reflects a double implication: we have simmultaneously that 𝑝 ⇒ 𝑞
and 𝑞 ⇒ 𝑝.

𝑝⇔𝑞 ⇔ 𝑝⇒𝑞∧𝑞 ⇒𝑝

• 𝑝 is a necessary and sufficient condition for 𝑞 and


• 𝑞 is a necessary and sufficient condition for 𝑝.

13
CALCULUS 1

Example:

𝒑: ”This triangle has 3 equal sides.”


𝒒: ” This triangle has 3 equal angles.”

𝒑⇔𝒒

Knowing that the triangle has 3 equal sides is a necessary and


sufficient condition for that triangle having 3 equal angles (and
vice-versa).

14
CALCULUS 1

2.4 Equivalence between 𝒑 and 𝒒 : truth tables

An equivalence between two


propositions is true if and only if
both propositions have the same
logical value. It is false if and only
if they have distinct logical values.

15
CALCULUS 1

2.4 Equivalence between 𝒑 and 𝒒 : more examples

𝑝: “9 is a multiple of 3”.
𝑞 : “Portugal belongs to the EU”.

𝑝: “Dogs have four legs”.


𝑞 : “Nova SBE has only international students”.

16
CALCULUS 1

Useful equivalences involving conjunctions and disjunctions of


propositions:

Consider three propositions 𝒑, 𝒒 and 𝒔 .

𝟏. 𝒑∧𝒒 ∨𝒔⇔ 𝒑∨𝒔 ∧ 𝒒∨𝒔

2. 𝒑∨𝒒 ∧𝒔⇔ 𝒑∧𝒔 ∨ 𝒒∧𝒔

17
CALCULUS 1

~𝒑
2.5 Negation of 𝒑
It is the opposite of proposition 𝑝 and is represented by ~𝑝 (read “not p”),
sometimes represented by ¬𝑝.

If 𝑝 is true, ~𝑝 is false and if 𝑝 is false, ~𝑝 is true.

~ ~𝑝 ⇔ 𝑝

Let´s learn to say NO…

18
CALCULUS 1

Examples:

𝒑: “𝑒 0 is an irrational number”
~𝒑: “𝑒 0 is NOT an irrational number”

𝒒: “𝑥 > 0”
~𝒒: “𝑥 ≤ 0”

19
CALCULUS 1

~ 𝒑∧𝒒
2.5.1 Negation of a conjunction

The De Morgan laws state that:

~ 𝒑 ∧ 𝒒 ⇔ ~𝒑 ∨ ~𝒒

(the negation of a conjunction is the disjunction of the negations)

20
CALCULUS 1

Example:
𝒑: ” Next year I will visit Japan”
𝒒: ” Next year I will visit Australia”
𝒑 ∧ 𝒒: ” Next year I will visit Japan and Australia”

~ 𝒑 ∧ 𝒒 ⇔ ~𝒑 ∨ ~𝒒: “ Next year I won’t visit Japan or Australia”

or or

21
CALCULUS 1

~ 𝒑∨𝒒
2.5.2 Negation of a disjunction

The De Morgan laws state as well that:

~ 𝒑 ∨ 𝒒 ⇔ ~𝒑 ∧ ~𝒒

(the negation of a disjunction is the conjunction of the negations)

22
CALCULUS 1

Example:
𝒑: ” Next year I will visit Japan”
𝒒: ” Next year I will visit Australia”
𝒑 ∨ 𝒒: ” Next year I will visit Japan or Australia”

~ 𝒑 ∨ 𝒒 ⇔ ~𝒑 ∧ ~𝒒: “ Next year I won’t visit Japan nor Australia”

23
CALCULUS 1

~ 𝒑⇒𝒒
2.5.3 Negation of an implication

~ 𝑝⇒𝑞 ⇔𝑞⇒𝑝
Common
mistakes! ~ 𝑝 ⇒ 𝑞 ⇔ ~𝑝 ⇒ ~𝑞
~ 𝑝 ⇒ 𝑞 ⇔ ~𝑞 ⇒ ~𝑝

~ 𝒑 ⇒ 𝒒 ⇔ 𝒑 ∧ ~𝒒

24
CALCULUS 1

𝒑: ”It is raining.”
𝒒: ”I carry na umbrella.”
𝒑 ⇒ 𝒒: ”If it is raining, (then) I will carry an umbrella”

~ 𝒑 ⇒ 𝒒 ⇔ 𝒑 ∧ ~𝒒
Negate that “if it rains, I will carry an umbrella”, is equivalent to
stating that “it is raining, and I am not carrying an umbrella”!!

25
CALCULUS 1

Exercise: show that ~ 𝒑⇔𝒒 ⇔ 𝒑 ∧ ~𝒒 ∨ (𝒒 ∧ ~𝒑)

~ 𝒑⇔𝒒

⇔~ 𝑝⇒𝑞∧𝑞 ⇒𝑝

⇔~ 𝑝 ⇒𝑞 ∨~ 𝑞 ⇒𝑝

⇔ 𝑝 ∧ ~𝑞 ∨ 𝑞 ∧ ~𝑝

26
CALCULUS 1

Useful equivalences…

Contrapositive
𝒑 ⇒ 𝒒 ⇔ ~𝒒 ⇒ ~𝒑

𝒑 ⇒ 𝒒 ⇔ 𝒒 ∨ ~𝒑

27
CALCULUS 1

Using truth tables to establish equivalences

𝒑 ⇒ 𝒒 ⇔ (~𝒒 ⇒ ~𝒑) ⇔ (𝒒 ∨ ~𝒑)

28
CALCULUS 1

Example 𝒑: ”I am in New York.”


𝒒: ”I am in the USA.”

𝒑⇒𝒒 If I am in New York, then I am in the USA

~𝒒 ⇒ ~𝒑 If I am not in the USA, then I am not in New York

𝒒 ∨ ~𝒑 I am either in the USA or I am not in New York or both

29
CALCULUS 1 Quiz
Click the Quiz button to edit this object

30
CALCULUS 1

3. Quantifiers
∃ is the existential quantifier. We read “there is” or “there is at least one”.

∃𝑥 ∈ 𝐷 ∶ 𝑝(𝑥)

We read this proposition as:


“There is one x, element of D, for which the statement or property p is true”.

31
CALCULUS 1

Examples
∃𝒙 ∈ ℝ: −𝒙 = −𝟏

− 𝟒
∃𝒙 ∈ ℤ : 𝒙 = 𝟏𝟔

32
CALCULUS 1

3. Quantifiers
∀ is the universal quantifier. We read “for all” or “for every”.

∀𝑥 ∈ 𝐷: 𝑝(𝑥)

We read this proposition as:


“For all 𝑥 in D, the statement or property 𝑝 is true”.

33
CALCULUS 1

Examples
∀𝒙 ∈ ℝ− 𝒙 = −𝒙

∀𝒙 ∈ ℕ 𝒙 < 𝟔

34
CALCULUS 1

Order of quantifiers
Order matters when using both existential and universal
quantifiers! Let us look at the cases below.

35
CALCULUS 1

Negating expressions with quantifiers


~ ∃𝑥 ∈ 𝐷 ∶ 𝑝(𝑥) ⇔ ∀𝑥 ∈ 𝐷 , ~ 𝑝(𝑥)
𝑨 : ”There is a country with no cases of virus X.”
~𝑨 : ”Every country has at least one case of virus X.”

~ ∀𝑥 ∈ 𝐷, 𝑝(𝑥) ⇔ ∃𝑥 ∈ 𝐷: ~ 𝑝(𝑥)
B : ”In every mall the most visited area is the restauration area.”
~B : ”There is (at least one) mall where the most visited are is
NOT the restauration area.”

36
CALCULUS 1

Negating expressions with two quantifiers


~ ∀𝑥 ∈ 𝐷, ∃𝑦 ∈ 𝑆: 𝑝(𝑥) ⇔ ∃𝑥 ∈ 𝐷: ∀𝑦 ∈ 𝑆 , ~𝑝(𝑥)

𝑪 : ” Every semester there is a student with a final grade above 17 in


Calculus 1.”

~𝑪 : ” There was (at least) one semester when every student had a
final grade not higher than 17”

37
CALCULUS 1

Negating expressions with two quantifiers


~ ∃𝑥 ∈ 𝐷 ∶ ∀𝑦 ∈ 𝑆, 𝑝(𝑥) ⇔ ∀𝑥 ∈ 𝐷, ∃𝑦 ∈ 𝑆: ~𝑝(𝑥)

𝑫 : ” There is at least a zoo in the world


where every bear is brown.”
~𝑫 : ” In every zoo in the world, there is at
least one bear that is not brown.”

38

You might also like