• Aucun résultat trouvé

http://edukera.appspot.com 8245EEC

N/A
N/A
Protected

Academic year: 2022

Partager "http://edukera.appspot.com 8245EEC"

Copied!
13
0
0

Texte intégral

(1)

Natural Deduction

Akim Demaille [email protected]

EPITA — École Pour l’Informatique et les Techniques Avancées

June 14, 2016

Define “logic” [fuc, ]

A. Demaille Natural Deduction 2 / 49

Natural Deduction

1 Logical Formalisms

2 Natural Deduction

3 Additional Material

Preamble

The following slides are implicitly dedicated to classicallogic.

(2)

Logical Formalisms

1 Logical Formalisms Syntax

Proof Types Proof Systems

2 Natural Deduction

3 Additional Material

A. Demaille Natural Deduction 5 / 49

Syntax

1 Logical Formalisms Syntax

Proof Types Proof Systems

2 Natural Deduction

3 Additional Material

A. Demaille Natural Deduction 6 / 49

Terminal Symbols

Propositional Calculus

Constants a,b,c, . . . Propositional Variables A,B,C, . . .

Unary Connective ¬ Binary Connectives ,,

Punctuation (,),[,].

A. Demaille Natural Deduction 7 / 49

Terminal Symbols

Predicate calculus

Individual Variables x,y,z, . . .

Functions f,g,h, . . ., with a fixed arity Predicates P,Q,R, . . ., with a fixed arity Quantifiers ,

Punctuation ·.

A. Demaille Natural Deduction 8 / 49

(3)

Propositional Formulas

hformulai ::= hpropositional variablei

| ¬hformulai

| hformulai ∧ hformulai

| hformulai ∨ hformulai

| hformulai ⇒ hformulai

A. Demaille Natural Deduction 9 / 49

Terms

htermi ::= hconstanti

| hfunctioni(htermi, . . .)

With the proper arity.

A. Demaille Natural Deduction 10 / 49

First Order Formulas

hformulai ::= hpropositional variablei

| ¬hformulai

| hformulai ∧ hformulai

| hformulai ∨ hformulai

| hformulai ⇒ hformulai

| hpredicatei(htermi, . . .)

| ∀hindividual variablei · hformulai

| ∃hindividual variablei · hformulai With the proper arity.

Syntactic Conventions

Associativity , are left-associative (unimportant)

is right-associative (very important) Precedence (increasing)

1 ,

2

3

4

5 ¬

(4)

Free Variables

FV(X) =

FV(P(x1,x2,· · ·,xn)) = {x1,x2,· · ·,xn} FV(¬A) = FV(A)

FV(AB) = FV(A)FV(B) FV(AB) = FV(A)FV(B) FV(AB) = FV(A)FV(B)

FV(x·A) = FV(A)− {x} FV(x·A) = FV(A)− {x}

A. Demaille Natural Deduction 13 / 49

Proof Types

1 Logical Formalisms Syntax

Proof Types Proof Systems

2 Natural Deduction

3 Additional Material

A. Demaille Natural Deduction 14 / 49

Different Proof Types

A. Demaille Natural Deduction 15 / 49

Different Proof Types

(5)

Proof Systems

1 Logical Formalisms Syntax

Proof Types Proof Systems

2 Natural Deduction

3 Additional Material

A. Demaille Natural Deduction 17 / 49

Proof Systems

Hilbertian Systems Natural Deduction Sequent Calculus

Natural Deduction in Sequent Calculus

A. Demaille Natural Deduction 18 / 49

Axioms

Axioms are formulas that are considered true a priori

x·x+0=x Axiom schemes use meta-variables

(that range over a specific domain)

X +Y =Y +X

Axiom schemes are used when quantifiers are not welcome SXYZ XZ(YZ)

KXY X

Axiom schemes are used when quantifiers do not apply A∨ ¬A

Inference Rules

H1 H2 · · · Hn

Rule name C

Axiom name A

(6)

Logical Formalisms

David Hilbert (1862–1943)

A. Demaille Natural Deduction 21 / 49

Hilbertian System

A single inference rule: the modus ponens A AB

modus ponens Many axioms to define the connectivesB

AB AB AB A AB B AAB B AB

AB (AC)(B C)C

AB A (A(B C))(AB)AC

A∨ ¬A A⇒ ¬AB

A. Demaille Natural Deduction 22 / 49

Hilbertian System: Prove A ⇒ A

(A((AA)A))(AAA)AA A(AA)A

(AAA)AA AAA

AA

A. Demaille Natural Deduction 23 / 49

Natural Deduction

1 Logical Formalisms

2 Natural Deduction Syntax

Normalization

3 Additional Material

A. Demaille Natural Deduction 24 / 49

(7)

Syntax

1 Logical Formalisms

2 Natural Deduction Syntax

Normalization

3 Additional Material

A. Demaille Natural Deduction 25 / 49

Deduction

Deduction

A deductionis a tree whose root (A) is theconclusion and whose active leafs (Γ) is the set ofhypotheses.

Γ··· A Any formulaA is a valid hypothesis.

Proof (Demonstration)

A proof is a deduction without hypotheses.

A. Demaille Natural Deduction 26 / 49

Deductions

What’s this?

A A deduction ofA under the hypothesisA.

Implication

[A]··· B ⇒I AB

··· A

··· AB B ⇒E

Deduction theorem, and Modus Ponens.

Note the connection with (left) contraction: any number ofA (including 0) is discharged.

(8)

Proving A ⇒ A in Natural Deduction

[A] ⇒I AA

A. Demaille Natural Deduction 29 / 49

Conjunction

··· A

··· B ∧I AB

··· AB

lE A

··· AB

rE B

A. Demaille Natural Deduction 30 / 49

Universal Quantification

··· A[y/x]

∀I y 6∈FV(hyp(A))

x·A

···

x·A A[t/x]∀E

[A] ∀I

x·A A⇒ ∀x·A⇒I

[A] ⇒I AA

x·(AA)∀I

A. Demaille Natural Deduction 31 / 49

Absurd

···

⊥E A

A. Demaille Natural Deduction 32 / 49

(9)

Disjunction

··· A lI AB

···

B rI AB

··· AB

[A]··· C

[B]··· C ∨E C

A. Demaille Natural Deduction 33 / 49

Existential Quantification

··· A[t/x]

x·A ∃I

···

x·A

[A[y/x]]

···

B ∃E y 6∈FV(B,hyp(B)) B

For elimination, y 6∈hyp(B), i.e., not in the hypotheses other than the discharged A.

A. Demaille Natural Deduction 34 / 49

Negation

[A]···

¬I

¬A

··· A

···

¬A

¬E

Plus one of these equivalent formulations of the fact thatclassical negation is involutive.

A∨ ¬AXM

···

¬¬A A ¬¬

[¬A]

··· B

[¬A]

···

¬B

Contradiction A

Normalization

1 Logical Formalisms

2 Natural Deduction Syntax

Normalization

3 Additional Material

(10)

Cut

Cut: Introduction of a connective followed by its elimination.

··· A

··· B ∧I AB

lE A···

A. Demaille Natural Deduction 37 / 49

Normalization

The normalizationprocess eliminates the cuts.

··· A

··· B ∧I AB

lE A

;

··· A···

A. Demaille Natural Deduction 38 / 49

Normalizing Conjunctions

··· A

··· B ∧I AB

lE A···

;

··· A···

··· A

··· B ∧I AB

rE B···

;

··· B···

A. Demaille Natural Deduction 39 / 49

Normalizing Implications

··· A

[A]··· B ⇒I AB

B ⇒E

···

;

··· A··· B···

A. Demaille Natural Deduction 40 / 49

(11)

Normalizing Universal Quantifiers

··· A ∀I

x·A A[t/x]∀E

···

;

··· A[t/x]

···

x must not be free in the hypotheses, otherwise the reduction would change them.

A. Demaille Natural Deduction 41 / 49

Normalizing Disjunction

··· A lI AB

[A]··· C

[B]··· C ∨E C···

;

··· A··· C···

···

B rI AB

[A]··· C

[B]··· C ∨E C···

;

··· B··· C···

A. Demaille Natural Deduction 42 / 49

Additional Material

1 Logical Formalisms

2 Natural Deduction

3 Additional Material

Logicians in a Bar

Three logicians walk into a bar,

and the bartender asks “Would you all like a drink?”

The first one says, “Maybe.”

The second one says, “Maybe.”

The third one says, “Yes.”

(12)

Edukera

A. Demaille Natural Deduction 45 / 49

Edukera

A. Demaille Natural Deduction 46 / 49

Edukera

http://edukera.appspot.com 8245EEC

A. Demaille Natural Deduction 47 / 49

Bibliography Notes

[Girard et al., 1989]

A short (160p.) book addressing all the concerns of this course, and more (especially Linear Logic). Easy and pleasant to read. Now available for free.

[Girard, 2004]

A much more comprehensive book focusing on logic and its connections with computer science. In French.

A. Demaille Natural Deduction 48 / 49

(13)

Bibliography I

Fuck theory — Experiments in visceral philosophy.

http://fucktheory.tumblr.com/post/12492878134/

dictionary-of-philosophy-logic.

Girard, J.-Y. (2004).

Cours de Logique, Rome, Automne 2004.

http://logica.uniroma3.it/uif/corso/.

Girard, J.-Y., Lafont, Y., and Taylor, P. (1989).

Proofs and Types.

Cambridge University Press.

http://www.cs.man.ac.uk/~pt/stable/Proofs+Types.html.

A. Demaille Natural Deduction 49 / 49

Références

Documents relatifs

, after each chapter title or sub-chapter title, a summary is proposed in the manner of ancient used to provide indications as to the contents of the text

In this course we show how some linear properties of Banach spaces, in particular properties related to the asymptotic structure of Banach spaces, are stable under

A short (160p.) book addressing all the concerns of this course, and more (especially Linear Logic). Easy and pleasant

A short (160p.) book addressing all the concerns of this course, and more (especially Linear Logic). Easy and pleasant

This easy book features lovely pictures of familiar sports and repeats the following linguistic structure: J’aime jouer au…. Zoé et le soleil

Based on this result, models based on deterministic graph- ings – or equivalently on partial measured dynamical systems – can be defined based on realisability techniques using

L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des

For example, intuitionistic logic was developed to rid (classical) logic of certain logical principles and model checking