The Computational Content of Classical Natural Deduction Alexander

  • Slides: 130
Download presentation
νλμ : The Computational Content of Classical Natural Deduction Alexander J Summers Department of

νλμ : The Computational Content of Classical Natural Deduction Alexander J Summers Department of Computing Imperial College London

Curry-Howard Correspondence ► Historically relates minimal logic and λ-calculus – Formulas relate to types

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

Curry-Howard Correspondence Minimal Natural Deduction (If Lambda Calculus did not exist, it would be

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

Curry-Howard Correspondence Minimal Natural Deduction (If Lambda Calculus did not exist, it would be

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

Curry-Howard Correspondence Minimal Natural Deduction (If Lambda Calculus did not exist, it would be

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) (If

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ,

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A Γ⊢ (Ax)

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A Γ⊢ (Ax)

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A Γ⊢ (Ax)

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ,

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ,

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ,

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ,

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ,

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ,

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ,

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ,

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ,

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ,

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ,

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ,

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ,

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ,

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

Curry-Howard Correspondence Minimal Natural Deduction Γ, x: A ⊢ x : A (Ax) Γ,

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

To extract the computational content of a logic. . ► Write down the proof

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

What about Classical Logic? Classical Natural Deduction

What about Classical Logic? Classical Natural Deduction

What about Classical Logic? Classical Natural Deduction Γ, x: A ⊢ x : A

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

What about Classical Logic? Classical Natural Deduction Γ, x: A ⊢ x : A

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

What about Classical Logic? Classical Natural Deduction Γ, x: A ⊢ x : A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

New features ► - bottom type represents ‘no output’ ► ¬A - negated type

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

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the

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

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the

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

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the

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

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the typing rule: Γ, x: ¬A ⊢ M : (PC) ► Find a term of type ¬A Γ ⊢ μx. M : 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

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the typing rule: Γ, x: ¬A ⊢ M : (PC) ► Find a term of type ¬A Γ ⊢ μx. M : 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

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the typing rule: Γ, x: ¬A ⊢ M : (PC) ► Find a term of type ¬A Γ ⊢ μx. M : 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. x. M M: A

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the typing rule: Γ, x: ¬A ⊢ M : (PC) ► Find a term of type ¬A Γ ⊢ μx. M : 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 μx. : MA

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the typing rule: Γ, x: ¬A ⊢ M : (PC) ► Find a term of type ¬A Γ ⊢ μx. M : 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 μ: x. AM

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the typing rule: Γ, x: ¬A ⊢ M : (PC) ► Find a term of type ¬A Γ ⊢ μx. M : 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. M

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the typing rule: Γ, x: ¬A ⊢ M : (PC) ► Find a term of type ¬A Γ ⊢ μx. M : 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. M

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the typing rule: Γ, x: ¬A ⊢ M : (PC) ► Find a term of type ¬A Γ ⊢ μx. M : 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. M

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the typing rule: Γ, x: ¬A ⊢ M : (PC) ► Find a term of type ¬A Γ ⊢ μx. M : 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. M

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the typing rule: Γ, x: ¬A ⊢ M : (PC) ► Find a term of type ¬A Γ ⊢ μx. M : 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. M

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the typing rule: Γ, x: ¬A ⊢ M : (PC) ► Find a term of type ¬A Γ ⊢ μx. M : 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. M

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the typing rule: Γ, x: ¬A ⊢ M : (PC) ► Find a term of type ¬A Γ ⊢ μx. M : 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. M

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the typing rule: Γ, x: ¬A ⊢ M : (PC) ► Find a term of type ¬A Γ ⊢ μx. M : 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. M

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the typing rule: Γ, x: ¬A ⊢ M : (PC) ► Find a term of type ¬A Γ ⊢ μx. M : 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. M

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the typing rule: Γ, x: ¬A ⊢ M : (PC) ► Find a term of type ¬A Γ ⊢ μx. M : 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

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the typing rule: Γ, x: ¬A ⊢ M : (PC) ► Find a term of type ¬A Γ ⊢ μx. M : 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 z : A Γ, x: ¬A ⊢ M : (PC) Γ ⊢ μx. M : A

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the typing rule: Γ, x: ¬A ⊢ M : (PC) ► Find a term of type ¬A Γ ⊢ μx. M : 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 νz. z : A : ¬A Γ, x: ¬A ⊢ M : (PC) Γ ⊢ μx. M : A

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the typing rule: Γ, x: ¬A ⊢ M : (PC) ► Find a term of type ¬A Γ ⊢ μx. M : 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 νz. z : A : ¬A Γ, x: ¬A ⊢ M : (PC) Γ ⊢ μx. M : A

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the

μ reductions. . ► General idea: μ-bound terms consume their contexts ► Recall the typing rule: Γ, x: ¬A ⊢ M : (PC) ► Find a term of type ¬A Γ ⊢ μx. M : 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 νz. z : A : ¬A Γ, x: ¬A ⊢ M : (PC) Γ ⊢ μx. M : A

μ reductions. . ► General idea: μ-bound terms consume their contexts. ► Recall the

μ reductions. . ► General idea: μ-bound terms consume their contexts. ► Recall the typing rule: Γ, x: ¬A ⊢ M : (PC) ► Find a term of type ¬A Γ ⊢ μx. M : 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 νz. z : A : ¬A Γ, x: ¬A ⊢ M : (PC) Γ ⊢ μx. M : A

μ reductions. . ► More formally, using a special kind of context Ec Ec{μx.

μ 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 νz. z : A : ¬A Γ, x: ¬A ⊢ M : (PC) Γ ⊢ μx. M : A

Comparisons and related work ► There is plenty of existing work on similar calculi

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

Details

Details

Details (don’t panic) ► Coming soon to a thesis near you ► Also, there’s

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