Superdeduction - rho.loria.fr · Cl´ement Houtmann & Paul Brauner, LORIA October 23, 2006....
Transcript of Superdeduction - rho.loria.fr · Cl´ement Houtmann & Paul Brauner, LORIA October 23, 2006....
Superdeduction
Superdeduction
Clement Houtmann & Paul Brauner, LORIA
October 23, 2006
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
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
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
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
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
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 ]
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
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”
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.”
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
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
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
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
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
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
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
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)
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)
Superdeduction
Meta-properties
Translations summary
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
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
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
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)
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),∆
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
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
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