Chapter 1 (Logic, sets and maps) (1) (3)
Chapter 1 (Logic, sets and maps) (1) (3)
B Coordination SM-ST of
Chapter I.
Faculty of Mathematics MATH 1 Module
Logic, Sets and Maps
1st year Licence SM-ST Academic year 2023-2024
I) Logic
Logic enables us to model and study mathematical reasoning.
1) Definitions
I Proposition : We call proposition a statement or expression that can be true or false. Every
proposition has a truth value T (true) or F (false)..
Example 1.
I Lemma : We call lemma any true proposition preparatory to the establishment of a theorem of greater
importance.
2) Logical connectives
Logical connectives are used to define other propositions from one or more initial propositions. Let P and
Q be two propositions, defined by :
I Negation : The negation of a proposition P is the proposition, denoted P , which is true when P is
false and false otherwise.
Example 3. P : 3 is an even number (F), P : 3 is not an even number (T).
I Conjunction : The conjunction of two propositions P and Q is the proposition (P and Q), denoted
(P ∧ Q), which is true if P and Q are both true at the same time. It is false otherwise. This is summarized
in the following truth table :
P Q P∧Q
T T T
T F F
F T F
F F F
Example 4. 2 divides 9 and 136 is a multiple of 17. (F)
1
I Disjunction : The disjunction of two propositions P and Q is the proposition (P or Q), denoted
(P ∨ Q), which is true if at least one of the two propositions are true. It is false otherwise. This is
summarized in the following truth table :
P Q P∨Q
T T T
T F T
F T T
F F F
Example 5. 2 divides 9 or 136 is a multiple of 17. (T)
I Implication : The proposition P implies Q, denoted (P ⇒ Q), is the proposition which is false when
P is true and Q is false. It is true otherwise.
In other words, it is the proposition (P ∨ Q).
P Q P ⇒Q
T T T
T F F
F T T
F F T
√
Example 6. 2 × 2 = 6 ⇒ 3 = 1. (T) (If P is false then P ⇒ Q is always true)
Remark. From the implication (P ⇒ Q), we define :
• The implication (Q ⇒ P ), called converse of the implication (P ⇒ Q).
• The implication (Q ⇒ P ), called contrapositive of the implication (P ⇒ Q).
• The negation (P ⇒ Q) is the proposition (P ∧ Q).
2
3) Quantifiers
Let P (x) the proposition dependant on the element x of a set E. We write
• ∀x ∈ E, P (x) : when the proposition P is true for all the elements x ∈ E.
∀, which can be read whatever or for all, is called universal quantifier.
• ∃x ∈ E, P (x) : when there exists at least an element x of the set E for which the proposition P is
true.
∃, which can be read there is at least one, is called existential quantifier.
• ∃ ! x ∈ E, P (x) : when there exists a unique element x of the set E for which the proposition P is
true.
There is jointly existence and uniqueness of the element x verifying the proposition P .
Example 10.
1. ∀x ∈ [0, +∞[, x2 ≥ 0 (T)
2. ∀x ∈ R, x2 ≥ 4 (F)
3. ∃n ∈ N, n2 − n > n (T) (n=3, n=10, n=100).
4. ∃x ∈ R, x2 = −4 (F) (no squared real will give a negative numbe).
5. ∃!n ∈ N, n2 − n > n (F)
Remak.
• We can find propositions that depend on two quantifiers.
For example : ∀x ∈ R, ∃y > 0, x + y > 10.
• The order of quantifiers is very important. Consider the following two propositions:
∀x ∈ R, ∃y ∈ R, y > x and ∃x ∈ R, ∀y ∈ R, y > x.
The first is true and the second is false. Indeed, in the first case, you can always find a number
greater than a given real number, because R is not bounded. For the second, however, you can’t find
a real number that’s smaller than all the others, because R has no lower bound.
4) Modes of reasoning
Here is some mode of reasoning in mathematics.
3
4.2 Contrapositive
The reasoning by contrapositive is based on the following equivalence:
(P ⇒ Q) ⇔ (Q ⇒ P ).
So if we want to show P ⇒ Q, we just need to show Q ⇒ P .
Example 14. Let n ∈ N. Let’s show that if n2 is even then n is even.
First, let’s write the contrapositive: If n isn’t even, then n2 isn’t even.
It is assumed that n is not even. We want to show that n2 is not even. Since n is not even, it is odd and
so there exists k ∈ N such that n = 2k + 1. Then
n2 = (2k + 1)2 = 4k 2 + 4k + 1 = 2l + 1 with l = 2k 2 + 2k ∈ N.
. And so n2 is odd.
Therefore, by contraposition, this is equivalent to: if n2 is even then n is even.
4.3 Contradiction
Reasoning by contradiction to show that a proposition P is true is based on the following principle : We
assume that P is true and look for a contradiction. Thus, if P is false, this means that P must be true.
Example 15. Let’s show the following proposition: 0 has no inverse in R. Let’s reason by the absurd, i.e.
suppose 0 admits an inverse in R.
1
Then ∃x0 ∈ R : 0 = 0 ⇒ 0.x0 = 1 ⇒ 0 = 1. Which is absurd, so 0 has no inverse in R.
x
4.4 Counter-example
This mode of demonstration is used to show that a proposition of the form: For any x in E, P (x) is false.
To do this, we need only show that its negation is true, which means that: If there exists x in E, P (x) is
true.
Example 16. Let’s show the following proposition ∀x ∈ R, x2 + 1 = 0 is false.
It suffices to show that its negation is true, i.e. ∃x ∈ R, x2 + 1 6= 0 is true. For x = 1, x2 + 1 = 2 6= 0 is
true. So the proposition ∀x ∈ R x2 + 1 = 0 is false.
4.5 Induction
The principle of induction makes it possible to show that a proposition P (n), depending on n, is true for
all n ∈ N. Demonstration by induction involves three steps:
Initialization: we show that P (0) is true.
Heredity : Assume that P (n) is true for a given n ≥ 0 and show that the assertion at the next rank
P (n + 1) is true.
The conclusion: Recall that the induction principle P (n) is true for all n ∈ N.
Remark. If we need to show that a proposition is true for all n ≥ n0 then we start the initialization at
rank n0 .
Example 17. Let’s show that : ∀n ∈ N, 2n > n.
For n ≥ 0, let’s denote P (n) the following assertion: 2n > n.
We’ll show by induction that P (n) is true for all n ≥ 0.
Initialization: For n = 0 we have 20 = 1 > 0 so P (0) is true.
Heredity: Set n ≥ 1. Assume that P (n) is true and show that P (n + 1) is true.
2n+1 = 2 · 2n
= 2n + 2n
> n + 2n car 2n > n
> n + 1 car 2n ≥ 1
So P (n + 1) is true.
Conclusion : by the induction principle of P (n) is true for each n ≥ 0, i.e. 2n > n ∀n ≥ 0.
4
II) Sets
Definition 1. Set
A set is a collection of objects, these objects are called the elements of the set.
If a is an element of a set E, we write a ∈ E and read a belongs to E or a is an element of E.
If a is not an element of E, write a ∈ / E and read a does not belong to E.
• Sets are generally designated by capital letters: E, F, A, B, · · · . Elements are generally designated by
small letters: a, b, x, y, · · · .
• We admit the existence of a set denoted ∅, called empty set, which contains no elements.
• A set reduced to a single element a is denoted {a}. It is called singleton.
• The set E is said to be included in the set F (or contained in F ) if every element of E is an element
of F . We also say that E is a part or subset of F . We write E ⊂ F . By definition
(E ⊂ F ) ⇔ (∀x, x ∈ E ⇒ x ∈ F )
• We say that the set E is equal to the set F and we denote E = F if we have E ⊂ F and F ⊂ E.
• If E is a set and P a proposition true for some elements of E, the set of elements of E that verify
the proposition P is a subset of E often denoted as follows:
{x ∈ E : P (x) } or {x ∈ E | P (x)}
5
1) Set Operations
Definition 4. Union
We call union (or gathering) of two sets E and F and we denote E ∪ F , the set of the elements x where
x ∈ E or x ∈ F . So we have
E ∪ F = {x : x ∈ E or x ∈ F }.
Definition 5. Intersection
We call the intersection of two sets E and F and we denote E ∩ F , the set of all elements x such that
x ∈ E and x ∈ F . So we have
E ∩ F = {x : x ∈ E and x ∈ F }.
If E ∩ F = ∅ we say that E and F are disjointed.
Definition 6. Difference
The difference of two sets E and F is the set form of the elements of E that do not belong to F . The
difference between E and F (in this order), denoted by E \ F , is given by :
E \ F = {x : x ∈ E et x ∈
/ F }.
2) Properties
Let A, B, C be three parts of a set E.
1. A ∩ B = B ∩ A, A ∩ (B ∩ C) = (A ∩ B) ∩ C, A ∪ B = B ∪ A, A ∪ (B ∪ C) = (A ∪ B) ∪ C.
2. A ∩ ∅ = ∅, A ∩ A = A, A ⊂ B ⇔ A ∩ B = A, A ∪ ∅ = A, A ∪ A = A, A ⊂ B ⇔ A ∪ B = B.
3. A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C), A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C).
3) Cartesian product
Let E and F be two sets. We call the cartesian product of E and F and we denote E × F , the set of
pairs (x, y) such that x ∈ E and y ∈ F .
E × F = {(x, y) : x ∈ E and y ∈ F }
Example 20.
1. R2 = R × R = {(x, y) : x, y ∈ R}
2. [0, 1] × R = {(x, y) : 0 ≤ x ≤ 1, y ∈ R}
III) Maps
1) Definitions and examples
Definition 7. Map
Let E and F be two sets. A map f from E to F is a correspondence that associates any element x from
E with a unique element y from F , noting f (x). In other words,
∀x ∈ E, ∃! y ∈ F, f (x) = y
6
Example 21.
1. √
f1 : R+ → R, x 7→ x, f2 : R → R, x 7→ sin x.
2. We call the identity map of a set E and we denote IdE or 1E , the map which to every x ∈ E makes
x correspond to itself. By definition, we have :
IdE (x) = x for any x in E
is Γ = {(a, α), (b, α), (c, β), (d, β), (e, δ)}.
Definition 9. Equality
Let f and g be two maps such that f, g : E → F . We say that f and g are equal if and only if for every x
in E, f (x) = g(x). denoted by f = g.
7
2. We call inverse image of B by f which is denoted by f −1 (B), the set of x ∈ E where f (x) ∈ B
and we have :
f −1 (B) = {x ∈ E : f (x) ∈ B}
f (∅) = ∅, f −1 (∅) = ∅, f −1 (F ) = E
Definition 11. Let be f : E → F and g : F → G so g ◦f : E → G is the map defined by g ◦f (x) = g(f (x))
for any x in E.
Example 24. Let’s take E = F = G = R and f (x) = cos x, g(x) = x2 + 1.
We have : (g ◦ f )(x) = g(f (x)) = cos2 x + 1 and (f ◦ g)(x) = f (g(x)) = cos(x2 + 1).
Theorem 1. Let f : E → F , g : F → G, h : G → H be three maps. So we have
(h ◦ g) ◦ f = h ◦ (g ◦ f ).
2. We say that f is surjective (or a surjection) if for every y ∈ F , there exists x ∈ E such that
y = f (x). In other words
∀y ∈ F, ∃ x ∈ E y = f (x).
3. We say that f is bijective if it is both injective and surjective. That is, for any y ∈ F , there exists
a unique x ∈ E such that y = f (x). In other words:
∀y ∈ F, ∃ ! x ∈ E y = f (x).
8
Remark 3. Another way of formulating injectivity and surjectivity is to use antecedents.
• f is injective if and only if every element y of F has at most one antecedent (and possibly none).
The notions of injectivity, surjectivity and bijectively of a map are represented as follows:
Example 25.
1
1. Let f : N → Q defined by f (x) = . Let’s show that f is injective:
x+1
1 1
Let x1 , x2 ∈ N be such that f (x1 ) = f (x2 ). Then = i.e. x1 + 1 = x2 + 1 so x1 = x2 . So
x1 + 1 x2 + 1
f is injective. However, it is not surjective. The task is to find an element y that has no antecedent
by f . Here, it’s easy to see that we always have 0 < f (x) ≤ 1 and so, for example, y = 0 has no
antecedent.
2. Let g : Z → N defined by g(x) = x2 . Then g is not injective. Indeed, we can find two different
elements x1 and x2 in Z such that g(x1 ) = g(x2 ). Just take for example x1 = 2, x2 = −2. g is not
surjective either, in fact there are y ∈ N elements which have no antecedent. For √
example, y = 3. If
2
y = 3 had an antecedent x by g, we will have g(x) = y i.e. x = 3, hence x = ± 3. But then x is
not an integer from Z. So y = 3 has no antecedent and g is not surjective.
Example 26. Let g be the map defined from R to R by f (x) = 5x − 7. Its inverse bijection is g(y) =
7+y
f −1 (y) = .
5
Proposition 1. Let f : E → F and g : F → G be two bijections. Then g ◦ f : E → G is a bijection and
its inverse mapping is the map f −1 ◦ g −1 i.e. (g ◦ f )−1 = f −1 ◦ g −1 .