Η παρουσίαση φορτώνεται. Παρακαλείστε να περιμένετε

Η παρουσίαση φορτώνεται. Παρακαλείστε να περιμένετε

νλμ : The Computational Content of Classical Natural Deduction

Παρόμοιες παρουσιάσεις


Παρουσίαση με θέμα: "νλμ : The Computational Content of Classical Natural Deduction"— Μεταγράφημα παρουσίασης:

1 νλμ : The Computational Content of Classical Natural Deduction
Alexander J Summers Department of Computing Imperial College London Set context of work/intro

2 Curry-Howard Correspondence
Historically relates minimal logic and λ-calculus Formulas relate to types Proofs relate to terms Proof reductions relate to β reductions Logic and calculus were invented independently We can borrow the idea of the correspondence.. Existing calculus => logic-based type system Existing logic => new programming calculus Extract the ‘computational content’ of the logic For Classical Logic, some work exists, but nothing as “nice” as the original correspondence What we’re going to talk about the effect of different connectives on term calculi Write this at the end, when all other slides are done.#

3 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it)

4 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it)

5 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it)

6 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) (Ax) Γ, x:A ⊢ x : A

7 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ A→B

8 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ A→B Γ ⊢ A→B Γ ⊢ A (→E) Γ ⊢ B

9 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ A→B Γ ⊢ A→B Γ ⊢ A (→E) Γ ⊢ B

10 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ A→B Γ ⊢ A→B Γ ⊢ A (→E) Γ ⊢ B

11 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ A→B Γ ⊢ A→B Γ ⊢ A (→E) Γ ⊢ B

12 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ A→B Γ ⊢ A→B Γ ⊢ A (→E) Γ ⊢ B

13 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ A→B Γ ⊢ A→B Γ ⊢ A (→E) Γ ⊢ B

14 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ A→B Γ ⊢ A→B Γ ⊢ A (→E) Γ ⊢ B

15 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ A→B Γ ⊢ A→B Γ ⊢ A (→E) Γ ⊢ B

16 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ A→B Γ ⊢ A→B Γ ⊢ A (→E) Γ ⊢ B

17 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ A→B Γ ⊢ A→B Γ ⊢ A (→E) Γ ⊢ B

18 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ A→B Γ ⊢ A→B Γ ⊢ A (→E) Γ ⊢ B

19 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ A→B Γ ⊢ A→B Γ ⊢ A (→E) Γ ⊢ B

20 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ A→B Γ ⊢ A→B Γ ⊢ A (→E) Γ ⊢ B

21 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ A→B Γ ⊢ A→B Γ ⊢ A (→E) Γ ⊢ B

22 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ A→B Γ ⊢ A→B Γ ⊢ A (→E) Γ ⊢ B

23 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ A→B Γ ⊢ A→B Γ ⊢ A (→E) Γ ⊢ B

24 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ A→B Γ ⊢ A→B Γ ⊢ A (→E) Γ ⊢ B

25 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ A→B Γ ⊢ A→B Γ ⊢ A (→E) Γ ⊢ B

26 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ A→B Γ ⊢ A→B Γ ⊢ A (→E) Γ ⊢ B

27 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ A→B Γ ⊢ A→B Γ ⊢ A (→E) Γ ⊢ B

28 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ A→B Γ ⊢ A→B Γ ⊢ A (→E) Γ ⊢ B

29 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ A→B Γ ⊢ A→B Γ ⊢ A (→E) Γ ⊢ B

30 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ A→B Γ ⊢ A→B Γ ⊢ A (→E) Γ ⊢ B

31 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ A→B Γ ⊢ A→B Γ ⊢ A (→E) Γ ⊢ B

32 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ A→B Γ ⊢ A (→E) Γ ⊢ B

33 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ A→B Γ ⊢ A (→E) Γ ⊢ B

34 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ A→B Γ ⊢ A (→E) Γ ⊢ B

35 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ A→B Γ ⊢ A (→E) Γ ⊢ B

36 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ A→B Γ ⊢ A (→E) Γ ⊢ B

37 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ A→B Γ ⊢ A (→E) Γ ⊢ B

38 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ A→B Γ ⊢ A (→E) Γ ⊢ B

39 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ A→B Γ ⊢ A (→E) Γ ⊢ B

40 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ M : A→B Γ ⊢ A (→E) Γ ⊢ B

41 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ M : A→B Γ ⊢ A (→E) Γ ⊢ B

42 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ M : A→B Γ ⊢ A (→E) Γ ⊢ B

43 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ M : A→B Γ ⊢ A (→E) Γ ⊢ B

44 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ M : A→B Γ ⊢ A (→E) Γ ⊢ B

45 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ M : A→B Γ ⊢ A (→E) Γ ⊢ B

46 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ M : A→B Γ ⊢ A (→E) Γ ⊢ B

47 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ M : A→B Γ ⊢ N : A (→E) Γ ⊢ B

48 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ M : A→B Γ ⊢ N : A (→E) Γ ⊢ B

49 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ M : A→B Γ ⊢ N : A (→E) Γ ⊢ B

50 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ M : A→B Γ ⊢ N : A (→E) Γ ⊢ B

51 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ M : A→B Γ ⊢ N : A (→E) Γ ⊢ B

52 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ M : A→B Γ ⊢ N : A (→E) Γ ⊢ B

53 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ M : A→B Γ ⊢ N : A (→E) Γ ⊢ B

54 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ M : A→B Γ ⊢ N : A (→E) Γ ⊢ B

55 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ M : A→B Γ ⊢ N : A (→E) Γ ⊢ B

56 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ M : A→B Γ ⊢ N : A (→E) Γ ⊢ B

57 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ M : A→B Γ ⊢ N : A (→E) Γ ⊢ B

58 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ M : A→B Γ ⊢ N : A (→E) Γ ⊢ B

59 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ M : A→B Γ ⊢ N : A (→E) Γ ⊢ B

60 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ M : A→B Γ ⊢ N : A (→E) Γ ⊢ (M N) : B

61 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ M : A→B Γ ⊢ N : A (→E) Γ ⊢ (M N) : B

62 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ M : A→B Γ ⊢ N : A (→E) Γ ⊢ (M N) : B

63 Curry-Howard Correspondence
Minimal Natural Deduction (If Lambda Calculus did not exist, it would be necessary to invent it) Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ M : A→B Γ ⊢ N : A (→E) Γ ⊢ (M N) : B

64 Curry-Howard Correspondence
Minimal Natural Deduction Reductions? Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ M : A→B Γ ⊢ N : A (→E) Γ ⊢ (M N) : B

65 Curry-Howard Correspondence
Minimal Natural Deduction Reductions? A standard notion of proof reduction exists.. Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ M : A→B Γ ⊢ N : A (→E) Γ ⊢ (M N) : B

66 Curry-Howard Correspondence
Minimal Natural Deduction Reductions? A standard notion of proof reduction exists.. Furthermore, it gives rise to the β-rule from the λ-calculus! Γ, x:A ⊢ M : B (Ax) (→I) Γ, x:A ⊢ x : A Γ ⊢ λx.M : A→B Γ ⊢ M : A→B Γ ⊢ N : A (→E) Γ ⊢ (M N) : B

67 To extract the computational content of a logic..
Write down the proof rules Write a syntactic representation Label the formulas in contexts Subproofs become subterms Formulas bound correspond to syntax binders If the logic has canonical reduction rules, use them Throw away all the types This is only possible if reduction rules depend on syntax only Now the proof rules form a simple type-assignment system Syntax directed Principal typings Strong Normalisation of typeable terms

68 What about Classical Logic?
Classical Natural Deduction

69 What about Classical Logic?
Classical Natural Deduction (Ax) Γ, x:A ⊢ x : A Γ, x:A ⊢ M : B (→I) Γ ⊢ λx.M : A→B Γ ⊢ M : A→B Γ ⊢ N : A (→E) Γ ⊢ (M N) : B

70 What about Classical Logic?
Classical Natural Deduction (Ax) Γ, x:A ⊢ x : A Γ, x:A ⊢ M : B (→I) Γ ⊢ λx.M : A→B Γ ⊢ M : A→B Γ ⊢ N : A Γ, x: ¬A ⊢ M :  (→E) (PC) Γ ⊢ (M N) : B Γ ⊢ μx.M : A

71 What about Classical Logic?
Classical Natural Deduction Γ, x:A ⊢ M :  (Ax) (¬I) Γ, x:A ⊢ x : A Γ ⊢ νx.M : ¬A Γ, x:A ⊢ M : B (→I) Γ ⊢ λx.M : A→B Γ ⊢ M : A→B Γ ⊢ N : A Γ, x: ¬A ⊢ M :  (→E) (PC) Γ ⊢ (M N) : B Γ ⊢ μx.M : A

72 What about Classical Logic?
Classical Natural Deduction Γ, x:A ⊢ M :  (Ax) (¬I) Γ, x:A ⊢ x : A Γ ⊢ νx.M : ¬A Γ, x:A ⊢ M : B Γ ⊢ M : ¬A Γ ⊢ N : A (→I) (¬E) Γ ⊢ λx.M : A→B Γ ⊢ [M]N :  Γ ⊢ M : A→B Γ ⊢ N : A Γ, x: ¬A ⊢ M :  (→E) (PC) Γ ⊢ (M N) : B Γ ⊢ μx.M : A

73 What about Classical Logic?
Classical Natural Deduction Γ, x:A ⊢ M :  (Ax) (¬I) Γ, x:A ⊢ x : A Γ ⊢ νx.M : ¬A Γ, x:A ⊢ M : B Γ ⊢ M : ¬A Γ ⊢ N : A (→I) (¬E) Γ ⊢ λx.M : A→B Γ ⊢ [M]N :  Γ ⊢ M : A→B Γ ⊢ N : A Γ, x: ¬A ⊢ M :  (→E) (PC) Γ ⊢ (M N) : B Γ ⊢ μx.M : A

74 What about Classical Logic?
Classical Natural Deduction Γ, x:A ⊢ M :  (Ax) (¬I) Γ, x:A ⊢ x : A Γ ⊢ νx.M : ¬A Γ, x:A ⊢ M : B Γ ⊢ M : ¬A Γ ⊢ N : A (→I) (¬E) Γ ⊢ λx.M : A→B Γ ⊢ [M]N :  Γ ⊢ M : A→B Γ ⊢ N : A Γ, x: ¬A ⊢ M :  (→E) (PC) Γ ⊢ (M N) : B Γ ⊢ μx.M : A

75 What about Classical Logic?
Classical Natural Deduction Γ, x:A ⊢ M :  (Ax) (¬I) Γ, x:A ⊢ x : A Γ ⊢ νx.M : ¬A Γ, x:A ⊢ M : B Γ ⊢ M : ¬A Γ ⊢ N : A (→I) (¬E) Γ ⊢ λx.M : A→B Γ ⊢ [M]N :  Γ ⊢ M : A→B Γ ⊢ N : A Γ, x: ¬A ⊢ M :  (→E) (PC) Γ ⊢ (M N) : B Γ ⊢ μx.M : A

76 What about Classical Logic?
Classical Natural Deduction Γ, x:A ⊢ M :  (Ax) (¬I) Γ, x:A ⊢ x : A Γ ⊢ νx.M : ¬A Γ, x:A ⊢ M : B Γ ⊢ M : ¬A Γ ⊢ N : A (→I) (¬E) Γ ⊢ λx.M : A→B Γ ⊢ [M]N :  Γ ⊢ M : A→B Γ ⊢ N : A Γ, x: ¬A ⊢ M :  (→E) (PC) Γ ⊢ (M N) : B Γ ⊢ μx.M : A

77 What about Classical Logic?
Classical Natural Deduction Γ, x:A ⊢ M :  (Ax) (¬I) Γ, x:A ⊢ x : A Γ ⊢ νx.M : ¬A Γ, x:A ⊢ M : B Γ ⊢ M : ¬A Γ ⊢ N : A (→I) (¬E) Γ ⊢ λx.M : A→B Γ ⊢ [M]N :  Γ ⊢ M : A→B Γ ⊢ N : A Γ, x: ¬A ⊢ M :  (→E) (PC) Γ ⊢ (M N) : B Γ ⊢ μx.M : A

78 What about Classical Logic?
Classical Natural Deduction Γ, x:A ⊢ M :  (Ax) (¬I) Γ, x:A ⊢ x : A Γ ⊢ νx.M : ¬A Γ, x:A ⊢ M : B Γ ⊢ M : ¬A Γ ⊢ N : A (→I) (¬E) Γ ⊢ λx.M : A→B Γ ⊢ [M]N :  Γ ⊢ M : A→B Γ ⊢ N : A Γ, x: ¬A ⊢ M :  (→E) (PC) Γ ⊢ (M N) : B Γ ⊢ μx.M : A

79 What about Classical Logic?
Classical Natural Deduction Γ, x:A ⊢ M :  (Ax) (¬I) Γ, x:A ⊢ x : A Γ ⊢ νx.M : ¬A Γ, x:A ⊢ M : B Γ ⊢ M : ¬A Γ ⊢ N : A (→I) (¬E) Γ ⊢ λx.M : A→B Γ ⊢ [M]N :  Γ ⊢ M : A→B Γ ⊢ N : A Γ, x: ¬A ⊢ M :  (→E) (PC) Γ ⊢ (M N) : B Γ ⊢ μx.M : A

80 What about Classical Logic?
Classical Natural Deduction Γ, x:A ⊢ M :  (Ax) (¬I) Γ, x:A ⊢ x : A Γ ⊢ νx.M : ¬A Γ, x:A ⊢ M : B Γ ⊢ M : ¬A Γ ⊢ N : A (→I) (¬E) Γ ⊢ λx.M : A→B Γ ⊢ [M]N :  Γ ⊢ M : A→B Γ ⊢ N : A Γ, x: ¬A ⊢ M :  (→E) (PC) Γ ⊢ (M N) : B Γ ⊢ μx.M : A

81 What about Classical Logic?
Classical Natural Deduction Γ, x:A ⊢ M :  (Ax) (¬I) Γ, x:A ⊢ x : A Γ ⊢ νx.M : ¬A Γ, x:A ⊢ M : B Γ ⊢ M : ¬A Γ ⊢ N : A (→I) (¬E) Γ ⊢ λx.M : A→B Γ ⊢ [M]N :  Γ ⊢ M : A→B Γ ⊢ N : A Γ, x: ¬A ⊢ M :  (→E) (PC) Γ ⊢ (M N) : B Γ ⊢ μx.M : A

82 What about Classical Logic?
Classical Natural Deduction Γ, x:A ⊢ M :  (Ax) (¬I) Γ, x:A ⊢ x : A Γ ⊢ νx.M : ¬A Γ, x:A ⊢ M : B Γ ⊢ M : ¬A Γ ⊢ N : A (→I) (¬E) Γ ⊢ λx.M : A→B Γ ⊢ [M]N :  Γ ⊢ M : A→B Γ ⊢ N : A Γ, x: ¬A ⊢ M :  (→E) (PC) Γ ⊢ (M N) : B Γ ⊢ μx.M : A

83 What about Classical Logic?
Γ, x:A ⊢ M :  (Ax) (¬I) Γ, x:A ⊢ x : A Γ ⊢ νx.M : ¬A Γ, x:A ⊢ M : B Γ ⊢ M : ¬A Γ ⊢ N : A (→I) (¬E) Γ ⊢ λx.M : A→B Γ ⊢ [M]N :  Γ ⊢ M : A→B Γ ⊢ N : A Γ, x: ¬A ⊢ M :  (→E) (PC) Γ ⊢ (M N) : B Γ ⊢ μx.M : A

84 What about Classical Logic?
The νλμ-calculus Γ, x:A ⊢ M :  (Ax) (¬I) Γ, x:A ⊢ x : A Γ ⊢ νx.M : ¬A Γ, x:A ⊢ M : B Γ ⊢ M : ¬A Γ ⊢ N : A (→I) (¬E) Γ ⊢ λx.M : A→B Γ ⊢ [M]N :  Γ ⊢ M : A→B Γ ⊢ N : A Γ, x: ¬A ⊢ M :  (→E) (PC) Γ ⊢ (M N) : B Γ ⊢ μx.M : A

85 New features The νλμ-calculus Γ, x:A ⊢ M :  Γ, x:A ⊢ x : A
(¬I) Γ, x:A ⊢ x : A Γ ⊢ νx.M : ¬A Γ, x:A ⊢ M : B Γ ⊢ M : ¬A Γ ⊢ N : A (→I) (¬E) Γ ⊢ λx.M : A→B Γ ⊢ [M]N :  Γ ⊢ M : A→B Γ ⊢ N : A Γ, x: ¬A ⊢ M :  (→E) (PC) Γ ⊢ (M N) : B Γ ⊢ μx.M : A

86 New features The νλμ-calculus Γ, x:A ⊢ M :  Γ, x:A ⊢ x : A
(¬I) Γ, x:A ⊢ x : A Γ ⊢ νx.M : ¬A Γ, x:A ⊢ M : B Γ ⊢ M : ¬A Γ ⊢ N : A (→I) (¬E) Γ ⊢ λx.M : A→B Γ ⊢ [M]N :  Γ ⊢ M : A→B Γ ⊢ N : A Γ, x: ¬A ⊢ M :  (→E) (PC) Γ ⊢ (M N) : B Γ ⊢ μx.M : A

87 New features The νλμ-calculus Γ, x:A ⊢ M :  Γ, x:A ⊢ x : A
(¬I) Γ, x:A ⊢ x : A Γ ⊢ νx.M : ¬A Γ, x:A ⊢ M : B Γ ⊢ M : ¬A Γ ⊢ N : A (→I) (¬E) Γ ⊢ λx.M : A→B Γ ⊢ [M]N :  Γ ⊢ M : A→B Γ ⊢ N : A Γ, x: ¬A ⊢ M :  (→E) (PC) Γ ⊢ (M N) : B Γ ⊢ μx.M : A

88 New features νx.M ¬A [M]N μx.M

89 New features νx.M ¬A [M]N μx.M

90 New features νx.M ¬A [M]N μx.M

91 New features ¬A νx.M [M]N μx.M

92 New features ¬A νx.M [M]N μx.M

93 New features ¬A νx.M [M]N μx.M

94 New features ¬A νx.M [M]N μx.M

95 New features ¬A νx.M [M]N μx.M

96 New features ¬A νx.M [M]N μx.M

97 New features ¬A νx.M [M]N μx.M

98 New features ¬A νx.M [M]N μx.M

99 New features ¬A νx.M [M]N μx.M

100 New features ¬A νx.M [M]N μx.M

101 New features ¬A νx.M [M]N μx.M

102 New features ¬A νx.M [M]N μx.M

103 New features  - bottom type represents ‘no output’ 
¬A - negated type for continuation with input of type A νx.M - terms to explicitly represent continuations Informally, terms which consume an input but produce no output [M]N - continuation application Pass the argument N to the continuation M μx.M - control operator Capture the surrounding ‘context’ and bind it to x What about reductions? Many alternative ideas exist, particularly for the μ-bound terms Identify a common theme, and generalise the existing work ¬A νx.M [M]N μx.M

104 μ reductions.. General idea: μ-bound terms consume their contexts
Recall the typing rule: Γ ⊢ μx.M : A Γ, x: ¬A ⊢ M :  (PC)

105 μ reductions.. General idea: μ-bound terms consume their contexts
Recall the typing rule: Find a term of type ¬A Γ ⊢ μx.M : A Γ, x: ¬A ⊢ M :  (PC)

106 μ reductions.. General idea: μ-bound terms consume their contexts
Recall the typing rule: Find a term of type ¬A Substitute the term for x Γ ⊢ μx.M : A Γ, x: ¬A ⊢ M :  (PC)

107 μ reductions.. General idea: μ-bound terms consume their contexts
Recall the typing rule: Find a term of type ¬A Substitute the term for x Term of type ¬A is a continuation with a ‘hole’ of type A Any context around μx.M must have a ‘hole’ of type A Γ ⊢ μx.M : A Γ, x: ¬A ⊢ M :  (PC)

108 μ reductions.. General idea: μ-bound terms consume their contexts
Recall the typing rule: Find a term of type ¬A Substitute the term for x Term of type ¬A is a continuation with a ‘hole’ of type A Any context around μx.M must have a ‘hole’ of type A Γ ⊢ μx.M : A Γ, x: ¬A ⊢ M :  (PC) μx.M : A

109 μ reductions.. General idea: μ-bound terms consume their contexts
Recall the typing rule: Find a term of type ¬A Substitute the term for x Term of type ¬A is a continuation with a ‘hole’ of type A Any context around μx.M must have a ‘hole’ of type A Γ, x: ¬A ⊢ M :  (PC) Γ ⊢ μx.M : A μx.M : A μx.M

110 μ reductions.. General idea: μ-bound terms consume their contexts
Recall the typing rule: Find a term of type ¬A Substitute the term for x Term of type ¬A is a continuation with a ‘hole’ of type A Any context around μx.M must have a ‘hole’ of type A Γ, x: ¬A ⊢ M :  (PC) Γ ⊢ μx.M : A μx.M : A μx.M

111 μ reductions.. General idea: μ-bound terms consume their contexts
Recall the typing rule: Find a term of type ¬A Substitute the term for x Term of type ¬A is a continuation with a ‘hole’ of type A Any context around μx.M must have a ‘hole’ of type A Γ, x: ¬A ⊢ M :  (PC) Γ ⊢ μx.M : A μx.M : A μx.M

112 μ reductions.. General idea: μ-bound terms consume their contexts
Recall the typing rule: Find a term of type ¬A Substitute the term for x Term of type ¬A is a continuation with a ‘hole’ of type A Any context around μx.M must have a ‘hole’ of type A Γ, x: ¬A ⊢ M :  (PC) Γ ⊢ μx.M : A μx.M : A μx.M

113 μ reductions.. General idea: μ-bound terms consume their contexts
Recall the typing rule: Find a term of type ¬A Substitute the term for x Term of type ¬A is a continuation with a ‘hole’ of type A Any context around μx.M must have a ‘hole’ of type A Γ, x: ¬A ⊢ M :  (PC) Γ ⊢ μx.M : A μx.M : A μx.M

114 μ reductions.. General idea: μ-bound terms consume their contexts
Recall the typing rule: Find a term of type ¬A Substitute the term for x Term of type ¬A is a continuation with a ‘hole’ of type A Any context around μx.M must have a ‘hole’ of type A Γ, x: ¬A ⊢ M :  (PC) Γ ⊢ μx.M : A μx.M : A μx.M

115 μ reductions.. General idea: μ-bound terms consume their contexts
Recall the typing rule: Find a term of type ¬A Substitute the term for x Term of type ¬A is a continuation with a ‘hole’ of type A Any context around μx.M must have a ‘hole’ of type A Γ, x: ¬A ⊢ M :  (PC) Γ ⊢ μx.M : A μx.M : A μx.M

116 μ reductions.. General idea: μ-bound terms consume their contexts
Recall the typing rule: Find a term of type ¬A Substitute the term for x Term of type ¬A is a continuation with a ‘hole’ of type A Any context around μx.M must have a ‘hole’ of type A Γ, x: ¬A ⊢ M :  (PC) Γ ⊢ μx.M : A μx.M : A μx.M

117 μ reductions.. General idea: μ-bound terms consume their contexts
Recall the typing rule: Find a term of type ¬A Substitute the term for x Term of type ¬A is a continuation with a ‘hole’ of type A Any context around μx.M must have a ‘hole’ of type A Γ, x: ¬A ⊢ M :  (PC) Γ ⊢ μx.M : A μx.M : A μx.M

118 μ reductions.. General idea: μ-bound terms consume their contexts
Recall the typing rule: Find a term of type ¬A Substitute the term for x Term of type ¬A is a continuation with a ‘hole’ of type A Any context around μx.M must have a ‘hole’ of type A Γ, x: ¬A ⊢ M :  (PC) Γ ⊢ μx.M : A μx.M : A μx.M

119 μ reductions.. General idea: μ-bound terms consume their contexts
Recall the typing rule: Find a term of type ¬A Substitute the term for x Term of type ¬A is a continuation with a ‘hole’ of type A Any context around μx.M must have a ‘hole’ of type A Γ, x: ¬A ⊢ M :  (PC) Γ ⊢ μx.M : A μx.M : A μx.M

120 μ reductions.. General idea: μ-bound terms consume their contexts
Recall the typing rule: Find a term of type ¬A Substitute the term for x Term of type ¬A is a continuation with a ‘hole’ of type A Any context around μx.M must have a ‘hole’ of type A Γ, x: ¬A ⊢ M :  (PC) Γ ⊢ μx.M : A μx.M : A μx.M

121 μ reductions.. General idea: μ-bound terms consume their contexts
Recall the typing rule: Find a term of type ¬A Substitute the term for x Term of type ¬A is a continuation with a ‘hole’ of type A Any context around μx.M must have a ‘hole’ of type A Γ, x: ¬A ⊢ M :  (PC) Γ ⊢ μx.M : A Γ, x: ¬A ⊢ M :  (PC) Γ ⊢ μx.M : A μx.M : A

122 μ reductions.. General idea: μ-bound terms consume their contexts
Recall the typing rule: Find a term of type ¬A Substitute the term for x Term of type ¬A is a continuation with a ‘hole’ of type A Any context around μx.M must have a ‘hole’ of type A Γ, x: ¬A ⊢ M :  (PC) Γ ⊢ μx.M : A Γ, x: ¬A ⊢ M :  (PC) Γ ⊢ μx.M : A z : A

123 μ reductions.. General idea: μ-bound terms consume their contexts
Recall the typing rule: Find a term of type ¬A Substitute the term for x Term of type ¬A is a continuation with a ‘hole’ of type A Any context around μx.M must have a ‘hole’ of type A Γ, x: ¬A ⊢ M :  (PC) Γ ⊢ μx.M : A Γ, x: ¬A ⊢ M :  (PC) νz. Γ ⊢ μx.M : A z : A : ¬A

124 μ reductions.. General idea: μ-bound terms consume their contexts
Recall the typing rule: Find a term of type ¬A Substitute the term for x Term of type ¬A is a continuation with a ‘hole’ of type A Any context around μx.M must have a ‘hole’ of type A Γ, x: ¬A ⊢ M :  (PC) Γ ⊢ μx.M : A Γ, x: ¬A ⊢ M :  (PC) νz. Γ ⊢ μx.M : A z : A : ¬A

125 μ reductions.. General idea: μ-bound terms consume their contexts
Recall the typing rule: Find a term of type ¬A Substitute the term for x Term of type ¬A is a continuation with a ‘hole’ of type A Any context around μx.M must have a ‘hole’ of type A Γ, x: ¬A ⊢ M :  (PC) Γ ⊢ μx.M : A Γ, x: ¬A ⊢ M :  (PC) νz. Γ ⊢ μx.M : A z : A : ¬A

126 μ reductions.. General idea: μ-bound terms consume their contexts.
Recall the typing rule: Find a term of type ¬A Substitute the term for x Term of type ¬A is a continuation with a ‘hole’ of type A Any context around μx.M must have a ‘hole’ of type A Γ, x: ¬A ⊢ M :  (PC) Γ ⊢ μx.M : A Γ, x: ¬A ⊢ M :  (PC) νz. Γ ⊢ μx.M : A z : A : ¬A

127 μ reductions.. More formally, using a special kind of context Ec
Ec{μx.M} → M< νz.Ec{z} / x > This behaviour can be broken down into ‘local’ rules Each rule consumes one level of surrounding context [μx.M]N → M< νz.[z]N/ x > The resulting rules largely subsume those in the literature Γ, x: ¬A ⊢ M :  (PC) νz. Γ ⊢ μx.M : A z : A : ¬A

128 Comparisons and related work
There is plenty of existing work on similar calculi λμ-calculus of Parigot λC calculus of Griffin Many others and variants Aim to faithfully inhabit the original logic Aim for a set of reductions encompassing existing work Aim for the simulation of existing control operators Another yardstick: classical sequent calculus Has fairly well-understood and accepted reduction rules Aim to be able to encode, and simulate these The νλμ calculus manages all of this 

129 Details

130 Details (don’t panic) Coming soon to a thesis near you
Also, there’s a paper on my web page google for “Alexander J Summers” Thank you for listening


Κατέβασμα ppt "νλμ : The Computational Content of Classical Natural Deduction"

Παρόμοιες παρουσιάσεις


Διαφημίσεις Google