Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of...

36
Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session Sofia, August 16, 2018 1 INRIA Saclay & LIX, ´ Ecole Polytechnique, France 2 DISI, Universit` a di Bologna, Italy

Transcript of Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of...

Page 1: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

Harrop: a new tool in the kitchen of

intuitionistic logic

Matteo Manighetti 1

Andrea Condoluci 2

ESSLLI 2018 Student Session

Sofia, August 16, 2018

1INRIA Saclay & LIX, Ecole Polytechnique, France2DISI, Universita di Bologna, Italy

Page 2: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

Background: proof-theoretic kitchen

Page 3: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

Background: structural proof theory

What are we talking about?

• Proof theory:

• Given some ingredients (axioms) and tools (inference rules)

• What can we cook (prove) in the proof system?

` (A→ B)→ A→ B

• Structural proof theory: how do recipes look like?

A→ B ` A→ B` (A→ B)→ A→ B

1

Page 4: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

Backgound: natural deduction, intuitionistic propositional logic

Natural deduction: a very well known set of tools to cook proofs in

intuitionistic propositional logic (IPC)

They look like this:

Γ ` A Γ ` B∧-I:Γ ` A ∧ B

Γ ` A ∧ B∧-EΓ ` A

Γ ` A∨-IΓ ` A ∨ B

Γ ` A ∨ B Γ,A ` C Γ,B ` C∨-E

Γ ` C

That is: pairs of introduction and elimination tools for each

connective

2

Page 5: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

Background: proof reductions

A central notion in structural proof theory: proof reduction

(aka “normalization”, “cut elimination”)

Say we have a recipe ending with

Π1

A ` B→-I ` A→ B

Π2

` A→-E ` B

There is a detour! Preparing A→ B first is not necessary

Π1

A ` B` A→ B

Π2

` A` B

Π2

` AΠ1

` B

3

Page 6: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

Background: proof reductions

Why do we like Intuitionistic Logic?

• Disjunction property: if ` A ∨ B is provable, we know which

of the two is provable

• Curry-Howard: proofs correspond to idealized functional

programs

Why Natural Deduction?

• Transform directly axioms in elimination rules

• Easily get Curry-Howard terms

4

Page 7: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

Intro: Admissibility in propositional

intuitionistic logic

Page 8: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

Basic definitions

Definition (Admissible and derivable rules)

A rule A /B is admissible if whenever ` A is provable, then ` B

is provable. It is derivable if ` A→ B is provable

Definition (Structural completeness)

A logic is structurally complete if all admissible rules are derivable

So: an admissible rule is a tool we can actually do without

If it is derivable: we can describe how to do without, with a recipe

inside the logic!

In a structurally complete logic: we always have recipes to explain

how to avoid using admissible tools

5

Page 9: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

Basic definitions

Definition (Admissible and derivable rules)

A rule A /B is admissible if whenever ` A is provable, then ` B

is provable. It is derivable if ` A→ B is provable

Definition (Structural completeness)

A logic is structurally complete if all admissible rules are derivable

NoteClassical logic is structurally complete. Just think of truth tables!

Technical remarkRules here refer just to formulas, not to Natural Deduction

judgements!

Thus: different from cut/weakening admissibility

5

Page 10: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

Basic definitions

Definition (Admissible and derivable rules)

A rule A /B is admissible if whenever ` A is provable, then ` B

is provable. It is derivable if ` A→ B is provable

Definition (Structural completeness)

A logic is structurally complete if all admissible rules are derivable

Theorem (Harrop 1960)Intuitionistic propositional logic is not structurally complete

Proof.Counterexample: ¬B → (A1 ∨ A2) / (¬B → A1) ∨ (¬B → A2) is

admissible but not derivable

We study: admissible but non-derivable “principles” (axioms/rules)

5

Page 11: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

A bit of history

• Friedman (1975): Are the admissible rules of IPC countable?

• Rybakov (1984) answered positively; De Jongh and Visser

conjectured a basis for them

• Iemhoff (2001) proved the conjecture semantically

• Less known: Roziere (1992) independently obtained the same

result proof-theoretically

6

Page 12: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

Visser’s basis

Theorem (Iemhoff 2001, Roziere 1992)All admissible and non derivable rules are obtained by the usual

intuitionistic rules and the following rules

Vn : (Bi → Ci )i=1...n → A1∨A2/

∨nj=1((Bi → Ci )i=1...n → Bj)

((Bi → Ci )i=1...n → A1)

((Bi → Ci )i=1...n → A2)

7

Page 13: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

Our plan: proof reductions and admissible rules

ProblemWhenever we have a recipe for A, there is one for B. We can’t

have a recipe for A→ B

How are the two recipes related?

Looks like we miss some reductions!

Idea

• Allow admissible inferences in a Natural Deduction system

• Add reduction rules to make these inferences disappear

• . . . end up with the desired intuitionistic recipe!

8

Page 14: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

Adding tools to the intuitionistic

kitchen

Page 15: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

Harrop’s rule and the Kreisel-Putnam logic

The most famous admissible principle of IPC: Harrop’s principle

(¬B → (A1 ∨ A2))→ (¬B → A1) ∨ (¬B → A2)

By adding it to IPC we obtain the Kreisel-Putnam logic KP

It’s a particular case of V1, with ⊥ for C :

V1 : ((B → C )→ (A1∨A2))→ (((B → C )→ A1)∨((B → C )→ A2))

TriviaKP was the first non-intuitionistic logic to be shown to have the

disjunction property

9

Page 16: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

Harrop’s rule and the Kreisel-Putnam logic

The most famous admissible principle of IPC: Harrop’s principle

(¬B → (A1 ∨ A2))→ (¬B → A1) ∨ (¬B → A2)

Transform it to a Natural Deduction rule (based on disjunction

elimination)

Γ,¬B ` A1 ∨ A2

Γ,¬B → A1 ` D

Γ,¬B → A2 ` D

D

Ask a proof of the antecedent of Harrop, eliminate the conclusion

9

Page 17: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

Harrop’s rule and the Kreisel-Putnam logic

The most famous admissible principle of IPC: Harrop’s principle

(¬B → (A1 ∨ A2))→ (¬B → A1) ∨ (¬B → A2)

The final rule, together with a Curry-Howard term annotation:

Γ, x : ¬B ` t : A1 ∨ A2

Γ, y : ¬B → A1 ` u1 : D

Γ, y : ¬B → A2 ` u2 : D

Γ ` hop[x.t || y.u1 | y.u2] : D

9

Page 18: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

Harrop’s rule and the Kreisel-Putnam logic

Let’s turn to the reduction rules!

In the Curry-Howard notation:�� ��• Harrop-inj: hop[x.inji t || y.u1 | y.u2] 7→�� ��ui{λ~x . t/y}

• Harrop-app: hop[x.efq [x t] || y.u1 | y.u2] 7→ ui{(λx . efq x t)/y}

ΠΓ,¬B ` A1∨-I

Γ,¬B ` A1 ∨ A2

Ξ1

Γ,¬B → A1 ` D

Ξ2

Γ,¬B → A2 ` DHarrop:

Γ ` D

. . . reduces to

ΠΓ,¬B ` Ai→-I

Γ ` ¬B → Ai

Ξi

Γ ` D

10

Page 19: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

Harrop’s rule and the Kreisel-Putnam logic

Let’s turn to the reduction rules!

In the Curry-Howard notation:• Harrop-inj: hop[x.inji t || y.u1 | y.u2] 7→ ui{λ~x . t/y}�� ��• Harrop-app: hop[x.efq [x t] || y.u1 | y.u2] 7→

�� ��ui{(λx . efq x t)/y}

ΠΓ,¬B ` ⊥

efqΓ,¬B ` A1 ∨ A2

Ξ1

Γ,¬B → A1 ` D

Ξ2

Γ,¬B → A2 ` DHarrop:

Γ ` D

. . . reduces to

ΠΓ,¬B ` ⊥

efqΓ,¬B ` A1→-I

Γ ` ¬B → A1

Ξ1

Γ ` D

11

Page 20: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

Harrop’s rule and the Kreisel-Putnam logic

Definition (Normal form)A proof is in normal form if no reduction rule is applicable to it

Definition (Strong Normalization)A proof system has the Strong Normalization property if all proofs

reduce to a normal form, regardless of the strategy

TheoremOur calculus for KP has the Strong Normalization property

12

Page 21: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

Harrop’s rule and the Kreisel-Putnam logic

Lemma (Classification)

Let Γ¬ ` t : τ for t in n.f. and t not an exfalso:

• If τ = A→ B, then t is an abstraction or a variable in Γ¬;

• If τ = A ∨ B, then t is an injection;

• If τ = A ∧ B, then t is a pair;

• If τ = ⊥, then t = x v for some v and some x ∈ Γ¬;

Theorem (Disjunction property)

If ` t : A ∨ B, then there is t ′ such that either ` t ′ : A or ` t ′ : B.

13

Page 22: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

Roziere’s logic AD

What if we try to add the full V1 principle?

Theorem (Roziere, 1992)In the logic characterized by the axiom V1, all Vi are derivable and

all admissible rules are derivable

Roziere called this logic AD and showed that it isn’t classical logic.

However:

Theorem (Iemhoff, 2001)The only logic with the disjunction property where all Vn are

admissible is IPC

14

Page 23: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

Roziere’s logic AD

We can as before provide a term assignment for AD:

Γ, x : B → C ` t : A1 ∨ A2

Γ, y : (B → C )→ A1 ` u1 : D

Γ, y : (B → C )→ A2 ` u2 : D

Γ, z : (B → C )→ B ` v : D

Γ ` V1[x.t || y.u1 | y.u2 || z.v] : D

Although it doesn’t have the disjunction property, AD seems an

interesting and not well studied logic.

Roziere posed the problem of finding a functional interpretation for it; we

go in this direction by providing a term assignment to proofs

15

Page 24: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

Conclusions

Page 25: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

Conclusions

• Transformed admissible rules into natural deduction rules

• Studied arising logics

• Studied associated Curry-Howard calculus (in the paper)

16

Page 26: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

Conclusions

• Transformed admissible rules into natural deduction rules

• Studied arising logics

• Studied associated Curry-Howard calculus (in the paper)

But hey! The resulting recipes are in KP, AD, . . . not IPC!

Check out (soon):

M M and A C. “Admissible Tools in the Kitchen of Intuitionistic Logic”.

In: 7th International Workshop on Classical Logic & Computation. 2018

Where we take a different road, sticking to IPC and characterizing

all the Visser rule

16

Page 27: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

Conclusions

The logic based on admissible principles way:

• More in-depth study of AD

• Add new admissible principles

The admissibility way:

• Port the system for Visser’s rules to other (modal) logics

• Study admissible principles of intuitionistic arithmetic (HA)

• . . . and admissible principles of first-order logic

17

Page 28: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

Thank you

17

Page 29: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

A Curry-Howard system for

admissible rules

Page 30: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

Idea: explain Visser’s basis with Natural Deduction +

Curry-Howard

Advantages:

• Axioms can be translated to rules right away

• Simple way to assign lambda terms

• Focus on reduction rules

The rule should have the shape of a disjunction elimination

Page 31: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

Natural deduction rules for Vn

Add to a Natural Deduction system a rule for each of the Vn:

∅, (Bi → Ci )i ` A1 ∨ A2

Γ, (Bi → Ci )i → A1 ` D

Γ, (Bi → Ci )i → A2 ` D [Γ, (Bi → Ci )i → Bj ` D]j=1...n

Γ ` D

Idea: a disjunction elimination, parametrized over n implications

Note The context of the main premise is empty. Otherwise we

would be able to prove Vn!

Page 32: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

Term assignment

Usual terms for IPC, plus the new one for the V-rules

t, u, v ::= x | u v | λx . t | efq t

| < u, v> | proji t | inji t| case[t || y.u | y.v]

|�� ��Vn[~x.t || y.u1 | y.u2 || z.~v] (Visser)

~x : (Bi → Ci )i ` t : A1 ∨ A2

Γ, y : (Bi → Ci )i → A1 ` u1 : D

Γ, y : (Bi → Ci )i → A2 ` u2 : D

[Γ, z : (Bi → Ci )i → Bj ` vj : D]j=1...n

Vn[~x.t || y.u1 | y.u2 || z.~v] : D

Page 33: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

Reduction rules

Evaluation contexts for IPC:

W ::= [·] |W t | t W | efq W

| proji W | case[W || − | −]

Evaluation contexts for Vn: structural closure of the reduction rules

The usual rules for IPC, plus:

• Visser-inj: Vn[~x.inji t || y.u1 | y.u2 || z.~v ] 7→ ui{λ~x . t/y} (i = 1, 2)

• Visser-app: Vn[~x.W [xj t] || y.u1 | y.u2 || z.~v ] 7→ vj{λ~x . t/z} (j = 1 . . . n)

Page 34: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

The reduction rules tell us:

• One of the disjuncts is proved directly, or

• A proof for an Bj was provided, to be used on a V-hypothesis

This provides a succint explanation of what admissible rules can do

The context is empty, so all the hypotheses are Visser-hypotheses,

and we can move the terms around

Subject reduction and termination are easy results!

Page 35: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

Arithmetic

Theorem (De Jongh)The propositional formulas whose arithmetical instances are

provable in HA are the theorems of IPC

There is ongoing work to relate admissibility in IPC and HA

through provability logics

We believe our approach can be extended to such cases

For example: the arithmetical Independence of premises

(¬P → ∃x A(x))→ ∃x (¬P → A(x)) can be interpretated with a

rule resembling ours

Page 36: Harrop: a new tool in the kitchen of intuitionistic logic · Harrop: a new tool in the kitchen of intuitionistic logic Matteo Manighetti 1 Andrea Condoluci 2 ESSLLI 2018 Student Session

First-order logic

The situation in first-order logic seems much more complicated

However there are some well-behaved examples: Markov’s

Principle; Constant Domains

These principles give rise to the class of Herbrand-constructive

logics (Aschieri & M.): whenever ∃x A(x) is provable, there are

t1, . . . tn such that A(t1) ∨ . . .A(tn) is provable