Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Implication :

Chapitre 7: Rudiments de logique et opérations élémentaires ensemblistes.

Projection, conjonction, négation.

Soient pp et qq deux énoncés mathématiques :

ppqqp ET qp \text{ ET } q
000
010
100
111
ppqqp OU qp \text{ OU } q
000
011
101
111

Remarque importante : le OU en mathématiques n’est pas exclusif : il n’existe pas de cas où pp et qq sont simultanément faux.

Par exemple : un triangle isocèle possède deux côtés de même longueur ou deux angles de même mesure.

Soient p,q,rp, q, r trois énoncés mathématiques.

ppqqrr(p ET q)(p \text{ ET } q)(p OU q)(p \text{ OU } q)(p ET r)(p \text{ ET } r)(q OU r)(q \text{ OU } r)(p ET q) OU (q OU r)(p \text{ ET } q) \text{ OU } (q \text{ OU } r)
00100011
01001000
01101011
10000000
10100111
11011001
11111111
00000000
  1. (p ET q) ET r(p \text{ ET } q) \text{ ET } r

=(p ET r) OU (q ET r)= (p \text{ ET } r) \text{ OU } (q \text{ ET } r)
ppqqrr(p ET q)(p \text{ ET } q)(p OU q) ET (q OU r)(p \text{ OU } q) \text{ ET } (q \text{ OU } r)
00101
01000
01101
10000
10101
11011
11111
00000
  1. (p OU q) ET r=(p OU r) ET (q OU r)(p \text{ OU } q) \text{ ET } r = (p \text{ OU } r) \text{ ET } (q \text{ OU } r)

Lois de De Morgan :

NON(p ET q)=(NON p) OU (NON q)NON(p OU q)=(NON p) ET (NON q)\begin{aligned} \text{NON}(p \text{ ET } q) &= (\text{NON } p) \text{ OU } (\text{NON } q) \\ \text{NON}(p \text{ OU } q) &= (\text{NON } p) \text{ ET } (\text{NON } q) \end{aligned}

Autres lois :

Implication :

L’implication de qq par pp est l’énoncé (NON p) OU q(\text{NON } p) \text{ OU } q. Cet énoncé est faux dans le seul cas où pp est vrai et qq est faux.

pp : la prémisse qq : la conclusion Quand l’implication de pp par qq est vraie, on dit : si pp alors qq pp implique qq il suffit que pp pour avoir qq pp est une condition suffisante pour qq qq est une condition nécessaire pour pp On note pqp \Rightarrow q

1.) \Rightarrow ne veut pas dire “Donc”

Équivalence :

L’équivalence entre pp et qq est l’énoncé (pq) ET (qp)(p \Rightarrow q) \text{ ET } (q \Rightarrow p) (NON p OU q) ET (NON q OU p)(\text{NON } p \text{ OU } q) \text{ ET } (\text{NON } q \text{ OU } p) Cette énoncé est notée pqp \leftrightarrow q

ppqqpqp \Rightarrow qqpq \Rightarrow ppqp \leftrightarrow q
00111
01100
10010
11111

Lorsque pqp \leftrightarrow q est vrai, on note pqp \Leftrightarrow q et on dit : pp équivalent à qq pp si et seulement si qq rr est une condition nécessaire et suffisante de pp Il faut et il suffit d’avoir pp pour avoir qq

Principe de contraposition :

L’implication NON pNON q\text{NON } p \Rightarrow \text{NON } q s’appelle contraposée de pqp \Rightarrow q. On admet d’équivalence :

(pq)(NON qNON p)(p \Rightarrow q) \Leftrightarrow (\text{NON } q \Rightarrow \text{NON } p)

Exemple : Soit nZn \in \mathbb{Z} Si n2n^2 est pair alors nn est pair. Supposons nn impair. Il existe kZk \in \mathbb{Z} tel que n=2k+1n = 2k + 1. Alors n2=1+2(2k2+2k)n^2 = 1 + 2(2k^2 + 2k). Donc n2n^2 est impair. Par contraposition : si n2n^2 n’est pas pair, alors nn n’est pas pair.

Attention : La négation d’une implication n’est pas une implication :

NON(pq)=p ET NON q\text{NON}(p \Rightarrow q) = p \text{ ET } \text{NON } q

Ensembles, relations, E, C

Un ensemble peut être défini par extension ou par compréhension !

W4={1,1,i,i}(extension)U4={zCz4=1}\begin{aligned} \mathbb{W}_4 &= \{-1, 1, i, -i\} \quad \text{(extension)} \\ \mathbb{U}_4 &= \left\{ z \in \mathbb{C} \mid z^4 = 1 \right\} \end{aligned}

Dans le cas contraire, on dit qu’il n’appartient pas à EE et on note xEx \notin E.

Un ensemble à un seul élément s’appelle un singleton.

{0}: tous les vecteurs nuls de R2(si 0=(0,0))\{\vec{0}\} : \text{ tous les vecteurs nuls de } \mathbb{R}^2 \quad \text{(si } \vec{0} = (0,0))

Un ensemble de deux éléments s’appelle une paire.

E={0,1}E = \{0, 1\}

Il existe un ensemble sans aucun élément, on l’appelle ensemble vide. On le note \varnothing.

={xR1+x2=0}\varnothing = \left\{ x \in \mathbb{R} \mid 1 + x^2 = 0 \right\}

Soit A,BA, B deux ensembles. Lorsque tout élément de AA est aussi élément de BB, on dit que AA est inclus dans BB.

On note alors ABA \subset B. NZQRC\mathbb{N} \subset \mathbb{Z} \subset \mathbb{Q} \subset \mathbb{R} \subset \mathbb{C} AB(x)(xAxB)A \subset B \Leftrightarrow (\forall x)(x \in A \Rightarrow x \in B)

Deux ensembles AA et BB ont exactement les mêmes éléments, A=B(AB et BA)A = B \Leftrightarrow (A \subset B \text{ et } B \subset A)

On note E\varnothing \subset E.

Quantification :

x2+4=0x^2 + 4 = 0

n’est pas un énoncé mathématique car la variable xx n’est pas quantifiée.

Soit EE un ensemble : P(x)P(x) : une propriété définissant EE A={xEP(x)}A = \{x \in E \mid P(x)\}

Cela se lit aussi : pour tout xEx \in E, P(x)P(x) est vrai.

Quantificateurs et connecteurs logiques

Soient P,QP, Q deux propriétés définies sur un ensemble EE.

  1. (xE)(P(x) ET Q(x))(\forall x \in E)(P(x) \text{ ET } Q(x)) a le même sens que (xE,P(x)) ET (xE,Q(x))(\forall x \in E, P(x)) \text{ ET } (\forall x \in E, Q(x))

  2. (xE)(P(x) OU Q(x))(\forall x \in E)(P(x) \text{ OU } Q(x)) a le même sens que (xE,P(x)) OU (xE,Q(x))(\forall x \in E, P(x)) \text{ OU } (\forall x \in E, Q(x))

Exemple : E=NE = \mathbb{N} (xN)(x est pair OU x est impair)(\forall x \in \mathbb{N})(x \text{ est pair OU } x \text{ est impair}) : V (xN,x est pair) OU (xN,x est impair)(\forall x \in \mathbb{N}, x \text{ est pair}) \text{ OU } (\forall x \in \mathbb{N}, x \text{ est impair}) : F

Cependant :

(xE,P(x)) OU (xE,Q(x))(xE)(P(x) OU Q(x))\begin{gathered} (\forall x \in E, P(x)) \text{ OU } (\forall x \in E, Q(x)) \\ \Rightarrow (\forall x \in E)(P(x) \text{ OU } Q(x)) \end{gathered}
  1. (xE)(P(x) ET Q(x))(\exists x \in E)(P(x) \text{ ET } Q(x)) a le même sens que (xE,P(x)) ET (xE,Q(x))(\exists x \in E, P(x)) \text{ ET } (\exists x \in E, Q(x))

Exemple : E=NE = \mathbb{N} (xE)(x est pair ET x est impair)(\exists x \in E)(x \text{ est pair ET } x \text{ est impair}) : F (xE,x est pair) ET (xE,x est impair)(\exists x \in E, x \text{ est pair}) \text{ ET } (\exists x \in E, x \text{ est impair}) : V Cependant : (xE)(P(x) ET Q(x))(xE,P(x)) ET (xE,Q(x))(\exists x \in E)(P(x) \text{ ET } Q(x)) \neq (\exists x \in E, P(x)) \text{ ET } (\exists x \in E, Q(x))

  1. (xE)(P(x) OU Q(x))(\exists x \in E)(P(x) \text{ OU } Q(x)) a le même sens que (xE,P(x)) OU (xE,Q(x))(\exists x \in E, P(x)) \text{ OU } (\exists x \in E, Q(x))

L’ensemble constitué par les parties de EE est appelé ensemble des parties de EE.

Dans l’exemple précédent : {,{a},{b},{c},{a,b},{a,c},{b,c},{a,b,c}}\{\varnothing, \{a\}, \{b\}, \{c\}, \{a, b\}, \{a, c\}, \{b, c\}, \{a, b, c\}\} est l’ensemble noté P(E)\mathcal{P}(E). x:XP(E)XE\forall x : X \in \mathcal{P}(E) \Leftrightarrow X \subset E

Exemple : éléments de P(P())\mathcal{P}(\mathcal{P}(\varnothing))

P()={}\mathcal{P}(\varnothing) = \{\varnothing\}

Car le seul sous-ensemble de \varnothing est \varnothing.

P(P())={,{}}\mathcal{P}(\mathcal{P}(\varnothing)) = \{\varnothing, \{\varnothing\}\}

Opérations dans M(E)M(E) :

Soit EE un ensemble et A,BA, B deux sous-ensembles de EE.

L’intersection de AA et BB est notée ABA \cap B.

On note AA quand il n’y a pas d’égalité.

(xE)(xABxA ET xB)(\forall x \in E)(x \in A \cap B \Leftrightarrow x \in A \text{ ET } x \in B)
(xE)(xABxA OU xB)(\forall x \in E)(x \in A \cup B \Leftrightarrow x \in A \text{ OU } x \in B)
(xE)(xCEAxA)(\forall x \in E)(x \in C_E A \Leftrightarrow x \notin A)

Exemple :

Propriétés : Soit A,B,CA, B, C des sous-ensembles d’un ensemble EE :

  1. AB=BAA \cap B = B \cap A

  2. (AB)C=A(BC)(A \cap B) \cap C = A \cap (B \cap C)

  3. Si ABA \subset B, alors AB=AA \cap B = A

  4. AB=BAA \cup B = B \cup A

  5. (AB)C=A(BC)(A \cup B) \cup C = A \cup (B \cup C)

  6. Si ABA \subset B, alors AB=BA \cup B = B

  7. A(BC)=(AB)(AC)A \cap (B \cup C) = (A \cap B) \cup (A \cap C)

  8. A(BC)=(AB)(AC)A \cup (B \cap C) = (A \cup B) \cap (A \cup C)

Lois de De Morgan :

  1. CE(AB)=CEACEBC_E (A \cap B) = C_E A \cup C_E B

  2. CE(AB)=CEACEBC_E (A \cup B) = C_E A \cap C_E B

Produit cartésien :

Soient A,BA, B deux ensembles. Le produit cartésien A×BA \times B (« A croix B ») est l’ensemble noté :

A×B={(a,b):aA,bB}A \times B = \{(a, b) : a \in A, b \in B\}

Exemple : A={1,0,1}A = \{-1, 0, 1\}, B={2,3}B = \{2, 3\}

A×B={(1,2),(1,3),(0,2),(0,3),(1,2),(1,3)}A \times B = \{(-1, 2), (-1, 3), (0, 2), (0, 3), (1, 2), (1, 3)\}

B×A={(2,1),(2,0),(2,1),(3,1),(3,0),(3,4)B \times A = \{(2, -1), (2, 0), (2, 1), (3, -1), (3, 0), (3, -4)

En général, A×BB×AA \times B \neq B \times A.

Définition :

Soit A1,,AnA_1, \ldots, A_n des ensembles non vides. A1×A2××An={(x1,,xn)i[1,n],xiAi}A_1 \times A_2 \times \ldots \times A_n = \left\{ (x_1, \ldots, x_n) \mid \forall i \in [1, n], x_i \in A_i \right\}

(x1,,xn)(x_1, \ldots, x_n) est appelé nn-uplet.

Si A1=A2==An=AA_1 = A_2 = \ldots = A_n = A, alors A×A××An facteurs\underbrace{A \times A \times \ldots \times A}_{n \text{ facteurs}} est noté AnA^n. Les éléments de AnA^n sont appelés nn-listes.

Exemple :

Ex13 : Soit (n,p)N2(n, p) \in \mathbb{N}^2. Montrer que si npnp est pair, alors n2p2n^2 - p^2 est multiple de 8.

Ex19 : Pour tout nNn \in \mathbb{N}, 1+12+13!++1n!<e<1+12!++1n!+1n!!1 + \frac{1}{2} + \frac{1}{3!} + \cdots + \frac{1}{n!} < e < 1 + \frac{1}{2!} + \cdots + \frac{1}{n!} + \frac{1}{n!!}

Sn<e<Sn+1n!S_n < e < S_n + \frac{1}{n!}