Chapter 1
Chapter 1
Definition 1.1:
A proposition is a sentence that is either true or false, but not both at the same time.
Example:
The sentences:
Are assertions.
While the sentences:
Definition 1.2:
Note:
Definition 1.3 (Negation). Let P be a proposition, the negation of P is a proposition denoting the
opposite, which we denote as ¬P (~P or 𝑃̅). Here is its truth table.
1
Dr. Aouail Nouria University Center of
Naama
Mathematics I: Logic and reasoning 2024/2025
P ¬P
T F
F T
2) Logical connective:
To build up a complex statement, we use operators called logical connective (logical operators).
2.1) Conjunction <and˃:
Conjunction is the logical operator: and denoted “˄”. The proposition (P and Q) or (P ∧Q) is the
conjunction of the two propositions P and Q.
P Q P∧Q
T T T
T F F
F T F
F F F
Table 1: the truth table of P ∧ Q.
Example:
Disjunction is the logical operator: or denoted “∨”, the proposition (P or Q) i.e., (P ∨ Q) is the
disjunction of the two propositions P and Q.
2
Dr. Aouail Nouria University Center of
Naama
Mathematics I: Logic and reasoning 2024/2025
P Q P˅Q
T T T
T F T
F T T
F F F
Table 1: the truth table of P ˅ Q.
Example:
The implication of two propositions P and Q is denoted as P→Q, we say P implies Q or if P then
Q.
Example:
P Q P→Q
T T T
T F F
F T T
F F T
¬P Q ¬P ˅ Q
F T T
F F F
T T T
T F T
Example:
3
Dr. Aouail Nouria University Center of
Naama
Mathematics I: Logic and reasoning 2024/2025
The equivalence of two propositions P and Q is denoted as P↔Q, we can also write (P → Q) and
(Q → P).
We say that:
P Q P↔Q
T T T
T F F
F T F
F F T
Example:
3) Quantifiers:
Keep in mind that "x is an integer" is not a proposition. This is because various values for x alter
the statement's truth. Such a sentence is called an open sentence or predicate. However, using
variables in our statements is highly beneficial, thus our reasoning need to be able to account for
it. In order to do this, we present quantifiers.
A quantifier is a symbol which states how many instances of the variable satisfy the sentence.
4
Dr. Aouail Nouria University Center of
Naama
Mathematics I: Logic and reasoning 2024/2025
The assertion “∀ 𝒙 ∈ 𝑬, 𝑷(𝒙)” is true when the proposition 𝑷(𝒙) is true for all values of x
belong to E.
Example:
- ∀ 𝑥 ∈ ℝ, 𝑥 2 ≥ 0 . is true.
- ∀ 𝑥 ∈ ℝ, 𝑥 2 ≥ 1. Is false.
- ∀ 𝑥 ∈ ℝ, 𝑥 ≤ 𝑥 2 . Is False
The assertion “ ∃ 𝒙 ∈ 𝑬, 𝑷(𝒙)”, is true when it is possible to find at least one element 𝒙 ∈ 𝑬, in
order for P(x) to be true.
Example:
- ∃ 𝑥 ∈ ℝ, 𝑥 2 ≥ 0 . is true.
- ∃ 𝑥 ∈ ℝ, 𝑥 2 ≥ 1. Is true.
- ∃ 𝑥 ∈ ℝ, 𝑥 ≤ 𝑥 2 . Is true
Example:
5
Dr. Aouail Nouria University Center of
Naama
Mathematics I: Logic and reasoning 2024/2025
II) Reasoning:
how can we prove an implication?
1- Direct proof:
Is used commonly to prove statements of the form: 𝑃 → 𝑄. By using this type of proof, we:
Example:
𝑎+𝑏
1) Prove that: 𝑎 = 𝑏 → = 𝑏.
2
- We assume that a=b is true.
𝑎 𝑏
- 𝑎=𝑏→ =2
2
𝑎 𝑏 𝑏 𝑏
→ +2=2+2
2
𝑎+𝑏
→ ⏟2 = 𝑏.
𝑄
𝑎+𝑏
So, the statement 𝑎 = 𝑏 → = 𝑏 is true.
2
3) Prove that, for any odd integer 𝑛, the number 2𝑛2 + 5𝑛 + 4 must be odd.
- We assume that n is odd which means that n=2p+1, where 𝑝 ∈ ℤ.
- We must find that 2𝑛2 + 5𝑛 + 4 is an odd, which means that 2𝑛2 + 5𝑛 + 4 = 2𝑙 + 1,
where 𝑙 ∈ ℤ.
- 𝑛 = 2𝑝 + 1 → 2𝑛2 + 5𝑛 + 4 = 2(2𝑝 + 1)2 + 5(2𝑝 + 1) + 4, 𝑝 ∈ ℤ
→ 2𝑛2 + 5𝑛 + 4 = 2 (4𝑝
⏟ 2 + 9𝑝 + 5) + 1, 𝑝 ∈ ℤ
𝑙
6
Dr. Aouail Nouria University Center of
Naama
Mathematics I: Logic and reasoning 2024/2025
→ 2𝑛2 + 5𝑛 + 4 = 2l + 1, 𝑙 ∈ ℤ
So, the statement: for any odd integer 𝑛, the number 2𝑛2 + 5𝑛 + 4 must be odd, is true.
2- Contrapositive proof:
Example:
3𝑛 + 7 𝑖𝑠 𝑎𝑛 𝑜𝑑𝑑 𝑖𝑛𝑡𝑒𝑔𝑒𝑟 → ⏟
1) Prove that: ⏟ 𝑛 𝑖𝑠 𝑎𝑛 𝑒𝑣𝑒𝑛 𝑖𝑛𝑡𝑒𝑔𝑒𝑟.
𝑃 𝑄
- The contrapositive form of the previous assertion is:
𝑛 𝑖𝑠 𝑎𝑛 𝑜𝑑𝑑 𝑖𝑛𝑡𝑒𝑔𝑒𝑟 → ⏟
⏟ 3𝑛 + 7 𝑖𝑠 𝑎𝑛 𝑒𝑣𝑒𝑛 𝑖𝑛𝑡𝑒𝑔𝑒𝑟
¬𝑄 ¬𝑃
- We assume that 𝑛 𝑖𝑠 𝑎𝑛 𝑜𝑑𝑑 𝑖𝑛𝑡𝑒𝑔𝑒𝑟, is true.
- 𝑛 𝑖𝑠 𝑜𝑑𝑑 → 𝑛 = 2𝑘 + 1, 𝑘 𝜖 ℤ
→ 3𝑛 + 7 = 3(2𝑘 + 1) + 7, 𝑘 𝜖 ℤ
= 6𝑘 + 10, 𝑘 𝜖 ℤ
= 2(3𝑘
⏟ + 5) , 𝑘 𝜖 ℤ.
𝑚
= 2𝑚, , 𝑚 𝜖 ℤ.
→ 3𝑛 + 7 𝑖𝑠 𝑎𝑛 𝑒𝑣𝑒𝑛 𝑖𝑛𝑡𝑒𝑔𝑒𝑟
the assertion 𝑛
⏟𝑖𝑠 𝑎𝑛 𝑜𝑑𝑑 𝑖𝑛𝑡𝑒𝑔𝑒𝑟 → 3𝑛
⏟ + 7 𝑖𝑠 𝑎𝑛 𝑒𝑣𝑒𝑛 𝑖𝑛𝑡𝑒𝑔𝑒𝑟 is true, then
¬𝑄 ¬𝑃
3𝑛 + 7 𝑖𝑠 𝑎𝑛 𝑜𝑑𝑑 𝑖𝑛𝑡𝑒𝑔𝑒𝑟 → ⏟
⏟ 𝑛 𝑖𝑠 𝑎𝑛 𝑒𝑣𝑒𝑛 𝑖𝑛𝑡𝑒𝑔𝑒𝑟
𝑃 𝑄
𝑥 2 − 6𝑥 + 5 𝑖𝑠 𝑒𝑣𝑒𝑛 → ⏟
2) Prove that: ⏟ 𝑥 𝑖𝑠 𝑜𝑑𝑑
𝑃 𝑄
- The contrapositive form of the previous assertion is: ⏟ 𝑥 2 − 6𝑥 + 5 𝑖𝑠 𝑜𝑑𝑑
𝑥 𝑖𝑠 𝑒𝑣𝑒𝑛 → ⏟
¬𝑄 ¬𝑃
- We assume that: 𝑥 𝑖𝑠 𝑒𝑣𝑒𝑛 → 𝑥 = 2𝑛, 𝑛 𝜖 ℤ.
→ 𝑥 2 − 6𝑥 + 5 = (2𝑛)2 − 6(2𝑛) + 5, 𝑛 𝜖 ℤ.
7
Dr. Aouail Nouria University Center of
Naama
Mathematics I: Logic and reasoning 2024/2025
→ 𝑥 2 − 6𝑥 + 5 = 2 (2𝑛
⏟ 2 − 6𝑛 + 2) + 1, 𝑛 𝜖 ℤ.
𝑘
2
→ 𝑥 − 6𝑥 + 5 = 2𝑘 + 1, 𝑘 𝜖 ℤ.
3- Proof by contradiction:
To prove that a statement R is true, we begin by assuming R false, and show that this leads to
contradiction.
R: 𝑃 → 𝑄
Example:
2) Prove that the sum of a rational number and an irrational number is irrational.
-Suppose that the sum of a rational number and an irrational number is rational.
8
Dr. Aouail Nouria University Center of
Naama
Mathematics I: Logic and reasoning 2024/2025
𝒑
- The first rational number can be expressed as 𝒒, where p and q are co-prime integers. Let the
𝒓
irrational number be a. Their sum can be expressed as 𝒔, where r and s are co-prime integers.
Then:
𝒑 𝒓
+𝒂=
𝒒 𝒔
𝒑
Subtracting 𝒒 from both sides of this equation gives
𝒓 𝒑
𝒂= −
𝒔 𝒒
𝑞𝑟 − 𝑝𝑠
𝑎=
𝑞𝑠
A counterexample is a form of proof. To prove that a statement of the form ∀𝑥, 𝑃(𝑥) is false, we
need to find an element x such that P(x) is false. In other words, we disprove the given assertion.
Example:
9
Dr. Aouail Nouria University Center of
Naama
Mathematics I: Logic and reasoning 2024/2025
This method allows us to show that an assertion P(n), depending on n, is true for all 𝑛 ∈ 𝑁. It
can be done by following these steps:
Example:
2𝑛+1 > 𝑛 + 1
3 𝑑𝑒𝑣𝑖𝑑𝑒𝑠 𝑛3 − 𝑛 → 𝑛3 − 𝑛 = 3𝑘, 𝑘 ∈ ℕ.
= 𝑛(𝑛 + 1)(𝑛 + 2)
= 𝑛3 + 3𝑛2 + 2𝑛
= (𝑛3 − 𝑛) + 3𝑛2 + 3𝑛
⏟+ 𝑛2 + 𝑛)
= 3(𝑘
𝑙
= 3𝑙, 𝑙 ∈ ℕ
10
Dr. Aouail Nouria University Center of
Naama
Mathematics I: Logic and reasoning 2024/2025
Exercises
Exercise N° 1:
1) Are the following propositions True or False:
• ∀(𝑥, 𝑦) ∈ ℝ2 , (𝑥 + 𝑦 = 0) → (𝑥 = 0 ˄ 𝑦 = 0)
• ∀ 𝑥 ∈ ℝ, 𝑥 ≤ 𝑥 2 .
25 5
• (6 < ) → (√6 < 2)
4
• ∀𝑥 ∈ ℝ, (𝑥 ≤ 0) → (𝑥 − 1 < 0)
1 1
• ∀ (𝑥, 𝑦) ∈ ℝ2 , ( 𝑥𝑦 ≠ 0 ˄ 𝑥 ≤ 𝑦) → (𝑦 ≤ 𝑥)
|𝑥 + 𝑦| ≤ |𝑥| + |𝑦|
• ∀(𝑥, 𝑦) ∈ ℝ2 , {
|𝑥 − 𝑦| ≥ |𝑥| − |𝑦|
Exercise N° 2:
Use the truth table to check the validity of the following propositions:
1) 𝑃 ↔ ¬(¬𝑃).
2) ¬(𝑃˄𝑄) ↔ (¬𝑃˅¬𝑄).
3) ¬(𝑃˅𝑄) ↔ (¬𝑃˄¬𝑄).
4) ¬(𝑃 → 𝑄) ↔ 𝑃˄¬𝑄.
5) (𝑃 → 𝑄)˄(¬𝑃 → 𝑄).
6) ¬(𝑃˄¬(𝑄˄𝑅)) ↔ 𝑄.
7) ((𝑃˅𝑄) → 𝑅) ↔ (𝑃 → 𝑅)˄(𝑄 → 𝑅).
Exercise N° 3:
Prove the following propositions:
11