Introduction à la logique

Un nouveau standard :

« Le theodoer X relit toutes les PRs des Theodoers qui ne relisent pas leurs propres PRs et seulement celles-ci. »

Qui relit les PR du theodoer X ?

Qu'est ce qu'un bon ensemble de standards?

Indépendance

pas de standard redondant

Cohérence

pas de contradiction

Completude

pas d'indécision

Angoisse des mathématiciens du XIXe

Complexité des "objets" mathématiques

Temps

Nombres entiers

Nombres rationnels

Nombres complexes

\sqrt{2}
2\sqrt{2}
i^2+1=0
i2+1=0i^2+1=0

Nombres réels

Fonctions

Ensembles

Relations algébriques

David HILBERT

"Prouver" la cohérence des mathématiques

Donner un ensemble de standards (axiomes) pour les mathématiques

La logique:

une théorie mathématique dont les "objets" sont des théorèmes et des preuves

Complexité des "objets" mathématiques

Temps

Nombres entiers

Nombres rationnels

Nombres complexes

\sqrt{2}
2\sqrt{2}
i^2+1=0
i2+1=0i^2+1=0

Nombres réels

Fonctions

Ensembles

Relations algébriques

Théorèmes

Preuves

Une idée nouvelle?

Εὐκλείδης

Problème du 5ème postulat: « Par un point donné, on peut mener une et une seule parallèle à une droite donnée »

Equivalent à: « La somme des angles d'un triangle est egale à deux angles droits » (Legendre)

Les théorèmes ?

1. des élèments de base e.g., des Théodoers

x, y, \text{antoinet}, \text{tristanr}, \ldots
x,y,antoinet,tristanr,x, y, \text{antoinet}, \text{tristanr}, \ldots

Un théorème = une formule logique

Les théorèmes ?

Un théorème = une formule logique

2. des prédicats de base e.g., 

« x relit la PR de Antoinet »

« Tristanr merge et déploie sa PR »

\text{RW}(x, \text{antoinet})
RW(x,antoinet)\text{RW}(x, \text{antoinet})
\text{DEP}(\text{tristanr})
DEP(tristanr)\text{DEP}(\text{tristanr})

« Vrai »

\top
\top

« Faux »

\bot
\bot

Les théorèmes ?

Un théorème = une formule logique

3. des connecteurs logiques

\text{RW}(x, y) \vee \text{RW}(\text{antoinet},y)
RW(x,y)RW(antoinet,y)\text{RW}(x, y) \vee \text{RW}(\text{antoinet},y)
\text{RW}(y,t) \wedge \text{DEP}(t)
RW(y,t)DEP(t)\text{RW}(y,t) \wedge \text{DEP}(t)

« Ou »

\text{RW}(\text{antoinet},y) \Rightarrow \text{DEP}(y)
RW(antoinet,y)DEP(y)\text{RW}(\text{antoinet},y) \Rightarrow \text{DEP}(y)

« Et »

« Implique »

Les théorèmes ?

Un théorème = une formule logique

4. des quantificateurs 

\forall x. \;\text{RW}(x,\text{antoinet}) \Rightarrow \bot
x.RW(x,antoinet)\forall x. \;\text{RW}(x,\text{antoinet}) \Rightarrow \bot
\exists x. \;\text{RW}(x,\text{antoinet})
x.RW(x,antoinet)\exists x. \;\text{RW}(x,\text{antoinet})

:'(

:)

\forall x. \forall t. \;\, \text{DEP}(x) \Rightarrow \; t = x \vee \text{RW}(t,x)
x.t.DEP(x)t=xRW(t,x)\forall x. \forall t. \;\, \text{DEP}(x) \Rightarrow \; t = x \vee \text{RW}(t,x)

Le théorème de la PR achevée

Le théorème du deploiement

\forall x.\; (\forall t.\;\; t \neq x \Rightarrow \text{RW}(t,x)) \Rightarrow \text{DEP}(x)
x.(t.txRW(t,x))DEP(x)\forall x.\; (\forall t.\;\; t \neq x \Rightarrow \text{RW}(t,x)) \Rightarrow \text{DEP}(x)

« Le theodoer X relit toutes les PRs des Theodoers qui ne relisent pas leurs propres PRs et seulement celles-ci. »

Un nouveau standard :

\exists x.\forall t.\;\; \neg \text{RW}(t, t) \Leftrightarrow \text{RW}(x, t)
x.t.¬RW(t,t)RW(x,t)\exists x.\forall t.\;\; \neg \text{RW}(t, t) \Leftrightarrow \text{RW}(x, t)
A \Leftrightarrow B
ABA \Leftrightarrow B

is syntactic sugar for

A \Rightarrow B \wedge B \Rightarrow A
ABBAA \Rightarrow B \wedge B \Rightarrow A

2

2

1

\neg A
¬A\neg A

is syntactic sugar for

A \Rightarrow \bot
AA \Rightarrow \bot

1

Les preuves ?

Une preuve = un arbre

  • Les feuilles sont des axiomes
  • Les noeuds sont des règles logiques
  • La racine est le théorème que l'on veut prouver

La notion de séquent

A_0,\ldots, A_N \vdash A
A0,,ANAA_0,\ldots, A_N \vdash A

les hypothèses: une liste de formules

la formule que l'on prouve

En langage humain:

« Sous les hypothèses        et ... et          , la propriété       est vraie »

A_0
A0A_0
A
AA
A_N
ANA_N

Les axiomes

A \vdash A
AAA \vdash A

Les règles de l'implication

\Gamma \vdash A \Rightarrow B
ΓAB\Gamma \vdash A \Rightarrow B
\Gamma \vdash A
ΓA\Gamma \vdash A
\Gamma \vdash B
ΓB\Gamma \vdash B
\Gamma \vdash A \Rightarrow B
ΓAB\Gamma \vdash A \Rightarrow B
\Gamma, A \vdash B
Γ,AB\Gamma, A \vdash B

prémise(s)

conséquence

\Rightarrow-\text{intro}
intro\Rightarrow-\text{intro}
\Rightarrow-\text{elim}
elim\Rightarrow-\text{elim}

Les règles pour vrai / faux

\Gamma \vdash \top
Γ\Gamma \vdash \top
\Gamma \vdash \bot
Γ\Gamma \vdash \bot
\Gamma \vdash A
ΓA\Gamma \vdash A

Les règles et / ou

Introduction

\Gamma \vdash A \wedge B
ΓAB\Gamma \vdash A \wedge B
\Gamma \vdash A
ΓA\Gamma \vdash A
\Gamma \vdash B
ΓB\Gamma \vdash B
\Gamma \vdash A
ΓA\Gamma \vdash A
\Gamma \vdash A \vee B
ΓAB\Gamma \vdash A \vee B
\Gamma \vdash B
ΓB\Gamma \vdash B
\Gamma \vdash A \vee B
ΓAB\Gamma \vdash A \vee B
\wedge-\text{intro}
intro\wedge-\text{intro}
\vee-\text{intro}
intro\vee-\text{intro}

Les règles et / ou

Elimination

\Gamma \vdash C
ΓC\Gamma \vdash C
\Gamma \vdash A \vee B
ΓAB\Gamma \vdash A \vee B
\Gamma, A \vdash C
Γ,AC\Gamma, A \vdash C
\Gamma, B \vdash C
Γ,BC\Gamma, B \vdash C
\vee-\text{elim}
elim\vee-\text{elim}
\wedge-\text{elim}
elim\wedge-\text{elim}
\Gamma \vdash A \wedge B
ΓAB\Gamma \vdash A \wedge B
\Gamma \vdash A
ΓA\Gamma \vdash A
\Gamma \vdash A \wedge B
ΓAB\Gamma \vdash A \wedge B
\Gamma \vdash B
ΓB\Gamma \vdash B

Les règles pour les quantificateurs

Elimination

\forall-\text{elim}
elim\forall-\text{elim}
\exists-\text{intro}
intro\exists-\text{intro}
\Gamma \vdash A[x/t]
ΓA[x/t]\Gamma \vdash A[x/t]
\Gamma \vdash \exists x. A
Γx.A\Gamma \vdash \exists x. A
\Gamma \vdash A[x/t]
ΓA[x/t]\Gamma \vdash A[x/t]
\Gamma \vdash \forall x. A
Γx.A\Gamma \vdash \forall x. A
\exists-\text{elim}
elim\exists-\text{elim}
\forall-\text{intro}
intro\forall-\text{intro}
\Gamma \vdash A
ΓA\Gamma \vdash A
\Gamma \vdash \forall x. A
Γx.A\Gamma \vdash \forall x. A
\Gamma \vdash A
ΓA\Gamma \vdash A
\Gamma \vdash \exists x. A
Γx.A\Gamma \vdash \exists x. A

!

x \notin \text{vars}(\Gamma)
xvars(Γ)x \notin \text{vars}(\Gamma)
x \notin \text{vars}(\Gamma)
xvars(Γ)x \notin \text{vars}(\Gamma)
\Gamma = \left\{ \forall x. \forall t. \;\, \text{DEP}(x) \Rightarrow \; t = x \vee \text{RW}(t,x) \right\}
Γ={x.t.DEP(x)t=xRW(t,x)}\Gamma = \left\{ \forall x. \forall t. \;\, \text{DEP}(x) \Rightarrow \; t = x \vee \text{RW}(t,x) \right\}
\Gamma \;\vdash\; x_0 \neq x_1 \wedge \neg \text{RW}(x_0,x_1) \Rightarrow \neg \text{DEP}(x_1)
Γx0x1¬RW(x0,x1)¬DEP(x1)\Gamma \;\vdash\; x_0 \neq x_1 \wedge \neg \text{RW}(x_0,x_1) \Rightarrow \neg \text{DEP}(x_1)
\Gamma, x_0 \neq x_1 \wedge \neg \text{RW}(x_0,x_1) \;\vdash\; \neg \text{DEP}(x_1)
Γ,x0x1¬RW(x0,x1)¬DEP(x1)\Gamma, x_0 \neq x_1 \wedge \neg \text{RW}(x_0,x_1) \;\vdash\; \neg \text{DEP}(x_1)
\Gamma, x_0 \neq x_1 \wedge \neg \text{RW}(x_0,x_1), \text{DEP}(x_1) \;\vdash\; \bot
Γ,x0x1¬RW(x0,x1),DEP(x1)\Gamma, x_0 \neq x_1 \wedge \neg \text{RW}(x_0,x_1), \text{DEP}(x_1) \;\vdash\; \bot
\ldots , \text{RW}(x_0,x_1) \;\vdash\; \bot
,RW(x0,x1)\ldots , \text{RW}(x_0,x_1) \;\vdash\; \bot
\ldots , x_0 =x_1 \;\vdash\; \bot
,x0=x1\ldots , x_0 =x_1 \;\vdash\; \bot
\ldots \;\vdash\; \text{RW}(x_0,x_1) \vee x_0 = x_1
RW(x0,x1)x0=x1\ldots \;\vdash\; \text{RW}(x_0,x_1) \vee x_0 = x_1
\Pi_1
Π1\Pi_1
\Pi_2
Π2\Pi_2
\ldots \;\vdash\; \text{DEP}(x_1)
DEP(x1)\ldots \;\vdash\; \text{DEP}(x_1)
\ldots \;\vdash\; \text{DEP}(x_1) \Rightarrow \text{RW}(x_0,x_1) \vee x_0 = x_1
DEP(x1)RW(x0,x1)x0=x1\ldots \;\vdash\; \text{DEP}(x_1) \Rightarrow \text{RW}(x_0,x_1) \vee x_0 = x_1
\ldots \;\vdash\; \forall t.\, \text{DEP}(x_1) \Rightarrow \text{RW}(t,x_1) \vee t = x_1
t.DEP(x1)RW(t,x1)t=x1\ldots \;\vdash\; \forall t.\, \text{DEP}(x_1) \Rightarrow \text{RW}(t,x_1) \vee t = x_1
\ldots \;\vdash\; \forall x.\, \forall t.\, \text{DEP}(x) \Rightarrow \text{RW}(t,x) \vee t = x
x.t.DEP(x)RW(t,x)t=x\ldots \;\vdash\; \forall x.\, \forall t.\, \text{DEP}(x) \Rightarrow \text{RW}(t,x) \vee t = x

« Le theodoer X relit toutes les PRs des Theodoers qui ne relisent pas leurs propres PRs et seulement celles-ci. »

Un nouveau standard :

\exists x.\forall t.\;\; \neg \text{RW}(t, t) \Leftrightarrow \text{RW}(x, t)
x.t.¬RW(t,t)RW(x,t)\exists x.\forall t.\;\; \neg \text{RW}(t, t) \Leftrightarrow \text{RW}(x, t)
\vdash \bot
\vdash \bot
\ldots \text{?}
?\ldots \text{?}
\vdash \text{RW}(x,x) \vee \neg \text{RW}(x,x)
RW(x,x)¬RW(x,x)\vdash \text{RW}(x,x) \vee \neg \text{RW}(x,x)
\Gamma \vdash A \vee \neg A
ΓA¬A\Gamma \vdash A \vee \neg A

Tiers - exclus

« Il n’est pas possible qu’il y ait aucun intermédiaire entre les énoncés contradictoires : il faut nécessairement ou affirmer ou nier un seul prédicat, quel qu’il soit. »

Aristote, Métaphysique

« Enlever le principe du tiers-exclu aux mathématiciens serait la même chose, disons, que d’interdire le téléscope à l’astronome ou au boxeur l’usage de ses poings. »

Hilbert, Grundlagen der Mathematik

\exists \alpha.\;\exists \beta.\; \alpha \notin \mathbb{Q} \;\wedge\; \beta \notin \mathbb{Q} \;\wedge\; \alpha^\beta \in \mathbb{Q}
α.β.αQβQαβQ\exists \alpha.\;\exists \beta.\; \alpha \notin \mathbb{Q} \;\wedge\; \beta \notin \mathbb{Q} \;\wedge\; \alpha^\beta \in \mathbb{Q}
\sqrt{2} \notin \mathbb{Q}
2Q\sqrt{2} \notin \mathbb{Q}
\sqrt{2}^{\sqrt{2}} \in \mathbb{Q} \;\vee\; \sqrt{2}^{\sqrt{2}} \notin \mathbb{Q}
22Q22Q\sqrt{2}^{\sqrt{2}} \in \mathbb{Q} \;\vee\; \sqrt{2}^{\sqrt{2}} \notin \mathbb{Q}

(rappel)

tiers exclus: 

Ok!

(\sqrt{2}^{\sqrt{2}})^{\sqrt{2}} = 2 \in \mathbb{Q}
(22)2=2Q(\sqrt{2}^{\sqrt{2}})^{\sqrt{2}} = 2 \in \mathbb{Q}

Ok!

Paradoxe du buveur

 « Dans une pièce non vide, il existe une personne qui si elle boit, tout le monde boit. »

\exists x.\; \text{Beer}(x) \Rightarrow (\forall y.\,\text{Beer}(y))
x.Beer(x)(y.Beer(y))\exists x.\; \text{Beer}(x) \Rightarrow (\forall y.\,\text{Beer}(y))
\forall x. \text{Beer}(x) \;\vee\; \exists x. \neg\text{Beer}(x)
x.Beer(x)x.¬Beer(x)\forall x. \text{Beer}(x) \;\vee\; \exists x. \neg\text{Beer}(x)

Qu'est ce qu'on fait avec tout ça ?

Des théorèmes sur les théorèmes :)

Deux niveaux qui intérfèrent: la théorie et la méta-théorie

Les objets bien formalisés de la logique 

théorème = formule logique

preuve = arbre de dérivation

Des raisonnements sur la logique elle-même

théorème = un enoncé usuel

preuve = un raisonnement logique traditionnel

« Le plus petit entier naturel non descriptible par une expression de quinze mots ou moins. »

Paradoxe de Berry

X_{15} = \{ n \in \mathbb{N} \;\vert\; P_{15}(n) \}
X15={nNP15(n)}X_{15} = \{ n \in \mathbb{N} \;\vert\; P_{15}(n) \}
n_{15} = min(X_{15})
n15=min(X15)n_{15} = min(X_{15})
n_{15} \in X_{15}
n15X15n_{15} \in X_{15}
n_{15}
n15n_{15}
P_{15}(n) =
P15(n)=P_{15}(n) =

« n n'est pas descriptible en moins de quinze mots »

donc

en moins de quinze mots.

n'est pas descriptible

n_{15}
n15n_{15}

vérifie

donc

n_{15}
n15n_{15}

est descriptible en

moins de quinze mots.

« Le plus petit entier naturel non descriptible par une expression de quinze mots ou moins. »

Paradoxe de Berry

X_{15} = \{ n \in \mathbb{N} \;\vert\; P_{15}(n) \}
X15={nNP15(n)}X_{15} = \{ n \in \mathbb{N} \;\vert\; P_{15}(n) \}
n_{15} = min(X_{15})
n15=min(X15)n_{15} = min(X_{15})
n_{15} \in X_{15}
n15X15n_{15} \in X_{15}
n_{15}
n15n_{15}
P_{15}(n) =
P15(n)=P_{15}(n) =

« n n'est pas descriptible en moins de quinze mots »

donc

en moins de quinze mots.

n'est pas descriptible

n_{15}
n15n_{15}

vérifie

donc

n_{15}
n15n_{15}

est descriptible en

moins de quinze mots.

Cohérence

La théorie      est cohérente ssi                  n'est pas prouvable.

\Gamma
Γ\Gamma
\Gamma \vdash \bot
Γ\Gamma \vdash \bot

Indépendance

\Gamma \vdash A
ΓA\Gamma \vdash A
\Gamma \vdash \neg A
Γ¬A\Gamma \vdash \neg A

La propriété       est indépendante de la théorie      ssi 

ni                   ni                       ne sont prouvable.

A
AA
\Gamma
Γ\Gamma

Complétude

La thèorie       est complete ssi pour toute propriété      ,     

l'un des deux séquents                   et                       est prouvable.

\Gamma
Γ\Gamma
A
AA
\Gamma \vdash A
ΓA\Gamma \vdash A
\Gamma \vdash \neg A
Γ¬A\Gamma \vdash \neg A

David HILBERT

"Prouver" la cohérence des mathématiques

Donner un ensemble de standards (axiomes) pour les mathématiques

?

Giuseppe Peano

Abraham Fraenkel

Ernst Zermelo

David HILBERT

"Prouver" la cohérence des mathématiques

Donner un ensemble de standards (axiomes) pour les mathématiques

?

KO

Théorème d'incomplètude (Gödel)

Dans n'importe quelle théorie récursivement axiomatisable, cohérente et capable de « formaliser l'arithmétique », on peut construire un énoncé arithmétique qui ne peut être ni prouvé ni réfuté dans cette théorie.

Et après ?

Introduction à la logique

By Antoine Toubhans

Introduction à la logique

Introduction à la logique, présenté à Theodo le 12/08/2016

  • 1,005