Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
23 views

Part1 Logic and Part2 Function

Uploaded by

nadjib0320
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

Part1 Logic and Part2 Function

Uploaded by

nadjib0320
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Some general Mathematical concepts and Notations

M.Anssour; A.Dib; S.Hamidi


October 7, 2024

Part I
Introduction to mathematical logic
1 Propositional Calculus
1.1 Definition
Definition: A proposition is a declarative sentence (or statement) that can be true (T) or false
(F) but not both at the same time.

Notation We use capital letters to denote a proposition ; for example: P , Q or R...

"T" stands for "true".


"F" stands for "False".
T and F are called truth values of P .

Examples
1. "2 is a natural number": is a proposition (simple).
1
2. " is an irrational number": is proposition.
2
3. " Where are you?": is not a proposition.
4. "Close the door": is not a proposition.

1.2 Logical connectives (Propositional connectives)


1.2.1 Logical negation or negation

Definition: Let P be a proposition; "not" P , denoted P , is a proposition which has the


following truth table:
P P
T F
F T

1
1.2.2 Logical Disjunction

Definition: The disjunction of P and Q, denoted P ∨ Q, is a proposition which has the


following truth table:
P Q P ∨Q
T T T
T F T
F T T
F F F

P ∨ Q is read P or Q.

1.2.3 Logical conjunction

Definition: The conjunction of P and Q, denoted P ∧ Q, is a proposition which has the


following truth table:
P Q P ∧Q
T T T
T F F
F T F
F F F

P ∧ Q is read P and Q.

1.2.4 Logical implication

Definition: Let P and Q be propositions; we denote by P =⇒ Q a proposition whose


truth table is as follows:

P Q P =⇒ Q
T T T
T F F
F T T
F F T

Remark
1. P =⇒ Q is read "if P then Q ".
2. P is called assumption ; Q is called conclusion.

Definition:

1 The proposition Q =⇒ P is called the converse of P =⇒ Q .

2 The proposition Q =⇒ P is called the contrapositive of de P =⇒ Q.

2
1.2.5 Logical equivalence

Definition: Let P and Q propositions.


We designe by P ⇐⇒ Q a proposition whose truth table is as follows:

P Q P ⇐⇒ Q
T T T
T F F
F T F
F F T

P ⇐⇒ Q is read P if and only if Q or P is equivalent to Q.

1.3 Tautology

Definition: Tautology is a compound proposition which is true for every truth value of the
individual propositions.

Examples Prove that these propositions are tautologies:

1. (P ⇐⇒ Q) ⇐⇒ ((P =⇒ Q) ∧ (Q =⇒ P ))
Denote this proposition α; then construct its truth table.

P Q P =⇒ Q Q =⇒ P (P =⇒ Q) ∧ (Q =⇒ P ) P ⇐⇒ Q α
T T T T T T T
T F F T F F T
F T T F F F T
F F T T T T T

All the truth values of α are true then α is tautology.

2. (P =⇒ Q) ⇐⇒ (Q =⇒ P )
Denote this proposition β; construct its truth table.

P Q P =⇒ Q Q =⇒ P β
T T T T T
T F F F T
F T T T T
F F T T T

All the truth values of β are true then α is tautology.

Remark Let α and β be compound propositions;


α ⇐⇒ β is a tautology if and only if α and β have the same truth values.

1.4 Exercice
Prove that these propositions are tautologies:

1. P ⇐⇒ P

3
2. (P =⇒ Q) ⇐⇒ (Q =⇒ P )
 
3. (P =⇒ Q) ⇐⇒ P ∨Q .
 
4. P =⇒ Q ⇐⇒ P ∧Q .
 
5. P ∧ Q ⇐⇒ P ∨Q . De Morgan’s laws
 
6. P ∨ Q ⇐⇒ P ∧Q . De Morgan’s laws

7. (P ⇐⇒ Q) ⇐⇒ ((P =⇒ Q) ∧ (Q =⇒ P ))

8. (P ∧ Q) ⇐⇒ (Q ∧ P ), ∧ is commutative

9. (P ∨ Q) ⇐⇒ (Q ∨ P ) , ∨ is commutative

10. (P ∧ (Q ∨ R)) ⇐⇒ ((P ∧ Q) ∨ (P ∧ R)), ∧ is distributif with respect to ∨

11. (P ∨ (Q ∧ R)) ⇐⇒ ((P ∨ Q) ∧ (P ∨ R)), ∨ is distributif with respect to ∧

1.5 Logical equivalence


If two propositions P and Q have the same truth values , they are called logically equivalent
and we denote this by P ≡ Q.

Remark
1. Warning : ≡ is not a connective.
2. We can prove that P ≡ Q if and only if P ⇐⇒ Q is a tautology.

2 Quantified expression
2.1 Introduction to Predicate calculus

Definition: In literature, a predicate is the part of sentence that tells us something about
the subject. It contains the verb.

Exemple
1. The lighthouse was damaged in the storm.
"was damaged in the storm" is the prédicat".
2. Birds are chirping outside the windows .
"are chirping outside the windows" is the predicat.

Definition:In mathematics, a predicate is a statement that contains variables and it may


be true or false depending on the values of theses variables.
The domain of a predicate variable is the set ,E, of all values that may be subtituted for the
variables.

4
Examples

1. E = The set of real numbers..


P (x) :" x > 5".
For x = 1 ,P (1) is false.
For y = 7 ,P (7) is true.

2. E = the set of integers.


P (x, y) :" x + y is odd".
P (2, 6) is false.
P (3, 4) is true.

2.2 Quantifiers
2.2.1 Universal quantifier

The universal quantifier is denoted ∀ , it is read "for all" or "for every" or "for each" .
Let D be a non empty set, and a predicate P (x)

∀x ∈ D P (x)

is a proposition which is true if and only if P (x) is true for all values of x in D.
∀x ∈ D P (x) means every x in D has property P .

Example

D=R.

P (x) :" x + 1 > x".

∀x ∈ R P (x) is a true proposition.

Remark

1. (∀x ∈ D P (x)) is false if and only if we find a value of x in D that P (x) is false.

2. An element x0 in D for which P (x0 ) is false is called a counterexample of ∀x ∈


D P (x).

2.2.2 Existential quantifier

Existential quantifier is denoted ∃ , it is read "there exists" or "there is" or "for at least
one" .
Let D be a non empty set, and a predicate P (x)

∃x ∈ D P (x)

is a proposition which is true if and only if there is an x for which P (x) is true .

Example

5
1. D = R.
P (x) :" x > 0".
∃x ∈ R P (x) is true proposition.
2. E = N
Q(x, y) :" x divides y".
∃x ∈ N∗ ∀y ∈ N∗ Q(x, y) is a true proposition.
Remark
∃x ∈ D P (x) is false if and only if P (x) is false for every x in D.

2.2.3 Negating quantified expression

∗ The negation of ∀x ∈ E P (x) is ∃x ∈ E P (x)

∗ The negation of ∃x ∈ E P (x) is ∀x ∈ E P (x)

Example Prove that these propositions are true:


1. ∀x ∈ R x2 + x + 1 > 0.
2. ∀x ∈ Q ∀y ∈ Q (x + y) ∈ Q.

3 Analysing proof techniques

3.1 Direct Proof


Let P and Q be two particular propositions, we want to prove that P =⇒ Q is true; for that ,
we assume that P is true and use axioms, definitions, and previously proven theorems to show
that Q must also be true.

Example Use the direct proof to show that ∀n ∈ Z (n is odd =⇒ n2 is odd)


Suppose n ∈ Z (a particular but arbitrarily chosen element in Z) and n is odd.
Then n = 2a + 1 for some a ∈ Z, by definition of an odd number. Thus n2 = (2a + 1)2 =
4a2 + 4a + 1 = 2 (2a2 + 2a) + 1. So n2 = 2b + 1 where b is the integer (2a2 + 2a).
Thus n2 = 2b + 1 for an integer b.
Therefore n2 is odd, by definition of an odd number.

3.2 Proof by contrapositive

To prove that P =⇒ Q is true , we prove that Q =⇒ P is true since P =⇒ Q and


Q =⇒ P are logically equivalent .

Example : Prove that  


∀n ∈ N n2 is even =⇒ n is even

6
3.3 Proof by contradiction

The general structure of a proof by contradiction is:


To show that P is true

assume P is false.

Show that P being false implies something that cannot be true.

Conclude therefore that P is true.


Example Prove that 2 is irrational.

3.4 Proof by induction


We want to prove that ∀n ≥ n0 P (n) is true .
For that we use the proof by induction. Steps for induction method :

1. Basic step of induction : Show it is true for n0 .

2. Induction step: Show that if the statement is true for n = k , where k denotes any value
of n , then it must be true for n = k + 1.

3. Conclusion: The statement is true for all integral values of n equal to or greater than n0 .

Part II
function
4 Functions
4.1 Definition and Notations

Let E and F be non empty sets, a function from E to F is a rule that assigns for each
element x in E exactly one element y in F .
We write
f : E −→ F
x 7−→ f (x) = y

Notation if f : E −→ F is a function then

• E is called the domain of f , we denote it Df .

• F is called the codomain of f .

• if y = f (x) then

7
∗ y is called image of x by f .
∗ x is called preimage of y by f .
1. The set {f (x) | x ∈ E} is called the range of f .

Figure 1: Examples of functions

Example

1. In the figure 1 , we say :


7 is the image of 1 by f and 1 is a preimage of 7 by f .
The domain of f is {1, 2, 3} and the range of f is {0, 7, 1}.

2. In the figure 2, f and g are not functions.

Example

x
(a) Let h be a function defined by h(x) = . Give the domain of h .
−1 x2
Dh = {x ∈ R | x ≥ 0 et (x − 1) 6= 0} = R+ − {1}
2

(b) Let k be a function defined by k(x) = ln x. Give the domain of k .


Dk = R∗+ .

Figure 2: Exemples of non function

4.2 Identity function

8
Definition Let E be a non empty set.
The identity function on the set E , denoted idE or iE , is defined by:

idE : E −→ E
x 7−→ idE (x) = x

4.3 Graph of function

Definition Let f : E −→ F be a function.


the graph of f denoted Gf , is defined by:

Gf = {(x, y) ∈ E × F | y = f (x)} .

Example In the figure 1:


Gf = {(1, 7), (2, 0), (3, 1)}.
Gg = {(1, 0), (2, 0)}.

4.4 Equality of functions

Let E, F , G , H be sets (non empty) ;


and let f : E −→ F and g : G −→ H be functions
We say that f is identically equal to g, denoted by f ≡ g, if and only if


 E=G
and
f (x) = g(x) ∀x ∈ E

4.5 Image and Preimage

Let f : E −→ F be a function; and E 0 a non empty subset of E, F 0 a non empty


subset of F .

∗ The set {f (x) | x ∈ E 0 } is called the image of E 0 by f or direct image of E 0 by


f , denoted f (E 0 ).

∗ f (E) is called the range of the function f .

∗ The set {x ∈ E | f (x) ∈ F 0 } is called the preimage of F 0 under f or the


inverse image of F 0 under f , denoted f −1 (F 0 ) .

Example

1. In the figure 1, we have:

9
(a) f −1 ({0}) = {2}; f −1 ({1}) = {3}
(b) g −1 ({0, 7}) = {1, 2}; g −1 ({0, 7}) = ∅
2. Let f be the function defined by f : R −→ R such that f (x) = x2
Give: f −1 ({0}); f −1 ({1}); f −1 ({−1}).

Remark If f is the function from E to F then f −1 (F ) = E and f (E) ⊂ F .

4.6 Restriction of function

Definition Let f : E −→ F be a function and E 0 a non empty subset of E, The


restriction of f to E 0 , denoted f|E0 ,is the function defined by:

f|E 0 : E 0 −→ F
x 7−→ f|E0 (x) = f (x)

Example Let f the function defined by


f : R −→ R
x 7−→ f (x) = |x|

The restriction of f to R+ denoted f|R+ is defined as follows:


f|R+ : R+ −→ R
x 7−→ f|R+ (x) = |x| = x

4.7 Composition of functions

Definition Let E, F and G be non empty sets;and


f : E −→ F and g : F −→ G two functions.
We define the composition of f and g, denoted g ◦ f , the function defined by

g ◦ f : E −→ G
x 7−→ g ◦ f (x) = g(f (x))

we schematise the composition of f and g by this diagram:


F
% &
E G
x g(f (x)) = g ◦ f (x)

Example
f : R∗ −→ R∗+ f (x) = |x|
g : R∗+ −→ R g(x) = lnx
We have
g ◦ f : R∗ −→ R
x 7−→ g ◦ f (x) = g(f (x)) = ln(|x|)

10
5 Bijection
5.1 Injectivity

Definition A function f : E −→ F is injective if and only if

∀x, x0 ∈ E (x 6= x0 =⇒ f (x) 6= f (x0 ))

equivalently:
∀x, x0 ∈ E (f (x) = f (x0 ) =⇒ x = x0 )
that means: Two different elements in E have two different images by f in F .

Example

1. The function f in the figure 1 is injective.

2. Show that the function f : R −→ R , f (x) = 2x + 1 is injective.


Let x, x0 ∈ R such that f (x) = f (x0 ) we have

f (x) = f (x0 ) =⇒ 2x + 1 = 2x0 + 1


=⇒ 2x = 2x0
=⇒ x = x0

therefore f is injective.

Remark f is not injective if and only if

∃x, x0 ∈ E such that f (x) = f (x0 ) and x 6= x0

Example

1. Is the function f : R −→ R defined by f (x) = x2 injective?


Let x, x0 ∈ R be such that f (x) = f (x0 )

f (x) = f (x0 ) =⇒ x2 = x02


=⇒ x2 − x02 = 0
=⇒ (x − x0 )(x + x0 ) = 0
=⇒ x = x0 ou x = −x0

We have proved that: if f (x) = f (x0 ) then x = x0 or x = −x0 .


Hence we can not conclude that f is injective.

∃x = 1, x0 = −1 ∈ R such that f (1) = 1 = f (−1) and 1 6= −1.


therefore f is not injective.

11
5.2 Surjectivity

Definition A function f : E −→ F is surjective if and only if

∀y ∈ F ∃x ∈ E such that y = f (x)

Remarque
1. f is surjective if and only if each element of F is at least an image of an element of E.
2. f is not surjective if and only if
∃y ∈ F such that ∀x ∈ E y 6= f (x).

Example
1. Prove that the function f : R −→ R defined by f (x) = 2x + 1 is surjective.
Given y in R , we want to find x ∈ R | y = f (x)
Therefore we resolve the equation y = f (x) :
y−1
y = f (x) ⇐⇒ 2x + 1 = y ⇐⇒ x =
2
y−1
x= ∈ R is a solution, therefore f is surjective.
2
Theoreme 5.2.1 Let f : E −→ F a function
f is surjective ⇐⇒ f (E) = F.
Proof 5.2.1 We prove that
f is surjective =⇒ f (E) = F (1)
and
f (E) = F =⇒ f is surjective (2)
Let us prove (1) :
Suppose that f is surjective and prove that f (E) = F
It is clear that f (E) ⊂ F , it remains to prove that F ⊂ f (E) :
Suppose y ∈ F , we search x ∈ E such that y = f (x)
f surjective =⇒ ∃x ∈ E such that y = f (x)
=⇒ F ⊂ f (E)
Conclusion 1: F ⊂ f (E) and f (E) ⊂ F therefore f (E) = F .
Let us prove (2) :
Suppose that f (E) = F and prove that f is surjective
Let y be in F , we search x in E such that y = f (x)
y∈F and f (E) = F =⇒ y ∈ f (E)
=⇒ ∃x ∈ E such that y = f (x)
=⇒ f is surjective.
Conclusion 2: f (E) = F =⇒ f surjective

12
5.3 Bijectivity

Definition A function f : E −→ F is bijective if and only if f is both injective


and surjective.

Example The function f : R −→ R defined by f (x) = 2x+1 is injective and surjective


therefore f is bijective.

Remark A function f : E −→ F is not bijective if and only if f f is not injective or f is


not surjective.

Theoreme 5.3.1 Let f : E −→ F be a function

f est bijective ⇐⇒ ∀y ∈ F ∃!x ∈ E such that y = f (x).

Proof 5.3.1 We prove that


f est bijective =⇒ ∀y ∈ F ∃!x ∈ E | y = f (x) (3)
and
∀y ∈ F ∃!x ∈ E | y = f (x) =⇒ f is bijective (4)
Let us prove (3) Let y ∈ F , search x ∈ E such that x is unique and let’s check that:
y = f (x).
Prove the existence of x
f bijective =⇒ f surjective
=⇒ ∃x ∈ E | y = f (x)

therefore, we proved the existence of x such that y = f (x).


Prove the unicity of x We will use proof by contradiction: suppose x is not unique,
that means:
∃x0 ∈ E | x0 6= x and y = f (x0 )
y = f (x0 ) and y = f (x) =⇒ f (x) = f (x0 )
=⇒ x = x0 because f is injective
therefore x0 6= x and x = x0
This contradiction proves the unicity of x.
Let us prove (4) : Suppose that
∀y ∈ F ∃!x ∈ E | y = f (x)
and prove that f is bijective.
Prove that f is surjective
∀y ∈ F ∃!x ∈ E | y = f (x) =⇒ ∀y ∈ F ∃x ∈ E | y = f (x)
=⇒ f is surjective.

13
Prove that f is injective: Let’s use proof by contradiction:
Suppose f is not injective:
∃x, x0 ∈ E | f (x) = f (x0 ) et x 6= x0
Let’s put y = f (x):
y have two ifferent preimages x and x0
By the hypothesis ∃!x ∈ E | y = f (x) which means that x is unique. Therefore
x = x0 .
We conclude that x = x0 and x 6= x0 ; this contradiction proves that f is injective.
Conclusion: f is injective and surjective therefore f is bijective.

5.4 Inverse function

Definition Let f : E −→ F be a bijective function.


the inverse function of f , denoted f −1 : F → E , defined by f −1 (b) is the unique
element a of E such that f (a) = b

Example Consider the function f : R −→ R defined by f (x) = 2x + 1


We have proved that f is bijective;
Let y ∈ R and solve the equation f (x) = y:
We have
y−1
2x + 1 = y ⇐⇒ x =
2
We conclude that ∀y ∈ R ∃!x ∈ R such that y = f (x).
Therefore f is bijective, and we define f −1 by
x−1
f −1 : R −→ R | f −1 (x) =
2

Theoreme 5.4.1 if a function f : R −→ R is bijective then

f ◦ f −1 = idF and f −1 ◦ f = idE

Proof 5.4.1 Suppose that f is bijective and prove that


f −1 ◦ f = idE (5)
and
f ◦ f −1 = idF (6)
Prove (5) Let x ∈ E and prove that f −1 ◦ f (x) = idE (x) = x
f (x) ∈ F =⇒ ∃y ∈ F | y = f (x)
y = f (x) =⇒ x = f −1 (y) 5.4
then
f −1 ◦ f (x) = f −1 (f (x))
= f −1 (y)
= x

14
Prove (6) Let y ∈ F and prove that f ◦ f −1 (y) = idF (y) = y

y ∈ F =⇒ ∃!x ∈ E | y = f (x) 5.3.1

therefore

f ◦ f −1 (y) = f (f −1 (y))
= f (x)
=y

Remark
Consider f : E −→ F a bijective function, and F 0 non empty subset of F .
the preimage of F 0 by f is equal to the image of F 0 by f −1 .
In other words: n o
f −1 (F 0 ) = f −1 (y) | y ∈ F 0

15

You might also like