Superdeduction - rho.loria.fr · Cl´ement Houtmann & Paul Brauner, LORIA October 23, 2006....

28
Superdeduction Superdeduction Cl´ ement Houtmann & Paul Brauner, LORIA October 23, 2006

Transcript of Superdeduction - rho.loria.fr · Cl´ement Houtmann & Paul Brauner, LORIA October 23, 2006....

Page 1: Superdeduction - rho.loria.fr · Cl´ement Houtmann & Paul Brauner, LORIA October 23, 2006. Superdeduction Typing the ρ-calculus Let’s type the ρ-calculus Terms: p ::= R(α ...

Superdeduction

Superdeduction

Clement Houtmann & Paul Brauner, LORIA

October 23, 2006

Page 2: Superdeduction - rho.loria.fr · Cl´ement Houtmann & Paul Brauner, LORIA October 23, 2006. Superdeduction Typing the ρ-calculus Let’s type the ρ-calculus Terms: p ::= R(α ...

Superdeduction

Typing the ρ-calculus

Let’s type the ρ-calculus

Terms:p ::= R(α1, . . . , αn)

m ::= R(t1, . . . , tn)

t ::= x | t m | p → t

Types:T ::= A | T ⇒ T

Page 3: Superdeduction - rho.loria.fr · Cl´ement Houtmann & Paul Brauner, LORIA October 23, 2006. Superdeduction Typing the ρ-calculus Let’s type the ρ-calculus Terms: p ::= R(α ...

Superdeduction

Typing the ρ-calculus

Let’s type the ρ-calculus

For each R of arity n, we associate some type

P = A1 ⇒ A2 ⇒ . . . ⇒ An ⇒ B

Γ, α1 : A1, . . . , αn : An ` t : B

Γ ` R(α1, . . . , αn) → t : P

Γ ` t : P Γ ` t1 : A1 . . . Γ ` tn : An

Γ ` t R(t1, . . . , tn) : B

Page 4: Superdeduction - rho.loria.fr · Cl´ement Houtmann & Paul Brauner, LORIA October 23, 2006. Superdeduction Typing the ρ-calculus Let’s type the ρ-calculus Terms: p ::= R(α ...

Superdeduction

Typing the ρ-calculus

Let’s type the ρ-calculus

For each R of arity n, we associate some type

P = A1 ⇒ A2 ⇒ . . . ⇒ An ⇒ B

Γ, α1 : A1, . . . , αn : An ` t : B

Γ ` R(α1, . . . , αn) → t : P

Γ ` t : P Γ ` t1 : A1 . . . Γ ` tn : An

Γ ` t R(t1, . . . , tn) : B

Page 5: Superdeduction - rho.loria.fr · Cl´ement Houtmann & Paul Brauner, LORIA October 23, 2006. Superdeduction Typing the ρ-calculus Let’s type the ρ-calculus Terms: p ::= R(α ...

Superdeduction

Typing the ρ-calculus

Let’s type the ρ-calculus

For each R of arity n, we associate some type

P = A1 ⇒ A2 ⇒ . . . ⇒ An ⇒ B

Γ, α1 : A1, . . . , αn : An ` t : B

Γ ` R(α1, . . . , αn) → t : P

Γ ` t : P Γ ` t1 : A1 . . . Γ ` tn : An

Γ ` t R(t1, . . . , tn) : B

Page 6: Superdeduction - rho.loria.fr · Cl´ement Houtmann & Paul Brauner, LORIA October 23, 2006. Superdeduction Typing the ρ-calculus Let’s type the ρ-calculus Terms: p ::= R(α ...

Superdeduction

Typing the ρ-calculus

Let’s focus on logic

R : P = (A1 ⇒ A2 ⇒ . . . ⇒ B)

R-introΓ,A1, . . . ,An ` B

Γ ` P

R-elimΓ ` P Γ ` A1 . . . Γ ` An

Γ ` B

Page 7: Superdeduction - rho.loria.fr · Cl´ement Houtmann & Paul Brauner, LORIA October 23, 2006. Superdeduction Typing the ρ-calculus Let’s type the ρ-calculus Terms: p ::= R(α ...

Superdeduction

Typing the ρ-calculus

Let’s focus on logic

R : P = ∀x .(A1 ⇒ A2 ⇒ . . . ⇒ B)

R-introΓ,A1, . . . ,An ` B

Γ ` Px /∈ FV(Γ)

R-elimΓ ` P Γ ` A1[t/x ] . . . Γ ` An[t/x ]

Γ ` B[t/x ]

Page 8: Superdeduction - rho.loria.fr · Cl´ement Houtmann & Paul Brauner, LORIA October 23, 2006. Superdeduction Typing the ρ-calculus Let’s type the ρ-calculus Terms: p ::= R(α ...

Superdeduction

Typing the ρ-calculus

A new framework for first order logic

⊆ : A ⊆ B = ∀x .(x ∈ A ⇒ x ∈ B)

⊆ -introΓ, x ∈ A ` x ∈ B

Γ ` A ⊆ B

⊆ -elimΓ ` A ⊆ B Γ ` x ∈ A

Γ ` x ∈ B

Page 9: Superdeduction - rho.loria.fr · Cl´ement Houtmann & Paul Brauner, LORIA October 23, 2006. Superdeduction Typing the ρ-calculus Let’s type the ρ-calculus Terms: p ::= R(α ...

Superdeduction

Typing the ρ-calculus

A new framework for first order logic

⊆ : A ⊆ B = ∀x .(x ∈ A ⇒ x ∈ B)

⊆ -introΓ, x ∈ A ` x ∈ B

Γ ` A ⊆ B

“Supposing that x ∈ A, we can prove that x ∈ B without assuminganything on x. Therefore A ⊆ B”

Page 10: Superdeduction - rho.loria.fr · Cl´ement Houtmann & Paul Brauner, LORIA October 23, 2006. Superdeduction Typing the ρ-calculus Let’s type the ρ-calculus Terms: p ::= R(α ...

Superdeduction

Typing the ρ-calculus

A new framework for first order logic

⊆ : A ⊆ B = ∀x .(x ∈ A ⇒ x ∈ B)

⊆ -elimΓ ` A ⊆ B Γ ` t ∈ A

Γ ` t ∈ B

“If we can prove that A ⊆ B and that t ∈ A, then we can provethat t ∈ B.”

Page 11: Superdeduction - rho.loria.fr · Cl´ement Houtmann & Paul Brauner, LORIA October 23, 2006. Superdeduction Typing the ρ-calculus Let’s type the ρ-calculus Terms: p ::= R(α ...

Superdeduction

Superdeduction systems

Building the rules

R : P → (A ⇒ B) ⇒ (C ∧ D)

∧-elim-1

⇒ -elim` (A ⇒ B) ⇒ (C ∧ D) ` A ⇒ B

` C ∧ D

` C

R-elim-1` P ` A ⇒ B

` C

Page 12: Superdeduction - rho.loria.fr · Cl´ement Houtmann & Paul Brauner, LORIA October 23, 2006. Superdeduction Typing the ρ-calculus Let’s type the ρ-calculus Terms: p ::= R(α ...

Superdeduction

Superdeduction systems

Building the rules

R : P → (A ⇒ B) ⇒ (C ∧ D)

∧-elim-1

⇒ -elim` (A ⇒ B) ⇒ (C ∧ D) ` A ⇒ B

` C ∧ D

` C

R-elim-1` P ` A ⇒ B

` C

Page 13: Superdeduction - rho.loria.fr · Cl´ement Houtmann & Paul Brauner, LORIA October 23, 2006. Superdeduction Typing the ρ-calculus Let’s type the ρ-calculus Terms: p ::= R(α ...

Superdeduction

Superdeduction systems

Building the rules

R : P → (A ⇒ B) ⇒ (C ∧ D)

⇒ -intro

∧-introA ⇒ B ` C A ⇒ B ` D

A ⇒ B ` C ∧ D

` (A ⇒ B) ⇒ (C ∧ D)

R-introA ⇒ B ` C A ⇒ B ` D

` P

Page 14: Superdeduction - rho.loria.fr · Cl´ement Houtmann & Paul Brauner, LORIA October 23, 2006. Superdeduction Typing the ρ-calculus Let’s type the ρ-calculus Terms: p ::= R(α ...

Superdeduction

Superdeduction systems

Building the rules

R : P → (A ⇒ B) ⇒ (C ∧ D)

⇒ -intro

∧-introA ⇒ B ` C A ⇒ B ` D

A ⇒ B ` C ∧ D

` (A ⇒ B) ⇒ (C ∧ D)

R-introA ⇒ B ` C A ⇒ B ` D

` P

Page 15: Superdeduction - rho.loria.fr · Cl´ement Houtmann & Paul Brauner, LORIA October 23, 2006. Superdeduction Typing the ρ-calculus Let’s type the ρ-calculus Terms: p ::= R(α ...

Superdeduction

Superdeduction systems

Limitations of supernatural deduction

I incomplete decomposition:

R : P → (A∧B) ⇒ C ;R-elim

Γ `+ P Γ `+ A ∧ B

Γ `+ C

I restricted number of decomposed connectors:Only ⇒, ∧ and ∀

P → ∀x .(A(x) ∨ B(x))and P → ∀x .A(x) ∨ ∀x .B(x)

lead to the same deduction rules

I Sequent calculus presents more symmetries

Page 16: Superdeduction - rho.loria.fr · Cl´ement Houtmann & Paul Brauner, LORIA October 23, 2006. Superdeduction Typing the ρ-calculus Let’s type the ρ-calculus Terms: p ::= R(α ...

Superdeduction

Superdeduction systems

Limitations of supernatural deduction

I incomplete decomposition:

R : P → (A∧B) ⇒ C ;R-elim

Γ `+ P Γ `+ A ∧ B

Γ `+ C

I restricted number of decomposed connectors:Only ⇒, ∧ and ∀

P → ∀x .(A(x) ∨ B(x))and P → ∀x .A(x) ∨ ∀x .B(x)

lead to the same deduction rules

I Sequent calculus presents more symmetries

Page 17: Superdeduction - rho.loria.fr · Cl´ement Houtmann & Paul Brauner, LORIA October 23, 2006. Superdeduction Typing the ρ-calculus Let’s type the ρ-calculus Terms: p ::= R(α ...

Superdeduction

Superdeduction systems

Extended sequent calculus

I Rules computation : same procedure with all connectorsI One right and one left super-rule per axiomI Two additional computation rules

>-leftΓ ` ∆

Γ,> ` ∆⊥-right

Γ ` ∆

Γ ` ⊥,∆

I One issue : non-permutability cases of classical sequentcalculus

Page 18: Superdeduction - rho.loria.fr · Cl´ement Houtmann & Paul Brauner, LORIA October 23, 2006. Superdeduction Typing the ρ-calculus Let’s type the ρ-calculus Terms: p ::= R(α ...

Superdeduction

Superdeduction systems

Permutability problem

I Superdeduction = Prawitz’ folding-unfolding + automateddeduction

I Problems : ∀-right then ∀-left or ∃-right, etc.

I Solution : focussing

R : P → ∀x .(∀y .A(x , y) ⇒ B(x))

R : P → ∀x .(P1(x) ⇒ B(x))R1 : P1(x) → ∀y .A(x , y)

Page 19: Superdeduction - rho.loria.fr · Cl´ement Houtmann & Paul Brauner, LORIA October 23, 2006. Superdeduction Typing the ρ-calculus Let’s type the ρ-calculus Terms: p ::= R(α ...

Superdeduction

Superdeduction systems

Permutability problem

I Superdeduction = Prawitz’ folding-unfolding + automateddeduction

I Problems : ∀-right then ∀-left or ∃-right, etc.

I Solution : focussing

R : P → ∀x .(∀y .A(x , y) ⇒ B(x))

R : P → ∀x .(P1(x) ⇒ B(x))R1 : P1(x) → ∀y .A(x , y)

Page 20: Superdeduction - rho.loria.fr · Cl´ement Houtmann & Paul Brauner, LORIA October 23, 2006. Superdeduction Typing the ρ-calculus Let’s type the ρ-calculus Terms: p ::= R(α ...

Superdeduction

Meta-properties

Translations summary

Page 21: Superdeduction - rho.loria.fr · Cl´ement Houtmann & Paul Brauner, LORIA October 23, 2006. Superdeduction Typing the ρ-calculus Let’s type the ρ-calculus Terms: p ::= R(α ...

Superdeduction

Meta-properties

Strong normalization result

For supernatural deduction systems:

I Curry-Howard correspondance with a simple ρ-calculus

I Subject reduction + Strong normalization

I Consistency of supernatural deduction

Page 22: Superdeduction - rho.loria.fr · Cl´ement Houtmann & Paul Brauner, LORIA October 23, 2006. Superdeduction Typing the ρ-calculus Let’s type the ρ-calculus Terms: p ::= R(α ...

Superdeduction

Applications

Deduction modulo

Modulo Superdeduction

∀-rightΓ ` P(x0),∆

Γ ` Q(x),∆Q ≡R ∀x .P(x) ⊆ -right

Γ, x0 ∈ X ` x0 ∈ Y , Γ

Γ ` X ⊆ Y , Γ

∀-right` x0 ∈ A ⇒ x0 ∈ B

` A ⊆ B⊆ -right

x0 ∈ A ` x0 ∈ B

` A ⊆ B

Page 23: Superdeduction - rho.loria.fr · Cl´ement Houtmann & Paul Brauner, LORIA October 23, 2006. Superdeduction Typing the ρ-calculus Let’s type the ρ-calculus Terms: p ::= R(α ...

Superdeduction

Applications

Deduction modulo

Modulo Superdeduction

∀-rightΓ ` P(x0),∆

Γ ` Q(x),∆Q ≡R ∀x .P(x) ⊆ -right

Γ, x0 ∈ X ` x0 ∈ Y , Γ

Γ ` X ⊆ Y , Γ

∀-right` x0 ∈ A ⇒ x0 ∈ B

` A ⊆ B⊆ -right

x0 ∈ A ` x0 ∈ B

` A ⊆ B

Page 24: Superdeduction - rho.loria.fr · Cl´ement Houtmann & Paul Brauner, LORIA October 23, 2006. Superdeduction Typing the ρ-calculus Let’s type the ρ-calculus Terms: p ::= R(α ...

Superdeduction

Applications

Application : arithmetic

I Natural numbers definition → induction principle

I “cleaning” the rule:

∈N: n ∈ N → ∀P.(0 ∈ P ⇒ ∀m.(m ∈ P ⇒ S(m) ∈ P) ⇒ n ∈ P)

∈N : n ∈ N → ∀P.(0 ∈ P ⇒ H(P) ⇒ n ∈ P)hered : H(P) → ∀m.(m ∈ P ⇒ S(m) ∈ P)

Page 25: Superdeduction - rho.loria.fr · Cl´ement Houtmann & Paul Brauner, LORIA October 23, 2006. Superdeduction Typing the ρ-calculus Let’s type the ρ-calculus Terms: p ::= R(α ...

Superdeduction

Applications

Application : arithmetic

New deduction rules for hered :

hered -leftΓ `+ m ∈ P,∆ Γ,S(m) ∈ P `+ ∆

Γ,H(P) `+ ∆

hered -rightΓ,m ∈ P `+ S(m) ∈ P,∆

Γ `+ H(P),∆

Page 26: Superdeduction - rho.loria.fr · Cl´ement Houtmann & Paul Brauner, LORIA October 23, 2006. Superdeduction Typing the ρ-calculus Let’s type the ρ-calculus Terms: p ::= R(α ...

Superdeduction

Applications

Application : arithmetic

New deduction rules fo ∈N:

∈N-leftΓ `+ 0 ∈ P,∆ Γ `+ H(P),∆ Γ, n ∈ P `+ ∆

Γ, n ∈ N `+ ∆

∈N-right0 ∈ P,H(P) `+ n ∈ P,∆

Γ `+ n ∈ N,∆

Induction principle

Page 27: Superdeduction - rho.loria.fr · Cl´ement Houtmann & Paul Brauner, LORIA October 23, 2006. Superdeduction Typing the ρ-calculus Let’s type the ρ-calculus Terms: p ::= R(α ...

Superdeduction

Applications

Application : arithmetic

New deduction rules fo ∈N:

∈N-leftΓ `+ 0 ∈ P,∆ Γ `+ H(P),∆ Γ, n ∈ P `+ ∆

Γ, n ∈ N `+ ∆

∈N-right0 ∈ P,H(P) `+ n ∈ P,∆

Γ `+ n ∈ N,∆

Induction principle

Page 28: Superdeduction - rho.loria.fr · Cl´ement Houtmann & Paul Brauner, LORIA October 23, 2006. Superdeduction Typing the ρ-calculus Let’s type the ρ-calculus Terms: p ::= R(α ...

Superdeduction

Applications

Prototype

Lemuridae : a proof assistant for superdeduction

I Rewrite rules on terms and propositions

I Proof building in th extendible sequent calculus

I Interactive matching rules presentation

I Automatic tactics